An edge-computing-based privacy-protected image recognition method

By leveraging edge computing and privacy protection mechanisms, edge devices can train image recognition models in real time. Combined with cloud server-enhanced training, this solves the problems of immediacy and privacy protection in image recognition systems, achieving efficient, accurate image recognition and privacy security.

CN115661583BActive Publication Date: 2025-12-05NANJING UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211438780.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-17
Publication Date
2025-12-05
Estimated Expiration
2042-11-17

AI Technical Summary

Technical Problem

In existing technologies, image recognition systems suffer from slow model update speed, excessive resource consumption, and insufficient privacy protection, especially in terms of immediacy and privacy protection, which are difficult to meet modern needs.

Method used

A privacy-preserving image recognition method based on edge computing is adopted. The image recognition model is trained in real time through edge devices and periodically enhanced by cloud servers. By combining gradient descent and differential privacy mechanisms, the model can be updated in real time and privacy is protected.

Benefits of technology

It improves the immediacy and accuracy of image recognition, reduces resource consumption, and comprehensively protects user privacy, adapting to the privacy protection needs of the information age.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115661583B_ABST
    Figure CN115661583B_ABST
Patent Text Reader

Abstract

The application discloses a privacy protection image recognition method based on edge computing and belongs to the fields of image recognition, privacy protection and edge computing. The application improves the image recognition accuracy by using edge intelligent devices under the premise of protecting privacy and can improve the training efficiency of a cloud server by using edge devices. First, the edge intelligent devices respectively train by using own image data and respectively obtain models with the same structure as teacher models. Then, the cloud server randomly selects training samples from a training set at each iteration, calculates gradients and adds differential privacy noise, constructs a candidate pool and sends the candidate pool to the edge devices. Then, each edge device votes for the candidate samples in the candidate pool, selects the sample that makes the convergence fastest and adds differential privacy noise to the vector obtained by voting. The cloud server counts the training sample with the most votes in the candidate pool and updates the central model by using the sample in the iteration. The model of the cloud server is released to the edge devices for image recognition.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to a novel edge computing-based privacy protection image recognition method and belongs to the technical fields of image recognition, privacy protection and edge computing. BACKGROUND

[0002] With the development of the Internet and cloud service technology since the 21st century, various smart devices connected to the cloud, such as smart phones, smart televisions, smart refrigerators and the like, have also shown explosive growth. As a service provider, how to make good use of the image information collected on various smart devices in the big data era has become a key problem.

[0003] With the development of artificial intelligence, processing these images through machine learning algorithms and learning image recognition models have become common image data processing methods. However, the existing methods generally periodically collect images collected on various smart devices and upload them to the cloud; then learn models offline on the cloud server and update the models online afterwards.

[0004] At present, the main method used by the operators of intelligent services is centralized, and a large amount of corresponding image data is collected according to specific needs, such as face recognition, license plate recognition and the like. For example, the public security system collects a large number of face images from various public place cameras and mobile phone cameras; and the automatic driving car company collects a large number of road sign pictures. Then, the image recognition model is learned according to the specific image recognition task offline, and when there is an image recognition request task, the corresponding image recognition model is called to perform image recognition and returned to the user. For example, when paying by face recognition, the mobile phone sends a request and a face image to the service provider, requiring face recognition, the service provider calls the previously learned model and performs model inference after receiving the request, and returns the result to the mobile phone.

[0005] However, with the development of the times, this traditional centralized offline training and online inference data processing method has three shortcomings:

[0006] 1) Periodic model updating, slow updating speed, difficult to use instant collected image data, and insufficient instantaneity of the model. For example, if a new product is encountered in an image recognition system for automatically identifying product categories, it is likely that the new product cannot be recognized until the next model update.

[0007] 2) With the continuous increase of data volume, training on the cloud server will cause the load of the cloud server to grow day by day, and the resource consumption on the cloud is too huge.

[0008] 3) Traditional processes lack privacy protection for user data. Especially in the field of image recognition, the images, videos and other data collected by edge devices often contain highly sensitive data such as facial images, private life and work places. At the same time, privacy protection is increasingly attracting people's attention. On May 25, 2018, the European Union introduced the General Data Protection Regulation (GDPR) and officially came into effect, establishing relevant privacy regulations in the digital age to ensure that institutions protect the personal data of their users. How to protect the privacy of user data while using user data sets has become a crucial problem that has attracted great attention in the artificial intelligence and privacy protection community.

