A federated learning course recommendation method based on a consortium chain

By building a consortium blockchain network among online learning platforms and utilizing differential privacy and blockchain technologies, the problems of data privacy leakage and data silos in course recommendation systems were solved. This enabled a secure and efficient multi-party collaborative training model, improving the accuracy of course recommendations and the reliability of the system.

CN117370644BActive Publication Date: 2026-05-26BEIJING INST OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING INST OF TECH
Filing Date
2023-08-21
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

The course recommendation system suffers from data privacy leaks and data silos, making it difficult to achieve effective data sharing and model training while ensuring user privacy and security.

Method used

We adopt a federated learning approach based on consortium blockchains. By building a consortium blockchain network among online course platforms, we use differential privacy technology to protect data privacy, and achieve multi-party collaborative training of models through committee mechanisms and smart contracts. We also combine blockchain technology to ensure data consistency and security.

Benefits of technology

This approach improves the accuracy and efficiency of the course recommendation model while ensuring user privacy and security, reduces the impact of centralized server failures, and enhances the system's reliability and scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117370644B_ABST
    Figure CN117370644B_ABST
Patent Text Reader

Abstract

This invention discloses a federated learning course recommendation method based on a consortium blockchain, belonging to the field of blockchain and privacy computing technology applications. Addressing the data privacy leakage and data silo problems faced by course recommendation systems, this invention decentralizes traditional federated learning through a consortium blockchain, enhancing the reliability of the entire system and avoiding the decline in machine learning performance due to main server failure. Simultaneously, it employs differential privacy by encrypting model parameters through noise addition, preventing attackers from inferring users' personal information from model parameters and effectively protecting the platform's data content. Furthermore, through a committee mechanism and the consortium blockchain's access mechanism, the committee can approve and allow new platforms to join as on-chain nodes, providing model updates for all members, and the committee mechanism provides all members with the opportunity to propose training tasks. This method exhibits good security, scalability, and higher efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a federated learning course recommendation method based on consortium blockchain, belonging to the field of blockchain and privacy computing technology applications. Background Technology

[0002] Recommendation systems are systems that use historical user behavior data to create user profiles, predict user preferences, and recommend goods or services to users. They are widely used in various aspects of people's lives. Course recommendation, in particular, is an application solution where online learning platforms, with their vast resources, tailor courses to individual users. Currently, more and more people, especially students, are learning online through online learning platforms, and course recommendation is one of the most important functions of these platforms. Course recommendations understand learners' preferences by analyzing historical course records and their own characteristics, filtering and selecting suitable courses from a large pool of options to provide suggestions for learners to quickly choose courses. However, building a secure course recommendation system still presents many challenges.

[0003] 1. Data privacy breaches. Educational data contains a lot of users' private information. Deeply mining educational data using various technologies may lead to the leakage of users' privacy.

[0004] 2. The problem of data silos. Due to factors such as data confidentiality and privacy, learning recommendation systems tend to be relatively self-contained, exhibiting fragmented data storage characteristics, i.e., forming "data silos" between systems. Therefore, it is difficult to provide the big data to support educational decisions. At the same time, online course platforms differ in their data storage methods, formats, and content, and also in their educational processes, target audiences, and teaching methods, leading to data silos and fragmentation.

[0005] Federated learning technology helps multiple organizations effectively use data and perform machine learning modeling while meeting user privacy, data security, and government regulations. This technology allows multiple parties to participate in machine learning while ensuring the security of end-user data and personal privacy, and guaranteeing legality. Its key features include strong scalability, high privacy security, and the ability to keep data within its own domain, ensuring that personal privacy is not compromised. Due to its privacy-preserving nature and ability to collaboratively train models, federated learning is highly recommended for course recommendations.

[0006] However, participants in federated learning come from different online course platforms, making it difficult to fully trust each other and find reliable third parties. Furthermore, a failure in a highly centralized server would severely impact the training of the global model. Therefore, this paper considers combining consortium blockchains and federated learning for course recommendation. Big data is stored locally, allowing data owners to train the federated learning task, while data integrity is maintained by a distributed blockchain ledger, forming a trusted multi-party collaborative course recommendation model training scheme. Compared to distributed machine learning, federated learning requires a decentralized distributed system to ensure user privacy and security.

