Updating and maintaining method for recognition model of damaged image of composite material
Through the collaborative training and update mechanism between the client and the central server, the problem of low accuracy of the image recognition model caused by the client's inability to share data is solved, and higher recognition accuracy and privacy protection are achieved.
Patent Information
- Application Number
- CN202410014827.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-04
- Publication Date
- 2025-07-04
AI Technical Summary
In the prior art, various clients are unable to share training samples due to their strong data privacy, resulting in a narrow application range of composite material damage image recognition models and low recognition accuracy, and the recognition accuracy of the model decreases after the data increases.
The new damage image samples are uploaded to the central server every time the preset time period. The central server determines whether to update the model based on the update and maintenance conditions. The client receives iteration parameters for local training, and updates iteration parameters through the central server to improve the accuracy of identifying the model.
It realizes that without sharing training samples, the accuracy of the damage image recognition model of each client is improved, and the privacy of the training samples is protected, and the client difference is fully taken into account, and the recognition accuracy is improved.
Smart Images

Figure CN120259807A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of damage image recognition, and particularly to a method for updating and maintaining an identification model for composite material damage images. Background Art
[0002] The formation and evolution of damage in composite materials are very important for the optimal design and safety assessment of composite material structures. The layering forms of composite material structures are diverse, and their significant anisotropy makes the damage formation mechanism relatively complex.
[0003] With the development of artificial intelligence, convolutional neural networks are applied to the recognition of composite material damage images. In the prior art, when each client recognizes composite material damage images, due to the strong privacy of the data obtained by each client and the inability to share it with other clients, each client can only independently train on its own composite material damage image sample data. The recognition models trained in this way have a narrow application range, resulting in low recognition accuracy. At the same time, the data of each client will continuously increase during use, which will also reduce the recognition accuracy of the model.
[0004] Therefore, there is an urgent need for a method for updating and maintaining an identification model for composite material damage images. Summary of the Invention
[0005] In view of the above analysis, an embodiment of the present invention aims to provide a method for updating and maintaining an identification model for composite material damage images, so as to solve the problem that each client in the prior art uses independent training samples for model training and the training samples cannot be shared, resulting in low accuracy of the trained recognition model.
[0006] An embodiment of the present invention provides a method for updating and maintaining an identification model for composite material damage images, and the updating and maintaining method includes:
[0007] Each client uploads the number of newly added composite material damage image samples within the current time period to the central server at every preset time period; the central server determines whether to update and maintain each client according to the number of newly added composite material damage image samples of each client in the current time period;
[0008] When it is determined to update and maintain each client, the recognition model of each client is updated and maintained through the following steps:
[0009] Each client receives the iteration parameters of the current round from the central server, and locally trains its respective recognition model based on the iteration parameters of the current round, the newly added composite material damage image samples of all clients, and the original composite material damage images. After the training is completed, the training iteration parameters of each client for the current round are obtained, and the training iteration parameters of the current round are uploaded to the central server;
[0010] The central server determines whether the preset iteration termination condition is satisfied; if not, the central server determines the iteration parameters for the next round of each client according to the number of training samples of each client, the convolution kernel moving step size, and the iteration parameters and training iteration parameters of the current round, and sends them to each client, and each client starts the next round of training; the iteration parameters of each client are different.
[0011] Based on a further improvement of the above update and maintenance method, the central server determines whether to update and maintain each client according to the number of newly added composite material damage image samples of each client in the current time period, including:
[0012] Determine whether at least one of the following update and maintenance conditions is satisfied. If satisfied, update and maintain each client; otherwise, enter the next time period:
[0013] The condition of the proportion of newly added composite material damage image samples of a single client;
[0014] The condition of the proportion of newly added composite material damage image samples of all clients;
[0015] The update time condition.
[0016] Based on a further improvement of the above update and maintenance method, the following steps are used to determine whether the condition of the proportion of newly added composite material damage image samples of a single client is satisfied:
[0017] Accumulate the number of newly added composite material damage image samples of each client during this update and maintenance to obtain the total number of newly added samples of each client during this update and maintenance;
[0018] Calculate the first new proportion of the total number of samples of each client compared with the total number of samples during the last update and maintenance to obtain the first new proportion of each client;
[0019] Determine whether the first new proportion of each client reaches the first new proportion threshold; if the first new proportion of any one client reaches the first new proportion threshold, the condition of the proportion of newly added composite material damage image samples of a single client is satisfied; otherwise, the condition of the proportion of newly added composite material damage image samples of a single client is not satisfied.
[0020] Based on the further improvement of the above update and maintenance method, it is judged whether the conditions for the proportion of newly added composite material damage image samples of all clients are met through the following steps:
[0021] Accumulate the number of newly added composite material damage image samples of each client during this update and maintenance to obtain the total number of newly added samples of each client during this update and maintenance;
[0022] Accumulate the total number of newly added samples of each client during this update and maintenance to obtain the total number of newly added samples of the central server during this update and maintenance;
[0023] Calculate the second new addition ratio based on the total number of newly added samples of the central server during this update and maintenance and the total number of samples during the previous update and maintenance to obtain the second new addition ratio of the central server; judge whether the second new addition ratio of the central server reaches the second new addition ratio threshold; if the second new addition ratio of the central server reaches the second new addition ratio threshold, then the conditions for the proportion of newly added composite material damage image samples of all clients are met; otherwise, the conditions for the proportion of newly added composite material damage image samples of all clients are not met.
[0024] Based on the further improvement of the above update and maintenance method, it is judged whether the update time conditions are met through the following steps:
[0025] Judge whether the time update parameter of the previous time period reaches the time update parameter threshold; if the time update parameter of the previous time period reaches the time update parameter threshold, then the update time conditions are met, and at the same time, the time update parameter is initialized; otherwise, the update time conditions are not met.
[0026] Based on the further improvement of the above update and maintenance method, when it is determined not to perform update and maintenance on each client, the time update parameter of the previous time period is updated to obtain the time update parameter of this time period, and at the same time, it enters the next time period.
[0027] Based on the further improvement of the above update and maintenance method, the central server determines the iteration parameter of the next round of each client according to the number of training samples of each client, the convolutional kernel moving step size, and the iteration parameter and training iteration parameter of the current round, including:
[0028] Obtain the gradient update of each client according to the iteration parameter and training iteration parameter of the current round of each client;
[0029] Calculate the similarity between any two clients according to the gradient update of each client, and normalize the similarity between any two clients to obtain the normalized similarity between any two clients;
[0030] Determine the iteration parameters for the next round of this client based on the training iteration parameters, convolutional kernel moving step size, number of training set samples of this client, normalized similarity between this client and other clients, and gradient updates of other clients.
[0031] Based on a further improvement of the above update and maintenance method, calculate the iteration parameters for the next round of this client through the following formula:
[0032]
[0033] Where, represents the k-th iteration parameter of the i-th client in the (n + 1)-th round, represents the k-th training iteration parameter of the i-th client in the n-th round, α represents the convolutional kernel moving step size of all clients, P represents the number of all clients, sim′ i,j represents the normalized similarity between the i-th client and the j-th client, |D j | represents the number of training set samples of the j-th client, |D| represents the total number of training set samples of all clients, represents the gradient update of the k-th training iteration parameter of the j-th client in the n-th round.
[0034] Based on a further improvement of the above update and maintenance method, the normalization of the similarity between any two clients to obtain the normalized similarity between any two clients includes:
[0035] Calculate the average value and standard deviation of the similarity between any two clients among all clients through the following formula:
[0036]
[0037]
[0038] Where, μ represents the average value, δ represents the standard deviation, P represents the number of all clients, sim i,j represents the similarity between the i-th client and the j-th client;
[0039] Calculate the normalized similarity between any two clients through the following formula:
[0040]
[0041] Based on a further improvement of the above update and maintenance method, calculate the similarity between any two clients through the following formula:
[0042]
[0043] Where, represents the gradient update of the k-th training iteration parameter in the n-th round for the i-th client, represents the gradient update of the k-th training iteration parameter in the n-th round for the j-th client, and Q represents the number of iteration parameters;
[0044] The gradient update of each client is calculated by the following formula:
[0045]
[0046]
[0047] where, represents the k-th training iteration parameter in the n-th round for the j-th client, represents the k-th iteration parameter in the n-th round for the j-th client, represents the k-th iteration parameter in the n-th round for the i-th client.
[0048] Compared with the prior art, the present invention can at least achieve one of the following beneficial effects:
[0049] 1. By each client uploading the number of newly added composite material damage image samples within the current time period to the central server at preset time intervals, setting update and maintenance conditions, and updating and maintaining the recognition models of the composite material damage images of each client, the recognition of the composite material damage image data by each updated and maintained recognition model becomes more accurate;
[0050] 2. By uploading the training iteration parameters obtained after each client's training to the central server, and updating the iteration parameters of each client through the central server to obtain the iteration parameters for the next round, even without sharing the training samples of each independent client, the accuracy of the recognition models of each client for composite material damage images can be improved mutually, and the privacy of the training samples of each client is protected;
[0051] 3. By determining the iteration parameters for the next round of each client based on the number of training samples, the convolutional kernel moving step size, the iteration parameters of the current round, and the training iteration parameters of each client, the differences of each client are fully considered, further improving the recognition accuracy of the recognition models obtained after each client's training for composite material damage images.
[0052] In the present invention, the above technical solutions can also be combined with each other to achieve more preferred combined solutions. Other features and advantages of the present invention will be described in the subsequent description, and some advantages can be made obvious from the description, or can be understood by implementing the present invention. The objectives and other advantages of the present invention can be achieved and obtained from the content specifically pointed out in the description and the drawings. Description of the Drawings
[0053] The drawings are only for the purpose of showing specific embodiments, and are not considered as limiting the present invention. Throughout the drawings, the same reference signs denote the same components.
[0054] Figure 1 It is a schematic flow chart of the method for updating and maintaining the recognition model for composite material damage images provided by the embodiment of the present invention;
[0055] Figure 2 It is a schematic flow chart of determining whether to update and maintain each client provided by the embodiment of the present invention;
[0056] Figure 3 It is a schematic structural diagram of each client and the central server provided by the embodiment of the present invention;
[0057] Figure 4 It is a schematic structural diagram of the recognition model of each client provided by the embodiment of the present invention. Detailed Embodiments
[0058] The following will specifically describe the preferred embodiments of the present invention in conjunction with the drawings. The drawings form a part of this application and are used together with the embodiments of the present invention to explain the principles of the present invention, and are not used to limit the scope of the present invention.
[0059] A convolutional neural network is a type of feedforward neural network that contains convolutional calculations and has a deep structure, and is one of the representative algorithms of deep learning. A convolutional neural network has the ability of feature learning and can perform translation-invariant classification on input information according to its hierarchical structure, so it is also called a "translation-invariant artificial neural network".
[0060] When each client recognizes composite material damage images, it usually uses a convolutional neural network for training to obtain a recognition model, and recognizes the composite material images according to the recognition model. However, since the data obtained by each client is different, and the data of each client cannot be shared with each other due to privacy, the accuracy of the recognition models of each client is always unsatisfactory, and the recognition accuracy is relatively low.
[0061] At the same time, after each client uses the trained recognition model, due to the increase in recognition data, the recognition of the recognition model for new data becomes more and more inaccurate.
[0062] A specific embodiment of the present invention discloses a method for updating and maintaining an identification model for composite material damage images, as Figure 1 shown. The updating and maintaining method includes:
[0063] Step S1: Each client uploads the number of newly added composite material damage image samples within the current time period to the central server at every preset time period; the central server determines whether to update and maintain each client according to the number of newly added composite material damage image samples of each client in the current time period;
[0064] Step S2: When it is determined to update and maintain each client, the identification model of each client is updated and maintained through the following steps;
[0065] Step S31: Each client receives the iteration parameters of the current round from the central server, locally trains the identification model according to the iteration parameters of the current round, obtains the training iteration parameters of each client in the current round after the training is completed, and uploads the training iteration parameters of the current round to the central server;
[0066] Step S32: The central server determines whether the preset iteration termination condition is met; if not, the central server determines the iteration parameters of the next round of each client according to the number of training samples of each client, the moving step size of the convolution kernel, the iteration parameters of the current round, and the training iteration parameters, and sends them to each client, and each client starts the next round of training; the iteration parameters of each client are different.
[0067] Specifically, as Figure 2 shown, there are a total of P clients, which are the 1st client, the 2nd client... the i-th client... the j-th client... the P-th client respectively. Each client includes an identification model for identifying the damage category of composite material damage images, and the model parameters of the identification models of each client are different. It should be noted that the identification model in each client is the identification model completed in the previous update and maintenance, and the network structures of the identification models of each client are the same, but the specific iteration parameters are different.
[0068] Specifically, as Figure 1 shown, each client sends the number of newly added composite material damage image samples generated within the current preset time period to the central server at every same preset time period.
[0069] The preset time period for each client is the same, and this preset time period can be reasonably set according to the growth rate of the sample data. When the data increases rapidly, the preset time period is set shorter; when the data increases slowly, the preset time period is set longer. The newly added composite material damage image samples are the newly added composite material damage images and their corresponding damage categories. The composite material damage images include metal material images, polymer material images, ceramic material images, etc.; the damage categories include component misalignment, erosion, delamination, matrix cracking, inclusion, pore, fiber fracture, debonding, crack, uneven ply thickness, ply step, ply error, and plastic failure of the body caused by the fracture of the reinforcement phase, plastic failure of the body caused by the detachment of the interface between the reinforcement phase and the body, nucleation, growth, and coalescence of holes in the body resulting in plastic failure of the body, as well as cracks, inclusions, voids, incomplete resin curing, adhesive debonding, voids, and density non-uniformity.
[0070] The number of newly added composite material damage image samples for each client is the number of newly added composite material damage images for each client. It can be understood that each client sends the number of newly added composite material damage image samples generated during this preset time period to the central server at the end time point of this preset time period.
[0071] As Figure 2 shown, after receiving the number of newly added composite material damage image samples from each client, the central server determines whether to perform update and maintenance on each client. Performing update and maintenance on each client means jointly training and updating the recognition model of the composite material damage images on each client based on the newly added composite material damage image samples and the original composite material damage image samples.
[0072] Specifically, in step S2, if it is necessary to perform update and maintenance on each client, then the update and maintenance are carried out through Figure 1 steps S31 and S32 in
[0073] Specifically, as Figure 2 shown, the central server determines whether to perform update and maintenance on each client according to the number of newly added composite material damage image samples of each client in this time period, including:
[0074] Judging whether at least one of the following update and maintenance conditions is satisfied. If satisfied, update and maintenance are performed on each client; otherwise, enter the next time period:
[0075] The condition of the proportion of newly added composite material damage image samples for a single client;
[0076] The condition of the proportion of newly added composite material damage image samples for all clients;
[0077] Update time condition.
[0078] Specifically, at least one update and maintenance condition is set. The update and maintenance conditions include three types: the proportion condition of the newly added composite material damage image samples for a single client, the proportion condition of the newly added composite material damage image samples for a single client, and the update time condition.
[0079] It should be noted that in the embodiments of the present invention, only one update and maintenance condition can be set, or two update and maintenance conditions can be set simultaneously, or three update and maintenance conditions can be set. The three update and maintenance conditions are judged independently. As long as any one of the update and maintenance conditions is met, the update and maintenance of each client can be carried out.
[0080] Preferably, the following steps are used to judge whether the proportion condition of the newly added composite material damage image samples for a single client is met:
[0081] Accumulate the number of newly added composite material damage image samples of each client during this update and maintenance to obtain the total number of newly added samples of each client during this update and maintenance;
[0082] Calculate the first new proportion of the total number of samples of each client compared with the total number of samples during the last update and maintenance to obtain the first new proportion of each client;
[0083] Judge whether the first new proportion of each client reaches the first new proportion threshold; if the first new proportion of any one client reaches the first new proportion threshold, then the proportion condition of the newly added composite material damage image samples for a single client is met; otherwise, it is not met.
[0084] Specifically, when judging whether to update and maintain each client, the time interval between the current time and the last update and maintenance time may be one preset time period or multiple preset time periods. When judging whether the proportion condition of the newly added composite material damage image samples for a single client is met, the number of newly added composite material damage image samples during this update and maintenance refers to the number of newly added composite material damage images in all preset time periods from the last update and maintenance to the current judgment time point. After accumulation, the total number of newly added samples of each client during this update and maintenance can be obtained.
[0085] Specifically, the setting of the proportion condition of the newly added composite material damage image samples for a single client is used to judge the number of newly added composite material damage image samples of a certain client in a short time. If the number of newly added composite material damage image samples is too large, the accuracy of the recognition model completed in the last update and maintenance will decrease rapidly.
[0086] It is understandable that during each preset time period, updates and maintenance may or may not be performed. Therefore, when determining the number of newly added composite material damage image samples of a certain client in a short period of time, it is necessary to accumulate the number of newly added composite material damage image samples in all preset time periods after the previous update and maintenance to obtain the total number of newly added samples of each client during this update and maintenance, that is, to obtain the total number of newly added composite material damage image samples of a certain client after the previous update and maintenance.
[0087] Specifically, the first new addition ratio is the ratio of the total number of newly added samples during this update and maintenance to the total number of samples during the previous update and maintenance. The first new addition ratio threshold for each client can be set to the same threshold, or can be reasonably set according to the actual situation of each client. For example, if the total number of samples of a certain client during the previous update and maintenance is large, the first new addition ratio of this client can be set smaller; if the total number of samples of a certain client during the previous update and maintenance is small, the first new addition ratio of this client can be set larger.
[0088] Specifically, if the first new addition ratio of any client reaches the first new addition ratio threshold, the condition for the ratio of newly added composite material damage image samples of a single client is met; otherwise, the condition for the ratio of newly added composite material damage image samples of a single client is not met.
[0089] Preferably, as Figure 2 shown, the following steps are used to determine whether the condition for the ratio of newly added composite material damage image samples of all clients is met:
[0090] Accumulate the number of newly added composite material damage image samples of each client during this update and maintenance to obtain the total number of newly added samples of each client during this update and maintenance;
[0091] Accumulate the total number of newly added samples of each client during this update and maintenance to obtain the total number of newly added samples of the central server during this update and maintenance;
[0092] Calculate the second new addition ratio based on the total number of newly added samples of the central server during this update and maintenance and the total number of samples during the previous update and maintenance to obtain the second new addition ratio of the central server; determine whether the second new addition ratio of the central server reaches the second new addition ratio threshold; if the second new addition ratio of the central server reaches the second new addition ratio threshold, the condition for the ratio of newly added composite material damage image samples of all clients is met; otherwise, the condition for the ratio of newly added composite material damage image samples of all clients is not met.
[0093] Specifically, the setting of the proportion condition for the newly added composite material damage image samples of all clients is used to judge the total number of newly added composite material damage image samples of all clients after the last update and maintenance. If it reaches the second new proportion, the proportion condition for the newly added composite material damage image samples of all clients is satisfied.
[0094] Specifically, the second new proportion is the proportion of the total number of newly added samples of the central server during this update and maintenance to the total number of samples during the last update and maintenance. Compare and judge whether the second new proportion of the central server reaches the second new proportion threshold. If it reaches, the proportion condition for the newly added composite material damage image samples of all clients is satisfied; otherwise, it is not satisfied.
[0095] Preferably, as Figure 2 shown, judge whether the update time condition is satisfied through the following steps:
[0096] Judge whether the time update parameter of the last time period reaches the time update parameter threshold; if the time update parameter of the last time period reaches the time update parameter threshold, the update time condition is satisfied, and at the same time, the time update parameter is initialized; otherwise, the update time condition is not satisfied.
[0097] Specifically, the setting of the update time condition is used to determine how long it takes to perform the next update and maintenance, and the time update parameter threshold can be set as appropriate.
[0098] It should be noted that the above three update and maintenance conditions, namely the proportion condition for the newly added composite material damage image samples of a single client, the proportion condition for the newly added composite material damage image samples of all clients, and the update time condition, can be used alone or in combination to improve the accuracy of the recognition model after the update and maintenance.
[0099] Preferably, when it is determined not to perform update and maintenance on each client, the time update parameter of the last time period is updated to obtain the time update parameter of this time period, and at the same time, enter the next time period.
[0100] It can be understood that when the update time condition needs to be used, the time update parameter needs to be updated. If the update and maintenance are not performed, the previous time is continued to be accumulated; if the update and maintenance are performed, it needs to be initialized, such as set to zero.
[0101] Specifically, as Figure 1 shown, when it is necessary to perform update and maintenance on each client, the update and maintenance are carried out through step S31 and step S32. The training samples of each client in step S31 and step S32 refer to the composite material damage image samples after the last update and maintenance and the newly added composite material damage image samples up to this update and maintenance.
[0102] Specifically, as Figure 3 shown, there are a total of P clients, namely the 1st client, the 2nd client... the i-th client... the j-th client... the P-th client. Each client includes training samples and an identification model. The training samples are all the samples of each client during the update and maintenance, including the samples of the previous update and maintenance and the newly added total samples.
[0103] Specifically, when updating and maintaining each client, multiple rounds of training are required, and each round of training passes through steps S31 and S32.
[0104] Specifically, in step S31, each client receives the iteration parameters of the current round from the central server, and locally trains the identification model of the composite material damage image of each client through the training samples of each client and the iteration parameters of the current round. For example, as Figure 3 shown, if the current round is the n-th round, then when each client starts the training of the n-th round, each client receives the iteration parameters of the n-th round from the central server, and each client trains the identification model according to the iteration parameters of the n-th round corresponding to each client and the training samples until the model training is completed, and the parameters of the trained identification model are used as the training iteration parameters of the n-th round.
[0105] It should be noted that the iteration parameters sent by the central server to each client are different and there are differences.
[0106] Preferably, the local training of the identification model according to the iteration parameters of the current round includes:
[0107] When the loss function of the identification model of each client reaches the preset threshold, the training of the current round is completed, and the training iteration parameters of each client in the current round are obtained.
[0108] Specifically, when each client trains the identification model, if the loss function corresponding to this client reaches the preset threshold, at this time, the training of the identification model corresponding to this client in the current round is completed, and the parameters of the identification model completed in the current round of training are used as the training iteration parameters of this client in the current round.
[0109] Preferably, the identification model of each client adopts a convolutional neural network structure, including an input layer, a first convolutional layer, a first pooling layer, a second convolutional layer, a second pooling layer, a fully connected layer, and an output layer connected in sequence.
[0110] Specifically, as Figure 4 shown, the network structures of the identification models of each client are the same, and each includes an input layer, a first convolutional layer, a first pooling layer, a second convolutional layer, a second pooling layer, a fully connected layer, and an output layer connected in sequence.
[0111] Preferably, the iterative parameters include one or more of the following:
[0112] The weight parameters of the first convolutional layer;
[0113] The bias parameters of the first convolutional layer;
[0114] The weight parameters of the first pooling layer;
[0115] The bias parameters of the first pooling layer;
[0116] The weight parameters of the second convolutional layer;
[0117] The bias parameters of the second convolutional layer;
[0118] The weight parameters of the second pooling layer;
[0119] The bias parameters of the second pooling layer
[0120] The weight parameters of the fully connected layer;
[0121] The bias parameters of the fully connected layer.
[0122] Specifically, during the training process, the iterative parameters can be the weight parameters and bias parameters of the first convolutional layer, or the weight parameters and bias parameters of the first pooling layer.
[0123] Specifically, the convolutional kernels of the first convolutional layer, the first pooling layer, the second convolutional layer, the second pooling layer, and the fully connected layer can be 2*2 or 3*3. It can be understood that the weight parameters are the weights of each kernel in the convolutional kernel, and the bias parameters are used to adjust the weight parameters.
[0124] Specifically, in step S32, as Figure 3 shown, the central server determines whether the preset iterative termination condition is satisfied. The preset iterative termination condition can be reaching the preset training round threshold. For example, each time the model is trained, the preset training round threshold is 10 training rounds. When 10 training rounds are reached, the preset iterative termination condition is satisfied.
[0125] At the same time, the preset iterative termination condition can be reaching the preset training time. For example, each time the model is trained, the preset training time is 10 minutes. When 10 minutes are reached, the preset iterative termination condition is satisfied. In the embodiments of the present invention, the iterative termination condition is not limited herein.
[0126] Specifically, in step S32, if the preset iterative termination condition is not satisfied, the central server calculates the next-round iterative parameters for each client and sends them to each client, and each client starts the next-round training. As Figure 3As shown, when the central server determines that the preset iteration termination condition is not met during the n-th round of training, the central server needs to determine the iteration parameters for the (n + 1)-th round of each client and then send them to each client. After each client receives the iteration parameters sent by the central server, it starts the iteration of the next round.
[0127] It should be noted that when each client does not receive the iteration parameters sent by the central server within the preset maximum interval time range, each client terminates the training.
[0128] Specifically, when the central server determines that the preset iteration termination condition is met, preferably, if the preset iteration termination condition is met, the training ends, and each client uses the training iteration parameters of the current round as the final model parameters of its respective client's recognition model.
[0129] It should be noted that only when the central server determines that the preset iteration termination condition is met can the training be completed normally. After the normal training is completed, the central server notifies each client of the training completion message by communicating with each client. After each client receives the training completion message, each client completes the training of its respective recognition model and uses the training iteration parameters of the current round of each client as the final model parameters of its respective client's recognition model.
[0130] Each client can identify its respective data to be identified according to the trained recognition model.
[0131] Preferably, in step S32, the central server determines the iteration parameters for the next round of each client according to the number of training samples of each client, the convolutional kernel moving step, the iteration parameters of the current round, and the training iteration parameters, including:
[0132] Obtain the gradient update of each client according to the iteration parameters of the current round and the training iteration parameters of each client;
[0133] Calculate the similarity between any two clients according to the gradient update of each client, and normalize the similarity between any two clients to obtain the normalized similarity between any two clients;
[0134] Determine the iteration parameters for the next round of the client according to the training iteration parameters of the current round of the client, the convolutional kernel moving step, the number of samples in the training set of the client, the normalized similarity between the client and other clients, and the gradient update of other clients.
[0135] Specifically, after receiving the training iteration parameters of the current round from each client, the central server obtains the gradient update of each client according to the iteration parameters and training iteration parameters of each client in the current round. Specifically, the gradient update of each client is calculated through the following formula:
[0136]
[0137]
[0138] Wherein, represents the k-th training iteration parameter of the j-th client in the n-th round, represents the k-th iteration parameter of the j-th client in the n-th round, represents the k-th iteration parameter of the i-th client in the n-th round, represents the k-th training iteration parameter of the i-th client in the n-th round, represents the gradient update of the k-th training iteration parameter of the i-th client in the n-th round, represents the gradient update of the k-th training iteration parameter of the j-th client in the n-th round.
[0139] Specifically, each client includes a total of Q iteration parameters, and k represents any one of the Q iteration parameters, that is, Q ≥ k ≥ 1.
[0140] Specifically, n represents the training round.
[0141] Specifically, at the n-th round, the iteration parameters sent by the central server to the i-th client are:
[0142]
[0143] At the n-th round, the iteration parameters sent by the central server to the j-th client are:
[0144]
[0145] Then the gradient update of the i-th client is:
[0146]
[0147] The gradient update of the j-th client is:
[0148]
[0149] That is, the gradient update of each client is the gradient update of all iteration parameters of the recognition model of each client, and a total of Q iteration parameters are included.
[0150] Specifically, according to the gradient updates of each client, calculate the similarity between any two clients, and normalize the similarity between any two clients to obtain the normalized similarity between any two clients.
[0151] Preferably, calculate the similarity between any two clients through the following formula:
[0152]
[0153] where represents the gradient update of the k-th training iteration parameter of the i-th client in the n-th round, represents the gradient update of the k-th training iteration parameter of the j-th client in the n-th round, and Q represents the number of iteration parameters.
[0154] Specifically, there are a total of P clients, then P 2 similarities are calculated.
[0155] Preferably, the normalization of the similarity between any two clients to obtain the normalized similarity between any two clients includes:
[0156] Calculate the average value and standard deviation of the similarity between any two clients among all clients through the following formula:
[0157]
[0158]
[0159] where μ represents the average value, δ represents the standard deviation, P represents the number of all clients, and sim i,j represents the similarity between the i-th client and the j-th client;
[0160] Calculate the normalized similarity between any two clients through the following formula:
[0161]
[0162] Preferably, calculate the iteration parameter of the next round of this client through the following formula:
[0163]
[0164] where represents the k-th iteration parameter of the i-th client in the (n + 1)-th round, represents the k-th training iteration parameter of the i-th client in the n-th round, α represents the convolution kernel moving step size of all clients, P represents the number of all clients, and sim′ i,j represents the normalized similarity between the i-th client and the j-th client, |Dj $m_j$ represents the number of training set samples of the $j$-th client, and $|D|$ represents the total number of training set samples of all clients. represents the gradient update of the $k$-th training iteration parameter of the $j$-th client in the $n$-th round.
[0165] Specifically, after the central server calculates the iterative parameters of the next round for any client, it can send the iterative parameters of the next round of that client to the corresponding client, and the corresponding client can then start the next round of training.
[0166] Compared with the prior art, the method for updating and maintaining the recognition model for composite material damage images provided by the embodiments of the present invention uploads the number of newly added composite material damage image samples within the current time period to the central server by each client at preset time intervals, sets the update and maintenance conditions, and updates and maintains the damage image recognition models of each client, making the recognition of the composite material damage image data by the updated and maintained recognition model more accurate; at the same time, by uploading the training iteration parameters obtained after each client completes training to the central server, and updating the iteration parameters of each client through the central server to obtain the iteration parameters of the next round, it enables the training samples of each independent client to improve the accuracy of the recognition model of each client for composite material damage images even without sharing, and protects the privacy of the training samples of each client; moreover, by determining the iteration parameters of the next round of each client based on the number of training samples of each client, the convolutional kernel moving step size, the iteration parameters of the current round, and the training iteration parameters, it fully considers the differences of each client, further improving the recognition accuracy of the recognition model obtained after each client completes training for composite material damage images.
[0167] Those skilled in the art can understand that all or part of the processes for implementing the methods of the above embodiments can be completed by instructing relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. Among them, the computer-readable storage medium is a disk, an optical disc, a read-only memory, or a random access memory, etc.
[0168] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.
Claims
1. A method for updating and maintaining an identification model for composite material damage images, characterized in that The update and maintenance method includes the following: Each client uploads the number of newly added composite material damage image samples within the current time period to the central server at preset time intervals; the central server determines whether to update and maintain each client based on the number of newly added composite material damage image samples of each client in the current time period; When it is determined to update and maintain each client, the recognition model of each client is updated and maintained through the following steps: Each client receives the iteration parameters of the current round from the central server, locally trains its own recognition model based on the iteration parameters of the current round, all newly added composite material damage image samples of all clients, and the original composite material damage images. After the training is completed, the training iteration parameters of each client in the current round are obtained, and the training iteration parameters of the current round are uploaded to the central server; The central server determines whether the preset iteration termination condition is met; if not, the central server determines the iteration parameters of the next round for each client based on the number of training samples, the convolution kernel moving step size, the iteration parameters of the current round, and the training iteration parameters of each client, and sends them to each client, and each client starts the training of the next round; the iteration parameters of each client are different.
2. The update and maintenance method according to claim 1, characterized in that The central server determines whether to update and maintain each client based on the number of newly added composite material damage image samples of each client in the current time period, including: Determine whether at least one of the following update and maintenance conditions is met. If so, update and maintain each client; otherwise, enter the next time period: The condition of the proportion of newly added composite material damage image samples of a single client; The condition of the proportion of newly added composite material damage image samples of all clients; The update time condition.
3. The update and maintenance method according to claim 2, characterized in that Determine whether the condition of the proportion of newly added composite material damage image samples of a single client is met through the following steps: Accumulate the number of newly added composite material damage image samples of each client during the current update and maintenance to obtain the total number of newly added samples of each client during the current update and maintenance; Calculate the first new proportion of each client compared with the total number of samples at the last update and maintenance to obtain the first new proportion of each client; Determine whether the first new proportion of each client reaches the first new proportion threshold; if the first new proportion of any one client reaches the first new proportion threshold, the condition of the proportion of newly added composite material damage image samples of a single client is met; otherwise, the condition of the proportion of newly added composite material damage image samples of a single client is not met.
4. The update and maintenance method according to claim 2, wherein Determine whether the condition of the proportion of newly added composite material damage image samples of all clients is met through the following steps: Accumulate the number of newly added composite material damage image samples of each client during the current update and maintenance to obtain the total number of newly added samples of each client during the current update and maintenance; Accumulate the total number of newly added samples of each client during the current update and maintenance to obtain the total number of newly added samples of the central server during the current update and maintenance; Calculate the second new addition ratio based on the total number of new samples in the central server during this update and maintenance and the total number of samples in the central server during the previous update and maintenance, to obtain the second new addition ratio of the central server; determine whether the second new addition ratio of the central server reaches the second new addition ratio threshold; if the second new addition ratio of the central server reaches the second new addition ratio threshold, then the conditions for the new addition ratio of composite material damage image samples of all clients are met; otherwise, the conditions for the new addition ratio of composite material damage image samples of all clients are not met.
5. The update and maintenance method according to claim 2, characterized in that Judge whether the update time condition is met through the following steps: Judge whether the time update parameter in the previous time period reaches the time update parameter threshold; if the time update parameter in the previous time period reaches the time update parameter threshold, then the update time condition is met, and at the same time, initialize the time update parameter; otherwise, the update time condition is not met.
6. The update and maintenance method according to claim 5, wherein When it is determined not to perform update and maintenance on each client, update the time update parameter in the previous time period to obtain the time update parameter in the current time period, and at the same time enter the next time period.
7. The update and maintenance method according to claim 1, characterized in that The central server determines the iteration parameter of the next round of each client according to the training sample quantity of each client, the convolutional kernel moving step size, the iteration parameter of the current round, and the training iteration parameter, including: Obtain the gradient update of each client according to the iteration parameter of the current round and the training iteration parameter of each client; Calculate the similarity between any two clients according to the gradient update of each client, and normalize the similarity between any two clients to obtain the normalized similarity between any two clients; Determine the iteration parameter of the next round of this client according to the training iteration parameter of the current round, the convolutional kernel moving step size, the number of samples in the training set of this client, the normalized similarity between this client and other clients, and the gradient update of other clients.
8. The update and maintenance method according to claim 7, wherein Calculate the iteration parameter of the next round of this client through the following formula: Among them, represents the k-th iteration parameter of the (n + 1)-th round of the i-th client, represents the k-th training iteration parameter of the n-th round of the i-th client, α represents the convolution kernel moving step size of all clients, P represents the number of all clients, sim′ i,j represents the normalized similarity between the i-th client and the j-th client, |D j | represents the number of training set samples of the j-th client, |D| represents the total number of training set samples of all clients, represents the gradient update of the k-th training iteration parameter of the n-th round of the j-th client.
9. The update and maintenance method according to claim 8, wherein The normalization of the similarity between any two clients to obtain the normalized similarity between any two clients includes: Calculate the average value and standard deviation of the similarity between any two clients among all clients through the following formula: Among them, μ represents the average value, δ represents the standard deviation, P represents the number of all clients, and sim i,j represents the similarity between the i-th client and the j-th client; Calculate the normalized similarity between any two clients through the following formula:
10. The update and maintenance method according to claim 9, wherein Calculate the similarity between any two clients through the following formula: Among them, represents the gradient update of the k-th training iteration parameter in the n-th round of the i-th client, represents the gradient update of the k-th training iteration parameter in the n-th round of the j-th client, and Q represents the number of iteration parameters; Calculate the gradient update of each client through the following formula: Among them, represents the k-th training iteration parameter of the j-th client in the n-th round, represents the k-th iteration parameter of the j-th client in the n-th round, represents the k-th iteration parameter of the i-th client in the n-th round.