[0009] Therefore, how image recognition systems can use as few resources as possible to learn models in real time and efficiently while protecting user privacy has become an important problem.

[0010] Related knowledge:

[0011] Image recognition based on convolutional neural networks: Image recognition is a technology that uses computers to process, analyze and understand images to recognize various patterns of targets and objects, and is a practical application of deep learning algorithms. At present, image recognition technology is generally divided into face recognition and commodity recognition. Face recognition is mainly used in security checks, identity verification and mobile payments; commodity recognition is mainly used in commodity circulation, especially in unmanned shelves, intelligent retail cabinets and other unmanned retail fields.

[0012] The traditional recognition process of images consists of four steps: image acquisition, image preprocessing, feature extraction, and image recognition. The representative image recognition software abroad is Konica Minolta, etc., and the representative at home is Gu Intelligent, Haishen Technology, etc.

[0013] Image recognition based on convolutional neural networks is an important application in the field of image recognition. It uses image feature value extraction, recognition and convolution algorithms to recognize and analyze different images. The rapid development of artificial intelligence has made machine learning increasingly important in its research field. Algorithms are used to learn each piece of data and predict the results. This has become an important key to opening the door to artificial intelligence.

[0014] Many image recognition algorithms based on convolutional neural networks have been proposed. For example, VGG; Lenet-5 model, ResNet-50, etc.

[0015] Edge Learning: Edge machine learning is a machine learning algorithm technique that allows smart devices to use local servers or process data at the device level locally. “Edge” refers to the processing that deep learning or machine learning algorithms perform at the device or local level. Edge computing can reduce dependence on the cloud, and the ability to process some or most of the data locally allows smart devices to selectively send data to the cloud. Edge learning also makes real-time data processing and response possible.

[0016] Edge learning generally employs deep learning and machine learning algorithms that can process data locally depending on the application. Unlike traditional data processing machines, devices using edge learning can process incoming data at the source. It then determines which data needs to be processed by more powerful algorithms in the cloud and which data can be processed locally.

[0017] Take Amazon Echo as an example. When a user asks Alexa to tell a joke or play a game, the data is processed locally on the device and does not need to be processed in the cloud. This is because jokes or games are stored locally on the device. Using the device to execute the command alone does not clog the cloud network. However, when asking Alexa for a weather report, the device will look for the required data from an external source in the cloud.

[0018] With edge machine learning, we can also process large amounts of data in real time, which is currently not possible for traditional cloud-driven devices. However, real-time data processing is critical for applications such as medical devices and self-driving cars. Because edge devices decentralize data storage, edge learning greatly relieves the pressure on the cloud and also reduces the likelihood of being attacked by a DDOS attack.

[0019] Since data is processed locally in algorithms stored on hardware devices, system response time also improves with edge machine learning. In addition to improving response time and security vulnerabilities related to the cloud, edge machine learning also addresses issues such as resource limitations, computing power, and memory.

[0020] Differential Privacy: Privacy protection in data analysis spans multiple disciplines and has a long history. Now, with the development of technology, the collection of personal information data has become increasingly detailed and easy. The field of privacy protection needs a more robust definition of privacy protection expressed mathematically. Differential privacy is such a definition.

[0021] Differential privacy is a privacy definition tailored to privacy-protecting data analysis problems. Differential privacy describes the commitment of data holders to users: “Users will not be adversely or otherwise affected by their permission to use data for research or analysis.”

[0022] Differential privacy is defined as follows: for a domain and range of D, ... n and R p The random mechanism M:D n →Rp, if for any adjacent databases d,d′∈D n and any subset of the range If Pr[M(d)∈S]≤exp(ε)Pr[M(d′)∈S]+δ, then the random mechanism M is said to satisfy (ε,δ)-differential privacy.

[0023] In theory, any random mechanism that satisfies the definition of differential privacy can be used as a differential privacy mechanism. Many differential privacy mechanisms have already been proposed and applied in real-world privacy protection, such as Gaussian mechanisms, Laplace mechanisms, and random responses.

[0024] Gradient descent algorithm:

[0025] Gradient descent (GD) is a method for solving optimization problems. It is a general term for a class of methods that can be used to solve optimization problems in machine learning.

[0026] In machine learning algorithms, it is sometimes necessary to construct a loss function for the model and then optimize the loss function using optimization algorithms to find the optimal parameters that minimize the value of the loss function. Among the optimization algorithms for solving machine learning parameters, gradient descent-based optimization algorithms are frequently used.

[0027] Gradient descent does not find the minimum value through direct computation, but rather uses an iterative algorithm to approximate the solution to the optimization problem. The gradient descent algorithm iterates multiple times. Taking finding the minimum value of a function f(x) as an example, in each step the current value is 'a' and the next value is 'b', and the following formula is used to calculate the minimum: in Let f(x) be the gradient of the function f(x) at a, and η be the step size of this iteration.

[0028] For differentiable optimization problems, gradient descent can provide a fast and efficient solution. There are many improved versions of gradient descent, such as stochastic gradient descent and batch gradient descent. Gradient descent is currently the most popular optimization strategy in machine learning and deep learning. It is used to train data models, can be combined with various algorithms, and is easy to understand and implement.

[0029] Iterative Machine Learning:

[0030] Machine teaching is the inverse problem of machine learning. Machine teaching aims to find the best training set for a student model based on a teacher model. Machine teaching is the problem of constructing the best (usually the smallest) dataset according to the goal so that the student model can learn the goal concept based on the dataset. In recent years, machine teaching has gained a lot of attention due to its possible applications in human-computer interaction, education and security.

[0031] Unlike stochastic gradient descent, the stochastic gradient descent method randomly samples an example (or a small batch of samples) to update the weights in each iteration, while iterative machine teaching selects samples by solving the following optimization problem:

[0032]

[0033] where denotes the learning difficulty of a sample, and measures the utility of the sample. In each iteration, the teacher tries to select a sample with small difficulty and utility; and can use the learning rate as a parameter to trade off the two objectives. SUMMARY

[0034] The present application provides a privacy protection image recognition method based on edge computing to solve the problems and deficiencies in the prior art.

[0035] Technical scheme: A privacy protection image recognition method based on edge computing, the method needs n edge devices {A1, A2, …, A n (edge devices with smart cameras can collect images, such as smart phones, drones, etc.), and a cloud server C cooperates to implement. Each edge device has an instant image data set D i , and the cloud server has a large-scale offline image data set D c . Each edge device A i receives a center model from the cloud server side, and instantaneously trains an image recognition model M i based on this, the model parameters of which are denoted as w i , as a teacher model. The trained model on the edge device can be directly used for image recognition on the edge device, which can respond to changes more instantaneously. The cloud server has a center model M c , the parameters of which are denoted as w cThe central model uses the models from all edge devices as teacher models, periodically training a model with stronger generalization capabilities. Once trained, the central model is sent to the edge devices, which then switch to the new model for image recognition. All edge devices use the same machine learning models, parameters, and structures as the cloud server—convolutional neural network image recognition models. Edge devices need to have the ability to train their own models; each edge device first uses its own available data (D). i Train a model M yourself i The cloud server, in each iteration, retrieves data from dataset D. c A candidate pool of size L is constructed in the middle; then, each edge device selects the best candidate data in a privacy-preserving manner, and the cloud server uses this data to update model M. c The cloud server then redeploys the updated central model to edge devices for image recognition.

[0036] The method mainly includes the following steps:

[0037] Step 1.1, n edge devices {A1, A2, ..., A n Obtain the initial model from the cloud server and utilize your own image dataset D. i For 1≤i≤n, the teacher model {M1,M2,…,M} is trained incrementally using gradient descent. n The parameters of the model are {w1, w2, ..., w}. n};

[0038] Step 1.2: Initialize the training model M on cloud server C. c Let its parameters The value is 0, the iteration count t is 1; the total number of iterations is T, the candidate pool size is L, and the batch size is B;

[0039] Step 1.3: Cloud server C performs privacy-preserving iterative training; the training model parameters are updated in each round of training. In round t, the model parameters are... Updated to After each iteration, increment the iteration number t by one.

[0040] Step 1.4: Cloud server C determines whether the number of iterations is greater than the total number of iteration rounds T. If not, return to step 1.3; otherwise, proceed to step 1.5.

[0041] Step 1.5: Cloud server C completes training, obtaining model M. c Its model parameters are

[0042] Step 1.6, cloud server C sends M c To edge devices, model Mc for image recognition;

[0043] Step 1.7, the process ends.

[0044] The teacher model {M1, M2, …, Mn} in the n edge devices is trained by gradient descent method, and the model structure is the same as that of the cloud server. n} is trained by gradient descent method, and the model structure is the same as that of the cloud server.