[0007] As a decentralized, encrypted, and tamper-proof distributed ledger, blockchain can provide better privacy and security for federated learning, preventing the failure of centralized servers from affecting the efficiency of machine learning. Blockchain can ensure data consistency among multiple participants providing data for model training, and its reward mechanism can also increase the incentive for each participant to provide data and update network model parameters. Summary of the Invention

[0008] The purpose of this invention is to effectively solve the technical problems of data privacy leakage and data silos faced by course recommendation systems, and to propose a federated learning course recommendation method based on consortium blockchain.

[0009] First, let's explain the relevant definitions:

[0010] Definition 1: Federated Learning

[0011] A distributed machine learning technique whose core idea is to conduct distributed model training among multiple data sources with local data, and to build a global model based on virtual fused data without exchanging local individual or sample data, but only by exchanging model parameters or intermediate results, thereby achieving a balance between data privacy protection and data sharing computing.

[0012] Definition 2: Consortium Blockchain Network

[0013] It refers to a machine that provides distributed trust, with nodes provided by various organizations; the consortium blockchain network has an access control mechanism, and only authorized participating organizations and their users can access on-chain data and invoke smart contracts; the consortium blockchain network is responsible for storing model parameters and the aggregation model for each round.

[0014] Definition 3: Committee

[0015] This refers to an alliance composed of major online course platforms, responsible for proposing training tasks, proving the importance of the tasks, standardizing data formats, and jointly releasing federated learning tasks, including target model accuracy, global knowledge feature matrix, and user behavior feature information matrix.

[0016] Definition 4: Consensus Node

[0017] It refers to the consortium blockchain node that runs the consortium blockchain consensus protocol, packages transactions and generates new blocks, and ensures the consistency of stored transactions;

[0018] Definition 5: Smart Contracts

[0019] It refers to a computer protocol designed to disseminate, verify, or execute contracts in an information-based manner; smart contracts allow for trusted transactions without a third party, and these transactions are traceable and irreversible; there are two types of contracts in cross-organizational resource management and access control systems: access control policy storage contracts and access request processing contracts.

[0020] Definition 6: Differential Privacy

[0021] Differential privacy refers to a data privacy protection technology that aims to make data query results insensitive to changes in individual records within a dataset, offering good privacy protection performance and scalability. However, differential privacy technology needs to balance privacy and data availability; that is, the added noise cannot be so large as to affect the usability of the data.

[0022] Definition 7: Local Client

[0023] This refers to the various devices or individuals participating in federated learning, where each local client retains its own data, provides local computing power, and uses a local model for training.

[0024] The local clients are the various online learning platforms within the consortium. They communicate with other platforms through the consortium blockchain to share updates to their local models, thereby enabling global model updates. To enhance privacy protection, the local clients can utilize techniques such as differential privacy to safeguard their private data.

[0025] Definition 8: Aggregation Server

[0026] The aggregation server is the node responsible for coordinating the entire federated learning process. It needs to coordinate the model training of all participants, receive updates to the model parameter gradients from each party, aggregate the gradients, and update the global model to improve its accuracy and generalization ability.

[0027] The aggregation server is the master node selected by the consortium. Model parameters uploaded by other nodes are aggregated through the master node, enabling data sharing and joint analysis while protecting privacy and data security.

[0028] To achieve the above objectives, the present invention adopts the following technical solution.

[0029] A federated learning course recommendation method based on consortium blockchain includes the following steps:

[0030] Step 1: System initialization.

[0031] The various online learning platforms form a consortium blockchain to initialize the blockchain and the federated learning process. The committee jointly releases the federated learning task, including the target model accuracy, loss function, global knowledge feature matrix, and user behavior feature information matrix.

[0032] Specifically, it includes the following steps:

[0033] Step 1.1: Each participating platform provides nodes to jointly build the consortium blockchain network and initialize the consortium blockchain.

[0034] Step 1.2: The platforms discuss and decide on the target model to train, and provide the target model accuracy, loss function, global knowledge feature matrix, and user behavior feature information matrix.

[0035] Step 1.3: The committee broadcasts the training task and initial model via the consortium blockchain.

[0036] Step 2: Local model training.

[0037] Each platform obtains the initial model, trains the local model using learners' learning behavior data, extracts the updated model data, and requires that the accuracy of the locally trained model must not be lower than the required task accuracy.

