Network model fine tuning method and device, equipment, storage medium and program product
By splitting the network model into sub-models and training them asynchronously in 6G networks, the problem of low federated learning efficiency caused by uneven device computing power and user mobility is solved, and efficient updating and stable transmission of model parameters are achieved.
Patent Information
- Application Number
- CN202410967156.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-18
- Publication Date
- 2026-01-20
AI Technical Summary
In 6G networks, the computing power of devices participating in federated learning is uneven. Existing federated learning methods result in low efficiency in fine-tuning the network model, and user mobility leads to unstable connections, affecting the transmission and updating of model parameters.
By splitting the network model into multiple sub-models and distributing them to collaborating nodes for asynchronous training, and making reasonable allocations based on the computing resources and connectivity of the collaborating nodes, asynchronous federated learning is used for model updates.
It improves the overall efficiency and stability of federated learning of network models, adapts to the challenges of dynamic changes in device computing power and user mobility in 6G networks, and ensures the effective transfer and updating of model parameters.
Smart Images

Figure CN121367660A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of communication, in particular to a network model fine-tuning method and device, equipment, storage medium and program product. BACKGROUND
[0002] Federal learning is a distributed machine learning framework with privacy protection and secure encryption technology, aiming to enable dispersed participants to collaborate on model training for machine learning while meeting the requirement of not disclosing private data to other participants. Federal learning can be divided into horizontal federal learning, vertical federal learning, and transfer federal learning, which can avoid unauthorized data diffusion and solve the problem of data silos. The essence of horizontal federal learning is the joint of samples, that is, the scene with more overlapping features and less overlapping users; the essence of vertical federal learning is the joint of features, which is suitable for the scene with more overlapping users and less overlapping features.
[0003] In the existing federal learning, the initial model obtained by each participant from the server is the same, and the number of model parameters required by the server to train and update is also the same. However, in actual application, the computing power of devices participating in federal learning is not the same, and the computing resource situation of each base station and user terminal in the 6G network will also dynamically change. Therefore, the existing federal learning for network model fine-tuning will no longer be reasonable in terms of computing power requirements for each participant, thereby causing the network model to have the problem of low federal learning efficiency in the 6G network scenario. SUMMARY
[0004] In view of the problems in the prior art, the embodiments of the present application provide a network model fine-tuning method, device, equipment, storage medium and program product, which can effectively improve the overall efficiency and stability of network model federal learning.
[0005] In a first aspect, the embodiments of the present application provide a network model fine-tuning method applied to a first centralized node, comprising:
[0006] sending a collaboration request to a collaboration node in a fine-tuning collaboration set; wherein the collaboration request is used to indicate obtaining collaboration-related information of the collaboration node; wherein the collaboration-related information includes first information or second information; the first information includes first computing resource information of the collaboration node, and the second information includes the first computing resource information of the collaboration node and first connection information between the collaboration node and the first centralized node;
[0007] receiving collaboration-related information sent by each collaboration node, and splitting a network model into multiple sub-models according to the collaboration-related information;
[0008] distributing multiple sub-models to multiple collaboration nodes in the fine-tuning collaboration set where the first centralized node is located for training.
[0009] updating the network model asynchronously according to the updated sub-models sent by the respective collaboration nodes; wherein the updated sub-models are obtained after the collaboration nodes complete training of the corresponding sub-models.
[0010] As an improvement of the above-mentioned scheme, the network model is divided into a plurality of sub-models according to the collaboration-related information, comprising:
[0011] dividing the plurality of collaboration nodes into at least one cluster; wherein each cluster includes a set number of collaboration nodes;
[0012] dividing the network model into the set number of sub-models according to the collaboration-related information of the collaboration nodes in the cluster; wherein one sub-model corresponds to one collaboration node in each cluster.
[0013] As an improvement of the above-mentioned scheme, the first computing resource information includes the available computing resource of the collaboration node;
[0014] According to the collaboration-related information of the collaboration nodes in the cluster, the network model is divided into the set number of sub-models, comprising:
[0015] calculating the ratio of the available computing resources of the collaboration nodes in each cluster;
[0016] According to the ratio of the available computing resources of the collaboration nodes in each cluster, the average of the ratio of the available computing resources of the collaboration nodes in all clusters is calculated to obtain the division ratio of the network model;
[0017] According to the division ratio, the network model is divided into the set number of sub-models.
[0018] As an improvement of the above-mentioned scheme, when the collaboration-related information includes the first information, the plurality of sub-models are distributed to the plurality of collaboration nodes in the fine-tuning collaboration set of the first centralized node for training, comprising:
[0019] Each of the sub-models is divided into a lower sub-model responsible for feature extraction and an upper sub-model responsible for prediction output;
[0020] According to the first computing resource information in the first information of each collaboration node, determine the sub-model to be distributed to the corresponding collaboration node;
[0021] The lower sub-model and the upper sub-model corresponding to each sub-model are distributed to the corresponding collaboration nodes for collaborative training.
[0022] As an improvement of the above scheme, when the cooperation-related information includes the second information, the distributing the plurality of sub-models to the plurality of cooperation nodes in the fine-tuning cooperation set where the first centralized node is located for training comprises:
[0023] Splitting each of the sub-models into a lower-layer sub-model responsible for feature extraction and an upper-layer sub-model responsible for predicting output;
[0024] According to the first computing resource information and the first connection information in the second information of each cooperation node, determine the sub-model to be distributed to the corresponding cooperation node;
[0025] Distribute the corresponding lower-layer sub-model and upper-layer sub-model of each of the sub-models to the corresponding cooperation node for cooperative training.
[0026] As an improvement of the above scheme, the asynchronous updating of the network model according to the updated sub-models sent by each of the cooperation nodes comprises:
[0027] Generating a local model according to the currently received updated sub-model;
[0028] Asynchronously updating the network model using the local model;
[0029] Judging whether the cooperation node corresponding to the currently received updated sub-model is the last cooperation node;
[0030] If not, continue to receive the updated sub-model sent by the next cooperation node to asynchronously update the network model;
[0031] If yes, complete the asynchronous updating of the network model.
[0032] As an improvement of the above scheme, the sending of the cooperation request to the cooperation nodes in the fine-tuning cooperation set comprises:
[0033] Managing and arranging the federated learning task to form a task service quality;
[0034] Splitting the task service quality into at least one resource service quality;
[0035] After the resource service quality, sending the cooperation request to the cooperation nodes in each of the clusters.
[0036] As an improvement of the above scheme, the method further comprises:
[0037] When the disconnection with the cooperation node is monitored, initiating reconnection to the cooperation node within a first time;
[0038] When the reconnection to the cooperation node fails within the first time, initiating a cooperation application to other cooperation nodes in the corresponding cluster;
[0039] receiving second computing resource information and second connection information sent by other collaboration nodes when accepting the collaboration application;
[0040] determining a first target collaboration node from other collaboration nodes according to the second computing resource information and the second connection information of the other collaboration nodes, and sending the sub-model corresponding to the collaboration node to the first target collaboration node for training.
[0041] As an improvement of the above scheme, the method further comprises:
[0042] receiving an updated sub-model of the collaboration node sent by the second centralized node when the collaboration node is switched from the first centralized node to the second centralized node, and updating the network model asynchronously according to the updated sub-model;
[0043] wherein the updated sub-model is obtained after the collaboration node reports training task state information to the second centralized node and completes the training task of the corresponding sub-model locally;
[0044] As an improvement of the above scheme, the method further comprises:
[0045] receiving a task failure message sent by the second centralized node when the collaboration node is disconnected from the first centralized node and the second centralized node at the same time within a second time and the training task of the corresponding sub-model of the collaboration node is not completed, and initiating a collaboration application to other collaboration nodes in the cluster where the collaboration node is located.
[0046] As an improvement of the above scheme, the method further comprises:
[0047] initiating a collaboration application to other collaboration nodes in the corresponding cluster when receiving third computing resource information and third connection information sent by the collaboration node before being disconnected from the first centralized node;
[0048] receiving second computing resource information and second connection information sent by other collaboration nodes when accepting the collaboration application;
[0049] judging whether there is another collaboration node in the corresponding cluster that meets a preset collaboration condition according to the second computing resource information and the second connection information of the other collaboration nodes, the third computing resource information and the third connection information of the collaboration node;
[0050] if yes, determining a second target collaboration node from the other collaboration nodes that meet the collaboration condition, and sending the sub-model corresponding to the collaboration node to the second target collaboration node for training;
[0051] if no, initiating a collaboration application to collaboration nodes in another cluster.
[0052] As an improvement of the above scheme, the cooperation condition comprises: a difference between available computing resource in the second computing resource information of other cooperation nodes and available computing resource in the third computing resource information of the cooperation node is less than a first threshold value, and a difference between the number of disconnections in the second connection information of other cooperation nodes and the number of disconnections in the third connection information of the cooperation node is less than a second threshold value.
[0053] As an improvement of the above scheme, the model parameter of each cooperation node is determined according to the initial model parameter of the corresponding cooperation node and the distance between the corresponding cooperation node and other cooperation nodes in the fine-tuning cooperation set.
[0054] As an improvement of the above scheme, the method further comprises the following model parameter determination step of the cooperation node:
[0055] For each cooperation node, a weight coefficient between the cooperation node and other cooperation nodes is calculated according to the distance between the cooperation node and other cooperation nodes in the fine-tuning cooperation set;
[0056] The product of each weight coefficient and the initial model parameter of the cooperation node is calculated to obtain a plurality of model parameter weighted values;
[0057] The plurality of model parameter weighted values are normalized, and the plurality of normalized model parameter weighted values are summed to obtain the model parameter of the cooperation node.
[0058] In a second aspect, an embodiment of the present application provides a network model fine-tuning device, applied to a first centralized node, comprising:
[0059] A cooperation request sending module is configured to send a cooperation request to a cooperation node in a fine-tuning cooperation set, wherein the cooperation request is used to instruct to obtain cooperation-related information of the cooperation node, wherein the cooperation-related information comprises first information or second information, wherein the first information comprises first computing resource information of the cooperation node, and the second information comprises the first computing resource information of the cooperation node and first connection information between the cooperation node and the first centralized node.
[0060] A model splitting module is configured to receive cooperation-related information sent by each cooperation node, and split a network model into a plurality of sub-models according to the cooperation-related information.
[0061] A model distribution module is configured to distribute the plurality of sub-models to a plurality of cooperation nodes in the fine-tuning cooperation set where the first centralized node is located for training.
[0062] The model asynchronous updating module is configured to update the network model asynchronously according to the update sub-models sent by the collaboration nodes.
[0063] In a third aspect, an embodiment of the present application provides a network model fine-tuning device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the computer program is executed by the processor, the network model fine-tuning method according to any one of the first aspect is implemented.
[0064] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, and the computer readable storage medium stores a computer program, wherein when the computer program is executed, the computer readable storage medium controls a device where the computer readable storage medium is located to execute the network model fine-tuning method according to any one of the first aspect.
[0065] In a fifth aspect, an embodiment of the present application provides a computer program product, including computer programs / instructions, and when the computer programs / instructions are executed by a processor, the network model fine-tuning method according to any one of the first aspect is implemented.
[0066] Compared with the prior art, the network model fine-tuning method, device, equipment, storage medium and program product provided by the embodiment of the present application, the first centralized node sends a collaboration request to the collaboration nodes in the fine-tuning collaboration set; wherein the collaboration request is used to indicate to obtain collaboration related information of the collaboration nodes; wherein the collaboration related information includes first information or second information; the first information includes first computing resource information of the collaboration nodes, and the second information includes the first computing resource information of the collaboration nodes and first connection information between the collaboration nodes and the first centralized node; then the first centralized node splits the network model into multiple sub-models according to the collaboration related information sent by each collaboration node; then the multiple sub-models are distributed to the multiple collaboration nodes in the fine-tuning collaboration set where the first centralized node is located for training; finally, the network model is updated asynchronously according to the update sub-models obtained after each collaboration node completes training of the corresponding sub-model; by reasonably splitting the global network model and distributing the sub-models obtained by splitting to different collaboration nodes for training, the overall efficiency and stability of the network model federated learning can be effectively improved. BRIEF DESCRIPTION OF DRAWINGS
[0067] In order to more clearly illustrate the technical solutions of the present application, the drawings used in the embodiments will be briefly introduced as follows. Obviously, the drawings described below are only some of the embodiments of the present application, and all other drawings obtained by those of ordinary skill in the art without creative effort based on these drawings also belong to the protection scope of the present application.
[0068] Figure 1 is a flowchart of a network model fine-tuning method provided by an embodiment of the present application;
[0069] Figure 2 is a schematic diagram of dividing a network model fine-tuning collaboration set provided by an embodiment of the present application;
[0070] Figure 3 is a schematic block diagram of network model fine-tuning based on asynchronous federated learning provided by an embodiment of the present application;
[0071] Figure 4 is a schematic diagram of a network model fine-tuning collaboration process provided by an embodiment of the present application;
[0072] Figure 5 is another schematic diagram of a network model fine-tuning collaboration process provided by an embodiment of the present application;
[0073] Figure 6 is a schematic diagram of a processing flow of mobile terminal disconnection caused by environmental changes provided by an embodiment of the present application;
[0074] Figure 7 is a schematic diagram of a processing flow of mobile terminal disconnection caused by base station switching provided by an embodiment of the present application;
[0075] Figure 8 is a schematic diagram of a processing flow of mobile terminal disconnection caused by mobile terminal active disconnection provided by an embodiment of the present application;
[0076] Figure 9 is a structural block diagram of a network model fine-tuning device provided by an embodiment of the present application;
[0077] Figure 10 is a structural block diagram of a network model fine-tuning device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0078] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, and not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort also belong to the protection scope of the present application.
[0079] It should be noted that the terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. The terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitation, the elements defined by the statement "include" do not exclude the presence of additional identical elements in the process, method, article or device including the elements. The term "a plurality of or several" refers to two or more, and the same applies to "a plurality of or several". The term "and / or" describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can represent three cases: A exists alone, A and B exist together, and B exists alone. The character " / " generally represents an "or" relationship between the front and rear associated objects.
[0080] Some terms and concepts related to the embodiments of the present application are explained below.
[0081] Model fine-tuning: a technique for adjusting and optimizing machine learning models, which first initializes model weights using pre-trained models obtained on large datasets to improve accuracy. Then train on specific datasets to adapt the model to specific scenarios, by adjusting model parameters, structure or weight distribution, to improve the performance and generalization ability of the pre-trained model. Common fine-tuning techniques include Instruction Tuning, BitFit, Prefix Tuning, LoRA, RLHF, etc.
[0082] Federated learning: a distributed training method that uses data sets scattered among participants to integrate multi-party data information through privacy protection techniques to collaboratively build a global model. During model training, relevant information about the model (such as model parameters, model structure, parameter gradients, etc.) can be exchanged between participants (exchange methods can be plaintext, data encryption, adding noise, etc.), but local training data will not leave the local. This exchange does not expose local user data, reducing the risk of data leakage.
[0083] Intelligence is an important feature of future 6G networks. In the 6G network, which is multi-domain fusion, ubiquitous connection and heterogeneous resources, incremental and patch-based capability enhancement cannot meet the diversified service requirements in large-scale networking. Therefore, it is necessary to embed core technology capabilities such as security and AI into the 6G architecture and penetrate into the whole life cycle of each field, network and unit. Mobile communication networks have the characteristics of large coverage, large number of users and strong mobility. Therefore, the intelligent application requirements of 6G networks have significant differentiation characteristics, and the generalization of global models is difficult to guarantee, which may affect the accuracy, precision and other performance of AI services. Therefore, based on the basic AI model, the embodiment of the application considers fine-tuning the model parameters at the first centralized node of the network to strengthen the generalization of the model and guarantee the service quality of intelligent services. In addition, considering the limited resources and data of a single node, the embodiment of the application considers using federated learning to perform local fine-tuning training of the model. However, the existing federated learning has the following problems:
[0084] (1) In the existing federated learning, the initial model obtained by each participant from the server is the same, and the server requires the same number of model parameters to be trained and updated by each participant. However, in actual applications, the computing power of devices participating in federated learning is not the same, and the computing power resources of each base station and user terminal in the 6G network will also dynamically change. Therefore, the existing federated learning for network model fine-tuning will no longer be reasonable in terms of the computing power requirements of each participant, thereby causing the problem of low federated learning efficiency of the network model in the 6G network scenario.
[0085] (2) The existing federated learning is server-client type, which requires stable and efficient connection and communication between the server and the client. However, in the 6G network scenario, users generally have mobility, and the connection between a single base station and a user cannot be maintained for a long time. Changes in the network environment will also affect the communication quality between the two. At this time, the existing federated learning is no longer suitable for mobile networks. The user loses connection with the original node due to mobility, and the missing part of the parameters, thereby causing the transmission process of the model and the parameters to be blocked, and further causing the problem that the global model cannot be effectively updated.
[0086] (3) In the training process of the existing federated learning, on the one hand, due to the different contributions of each participant, data imbalance will cause the imbalance of the weight distribution after aggregation, thereby affecting the accuracy of the entire model and making some important learning results not be reflected. On the other hand, local training of the model at the node brings about large resource occupation and load, which is not suitable for the mobile 6G network scenario with variable network state and limited resources.
[0087] To solve the problems of low training efficiency, blocked updating process, and unbalanced model parameter weights of each participant in the 6G network scenario caused by fine-tuning the polar network model using federated learning, an embodiment of the present application proposes a network model fine-tuning method based on asynchronous federated learning. By splitting the network model into different sub-models, the fine-tuning collaboration set composed of distributed nodes is used for local training, and finally the global model is updated asynchronously at the first centralized node.
[0088] In an embodiment of the present application, the network model can be an AI model, an ML (Machine Learning) model, a neural network model, etc., which is not specifically limited here. In the following, a network model fine-tuning method provided by an embodiment of the present application will be described in detail with reference to the accompanying drawings.
[0089] In an embodiment of the present application, the term "centralized node" can also be described as a convergence node, and the term "collaboration node" can also be described as a distributed node, an asynchronous node, etc. For example, when the centralized node is a large base station, the collaboration node can be a small base station; when the centralized node is a large base station, the collaboration node can be a mobile terminal; which is not specifically limited in an embodiment of the present application.
[0090] Referring to Figure 1 , Figure 1 is a flowchart of a network model fine-tuning method provided by an embodiment of the present application. The network model fine-tuning method is applied to a first centralized node and includes:
[0091] S11: sending a collaboration request to a collaboration node in a fine-tuning collaboration set; wherein the collaboration request is used to indicate obtaining collaboration-related information of the collaboration node; wherein the collaboration-related information includes first information or second information; the first information includes first computing resource information of the collaboration node, and the second information includes the first computing resource information of the collaboration node and first connection information between the collaboration node and the first centralized node;
[0092] S12: receiving collaboration-related information sent by each collaboration node, and splitting a network model into multiple sub-models according to the collaboration-related information;
[0093] S13: distributing multiple sub-models to multiple collaboration nodes in the fine-tuning collaboration set where the first centralized node is located for training;
[0094] S14: performing asynchronous updating on the network model according to an update sub-model sent by each collaboration node; wherein the update sub-model is obtained after the collaboration node completes training of the corresponding sub-model.
[0095] In the embodiments of the present application, before the network model fine-tuning method is performed, the network nodes need to be divided into different fine-tuning cooperation sets; then the model of each network node is adjusted in an asynchronous manner within the fine-tuning cooperation set to strengthen the model generalization and ensure the AI service quality, and solve the challenges brought by strong user mobility and complex network environment. It should be understood that the network nodes include two types of nodes, namely, centralized nodes and cooperative nodes.
[0096] Considering that the network model has poor data specificity and weak generalization ability, the model parameters need to be fine-tuned according to specific network environment and service demand. Since the network environment and service demand are related to the geographical location, the embodiments of the present application use a low-complexity clustering method to form a fine-tuning cooperation set for network model federated fine-tuning based on the geographical location and service type of the network nodes. For example, according to the geographical location and service type of the network nodes, nodes with the same service type in the vicinity are divided into a fine-tuning cooperation set. A fine-tuning cooperation set is composed of a centralized node and cooperative nodes, as shown in Figure 2 .
[0097] For each fine-tuning cooperation set, the centralized node and the cooperative nodes can be determined according to the computing resource of the network nodes in the fine-tuning cooperation set and the connection condition (such as the number of forwarding times) between the network nodes. For example, the centralized node in the fine-tuning cooperation set is the network node with the strongest capability, and the capability of the network node needs to be considered comprehensively considering the computing resource of the network node and the connection condition between the network node and other network nodes in the set, which can be calculated by the following formula:
[0098] A i =λ1C i +λ2N i -λ3∑ j∈J P ij (1);
[0099] Wherein, A i represents the capability of the network node i, λ1, λ2, λ3 represent the preset weight respectively, C i represents the computing resource of the network node i, N i represents the number of nodes directly connected to the network node i in the fine-tuning cooperation set, P ij represents the number of forwarding times required for communication between the network node i and the network node j, and J represents the set after excluding the network node i in the fine-tuning cooperation set.
[0100] The network node with the strongest capability A i is selected from the fine-tuning cooperation set as the centralized node, and the remaining nodes are used as the cooperative nodes. The cooperative nodes cooperatively perform model training, and considering that the network belongs to a scenario with feature overlap and less user overlap, the embodiments of the present application use horizontal federated learning to perform model training.
[0101] The network model fine-tuning of the centralized node and the cooperative nodes mainly includes two cases: the first case is that the centralized node is a large base station and the cooperative nodes are small base stations; and the second case is that the centralized node is a large base station and the cooperative nodes are mobile terminals.
[0102] Specifically, the model parameter of each cooperative node is determined according to the initial model parameter of the corresponding cooperative node and the distance between the corresponding cooperative node and other cooperative nodes in the fine-tuning cooperation set.
[0103] Further, the method further includes the following model parameter determination step of the cooperative node:
[0104] For each cooperative node, a weight coefficient between the cooperative node and other cooperative nodes in the fine-tuning cooperation set is calculated according to the distance between the cooperative node and other cooperative nodes.
[0105] The product of each weight coefficient and the initial model parameter of the cooperative node is calculated to obtain a plurality of model parameter weighted values.
[0106] The plurality of model parameter weighted values are normalized, and the plurality of normalized model parameter weighted values are summed to obtain the model parameter of the cooperative node.
[0107] For example, in a fine-tuning cooperation set, considering that the data validity of the cooperative nodes far away from each other is lower, the fine-tuned model parameter is lower for the cooperative nodes far away, and thus w k represents the initial model parameter of the cooperative node v, represents the fine-tuned model parameter of the cooperative node v, and the fine-tuned model parameter of the cooperative node v is a function expressed as follows:
[0108]
[0109] wherein K represents the total number of cooperative nodes in the fine-tuning cooperation set, k represents the cooperative node number, a represents a normalization parameter, D kv represents the distance between the cooperative node v and other cooperative nodes k in the fine-tuning cooperation set. It should be understood that the distance between two cooperative nodes can be determined according to the geographical positions of the two cooperative nodes.
[0110] After the model parameter of each cooperative node is calculated, the corresponding model parameter is distributed to the corresponding cooperative node, so that the differential model fine-tuning can be realized.
[0111] In the embodiment of the present application, the model fine-tuning based on asynchronous federated learning can be regarded as an AI training task of the network itself. For the case that the centralized node is a large base station and the cooperative node is a small base station, the cooperative process mainly involves the interaction between the large base station and the small base station cluster and the interaction among the internal network elements of the large base station, such as the first network element, the second network element, the third network element, the fourth network element, and the like. Among them, the first network element can be a network AI management and orchestration (NAMO) network element, the second network element can be a task anchor (TA) network element, the third network element can be a task control (TC) network element, and the fourth network element can be a task executor (TE) network element, which are not limited in the embodiment of the present application. Similarly, for the case that the centralized node is a base station (which can be a large base station) and the cooperative node is a mobile terminal, the network model fine-tuning cooperative process mainly involves the air interface interaction process between the base station and the mobile terminal, and the interaction among the internal network elements of the base station, such as the first network element NAMO, the second network element TA, the third network element TC, the fourth network element TE, and the like.
[0112] Further, before sending the cooperation request to the cooperative nodes in the fine-tuning cooperation set, the method further comprises:
[0113] The first network element manages and orchestrates the federated learning task to form a task service quality; and sends the task service quality to the second network element;
[0114] The second network element splits the task service quality into at least one resource service quality; and sends the resource service quality to the third network element;
[0115] The third network element sends the cooperation request to the cooperative nodes in each of the clusters according to the resource service quality.
[0116] Specifically, the network model is split into a plurality of sub-models according to the cooperation-related information, comprising:
[0117] The plurality of cooperative nodes are divided into at least one cluster; wherein each of the clusters includes a set number of cooperative nodes;
[0118] The network model is divided into the set number of sub-models according to the cooperation-related information of the cooperative nodes in the cluster; wherein one of the sub-models corresponds to one of the cooperative nodes in each of the clusters.
[0119] Further, the first computing resource information includes available computing resources of the cooperative nodes;
[0120] The dividing the network model into the set number of sub-models according to the cooperation related information of the cooperation nodes in the cluster comprises:
[0121] Calculating the available computing resource ratio of each cooperation node in the cluster;
[0122] According to the available computing resource ratio of each cooperation node in the cluster, the average of the available computing resource ratio of all cooperation nodes in the cluster is calculated to obtain the division ratio of the network model;
[0123] The network model is divided into the set number of sub-models according to the division ratio.
[0124] In the embodiment of the application, considering the mobility of mobile network users, to ensure the normal progress of model parameter fine-tuning when the user is disconnected, each cooperation node is allowed to perform local training according to its own rules, and the centralized node can perform aggregated update of the network model by receiving the training updated sub-models sent by part of the cooperation nodes, so that the influence of unstable user connection on data processing can be weakened. The network model fine-tuning process will be described below Figure 3 The network model fine-tuning process mainly includes the following three steps:
[0125] (1) The centralized node splits the global network model M into S sub-models m s , M = m1, …, ms s , …, m S}, s∈S. In order to realize the training of the sub-models, the cooperation nodes in the fine-tuning cooperation set where the centralized node is located are divided into clusters of every S nodes, wherein the size ratio of the sub-models should be as close as possible to the average of the available computing resource ratio of different cooperation nodes in all clusters. Considering the difference in available computing resources and connection conditions of the cooperation nodes, the cooperation nodes with stronger computing power and more stable connection should be responsible for the training of larger sub-models to improve the overall training efficiency.
[0126] (2) The centralized node distributes the above sub-models to the cooperation nodes in the corresponding cluster; the cooperation nodes in the cluster perform local collaborative training on the sub-models, and upload the updated sub-models to the centralized node to form a local model m n after the training is completed.
[0127] (3) The centralized node updates asynchronously, and updates the network model as soon as the local model m n is formed, and the update formula is as follows:
[0128] M n+1 = (1-ρ)M n + ρm n (3).
[0129] wherein M n denotes the n-th iteration of the local model of the centralized node, p denotes the update weight, and n is the training round of the current network model. It should be noted that the communication between the centralized node and the collaboration node is non-blocking, and both can update the model at any time without synchronization. n denotes the n-th iteration of the local model of the centralized node, p denotes the update weight, and n is the training round of the current network model. It should be noted that the communication between the centralized node and the collaboration node is non-blocking, and both can update the model at any time without synchronization.
[0130] Specifically, when the collaboration-related information includes the first information, the distributing the plurality of sub-models to the plurality of collaboration nodes in the fine-tuning collaboration set in which the first centralized node is located for training comprises:
[0131] segmenting each of the sub-models into a lower-layer sub-model responsible for feature extraction and an upper-layer sub-model responsible for predicting output;
[0132] determining, according to first computing resource information in the first information of each of the collaboration nodes, a sub-model to be distributed to the corresponding collaboration node;
[0133] distributing the lower-layer sub-model and the upper-layer sub-model corresponding to each of the sub-models to the corresponding collaboration node for collaborative training.
[0134] For the case that the centralized node is a large base station and the collaboration node is a small base station, each sub-model is further segmented into a lower-layer sub-model responsible for extracting an abstract representation of input and an upper-layer sub-model responsible for predicting output; then the centralized node distributes the lower-layer sub-model and the upper-layer sub-model of the sub-model to the collaboration nodes in the corresponding cluster, and the collaboration nodes in the cluster realize local model collaborative training through transmission of network parameters between the lower-layer sub-model and the upper-layer sub-model. Among them, the centralized node sends larger sub-models to collaboration nodes with larger available computing resource in the cluster. On the one hand, the model performance can be improved through sub-model layering, and on the other hand, the overall training efficiency can be improved by sending larger sub-models to collaboration nodes with larger available computing resource in the cluster for training.
[0135] Specifically, when the collaboration-related information includes the second information, the distributing the plurality of sub-models to the plurality of collaboration nodes in the fine-tuning collaboration set in which the first centralized node is located for training comprises:
[0136] segmenting each of the sub-models into a lower-layer sub-model responsible for feature extraction and an upper-layer sub-model responsible for predicting output;
[0137] determining, according to first computing resource information and first connection information in the second information of each of the collaboration nodes, a sub-model to be distributed to the corresponding collaboration node;
[0138] The lower layer sub-model and the upper layer sub-model corresponding to each sub-model are distributed to corresponding cooperative nodes for cooperative training.
[0139] The first connection information includes the number of disconnections of the cooperative nodes. For the case that the centralized node is a large base station and the cooperative nodes are mobile terminals, each sub-model also needs to be segmented into a lower layer sub-model responsible for extracting the input abstract representation and an upper layer sub-model responsible for predicting the output.
[0140] However, unlike the case that the centralized node is a large base station and the cooperative nodes are small base stations, the centralized node needs to consider both the available computing resource and the number of disconnections of the cooperative nodes to determine the sub-models responsible for the cooperative nodes. For example, the sub-models responsible for the cooperative nodes with larger available computing resources and fewer disconnections are larger to improve the overall training efficiency.
[0141] Specifically, the asynchronous updating of the network model according to the update sub-models sent by each cooperative node includes:
[0142] generating a local model according to the currently received update sub-model;
[0143] adopting the local model to asynchronously update the network model;
[0144] determining whether the cooperative node corresponding to the currently received update sub-model is the last cooperative node;
[0145] if not, continuing to receive the update sub-model sent by the next cooperative node to asynchronously update the network model;
[0146] if yes, completing the asynchronous updating of the network model.
[0147] In the embodiments of the present application, the cooperative nodes send update sub-models to the centralized node after completing the model training. The centralized node can form a corresponding local model every time it receives an update sub-model and adopt the local model to asynchronously update the global network model until it receives all the update sub-models sent by the cooperative nodes and has adopted all the update models to asynchronously update the network model.
[0148] In other embodiments, the centralized node can also integrate the local model corresponding to the set number of updated sub-models after receiving the updated sub-models, and update the global network model asynchronously using the local model until all the updated sub-models sent by the collaboration nodes are received and all the updated models are used to update the network model asynchronously.
[0149] The following will be described in combination with Figure 4 The network model fine-tuning collaboration process between the large base station and the small base station will be described, and the specific collaboration process mainly includes the following steps:
[0150] 1. The first network element is responsible for the management and arrangement of the overall task (which can also be described as a federated learning task, a model fine-tuning task, a network model fine-tuning task, an AI task, a training task, etc.), and forms a task service quality (which can also be described as a task-level service quality, a task QoS, a task-level QoS, etc.);
[0151] 2. The first network element sends the task service quality (such as accuracy, latency, etc.) to the second network element;
[0152] 3. The second network element is responsible for the whole life cycle management of the task, and splits the task service quality into resource service quality (which can also be described as resource-level service quality, resource QoS, resource-level QoS, etc., such as communication latency, calculation latency, etc.);
[0153] 4. The second network element sends the resource service quality to the third network element, and realizes the establishment of the model fine-tuning task (which can also be described as a model training task, a training task, etc.);
[0154] 5. The third network element initiates a first collaboration request to the collaboration nodes in each cluster, and applies for obtaining the available computing resource information of each collaboration node;
[0155] 6. Each collaboration node responds to the first collaboration request and sends the available computing resource information to the third network element of the large base station; wherein the available computing resource includes (such as floating-point operations per second (FLOPS) of a central processing unit (CPU));
[0156] 7. The third network element is responsible for the control of the model fine-tuning task, and performs network model segmentation according to the ratio of the available computing resources of each collaboration node;
[0157] 8. The third network element distributes the segmented sub-models to the collaboration nodes of each cluster according to the computing resource information of each node;
[0158] 9. Each collaboration node locally trains the hierarchical sub-models;
[0159] 10. The node in the cluster that completes the sub-model training task uploads the updated sub-model to the fourth network element of the large base station;
[0160] 11. The fourth network element integrates the updated sub-model to form a local model, and updates the network model asynchronously, i.e., updates the network model immediately after forming the local model;
[0161] Step 11 will continue until all the cooperative nodes complete the sub-model training, i.e., step 12 is performed;
[0162] 12. All the clusters complete the training, and all the updated sub-models are uploaded to the fourth network element of the large base station;
[0163] 13. The fourth network element performs the final asynchronous update of the network model;
[0164] 14. The fourth network element monitors that the fine-tuning of the network model is completed, and ends the entire model fine-tuning task.
[0165] Specifically, before the network model is divided into the set number of sub-models according to the first computing resource information of the cooperative nodes in the cluster, the method further includes:
[0166] sending a second cooperation request to each of the cooperative nodes; wherein the second cooperation request is used to instruct to obtain the first computing resource information of the cooperative node and the first connection information between the cooperative node and the first centralized node;
[0167] receiving the first computing resource information and the first connection information sent by each of the cooperative nodes.
[0168] For the case that the centralized node is a base station (which can be a large base station) and the cooperative node is a mobile terminal, the specific network model fine-tuning cooperation process is as shown in Figure 5 Since the cooperative node has mobility in this case, the base station should consider the connection stability and available computing resource when selecting the cooperative node, and when distributing the sub-model, the larger sub-model should be sent to the cooperative node with stronger computing power and more stable connection for training to ensure the efficiency of the overall task. Therefore, the difference between the overall network model fine-tuning process of the case that the centralized node is a base station and the cooperative node is a mobile terminal and the overall network model fine-tuning process of the case that the centralized node is a base station and the cooperative node is a small base station mainly lies in steps 5 to 8, which are as follows:
[0169] 5. The third network element initiates a second collaboration request to the collaboration nodes in each cluster to apply for available computing resource of each collaboration node, information related to connection condition (such as recent Reference Signal Receiving Power / Reference Signal Received Power (RSRP), Reference Signal Received Quality (RSRQ), and disconnection times);
[0170] 6. Each collaboration node sends the available computing resource and information related to connection condition to the third network element in response to the second collaboration request;
[0171] 7. The third network element is responsible for control of the task, performs global model splitting according to the ratio of computing power of each node, and evaluates the connection stability of each collaboration node;
[0172] 8. The third network element distributes the split sub-model to each collaboration node in the cluster according to the computing power information and connection stability of each node.
[0173] In the embodiment of the application, for the case that the centralized node is a large base station and the collaboration node is a mobile terminal, some mobile terminals may lose connection with the base station. Although the asynchronous federated learning will not be blocked, it will still affect the effective update of the network model and the improvement of the generalization. Considering that the computing power resource of the mobile terminal will not be affected after the mobile terminal is disconnected from the base station, the training of the sub-model can continue, therefore, the embodiment of the application proposes a processing flow when the mobile terminal loses connection with the base station.
[0174] The disconnection of the mobile terminal includes but is not limited to temporary disconnection caused by environmental changes, disconnection caused by base station switching, and active disconnection of the mobile terminal.
[0175] For the first two cases, the mobile terminal may transfer the sub-model to the large base station after local training. For all the above cases, the fine-tuning collaboration set should be updated in time, such as selecting new mobile terminals with stable connection to join the set. In order to maximize the use of user-side computing resources and ensure the stability of the model fine-tuning collaboration process, the embodiment of the application designs a corresponding processing flow based on the above three mobile terminal disconnection conditions.
[0176] Specifically, the method further comprises:
[0177] When the disconnection with the collaboration node is monitored, reconnection is initiated to the collaboration node within a first time;
[0178] initiating a collaboration application to other collaboration nodes in the corresponding cluster when reconnection with the collaboration node fails within the first time;
[0179] receiving second computing resource information and second connection information sent by other collaboration nodes when accepting the collaboration application;
[0180] determining a first target collaboration node from other collaboration nodes according to the second computing resource information and the second connection information of other collaboration nodes, and sending the sub-model corresponding to the collaboration node to the first target collaboration node for training.
[0181] Exemplarily, for the case of temporary disconnection due to environmental changes, when the large base station monitors that the mobile terminal is disconnected due to deterioration of the communication environment, the following processing flow will be performed Figure 6 The specific processing flow is as follows:
[0182] 1. The large base station monitors that the mobile terminal 1 is disconnected, and the mobile terminal 1 will continue to perform the sub-model training task locally within the first time T;
[0183] 2. The large base station and the mobile terminal 1 attempt to reestablish the connection, and the time limit is the first time T;
[0184] 3. (a) If the reconnection is successful, the large base station and the mobile terminal 1 continue the previous network model fine-tuning process;
[0185] (b1) If the reconnection fails, the mobile terminal 1 terminates the training, and the large base station initiates a collaboration application to other mobile terminals in a certain number of clusters to inquire about computing resource and connection information, etc.
[0186] (b2) The mobile terminal receiving the collaboration application selects whether to accept, and if accepted, reports computing resource and connection information, etc.
[0187] (b3) The large base station evaluates the connection stability of each mobile terminal, and selects the most suitable mobile terminal as the first target collaboration node in combination with the computing resource information;
[0188] (b4) The large base station sends the sub-model responsible for training of the mobile terminal 1 to the first target collaboration node;
[0189] (b5) The first target collaboration node performs local training of the sub-model.
[0190] The above processing flow after the reconnection failure of the large base station and the mobile terminal can be understood as the flow of updating the fine-tuning collaboration set of the large base station, and the above processing flow can effectively guarantee the efficiency and stability of the network model fine-tuning task.
[0191] Specifically, the method further comprises:
[0192] receiving an updated sub-model of the cooperative node sent by the second centralized node, and performing asynchronous updating on the network model according to the updated sub-model when the cooperative node is switched from the first centralized node to the second centralized node;
[0193] The updated sub-model is obtained after the cooperative node reports training task state information to the second centralized node and completes the training task of the corresponding sub-model locally.
[0194] Further, the method further comprises:
[0195] receiving a task failure message sent by the second centralized node, and initiating a cooperation application to other cooperative nodes in the cluster where the cooperative node is located when the cooperative node is simultaneously disconnected with the first centralized node and the second centralized node within a second time and the training task of the corresponding sub-model is not completed.
[0196] Exemplarily, for the case of disconnection caused by station switching, the mobile terminal will perform the following Figure 7 process after switching between the source base station and the target base station. The specific process is as follows:
[0197] 1. The mobile terminal 1 is switched from the source base station to the target base station.
[0198] 2. The mobile terminal 1 reports its training task state information to the target base station, which includes the training task of the mobile terminal 1 and the home base station, etc.
[0199] 3. The mobile terminal 1 continues to perform the sub-model training task locally.
[0200] (a1) The mobile terminal 1 completes the sub-model training task and uploads the updated sub-model to the target base station.
[0201] (a2) The target base station forwards the updated sub-model to the source base station.
[0202] (b1) The mobile terminal 1 is simultaneously disconnected with the source base station and the target base station for a long time, and the training task is not completed.
[0203] (b2) The target base station sends a task failure message to the source base station, and the source base station responds after receiving the task failure message.
[0204] It should be noted that the response process of the source base station after receiving the task failure message sent by the target base station is the same as the above-mentioned process for short disconnection caused by environmental changes, and is not repeated here. Through the above-mentioned process, the efficiency and stability of the network model fine-tuning task can be effectively guaranteed.
[0205] Specifically, the method further comprises:
[0206] initiating a collaboration application to other collaboration nodes in the corresponding cluster when receiving third computing resource information and third connection information sent by the collaboration node before disconnection from the first set of nodes;
[0207] receiving second computing resource information and second connection information sent by other collaboration nodes when accepting the collaboration application;
[0208] determining whether there is another collaboration node in the corresponding cluster that meets the preset collaboration condition according to the second computing resource information and the second connection information of the other collaboration nodes, the third computing resource information and the third connection information of the collaboration node;
[0209] if yes, determining a second target collaboration node from the other collaboration nodes that meet the collaboration condition, and sending the sub-model corresponding to the collaboration node to the second target collaboration node for training;
[0210] if no, initiating a collaboration application to a collaboration node in another cluster.
[0211] Further, the collaboration condition includes that the difference between the available computing resource in the second computing resource information of the other collaboration node and the available computing resource in the third computing resource information of the collaboration node is less than a first threshold, and the difference between the disconnection times in the second connection information of the other collaboration node and the disconnection times in the third connection information of the collaboration node is less than a second threshold.
[0212] For example, for the case of mobile terminal active disconnection, the flow as shown in Figure 8 is executed, and the difference from the second case is that the mobile terminal needs to report its computing resource, connection status and other information before disconnection, so that the large base station can select similar mobile terminals from the set and quickly migrate tasks and models. The specific processing flow is as follows:
[0213] 1. The mobile terminal 1 reports its computing resource, connection status and other information to the large base station before disconnection;
[0214] 2. The mobile terminal 1 terminates the local training task;
[0215] 3. The large base station initiates a collaboration application to other mobile terminals in a certain number of clusters, and inquires about computing resource and connection status and other information;
[0216] 4. The mobile terminal receiving the collaboration application selects whether to accept, and if accepted, reports the computing resource and connection status and other information;
[0217] 5. The large base station attempts to screen other mobile terminals similar to mobile terminal 1 from the cluster; for example, the difference between the available computing resources of the two is less than a first threshold value, and the difference between the number of disconnections is less than a second threshold value; it should be noted that in the embodiments of the present application, the values of the first threshold value and the second threshold value are not specifically limited;
[0218] (a1) none of the other mobile terminals in the cluster meets the condition, and the large base station needs to initiate a cooperation application to the mobile terminals in other clusters;
[0219] (a2) the mobile terminals receiving the cooperation application select whether to accept, and if accepted, report computing resources and connection information;
[0220] (a3) the large base station attempts to screen the mobile terminal most similar to mobile terminal 1 from other clusters, and the difference between the available computing resources of the two is less than a first threshold value, and the difference between the number of disconnections is less than a second threshold value;
[0221] (a4) the large base station successfully screens the other mobile terminal most similar to mobile terminal 1 from other clusters as a second target cooperation node;
[0222] 7. The large base station sends the sub-model responsible for training of mobile terminal 1 to the second target cooperation node;
[0223] 8. The second target cooperation node locally trains the sub-model.
[0224] The above processing flow of the mobile terminal active disconnection can effectively guarantee the efficiency and stability of the network model fine-tuning task.
[0225] Compared with the prior art, the embodiments of the present application collect the computing resources, connection information and the like of the cooperation nodes by the centralized node, reasonably divide the network model, and distribute different sizes of sub-models to the most suitable cooperation nodes, effectively improving the overall efficiency and stability of the federated learning; at the same time, in view of the mobility of mobile network users, a processing flow is proposed for the disconnection between the mobile terminal and the base station, which guarantees the stability of the model fine-tuning flow based on federated learning, and maximizes the use of user-side computing resources.
[0226] Secondly, the data effectiveness of each cooperation node is measured according to the distance between the cooperation nodes, and then a differentiated weight model parameter fine-tuning is realized.
[0227] Referring to Figure 9 , Figure 9 is a structural block diagram of a network model fine-tuning device provided by the embodiments of the present application, which is applied to a first centralized node and includes:
[0228] The cooperation request sending module 11 is configured to send a cooperation request to a cooperation node in the fine-tuning cooperation set, wherein the cooperation request is used to instruct to obtain cooperation-related information of the cooperation node, wherein the cooperation-related information comprises first information or second information, the first information comprises first computing resource information of the cooperation node, and the second information comprises the first computing resource information of the cooperation node and first connection information between the cooperation node and the first centralized node.
[0229] The model splitting module 12 is configured to receive the cooperation-related information sent by each cooperation node, and split the network model into a plurality of sub-models according to the cooperation-related information.
[0230] The model distribution module 13 is configured to distribute the plurality of sub-models to a plurality of cooperation nodes in the fine-tuning cooperation set where the first centralized node is located for training.
[0231] The model asynchronous updating module 14 is configured to perform asynchronous updating on the network model according to an updating sub-model sent by each cooperation node, wherein the updating sub-model is obtained after the cooperation node completes training of the corresponding sub-model.
[0232] In an optional embodiment, the model splitting module 12 comprises:
[0233] The cluster dividing unit is configured to divide a plurality of cooperation nodes into at least one cluster, wherein each cluster comprises a set number of cooperation nodes.
[0234] The model dividing unit is configured to divide the network model into the set number of sub-models according to the cooperation-related information of the cooperation nodes in the cluster, wherein one sub-model corresponds to one cooperation node in each cluster.
[0235] In an optional embodiment, the first computing resource information comprises available computing resource of the cooperation node.
[0236] The model dividing unit comprises:
[0237] The computing resource calculating sub-unit is configured to calculate a ratio of available computing resources of cooperation nodes in each cluster.
[0238] The division ratio calculating sub-unit is configured to calculate a mean value of a ratio of available computing resources of cooperation nodes in all clusters according to the ratio of available computing resources of cooperation nodes in each cluster, to obtain a division ratio of the network model.
[0239] The dividing sub-unit is configured to divide the network model into the set number of sub-models according to the division ratio.
[0240] In an optional embodiment, the model distribution module 13 comprises:
[0241] The first sub-model partition unit is configured to partition each of the sub-models into a lower sub-model responsible for feature extraction and an upper sub-model responsible for prediction output when the cooperation-related information comprises the first information.
[0242] The first to-be-distributed model determination unit is configured to determine, according to the first computing resource information in the first information of each of the cooperation nodes, a sub-model to be distributed to a corresponding cooperation node.
[0243] The first sub-model sending unit is configured to distribute the lower sub-model and the upper sub-model corresponding to each of the sub-models to the corresponding cooperation nodes for collaborative training.
[0244] In an optional embodiment, the model distribution module 13 comprises:
[0245] The second sub-model partition unit is configured to partition each of the sub-models into a lower sub-model responsible for feature extraction and an upper sub-model responsible for prediction output when the cooperation-related information comprises the second information.
[0246] The second to-be-distributed model determination unit is configured to determine, according to the first computing resource information and the first connection information in the second information of each of the cooperation nodes, a sub-model to be distributed to a corresponding cooperation node.
[0247] The second sub-model sending unit is configured to distribute the lower sub-model and the upper sub-model corresponding to each of the sub-models to the corresponding cooperation nodes for collaborative training.
[0248] In an optional embodiment, the model asynchronous updating module 14 comprises:
[0249] The local model generation unit is configured to generate a local model according to the currently received update sub-model.
[0250] The asynchronous updating unit is configured to update the network model asynchronously using the local model.
[0251] The judgment unit is configured to judge whether the cooperation node corresponding to the currently received update sub-model is the last cooperation node; if not, continue to receive the update sub-model sent by the next cooperation node to update the network model asynchronously; if yes, complete the asynchronous updating of the network model.
[0252] In an optional embodiment, the cooperation request sending module 11 comprises:
[0253] The task management and arrangement unit is configured to manage and arrange a federated learning task to form a task service quality.
[0254] a task service quality splitting unit, configured to split the task service quality into at least one resource service quality;
[0255] a request sending unit, configured to send a cooperation request to a cooperative node in each of the clusters after the resource service quality.
[0256] In an optional embodiment, the apparatus further comprises:
[0257] a reconnection initiation module, configured to initiate reconnection to the cooperative node within a first time when disconnection with the cooperative node is monitored;
[0258] a cooperation application initiation module, configured to initiate a cooperation application to other cooperative nodes in the corresponding cluster when reconnection to the cooperative node fails within the first time;
[0259] a third information receiving module, configured to receive second computing resource information and second connection information sent by other cooperative nodes when the cooperation application is accepted;
[0260] a first target cooperative node determining module, configured to determine a first target cooperative node from other cooperative nodes according to the second computing resource information and the second connection information of other cooperative nodes, and send the sub-model corresponding to the cooperative node to the first target cooperative node for training.
[0261] In an optional embodiment, the apparatus further comprises:
[0262] a model receiving module, configured to receive an updated sub-model of the cooperative node sent by the second centralized node when the cooperative node is switched from the first centralized node to the second centralized node, and perform asynchronous update on the network model according to the updated sub-model;
[0263] wherein the updated sub-model is obtained after the cooperative node locally completes the training task of the corresponding sub-model after reporting the training task state information to the second centralized node;
[0264] In an optional embodiment, the apparatus further comprises:
[0265] a first cooperation application initiation module, configured to receive a task failure message sent by the second centralized node when the cooperative node is simultaneously disconnected with the first centralized node and the second centralized node within a second time and the training task of the corresponding sub-model by the cooperative node is not completed, and initiate a cooperation application to other cooperative nodes in the cluster where the cooperative node is located.
[0266] In an optional embodiment, the apparatus further comprises:
[0267] The second cooperation application initiation module is configured to initiate a cooperation application to other cooperation nodes in a corresponding cluster when the third computing resource information and the third connection information sent by the cooperation node before disconnection with the first centralized node are received.
[0268] The fourth information receiving module is configured to receive second computing resource information and second connection information sent by other cooperation nodes when the cooperation application is accepted.
[0269] The judging module is configured to judge whether there is another cooperation node satisfying a preset cooperation condition in the corresponding cluster according to the second computing resource information and the second connection information of the other cooperation nodes and the third computing resource information and the third connection information of the cooperation node.
[0270] The sub-model sending module is configured to determine a second target cooperation node from the other cooperation nodes satisfying the cooperation condition and send the sub-model corresponding to the cooperation node to the second target cooperation node for training if the answer is no.
[0271] The third cooperation application initiation module is configured to initiate a cooperation application to a cooperation node in another cluster if the answer is no.
[0272] In an optional embodiment, the cooperation condition includes that a difference between available computing resource information of the other cooperation nodes and available computing resource information of the cooperation node is less than a first threshold value, and a difference between disconnection times in the second connection information of the other cooperation nodes and disconnection times in the third connection information of the cooperation node is less than a second threshold value.
[0273] In an optional embodiment, the model parameter of each cooperation node is determined according to initial model parameters of the corresponding cooperation node and distances between the corresponding cooperation node and other cooperation nodes in the fine-tuning cooperation set.
[0274] In an optional embodiment, the device further includes:
[0275] The weight coefficient calculating module is configured to calculate a weight coefficient between each cooperation node and other cooperation nodes in the fine-tuning cooperation set according to distances between the cooperation node and the other cooperation nodes.
[0276] The model parameter weighting calculating module is configured to calculate products of each weight coefficient and initial model parameters of the cooperation node to obtain a plurality of model parameter weighting values.
[0277] The model parameter determining module is configured to perform normalization processing on the plurality of model parameter weighting values and sum the plurality of model parameter weighting values after the normalization processing to obtain the model parameter of the cooperation node.
[0278] It should be noted that the working processes of various modules in the network model fine-tuning apparatus described in the embodiments of the present application can refer to the working processes of the network model fine-tuning method described in the above embodiments, and the technical effects achieved are the same as those of the network model fine-tuning method described in the above embodiments, which will not be described here again.
[0279] Referring to Figure 10 , Figure 10 is a structural block diagram of the network model fine-tuning apparatus provided by the embodiments of the present application. The network model fine-tuning apparatus includes a processor 21, a memory 22, and a computer program stored in the memory 22 and executable on the processor 21. The processor 21 implements the steps in the above various network model fine-tuning method embodiments when executing the computer program, such as steps S11-S14.
[0280] For example, the computer program can be divided into one or more modules / units, which are stored in the memory 22 and executed by the processor 21 to complete the present application. The one or more modules / units can be a series of computer program instruction segments capable of completing a specific function, which are used to describe the execution process of the computer program in the network model fine-tuning apparatus.
[0281] The network model fine-tuning apparatus can include, but is not limited to, the processor 21 and the memory 22. Those skilled in the art can understand that the schematic diagram is only an example of the network model fine-tuning apparatus and does not constitute a limitation on the network model fine-tuning apparatus, which can include more or fewer components than the diagram, or combine certain components, or different components, for example, the network model fine-tuning apparatus can also include an input / output device, a network access device, a bus, etc.
[0282] The processor 21 can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor or the like, and the processor 21 is the control center of the network model fine-tuning apparatus, which connects various parts of the network model fine-tuning apparatus through various interfaces and lines.
[0283] The memory 22 can be used to store the computer programs and / or modules, and the processor 21 realizes various functions of the network model fine-tuning device by running or executing the computer programs and / or modules stored in the memory 22, and calling the data stored in the memory 22. The memory 22 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required for a function (such as a sound playing function, an image playing function, etc.), and the like; and the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), and the like. In addition, the memory 22 can include a high-speed random access memory, and can also include a non-volatile memory, for example, a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one disk storage device, a flash memory device, or other volatile solid-state memory devices.
[0284] The modules / units integrated in the network model fine-tuning device can be stored in a computer readable storage medium if they are realized in the form of software function units and sold or used as independent products. Based on this understanding, all or part of the processes in the above-mentioned embodiment methods can also be completed by a computer program instructing related hardware, and the computer program can be stored in a computer readable storage medium. When the processor 21 executes the computer program, the steps of the above-mentioned various method embodiments can be realized. The computer program includes computer program code, which can be in the form of source code, object code, an executable file, or some intermediate form, etc. The computer readable medium can include any entity or device capable of carrying the computer program code, a recording medium, a U disk, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.
[0285] It should be noted that the apparatus embodiments described above are merely illustrative, and the units described as separate units can or can not be physically separate, and the units shown as units can or can not be physical units, i.e., can be located in one place, or can be distributed to multiple network units. Part or all of the modules can be selected to achieve the purpose of the embodiment according to actual needs. In addition, the connection relationship between the modules in the apparatus embodiment provided by the present application indicates that there is a communication connection between them, which can be implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement it without creative labor.
[0286] The above is the preferred embodiment of the present application. It should be noted that those skilled in the art can make many improvements and refinements without departing from the principles of the present application, and these improvements and refinements are also considered within the scope of protection of the present application.
Claims
1. A network model fine-tuning method, characterized in that, The application is applied to a first centralized node, and comprises: sending a cooperation request to a cooperation node in a fine-tuning cooperation set; wherein the cooperation request is used to indicate cooperation-related information of the cooperation node; wherein the cooperation-related information comprises first information or second information; the first information comprises first computing resource information of the cooperation node, and the second information comprises the first computing resource information of the cooperation node and first connection information between the cooperation node and the first centralized node; receiving cooperation-related information sent by each cooperation node, and splitting a network model into multiple sub-models according to the cooperation-related information; distributing the multiple sub-models to multiple cooperation nodes in a fine-tuning cooperation set where the first centralized node is located for training; performing asynchronous updating on the network model according to an updated sub-model sent by each cooperation node; wherein the updated sub-model is obtained after the cooperation node completes training of the corresponding sub-model.
2. The network model fine-tuning method of claim 1, wherein, The splitting of the network model into multiple sub-models according to the cooperation-related information comprises: dividing the multiple cooperation nodes into at least one cluster; wherein each cluster comprises a set number of cooperation nodes; dividing the network model into the set number of sub-models according to the cooperation-related information of the cooperation nodes in the cluster; wherein one sub-model corresponds to one cooperation node in each cluster.
3. The network model fine-tuning method of claim 2, wherein, The first computing resource information comprises available computing resource of the cooperation node. The dividing of the network model into the set number of sub-models according to the cooperation-related information of the cooperation nodes in the cluster comprises: calculating a ratio of available computing resources of the cooperation nodes in each cluster; calculating a mean value of the ratio of available computing resources of the cooperation nodes in all clusters to obtain a division ratio of the network model; dividing the network model into the set number of sub-models according to the division ratio.
4. The network model fine-tuning method of claim 1, wherein, When the cooperation-related information comprises the first information, the distributing of the multiple sub-models to the multiple cooperation nodes in the fine-tuning cooperation set where the first centralized node is located for training comprises: dividing each sub-model into a lower sub-model responsible for feature extraction and an upper sub-model responsible for prediction output; determining a sub-model to be distributed to a corresponding cooperation node according to the first computing resource information in the first information of each cooperation node; distributing the corresponding lower sub-model and upper sub-model of each sub-model to the corresponding cooperation node for cooperative training.
5. The network model fine-tuning method of claim 1, wherein, When the cooperation-related information comprises the second information, the distributing of the multiple sub-models to the multiple cooperation nodes in the fine-tuning cooperation set where the first centralized node is located for training comprises: dividing each sub-model into a lower sub-model responsible for feature extraction and an upper sub-model responsible for prediction output; determining a sub-model to be distributed to a corresponding cooperation node according to the first computing resource information and the first connection information in the second information of each cooperation node; The lower layer sub-model and the upper layer sub-model corresponding to each sub-model are distributed to corresponding cooperative nodes for cooperative training.
6. The network model fine-tuning method of claim 1, wherein, The network model is asynchronously updated according to the update sub-models sent by each cooperative node, and the method comprises the following steps of: generating a local model according to the currently received update sub-model; asynchronously updating the network model by using the local model; judging whether the cooperative node corresponding to the currently received update sub-model is the last cooperative node; if not, continuing to receive the update sub-model sent by the next cooperative node to asynchronously update the network model; if yes, completing the asynchronous update of the network model.
7. The network model fine-tuning method of claim 1, wherein, The cooperative request is sent to the cooperative nodes in the fine-tuning cooperative set, and the method comprises the following steps of: managing and arranging the federated learning task to form a task service quality; splitting the task service quality into at least one resource service quality; sending the cooperative request to the cooperative nodes in each cluster according to the resource service quality.
8. The network model fine-tuning method of claim 2, wherein, The method further comprises the following steps: when it is monitored that the cooperative node is disconnected, initiating reconnection to the cooperative node within a first time; when the reconnection to the cooperative node fails within the first time, initiating a cooperation application to other cooperative nodes in the corresponding cluster; receiving second computing resource information and second connection information sent by other cooperative nodes when the cooperation application is accepted; determining a first target cooperative node from other cooperative nodes according to the second computing resource information and the second connection information of other cooperative nodes, and sending the sub-model corresponding to the cooperative node to the first target cooperative node for training.
9. The network model fine-tuning method of claim 2, wherein, The method further comprises the following steps: when the cooperative node is switched from the first centralized node to the second centralized node, receiving an update sub-model of the cooperative node sent by the second centralized node, and asynchronously updating the network model according to the update sub-model; wherein the update sub-model is obtained after the cooperative node locally completes the training task of the corresponding sub-model after reporting the training task state information to the second centralized node.
10. The network model fine-tuning method of claim 9, wherein, The method further comprises the following steps: when the cooperative node is disconnected from the first centralized node and the second centralized node within a second time and the training task of the corresponding sub-model of the cooperative node is not completed, receiving a task failure message sent by the second centralized node, and initiating a cooperation application to other cooperative nodes in the cluster where the cooperative node is located.
11. The network model fine-tuning method of claim 2, wherein, The method further comprises the following steps: when receiving third computing resource information and third connection information sent by the cooperative node before being disconnected from the first centralized node, initiating a cooperation application to other cooperative nodes in the corresponding cluster; receiving second computing resource information and second connection information sent by other cooperative nodes when the cooperation application is accepted; judging whether there is another cooperative node in the corresponding cluster that meets the preset cooperation condition according to the second computing resource information and the second connection information of other cooperative nodes, the third computing resource information and the third connection information of the cooperative node; If yes, a second target cooperative node is determined from other cooperative nodes satisfying the cooperation condition, and a sub-model corresponding to the cooperative node is sent to the second target cooperative node for training. If no, a cooperation application is initiated to a cooperative node in another cluster.
12. The network model fine-tuning method of claim 11, wherein, The cooperation condition includes that a difference between available computing resource in second computing resource information of other cooperative nodes and available computing resource in third computing resource information of the cooperative node is less than a first threshold value, and a difference between disconnection times in second connection information of other cooperative nodes and disconnection times in third connection information of the cooperative node is less than a second threshold value.
13. The network model fine-tuning method of claim 1, wherein, The model parameters of each cooperative node are determined according to initial model parameters of the corresponding cooperative node and distances between the corresponding cooperative node and other cooperative nodes in the fine-tuning cooperation set.
14. The network model fine-tuning method of claim 13, wherein, The method further includes the following model parameter determination steps of the cooperative nodes: For each cooperative node, a weight coefficient between the cooperative node and other cooperative nodes is calculated according to distances between the cooperative node and other cooperative nodes in the fine-tuning cooperation set. A product of each weight coefficient and initial model parameters of the cooperative node is calculated to obtain a plurality of model parameter weighted values. The plurality of model parameter weighted values are normalized, and the plurality of normalized model parameter weighted values are summed to obtain the model parameters of the cooperative node.
15. A network model fine-tuning apparatus, comprising: Applied to a first centralized node, comprising: A cooperation request sending module configured to send a cooperation request to cooperative nodes in a fine-tuning cooperation set, wherein the cooperation request is configured to instruct to obtain cooperation-related information of the cooperative nodes, wherein the cooperation-related information includes first information or second information, wherein the first information includes first computing resource information of the cooperative nodes, and the second information includes the first computing resource information of the cooperative nodes and first connection information between the cooperative nodes and the first centralized node; A model splitting module configured to receive cooperation-related information sent by each cooperative node, and split a network model into a plurality of sub-models according to the cooperation-related information; A model distribution module configured to distribute the plurality of sub-models to a plurality of cooperative nodes in a fine-tuning cooperation set where the first centralized node is located for training; A model asynchronous updating module configured to update the network model asynchronously according to update sub-models sent by each cooperative node, wherein the update sub-models are obtained after the cooperative nodes complete training of the corresponding sub-models.
16. A network model fine-tuning device, comprising: Comprising: A processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the network model fine-tuning method according to any one of claims 1 to 14 when executing the computer program.
17. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, wherein the computer program controls a device where the computer readable storage medium is located to execute the network model fine-tuning method according to any one of claims 1 to 14 when the computer program runs.
18. A computer program product comprising computer programs / instructions, characterized in that, The computer program / instructions implement the network model fine-tuning method according to any one of claims 1 to 14 when executed by the processor.