[0045] The privacy protection iteration training in each round selects the optimal update gradient according to the edge teacher model in each round, and updates the training model, which specifically includes the following steps:

[0046] Step 2.1, the cloud server C constructs a candidate pool with a size of L from the offline image data set D c ;

[0047] Step 2.2, the cloud server C adds privacy protection to the candidate pool to obtain a privacy-protected candidate pool

[0048] Step 2.3, the cloud server C sends the candidate pool to each edge device;

[0049] Step 2.4, each edge device selects the optimal gradient from the candidate pool using its own teacher model, and represents the selected optimal gradient in the form of one-hot encoding as

[0050] Step 2.5, each edge device adds privacy protection to the one-hot encoding to obtain a privacy-protected one-hot encoding

[0051] Step 2.6, each edge device sends the privacy-protected one-hot encoding to the cloud server C;

[0052] Step 2.7, the cloud server C calculates the optimal gradient using the one-hot encoding sent by the edge device

[0053] Step 2.8, the cloud server C updates the training model parameters using the optimal gradient from w t-1 to w t .

[0054] The cloud server C constructs a candidate pool with a size of L from the offline image data set D c ; A new candidate pool is reconstructed in each iteration For each batch in the candidate pool, the size of which is B, a total of L batches with the size of B are constructed for the candidate pool Comprises the following steps:

[0055] Step 3.1, the cloud server C randomly extracts B samples from the offline image dataset D for each batch, and a total of L batches are obtained

[0056] Step 3.2, the cloud server C uses the gradient descent method to calculate the gradient of each batch respectively, that is, to calculate The gradient of the loss function l on the parameter w . t-1

[0057] Step 3.3, the cloud server C regularizes the gradient and adds a differential privacy mechanism, that is, adds Gaussian noise, which plays a role in protecting user data privacy; The specific formula is: is the gradient value calculated in the last step without privacy protection, C is a pre-defined threshold parameter for standardization scaling; For After standardization, Gaussian noise with variance is added to each dimension to obtain the privacy-protected gradient

[0058] Step 3.4, the cloud server C obtains L privacy-protected gradients, and the candidate pool is constructed.

[0059] Each edge device selects the optimal gradient from the candidate pool using its own teacher model, and in each iteration, the cloud server C obtains the optimal update gradient of the candidate pool returned by the edge device through one-hot encoding, which is used to update the parameters of the training model; Each edge device A i selects the optimal gradient as follows:

[0060] Step 4.1, the edge device A i calculates for each gradient in the candidate pool u i,j is used to measure the convergence speed of the candidate gradient on the center model, the smaller u i,j , the faster the convergence speed, and the better the corresponding candidate set, and η t is the learning rate of the t-th iteration;

[0061] Step 4.2, the edge device A​​i find u i,j the smallest, optimal gradient in the pool of candidates the label of

[0062] Step 4.3, edge device A i get one-hot encoding where vector has j components, only the i-th component is 1, and the rest are 0;

[0063] Step 4.4, all edge devices {A i} aggregate one-hot encoding get the overall voting result where is the number of teacher models that have selected the i-th candidate gradient. Then add Gaussian noise with variance t to get the privacy-protected voting result

[0064] the label of the optimal gradient obtained by the final cloud server is the optimal gradient is

[0065] the training model parameters are updated using the optimal gradient update the training model parameters using the gradient descent method to update the parameters of the training model

[0066] S1, S2 are parameters for controlling the strength of privacy protection, the greater the better the privacy protection effect.

[0067] The image recognition model trained by the cloud server can be sent to the edge device and used for image recognition tasks on the edge device.

[0068] A computer device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor executes the above-mentioned computer program to realize the privacy protection image recognition method based on edge computing as described above.

[0069] A computer readable storage medium stores a computer program for executing the privacy protection image recognition method based on edge computing as described above.

