A Federated Incremental Modeling Method Based on Dynamic Probabilistic Optimization in Heterogeneous Edge Environments
By dynamically selecting equipment to participate in training during industrial processes and utilizing differential privacy and randomized network configuration, the model training problem caused by data heterogeneity and differences in equipment computing power in industrial processes is solved, achieving more efficient model training and better generalization performance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA UNIV OF MINING & TECH
- Filing Date
- 2025-07-23
- Publication Date
- 2026-05-26
AI Technical Summary
In industrial processes, due to severe data silos between enterprise equipment, strong data heterogeneity, and significant differences in computing power and network conditions, existing federated learning methods are unable to effectively utilize equipment with limited resources but representative data distribution. This leads to biased training data and decreased model generalization performance. Furthermore, deep neural network training processes are prone to problems such as gradient vanishing and slow convergence.
We propose a federated incremental modeling method based on dynamic probability optimization in heterogeneous edge environments. By dynamically selecting devices to participate in training, using differential privacy to protect data, and combining a randomly configured network, we optimize the probability distribution of device selection, ensuring data diversity and model generalization ability, and avoiding the slow training speed and gradient explosion problems of deep learning.
It enables more efficient model training in industrial processes, improves the generalization and accuracy of the model, ensures fair participation of equipment and data diversity, and avoids problems such as gradient vanishing and slow training speed.
Smart Images