[0038] Specifically, it includes the following steps:

[0039] Step 2.1: Each platform receives the initial model of federated learning issued by the committee through consortium links, and the initial model is downloaded through neighboring nodes.

[0040] Step 2.2: Each platform uses the initial model and local data to train the local model using the gradient descent method, and finally obtains the local model trained on each platform.

[0041] Step 3: Add noise to the model parameters and upload them.

[0042] Each platform injects noise that satisfies differential privacy into its model parameters and then uploads them to the consortium blockchain; the consortium blockchain is responsible for verifying the local model parameters of all platforms.

[0043] Specifically, it includes the following steps:

[0044] Step 3.1: Each platform injects Gaussian noise that satisfies differential privacy into the trained model parameters to improve the security of the model parameters;

[0045] Step 3.2: Each platform uploads its privacy-preserving local model parameters to the consortium blockchain. The consortium blockchain verifies the local model parameters of other platforms and records the model parameters in the ledger.

[0046] Step 4: Model aggregation.

[0047] In each round, one node from the committee is selected as the master node. The master node aggregates the models based on the model parameters uploaded by each node through the consortium blockchain using a federated averaging algorithm (FedAvg). The master node then generates a new block based on the aggregated model and broadcasts it to the consortium blockchain.

[0048] Specifically, it includes the following steps;

[0049] Step 4.1: Based on the order in which the platform participates in the committee, each node will be selected as the main node in each round of learning;

[0050] Step 4.2: The master node aggregates the privacy-preserving model parameters of each node using the federated averaging algorithm to obtain a global model, and generates a new block based on the global model.

[0051] Step 4.3: The master node broadcasts the newly generated block to the consortium blockchain network.

[0052] Step 5: Model update.

[0053] Each participating platform downloads new blocks from neighboring nodes, obtains global model updates, and updates its local model.

[0054] Specifically, it includes the following steps;

[0055] Step 5.1: The platform downloads and records the new block through neighboring nodes, and obtains the global model update in the new block;

[0056] Step 5.2: Each node uses the global model to update its local model.

[0057] Step 6: Use the platform to collaboratively train and obtain a global recommendation model to complete online course recommendations.

[0058] Beneficial effects

[0059] The method of the present invention has the following advantages compared with the prior art:

[0060] 1. This method has good security, specifically: it decentralizes traditional federated learning through consortium blockchain, which enhances the reliability of the entire system and avoids the decline in machine learning performance due to main server failure. At the same time, it adopts differential privacy method and encrypts the model parameters by adding noise, preventing attackers from inferring users' personal information through the model parameters, thus effectively protecting the platform's data content.

[0061] 2. This method has good scalability. Through the committee mechanism and the access mechanism of the consortium blockchain, the committee can approve and allow new platforms to join as on-chain nodes, providing model updates for all members. At the same time, the committee mechanism also gives all members the opportunity to propose training tasks.

[0062] 3. This method is more efficient, specifically because: compared to a single platform, the data collaboration between platforms is more comprehensive, with a sufficient number of samples, resulting in a more accurate and effective model for course recommendation. This solution employs a consortium blockchain mechanism, which reduces communication overhead and improves operational efficiency. Attached Figure Description

[0063] Figure 1 This is a schematic diagram of the local model training in federated learning according to the present invention.

[0064] Figure 2 This is a schematic diagram of the consortium blockchain aggregation verification part of the present invention. Detailed Implementation

[0065] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0066] Example

[0067] like Figure 1 , 2 As shown, a federated learning course recommendation method based on a consortium blockchain is presented. This embodiment details the method for training a model and recommending courses in an educational data sharing scenario. In this scenario, online course platforms A, B, C, D, and E collaborate. A committee composed of all online course platforms initiates a federated learning task. The platforms train the model locally and send the model parameters to the blockchain for aggregation, thereby enabling the platforms to collaboratively complete the model training.

[0068] Specifically, this method includes the following procedures:

[0069] Step 1: System initialization.

[0070] A consortium comprised of platforms A, B, C, D, and E forms a consortium blockchain to initialize the blockchain and federated learning. The committee jointly releases the federated learning task, including the target model accuracy, the loss function global knowledge feature matrix, and the user behavior feature information matrix.

[0071] Specifically, it includes the following steps:

[0072] Step 1.1: Each participating platform provides nodes to jointly build the consortium blockchain network and perform blockchain initialization;

[0073] Step 1.2: The platforms discuss and determine the initial global model θ0, and give the target model accuracy and loss function. The global knowledge feature matrix and user behavior feature information matrix, as well as the hyperparameters used for training, including the number of training ep, learning rate lr, and the number of local training ep. local Local training batch size (bs) local .

[0074] Where L represents the loss function, such as the cross-entropy loss function or the squared loss function, and technicians can choose different loss functions according to actual needs; θ represents the model parameters; d i This represents the local data owned by the i-th participating platform; N represents the number of platforms participating in the training.

[0075] Step 1.3: With platform A as the master node, the committee broadcasts training task M via blockchain. i and the initial model parameters θ0.

[0076] Step 2: Local model training.

[0077] Each platform uses relevant technologies to remove information that does not conform to the rules from the local model and builds a new local model. It then trains the local model using learners' learning behavior data, extracts the updated data, and requires that the accuracy of the locally trained model not be lower than the required task accuracy.

[0078] Specifically, it includes the following steps:

[0079] Step 2.1: Each platform receives the federated learning task M issued by the committee through an alliance link. i This task downloads the initial model parameters θ0 through adjacent nodes.

[0080] Step 2.2: Each platform uses the initial model θ0 and the learner behavior data collected locally on each platform. Model training is performed locally on each platform, and the local model parameters are obtained in round t.

[0081] Step 3: Add noise to the local model parameters and then upload them.

[0082] Each platform injects noise that satisfies differential privacy into its model parameters and then uploads them to the consortium blockchain. The consortium blockchain is responsible for verifying the local model parameters of all platforms.

[0083] Specifically, it includes the following steps:

[0084] Step 3.1: Each platform injects Gaussian noise that satisfies differential privacy into the trained model parameters. Let N(0,σ) represent the model parameters obtained by the i-th platform in the t-th round of training, where i∈(A,B,C,D,E); σ represents the variance of the Gaussian distribution; N(0,σ) 2 ) represents a Gaussian distribution centered at 0 with variance σ.

[0085] Step 3.2: The platform uploads the privacy-preserving local model to the blockchain. The consortium blockchain is responsible for verifying the platform's local model parameters and recording the local model parameters in the ledger.

[0086] Specifically, in step 3, the privacy-preserving local model training algorithm ClientUpdate for each platform is as follows:

[0087] Input: Platform: i, where i∈(A,B,C,D,E); Initial model: θ0; Learning rate: η; Number of local iterations: T i The training sample size for each round is B;

[0088] Output: Local model parameters

[0089] The platform uses the initial model parameters θ0 and local data to train and update the local model parameters:

[0090] For each iteration t = 1, 2, ..., T i Perform the following operations

[0091]

[0092] Step 4: Model aggregation.

[0093] In each round, one node from the committee is selected as the master node. The master node aggregates the models based on the model parameters uploaded by each node through the blockchain using a federated averaging algorithm (FedAvg). The master node generates a new block based on the aggregated model and broadcasts it to the blockchain.

[0094] Specifically, it includes the following steps;

[0095] Step 4.1: Based on the order in which the platform participates in the committee, each node will be selected as the main node in each round of learning;

[0096] Step 4.2: The master node aggregates the encrypted model parameters from each node using a federated averaging algorithm to obtain a new global model W. t+1 Meanwhile, the master node generates a new block based on the aggregation model;

[0097] Step 4.3: The master node broadcasts the newly generated block to the blockchain network.

[0098] Specifically, the FedAvg algorithm in step 4 is as follows:

[0099] For each round, update round t = 1, 2, ..., T.

[0100] S t ←(A,B,C,D,E)

[0101] For each platform i∈S t do

[0102]

[0103]

[0104] Where T represents the number of rounds of global model training; θ t T represents the initial model parameters in round t; η represents the platform's local learning rate; T i Let represent the number of local iterations for the i-th platform; B represents the size of the training data samples in each round of local training; and N represents the total number of platforms participating in the training. k This represents the total amount of local data possessed by the k-th platform participating in the training.

[0105] Step 5: Model update.

[0106] Each participating platform downloads new blocks from neighboring nodes to obtain global model updates and update its local model.