[0070] Advantages: Compared with the prior art, the efficient privacy edge machine learning method has the following advantages:

[0071] ​​​1) proposed a novel way to carry out privacy edge learning, the invention can be applied to any gradient descent learning framework, has wide application prospect.

[0072] 2) the method can utilize the image data collected by the edge device in real time, enhance the effect of cloud server model training, so that the precision is improved compared with traditional machine learning method.

[0073] 3) the method reduces the noise generated by the privacy protection mechanism, and the obtained model has higher accuracy, and the image recognition is more accurate. Compared with the traditional privacy protection machine learning method, the problem of large noise in the traditional privacy protection model is improved, and the model noise is smaller.

[0074] 4) at the same time, the privacy and security of image data on the edge device and cloud server are protected, the privacy protection is very comprehensive, and there is no omission in any aspect. With the increasing importance of privacy security, the invention can better adapt to the privacy protection demand of information age.

[0075] 5) reduce the load demand, can more reasonable use the computing resources of edge device. BRIEF DESCRIPTION OF DRAWINGS

[0076] Figure 1 is the edge device and cloud server connection schematic diagram described in the embodiment of the invention;

[0077] Figure 2 is the data transmission schematic diagram between the edge device and the cloud server in each round of training described in the embodiment of the invention;

[0078] Figure 3 is the flow chart of cloud server iterative training;

[0079] Figure 4 is the specific training flow chart in each iteration of cloud server;

[0080] Figure 5 is the flow chart of cloud server constructing privacy protection candidate pool;

[0081] Figure 6 is the flow chart of edge device selecting optimal gradient. DETAILED DESCRIPTION

[0082] The invention will be further illustrated below in conjunction with specific embodiments, and it should be understood that these embodiments are only used to illustrate the invention and not to limit the scope of the invention, and after reading the invention, those skilled in the art can modify various equivalent forms of the invention, which all fall within the scope defined by the claims attached to the present application.

[0083] The application provides a novel privacy protection image recognition method based on edge computing; based on edge computing, more accurate models can be trained by privacy-protected use of images collected by edge devices in real time, thereby improving the accuracy of image recognition while protecting the privacy and security of users.

[0084] Figure 1 It is a schematic diagram of the edge device and the cloud server connection described in the application. The application includes edge devices 1, 2, 3,..., n, and a cloud server C. The edge devices and the cloud server are connected through the Internet and can transmit data between each other.

[0085] Figure 2 It is a schematic diagram of data transmission between the edge device and the cloud server in each round of training described in the application. The cloud server C sends the gradient candidate pool after privacy protection to the edge devices 1, 2, 3,..., n; the edge devices select the optimal gradient and represent it as a one-hot encoding, add differential privacy to obtain privacy-protected voting and send it to the cloud server.

[0086] Figure 3 It is a flowchart of iterative training of the cloud server; the cloud server is trained by T iterations to obtain a central model; it mainly includes the following steps

[0087] Step 1.1, the n edge devices {A1, A2,..., An} first obtain an initial model from the cloud server and use the existing data set D n collected in real time to train the teacher model {M1, M2,..., Mn} using the gradient descent method, and the parameters of the model are {w1, w2,..., wn}. i n n

[0088] Step 1.2, the cloud server C initializes the training model M c , sets the parameter to 0, and the iteration number t to 1; sets the total iteration number to T, the candidate pool size to L, and the batch size to B.

[0089] Step 1.3, the cloud server C performs privacy-protected iterative training; in each round of training, the training model parameters are updated, and in the tth round, the model parameters are updated to After each iteration, the iteration number t is increased by one.

[0090] Step 1.4, the cloud server C judges whether the iteration number is greater than the total iteration number T, if not, returns to step 1.3, if yes, enters step 1.5.

[0091] ​​​Step 1.5, cloud server C training is completed, get model M c The model parameters are

[0092] Step 1.6, cloud server C sends the model to the edge device for image recognition.

[0093] Step 1.7, the process is over.

[0094] Figure 4 is the specific training flowchart of cloud server in each round of iteration; the cloud server sends the privacy-protected gradient candidate pool to the edge device, which uses its own teacher model to vote after receiving it, and sends the privacy-protected voting result to the cloud server; the cloud server selects the optimal gradient after aggregating the voting results, and updates the model with it; the specific steps are as follows:

[0095] Step 2.1, cloud server C constructs a candidate pool with size L from user data set D c .

[0096] Step 2.2, cloud server C adds privacy protection to the candidate pool, and gets the privacy-protected candidate pool

[0097] Step 2.3, cloud server C sends the candidate pool to each edge device.

[0098] Step 2.4, each edge device uses its own teacher model to select the optimal gradient from the candidate pool , and represents the selected optimal gradient in the form of one-hot encoding as

[0099] Step 2.5, edge device aggregates one-hot encoding , adds privacy protection, and gets privacy-protected voting result

[0100] Step 2.6, edge device sends the privacy-protected voting result to the cloud server.

[0101] Step 2.7, cloud server C uses the voting result sent by the edge device to get the optimal gradient

[0102] Step 2.8, cloud server C updates the training model parameters with the optimal gradient , from w t-1 to w t .

[0103] Figure 5is a flow chart of cloud server constructing privacy-protected gradient candidate pool; cloud server needs to construct privacy-protected candidate pool in each iteration, and then send it to all edge devices; privacy protection is added to prevent privacy leakage to edge devices; the specific steps include:

[0104] Step 3.1, cloud server C randomly extracts B samples from the user data set D for each batch, and a total of L

[0105] Step 3.2, cloud server C calculates the gradient of each batch, i.e. calculates

[0106] Step 3.3, cloud server C regularizes the gradient and adds differential privacy mechanism, i.e. adds Gaussian noise, which plays a role in protecting user data privacy; specifically, calculate

[0107] Step 3.4, cloud server C gets L privacy-protected gradients, candidate pool is constructed.

[0108] Figure 6 is a flow chart of edge device selecting the optimal gradient; edge device uses its own model as a teacher model to select the optimal gradient in the candidate pool, and represents the vote as a one-hot vector; then add randomization response processing to protect privacy, and then send it to the cloud server; the specific steps are as follows:

[0109] Step 4.1, edge device A i calculates for each gradient in the candidate pool

[0110] Step 4.2, edge device A i finds the minimum in u i,j , and the optimal gradient is labeled as in the candidate pool

[0111] Step 4.3, edge device A i gets one-hot encoding where the vector has j components, and only the component is 1 and the rest are 0.

[0112] Step 4.4, edge device A i summarizes the voting results and adds privacy protection.

[0113] In summary, the application provides a privacy protection image recognition method based on edge computing, which can be applied to the fields of face recognition, computer vision, etc. For example, smart devices such as mobile phones, smart cameras, smart cars, etc. that can collect images can use the collected images to locally train a teacher model, and the cloud server can use the teacher model of the edge device to participate in the training of the model on the cloud, thereby improving the accuracy of the model and the speed of model training. At the same time, the cloud server and the edge device will not leak each other's privacy, and the data transmitted by both parties has been processed for privacy protection. With the popularization of smart devices, the method of using edge devices to improve cloud service machine learning has the characteristics of high efficiency, high accuracy, flexible structure, etc. At the same time, the privacy of both parties is well protected, so the technology has high popularization value.

[0114] Obviously, those skilled in the art should understand that the above-mentioned embodiments of the application, privacy protection image recognition method based on edge computing, each step can be realized by a general computing device, which can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be realized by program codes executable by a computing device, so that they can be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described can be executed in an order different from that shown here, or they can be made into individual integrated circuit modules, or multiple modules or steps among them can be made into a single integrated circuit module to realize. Thus, the embodiments of the application are not limited to any particular combination of hardware and software.

Claims

