A Distributed Model Training Method and Related Device for Deep Learning in Edge Computing
By adopting distributed model training methods in edge computing and using ResNet network for parallel data training, the problem of deep neural network training time in industrial edge scenarios and dependence on cloud resources is solved, and efficient model training and applicable industrial edge management and control fields are realized.
Patent Information
- Application Number
- CN202210752982.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-28
- Publication Date
- 2025-06-03
- Estimated Expiration
- 2042-06-28
AI Technical Summary
In industrial scenarios, deep neural networks take a long time to extract feature of high-dimensional, strong real-time, large-traffic devices and sensor data, and concentrated on cloud processing will put pressure on cloud computing resources, data storage capabilities and network bandwidth. The existing distributed training technology cannot be widely used in the field of industrial edge management and control.
The distributed model training method for deep learning in edge computing is adopted, and the distributed model training of data parallel can be achieved through steps such as data acquisition, data classification, construction of ResNet network models, parallel distributed training and parameter fusion.
With the same model accuracy, the model training efficiency is significantly improved, the training time is reduced, and the dependence on cloud resources is reduced, and it is suitable for industrial edge management and control.
Smart Images

Figure CN115114982B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and particularly to a distributed model training method, device, computer equipment and storage medium for deep learning in edge computing. Background Art
[0002] In industrial scenarios, in the face of high-dimensional, strongly real-time, and large-flow device and sensor data, more complex deep neural networks are often required for feature extraction. However, due to the large number of complex network parameters, the training process is very time-consuming. In addition, for such a large amount of data, if all are processed centrally in the cloud, it will pose a severe test to cloud computing resources, data storage capabilities, network bandwidth, etc.
[0003] In the field of deep learning, there are two common ways to improve model accuracy: one is to optimize the model structure, but as the neural network structure design becomes more and more mature, it is more and more difficult to optimize the network structure; the other is to increase the model or data scale, but this will lead to an increase in the model training time. With the development of information technology, the idea of distributed training has been applied to solve the training field of large-scale data sets. However, existing distributed training has technical problems such as narrow application range and many model parameters, and cannot be widely applied to the industrial edge control field. Summary of the Invention
[0004] An object of the present invention is to provide a distributed model training method for deep learning in edge computing.
[0005] The object of the present invention is achieved through the following technical solutions, and the specific steps are as follows:
[0006] 1) Data acquisition: Collect data from the historical database of the data to be classified to construct an initial data set;
[0007] 2) Data classification: The initial data set includes a training set S and a test set Q, and the data in the training set S is evenly divided into N training subsets S i , S i =(S 1 , S 2 , …, S N );
[0008] 3) Model construction: Use one-dimensional convolution to construct N training models based on the ResNet network, and initialize the model hyperparameters;
[0009] 4) Model training: Input the data of the N training subsets S i into the N training models based on the ResNet network respectively for distributed training based on data parallelism;
[0010] 5) Parameter output: When the number of distributed training times of the training model based on the ResNet network reaches the preset threshold, output the model parameters to obtain the training result.
[0011] Furthermore, the ResNet network includes a convolutional input layer, four residual blocks, a pooling layer, and a fully connected layer connected in sequence, and Dropout is set before the fully connected layer.
[0012] Furthermore, the initial parameters of the training model based on the ResNet network include the training scale, epoch, Dropout probability, Loss function, and Adam optimizer parameters.
[0013] Furthermore, the specific steps of model training in step 4) are as follows:
[0014] 4-1) Input the N training subsets S i data into N training models based on the ResNet network for a single independent training respectively;
[0015] 4-2) Fuse the parameters of the trained models:
[0016]
[0017] In the formula, ω is the model parameter, represents the true gradient calculated after executing n sample data, n represents the total number of samples, and m k represents the number of samples contained in the kth model, represents the gradient information calculated by the kth model;
[0018] 4-3) Redistribute the fused parameters to N training models based on the ResNet network for training;
[0019] 4-4) If the current training times P < P max , then repeat steps 4-2) - 4-3). If the current training times P ≥ P max , then go to step 5), where P max is the preset maximum number of iterations.
[0020] Another object of the present invention is to provide a distributed model training device based on deep learning in edge computing.
[0021] The object of the present invention is achieved by such a technical solution, including:
[0022] Data acquisition module: Collect data from the historical database of the data to be classified to construct an initial data set;
[0023] Data classification module: The initial dataset includes a training set S and a test set Q, and is used to evenly divide the data in the training set S into N training subsets S i , S i =(S 1 , S 2 , …, S N );
[0024] Model construction module: Used to construct N training models based on the ResNet network using one-dimensional convolution and initialize model hyperparameters;
[0025] Model training module: Used to input the data of N training subsets S i into N training models based on the ResNet network for distributed training based on data parallelism;
[0026] Parameter output module: Used to output model parameters when the number of distributed training times of the training model based on the ResNet network reaches a preset threshold to obtain the training result.
[0027] The present invention also provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. The characteristic is that when the processor executes the program, it implements the above-mentioned distributed model training method for deep learning in edge computing.
[0028] The present invention also provides a computer-readable storage medium, on which a computer program is stored. The characteristic is that when the program is executed by the processor, it implements the above-mentioned distributed model training method for deep learning in edge computing.
[0029] Due to the above technical solutions, the present invention has the following advantages:
[0030] This application decomposes the dataset into multiple data subsets, and inputs the multiple data subsets into multiple ResNet networks for training respectively. After each epoch of training is completed, the gradient information will be synchronized to the management node. After the gradient information is fused by the management node, it will be retransmitted to the multiple ResNet networks for parameter update. The distributed model training method based on data parallelism in this application can significantly improve the model training efficiency under the same model accuracy.
[0031] Other advantages, objectives, and features of the present invention will be elaborated to some extent in the subsequent specification, and to some extent, will be obvious to those skilled in the art based on the study of the following text, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be achieved and obtained through the following specification and claims. Brief Description of the Drawings
[0032] The drawings of the present invention are described as follows.
[0033] Figure 1 It is a flowchart of the method of the present invention.
[0034] Figure 2 It is a schematic structural diagram of the ResNet network of the present invention.
[0035] Figure 3 It is a sample diagram of the dataset samples in Embodiment 1 of the present invention.
[0036] Figure 4 It is a graph of the training accuracy of the model in Embodiment 1 of the present invention.
[0037] Figure 5 It is a graph of the training loss value of the model in Embodiment 1 of the present invention.
[0038] Figure 6 It is a confusion matrix diagram of the model test classification in Embodiment 1 of the present invention.
[0039] Figure 7 It is a graph of the training accuracy of the model in Embodiment 2 of the present invention.
[0040] Figure 8 It is a graph of the training loss value of the model in Embodiment 2 of the present invention.
[0041] Figure 9 It is a confusion matrix diagram of the model test classification in Embodiment 2 of the present invention.
[0042] Figure 10 It is a graph of the training accuracy of the model in Embodiment 3 of the present invention.
[0043] Figure 11 It is a graph of the training loss value of the model in Embodiment 3 of the present invention.
[0044] Figure 12 It is a confusion matrix diagram of the model test classification in Embodiment 3 of the present invention. Detailed implementation manners
[0045] The present invention will be further described below in conjunction with the drawings and embodiments.
[0046] Embodiment 1:
[0047] A distributed model training method, device, computer device and storage medium for handwritten digital dataset classification in the context of deep learning.
[0048] A distributed model training method for handwritten digital dataset classification in the context of deep learning, the specific steps are as follows:
[0049] 1) Data collection: Collect data from the open-source handwritten digit database of the National Institute of Standards and Technology (MNIST) to construct an initial dataset. As shown in Figure 3 , a single data in the MNIST handwritten digit database is a handwritten note picture containing 10 digits from 0 to 9, with a picture size of 28*28. The database has a total of 60,000 training samples and 10,000 test samples.
[0050] 2) Data classification: Extract 15,000 training samples from the training samples of the MNIST handwritten digit database to form a training set S, extract 3,000 test samples from the test samples to form a test set Q, and evenly divide the 15,000 training samples into three training sets A, B, and C, and use all the 15,000 collected training samples as a control set D.
[0051] Table 1 Dataset sample division table
[0052]
[0053] 3) Model construction: As shown in Figure 2 , use one-dimensional convolution to construct four training models based on the ResNet network for A, B, C, and D, and initialize the model parameters;
[0054] The ResNet network includes a sequentially connected convolutional input layer, four residual blocks, a pooling layer, and a fully connected layer, and Dropout is set before the fully connected layer. The model parameters of the ResNet network are shown in Table 2.
[0055] Table 2 Parameters of the ResNet network model
[0056]
[0057]
[0058] The initial parameters of the training model based on the ResNet network include training scale, epoch, Dropout probability, Loss function, and Adam optimizer parameters, as shown in Table 3.
[0059] Table 3 Hyperparameters of the ResNet network model
[0060]
[0061] 4) Model training: Input the data of training sets A, B, and C into three training models A, B, and C respectively for distributed training based on data parallelism, and input the training set D into the training model D for independent training;
[0062] The training models A, B, and C each conduct 1 independent training and 6 trainings based on parameter fusion. Their model parameter fusion is as follows:
[0063]
[0064] In the formula, ω is the model parameter, represents the true gradient calculated after executing n sample data, n represents the total number of samples, and m k represents the number of samples contained in the k-th model, represents the gradient information calculated by the k-th model;
[0065] The training models A, B, and C each train for 10 epochs per training, with a total of 70 iterations, and the model D is independently trained 70 times; The accuracy curve and loss value curve of model training are respectively as Figure 4 、 5 shown.
[0066] In the example of the present invention, the distributed training based on data parallelism includes two types of nodes, namely the management node and the computing node, which respectively correspond to the aggregation node and the basic computing node in the distributed offline computing service of the edge control platform; The management node is mainly responsible for parameter synchronization. The data set will be split into multiple independent subsets and stored in the platform distributed object storage system, and will be loaded into each computing node at the start of training; At the start of training, each computing node will be initialized with the parameters uniformly transmitted by the management node, and then use local data for training; After each epoch of training is completed, the gradient information will be synchronized to the management node. After the gradient information is fused by the management node, it will be retransmitted to each node for parameter update. After the parameter update is completed, the next round of training will be carried out.
[0067] 5) Parameter output: When the distributed training times of the training model based on the ResNet network reach 1 independent training and 6 trainings based on parameter fusion, output the model parameters to obtain the training results;
[0068] 6) Model testing: Input the data of the test set Q into the training models A, B, C, and D respectively for testing. The test accuracy and time-consuming information of each model are shown in Table 4, and the confusion matrix of each model's test classification is as Figure 6 shown.
[0069] Table 4 Test results and time-consuming information of the model
[0070]
[0071] As can be seen from the above experimental results, each model has successfully completed the classification task for the input samples, and the classification accuracy of each category is above 90%. Based on the test results of the test set and the data of the accuracy comparison curve, it can be known that compared with the traditional training method, the performance of the model obtained by the parallel distributed model training method is basically the same, and the average test accuracy is 96.189%. Moreover, compared with the traditional single-node training method, the test accuracy only differs by 0.478%. There is no obvious difference in the performance of the models obtained by the two methods. However, based on the distributed training scheme, the model training time is shortened to 50.546% of the single-node training time. It can be seen that the distributed model training method based on data parallelism can significantly improve the model training efficiency under the same model accuracy.
[0072] This embodiment also provides a distributed model training device based on deep learning in the classification of handwritten digit datasets, including:
[0073] 1) Data acquisition module: used to collect data from the MNIST handwritten digit database and construct an initial dataset;
[0074] 2) Data classification module: the initial dataset includes a training set S and a test set Q, and is used to evenly divide the data in the training set S into three training subsets A, B, and C;
[0075] 3) Model construction module: used to construct four training models based on the ResNet network for A, B, C, and D using one-dimensional convolution and initialize the model parameters;
[0076] 4) Model training module: used to separately input the data of the three training subsets A, B, and C into the training models A, B, and C for distributed training based on data parallelism, and input the entire training set S as the dataset D into the model D for independent training;
[0077] 5) Parameter output module: used to output the model parameters when the number of distributed training times of the training model based on the ResNet network reaches a preset threshold to obtain the training result.
[0078] 6) Model testing module: used to test the data of the test set Q by inputting it into the training models A, B, C, and D respectively, and record the test accuracy and time-consuming information of each model.
[0079] This embodiment also provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that when the processor executes the program, it implements the above-mentioned distributed model training method for deep learning in the classification of handwritten digit datasets.
[0080] This embodiment also provides a computer-readable storage medium, on which a computer program is stored. The program, when executed by a processor, implements the above-mentioned distributed model training method for handwritten digital font dataset classification oriented to deep learning.
[0081] Embodiment 2:
[0082] A distributed model training method, device, computer device and storage medium for fault classification of CWRU bearing dataset oriented to deep learning.
[0083] A distributed model training method for fault classification of CWRU bearing dataset oriented to deep learning, the specific steps are as follows:
[0084] 1) Data acquisition: Collect data from the bearing database of Case Western Reserve University (CWRU) to construct an initial dataset;
[0085] The CWRU bearing database contains four working conditions (0hp, 1hp, 2hp, 3hp), and the rotational speeds under each working condition are 1797rpm, 1772rpm, 1750rpm and 1730rpm in turn; each working condition contains four bearing states, namely normal state, outer ring fault state, inner ring fault state and rolling element fault state. For each fault state, there are 3 different fault degrees, namely 0.1778mm, 0.3556mm, 0.7112mm three categories; this embodiment will use the drive-end acceleration data of 10 bearing states in the CWRU bearing dataset at a sampling rate of 48KHz and a load of 3hp; as shown in Table 5.
[0086] Table 5 Database sample information table
[0087]
[0088]
[0089] 2) Data classification: Randomly select a total of 24,000 data from 10 bearing states extracted from the CWRU bearing database, and evenly distribute them to three training sets A, B, and C, and use all the 24,000 training samples collected as the control set D. Extract 3,000 test samples from the CWRU bearing database to form the test set Q;
[0090] 3) Build a model: As Figure 2 shown, use one-dimensional convolution to build four training models based on the ResNet network for A, B, C, and D, and initialize the model parameters;
[0091] The ResNet network includes a convolutional input layer, four residual blocks, a pooling layer, and a fully connected layer connected in sequence, and Dropout is set before the fully connected layer. The parameters of the ResNet network are shown in Table 6.
[0092] Table 6 Parameters of the ResNet network model
[0093]
[0094]
[0095] The initial parameters of the training model based on the ResNet network include the training scale, epoch, Dropout probability, Loss function, and Adam optimizer parameters, as shown in Table 7.
[0096] Table 7 Hyperparameters of the ResNet network model
[0097]
[0098] 4) Model training: Input the data of training sets A, B, and C into three training models A, B, and C respectively for distributed training based on data parallelism, and input the training set D into the training model D for independent training;
[0099] The training models A, B, and C each conducted 1 independent training and 6 trainings based on parameter fusion. The model parameters are fused as follows:
[0100]
[0101] where ω is the model parameter, represents the true gradient calculated after executing n sample data, n represents the total number of samples, and m k represents the number of samples contained in the k-th model, represents the gradient information calculated by the k-th model;
[0102] The three training models A, B, and C are trained for 10 epochs each time, with a total of 70 iterations, and the model D is independently trained 70 times; The accuracy curve and loss value curve of model training are respectively as Figure 7 、 8 shown.
[0103] In the example of the present invention, the distributed training based on data parallelism includes two types of nodes, namely the management node and the computing node, which respectively correspond to the aggregation node and the basic computing node in the distributed offline computing service of the edge control platform; the management node is mainly responsible for parameter synchronization. The data set will be split into multiple independent subsets and stored in the platform's distributed object storage system, and will be loaded into each computing node at the start of training; at the start of training, each computing node will be initialized with the parameters uniformly transmitted by the management node, and then use local data for training; after each epoch of training is completed, the gradient information will be synchronized to the management node. After the gradient information is fused by the management node, it will be retransmitted to each node for parameter update, and then the next round of training will be carried out after the parameter update is completed.
[0104] 5) Parameter output: When the number of distributed training times of the training model based on the ResNet network reaches 1 independent training and 6 times of training based on parameter fusion, the model parameters are output to obtain the training result;
[0105] 6) Model testing: The test set Q data is respectively input into the four training models A, B, C, and D for testing. The test accuracy and time-consuming information of each model are shown in Table 8, and the confusion matrix of each model test classification is as Figure 9 shown.
[0106] Table 8 Test results and time-consuming information of the model
[0107]
[0108] This embodiment also provides a distributed model training device based on deep learning in the fault classification of the CWRU bearing data set, including:
[0109] 1) Data acquisition module: used to collect data from the CWRU bearing database and construct an initial data set;
[0110] 2) Data classification module: The initial data set includes a training set S and a test set Q, and is used to evenly divide the data in the training set S into three training subsets A, B, and C;
[0111] 3) Model construction module: used to construct four training models based on the ResNet network for A, B, C, and D using one-dimensional convolution and initialize the model parameters;
[0112] 4) Model training module: used to input the data of the three training subsets A, B, and C into the three training models A, B, and C for distributed training based on data parallelism, and input the entire training set S as the data set D into the model D for independent training;
[0113] 5) Parameter output module: used to output model parameters when the number of distributed training times of the training model based on the ResNet network reaches a preset threshold, and obtain the training result.
[0114] 6) Model testing module: used to separately input the test set Q data into four training models A, B, C, and D for testing, and record the test accuracy and time-consuming information of each model.
[0115] This embodiment also provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that when the processor executes the program, it implements the above-mentioned distributed model training method for deep learning in the fault classification of the CWRU bearing dataset.
[0116] This embodiment also provides a computer-readable storage medium, on which a computer program is stored, characterized in that when the program is executed by the processor, it implements the above-mentioned distributed model training method for deep learning in the fault classification of the CWRU bearing dataset.
[0117] Embodiment 3:
[0118] A distributed model training method, device, computer device, and storage medium for deep learning in the fault classification of the MFPT bearing dataset.
[0119] A distributed model training method for deep learning in the fault classification of the MFPT bearing dataset, the specific steps are as follows:
[0120] 1) Data acquisition: Collect data from the bearing database of the American Society for Machinery Failure Prevention Technology (MFPT) to construct an initial dataset;
[0121] The MFPT bearing dataset contains four types of data: The first type is three normal conditions, with a working condition environment of a load of 270 pounds, a rotational speed of 25 Hz, a sampling rate of 97.656 sps, and a duration of 6 seconds; the second type is three outer ring fault conditions, with corresponding working conditions the same as the normal conditions; the third type is outer ring faults under 7 working conditions, and the 7 working conditions mainly refer to changes in the load, and the loads are in turn: 25 pounds, 50 pounds, 100 pounds, 150 pounds, 200 pounds, 250 pounds, 300 pounds, and other parameters are the same (rotational speed 25 Hz, sampling rate 48828 sps, duration 3 seconds); the last type is inner ring faults under 7 working conditions, and the 7 working conditions also refer to changes in the load, and the loads are in turn: 0 pounds, 50 pounds, 100 pounds, 150 pounds, 200 pounds, 250 pounds, 300 pounds, and other parameters are the same (rotational speed 25 Hz, sampling rate 48828 sps, duration 3 seconds); as shown in Table 9.
[0122] Table 9 Database sample information table
[0123]
[0124] 2) Data classification: Randomly select 2,160 data from 3 types of bearing states in the MFPT bearing database, and evenly distribute them into five training sets A, B, C, D, and E. Use all the 2,160 collected training samples as the control set F. Extract 1,000 test samples from the CWRU bearing database to form the test set Q;
[0125] 3) Model construction: As Figure 2 shown, use one-dimensional convolution to construct six training models A, B, C, D, E, and F based on the ResNet network, and initialize the model parameters;
[0126] The ResNet network includes a sequentially connected convolutional input layer, four residual blocks, a pooling layer, and a fully connected layer, and Dropout is set before the fully connected layer. The parameter table of the ResNet network is shown in Table 10.
[0127] Table 10 Parameters of the ResNet network model
[0128]
[0129] The initial parameters of the training model based on the ResNet network include the training scale, epoch, Dropout probability, Loss function, and Adam optimizer parameters, as shown in Table 11.
[0130] Table 11 Hyperparameters of the ResNet network model
[0131]
[0132] 4) Model training: Input the data of training sets A, B, C, D, and E into the five training models A, B, C, D, and E respectively for distributed training based on data parallelism. Input the training set F into the training model F for independent training;
[0133] The training models A, B, C, D, and E were each independently trained once and trained six times based on parameter fusion. The model parameter fusion is as follows:
[0134]
[0135] where ω is the model parameter, represents the true gradient calculated after executing n sample data, n represents the total number of samples, and m k represents the number of samples contained in the kth model, represents the gradient information calculated by the kth model;
[0136] The training models A, B, C, D, and E are each trained for 10 epochs per training session, with a total of 70 iterations, and model F is independently trained 70 times; the accuracy curve and loss value curve of the model training are respectively as Figure 10 , 11 shown.
[0137] In the example of the present invention, the distributed training based on data parallelism includes two types of nodes, namely the management node and the computing node, which respectively correspond to the aggregation node and the basic computing node in the distributed offline computing service of the edge control platform; the management node is mainly responsible for parameter synchronization, and the data set will be split into multiple independent subsets and stored in the platform distributed object storage system, and will be loaded into each computing node at the start of training; at the start of training, each computing node will be initialized with the parameters uniformly transmitted by the management node, and then use local data for training; after each epoch of training is completed, the gradient information will be synchronized to the management node, and after the gradient information is fused by the management node, it will be re-transmitted to each node for parameter update, and after the parameter update is completed, the next round of training will be carried out.
[0138] 5) Parameter output: When the number of distributed training times of the training model based on the ResNet network reaches 1 independent training and 6 times of training based on parameter fusion, the model parameters are output to obtain the training result;
[0139] 6) Model testing: The data of the test set Q are respectively input into the six training models A, B, C, D, E, and F for testing. The test accuracy and time-consuming information of each model are shown in Table 12, and the confusion matrix of each model test classification is as Figure 12 shown.
[0140] Table 12 Test results and time-consuming information of the model
[0141]
[0142] This embodiment also provides a distributed model training device based on deep learning in the fault classification of the MFPT bearing data set, including:
[0143] 1) Data acquisition module: used to collect data from the MFPT bearing database and construct an initial data set;
[0144] 2) Data classification module: The initial data set includes a training set S and a test set Q, and is used to evenly divide the data of the training set S into five training subsets A, B, C, E, and F;
[0145] 3) Model construction module: used to construct six training models based on the ResNet network for A, B, C, D, E, and F using one-dimensional convolution and initialize the model parameters;
[0146] 4) Model training module: used to separately input the data of five training subsets A, B, C, D, and E into five training models A, B, C, D, and E for distributed training based on data parallelism, and input the entire training set S as the data set F into model F for independent training;
[0147] 5) Parameter output module: used to output model parameters when the number of distributed training times of the training model based on the ResNet network reaches a preset threshold, and obtain the training result.
[0148] 6) Model testing module: used to separately input the data of the test set Q into the training models A, B, C, D, E, and F for testing, and record the test accuracy and time-consuming information of each model.
[0149] This embodiment also provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. The characteristic is that when the processor executes the program, it implements the above-mentioned distributed model training method for deep learning in the fault classification of the MFPT bearing data set.
[0150] This embodiment also provides a computer-readable storage medium, on which a computer program is stored. The characteristic is that when the program is executed by a processor, it implements the above-mentioned distributed model training method for deep learning in the fault classification of the MFPT bearing data set.
[0151] Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0152] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the specified functions in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0153] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to work in a particular manner, such that the instructions stored in the computer-readable memory produce a manufacture including an instruction device that implements the functions specified in one or more of the processes Figure 1 or blocks. Figure 1
[0154] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable apparatus provide steps for implementing the functions specified in one or more of the processes Figure 1 or blocks. Figure 1
[0155] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: modifications or equivalent replacements can still be made to the specific embodiments of the present invention, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention should be covered by the protection scope of the claims of the present invention.
Claims
1. A method for training a distributed bearing fault classification model for deep learning in edge computing, characterized in that, the specific steps are as follows: 1) Data collection: Collect data from the bearing database to construct an initial data set; 2) Data classification: The initial dataset includes a training set S and a test set Q, and the data in the training set S is evenly divided into N training subsets S i , S i = (S 1 , S 2 , …, S N ); 3) Model construction: Use one-dimensional convolution to construct N training models based on the ResNet network and initialize the model hyperparameters; 4) Model training: Input the N training subsets S i data into N training models based on the ResNet network respectively for distributed training based on data parallelism. After each batch of data is trained, the model parameters will be aggregated to obtain optimized parameters, and the new parameters will be sent to each network for continued training; 5) Parameter output: When the number of distributed training times of the training model based on the ResNet network reaches a preset threshold, output the model parameters to obtain the training result; The specific steps of model training in step 4) are: 4-1) Input the N training subsets S i data into N training models based on the ResNet network for a single independent training respectively; 4-2) Fuse the parameters of the trained model; where ω is a model parameter, denotes the true gradient calculated after executing n sample data, n represents the total number of samples, and m k denotes the number of samples contained in the k-th model, denotes the gradient information calculated by the k-th model; 4-3) Redistribute the fused parameters to N training models based on the ResNet network for training; 4-4) If the current training times P < P max , then repeat steps 4-2) - 4-3). If the current training times P ≥ P max , then go to step 5), where P max is the preset maximum number of iterations.
2. A method for training a distributed bearing fault classification model for deep learning in edge computing according to claim 1, characterized in that, the ResNet network includes a convolutional input layer, four residual blocks, a pooling layer, and a fully connected layer connected in sequence, and Dropout is set before the fully connected layer.
3. A method for training a distributed bearing fault classification model for deep learning in edge computing according to claim 1, characterized in that, the initial parameters of the training model based on the ResNet network include the training scale, epoch, Dropout probability, Loss function, and Adam optimizer parameters.
4. A device for training a distributed bearing fault classification model for deep learning in edge computing using the method according to any one of claims 1 to 3, characterized in that, it includes: A data collection module: Collect data from the bearing database to construct an initial data set; Data classification module: The initial dataset includes a training set S and a test set Q, and is used to evenly divide the data in the training set S into N training subsets S i , S i =(S 1 , S 2 , …, S N ); A model construction module: Used to construct N training models based on the ResNet network using one-dimensional convolution and initialize the model hyperparameters; Model training module: used to input the N training subsets S i data into N training models based on the ResNet network respectively for distributed training based on data parallelism; A parameter output module: Used to output the model parameters to obtain the training result when the number of distributed training times of the training model based on the ResNet network reaches a preset threshold.
5. A computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, when the processor executes the computer program, it implements the method for training a distributed bearing fault classification model for deep learning in edge computing according to any one of claims 1-3.
6. A computer-readable storage medium, on which a computer program is stored, characterized in that, when the computer program is executed by the processor, it implements the method for training a distributed bearing fault classification model for deep learning in edge computing according to any one of claims 1-3.
Citation Information
Patent Citations
Method and device for improving the prediction performance of a depth learning network, and a storage medium
CN109376615A
Machine learning method, device and system
CN114548356A
Multi-task parallel computing implementation method and device in edge computing
CN115114000A