[0107] Specifically, it includes the following steps;

[0108] Step 5.1: The platform downloads and records the new block through neighboring nodes, and obtains the global model update in the new block;

[0109] Step 5.2: Each node updates its local model using the global model.

[0110] Step 6: Use the platform to collaboratively train and obtain the global recommendation model θ to complete the online course recommendation.

[0111] The above description is merely a preferred embodiment of the present invention, and the present invention should not be limited to the content disclosed in this embodiment and the accompanying drawings. Any equivalent or modified embodiments made without departing from the spirit of the present invention fall within the scope of protection of the present invention.

Claims

1. A federated learning course recommendation method based on consortium blockchain, characterized in that, Includes the following steps: Step 1: By various online learning platforms Form a consortium blockchain and initialize the consortium blockchain and federated learning. Among them, the committee jointly released federated learning tasks, including target model accuracy, loss function, global knowledge feature matrix, and user behavior feature information matrix; Step 1 includes the following steps: Step 1.1: Each platform provides nodes to jointly build the consortium blockchain network and initialize the consortium blockchain; Step 1.2: Discussions among the platforms to determine the initial global model. The target model accuracy and loss function are given. The global knowledge feature matrix and user behavior feature information matrix, as well as the hyperparameters used for training, including the number of training epochs. Learning rate Number of rounds of local training Batch size for local training ; in, This represents the loss function, and technicians can choose different loss functions based on actual needs; Indicates model parameters; This represents the local data owned by the i-th participating platform; Indicates the number of platforms participating in the training; Step 1.3: Using one of the platforms as the master node, the committee broadcasts the training task via the blockchain. and initial model parameters ; Step 2: Each platform obtains the initial model, trains the local model using learners' learning behavior data, and extracts the updated model data. The accuracy of the locally trained model must not be lower than the required task accuracy. Step 3: Each platform injects noise that satisfies differential privacy into its model parameters and then uploads them to the consortium blockchain; the consortium blockchain is responsible for verifying the local model parameters of all platforms. Step 4: In each round, one node from the committee is selected as the master node; the master node aggregates the models based on the model parameters uploaded by each node through the consortium blockchain using a federated averaging algorithm; the master node generates a new block based on the aggregated model and broadcasts it to the consortium blockchain; Step 5: Each participating platform downloads new blocks from neighboring nodes, obtains global model updates, and updates its local model; Step 6: Use the platform to collaboratively train and obtain a global recommendation model to complete online course recommendations.

2. The federated learning course recommendation method based on consortium blockchain as described in claim 1, characterized in that, Step 2 includes the following steps: Step 2.1: Each platform receives the initial federated learning model issued by the committee through consortium links, and the initial model is downloaded through neighboring nodes; Step 2.2: Each platform uses the initial model and local data to train the local model using the gradient descent method, and finally obtains the local model trained on each platform.

3. The federated learning course recommendation method based on consortium blockchain as described in claim 1, characterized in that, Step 3 includes the following steps: Step 3.1: Each platform injects Gaussian noise that satisfies differential privacy into the trained model parameters to improve the security of the model parameters; Each platform injects Gaussian noise that satisfies differential privacy into the trained model parameters. , ,in Let represent the model parameters obtained by the i-th platform in the t-th round of training, and This represents the variance of the Gaussian distribution; Indicates that it is centered at 0. The variance is a Gaussian distribution; Step 3.2: Each platform uploads its privacy-preserving local model parameters to the consortium blockchain. The consortium blockchain verifies the local model parameters of other platforms and records the model parameters in the ledger.

4. The federated learning course recommendation method based on consortium blockchain as described in claim 1, characterized in that, Step 4 includes the following steps: Step 4.1: Based on the order in which the platform participates in the committee, each node will be selected as the main node in each round of learning; Step 4.2: The master node aggregates the encrypted model parameters from each node using a federated averaging algorithm to obtain a new global model. Meanwhile, the master node generates a new block based on the aggregation model; Step 4.3: The master node broadcasts the newly generated block to the consortium blockchain network.

5. The federated learning course recommendation method based on consortium blockchain as described in claim 1, characterized in that, Step 5 includes the following steps: Step 5.1: The platform downloads and records the new block through neighboring nodes, and obtains the global model update in the new block; Step 5.2: Each node updates its local model using the global model.