1. An edge-computing-based privacy-protected image recognition method, characterized in that, Comprising the following steps: Step 1.1, n edge devices {A1, A2, …, An} obtain an initial model from the cloud server, and use the image data set D n owned by themselves to incrementally train the teacher model {M1, M2, …, Mn} in real time using the gradient descent method, and the parameters of the model are {w1, w2, …, wn} i . n n ;​ Step 1.2, the cloud server c initializes the training model m c , let its parameters be 0, and the iteration number t be 1; Set the total iteration round number T, the candidate pool size L, and the batch size B; Step 1.3, the cloud server c performs privacy-protected iterative training; in each round of training, the training model parameters are updated, and in the t-th round, the model parameters are updated to After each round of iteration, the iteration number t is increased by one. Step 1.4, the cloud server c judges whether the iteration number is greater than the total iteration round number T, if not, return to step 1.3, if yes, go to step 1.5; Step 1.5, cloud server c training is completed, and a model M is obtained c The model parameters of which are Step 1.6, cloud server C sends model N c to edge device for image recognition; Step 1.7, the process ends; Each edge device A i Receives a center model from a cloud server end, and on this basis, instantaneously incrementally trains an image recognition model M i , whose model parameters are denoted as w i , as a teacher model; Each round of privacy protection iteration training selects the optimal update gradient according to the edge teacher model in each round, and updates the training model, comprising the following steps: Step 2.1, cloud server C constructs a pool of candidates of size L from the offline image dataset D c ; Step 2.2, cloud server w adds privacy protection to the candidate pool, obtaining a privacy-protected candidate pool Step 2.3, the cloud server C sends the candidate pool to each edge device; Step 2.

4. Each edge device selects the optimal gradient from the candidate pool using its own teacher model and represents the selected optimal gradient in the form of one-hot encoding ​ Step 2.5 Each edge device encodes the one-hot Add privacy protection to get privacy-protected one-hot encoding Step 2.6 Each edge device sends privacy-protected one-hot encoding to the cloud server C; Step 2.

7. Cloud server C uses the one-hot encoding sent by the edge device The optimal gradient is calculated Step 2.8, cloud server C updates with optimal gradient Update training model parameters from w t-1 Update to w t . 2.The edge computing based privacy-preserving image recognition method of claim 1, wherein, The cloud server C builds a candidate pool of size L from the offline image dataset D c The cloud server C builds a candidate pool of size L from the offline image dataset D A new candidate pool is rebuilt in each iteration For each batch of size B in the candidate pool, L batches of size B are needed to build the candidate pool Cloud server C constructs a privacy-protected candidate pool comprising the steps of: Step 3.1 Cloud server C randomly draws B samples from the offline image dataset D for each batch, resulting in L batches in total Step 3.2, the cloud server C uses gradient descent method to calculate the gradient of each batch, i.e. to calculate In the loss function on the parameters w t-1 gradient; Step 3.3: Cloud server C performs gradient regularization and adds a differential privacy mechanism, i.e., adds Gaussian noise, to protect user data privacy; the specific formula is: This is the gradient value calculated in the previous step without privacy protection, where C is a predefined threshold parameter used for standardization and scaling; for pass After standardization, the variance is then added to each dimension. Gaussian noise Gradient after privacy protection Step 3.4, cloud server C gets L privacy-protected gradients, candidate pool Construction is complete. 3.The edge computing based privacy-preserving image recognition method of claim 1, wherein, Each edge device selects the optimal gradient from the candidate pool using its own teacher model In each iteration, the cloud server C gets the optimal update gradient of the candidate pool through the one-hot encoding returned by the edge device to update the parameters of the training model; each edge device A i The optimal gradient selection process is as follows: Step 4.1, Edge Device A i For candidate pool Each gradient in calculate u i,j η is used to measure the convergence speed of candidate gradients on the central model. t It is the learning rate for the t-th iteration; Step 4.2, edge device A i Find u i,j The optimal gradient in the pool of candidates is the one with the smallest The label for Step 4.3, Edge Device A i Get one-hot encoding where vector has j components, only the component is 1, the rest are 0; Step 4.4, all edge devices {A i} aggregate one-hot encoding Get the overall voting result Where is the number of teacher models that selected the i-th candidate gradient; then give the pair n t Add Gaussian noise with variance Get the privacy-protected voting result ​ The final cloud server gets the label of the optimal gradient The optimal gradient is 4.The edge computing based privacy-preserving image recognition method of claim 1, wherein, using optimal gradient updating training model parameters, updating parameters of the training model using gradient descent 5. A computer device, characterized by: The computer device comprises a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor executes the computer program to implement the edge computing-based privacy protection image recognition method according to any one of claims 1-4.

6. A computer-readable storage medium, characterized in that: The computer readable storage medium stores a computer program for executing the edge computing-based privacy protection image recognition method according to any one of claims 1-4.

Citation Information

Patent Citations

  • Privacy protection method for knowledge migration in distributed machine learning

    CN114254380A