WO2021179720A1 - 基于联邦学习的用户数据分类方法、装置、设备及介质 - Google Patents

基于联邦学习的用户数据分类方法、装置、设备及介质 Download PDF

Info

Publication number
WO2021179720A1
WO2021179720A1 PCT/CN2020/135588 CN2020135588W WO2021179720A1 WO 2021179720 A1 WO2021179720 A1 WO 2021179720A1 CN 2020135588 W CN2020135588 W CN 2020135588W WO 2021179720 A1 WO2021179720 A1 WO 2021179720A1
Authority
WO
WIPO (PCT)
Prior art keywords
channel
local model
matrix
weight
gradient matrix
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2020/135588
Other languages
English (en)
French (fr)
Inventor
王健宗
肖京
何安珣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Publication of WO2021179720A1 publication Critical patent/WO2021179720A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • G06F16/285Clustering or classification
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning

Definitions

  • This application relates to the field of information security technology, and in particular to a method, device, equipment and medium for user data classification based on federated learning.
  • the current user data classification method based on federated learning is: the model to be trained is delivered to multiple working nodes through the server node, and each working node trains the received model to be trained based on the data it owns, and then uses the trained model
  • the parameters are transmitted back to the server node, and the server node updates the training model according to the received model parameters of each working node, and then repeats the above process until the training model meets the preset performance indicators, and then passes the training model that meets the preset performance indicators Classify user data.
  • the training data is shared with the central server that performs the analysis, and the user who provides the data cannot control it, so there is a risk of user data leakage. There is an urgent need for a method that can protect user privacy data when classifying user data.
  • the purpose of the embodiments of the present application is to propose a user data classification method based on federated learning, which improves the security of user private data when user data classification is performed.
  • an embodiment of the present application provides a user data classification method based on federated learning, including:
  • the channel corresponds to a gradient matrix generated by processing the training data
  • an embodiment of the present application provides a user data classification device based on federated learning, including:
  • a gradient matrix acquisition module configured to acquire training data, train a local model through the training data, and generate a gradient matrix based on the change gradient of the weight matrix of the local model during each training cycle;
  • a calculation result obtaining module configured to calculate the Euclidean norm of the channel of the gradient matrix, obtain the calculation result, and save the calculation result in the form of a tensor
  • the gradient matrix update module is used to use the preset upload rate as the channel selection threshold, from the calculation result, select the channel that meets the channel selection threshold as the target channel, and compare the gradient in the target channel A matrix as a target gradient matrix, where the channel corresponds to a gradient matrix generated by processing the training data;
  • the weight module of the server is used to select the target gradient matrix with a non-zero parameter as the weight of the server;
  • the local module update module is used to update the local model according to the weight of the server to obtain the updated local model
  • the user data classification module is used to classify user data based on the updated local model.
  • an embodiment of the present application further provides a computer device, including a memory and a processor, the memory stores computer-readable instructions, and the processor implements the following steps when executing the computer-readable instructions:
  • the channel corresponds to a gradient matrix generated by processing the training data
  • embodiments of the present application also provide a computer-readable storage medium, the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions implement the following steps when executed by a processor:
  • the channel corresponds to a gradient matrix generated by processing the training data
  • the gradient matrix is obtained by obtaining training data, and training the local model through the training data, and calculating the Euclidean norm of the channel of the gradient matrix to obtain the calculation result. And save the calculation results in the form of tensors, which is convenient for subsequent filtering and updating of the calculation results, and then according to the preset upload rate as the channel selection threshold, from the calculation results, select the channel that meets the channel selection threshold as The target channel, and the gradient matrix in the target channel is used as the target gradient matrix, which is convenient for uploading part of the channels in the gradient from the local model to the server, and uploading part of the channels on the data set instead of all channels to obtain better performance , While protecting privacy while reducing the redundancy of the gradient; finally, the target gradient matrix with non-zero parameters is selected as the weight of the server, and the local model is updated according to the weight of the server, and the updated local model is obtained, and finally based on The updated local model classifies user data.
  • FIG. 1 is a schematic diagram of an application environment of a user data classification method based on federated learning provided by an embodiment of the present application;
  • Fig. 2 is an implementation flowchart of a method for user data classification based on federated learning provided according to an embodiment of the present application
  • FIG. 3 is an implementation flowchart of step S3 in the method for user data classification based on federated learning provided by an embodiment of the present application;
  • Figure 4 is a schematic diagram of a user data classification device based on federated learning provided by an embodiment of the present application
  • Fig. 5 is a schematic diagram of a computer device provided by an embodiment of the present application.
  • the system architecture 100 may include terminal devices 101, 102, and 103, a network 104 and a server 105.
  • the network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105.
  • the network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, and so on.
  • the user can use the terminal devices 101, 102, and 103 to interact with the server 105 through the network 104 to receive or send messages and so on.
  • Various communication client applications such as web browser applications, search applications, instant messaging tools, etc., may be installed on the terminal devices 101, 102, and 103.
  • the terminal devices 101, 102, 103 may be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and so on.
  • the server 105 may be a server that provides various services, for example, a background server that provides support for pages displayed on the terminal devices 101, 102, and 103.
  • the user data classification method based on federated learning provided by the embodiments of the present application is generally executed by a server. Accordingly, a user data classification device based on federated learning is generally set in the server.
  • terminal devices, networks, and servers in FIG. 1 are merely illustrative. There can be any number of terminal devices, networks, and servers according to implementation needs.
  • Figure 2 shows a specific implementation of a user data classification method based on federated learning.
  • the method of the present application is not limited to the sequence of the process shown in FIG. 2, and the method includes the following steps:
  • S1 Obtain training data, train the local model through the training data, and generate a gradient matrix based on the change gradient of the weight matrix of the local model during each training cycle.
  • the process is divided into two parts: autonomy and union.
  • the part of its autonomy First, two or more participants install the initialized model in their respective terminals, and each participant has the same model. After that, the participants can use local data to train the model. Since the participants have different data, the final model trained by the terminal also has different model parameters. Joint part: different model parameters will be uploaded to the server at the same time, the server will complete the aggregation and update of the model parameters, and return the updated parameters to the terminals of the participants, and each terminal will start the next iteration. The above steps will be repeated until the convergence of the entire training process.
  • the above-mentioned participant is the local model of this embodiment, so in the training process of the local model, the respective training data is first obtained to train the local model.
  • each local model After each local model obtains the training data, it trains the local model, and each local model generates a gradient matrix, which is used to display the change of the weight matrix during each training cycle.
  • the gradient matrix For example, denote the gradient matrix as G and have the same shape as the weight matrix W.
  • the influence of the deviation matrix is negligible, so for efficiency considerations, the change of the deviation is omitted. Since the influence of the deviation matrix is ignored, in this embodiment, the local model is trained through training data, and the gradient matrix is generated based on the change gradient of the weight matrix of the local model during each training cycle.
  • the calculation result can be saved in the form of a tensor, where each element is equal to the channel specification .
  • Euclidean metric is a commonly used distance definition, which refers to the true distance between two points in the m-dimensional space, or the natural length of the vector (that is, the point The distance to the origin).
  • the Euclidean distance in two-dimensional and three-dimensional space is the actual distance between two points.
  • the norm of a vector can be simply and visually understood as the length of the vector, or the distance from the vector to the zero point, or the distance between the corresponding two points. Therefore, the Euclidean norm is the norm associated with the Euclidean metric, referred to as the L2 norm. In this embodiment, by calculating the Euclidean norm of the channel, it is convenient for subsequent screening of the channel to obtain the updated gradient matrix.
  • the calculation result is the Euclidean norm of each channel of the gradient matrix.
  • Tensor is a multiple linear mapping defined on the Cartesian product of some vector spaces and some dual spaces. Its coordinates are in
  • a 0-dimensional tensor represents a scalar, and a scalar is a number; a 1-dimensional tensor represents a vector, and a 1-dimensional tensor is called a "vector"; a 2-dimensional tensor is represented as a matrix; 3 Dimension tensor means that common data is stored in tensor, such as time series data, stock price, text data and color picture (RGB). In this embodiment, the Euclidean norm of the channel is saved in the form of a tensor.
  • the tensor is a 2-dimensional tensor, which can convert the Euclidean norm of the gradient matrix into a matrix
  • the tensor in this form is convenient for subsequent straightening of the tensor and adjustment to a one-dimensional vector form, which is convenient for sorting the gradients of the channels, thereby facilitating the screening of the target gradients.
  • S3 Use the preset upload rate as the channel selection threshold, from the calculation result, select the channel that meets the channel selection threshold as the target channel, and use the gradient matrix in the target channel as the target gradient matrix.
  • the upload rate ⁇ is preset.
  • the gradient matrix can be straightened by a tensor, converted into a one-dimensional tensor vector form and sorted, and then the quantile of the upload rate ⁇ can be calculated q ⁇ , the calculated upload rate ⁇ quantile q ⁇ is used as the channel selection threshold. Then, according to the threshold selected by the channel, from the calculation result, the channel that meets the threshold is selected as the target channel, and then the gradient matrix in the target channel is obtained and used as the target gradient.
  • the channel in this embodiment corresponds to the processing of each element, and corresponds to the gradient matrix obtained after processing each training data (that is, the processing of each element).
  • the preset upload rate depends on the actual situation and is not limited here.
  • Negative selection discard the channel whose Euclidean norm is lower than the upload rate ⁇ quantile q ⁇ , and select the remaining parameters for update.
  • Forward selection Select the channel whose standard is higher than the upload rate ⁇ quantile q ⁇ and the other parameters are set to zero. In this embodiment, both selection methods can be implemented. However, considering that different neural channels may contain the same neurons, by preferentially uploading more parameters with the same update rate, positive selection tends to perform better than negative selection, so it is preferable to select positive selection for gradient processing.
  • the target gradient matrix has a gradient with a value of zero, this part of the gradient matrix has no effect on the update of the local model, so the updated gradient is screened to obtain the weight of the server.
  • the ordinary network will multiply the gradient matrix X by the weight of the server, add the deviation and then pass it to the next hidden layer.
  • the influence of the deviation matrix is negligible, so for efficiency considerations, the change of the deviation is omitted. Therefore, in this embodiment, in the local model, the influence of the deviation is ignored, and the server's weight is used to update.
  • the weight of the server is transmitted to the local model.
  • the gradient matrix is updated according to the weight of the server, so as to update the local model.
  • the pseudo code for the server update requires: training set (X, y), update rate ⁇ , local model, the server trains the local model on the training set (X, y) and saves the gradient ⁇ W; calculate each Euclidean norm of the channel, and save the result as a tensor; straighten the tensor into a vector and calculate its ⁇ quantile t ⁇ ; select the channel from the gradient ⁇ W according to t ⁇ , and get the processed gradient will The non-zero part of is updated as the weight of the server.
  • the server update algorithm is executed in each global loop to update the local model.
  • S6 Classify user data based on the updated local model.
  • the updated local model reduces the access to user data when classifying users. Conducive to protecting the security of user privacy data.
  • the gradient matrix is obtained by obtaining the training data and training the local model through the training data, and the Euclidean norm of the channel of the gradient matrix is calculated, and the calculation result is obtained, and the calculation result is in the form of a tensor Save it to facilitate subsequent filtering and updating of the calculation results, and then use the preset upload rate as the channel selection threshold. From the calculation results, select the channel that meets the channel selection threshold as the target channel, and use the gradient in the target channel
  • the matrix is used as the target gradient matrix, which is convenient for uploading part of the channels in the gradient from the local model to the server, and uploading part of the channels instead of all channels on the data set obtains better performance, and reduces the gradient of the gradient while protecting privacy.
  • the non-zero part of the updated gradient matrix is selected as the weight of the server, and the local model is updated according to the weight of the server to obtain the updated local model.
  • the user Data is classified. In the process of federated learning and training, part of the weights are uploaded to the server without uploading all the weights, so that the updated local model reduces the access to user data when classifying users, thereby helping to protect the security of user privacy data . .
  • step S1 obtaining training data, training a local model through the training data, and generating a gradient matrix based on the change gradient of the weight matrix of the local model during each training cycle includes:
  • the user data is encrypted.
  • the server compares the numbers in the encryption process and parses out the samples with the same code in each local model.
  • the samples with the same code are the general users of the local model. .
  • the server uses the user-based sample alignment technology to confirm the common users among the local models on the premise that each local model does not disclose their data, and does not expose users that do not overlap with each other. In order to combine the characteristics of these users for modeling.
  • the sample alignment technology uses encrypted user sample alignment technology.
  • the encrypted user sample alignment technology is preferably the RSA encryption algorithm.
  • the RSA encryption algorithm was proposed by Ron Rivest, Adi Shamir, and Leonard Adleman in 1977.
  • the RSA encryption algorithm usually first generates a pair of RSA keys, one of which is a secret key, which is kept by the user; the other is a public key, which can be disclosed to the outside world and can even be registered in a network server.
  • the RSA key is at least 500 bits long, and 1024 bits are generally recommended. This makes encryption computationally expensive.
  • the local model is trained through the training data, and a gradient matrix is generated based on the change gradient of the weight matrix of the local model during each training cycle.
  • the change gradient of the weight matrix of the local model during each training cycle is generated to obtain the gradient matrix, which is beneficial to the subsequent screening of the target gradient matrix, and then Part of the weight is uploaded to the server to achieve the purpose of protecting user privacy data security.
  • the data of the shared users of the local model is obtained based on the sample alignment technology as training data, and then the local model is trained through the training data, and the gradient is generated based on the change gradient of the weight matrix of the local model during each training cycle. matrix.
  • step S3 shows a specific implementation of step S3.
  • the preset upload rate is used as the channel selection threshold, and from the calculation result, the channel that meets the channel selection threshold is selected as the target Channel, and take the gradient matrix in the target channel as the specific realization process of the target gradient matrix, which is described in detail as follows:
  • the calculation result is straightened and transformed into the form of a first-order tensor.
  • the representation of tensor is a vector. Therefore, by calculating the appropriate modulus, the calculation result can be arranged in the form of size to obtain the arrangement result.
  • S32 Calculate the quantile of the upload rate set in advance to obtain the quantile of the upload rate.
  • the quantile of the upload rate needs to be used as the channel selection threshold. Therefore, it is necessary to calculate the quantile of the upload rate set in advance to obtain the quantile of the upload rate.
  • S33 Use the quantile of the upload rate as the channel selection threshold, and select the channel that meets the channel selection threshold in the sorting result as the target channel.
  • the channel that meets the channel selection threshold is used as the target channel.
  • the target gradient matrix is obtained by obtaining the gradient matrix in the target channel.
  • the sorting result is obtained, and the quantile of the uploading rate set in advance is calculated to obtain the quantile of the uploading rate, Then use the quantile of the upload rate as the channel selection threshold, select the channel that meets the channel selection threshold in the sorting result, as the target channel, obtain the gradient matrix in the target channel, and use the gradient matrix in the target channel as the target gradient matrix. It is conducive to the screening of the gradient matrix, and reduces the redundancy of the gradient matrix and reduces the amount of data, so that the gradient of the upload server is less, and the user's private data is effectively protected.
  • step S33 the quantile of the upload rate is used as the channel selection threshold, and the channel that meets the channel selection threshold in the sorting result is selected, and the target channel includes:
  • a channel whose quantile is higher than the upload rate and other parameters are zero is selected as the target channel, which is beneficial to increase the upload rate of the channel and makes the training of the model faster.
  • step S5 updating the local model according to the weight of the server includes:
  • the weight of the server is transmitted to the local model, and the gradient matrix is updated by the weight of the server to obtain the update matrix.
  • the gradient matrix of the local model is updated by the weight of the server, and the original weight of the gradient matrix of the local model is increased to obtain the updated matrix.
  • the weight of the server updates the gradient matrix of the local model
  • the parameters of the local model are changed, and the local model is updated.
  • the update matrix is obtained, and the local model is updated through the update matrix, so that the update of the local model is realized.
  • the protection of user privacy data is realized.
  • the step: transmitting the weight of the server to the local model, and updating the gradient matrix by the weight of the server, the user data classification method based on federated learning before the update matrix is obtained also includes:
  • the hidden layer of the local model is activated by the linear rectification function, and the output layer of the local model is activated with the sigmoid function to construct an artificial neural network.
  • the linear rectification function is used to activate the hidden layer of the local model
  • the sigmoid function is used to activate the output layer of the local model to construct an artificial neural network for the 3 fully connected layers and 64 of the corresponding layers. , 32, 1 neuron for binary prediction of mortality. Realize the update of the weight of the server.
  • Neural Network is abbreviated as Neural Network (NN), which is based on the basic principles of neural networks in biology.
  • ANN Artificial Neural Network
  • N Neural Network
  • the theoretical basis is a mathematical model that simulates the processing mechanism of complex information by the human brain's nervous system.
  • This model is characterized by parallel distributed processing capabilities, high fault tolerance, intelligence, and self-learning capabilities. It combines the processing and storage of information. With its unique knowledge representation and intelligent adaptive learning capabilities, it causes Attention in various subject areas. It is actually a complex network with a large number of simple components connected to each other, with a high degree of non-linearity, and a system capable of complex logic operations and realization of non-linear relationships.
  • the linear rectification function and the sigmoid function are the activation functions in the artificial neural network.
  • An artificial neural network is used to predict the death rate of neurons in the connection layer, where each connection between two neurons represents a weight for the server passing through the connection layer.
  • the artificial neural network is a computing model, it is composed of a large number of nodes (or neurons) connected to each other. Each node represents a specific output function, called the activation function. Each connection between two nodes represents a weighted value for the signal passing through the connection, which is called a weight.
  • the neural network simulates human memory in this way. Therefore, the artificial neural network is used to predict the mortality of neurons in the connection layer, and then to predict and update the weight of the server.
  • the hidden layer of the local model is activated by the linear rectification function, and the output layer of the local model is activated with the sigmoid function to construct an artificial neural network.
  • Prediction which realizes the prediction and update of the weight of the server, is conducive to the subsequent update of the local model, and protects the security of user privacy data when classifying user data.
  • the user data classification method based on federated learning further includes: storing training data in a blockchain.
  • the training data can also be stored in a node of a blockchain.
  • the user data classification method based on federated learning in this application involves neural networks, machine learning, and cluster analysis in the field of artificial intelligence.
  • the processes in the above-mentioned embodiment methods can be implemented by instructing relevant hardware through computer-readable instructions, which can be stored in a computer-readable storage medium.
  • the computer-readable instructions When executed, they may include the processes of the above-mentioned method embodiments.
  • the aforementioned storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disc, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM), etc.
  • this application provides an embodiment of a user data classification device based on federated learning.
  • the device embodiment corresponds to the method embodiment shown in FIG. 2 ,
  • the device can be specifically applied to various electronic equipment.
  • the user data classification device based on federated learning in this embodiment includes: a gradient matrix acquisition module 61, a calculation result acquisition module 62, a gradient matrix update module 63, a server weight module 64, a local module update module 65, and User data classification model 66, where:
  • the gradient matrix acquisition module 61 is configured to acquire training data, train a local model through the training data, and generate a gradient matrix based on the change gradient of the weight matrix of the local model during each training cycle;
  • the calculation result obtaining module 62 is used to calculate the Euclidean norm of the channel of the gradient matrix, obtain the calculation result, and save the calculation result in the form of a tensor;
  • the gradient matrix update module 63 is used to use the preset upload rate as the channel selection threshold, from the calculation result, select the channel that meets the channel selection threshold as the target channel, and use the gradient matrix in the target channel as the target gradient matrix , Where the channel corresponds to the gradient matrix generated by the processing of the training data;
  • the weight module 64 of the server is used to select a target gradient matrix with a non-zero parameter as the weight of the server;
  • the local module update module 65 is used to update the local model according to the weight of the server to obtain the updated local model
  • the user data classification model 66 is used to classify user data based on the updated local model.
  • the gradient matrix acquisition module includes:
  • the training unit acquisition unit is used to acquire user data and analyze the user data to obtain the general user of the local model, and obtain the corresponding data of the general user as training data;
  • the local model training unit is used to train the local model through the training data to obtain the gradient matrix.
  • the gradient matrix update module 63 includes:
  • the sorting result obtaining unit is used to convert the calculation result into the form of a first-order tensor, and sort the calculation result to obtain the sorting result;
  • the quantile calculation unit is used to calculate the quantile of the upload rate set in advance to obtain the quantile of the upload rate
  • the channel selection unit is used to use the quantile of the upload rate as the channel selection threshold, and select the channel that meets the channel selection threshold in the sorting result as the target channel;
  • the gradient matrix determining unit is used to obtain the gradient matrix in the target channel, and use the gradient matrix in the target channel as the target gradient matrix.
  • the channel selection unit includes:
  • the target channel determination subunit is used to select the channel with the quantile higher than the upload rate and other parameters being zero in the sorting result as the target channel.
  • the local module update module 65 includes:
  • the weight transmission unit of the server is used to transmit the weight of the server to the local model, and update the gradient matrix by the weight of the server to obtain the update matrix;
  • the local model update unit is used to update the local model through the update matrix.
  • the user data classification device based on federated learning further includes:
  • the artificial neural network construction subunit is used to activate the hidden layer of the local model through a linear rectification function, and activate the output layer of the local model with a sigmoid function to construct an artificial neural network;
  • the mortality prediction subunit is used to predict the mortality of neurons in the connection layer through an artificial neural network, where every connection between two neurons represents a weight for the server passing through the connection layer.
  • the user data classification device based on federated learning further includes:
  • the blockchain storage module is used to store training data in the blockchain.
  • the training data can also be stored in a node of a blockchain.
  • FIG. 5 is a block diagram of the basic structure of the computer device in this embodiment.
  • the computer device 7 includes a memory 71, a processor 72, and a network interface 73 that are mutually communicatively connected via a system bus. It should be pointed out that the figure only shows a computer device 7 with three components: a memory 71, a processor 72, and a network interface 73. However, it should be understood that it is not required to implement all the components shown, and alternative implementations are possible. More or fewer components. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculation and/or information processing in accordance with pre-set or stored instructions.
  • Its hardware includes, but is not limited to, a microprocessor, a dedicated Integrated Circuit (Application Specific Integrated Circuit, ASIC), Programmable Gate Array (Field-Programmable Gate Array, FPGA), Digital Processor (Digital Signal Processor, DSP), embedded equipment, etc.
  • ASIC Application Specific Integrated Circuit
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • DSP Digital Processor
  • Computer equipment can be computing equipment such as desktop computers, notebooks, palmtop computers, and cloud servers.
  • the computer equipment can interact with the user through a keyboard, a mouse, a remote control, a touch panel, or a voice control device.
  • the memory 71 includes at least one type of computer-readable storage medium.
  • the computer-readable storage medium may be non-volatile or volatile.
  • the computer-readable storage medium includes flash memory, hard disk, multimedia card, and card-type memory. (For example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disk, optical disk, etc.
  • the memory 71 may be an internal storage unit of the computer device 7, such as a hard disk or memory of the computer device 7.
  • the memory 71 may also be an external storage device of the computer device 7, such as a plug-in hard disk, a smart media card (SMC), and a secure digital (Secure Digital, SMC) equipped on the computer device 7. SD) card, flash card (Flash Card), etc.
  • the memory 71 may also include both the internal storage unit of the computer device 7 and its external storage device.
  • the memory 71 is generally used to store an operating system and various application software installed in the computer device 7, such as computer-readable instructions based on a method of user data classification based on federated learning.
  • the memory 71 can also be used to temporarily store various types of data that have been output or will be output.
  • the processor 72 may be a central processing unit (Central Processing Unit, CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments.
  • the processor 72 is generally used to control the overall operation of the computer device 7.
  • the processor 72 is configured to run computer-readable instructions or process data stored in the memory 71, for example, run a computer-readable instruction of a user data classification method based on federated learning.
  • the network interface 73 may include a wireless network interface or a wired network interface, and the network interface 73 is generally used to establish a communication connection between the computer device 7 and other electronic devices.
  • This application also provides another implementation manner, that is, a computer-readable storage medium is provided with server maintenance computer-readable instructions stored in the computer-readable storage medium, and the server maintenance computer-readable instructions can be executed by at least one processor to At least one processor is made to execute the steps of a user data classification method based on federated learning as described above.
  • the technical solution of this application essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, The optical disc) includes a number of instructions to enable a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods of the various embodiments of the present application.
  • a terminal device which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.
  • the blockchain referred to in this application is a new application mode of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm.
  • Blockchain essentially a decentralized database, is a series of data blocks associated with cryptographic methods. Each data block contains a batch of network transaction information for verification. The validity of the information (anti-counterfeiting) and the generation of the next block.
  • the blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Medical Informatics (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Computation (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种基于联邦学习的用户数据分类方法、装置、设备及介质,涉及信息安全技术领域,该方法包括:获取训练数据,并通过训练数据训练本地模型,并基于每个训练循环期间本地模型的权重矩阵的变化梯度,生成梯度矩阵,将预先设定的上载速率作为通道选择阈值,从计算结果中,选择符合所述通道选择阈值的通道,作为目标通道,并将目标通道中的梯度矩阵作为目标梯度矩阵;选择参数非零目标梯度矩阵,作为服务器的权重;根据服务器的权重,对本地模型进行更新,并根据更新后的本地模型对用户数据进行分类。还涉及区块链技术,训练数据存储于区块链中。通过生成更新后的本地模型,实现在用户数据分类时,保护用户隐私数据安全。

Description

基于联邦学习的用户数据分类方法、装置、设备及介质
本申请要求于2020年10月12日提交中国专利局、申请号为202011085715.3,发明名称为“基于联邦学习的用户数据分类方法、装置、设备及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及信息安全技术领域,尤其涉及一种基于联邦学习的用户数据分类方法、装置、设备及介质。
背景技术
一方面随着法律法规的不断完善以及监控的不断加强,数据的集中式处理将面临巨大的法律风险;另一方面各个数据拥有方之间出于安全、经济利益等因素不愿意共享原始数据。这些因素都会导致数据以孤岛的形式存在。为了打破数据孤岛,联邦学习应运而生。联邦学习无须各数据拥有方共享原始数据,可以在保证安全性的条件下,充分地利用各数据拥有方的原始数据进行模型训练,有效解决了人工智能时代的数据孤岛问题。
目前基于联邦学习的用户数据分类方法为:通过服务器节点将待训练模型下发至多个工作节点,各工作节点基于各自所拥有的数据对接收到的待训练模型进行训练,并将训练好的模型参数回传至服务器节点,服务器节点根据接收到的各工作节点的模型参数对待训练模型进行更新,然后重复上述过程直至待训练模型满足预设的性能指标,再通过符合预设性能指标的训练模型对用户数据进行分类。但是,发明人意识到,在这种分类方法过程中,训练数据都共享给执行分析的中央服务器,而提供数据的用户则无法对其进行控制,这样存在用户数据泄露的风险。现亟需一种在对用户数据进行分类时,能够保护用户隐私数据安全的方法。
发明内容
本申请实施例的目的在于提出一种基于联邦学习的用户数据分类方法,在进行用户数据分类时,以提高用户隐私数据的安全性。
为了解决上述技术问题,本申请实施例提供一种基于联邦学习的用户数据分类方法,包括:
获取训练数据,通过所述训练数据训练本地模型,并基于每个训练循环期间所述本地模型的权重矩阵的变化梯度,生成梯度矩阵;
计算所述梯度矩阵的通道的欧几里得范数,得到计算结果,并将所述计算结果以张量的形式进行保存;
将预先设定的上载速率的作为通道选择阈值,从所述计算结果中,选择符合所述通道选择阈值的通道,作为目标通道,并将所述目标通道中的梯度矩阵作为目标梯度矩阵,其中,所述通道对应有所述训练数据的处理生成后的梯度矩阵;
选择参数非零的所述目标梯度矩阵,作为服务器的权重;
根据所述服务器的权重,对所述本地模型进行更新,得到更新后的本地模型;
基于所述更新后的本地模型,对用户数据进行分类。
为了解决上述技术问题,本申请实施例提供一种基于联邦学习的用户数据分类装置,包括:
梯度矩阵获取模块,用于获取训练数据,通过所述训练数据训练本地模型,并基于每个训练循环期间所述本地模型的权重矩阵的变化梯度,生成梯度矩阵;
计算结果获取模块,用于计算所述梯度矩阵的通道的欧几里得范数,得到计算结果,并将所述计算结果以张量的形式进行保存;
梯度矩阵更新模块,用于将预先设定的上载速率的作为通道选择阈值,从所述计算结果中,选择符合所述通道选择阈值的通道,作为目标通道,并将所述目标通道中的梯度矩阵作为目标梯度矩阵,其中,所述通道对应有所述训练数据的处理生成后的梯度矩阵;
服务器的权重模块,用于选择参数非零的所述目标梯度矩阵,作为服务器的权重;
本地模块更新模块,用于根据所述服务器的权重,对所述本地模型进行更新,得到更新后的本地模型;
用户数据分类模块,用于基于所述更新后的本地模型,对用户数据进行分类。
为了解决上述技术问题,本申请实施例还提供一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:
获取训练数据,通过所述训练数据训练本地模型,并基于每个训练循环期间所述本地模型的权重矩阵的变化梯度,生成梯度矩阵;
计算所述梯度矩阵的通道的欧几里得范数,得到计算结果,并将所述计算结果以张量的形式进行保存;
将预先设定的上载速率的作为通道选择阈值,从所述计算结果中,选择符合所述通道选择阈值的通道,作为目标通道,并将所述目标通道中的梯度矩阵作为目标梯度矩阵,其中,所述通道对应有所述训练数据的处理生成后的梯度矩阵;
选择参数非零的所述目标梯度矩阵,作为服务器的权重;
根据所述服务器的权重,对所述本地模型进行更新,得到更新后的本地模型;
基于所述更新后的本地模型,对用户数据进行分类。
为了解决上述技术问题,本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,所述计算机可读指令被处理器执行时实现如下步骤:
获取训练数据,通过所述训练数据训练本地模型,并基于每个训练循环期间所述本地模型的权重矩阵的变化梯度,生成梯度矩阵;
计算所述梯度矩阵的通道的欧几里得范数,得到计算结果,并将所述计算结果以张量的形式进行保存;
将预先设定的上载速率的作为通道选择阈值,从所述计算结果中,选择符合所述通道选择阈值的通道,作为目标通道,并将所述目标通道中的梯度矩阵作为目标梯度矩阵,其中,所述通道对应有所述训练数据的处理生成后的梯度矩阵;
选择参数非零的所述目标梯度矩阵,作为服务器的权重;
根据所述服务器的权重,对所述本地模型进行更新,得到更新后的本地模型;
基于所述更新后的本地模型,对用户数据进行分类。
以上方案中的一种基于联邦学习的用户数据分类方法,通过获取训练数据,并通过训练数据训练本地模型,得到梯度矩阵,并计算梯度矩阵的通道的欧几里得范数,得到计算结果,并将计算结果以张量的形式进行保存,便于后续对计算结果进行筛选更新,然后根据将预先设定的上载速率的作为通道选择阈值,从计算结果中,选择符合通道选择阈值的通道,作为目标通道,并将目标通道中的梯度矩阵作为目标梯度矩阵,便于从本地模型向服务器上载了渐变中的一部分通道,并在数据集上上传了部分的通道而不是全部通道获得了更好的性能,在保护隐私的同时减少了梯度的冗余性;最后选择参数非零的目标梯度矩阵,作为服务器的权重,并根据服务器的权重,对本地模型进行更新,得到更新后的本地模型,最后基于更新后的本地模型,对用户数据进行分类。实现在联邦学习训练过程中,将部分权重上传到服务器,而无需将全部权重上传,使得更新后的本地模型在进行用户分类时,减少对用户数据的访问,进而有利于保护用户隐私数据的安全。
附图说明
为了更清楚地说明本申请中的方案,下面将对本申请实施例描述中所需要使用的附图作一个简单介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例提供的基于联邦学习的用户数据分类方法的应用环境示意图;
图2是根据本申请实施例提供的基于联邦学习的用户数据分类方法的一实现流程图;
图3是本申请实施例提供的基于联邦学习的用户数据分类方法中步骤S3的一实现流程图;
图4是本申请实施例提供的基于联邦学习的用户数据分类装置示意图;
图5是本申请实施例提供的计算机设备的示意图。
具体实施方式
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同;本文中在申请的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本申请;本申请的说明书和权利要求书及上述附图说明中的术语“包括”和“具有”以及它们的任何变形,意图在于覆盖不排他的包含。本申请的说明书和权利要求书或上述附图中的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。
为了使本技术领域的人员更好地理解本申请方案,下面将结合附图,对本申请实施例中的技术方案进行清楚、完整地描述。
下面结合附图和实施方式对本申请进行详细说明。
请参阅图1,系统架构100可以包括终端设备101、102、103,网络104和服务器105。网络104用以在终端设备101、102、103和服务器105之间提供通信链路的介质。网络104可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。
用户可以使用终端设备101、102、103通过网络104与服务器105交互,以接收或发送消息等。终端设备101、102、103上可以安装有各种通讯客户端应用,例如网页浏览器应用、搜索类应用、即时通信工具等。
终端设备101、102、103可以是具有显示屏并且支持网页浏览的各种电子设备,包括但不限于智能手机、平板电脑、膝上型便携计算机和台式计算机等等。
服务器105可以是提供各种服务的服务器,例如对终端设备101、102、103上显示的页面提供支持的后台服务器。
需要说明的是,本申请实施例所提供的一种基于联邦学习的用户数据分类方法一般由服务器执行,相应地,一种基于联邦学习的用户数据分类装置一般设置于服务器中。
应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。
请参阅图2,图2示出了基于联邦学习的用户数据分类方法的一种具体实施方式。
需注意的是,若有实质上相同的结果,本申请的方法并不以图2所示的流程顺序为限,该方法包括如下步骤:
S1:获取训练数据,通过训练数据训练本地模型,并基于每个训练循环期间本地模型的权重矩阵的变化梯度,生成梯度矩阵。
具体的,对于联邦学习而言,其过程分为自治和联合两部分。其自治的部分:首先,两个或两个以上的的参与方们在各自终端安装初始化的模型,每个参与方拥有相同的模型,之后参与方们可以使用当地的数据训练模型。由于参与方们拥有不同的数据,最终终端所训练的模型也拥有不同的模型参数。联合的部分:不同的模型参数将同时上传到服务器,服务器将完成模型参数的聚合与更新,并且将更新好的参数返回到参与方的终端,各个终端开始下一次的迭代。以上的步骤会一直重复,直到整个训练过程的收敛。在本实施例中,上述参与方为本实施例的本地模型,所以在本地模型的训练过程中,首先会获取各自的训练数据,进行本地模型的训练。
具体的,每一个本地模型在获取到训练数据后,进行训练本地模型,每个本地模型都会生成一个梯度矩阵,该梯度矩阵用以显示每个训练循环期间权重矩阵的变化。例如,将 梯度矩阵表示为G,并且与权重矩阵W具有相同的形状。由于与权重矩阵相比,偏差矩阵的影响微不足道,因此出于效率考虑,省略了偏差的变化。由于是忽略了偏差矩阵的影响,故而在本实施例中,通过训练数据训练本地模型,并基于每个训练循环期间本地模型的权重矩阵的变化梯度,生成梯度矩阵。
S2:计算梯度矩阵的通道的欧几里得范数,得到计算结果,并将计算结果以张量的形式进行保存。
具体的,考虑到通道必须穿过每一层的神经元并与包含这些神经元索引的L维向量相关,因此,计算结果可以以张量的形式进行保存,其中,每个元素其中等于渠道规范。
其中,欧几里得度量(euclidean metric)(也称欧氏距离)是一个通常采用的距离定义,指在m维空间中两个点之间的真实距离,或者向量的自然长度(即该点到原点的距离)。在二维和三维空间中的欧氏距离就是两点之间的实际距离。向量的范数可以简单形象的理解为向量的长度,或者向量到零点的距离,或者相应的两个点之间的距离。所以欧几里得范数为欧几里得度量相关联的范数,简称L2范数。在本实施例中,通过计算通道的欧几里得范数,便于后续对通道的筛选,进而获取到更新后的梯度矩阵。
其中,计算结果为梯度矩阵的每个通道的欧几里得范数。
其中,张量(Tensor)是一个定义在一些向量空间和一些对偶空间的笛卡儿积上的多重线性映射,其坐标是|n|维空间内,有|n|个分量的一种量,其中每个分量都是坐标的函数,而在坐标变换时,这些分量也依照某些规则作线性变换。不同维度的张量代表这不同的含义,0维张量表示一个标量,标量是一个数字;1维张量代表向量,1维张量称为“向量”;2维张量表示为矩阵;3维张量表示公用数据存储在张量,如时间序列数据、股价、文本数据彩色图片(RGB)。在本实施例中,通过将通道的欧几里得范数以张量的形式进行保存,此时的张量是一个2维张量,其可以将梯度矩阵的欧几里得范数以矩阵的形式进行保存,这种形式的张量便于后续通过对张量进行拉直,调整为一维的矢量形式,便于将通道的梯度进行排序,从而便于对目标梯度的筛选。
S3:将预先设定的上载速率的作为通道选择阈值,从计算结果中,选择符合通道选择阈值的通道,作为目标通道,并将目标通道中的梯度矩阵作为目标梯度矩阵。
具体的,预先设定上载速率α,本实施例可以将梯度矩阵以张量拉直的方式,将其转化为一维张量的矢量形式并将其排序,再计算上载速率α的分位数qα,将计算上载速率α分位数qα作为通道选择阈值。然后,根据该通道选择的阈值,从计算结果中,选择符合该阈值的通道,作为目标通道,再获取目标通道中的梯度矩阵,并将其作为目标梯度。
进一步的,本实施例中的通道中对应有每个元素的处理,并且对应有每个训练数据处理(即每个元素的处理)后得到的梯度矩阵。
需要说明的是,预先设定的上载速率根据实际情况而定,此处不做限定。
进一步的,处理梯度有两种处理的方法。负选择:丢弃其通道的欧几里得范数低于上载速率α分位数qα的通道,并选择其余参数进行更新。正向选择:选择标准高于上载速率α分位数qα且其余参数设置为零的通道。在本实施例中,两种选择方法都可以实行。 但考虑到不同的神经通道可能包含相同的神经元,通过优先选择上传具有相同更新速率的更多参数,正选择往往比负选择表现更好,故而优选选择正选择的方式进行梯度的处理。
S4:选择参数非零的目标梯度矩阵,作为服务器的权重。
具体的,由于目标梯度矩阵存在着数值为零的梯度,该部分梯度矩阵对本地模型的更新并无作用,故而对更新后的梯度进行筛选,得到服务器的权重。
在一具体实施例中,若给定输入梯度矩阵X,普通的网络会把梯度矩阵X乘上服务器的权重,加上偏差之后传入到下一个隐藏层,但是,在本申请中,由于偏差矩阵与权重矩阵相比,偏差矩阵的影响微不足道,因此出于效率考虑,省略了偏差的变化。所以,在本实施例中,在本地模型中,会忽略偏差的影响,通过服务器的权重进行更新。
S5:根据服务器的权重,对本地模型进行更新,得到更新后的本地模型。
具体的,将服务器的权重传送到本地模型,在本地模型中,根据服务器的权重,对梯度矩阵进行参数的更新,以达到对本地模型进行更新。
在一具体实施例中,服务器更新的伪代码要求:训练集(X,y),更新率α,本地模型,服务器在训练集(X,y)上训练本地模型并保存梯度ΔW;计算每个通道的欧几里得范数,并将结果以张量的形式进行保存;将张量调直为矢量并计算其α分位数tα;根据tα从梯度ΔW中选择通道,并得到处理后的梯度
Figure PCTCN2020135588-appb-000001
Figure PCTCN2020135588-appb-000002
的非零部分更新为服务器的权重。返回更新的服务器模型,服务器更新算法在每个全局循环中执行,实现对本地模型的更新。
S6:基于更新后的本地模型,对用户数据进行分类。
具体的,由于在得到更新后的本地模型过程中,只是将部分权重上传到服务器,而无需将全部权重上传,使得更新后的本地模型在进行用户分类时,减少对用户数据的访问,进而有利于保护用户隐私数据的安全。
在本实施例中,通过获取训练数据,并通过训练数据训练本地模型,得到梯度矩阵,并计算梯度矩阵的通道的欧几里得范数,得到计算结果,并将计算结果以张量的形式进行保存,便于后续对计算结果进行筛选更新,然后将预先设定的上载速率的作为通道选择阈值,从计算结果中,选择符合通道选择阈值的通道,作为目标通道,并将目标通道中的梯度矩阵作为目标梯度矩阵,便于从本地模型向服务器上载了渐变中的一部分通道,并在数据集上上传了部分的通道而不是全部通道获得了更好的性能,在保护隐私的同时减少了梯度的冗余性;最后选择更新后的梯度矩阵的非零部分,作为服务器的权重,并根据服务器的权重,对本地模型进行更新,得到更新后的本地模型,最后基于更新后的本地模型,对用户数据进行分类。实现在联邦学习训练过程中,将部分权重上传到服务器,而无需将全部权重上传,使得更新后的本地模型在进行用户分类时,减少对用户数据的访问,进而有利于保护用户隐私数据的安全。。
进一步的,在步骤S1中,获取训练数据,通过训练数据训练本地模型,并基于每个训练循环期间本地模型的权重矩阵的变化梯度,生成梯度矩阵包括:
获取用户数据,并对用户数据进行解析,得到本地模型的通用用户,并获取通用用户 的对应数据,作为训练数据。
具体的,在获取到用户数据后,在对用户数据进行解析时,为了保护用户数据的隐私,会对用户数据进行加密。该加密过程中,存在加密密钥和解密密钥,服务器通过对加密过程中的编号对比,解析出各个本地模型中,存在的相同编码的样本,该相同编码的样本即为本地模型的通用用户。再获取该通用用户的对应数据,将其作为训练数据。进一步的,由于本地模型的用户群体并非完全重合,服务器利用基于户样本对齐技术,在各个本地模型不公开各自数据的前提下确认本地模型间的通用用户,并且不暴露不互相重叠的用户。以便联合这些用户的特征进行建模。
进一步的,在本实施中,样本对齐技术是采用加密的用户样本对齐技术。其中,加密的用户样本对齐技术优选RSA加密算法。RSA加密算法是1977年由罗纳德·李维斯特(Ron Rivest)、阿迪·萨莫尔(Adi Shamir)和伦纳德·阿德曼(Leonard Adleman)一起提出的。RSA加密算法通常是先生成一对RSA密钥,其中之一是保密密钥,由用户保存;另一个为公开密钥,可对外公开,甚至可在网络服务器中注册。为提高保密强度,RSA密钥至少为500位长,一般推荐使用1024位。这就使加密的计算量很大。为减少计算量,在传送信息时,常采用传统加密方法与公开密钥加密方法相结合的方式,即信息采用改进的DES或IDEA对话密钥加密,然后使用RSA密钥加密对话密钥和信息摘要。对方收到信息后,用不同的密钥解密并可核对信息摘要。
通过训练数据训练本地模型,并基于每个训练循环期间本地模型的权重矩阵的变化梯度,生成得到梯度矩阵。
具体的,由于忽略了偏差矩阵的影响,所以在每个训练循环期间本地模型的权重矩阵的变化梯度,生成得到梯度矩阵,实现梯度矩阵的获取,有利于后续对目标梯度矩阵的筛选,进而将部分权重上传服务器中,达到保护用户隐私数据安全的目的。
本实施例中,通过基于样本对齐技术,获取本地模型共有用户的数据,作为训练数据,再通过训练数据训练本地模型,并基于每个训练循环期间本地模型的权重矩阵的变化梯度,生成得到梯度矩阵。
请参阅图3,图3示出了步骤S3的一种具体实施方式,步骤S3中将预先设定的上载速率的作为通道选择阈值,从计算结果中,选择符合通道选择阈值的通道,作为目标通道,并将目标通道中的梯度矩阵作为目标梯度矩阵的具体实现过程,详叙如下:
S31:将计算结果转化为一阶张量的形式,并将计算结果进行排序,得到排序结果。
具体的,由于上述步骤是将梯度矩阵的欧几里得范数以2维张量的形式进行保存,所以在本步骤中,将计算结果拉直转化为一阶张量的形式,由一阶张量的表现形式为矢量。故而,通过计算其适量的模,并可以把计算结果按照大小的形式进行排列,得到排列结果。
S32:计算预先设定的上载速率的分位数,得到上载速率的分位数。
具体的,由于要将部分权重上传到服务器,而上传时考虑到具有相同更新速率的参数,其表现会更好,所以需要根据上载速率的分位数作为通道选择阈值。所以要计算预先设定的上载速率的分位数,得到上载速率的分位数。
S33:将上载速率的分位数作为通道选择阈值,选择排序结果中符合通道选择阈值的通道,作为目标通道。
具体的,在排序结果中,由于排序结果对应着相应的通道,故而将符合通道选择阈值的通道,作为目标通道。
S34:获取目标通道中的梯度矩阵,并将目标通道中的梯度矩阵作为目标梯度矩阵。
具体的,目标通道中有对应的梯度矩阵,通过获取目标通道中的梯度矩阵,得到目标梯度矩阵。
本实施例中,通过将计算结果转化为一阶张量的形式,并将计算结果进行排序,得到排序结果,并计算预先设定的上载速率的分位数,得到上载速率的分位数,再将上载速率的分位数作为通道选择阈值,选择排序结果中符合通道选择阈值的通道,作为目标通道,获取目标通道中的梯度矩阵,并将目标通道中的梯度矩阵作为目标梯度矩阵,有利于对梯度矩阵的筛选,并实现减少梯度矩阵的冗余,减少数据量,使得上传服务器的梯度更少,有效的保护用户的隐私数据。
进一步的,在步骤S33中,将上载速率的分位数作为通道选择阈值,选择排序结果中符合通道选择阈值的通道,作为目标通道包括:
在排序结果中,选择高于上载速率的分位数且其他参数为零的通道,作为目标通道。
具体的,由于考虑到不同的神经通道可能包含相同的神经元,通过优先选择上传具有相同更新速率的更多参数,所以选择高于上载速率的分位数且其他参数为零的通道,作为目标通道。
本实施例中,在排序结果中,选择高于上载速率的分位数且其他参数为零的通道,作为目标通道,有利于提高通道的上传速率,使得模型的训练更加迅速。
进一步的,在步骤S5中,根据服务器的权重,对本地模型进行更新包括:
将服务器的权重传送到本地模型中,并通过服务器的权重对梯度矩阵进行更新,得到更新矩阵。
具体的,通过服务器的权重对本地模型的梯度矩阵更新,要增加本地模型的梯度矩阵的原始重量,得到更新矩阵。
通过更新矩阵对本地模型进行更新。
具体的,由于服务器的权重对本地模型的梯度矩阵的更新,使得本地模型的参数发生了改变,进而实现对本地模型的更新。
本实施例中,通过将服务器的权重传送到本地模型中,并通过服务器的权重对梯度矩阵进行更新,得到更新矩阵,并通过更新矩阵对本地模型进行更新,实现了本地模型的更新,并且在对用户数据分类时,实现了对用户隐私数据的保护。
进一步的,在步骤:将服务器的权重传送到本地模型中,并通过服务器的权重对梯度矩阵进行更新,得到更新矩阵之前基于联邦学习的用户数据分类方法还包括:
通过线性整流函数对本地模型的隐藏层进行激活,与S形函数对本地模型的输出层进行激活,构建人工神经网络。
具体的,使用线性整流函数对本地模型的隐藏层进行激活,与S形函数对本地模型的输出层进行激活,构建一个人工神经网络,用于对3个完全连接的层以及相应层中的64、32、1个神经元进行死亡率的二进制预测。实现对服务器的权重的更新。
其中,人工神经网络(Artificial Neural Network,ANN)简称神经网络(NN),是基于生物学中神经网络的基本原理,在理解和抽象了人脑结构和外界刺激响应机制后,以网络拓扑知识为理论基础,模拟人脑的神经系统对复杂信息的处理机制的一种数学模型。该模型以并行分布的处理能力、高容错性、智能化和自学习等能力为特征,将信息的加工和存储结合在一起,以其独特的知识表示方式和智能化的自适应学习能力,引起各学科领域的关注。它实际上是一个有大量简单元件相互连接而成的复杂网络,具有高度的非线性,能够进行复杂的逻辑操作和非线性关系实现的系统。
其中,线性整流函数和S形函数为人工神经网络中的激活函数。
通过人工神经网络对连接层的神经元进行死亡率的预测,其中,每两个神经元间的连接都代表一个对于通过连接层的服务器的权重。
具体的,由于人工神经网络是一种运算模型,由大量的节点(或称神经元)之间相互联接构成。每个节点代表一种特定的输出函数,称为激活函数。每两个节点间的连接都代表一个对于通过该连接信号的加权值,称之为权重(weight),神经网络就是通过这种方式来模拟人类的记忆。故而通过人工神经网络对连接层的神经元进行死亡率的预测,进而对服务器的权重的预测与更新。
本实施例中,通过线性整流函数对本地模型的隐藏层进行激活,与S形函数对本地模型的输出层进行激活,构建人工神经网络,通过人工神经网络对连接层的神经元进行死亡率的预测,实现对服务器的权重的预测与更新,有利于后续对本地模型的更新,在对用户数据分类时,实现保护用户隐私数据的安全。
进一步的,该基于联邦学习的用户数据分类方法还包括:将训练数据存储于区块链中。
需要强调的是,为进一步保证上述训练数据的私密和安全性,上述训练数据还可以存储于一区块链的节点中。
本申请中基于联邦学习的用户数据分类方法涉及人工智能领域中的神经网络、机器学习以及聚类分析。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,该计算机可读指令可存储于一计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,前述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等非易失性存储介质,或随机存储记忆体(Random Access Memory,RAM)等。
请参考图4,作为对上述图2所示方法的实现,本申请提供了一种基于联邦学习的用户数据分类装置的一个实施例,该装置实施例与图2所示的方法实施例相对应,该装置具体可以应用于各种电子设备中。
如图4所示,本实施例的基于联邦学习的用户数据分类装置包括:梯度矩阵获取模块 61、计算结果获取模块62、梯度矩阵更新模块63、服务器的权重模块64、本地模块更新模块65及用户数据分类模型66,其中:
梯度矩阵获取模块61,用于获取训练数据,通过训练数据训练本地模型,并基于每个训练循环期间本地模型的权重矩阵的变化梯度,生成梯度矩阵;
计算结果获取模块62,用于计算梯度矩阵的通道的欧几里得范数,得到计算结果,并将计算结果以张量的形式进行保存;
梯度矩阵更新模块63,用于将预先设定的上载速率的作为通道选择阈值,从计算结果中,选择符合通道选择阈值的通道,作为目标通道,并将目标通道中的梯度矩阵作为目标梯度矩阵,其中,通道对应有训练数据的处理生成后的梯度矩阵;
服务器的权重模块64,用于选择参数非零的目标梯度矩阵,作为服务器的权重;
本地模块更新模块65,用于根据服务器的权重,对本地模型进行更新,得到更新后的本地模型;
用户数据分类模型66,用于基于更新后的本地模型,对用户数据进行分类。
进一步的,梯度矩阵获取模块包括:
训练单元获取单元,用于获取用户数据,并对用户数据进行解析,得到本地模型的通用用户,并获取通用用户的对应数据,作为训练数据;
本地模型训练单元,用于通过训练数据训练本地模型,得到梯度矩阵。
进一步的,梯度矩阵更新模块63包括:
排序结果获取单元,用于将计算结果转化为一阶张量的形式,并将计算结果进行排序,得到排序结果;
分位数计算单元,用于计算预先设定的上载速率的分位数,得到上载速率的分位数;
通道选择单元,用于将上载速率的分位数作为通道选择阈值,选择排序结果中符合通道选择阈值的通道,作为目标通道;
梯度矩阵确定单元,用于获取目标通道中的梯度矩阵,并将目标通道中的梯度矩阵作为目标梯度矩阵。
进一步的,通道选择单元包括:
目标通道确定子单元,用于在排序结果中,选择高于上载速率的分位数且其他参数为零的通道,作为目标通道。
进一步的,本地模块更新模块65包括:
服务器的权重传送单元,用于将服务器的权重传送到本地模型中,并通过服务器的权重对梯度矩阵进行更新,得到更新矩阵;
本地模型更新单元,用于通过更新矩阵对本地模型进行更新。
进一步的,在服务器的权重传送单元之前,基于联邦学习的用户数据分类装置还包括:
人工神经网络构建子单元,用于通过线性整流函数对本地模型的隐藏层进行激活,与S形函数对本地模型的输出层进行激活,构建人工神经网络;
死亡率的预测子单元,用于通过人工神经网络对连接层的神经元进行死亡率的预测, 其中,每两个神经元间的连接都代表一个对于通过连接层的服务器的权重。
进一步的,该基于联邦学习的用户数据分类装置还包括:
区块链存储模块,用于将训练数据存储于区块链中。
需要强调的是,为进一步保证上述训练数据的私密和安全性,上述训练数据还可以存储于一区块链的节点中。
为解决上述技术问题,本申请实施例还提供计算机设备。具体请参阅图5,图5为本实施例计算机设备基本结构框图。
计算机设备7包括通过系统总线相互通信连接存储器71、处理器72、网络接口73。需要指出的是,图中仅示出了具有三种组件存储器71、处理器72、网络接口73的计算机设备7,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。其中,本技术领域技术人员可以理解,这里的计算机设备是一种能够按照事先设定或存储的指令,自动进行数值计算和/或信息处理的设备,其硬件包括但不限于微处理器、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程门阵列(Field-Programmable Gate Array,FPGA)、数字处理器(Digital Signal Processor,DSP)、嵌入式设备等。
计算机设备可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。计算机设备可以与用户通过键盘、鼠标、遥控器、触摸板或声控设备等方式进行人机交互。
存储器71至少包括一种类型的计算机可读存储介质,所述计算机可读存储介质可以是非易失性,也可以是易失性,计算机可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,存储器71可以是计算机设备7的内部存储单元,例如该计算机设备7的硬盘或内存。在另一些实施例中,存储器71也可以是计算机设备7的外部存储设备,例如该计算机设备7上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。当然,存储器71还可以既包括计算机设备7的内部存储单元也包括其外部存储设备。本实施例中,存储器71通常用于存储安装于计算机设备7的操作系统和各类应用软件,例如基于联邦学习的用户数据分类方法的计算机可读指令等。此外,存储器71还可以用于暂时地存储已经输出或者将要输出的各类数据。
处理器72在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器72通常用于控制计算机设备7的总体操作。本实施例中,处理器72用于运行存储器71中存储的计算机可读指令或者处理数据,例如运行一种基于联邦学习的用户数据分类方法的计算机可读指令。
网络接口73可包括无线网络接口或有线网络接口,该网络接口73通常用于在计算机设备7与其他电子设备之间建立通信连接。
本申请还提供了另一种实施方式,即提供一种计算机可读存储介质,计算机可读存储 介质存储有服务器维护计算机可读指令,服务器维护计算机可读指令可被至少一个处理器执行,以使至少一个处理器执行如上述的一种基于联邦学习的用户数据分类方法的步骤。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例的方法。
本申请所指区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。
显然,以上所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例,附图中给出了本申请的较佳实施例,但并不限制本申请的专利范围。本申请可以以许多不同的形式来实现,相反地,提供这些实施例的目的是使对本申请的公开内容的理解更加透彻全面。尽管参照前述实施例对本申请进行了详细的说明,对于本领域的技术人员来而言,其依然可以对前述各具体实施方式所记载的技术方案进行修改,或者对其中部分技术特征进行等效替换。凡是利用本申请说明书及附图内容所做的等效结构,直接或间接运用在其他相关的技术领域,均同理在本申请专利保护范围之内。

Claims (20)

  1. 一种基于联邦学习的用户数据分类方法,包括:
    获取训练数据,通过所述训练数据训练本地模型,并基于每个训练循环期间所述本地模型的权重矩阵的变化梯度,生成梯度矩阵;
    计算所述梯度矩阵的通道的欧几里得范数,得到计算结果,并将所述计算结果以张量的形式进行保存;
    将预先设定的上载速率的作为通道选择阈值,从所述计算结果中,选择符合所述通道选择阈值的通道,作为目标通道,并将所述目标通道中的梯度矩阵作为目标梯度矩阵,其中,所述通道对应有所述训练数据的处理生成后的梯度矩阵;
    选择参数非零的所述目标梯度矩阵,作为服务器的权重;
    根据所述服务器的权重,对所述本地模型进行更新,得到更新后的本地模型;
    基于所述更新后的本地模型,对用户数据进行分类。
  2. 根据权利要求1所述的基于联邦学习的用户数据分类方法,其中,所述获取训练数据,通过所述训练数据训练本地模型,并基于每个训练循环期间所述本地模型的权重矩阵的变化梯度,生成梯度矩阵包括:
    获取用户数据,并对所述用户数据进行解析,得到本地模型的通用用户,并获取所述通用用户的对应数据,作为所述训练数据;
    通过所述训练数据训练本地模型,并基于每个训练循环期间所述本地模型的权重矩阵的变化梯度,生成得到梯度矩阵。
  3. 根据权利要求1所述的基于联邦学习的用户数据分类方法,其中,所述将预先设定的上载速率的作为通道选择阈值,从所述计算结果中,选择符合所述通道选择阈值的通道,作为目标通道,并将所述目标通道中的梯度矩阵作为目标梯度矩阵包括:
    将所述计算结果转化为一阶张量的形式,并将所述计算结果进行排序,得到排序结果;
    计算所述预先设定的上载速率的分位数,得到上载速率的分位数;
    将所述上载速率的分位数作为通道选择阈值,选择所述排序结果中符合所述通道选择阈值的通道,作为目标通道;
    获取所述目标通道中的梯度矩阵,并将所述目标通道中的梯度矩阵作为所述目标梯度矩阵。
  4. 根据权利要求3所述的基于联邦学习的用户数据分类方法,其中,所述将所述上载速率的分位数作为通道选择阈值,选择所述排序结果中符合所述通道选择阈值的通道,作为目标通道包括:
    在所述排序结果中,选择高于所述上载速率的分位数且其他参数为零的通道,作为所述目标通道。
  5. 根据权利要求1至4任一项所述的基于联邦学习的用户数据分类方法,其中,所述根据所述服务器的权重,对所述本地模型进行更新包括:
    将所述服务器的权重传送到本地模型中,并通过服务器的权重对所述梯度矩阵进行更 新,得到更新矩阵;
    通过所述更新矩阵对所述本地模型进行更新。
  6. 根据权利要求5所述的基于联邦学习的用户数据分类方法,其中,在所述将所述服务器的权重传送到本地模型中,并通过服务器的权重对所述梯度矩阵进行更新,得到更新矩阵之前,所述方法包括:
    通过线性整流函数对本地模型的隐藏层进行激活,与S形函数对本地模型的输出层进行激活,构建人工神经网络;
    通过所述人工神经网络对连接层的神经元进行死亡率的预测,其中,每两个神经元间的连接都代表一个对于通过所述连接层的服务器的权重。
  7. 根据权利要求1所述的基于联邦学习的用户数据分类方法,其中,将所述训练数据存储于区块链中。
  8. 一种基于联邦学习的用户数据分类装置,包括:
    梯度矩阵获取模块,用于获取训练数据,通过所述训练数据训练本地模型,并基于每个训练循环期间所述本地模型的权重矩阵的变化梯度,生成梯度矩阵;
    计算结果获取模块,用于计算所述梯度矩阵的通道的欧几里得范数,得到计算结果,并将所述计算结果以张量的形式进行保存;
    梯度矩阵更新模块,用于将预先设定的上载速率的作为通道选择阈值,从所述计算结果中,选择符合所述通道选择阈值的通道,作为目标通道,并将所述目标通道中的梯度矩阵作为目标梯度矩阵,其中,所述通道对应有所述训练数据的处理生成后的梯度矩阵;
    服务器的权重模块,用于选择参数非零的所述目标梯度矩阵,作为服务器的权重;
    本地模块更新模块,用于根据所述服务器的权重,对所述本地模型进行更新,得到更新后的本地模型;
    用户数据分类模块,用于基于所述更新后的本地模型,对用户数据进行分类。
  9. 一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:
    获取训练数据,通过所述训练数据训练本地模型,并基于每个训练循环期间所述本地模型的权重矩阵的变化梯度,生成梯度矩阵;
    计算所述梯度矩阵的通道的欧几里得范数,得到计算结果,并将所述计算结果以张量的形式进行保存;
    将预先设定的上载速率的作为通道选择阈值,从所述计算结果中,选择符合所述通道选择阈值的通道,作为目标通道,并将所述目标通道中的梯度矩阵作为目标梯度矩阵,其中,所述通道对应有所述训练数据的处理生成后的梯度矩阵;
    选择参数非零的所述目标梯度矩阵,作为服务器的权重;
    根据所述服务器的权重,对所述本地模型进行更新,得到更新后的本地模型;
    基于所述更新后的本地模型,对用户数据进行分类。
  10. 根据权利要求9所述的计算机设备,其中,所述获取训练数据,通过所述训练数 据训练本地模型,并基于每个训练循环期间所述本地模型的权重矩阵的变化梯度,生成梯度矩阵包括:
    获取用户数据,并对所述用户数据进行解析,得到本地模型的通用用户,并获取所述通用用户的对应数据,作为所述训练数据;
    通过所述训练数据训练本地模型,并基于每个训练循环期间所述本地模型的权重矩阵的变化梯度,生成得到梯度矩阵。
  11. 根据权利要求9所述的计算机设备,其中,所述将预先设定的上载速率的作为通道选择阈值,从所述计算结果中,选择符合所述通道选择阈值的通道,作为目标通道,并将所述目标通道中的梯度矩阵作为目标梯度矩阵包括:
    将所述计算结果转化为一阶张量的形式,并将所述计算结果进行排序,得到排序结果;
    计算所述预先设定的上载速率的分位数,得到上载速率的分位数;
    将所述上载速率的分位数作为通道选择阈值,选择所述排序结果中符合所述通道选择阈值的通道,作为目标通道;
    获取所述目标通道中的梯度矩阵,并将所述目标通道中的梯度矩阵作为所述目标梯度矩阵。
  12. 根据权利要求11所述的计算机设备,其中,所述将所述上载速率的分位数作为通道选择阈值,选择所述排序结果中符合所述通道选择阈值的通道,作为目标通道包括:
    在所述排序结果中,选择高于所述上载速率的分位数且其他参数为零的通道,作为所述目标通道。
  13. 根据权利要求9-12任一项所述的计算机设备,其中,所述根据所述服务器的权重,对所述本地模型进行更新包括:
    将所述服务器的权重传送到本地模型中,并通过服务器的权重对所述梯度矩阵进行更新,得到更新矩阵;
    通过所述更新矩阵对所述本地模型进行更新。
  14. 根据权利要求13所述的计算机设备,其中,在所述将所述服务器的权重传送到本地模型中,并通过服务器的权重对所述梯度矩阵进行更新,得到更新矩阵之前,所述方法包括:
    通过线性整流函数对本地模型的隐藏层进行激活,与S形函数对本地模型的输出层进行激活,构建人工神经网络;
    通过所述人工神经网络对连接层的神经元进行死亡率的预测,其中,每两个神经元间的连接都代表一个对于通过所述连接层的服务器的权重。
  15. 一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机可读指令,所述计算机可读指令被处理器执行时实现如下步骤:
    获取训练数据,通过所述训练数据训练本地模型,并基于每个训练循环期间所述本地模型的权重矩阵的变化梯度,生成梯度矩阵;
    计算所述梯度矩阵的通道的欧几里得范数,得到计算结果,并将所述计算结果以张量 的形式进行保存;
    将预先设定的上载速率的作为通道选择阈值,从所述计算结果中,选择符合所述通道选择阈值的通道,作为目标通道,并将所述目标通道中的梯度矩阵作为目标梯度矩阵,其中,所述通道对应有所述训练数据的处理生成后的梯度矩阵;
    选择参数非零的所述目标梯度矩阵,作为服务器的权重;
    根据所述服务器的权重,对所述本地模型进行更新,得到更新后的本地模型;
    基于所述更新后的本地模型,对用户数据进行分类。
  16. 根据权利要求15所述的一种计算机可读存储介质,其中,所述获取训练数据,通过所述训练数据训练本地模型,并基于每个训练循环期间所述本地模型的权重矩阵的变化梯度,生成梯度矩阵包括:
    获取用户数据,并对所述用户数据进行解析,得到本地模型的通用用户,并获取所述通用用户的对应数据,作为所述训练数据;
    通过所述训练数据训练本地模型,并基于每个训练循环期间所述本地模型的权重矩阵的变化梯度,生成得到梯度矩阵。
  17. 根据权利要求15所述的一种计算机可读存储介质,其中,所述将预先设定的上载速率的作为通道选择阈值,从所述计算结果中,选择符合所述通道选择阈值的通道,作为目标通道,并将所述目标通道中的梯度矩阵作为目标梯度矩阵包括:
    将所述计算结果转化为一阶张量的形式,并将所述计算结果进行排序,得到排序结果;
    计算所述预先设定的上载速率的分位数,得到上载速率的分位数;
    将所述上载速率的分位数作为通道选择阈值,选择所述排序结果中符合所述通道选择阈值的通道,作为目标通道;
    获取所述目标通道中的梯度矩阵,并将所述目标通道中的梯度矩阵作为所述目标梯度矩阵。
  18. 根据权利要求17所述的一种计算机可读存储介质,其中,所述将所述上载速率的分位数作为通道选择阈值,选择所述排序结果中符合所述通道选择阈值的通道,作为目标通道包括:
    在所述排序结果中,选择高于所述上载速率的分位数且其他参数为零的通道,作为所述目标通道。
  19. 根据权利要求15-18任一项所述的一种计算机可读存储介质,其中,所述根据所述服务器的权重,对所述本地模型进行更新包括:
    将所述服务器的权重传送到本地模型中,并通过服务器的权重对所述梯度矩阵进行更新,得到更新矩阵;
    通过所述更新矩阵对所述本地模型进行更新。
  20. 根据权利要求19所述的一种计算机可读存储介质,其中,在所述将所述服务器的权重传送到本地模型中,并通过服务器的权重对所述梯度矩阵进行更新,得到更新矩阵之前,所述方法包括:
    通过线性整流函数对本地模型的隐藏层进行激活,与S形函数对本地模型的输出层进行激活,构建人工神经网络;
    通过所述人工神经网络对连接层的神经元进行死亡率的预测,其中,每两个神经元间的连接都代表一个对于通过所述连接层的服务器的权重。
PCT/CN2020/135588 2020-10-12 2020-12-11 基于联邦学习的用户数据分类方法、装置、设备及介质 Ceased WO2021179720A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011085715.3 2020-10-12
CN202011085715.3A CN112100295A (zh) 2020-10-12 2020-10-12 基于联邦学习的用户数据分类方法、装置、设备及介质

Publications (1)

Publication Number Publication Date
WO2021179720A1 true WO2021179720A1 (zh) 2021-09-16

Family

ID=73784041

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/135588 Ceased WO2021179720A1 (zh) 2020-10-12 2020-12-11 基于联邦学习的用户数据分类方法、装置、设备及介质

Country Status (2)

Country Link
CN (1) CN112100295A (zh)
WO (1) WO2021179720A1 (zh)

Cited By (31)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113806691A (zh) * 2021-09-29 2021-12-17 河南星环众志信息科技有限公司 一种分位数的获取方法、设备及存储介质
CN113936192A (zh) * 2021-10-22 2022-01-14 国网河北省电力有限公司经济技术研究院 配电网同步量测缺失数据修复方法、终端及存储介质
CN113965937A (zh) * 2021-10-27 2022-01-21 东南大学 一种雾无线接入网中基于聚类联邦学习的内容流行度预测方法
CN114339252A (zh) * 2021-12-31 2022-04-12 深圳大学 一种数据压缩方法及装置
CN114418134A (zh) * 2022-01-20 2022-04-29 广州广电运通金融电子股份有限公司 一种基于区块链的联邦学习方法和系统
CN114492849A (zh) * 2022-01-24 2022-05-13 光大科技有限公司 一种基于联邦学习的模型更新方法及装置
CN114611722A (zh) * 2022-03-16 2022-06-10 中南民族大学 一种基于聚类分析的安全横向联邦学习方法
CN114650227A (zh) * 2022-01-27 2022-06-21 北京邮电大学 一种分层联邦学习场景下的网络拓扑构建方法及系统
CN114663149A (zh) * 2022-03-24 2022-06-24 润联软件系统(深圳)有限公司 一种基于隐私保护的产品投放方法及其相关设备
CN115238908A (zh) * 2022-03-15 2022-10-25 华东师范大学 基于变分自编码器、无监督聚类算法和联邦学习的数据生成方法
CN115293256A (zh) * 2022-08-02 2022-11-04 西北大学 一种由区块链辅助的联邦学习无线网络模型
CN115391734A (zh) * 2022-10-11 2022-11-25 广州天维信息技术股份有限公司 一种基于联邦学习的客户满意度分析系统
CN115567597A (zh) * 2022-09-29 2023-01-03 中国银行股份有限公司 一种支付结算系统的报文请求转发方法及装置
CN115731549A (zh) * 2022-11-18 2023-03-03 广东优算科技有限公司 水上船名联合识别方法、系统、电子装置和存储介质
CN115775026A (zh) * 2022-12-27 2023-03-10 重庆大学 一种基于组织相似度的联邦学习方法
CN115907041A (zh) * 2022-11-02 2023-04-04 华为技术有限公司 一种模型训练方法及装置
CN115935330A (zh) * 2023-02-24 2023-04-07 华谱科仪(北京)科技有限公司 色谱分析系统软件的功能授权方法、装置、设备和介质
CN116013067A (zh) * 2022-12-30 2023-04-25 中国联合网络通信集团有限公司 车辆数据处理方法、处理器及服务器
CN116361663A (zh) * 2023-06-01 2023-06-30 湖南工商大学 数字证据分类模型训练方法、分类方法、装置及相关设备
CN116468129A (zh) * 2023-04-27 2023-07-21 中山大学 一种基于模型参数差异化丢弃的通信高效联邦学习方法
CN116502709A (zh) * 2023-06-26 2023-07-28 浙江大学滨江研究院 一种异质性联邦学习方法和装置
CN116521952A (zh) * 2023-07-04 2023-08-01 北京富算科技有限公司 使用联邦学习模型进行人群包统计的方法及装置
CN116541769A (zh) * 2023-07-05 2023-08-04 北京邮电大学 一种基于联邦学习的节点数据分类方法及系统
CN116628543A (zh) * 2023-04-25 2023-08-22 之江实验室 一种基于元学习的不平衡数据联邦学习方法和系统
CN116827393A (zh) * 2023-06-30 2023-09-29 南京邮电大学 基于联邦学习的无蜂窝大规模mimo上行接收方法及系统
CN118133328A (zh) * 2024-05-10 2024-06-04 哈尔滨工业大学(深圳)(哈尔滨工业大学深圳科技创新研究院) 去中心化学习方法、系统及相关设备
CN119415223A (zh) * 2024-09-12 2025-02-11 中国科学院自动化研究所 任务性能控制方法、装置、设备、存储介质及程序产品
CN120321055A (zh) * 2025-06-18 2025-07-15 北京大学 基于联邦学习网络的网络嵌入方法、装置、电子设备及计算机程序产品
CN120877823A (zh) * 2025-09-26 2025-10-31 山东云海国创云计算装备产业创新中心有限公司 Nand闪存读取电压轴动态预测方法及装置、存储介质
CN121037123A (zh) * 2025-10-30 2025-11-28 南京邮电大学 一种用于抵御联邦学习后门攻击的防御方法、设备及介质
CN115907041B (zh) * 2022-11-02 2026-05-08 华为技术有限公司 一种模型训练方法及装置

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112763845B (zh) * 2020-12-23 2022-07-08 广东电网有限责任公司梅州供电局 基于联邦学习的边缘物联网固件故障检测方法和系统
CN113806759B (zh) * 2020-12-28 2024-07-16 京东科技控股股份有限公司 联邦学习模型的训练方法、装置、电子设备和存储介质
CN112288100B (zh) * 2020-12-29 2021-08-03 支付宝(杭州)信息技术有限公司 一种基于联邦学习进行模型参数更新的方法、系统及装置
CN112733901B (zh) * 2020-12-30 2024-01-12 杭州趣链科技有限公司 基于联邦学习和区块链的结构化动作分类方法与装置
CN112836829B (zh) * 2021-01-26 2022-08-02 支付宝(杭州)信息技术有限公司 一种个性化的隐私保护学习方法、装置以及设备
CN112990478B (zh) * 2021-02-22 2022-08-26 上海嗨普智能信息科技股份有限公司 联邦学习数据处理系统
CN113408743B (zh) * 2021-06-29 2023-11-03 北京百度网讯科技有限公司 联邦模型的生成方法、装置、电子设备和存储介质
CN113742428B (zh) * 2021-09-20 2023-11-03 易点生活电子商务有限公司 一种基于区块链的神经网络数据集存储方法
CN114118530B (zh) * 2021-11-04 2025-01-10 杭州经纬信息技术股份有限公司 一种基于多户电力消耗预测模型的预测方法及装置
CN114938349B (zh) * 2022-05-20 2023-07-25 远景智能国际私人投资有限公司 物联网数据处理方法、装置、计算机设备及存储介质
CN115310121B (zh) * 2022-07-12 2023-04-07 华中农业大学 车联网中基于MePC-F模型的实时强化联邦学习数据隐私安全方法
CN115270192B (zh) * 2022-09-26 2022-12-30 广州优刻谷科技有限公司 样本标签隐私风险评估方法、系统及存储介质
CN116702882A (zh) * 2023-06-09 2023-09-05 北京邮电大学 一种联邦学习的分组算法及系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170011280A1 (en) * 2015-07-07 2017-01-12 Xerox Corporation Extracting gradient features from neural networks
CN110288094A (zh) * 2019-06-10 2019-09-27 深圳前海微众银行股份有限公司 基于联邦学习的模型参数训练方法及装置
CN110569227A (zh) * 2019-08-09 2019-12-13 阿里巴巴集团控股有限公司 模型参数确定方法、装置和电子设备
CN111460528A (zh) * 2020-04-01 2020-07-28 支付宝(杭州)信息技术有限公司 一种基于Adam优化算法的多方联合训练方法及系统

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020185973A1 (en) * 2019-03-11 2020-09-17 doc.ai incorporated System and method with federated learning model for medical research applications
CN111190487A (zh) * 2019-12-30 2020-05-22 中国科学院计算技术研究所 一种建立数据分析模型的方法
CN111477290B (zh) * 2020-03-05 2023-10-31 上海交通大学 保护用户隐私的联邦学习和图像分类方法、系统及终端
CN111383113A (zh) * 2020-03-06 2020-07-07 深圳前海微众银行股份有限公司 可疑客户预测方法、装置、设备及可读存储介质
CN111008709A (zh) * 2020-03-10 2020-04-14 支付宝(杭州)信息技术有限公司 联邦学习、资料风险评估方法、装置和系统
CN111460511B (zh) * 2020-04-17 2023-05-02 支付宝(杭州)信息技术有限公司 基于隐私保护的联邦学习、虚拟对象分配方法和装置
CN111738775B (zh) * 2020-07-03 2021-03-05 支付宝(杭州)信息技术有限公司 一种用户支付意愿预测模型的训练方法及系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170011280A1 (en) * 2015-07-07 2017-01-12 Xerox Corporation Extracting gradient features from neural networks
CN110288094A (zh) * 2019-06-10 2019-09-27 深圳前海微众银行股份有限公司 基于联邦学习的模型参数训练方法及装置
CN110569227A (zh) * 2019-08-09 2019-12-13 阿里巴巴集团控股有限公司 模型参数确定方法、装置和电子设备
CN111460528A (zh) * 2020-04-01 2020-07-28 支付宝(杭州)信息技术有限公司 一种基于Adam优化算法的多方联合训练方法及系统

Cited By (41)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113806691A (zh) * 2021-09-29 2021-12-17 河南星环众志信息科技有限公司 一种分位数的获取方法、设备及存储介质
CN113806691B (zh) * 2021-09-29 2024-03-15 河南星环众志信息科技有限公司 一种分位数的获取方法、设备及存储介质
CN113936192A (zh) * 2021-10-22 2022-01-14 国网河北省电力有限公司经济技术研究院 配电网同步量测缺失数据修复方法、终端及存储介质
CN113965937A (zh) * 2021-10-27 2022-01-21 东南大学 一种雾无线接入网中基于聚类联邦学习的内容流行度预测方法
CN113965937B (zh) * 2021-10-27 2024-02-13 东南大学 一种雾无线接入网中基于聚类联邦学习的内容流行度预测方法
CN114339252A (zh) * 2021-12-31 2022-04-12 深圳大学 一种数据压缩方法及装置
CN114339252B (zh) * 2021-12-31 2023-10-31 深圳大学 一种数据压缩方法及装置
CN114418134A (zh) * 2022-01-20 2022-04-29 广州广电运通金融电子股份有限公司 一种基于区块链的联邦学习方法和系统
CN114492849A (zh) * 2022-01-24 2022-05-13 光大科技有限公司 一种基于联邦学习的模型更新方法及装置
CN114492849B (zh) * 2022-01-24 2023-09-08 光大科技有限公司 一种基于联邦学习的模型更新方法及装置
CN114650227A (zh) * 2022-01-27 2022-06-21 北京邮电大学 一种分层联邦学习场景下的网络拓扑构建方法及系统
CN114650227B (zh) * 2022-01-27 2023-08-18 北京邮电大学 一种分层联邦学习场景下的网络拓扑构建方法及系统
CN115238908A (zh) * 2022-03-15 2022-10-25 华东师范大学 基于变分自编码器、无监督聚类算法和联邦学习的数据生成方法
CN114611722B (zh) * 2022-03-16 2024-05-24 中南民族大学 一种基于聚类分析的安全横向联邦学习方法
CN114611722A (zh) * 2022-03-16 2022-06-10 中南民族大学 一种基于聚类分析的安全横向联邦学习方法
CN114663149A (zh) * 2022-03-24 2022-06-24 润联软件系统(深圳)有限公司 一种基于隐私保护的产品投放方法及其相关设备
CN115293256A (zh) * 2022-08-02 2022-11-04 西北大学 一种由区块链辅助的联邦学习无线网络模型
CN115567597A (zh) * 2022-09-29 2023-01-03 中国银行股份有限公司 一种支付结算系统的报文请求转发方法及装置
CN115391734A (zh) * 2022-10-11 2022-11-25 广州天维信息技术股份有限公司 一种基于联邦学习的客户满意度分析系统
CN115907041A (zh) * 2022-11-02 2023-04-04 华为技术有限公司 一种模型训练方法及装置
CN115907041B (zh) * 2022-11-02 2026-05-08 华为技术有限公司 一种模型训练方法及装置
CN115731549A (zh) * 2022-11-18 2023-03-03 广东优算科技有限公司 水上船名联合识别方法、系统、电子装置和存储介质
CN115775026A (zh) * 2022-12-27 2023-03-10 重庆大学 一种基于组织相似度的联邦学习方法
CN116013067A (zh) * 2022-12-30 2023-04-25 中国联合网络通信集团有限公司 车辆数据处理方法、处理器及服务器
CN115935330A (zh) * 2023-02-24 2023-04-07 华谱科仪(北京)科技有限公司 色谱分析系统软件的功能授权方法、装置、设备和介质
CN116628543A (zh) * 2023-04-25 2023-08-22 之江实验室 一种基于元学习的不平衡数据联邦学习方法和系统
CN116468129A (zh) * 2023-04-27 2023-07-21 中山大学 一种基于模型参数差异化丢弃的通信高效联邦学习方法
CN116361663B (zh) * 2023-06-01 2023-08-15 湖南工商大学 数字证据分类模型训练方法、分类方法、装置及相关设备
CN116361663A (zh) * 2023-06-01 2023-06-30 湖南工商大学 数字证据分类模型训练方法、分类方法、装置及相关设备
CN116502709A (zh) * 2023-06-26 2023-07-28 浙江大学滨江研究院 一种异质性联邦学习方法和装置
CN116827393B (zh) * 2023-06-30 2024-05-28 南京邮电大学 基于联邦学习的无蜂窝大规模mimo接收方法及系统
CN116827393A (zh) * 2023-06-30 2023-09-29 南京邮电大学 基于联邦学习的无蜂窝大规模mimo上行接收方法及系统
CN116521952B (zh) * 2023-07-04 2023-09-05 北京富算科技有限公司 使用联邦学习模型进行人群包统计的方法及装置
CN116521952A (zh) * 2023-07-04 2023-08-01 北京富算科技有限公司 使用联邦学习模型进行人群包统计的方法及装置
CN116541769A (zh) * 2023-07-05 2023-08-04 北京邮电大学 一种基于联邦学习的节点数据分类方法及系统
CN118133328A (zh) * 2024-05-10 2024-06-04 哈尔滨工业大学(深圳)(哈尔滨工业大学深圳科技创新研究院) 去中心化学习方法、系统及相关设备
CN119415223A (zh) * 2024-09-12 2025-02-11 中国科学院自动化研究所 任务性能控制方法、装置、设备、存储介质及程序产品
CN120321055A (zh) * 2025-06-18 2025-07-15 北京大学 基于联邦学习网络的网络嵌入方法、装置、电子设备及计算机程序产品
CN120877823A (zh) * 2025-09-26 2025-10-31 山东云海国创云计算装备产业创新中心有限公司 Nand闪存读取电压轴动态预测方法及装置、存储介质
CN121037123A (zh) * 2025-10-30 2025-11-28 南京邮电大学 一种用于抵御联邦学习后门攻击的防御方法、设备及介质
CN121037123B (zh) * 2025-10-30 2026-02-27 南京邮电大学 一种用于抵御联邦学习后门攻击的防御方法、设备及介质

Also Published As

Publication number Publication date
CN112100295A (zh) 2020-12-18

Similar Documents

Publication Publication Date Title
WO2021179720A1 (zh) 基于联邦学习的用户数据分类方法、装置、设备及介质
EP3965023A1 (en) Method and device for constructing decision trees
US11196541B2 (en) Secure machine learning analytics using homomorphic encryption
CN113011646B (zh) 一种数据处理方法、设备以及可读存储介质
CN112529101B (zh) 分类模型的训练方法、装置、电子设备及存储介质
CN113435583A (zh) 基于联邦学习的对抗生成网络模型训练方法及其相关设备
CN111081337B (zh) 一种协同任务预测方法及计算机可读存储介质
CN113761375B (zh) 基于神经网络的消息推荐方法、装置、设备及存储介质
WO2021120677A1 (zh) 一种仓储模型训练方法、装置、计算机设备及存储介质
CN112949760A (zh) 基于联邦学习的模型精度控制方法、装置及存储介质
CN109426861A (zh) 数据加密、机器学习模型训练方法、装置及电子设备
CN111563267A (zh) 用于联邦特征工程数据处理的方法和装置
CN115099875A (zh) 基于决策树模型的数据分类方法及相关设备
WO2021208701A1 (zh) 代码变更的注释生成方法、装置、电子设备及存储介质
CN115130711A (zh) 一种数据处理方法、装置、计算机及可读存储介质
CN113570512B (zh) 一种图像数据处理方法、计算机及可读存储介质
WO2021189908A1 (zh) 基于深度学习的图像分类方法、装置、服务器及介质
CN116186295A (zh) 基于注意力的知识图谱链接预测方法、装置、设备及介质
CN114282692A (zh) 一种纵向联邦学习的模型训练方法及系统
CN119599168A (zh) 医疗器械数字化供应链批量智能管理方法及装置
CN112434746A (zh) 基于层次化迁移学习的预标注方法及其相关设备
CN109376344A (zh) 表单的生成方法及终端设备
CN115525922A (zh) 基于隐私计算的金融隐私数据安全决策方法、装置及设备
CN115936909B (zh) 数据处理方法、装置、计算机设备及存储介质
CN118070307A (zh) 一种基于隐私计算的财务数据监管方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20924499

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20924499

Country of ref document: EP

Kind code of ref document: A1