Federated learning model training method, system, electronic device and readable storage medium
By using federated learning methods in the recommendation system for local data encryption training and model updates, the challenges of data privacy protection in the recommendation system are solved, effective protection and security of data privacy are achieved, and user privacy protection and data security needs are met. At the same time, it promotes fair cooperation and the resolution of engineering problems.
Patent Information
- Application Number
- CN202011415106.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-07
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2040-12-07
AI Technical Summary
There are challenges in recommendation systems to protect data privacy, especially the risks of malicious users and data privacy leakage, as well as strict requirements for data supervision, and existing technologies are difficult to effectively solve these problems.
Using federated learning methods, local data encryption training is carried out on client mobile devices, data sets are aligned and uploaded through encryption, and the global material factor matrix is updated using federated weighting algorithm to realize data isolation and model updates, ensuring data privacy protection and security .
It realizes the protection of data privacy, meets user privacy protection and data security needs, ensures the independence and fair cooperation of participants, and solves the problems of large amount of user data, expensive network connection costs, slow transmission speed and low transmission security.
Smart Images

Figure CN112487456B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data security protection technology, and in particular to a federated learning model training method, system, electronic device and readable storage medium for solving data privacy issues in recommendation systems. Background Art
[0002] Recommendation systems need to predict users' future behaviors and interests based on their historical behaviors and interests, so a large amount of user behavior data becomes an important component and prerequisite of recommendation systems. In the field of recommendation systems, hiding user data is a major challenge.
[0003] Most existing privacy-preserving personalized recommendation services assume that users participate honestly throughout the process. However, there are two situations that are not considered. One is the emergence of malicious users, such as some users who may deliberately provide invalid data to the recommender to disrupt the system. This would be a serious threat and has not been explored in most existing studies on privacy-preserving personalized recommendation services. Defense against this threat can be challenging, especially when the recommender only receives encrypted user data. Another situation is the emergence of malicious recommendations, such as mobile devices accessing web pages and videos. These projects usually access external storage-a shared location where different mobile applications store their files. These media recommendation projects can be used to infer privacy-sensitive information such as gender and social circles.
[0004] In China, users are not so keen on protecting data privacy, and applications require a lot of permissions. However, overseas, especially in European countries, GDPR controls are extremely strict, and collecting user privacy data is illegal. So how can we use massive amounts of user data legally and compliantly? Google first proposed the concept of federated learning.
[0005] Federated learning is a machine learning technology that can train algorithms between multiple distributed edge devices or servers with local data samples without exchanging data samples. Federated learning can fully utilize the data and computing power of the participants, allowing multiple parties to collaborate to build a universal and more robust machine learning model without sharing data. In an environment where data supervision is increasingly stringent, federated learning can solve key issues such as data ownership, data privacy, data access rights, and access to heterogeneous data. Therefore, since the concept of federated learning was proposed, it has been sought after by the artificial intelligence industry and has been applied to many industries, such as defense, telecommunications, medical care, and the Internet of Things. Summary of the invention
[0006] In response to the above-mentioned technical problem of protecting user data privacy, the present invention proposes a federated learning model training method, system, electronic device and readable storage medium for solving the data privacy problem in the recommendation system.
[0007] In a first aspect, an embodiment of the present application provides a federated learning model training method for solving data privacy issues in a recommendation system, including:
[0008] Matrix downloading step: download the global material factor matrix from the server;
[0009] Data set uploading step: updating the data set based on local data, the global material factor matrix and the local user factor vector and uploading the data set to the server;
[0010] Matrix sending step: the server updates the global material factor matrix based on the federated weighted algorithm and the updated local model and sends it to the user.
[0011] In the above-mentioned federated learning model training method, the global material factor matrix in the matrix downloading step is a random initialization model or a pre-trained model.
[0012] In the above-mentioned federated learning model training method, the data set uploading step includes:
[0013] Data aggregation step: aggregating explicit data and implicit data in the data set;
[0014] Vector updating step: using the local data and the global material factor matrix to update the local user factor vector;
[0015] Alignment step: using the local data and the updated local user factor vector, aligning the data set in different ways by encryption;
[0016] Upload step: encrypt the updated data set and upload it to the server via a secure protocol.
[0017] In the above-mentioned federated learning model training method, the matrix sending step includes:
[0018] Model updating step: updating the local model based on the updated data set;
[0019] Model aggregation step: the server aggregates the updated local models uploaded from various user clients through the federated weighted algorithm;
[0020] Matrix updating step: updating the global material factor matrix using the updated local model aggregation result;
[0021] Sending user step: the server sends the updated global material factor matrix to each user.
[0022] In a second aspect, an embodiment of the present application provides a federated learning model training system for solving data privacy issues in a recommendation system, including:
[0023] Matrix download module: download the global material factor matrix from the server;
[0024] Data set uploading module: based on local data, the global material factor matrix and the local user factor vector, the data set is updated and uploaded to the server;
[0025] Matrix sending module: The server updates the global material factor matrix based on the federated weighted algorithm and the updated local model and sends it to the user.
[0026] In the above-mentioned federated learning model training system, the global material factor matrix in the matrix download module is a random initialization model or a pre-trained model.
[0027] In the above-mentioned federated learning model training system, the data set uploading module includes:
[0028] Data aggregation unit: aggregates explicit data and implicit data in the data set;
[0029] Vector updating unit: using the local data and the global material factor matrix to update the local user factor vector;
[0030] Alignment unit: using the local data and the updated local user factor vector, aligning the data set in different ways by encryption;
[0031] Uploading unit: encrypts the updated data set and uploads it to the server via a security protocol.
[0032] The above-mentioned federated learning model training system, wherein the matrix sending module includes:
[0033] Model updating unit: performing local model updating based on the updated data set;
[0034] Model aggregation unit: the server aggregates the updated local models uploaded from various user clients through the federated weighted algorithm;
[0035] Matrix updating unit: updating the global material factor matrix using the updated result of the local model aggregation;
[0036] Sending user unit: the server sends the updated global material factor matrix to each user.
[0037] In a third aspect, an embodiment of the present application provides an electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the computer program, the federated learning model training method as described in the first aspect above is implemented.
[0038] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, which, when executed by a processor, implements the federated learning model training method as described in the first aspect above.
[0039] Compared with the prior art, the advantages and positive effects of the present invention are:
[0040] 1. The present invention adopts a federated learning method, uses local data on the client mobile device to perform local model encryption training, and then updates and summarizes it, thereby achieving data isolation and meeting users' needs for privacy protection and data security.
[0041] 2. The solution proposed in the present invention performs encrypted exchange of information and model parameters while ensuring that the parties involved maintain their independence. At the same time, the status of the parties involved is equal, promoting fair cooperation.
[0042] 3. The federated learning method adopted in the present invention can solve engineering problems such as large amount of user data, expensive network connection fees, slow transmission speed, and low transmission security. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 A schematic diagram of the steps of the federated learning model training method for solving the data privacy problem in the recommendation system provided by the present invention;
[0044] Figure 2 The present invention provides Figure 1 Flow chart of step S2;
[0045] Figure 3 The present invention provides Figure 1 Flow chart of step S3;
[0046] Figure 4 A schematic diagram of a flow chart of an embodiment of a federated learning model training method for solving data privacy issues in a recommendation system provided by the present invention;
[0047] Figure 5 A framework diagram of a federated learning model training system for solving data privacy issues in recommendation systems provided by the present invention;
[0048] Figure 6 A framework diagram of a computer device according to an embodiment of the present application.
[0049] Wherein, the accompanying drawings are marked as follows:
[0050] 11. Matrix download module; 12. Data set upload module; 121. Data aggregation unit; 122. Vector update unit; 123. Alignment unit; 124. Upload unit; 13. Matrix sending module; 131. Model update unit; 132. Model aggregation unit; 133. Matrix update unit; 134. Sending user unit; 81. Processor; 82. Memory; 83. Communication interface; 80. Bus. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0052] Obviously, the drawings described below are only some examples or embodiments of the present application. For ordinary technicians in this field, the present application can also be applied to other similar scenarios based on these drawings without creative work. In addition, it can also be understood that although the efforts made in this development process may be complicated and lengthy, for ordinary technicians in this field related to the content disclosed in this application, some changes in design, manufacturing or production based on the technical content disclosed in this application are just conventional technical means, and should not be understood as insufficient content disclosed in this application.
[0053] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0054] Unless otherwise defined, the technical terms or scientific terms involved in this application should be understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the" and the like involved in this application do not indicate a quantitative limitation, and may represent the singular or plural. The terms "include", "comprise", "have" and any of their variations involved in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects before and after are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0055] The present invention is described in detail below in conjunction with the various embodiments shown in the accompanying drawings, but it should be noted that these embodiments are not limitations of the present invention, and any equivalent transformations or substitutions in functions, methods, or structures made by ordinary technicians in the field based on these embodiments are all within the scope of protection of the present invention.
[0056] Before elaborating on each embodiment of the present invention in detail, the core inventive concept of the present invention is summarized and elaborated in detail through the following several embodiments.
[0057] This solution uses local data on the client mobile device for local model training based on the user's mobile device usage, aligns the data set in different ways through encryption, and then encrypts and uploads the update to the server through a secure protocol to finally form a shared model.
[0058] Embodiment 1:
[0059] Reference Figure 1 As shown, Figure 1 This is a schematic diagram of the steps of the federated learning model training method for solving the data privacy problem in the recommendation system provided by the present invention. Figure 1 As shown, this embodiment discloses a specific implementation method of a federated learning model training method (hereinafter referred to as the "method") for solving data privacy issues in recommendation systems.
[0060] Specifically, recommendation systems can be divided into two categories: collaborative filtering (CFB) recommendation systems and content-based (CB) recommendation systems. CFB recommends items with similar preferences to specific users based on the similarities between users. CB performs recommendations based on the nature of the items, which can be recommended through certain explicit features such as attributes and characteristics.
[0061] Recommended privacy protection scheme for CFB: usually adopt the privacy protection based on neighboring users method or machine learning based method.
[0062] 1. Existing solutions based on privacy-preserving neighbor-based methods usually use two main categories of technology. The first category is cryptographic techniques. The second category is randomization techniques. Cryptographic-based solutions usually require high-load computing and are not well suited for large-scale data. Randomization-based solutions apply random perturbations to the user's privacy-preserving data, which usually sacrifices accuracy for user privacy. However, this method has a lower computational load and is much faster than cryptographic-based methods.
[0063] 2. Based on privacy-preserving machine learning methods, the basic idea is to first train a machine learning model on the collected user data in a privacy-preserving manner, and then apply the model to generate personalized recommendations. The machine learning techniques commonly used in these studies include matrix factorization (MF) and ridge regression (RR). In order to protect privacy, these works usually rely on encryption techniques, including PHE, fully homomorphic encryption (FHE), and GCs.
[0064] Privacy protection scheme for CB recommendation: CB is a system that recommends items based on the attributes of the items. Two common applications of CB recommendation services are targeted advertising and targeted coupon distribution.
[0065] 1. Privacy-preserving targeted advertising, that is, targeted advertising and solutions to protect user personal information. Commonly used privacy protection mechanisms include local positioning, game theory, anonymization, cryptography, and obfuscation.
[0066] 2. Privacy protection targeted coupon distribution, that is, coupons are distributed to eligible users in a targeted manner. And the behavior profiles of these users can accurately meet the positioning data of suppliers.
[0067] The federated learning method solves the data privacy problem of the recommendation system. The problem that federated learning aims to solve is to build a virtual shared model without leaving each data locally. This virtual model is like aggregating everyone's data to build a global model.
[0068] In this process, as a mobile service provider, we do not collect user data and do not need to transmit the data to the server. We only need to pass parameters between the server and each node (Worker), thus solving the problem of data privacy.
[0069] The models built in this way only serve their respective goals locally. Under such an organizational mechanism, the identities and status of all participants are the same. The federated learning strategy establishes a data "sharing" strategy for everyone, thus maximizing public value and commercial value.
[0070] Since it is impossible to directly collect the original data of users due to reasons such as data not being shared, federated learning can be used to train collaborative filtering models. A collaborative filtering model can be represented as a combination of a user factor matrix consisting of multiple user factor vectors (each vector represents a depositor) and an item factor matrix consisting of multiple item factor vectors (each vector represents an item). Federated collaborative filtering is obtained by all users jointly learning these two matrices.
[0071] Specifically, the method disclosed in this embodiment mainly includes the following steps:
[0072] Step S1: Download the global material factor matrix from the server.
[0073] Specifically, the global material factor matrix is a random initialization model or a pre-training model.
[0074] Then refer to Figure 2 , execute step S2: update the data set based on local data, the global material factor matrix and the local user factor vector and upload it to the server.
[0075] Wherein, step S2 specifically includes the following contents:
[0076] Step S21: Aggregating explicit data and implicit data in the data set;
[0077] Among them, explicit data includes user exposure data, and implicit data consists of browsing history, click history, search logs and other information.
[0078] Step S22: using the local data and the global material factor matrix to update the local user factor vector;
[0079] Step S23: using the local data and the updated local user factor vector, aligning the data set in different ways by encryption;
[0080] Step S24: Encrypt the updated data set and upload it to the server via a security protocol.
[0081] Then refer to Figure 3 , execute step S3: the server updates the global material factor matrix based on the federated weighted algorithm and the updated local model and sends it to the user.
[0082] Wherein, step S3 specifically includes the following contents:
[0083] Step S31: updating the local model based on the updated data set;
[0084] Step S32: the server aggregates the updated local models uploaded from various user clients through the federated weighted algorithm;
[0085] Step S33: using the updated local model aggregation result to update the global material factor matrix;
[0086] Step S34: the server sends the updated global material factor matrix to each user.
[0087] The entire modeling process protects data privacy and rewards data owners who contribute more through an agreed mechanism.
[0088] Please refer to the following Figure 4 . Figure 4 A schematic diagram of a flow chart of an embodiment of a federated learning model training method for solving data privacy issues in a recommendation system provided by the present invention, combined with Figure 4 The specific application process of this method is as follows:
[0089] Based on the usage of the user's mobile phone, local data from different types of devices in different locations are used on the client's mobile device to train the local model. These user models are then updated and aggregated. When a consensus on the shared model is reached, a unified shared model is formed, and this process is repeated to continuously optimize the model algorithm.
[0090] For example, suppose a bank wants to train a collaborative filtering (CF) model so that depositors can find the financial information they want based on their personal preferences and popularity. Since it is impossible to directly collect the user's original data due to reasons such as data non-sharing, federated learning can be used to train a collaborative filtering model.
[0091] Generally, a collaborative filtering model can be represented as a combination of a user factor matrix consisting of multiple user factor vectors (each vector represents a depositor) and an item factor matrix consisting of multiple financial item factor vectors (each vector represents an item). Federated collaborative filtering is obtained by all users jointly learning these two matrices, as shown in the figure, and includes the following five steps:
[0092] 1. Each user (e.g., the user's mobile client) downloads the global financial material factor matrix from the server. The matrix can be a randomly initialized model or a pre-trained model.
[0093] 2. Each user aggregates explicit data and implicit data. Explicit data includes the user's exposure data, and implicit data consists of browsing history, click history, search logs and other information.
[0094] 3. Each user uses local data and the global financial material factor matrix to update the local user factor vector.
[0095] 4. Each user uses local data and local user factor vectors to align the dataset in different ways through encryption, and then encrypts and uploads the updates to the server through a secure protocol.
[0096] 5. The server aggregates the local model updates uploaded from each user client through a federated weighted algorithm. The aggregated results are used to update the global material factor matrix. After that, the server sends the global material factor matrix to each user. The entire modeling process protects data privacy and rewards the owner who contributes more data with an agreed mechanism.
[0097] With the explosive growth of Internet information, data isolation and data privacy protection are becoming the next challenges in the current Internet field, but federated learning has brought us new hope. With the promotion of technology and the improvement of standards, it will break down barriers between industries and establish a community that can safely share data and knowledge, so that every participant can share the benefits fairly. Federated learning has the following advantages:
[0098] 1. Realize data isolation: meet users' needs for privacy protection and data security.
[0099] 2. Meet regulatory needs: The Cybersecurity Law of the People's Republic of China, the EU's General Data Protection Regulation, the HIPAA Act, etc. all require that the collection of user data must be open and transparent. Enterprises or institutions cannot exchange user data without user authorization. Federated learning can meet such regulatory requirements.
[0100] 3. Avoid data silos: Federated learning exchanges information and model parameters in an encrypted manner while ensuring the independence of all parties involved. At the same time, the status of all parties involved is equal, promoting fair cooperation.
[0101] 4. Clear engineering obstacles: Federated learning can avoid engineering problems such as large amounts of user data, expensive network connections, slow transmission speeds, and low transmission security.
[0102] Embodiment 2:
[0103] In combination with the federated learning model training method for solving data privacy issues in recommendation systems disclosed in Example 1, this embodiment discloses a specific implementation example of a federated learning model training system (hereinafter referred to as the "system") for solving data privacy issues in recommendation systems.
[0104] Reference Figure 5 As shown, the system comprises:
[0105] Matrix download module 11: download the global material factor matrix from the server;
[0106] Data set uploading module 12: based on local data, the global material factor matrix and the local user factor vector, the data set is updated and uploaded to the server;
[0107] Matrix sending module 13: The server updates the global material factor matrix based on the federated weighted algorithm and the updated local model and sends it to the user.
[0108] Specifically, the global material factor matrix in the matrix download module 11 is a random initialization model or a pre-training model.
[0109] Specifically, the data set uploading module 12 includes:
[0110] Data aggregation unit 121: aggregates explicit data and implicit data in the data set;
[0111] Vector updating unit 122: using the local data and the global material factor matrix to update the local user factor vector;
[0112] Alignment unit 123: using the local data and the updated local user factor vector, aligning the data set in different ways by encryption;
[0113] The uploading unit 124 encrypts the updated data set and uploads it to the server via a security protocol.
[0114] Specifically, the matrix sending module 13 includes:
[0115] Model updating unit 131: performing local model updating based on the updated data set;
[0116] Model aggregation unit 132: the server aggregates the updated local models uploaded from various user clients through the federated weighted algorithm;
[0117] Matrix updating unit 133: updates the global material factor matrix using the updated result of the local model aggregation;
[0118] Sending user unit 134: the server sends the updated global material factor matrix to each user.
[0119] The federated learning model training system for solving data privacy issues in recommendation systems disclosed in this embodiment is similar to the technical solution of the federated learning model training method for solving data privacy issues in recommendation systems disclosed in Embodiment 1. Please refer to Embodiment 1 for the remaining identical parts, which will not be repeated here.
[0120] Embodiment three:
[0121] Combination Figure 6 As shown, this embodiment discloses a specific implementation of a computer device. The computer device may include a processor 81 and a memory 82 storing computer program instructions.
[0122] Specifically, the processor 81 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0123] Among them, the memory 82 may include a large-capacity memory for data or instructions. By way of example and not limitation, the memory 82 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 82 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 82 may be inside or outside the data processing device. In a specific embodiment, the memory 82 is a non-volatile memory. In a specific embodiment, the memory 82 includes a read-only memory (ROM) and a random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (Programmable Read-Only Memory, PROM for short), an erasable PROM (Erasable ProgrammableRead-Only Memory, EPROM for short), an electrically erasable PROM (Electrically Erasable ProgrammableRead-Only Memory, EEPROM for short), an electrically alterable ROM (Electrically Alterable Read-Only Memory, EAROM for short) or a flash memory (FLASH) or a combination of two or more of these. Under appropriate circumstances, the RAM can be a static random access memory (SRAM) or a dynamic random access memory (DRAM), wherein the DRAM can be a fast page mode dynamic random access memory (FPMDRAM), an extended data output dynamic random access memory (EDODRAM), a synchronous dynamic random access memory (SDRAM), etc.
[0124] The memory 82 may be used to store or cache various data files required for processing and / or communication, as well as possible computer program instructions executed by the processor 81 .
[0125] The processor 81 implements any one of the federated learning model training methods in the above embodiments by reading and executing computer program instructions stored in the memory 82.
[0126] In some of these embodiments, the computer device may further include a communication interface 83 and a bus 80. Figure 6 As shown, the processor 81, the memory 82, and the communication interface 83 are connected via a bus 80 and communicate with each other.
[0127] The communication interface 83 is used to implement communication between the modules, devices, units and / or equipment in the embodiment of the present application. The communication port 83 can also implement data communication with other components such as: external devices, image / data acquisition equipment, databases, external storage, and image / data processing workstations.
[0128] The bus 80 includes hardware, software or both, and couples the components of the computer device to each other. The bus 80 includes but is not limited to at least one of the following: a data bus, an address bus, a control bus, an expansion bus, and a local bus. By way of example and not limitation, bus 80 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, bus 80 may include one or more buses. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.
[0129] In addition, in combination with the method for training a federated learning model in the above embodiment, the embodiment of the present application may provide a computer-readable storage medium for implementation. The computer-readable storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any one of the methods for training a federated learning model in the above embodiment is implemented.
[0130] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0131] In summary, the beneficial effects of the present invention are that the present invention adopts a federated learning method, uses local data on a client mobile device to perform encrypted training of a local model, and then updates and summarizes it, thereby achieving data isolation and meeting user needs for privacy protection and data security; while ensuring that the independence of all parties involved is maintained, encrypted exchange of information and model parameters is performed, and at the same time, the status of all parties involved is equal, promoting fair cooperation; and engineering problems such as large amounts of user data, expensive network connection fees, slow transmission speeds, and low transmission security are solved.
[0132] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for training a federated learning model, characterized in that: Used to solve data privacy issues in recommendation systems, including: Matrix downloading steps: Download the global material factor matrix from the server; Data set uploading step: updating the data set based on local data, the global material factor matrix and the local user factor vector and uploading the data set to the server; Matrix sending step: the server updates the global material factor matrix based on the federated weighted algorithm and the updated local model and sends it to the user; Wherein, the matrix sending step includes: Model updating step: updating the local model based on the updated data set; Model aggregation step: the server aggregates the updated local models uploaded from various user clients through the federated weighted algorithm; Matrix updating step: updating the global material factor matrix using the updated local model aggregation result; Sending user step: the server sends the updated global material factor matrix to each user.
2. The federated learning model training method according to claim 1, characterized in that: The global material factor matrix in the matrix downloading step is a random initialization model or a pre-training model.
3. The federated learning model training method according to claim 1, characterized in that: The data set uploading step includes: Data aggregation step: aggregating explicit data and implicit data in the data set; Vector updating step: using the local data and the global material factor matrix to update the local user factor vector; Alignment step: using the local data and the updated local user factor vector, aligning the data set in different ways by encryption; Upload step: encrypt the updated data set and upload it to the server via a secure protocol.
4. A federated learning model training system, characterized in that: Used to solve data privacy issues in recommendation systems, including: Matrix download module: download the global material factor matrix from the server; Data set uploading module: based on local data, the global material factor matrix and the local user factor vector, the data set is updated and uploaded to the server; Matrix sending module: the server updates the global material factor matrix based on the federated weighted algorithm and the updated local model and sends it to the user; Wherein, the matrix sending module includes: Model updating unit: performing local model updating based on the updated data set; Model aggregation unit: the server aggregates the updated local models uploaded from various user clients through the federated weighted algorithm; Matrix updating unit: updating the global material factor matrix using the updated result of the local model aggregation; Sending user unit: the server sends the updated global material factor matrix to each user.
5. The federated learning model training system according to claim 4, characterized in that: The global material factor matrix in the matrix download module is a random initialization model or a pre-training model.
6. The federated learning model training system according to claim 4, characterized in that: The data set uploading module includes: Data aggregation unit: aggregates explicit data and implicit data in the data set; Vector updating unit: using the local data and the global material factor matrix to update the local user factor vector; Alignment unit: using the local data and the updated local user factor vector, aligning the data set in different ways by encryption; Uploading unit: encrypts the updated data set and uploads it to the server through a security protocol.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, it implements the federated learning model training method as described in any one of claims 1 to 3.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, it implements the federated learning model training method as described in any one of claims 1 to 3.