Figure CN120911636B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of soft measurement technology for product quality indicators in industrial processes, and specifically relates to a federated incremental modeling method based on dynamic probability optimization in heterogeneous edge environments. Background Technology
[0002] Federated learning is a privacy-preserving distributed machine learning framework that enables collaborative modeling among multiple parties without transmitting raw data. This technology has been widely adopted in data-sensitive scenarios such as healthcare, finance, and industry in recent years, and is particularly suitable for joint training tasks involving enterprise devices that cannot directly share data.
[0003] In complex industrial process control, accurately predicting product quality indicators is crucial for improving production efficiency and stability. However, due to severe data silos between enterprise equipment and significant differences in computing power, storage capacity, and network conditions among industrial devices, data from a single source is often insufficient to support high-quality model training. Federated learning provides an effective way for industrial equipment to share models while protecting privacy.
[0004] Due to the large number of terminal devices, strong data heterogeneity, and limited communication resources, federated learning typically employs a client selection mechanism. Existing methods often prioritize clients with high computing power, neglecting devices with limited resources but representative data distribution, leading to biased training data and decreased model generalization performance. Furthermore, existing client selection strategies rely heavily on static information, making it difficult to adapt to dynamic changes in industrial IoT environments, such as frequent client online / offline cycles, significant performance differences, and training interruptions. Currently, federated learning is often combined with deep neural networks, but its training process is prone to problems such as vanishing gradients, slow convergence, and uneven resource consumption, limiting its application effectiveness in industrial scenarios. In recent years, stochastically configured networks, with their simpler structure, more efficient training, and greater adaptability to industrial equipment, have gradually become an alternative, demonstrating strong generalization capabilities and practical value. Summary of the Invention
[0005] The purpose of this invention is to address the problems of limited sample size, strong heterogeneity in the distribution of existing industrial process data, and unstable fluctuations in the online status of equipment. This invention proposes a federated incremental modeling method based on dynamic probability optimization in heterogeneous edge environments.
[0006] Technical Solution: To address the aforementioned technical problems, this invention proposes a federated incremental modeling method based on dynamic probability optimization in heterogeneous edge environments. This method includes the following steps:
[0007] S1, the equipment in each factory matches its industrial process sample data with the corresponding sample quality category label, obtains a category vector based on the category count, adds noise to this vector, and uploads the noisy category density vector to the server. The server determines the number of equipment required to participate and initializes the exponential weight and selection probability distribution of each equipment.
[0008] S2, the server selects multiple candidate device sets based on the selection probability, predicts the subset of devices that can successfully upload by combining the disconnection rate of each device, calculates the category density distribution of each subset, and quantifies its imbalance by the distribution offset coefficient, and selects the device set with the smallest distribution offset coefficient for federated training.
[0009] S3, select the device to train the hidden layer nodes, and put the hidden layer nodes that meet the local data constraints into the candidate pool. Evaluate the data quality of the device, and upload the best candidate nodes and data quality indicators to the server.
[0010] S4, the server performs weighted aggregation of the uploaded hidden layer nodes to obtain global parameters and obtains the fluctuation status of the devices. The global parameters are then distributed to all devices as hidden layer parameters of the local incremental network.
[0011] S5. After receiving the global parameters, each device calculates the newly added hidden layer output and uses the global parameters to calculate the device's loss in this round. The output weights and loss values are then uploaded to the server. The server performs weighted aggregation of the output weights of the selected devices and evaluates the device's local model.
[0012] S6, the multiple score indicators of the equipment are weighted to obtain the equipment contribution. Based on the contribution, the selection probability distribution of each equipment is optimized according to the Exp3 algorithm based on multi-indicator evaluation and fairness constraints to ensure that the probability meets the requirements.
[0013] S7. Repeat steps S2-S6 until the current number of nodes exceeds the limit or the residual in the current iteration meets the expected tolerance. Then, no new nodes are added, and the trained global model is distributed to each device as a soft measurement model.
[0014] Furthermore, in step S1, the equipment in each factory maps its industrial process sample data to the corresponding sample quality category labels, obtains a category vector based on the category count, adds noise to this vector, and uploads the noisy category density vector to the server. The specific method is as follows:
[0015] S11, in a heterogeneous edge environment with data heterogeneity and fluctuating state disconnections, where each device has a different amount of data and a different number of items in each category, K devices participate in federated training. Device i collects its historical industrial process sample data X. i and the corresponding product quality category label Ti , denoted as {X i ,T i},in, The feature matrix represents the v-th industrial process sample data of device i;
[0016] S12, the number of type j data owned by device i is used This means that for data of type J, vectors are used. This represents the local data distribution of device i;
[0017] S13, each device follows the principle of differential privacy regarding the data distribution vector h. i Add noise n i , Each noise component It follows a Laplace distribution, i.e. Let h′ be a privacy operator. i =[h′ i,1 ,h′ i,2 ,…,h′ i,J ], h′ i,j For device i, the number of data of class j after adding noise is given by vector h. i The formula for adding noise is as follows:
[0018] h′ i =h i +n i (1)
[0019] Where, h′ i This is the class vector after adding noise;
[0020] S14, according to h′ i Calculate the category density vector ρ for each device. i , will vector ρ i Uploaded to the server, ρ i The calculation formula is as follows:
[0021]
[0022] Where the superscript T is the transpose of the matrix, 1 T It is a column vector consisting entirely of 1s.
[0023] Furthermore, in step S1, the server determines the required number of participating devices, and initializes the exponential weight and selection probability distribution of each device using the following specific method:
[0024] S15, if the equipment selection ratio is d, then the number of selected equipment k = K * d;
[0025] S16, ws L,i This represents the exponential weight of device i during the training of the Lth node. The initial exponential weight ws is... 1,i =1, initially each device has the same probability of being selected.
[0026] Furthermore, in step S2, the server selects multiple candidate device sets based on the selection probability, predicts a subset of devices that can successfully upload based on the disconnection rate of each device, calculates the category density distribution of each subset and quantifies its imbalance using a distribution offset coefficient, and selects the device set with the smallest distribution offset coefficient. The specific method for federated training is as follows:
[0027] S21, the server selects n sets of clients with k devices as a candidate set based on the selection probability. This represents the set of devices selected when training the Lth node in the u-th set of the candidate set. For these candidate sets, based on the disconnection rate of each device, the set of devices that successfully uploaded data is predicted for each set. express The predicted set of devices that will successfully upload is based on the device category density vector ρ. i Get the set Category vectors in,
[0028] S22, applying the coefficient of variation from statistics to federated learning, is called the distribution shift coefficient, denoted by DSC, and the formula is as follows:
[0029]
[0030] in, It is the average value of the total category distribution vector, u = 1, 2, ..., n;
[0031] S23, calculate the distribution offset coefficient of the total category distribution vector of all prediction sets, and select the set that minimizes the distribution offset coefficient as the set of devices for training the Lth node. Participate in federal training:
[0032]
[0033] Furthermore, in step S3, the selected device trains hidden layer nodes, and the hidden layer nodes that meet the local data constraints are placed into the candidate pool. The data quality of the device is evaluated, and the best candidate node and data quality indicators are uploaded to the server. The specific method is as follows:
[0034] S31, the selected device i obtains a data quality score D_s based on the data it possesses. iThe formula is as follows:
[0035]
[0036] Where, N i The number of data categories owned by device i. The maximum (h) represents the total number of data types J for device i. i ) and min(h i ) indicates taking vector h i The maximum and minimum values in H HEL (Q i Q u The distance is the Hellinger distance, which measures the difference between two probability distributions Q. i and Q u The formula for the distance metric of similarity is as follows:
[0037]
[0038] in, Q represents the category probability distribution of data for device i. u It is the probability distribution when the data is uniformly distributed;
[0039] S32, Selected device i initializes the parameters required for local incremental random configuration of network learning: maximum number of hidden layer nodes L. max Maximum number of random configurations γ max Expected tolerance ε, range of random configuration of hidden layer parameters θ min It is the minimum value of the configuration range, θ max It is the maximum value of the configuration range, Δθ is the step size, and the learning parameter is r;
[0040] During the local incremental network construction process for each device, within the adjustable symmetrical range The hidden layer parameters w of the device are randomly generated inside. L,i and b L,i Calculate the hidden layer output H of the node L,i :
[0041]
[0042] Where g(·) is the activation function, and 1 represents the sum of X and X. i A vector of all ones of the same dimension, defined as a sequence of non-negative real numbers. Hidden nodes that satisfy the following inequality constraints are candidate nodes:
[0043]
[0044]
[0045] Where <·,·> denote the vector dot product. This represents the supervision value corresponding to the label in the q-th column of the dataset when training the L-th hidden layer node in device i. The qth column of the residual error matrix is used when training the L-1th node of the network model for device i, with the initial residual being the sample class label;
[0046] S33, Device i performs γ during network training. max Sub-random configuration, find out The largest pair of hidden parameters is the optimal hidden parameter for device i to satisfy the supervision mechanism. and Upload the optimal hidden layer parameters and data quality score to the server.
[0047] Furthermore, in step S4, the server weights and aggregates the uploaded hidden layer nodes to obtain global parameters and obtains the device fluctuation status. The specific method for distributing the global parameters to all devices as hidden layer parameters of the local incremental network is as follows:
[0048] S41, the server regroups the devices that successfully uploaded data into... The server uses a weighted average aggregation of the best hidden parameters uploaded by the device to obtain the global parameters of the Lth node. and
[0049]
[0050] S42, Update the device disconnection rate P based on the device's disconnection status. L,i The volatility fraction V_s is thus obtained. i P L,i and V_s i The calculation formula is as follows:
[0051]
[0052] Among them, F L,i This indicates the number of times device i is selected among the L nodes used in training the global model. To count the number of successful uploads by device i across L nodes in the federated training, when training the j-th node, the index of device i in the set is... The value is 1 if the condition is met, and 0 otherwise. To count the number of times device i is selected in the L nodes of the federated training, when training the j-th node, the index of device i in the set is... The value is 1 if the condition is met, and 0 otherwise.
[0053] S43, the server will add global parameters to the Lth node. and The global parameters are obtained by concatenating them with the global parameters of the previous L-1 node. and This parameter is distributed to all devices as a parameter for the local incremental network.
[0054] Furthermore, in step S5, after each device receives the global parameters, it calculates the newly added hidden layer output and uses the global parameters to determine the device's loss in this round. The specific method for uploading the output weights and loss values to the server is as follows:
[0055] S51, after receiving the global parameters, the device calculates the local hidden layer output based on the current parameters.
[0056]
[0057] Computing device local hidden layer output matrix Where + indicates taking the pseudo-inverse of the matrix;
[0058] S52, Calculate the cross-entropy loss value of device i based on the current network. Where L(·) is the cross-entropy loss function, The formula for calculating the sample quality category label predicted by the model is as follows:
[0059]
[0060] S53, each device will output weight β L,i And the loss value in this round. L,i Upload to the server.
[0061] Furthermore, in step S5, the specific method for the server to weight and aggregate the output weights of the selected devices and evaluate the local model of the devices is as follows:
[0062] S54, The server updates the global β by weighted average aggregation of the uploaded output values. L :
[0063]
[0064] S55, evaluate the local model of device i using the loss value of device i to obtain the model score M_s. i :
[0065]
[0066] Among them, the global loss value
[0067] Furthermore, in step S6, the weighted average of multiple score indicators of the equipment to obtain the equipment contribution, and based on this contribution, the specific method for optimizing the selection probability distribution of each equipment according to the Exp3 algorithm based on multi-indicator evaluation and fairness constraints is as follows:
[0068] S61, the server will assign D_s to each device i V_s i and M_s i Normalize and weight them respectively to obtain their contribution C to the current node. L,i :
[0069] C L,i =a·D_s i +b·V_s i +c·M_s i (17)
[0070] Where a, b, and c are the weights of each score, and their values can be set according to the task requirements, and a + b + c = 1;
[0071] S62, based on the Exp3 algorithm which is based on multi-index evaluation and fairness constraints, and based on the true contribution C of device i. L,i The unbiased contribution estimate is obtained from the following formula.
[0072]
[0073] in, p′ L,i This represents the probability of device i being selected during the training of the Lth node. When L = 1,
[0074] S63, for cases where the device probability exceeds 1, the weights are not updated, and the update formula is as follows:
[0075]
[0076] Where η is the learning rate. It is the set of devices whose probability of occurrence exceeds 1 when training the Lth node;
[0077] S64, based on weight ws L,i The initial selection probability distribution is obtained. Wherein, the initial probability of device i being selected. The calculation formula is as follows:
[0078]
[0079] Furthermore, the specific method for ensuring that the probability meets the requirements in step S6 is as follows:
[0080] S65, for make sure Furthermore, to ensure fair participation of each device in training, a lower bound σ for the probability of being selected is set, which requires the following constraints: Where i = 1, 2, ..., K;
[0081] S66, if If the constraints are satisfied, then the final probability of being selected is... Where, p ′ L =[p ′ L,1 ,p ′ L,2 ,…,p ′ L,K If this condition is not met, assume there exists a proportionality coefficient. Right now To obtain p that is closest to the weight ratio ′ L The objective function is obtained as follows:
[0082]
[0083] S67, the objective function above is a quadratic programming problem, which can be solved using the Lagrange multiplier method:
[0084]
[0085] Where, λ L ,μ L,i ,v L,i Assuming the Lagrange multipliers, construct the Lagrange function and solve for p′ using the KKT optimality conditions. L .
[0086] Beneficial effects: Compared with the prior art, the technical solution of the present invention has the following beneficial technical effects:
[0087] The technical solution of this invention is to dynamically optimize the selection probability based on the Exp3 algorithm with multi-index evaluation and fairness constraints, so that each device can participate in training reasonably, and the diversity of the total data is ensured by the entropy of the selected device set. At the same time, a randomly configured network is used as a soft measurement model for industrial process product quality, avoiding the problems of slow training speed, getting stuck in local minima, and gradient explosion of deep learning networks, and has good generalization and high accuracy. Attached Figure Description
[0088] Figure 1 This is a flowchart of a federated incremental modeling method based on dynamic probability optimization in heterogeneous edge environments. Detailed Implementation
[0089] This invention provides a federated incremental modeling method based on dynamic probability optimization in heterogeneous edge environments, the specific process of which is as follows: Figure 1 As shown, the specific steps are as follows:
[0090] In step S1, a soft measurement model needs to be trained for 50 devices from different factories, meaning that 50 devices participate in federated training, and device i acquires its historical industrial process auxiliary data X. i and the corresponding product quality category data T i , denoted as {X i ,T i The 50 devices collected varying amounts of data, and each device collected different categories of data. in, The feature matrix represents the v-th industrial process sample data of device i; the number of j-th type data that device i possesses is represented by... This means that for 10 types of data, vectors are used. This represents the local data distribution of device i;
[0091] Each device follows the principle of differential privacy regarding the data distribution vector h. i Add noise n i , Each noise component It follows a Laplace distribution, i.e. Let h′ be a privacy operator. i =[h′ i,1 ,h′ i,2 ,…,h′ i,10 ], h′ i,j For device i, the number of data of class j after adding noise is given by vector h. i The formula for adding noise is as follows:
[0092] h′ i =h i +n i (1)
[0093] Where, h′ i This is the class vector after adding noise;
[0094] According to h′ i Calculate the category density vector ρ for each device. i , will vector ρ i Uploaded to the server, ρ i The calculation formula is as follows:
[0095]
[0096] Where the superscript T is the transpose of the matrix, 1T It is a column vector consisting entirely of 1s;
[0097] If the equipment selection ratio is 0.4, then the number of selected devices is 20; ws L,i This represents the exponential weight of device i during the training of the Lth node. The initial exponential weight ws is... 1,i =1, and initially each device has the same probability of being selected, which is 0.4.
[0098] In step S2, the server selects a candidate set of 10 client groups with 20 devices based on the selection probability. This represents the set of devices selected when training the Lth node in the u-th set of the candidate set. For these candidate sets, based on the disconnection rate of each device, the set of devices that successfully uploaded data is predicted for each set. express The predicted set of devices that will successfully upload is based on the device category density vector ρ. i Get the set Category vectors in,
[0099] When the coefficient of variation in statistics is applied to federated learning, it is called the distribution shift coefficient, denoted by DSC, and the formula is as follows:
[0100]
[0101] in, It is the average value of the total category distribution vector, u = 1, 2, ..., 10;
[0102] Calculate the distribution offset coefficient of the total category distribution vector of all prediction sets, and select the set that minimizes the distribution offset coefficient as the set of devices for training the Lth node. Participate in federal training:
[0103]
[0104] In step S3, the selected device i obtains a data quality score D_s based on the data it possesses. i The formula is as follows:
[0105]
[0106] Where, N i The number of data categories owned by device i. This represents the total number of data items across all 10 categories for device i, max(h) i ) and min(h i ) indicates taking vector h i The maximum and minimum values in H HEL(Q i Q u The distance is the Hellinger distance, which measures the difference between two probability distributions Q. i and Q u The distance metric for similarity is calculated using the following formula:
[0107]
[0108] in, Q represents the category probability distribution of data for device i. u It is the probability distribution when the data is uniformly distributed;
[0109] The selected device i initializes the parameters required for local incremental random configuration network learning: maximum number of hidden layer nodes L. max =400, Maximum number of random configurations Υ max =15, Expected tolerance ε=0.06, Hidden layer parameter random configuration range The learning parameter r = 0.97;
[0110] During the local incremental network construction process for each device, within the adjustable symmetrical range The hidden layer parameters w of the device are randomly generated inside. L,i and b L,i Calculate the hidden layer output H of the node L,i :
[0111]
[0112] Where g(·) is the activation function, and 1 represents the sum of X and X. i A vector of all ones of the same dimension, defined as a sequence of non-negative real numbers. Hidden nodes that satisfy the following inequality constraints are candidate nodes:
[0113]
[0114] Where <·,·> denote the vector dot product. This represents the supervision value corresponding to the label in the q-th column of the dataset when training the L-th hidden layer node in device i. The qth column of the residual error matrix is used when training the L-1th node of the network model for device i, with the initial residual being the sample class label;
[0115] Device i performs 15 random configurations during network training to find the optimal configuration. The largest pair of hidden parameters is the optimal hidden parameter for device i to satisfy the supervision mechanism. and Upload the optimal hidden layer parameters and data quality score to the server.
[0116] In step S4, the server reassembles the devices that successfully uploaded the data into... The server uses a weighted average aggregation of the best hidden parameters uploaded by the device to obtain the global parameters of the Lth node. and
[0117]
[0118] Update the device disconnection rate P based on the device's disconnection status. L,i The volatility fraction V_s is thus obtained. i P L,i and V_s i The calculation formula is as follows:
[0119]
[0120] Among them, F L,i This indicates the number of times device i is selected among the L nodes used in training the global model. To count the number of times device i successfully uploads data across L nodes in the federated training, specifically, when training the j-th node, the index of device i in the set... The value is 1 if the condition is met, and 0 otherwise. To count the number of times device i is selected in the set during federated training of L nodes, i.e., when training the j-th node, the index of device i in the set is... The value is 1 if the condition is met, and 0 otherwise.
[0121] The server will add global parameters to the Lth node. and Concatenate the global parameters of the previous L-1 node to obtain the global parameters. and This parameter is distributed to all devices as a parameter for the local incremental network.
[0122] In step S5, after receiving the global parameters, the device calculates the local hidden layer output based on the current parameters.
[0123]
[0124] Computing device local hidden layer output matrix Where + indicates taking the pseudo-inverse of the matrix;
[0125] Calculate the cross-entropy loss value of device i based on the current network. Where L(·) is the cross-entropy loss function, The formula for calculating the sample quality category label predicted by the model is as follows:
[0126]
[0127] Each device will output a weight β L,i And the loss value in this round. L,i Uploaded to the server;
[0128] The server updates the global β by weighted average aggregation of the uploaded output values. L :
[0129]
[0130] The model score M_s is obtained by evaluating the local model of device i using the loss value of device i. i :
[0131]
[0132] Among them, the global loss value
[0133] In step S6, the server will assign D_s to each device. i V_s i and M_s i Normalize and weight them respectively to obtain their contribution C to the current node. L,i :
[0134] C L,i =a·D_s i +b·V_s i +c·M_s i (17)
[0135] Where a, b, and c are the weights of each score, let...
[0136] Based on the Exp3 algorithm, which is based on multi-index evaluation and fairness constraints, the true contribution C of device i is calculated. L,i The unbiased contribution estimate is obtained from the following formula.
[0137]
[0138] in, p′ L,i p′ represents the probability of device i being selected when training the Lth node. When L = 1, p′ 1,i =0.4;
[0139] Using unbiased estimators Estimate the potential returns for the client by applying exponential weights ws L,i Reflecting this estimate, for certain devices with a probability greater than 1, the weights are not updated, and the update formula is as follows:
[0140]
[0141] Where η = 0.2 is the learning rate. It is the set of devices whose probability of occurrence exceeds 1 when training the Lth node;
[0142] Based on weight Obtain the initial selection probability distribution Wherein the initial probability of device i being selected The calculation formula is as follows:
[0143]
[0144] for make sure Furthermore, to ensure fair participation of each device in training, a lower limit for the probability of selection is set, σ = 0.1, which requires the following constraints: Where i = 1, 2, ..., 50;
[0145] like If the constraints are satisfied, then the final probability of being selected is... Where, p ′ L =[p ′ L,1 ,p ′ L,2 ,…,p ′ L,50 If this condition is not met, assume there exists a proportionality coefficient. Right now To obtain p that is closest to the weight ratio ′ L The objective function is obtained as follows:
[0146]
[0147] The objective function described above is a quadratic programming problem, which can be solved using the Lagrange multiplier method:
[0148]
[0149] Where, λ L ,μ L,i ,ν L,i Assuming the Lagrange multipliers, construct the Lagrange function and solve for p′ using the KKT optimality conditions. L .
[0150] In step S7, steps S2-S6 are repeated until the model converges or the residual in the current iteration meets the expected tolerance. At this point, no new nodes are added, and the trained global model is obtained and distributed to each device as a soft measurement model.
[0151] It should be noted that, for those skilled in the art, various modifications, substitutions, or equivalent improvements can be made without departing from the basic concept and principles of this invention. For example, adjusting the parameter settings of the federated incremental mechanism or introducing differential privacy and other enhanced data protection measures are all considered to fall within the protection scope of this invention. Technical details not explicitly stated in the above embodiments can be implemented using existing mature technologies, and the various technical features described in this invention can be combined arbitrarily and reasonably. As long as there is no technical conflict, they all fall within the scope of this specification. Therefore, the protection scope of this invention should be determined by the content defined in the appended claims, and not limited to the embodiments described in the specification.
Claims
1. A federated incremental modeling method based on dynamic probabilistic optimization in heterogeneous edge environments, characterized in that, The method includes the following steps: S1, the equipment in each factory matches its industrial process sample data with the corresponding sample quality category label, obtains a category vector based on the category count, adds noise to this vector, and uploads the noisy category density vector to the server. The server determines the number of equipment required to participate and initializes the exponential weight and selection probability distribution of each equipment. S2, the server selects multiple candidate device sets based on the selection probability, predicts the subset of devices that can successfully upload by combining the disconnection rate of each device, calculates the category density distribution of each subset, and quantifies its imbalance by the distribution offset coefficient, and selects the device set with the smallest distribution offset coefficient for federated training. S3, select the device to train the hidden layer nodes, and put the hidden layer nodes that meet the local data constraints into the candidate pool. Evaluate the data quality of the device, and upload the best candidate nodes and data quality indicators to the server. S4, the server performs weighted aggregation of the uploaded hidden layer nodes to obtain global parameters and obtains the fluctuation status of the devices. The global parameters are then distributed to all devices as hidden layer parameters of the local incremental network. S5. After receiving the global parameters, each device calculates the newly added hidden layer output and uses the global parameters to calculate the device's loss in this round. The output weights and loss values are then uploaded to the server. The server performs weighted aggregation of the output weights of the selected devices and evaluates the device's local model. S6, the multiple score indicators of the equipment are weighted to obtain the equipment contribution. Based on the contribution, the selection probability distribution of each equipment is optimized according to the Exp3 algorithm based on multi-indicator evaluation and fairness constraints to ensure that the probability meets the requirements. S7. Repeat steps S2-S6 until the current number of nodes exceeds the limit or the residual in the current iteration meets the expected tolerance. No new nodes will be added. The trained global model will be distributed to each device as a soft measurement model. In step S6, the weighted average of multiple score indicators of the equipment is used to obtain the equipment contribution. Based on this contribution, the specific method for optimizing the selection probability distribution of each equipment according to the Exp3 algorithm based on multi-indicator evaluation and fairness constraints is as follows: S61, the server will connect each device , and Normalize and weight them respectively to obtain their contribution to the current node. : ; Where a, b, and c are the weights of each score, and their values can be set according to the task requirements. ; The selected device i obtains a data quality score based on the data it possesses. For volatility fractions, To evaluate the local model of device i and obtain the model score; S62, based on the Exp3 algorithm which is based on multi-index evaluation and fairness constraints, and based on the true contribution of device i. The unbiased contribution estimate is obtained from the following formula. : ; in, , This represents the probability of device i being selected during the training of the Lth node. When L=1, , The set of devices that minimizes the distribution offset coefficient is selected as the set of devices for training the Lth node; S63, for cases where the device probability exceeds 1, the weights are not updated, and the update formula is as follows: ; in, It's the learning rate. It is the set of devices whose probability of occurrence exceeds 1 when training the Lth node; S64, based on weights The initial selection probability distribution is obtained. Wherein, the initial probability of device i being selected is... The calculation formula is as follows: ; Where K is the number of devices participating in federal training, the device selection ratio is d, and the number of selected devices k = K * d.
2. The federated incremental modeling method based on dynamic probabilistic optimization in a heterogeneous edge environment according to claim 1, characterized in that, In step S1, the equipment in each factory maps its industrial process sample data to the corresponding sample quality category labels, obtains a category vector based on the category count, adds noise to this vector, and uploads the noisy category density vector to the server. The specific method is as follows: S11, in a heterogeneous edge environment with data heterogeneity and fluctuating state disconnections, where each device has a different amount of data and a different number of items in each category, K devices participate in federated training. Device i collects its historical industrial process sample data. and the corresponding product quality category label , recorded as ,in, , The feature matrix represents the v-th industrial process sample data of device i; S12, the number of type j data owned by device i is used This means that for data of type J, vectors are used. This represents the local data distribution of device i; S13, each device follows the principle of differential privacy regarding the data distribution vector. Add noise , , where each noise component It follows a Laplace distribution, i.e. , For privacy operators, let , For device i, the number of data of class j after adding noise is given to the vector. The formula for adding noise is as follows: ; in, This is the class vector after adding noise; S14, according to Calculate the category density vector for each device. , will vector Uploaded to the server. The calculation formula is as follows: ; Where the superscript T denotes the transpose of the matrix. It is a column vector consisting entirely of 1s.
3. The federated incremental modeling method based on dynamic probability optimization in a heterogeneous edge environment according to claim 2, characterized in that, In step S1, the server determines the required number of devices to participate, and the specific method for initializing the exponential weight and selection probability distribution of each device is as follows: S15, if the equipment selection ratio is d, then the number of selected equipment k = K * d; S16, This represents the exponential weight of device i during the training of the Lth node. The exponential weight is initialized. Initially, each device has the same probability of being selected. .
4. The federated incremental modeling method based on dynamic probabilistic optimization in a heterogeneous edge environment according to claim 3, characterized in that, In step S2, the server selects multiple candidate device sets based on the selection probability, predicts a subset of devices that can successfully upload based on the disconnection rate of each device, calculates the category density distribution of each subset and quantifies its imbalance using a distribution offset coefficient, and selects the device set with the smallest distribution offset coefficient. The specific method for federated training is as follows: S21, the server selects n sets of clients with k devices as a candidate set based on the selection probability. , This represents the set of devices selected when training the Lth node in the u-th set of the candidate set. For these candidate sets, based on the disconnection rate of each device, the set of devices that successfully uploaded data is predicted for each set. , express The predicted set of devices that will successfully upload is based on the device category density vector. Get the set Category vectors ,in, , ; S22, applying the coefficient of variation from statistics to federated learning, is called the distribution shift coefficient, denoted by DSC, and the formula is as follows: ; in, It is the average of the total category distribution vector; S23, calculate the distribution offset coefficient of the total category distribution vector of all prediction sets, and select the set that minimizes the distribution offset coefficient as the set of devices for training the Lth node. Participate in federal training: 。 5. The federated incremental modeling method based on dynamic probabilistic optimization in a heterogeneous edge environment according to claim 4, characterized in that, In step S3, the hidden layer nodes are selected for training on the device, and the hidden layer nodes that meet the local data constraints are added to the candidate pool. The data quality of the device is evaluated, and the best candidate nodes and data quality indicators are uploaded to the server. The specific method is as follows: S31, the selected device i obtains a data quality score based on the data it possesses. The formula is as follows: ; in, The number of data categories owned by device i. This represents the total number of data types J for device i. and Indicates taking a vector The maximum and minimum values in the range. Hellinger distance measures the distance between two probability distributions. and The formula for the distance metric of similarity is as follows: ; in, The category probability distribution of data representing device i. It is the probability distribution when the data is uniformly distributed; S32, Selected device i initializes the parameters required for local incremental random configuration of network learning: maximum number of hidden layer nodes. Maximum number of random configurations Expected tolerance Hidden layer parameters random configuration range , It is the minimum value in the configuration range. It is the maximum value of the configuration range. It's the step size, the learning parameter. ; During the local incremental network construction process for each device, within the adjustable symmetrical range Hidden layer parameters of the devices are randomly generated within each device. and Calculate the hidden layer output of the node : ; Where g(·) is the activation function, For and A vector of all ones of the same dimension, defined as a sequence of non-negative real numbers. Hidden nodes that satisfy the following inequality constraints are candidate nodes: ; ; Where <·,·> denote the vector dot product. This represents the supervision value corresponding to the label in the q-th column of the dataset when training the L-th hidden layer node in device i. The qth column of the residual error matrix is used when training the L-1th node of the network model for device i, with the initial residual being the sample class label; S33, Device i performs the following during network training: Secondary random configuration, find out which The largest pair of hidden parameters is the optimal hidden parameter for device i to satisfy the supervision mechanism. and The optimal hidden layer parameters and data quality scores are uploaded to the server.
6. The federated incremental modeling method based on dynamic probabilistic optimization in a heterogeneous edge environment according to claim 5, characterized in that, In step S4, the server weights and aggregates the uploaded hidden layer nodes to obtain global parameters and obtains the device fluctuation status. The specific method for distributing the global parameters to all devices as hidden layer parameters of the local incremental network is as follows: S41, the server regroups the devices that successfully uploaded data into... The server uses a weighted average aggregation of the best hidden layer parameters uploaded by the device to obtain the global parameters of the Lth node. and : ; S42 updates the device disconnection rate based on device disconnection status. To obtain the volatility fraction , and The calculation formula is as follows: ; ; in, This indicates the number of times device i is selected among the L nodes used in training the global model. To count the number of successful uploads by device i across L nodes in the federated training, when training the j-th node, the index of device i in the set is... The value is 1 if the condition is met, and 0 otherwise. To count the number of times device i is selected in the L nodes of the federated training, when training the j-th node, the index of device i in the set is... The value is 1 if the condition is met, and 0 otherwise. S43, the server will add global parameters to the Lth node. and The global parameters are obtained by concatenating them with the global parameters of the previous L-1 node. and This parameter is then distributed to all devices as a parameter for the local incremental network.
7. The federated incremental modeling method based on dynamic probabilistic optimization in a heterogeneous edge environment according to claim 6, characterized in that, In step S5, after each device receives the global parameters, it calculates the newly added hidden layer output and uses the global parameters to calculate the device's loss in this round. The specific method for uploading the output weights and loss values to the server is as follows: S51, after receiving the global parameters, the device calculates the local hidden layer output based on the current parameters. : ; Computing device local hidden layer output matrix , where + indicates taking the pseudo-inverse of the matrix; S52, Calculate the cross-entropy loss value of device i based on the current network. Where L(·) is the cross-entropy loss function, The formula for calculating the sample quality category label predicted by the model is as follows: ; S53, each device will output weights and the value of this round of losses Upload to the server.
8. The federated incremental modeling method based on dynamic probabilistic optimization in a heterogeneous edge environment according to claim 7, characterized in that, In step S5, the server performs weighted aggregation of the output weights of the selected devices and evaluates the local model of the devices using the following specific method: S54, the server updates the global value by weighted average aggregation of the uploaded output values. : ; S55, evaluate the local model of device i using the loss value of device i to obtain the model score. : ; Among them, the global loss value .
9. The federated incremental modeling method based on dynamic probabilistic optimization in a heterogeneous edge environment according to claim 1, characterized in that, The specific method to ensure that the probability meets the requirements in step S6 is as follows: S65, for ,make sure Furthermore, to ensure fair participation of each device in training, a lower limit for the probability of being selected should be set. That is, the following constraints are required: ,in, ; S66, if If the constraints are satisfied, then the final probability of being selected is... ,remember If this condition is not met, assume there exists a proportionality coefficient. ,Right now To obtain the closest weight ratio The objective function is obtained as follows: ; S67, the objective function above is a quadratic programming problem, which can be solved using the Lagrange multiplier method: ; ; in, For the Lagrange multipliers, construct the Lagrange function and solve for it using the KKT optimality condition. .