Online transfer learning method and system based on blockchain privacy computation

By conducting online transfer learning in a blockchain privacy computing environment, traditional federated learning is solved, and the circulation of data value and privacy security is realized.

WO2025055145A1PCT designated stage expired Publication Date: 2025-03-20HANGZHOU YUNXIANG NETWORK TECH

Patent Information

Application Number
PCT/CN2023/136084
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-09-13
Filing Date
2023-12-04
Publication Date
2025-03-20

AI Technical Summary

Technical Problem

Traditional federated learning is difficult to deal with the difference in sample space and feature space of data from different sources, and there is a problem of data privacy protection.

Method used

The online transfer learning method based on blockchain privacy computing is adopted, and the model parameters are protected by receiving multi-source domain data in a trusted execution environment, the local model is trained and the local differential privacy algorithm is used, and the model aggregation and update is performed on the blockchain node.

Benefits of technology

Solve data silos without sharing local data, protect privacy and effectively mine data, promote the circulation of data value, and identify and prevent poisoning attacks by malicious nodes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023136084_20032025_PF_FP_ABST
    Figure CN2023136084_20032025_PF_FP_ABST
Patent Text Reader

Abstract

An online transfer learning method and system based on blockchain privacy computation, relating to the domain of privacy computation, and in particular to online transfer learning. According to the method, in a trusted execution environment, multiple pieces of source domain data and one piece of target domain data are respectively trained to obtain local models; additionally, a local differential privacy algorithm is used to protect intermediate parameters in a local model training process; then a blockchain node collects the local models and uses an adaptive model aggregation algorithm to aggregate the models; and finally, an aggregated model is used to perform a learning task on a new sample of a target domain, and the aggregated model is updated on the basis of feedback data of the new sample learning task. The online transfer learning method based on blockchain privacy computation can break a data silo barrier, and effectively joint multi-party data while protecting local data privacy, thereby implementing open sharing of data, and facilitating data value circulation.
Need to check novelty before this filing date? Find Prior Art

Description

Online transfer learning method and system based on blockchain privacy computing Technical Field

[0001] The present invention relates to blockchain privacy computing technology and transfer learning, and specifically to an online transfer learning method and system based on blockchain privacy computing. Background Art

[0002] In a digital society, there's a stronger demand for data as a production factor. Both user services and business marketing require vast amounts of data. Especially in distributed, collaborative business models, all parties expect data to flow smoothly and its value be properly reflected. This presents two challenges: data silos and data privacy. Federated learning, a distributed machine learning paradigm, effectively addresses the data silo issue, enabling participants to jointly model without sharing data. Furthermore, blockchain is essentially a distributed ledger, with each full-block node maintaining a complete and identical ledger. Through a trust mechanism built using technologies like encryption algorithms and consensus mechanisms, the stored data is secure, reliable, and tamper-proof. A user-centric approach to exchanging data while maintaining security and privacy, while providing high-quality, compliant services, is the trend in building a digital society.

[0003] In real-world applications, data from different sources contain different sample and feature spaces, making traditional federated learning inadequate. Transfer learning focuses on identifying knowledge from the source domain that can be leveraged in the target domain to aid learning and complete tasks in the target domain. Furthermore, samples from the target domain are often not readily available, so online learning methods are used to address this issue.

[0004] Summary of the Invention

[0005] Based on the above background and problems existing in the prior art, the present invention adopts the following technical solutions: First, it provides an online transfer learning method based on blockchain privacy computing, which can use online transfer learning methods to assist learning tasks in different fields, and can also use blockchain privacy computing to protect the privacy security of local data in different fields.

[0006] An online transfer learning method based on blockchain privacy computing includes the following steps:

[0007] Receive n local data in a trusted execution environment, where the n local data include n-1 source domain data from multiple sources and one target domain data, where the source domain data includes: advertisement data, user data, and user advertisement click data, and the target domain data is new user data;

[0008] In the trusted execution environment, the n-1 source domain data are respectively trained to obtain n-1 local models, wherein intermediate parameters of the local models are adjusted and monitored based on a local differential privacy algorithm;

[0009] The blockchain node collects all local models and aggregates them to form a new model, which is then sent to all blockchain nodes.

[0010] Download a new model from a blockchain node, use the new model to recommend advertisements to new users in the target domain, and update the new model based on feedback data of advertisement recommendations for the new users.

[0011] As an implementation method, the local dataset is used for e-commerce advertising recommendation tasks, including user ad click behavior logs, ad features, user features, and user shopping behavior;

[0012] The user's ad click log contains the following fields: user ID, timestamp, ad ID, resource display location, and whether it was clicked. Click or not is represented by 0 / 1, where 0 indicates no click and 1 indicates a click.

[0013] The characteristics of the advertisement include: advertisement ID, product category ID, brand ID, and product price;

[0014] User characteristics include: user ID, gender, age, consumption level, shopping depth, and city level;

[0015] The user's shopping behavior includes: user ID, timestamp, behavior type, product category ID and brand ID. The behavior type includes: browse, add to cart, like and purchase.

[0016] As an implementable method, the adjustment and monitoring of the intermediate parameters of the local model based on the local differential privacy algorithm includes the following steps:

[0017] The Laplace mechanism is used to add noise to the intermediate parameters of the local model update process. If the computational task is the same, the computational result after adding noise is similar to the computational result of the original data.

[0018] After each round of iteration, the intermediate parameters after adding noise are updated until the sum of the privacy budget accumulated by the iteration exceeds the preset budget constraint, and the iteration terminates.

[0019] As an implementation method, the blockchain node collects all local models to perform model aggregation, iterates multiple times, and sends a new aggregated model to all blockchain nodes. The steps include:

[0020] Blockchain nodes collect local models participating in training;

[0021] Adopting the adaptive model aggregation algorithm to aggregate all participating local models to obtain a new model;

[0022] The new model is iterated until the global loss function converges or reaches the preset accuracy, and the aggregated new model is sent to all participating blockchain nodes.

[0023] As an implementation method, the adaptive model aggregation algorithm is used to aggregate all participating local models, including the following steps:

[0024] Calculate the quality assessment score of each blockchain node based on the cross entropy loss function;

[0025] Adopting the collaborator asynchronous parameter audit mechanism to calculate the reputation score of each blockchain node during the collaboration process;

[0026] The model aggregation weight is adjusted by the quality assessment score of the blockchain node and the reputation score in the collaboration process, and all participating local models are aggregated based on the model aggregation weight.

[0027] As an implementable method, the collaborator asynchronous parameter audit mechanism includes the following steps:

[0028] The model quality audit data of the verified blockchain node is encrypted and sent to other blockchain nodes for verification;

[0029] Other blockchain nodes verify the parameters of the model being verified based on their own local data and broadcast the verification results to other blockchain nodes;

[0030] When all blockchain nodes pass the verification, the final verification result is obtained.

[0031] An online transfer learning system based on blockchain privacy computing includes a data collection module, a first processing module, a second processing module, and a third processing module:

[0032] The data collection module is configured to receive n local data in a trusted execution environment, wherein the n local data include n-1 source domain data from multiple sources and one target domain data, wherein the source domain data includes: advertising data, user data, and user's advertising click data, and the target domain data is new user data;

[0033] The first processing module trains the n-1 source domain data respectively to obtain n-1 local models in the trusted execution environment, wherein intermediate parameters of the local models are adjusted and monitored based on a local differential privacy algorithm;

[0034] In the second processing module, the blockchain node collects all local models and aggregates them to form a new model, and sends the new model to all blockchain nodes respectively;

[0035] The third processing module is configured to download a new model from a blockchain node, use the new model to recommend advertisements to new users in the target domain, and update the new model based on feedback data of advertisement recommendations for the new users.

[0036] A computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the computer program implements the following method:

[0037] Receive n local data in a trusted execution environment, where the n local data include n-1 source domain data from multiple sources and one target domain data, where the source domain data includes: advertisement data, user data, and user advertisement click data, and the target domain data is new user data;

[0038] In the trusted execution environment, the n-1 source domain data are respectively trained to obtain n-1 local models, wherein intermediate parameters of the local models are adjusted and monitored based on a local differential privacy algorithm;

[0039] The blockchain node collects all local models and aggregates them to form a new model, which is then sent to all blockchain nodes.

[0040] Download a new model from a blockchain node, use the new model to recommend advertisements to new users in the target domain, and update the new model based on feedback data of advertisement recommendations for the new users.

[0041] An online transfer learning device based on blockchain privacy computing includes a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the following method when executing the computer program:

[0042] Receive n local data in a trusted execution environment, where the n local data include n-1 source domain data from multiple sources and one target domain data, where the source domain data includes: advertisement data, user data, and user advertisement click data, and the target domain data is new user data;

[0043] In the trusted execution environment, the n-1 source domain data are respectively trained to obtain n-1 local models, wherein intermediate parameters of the local models are adjusted and monitored based on a local differential privacy algorithm;

[0044] The blockchain node collects all local models and aggregates them to form a new model, which is then sent to all blockchain nodes.

[0045] Download a new model from a blockchain node, use the new model to recommend advertisements to new users in the target domain, and update the new model based on feedback data of advertisement recommendations for the new users.

[0046] The present invention has at least the following beneficial effects:

[0047] (1) An online transfer learning method and system based on blockchain privacy computing is proposed, which can solve the data island problem without sharing local data, fully and effectively mine data and integrate across domains while protecting privacy, and promote the value circulation of data.

[0048] (2) An online transfer learning method and system based on blockchain privacy computing is proposed. By utilizing the decentralization and strong trust properties of blockchain, the collaborator parameter audit of the model parameters is performed to effectively identify poisoning attacks and free-riding behaviors of malicious nodes.

[0049] Other advantages, objectives and features of the present invention will be reflected in part through the following description, and in part will be understood by those skilled in the art through study and practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 is a schematic diagram of the online transfer learning method and system steps based on blockchain privacy computing of the present invention.

[0051] Figure 2 is a flow chart of the online transfer learning method and system process based on blockchain privacy computing of the present invention. DETAILED DESCRIPTION

[0052] In order to clearly explain the present invention and make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention are clearly and completely described below in combination with the drawings in the embodiments of the present invention, so that those skilled in the art can implement them according to the text of the description.

[0053] In the context of the present invention, a trusted execution environment (TEE) provides an isolated runtime environment from the perspective of the underlying hardware and operating system, protecting the code and data running within it from external attacks, including attacks from the operating system, hardware, and other applications. This technology has been used in some fields to achieve the objectives described above, and some of the basic principles of this technology are also known to those skilled in the art. However, after reading this application, those skilled in the art will understand how to apply this technology in this context and will clearly understand the novelty of this technology when combined with other features in a specific context.

[0054] The technology of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0055] The present invention is an online migration method based on blockchain privacy computing. The steps of the invention are shown in Figure 1. The specific steps are as follows:

[0056] (1) A local dataset is received in a trusted execution environment. The local dataset is composed of n-1 source domain data from multiple sources and one target domain data. FIG2 is a flow chart of the present invention. The local dataset is defined as D = {D1, D2, ..., D n}.

[0057] (2) In the trusted execution environment, the n-1 source domain data and one target domain data are trained separately to obtain n local models, and the intermediate parameters in the local model training process are protected by a local differential privacy algorithm so that the original data cannot be inferred.

[0058] Define F = {f1,f2,…,f n} is the local model trained on the local dataset, M={m1,m2,…,m n} is the intermediate parameter set in the local model training process.

[0059] To achieve differential privacy during local model training, the local differential privacy algorithm of the present invention uses the Laplace mechanism to add noise to the intermediate parameters during model update training, which can be formalized as follows:

[0060] in<Lap(s / ∈)> is the Laplace noise, s is the local sensitivity, and ∈ is the privacy budget. is the dynamic privacy noise adjustment coefficient, which controls the noise size through cross entropy. After normalization, the noise adjustment coefficient γ∈[0,1] is controlled. k (f(x i ),y i ) is the cross entropy for model quality assessment. The smaller the value, the higher the model quality.

[0061] (3) Blockchain nodes collect all local models and perform model aggregation.

[0062] Define the blockchain node as P = {P1, P2, ..., P n}, for a single blockchain node P k , which is stored from D k Trained model.

[0063] The model aggregation weight is collaboratively adjusted based on the model quality assessment results and the reputation score of the node during the collaboration process to increase the contribution of high-quality model parameters in the aggregation model, thereby improving the accuracy of the aggregation model.

[0064] Model quality evaluation is mainly achieved through cross entropy in the local training process, that is, measuring the error between the model output and the actual result. Assume that the labeled dataset D used to verify the model quality is k ={(x1,y1),(x2,y2),…,(x n ,y n )}, then the cross entropy H of the k-th model k (f(x i ),y i ) can be calculated by the following formula:

[0065] where y i is the expected output, f(x i ) represents the prediction result of the model.

[0066] Model quality assessment mainly relies on blockchain node P k The model loss in the i-th round of local training is determined by using the cross entropy H(f(x i ),y i ) to evaluate the local model loss. The quality evaluation weight Q of the adaptive model aggregation algorithm i (P k ) is defined as:

[0067] In order to avoid the participating nodes from providing false model quality evaluation results, the present invention adopts the collaborator asynchronous parameter audit mechanism for parameter verification. In each round of iteration, the training collaborator calculates the model error of the model parameters to be verified using its own local data. The blockchain node P k Broadcast model parameter m i , and the cross entropy H(f(x i ),y i ) Collaborator nodes use local labeled datasets to verify model parameters, so that model quality assessment not only relies on the model's own training error, but also needs to consider the verification results of model parameters by other nodes, thereby obtaining more realistic and fair local model quality assessment results.

[0068] Each time the model aggregates the quality assessment weights of each node, they are recorded on the blockchain. k The reputation performance in the aggregation process is expressed as a cumulative reputation score S(P k ) to express, S(P k ) is formalized as follows:

[0069] Where τ is the blockchain node P k The number of times participating in model aggregation, Q i (P k ) is the blockchain node Pk The quality assessment weight recorded on the blockchain in the i-th model aggregation is S(P k ) as a blockchain node P k The historical accumulated reputation value in federated transfer learning serves as the basis for federated transfer learning model aggregation and participating node selection.

[0070] At this point, the global model update calculation process in the adaptive model aggregation algorithm is expressed as:

[0071] Among them, n is the number of blockchain nodes participating in the model aggregation, Q i (P k ) is the blockchain node P k The quality evaluation weight of the local model in the i-th model aggregation, S(P k ) is the blockchain node P k Historical credit score.

[0072] (4) Using the aggregated model to perform downstream tasks on new samples in the target domain, and updating the aggregated model based on feedback data of the downstream tasks of the new samples.

[0073] In summary, the online transfer learning method and system based on blockchain privacy computing provided by the present invention trains local data to obtain a local model in a trusted execution environment, while using a local differential privacy algorithm to protect intermediate parameters during model training. Local models are collected using blockchain nodes and aggregated using an adaptive model aggregation algorithm. The aggregated model is used to learn new samples, and the aggregated model is updated based on feedback data from the new sample learning. This invention can leverage existing knowledge in the source domain to solve tasks in the target domain, while also protecting the privacy of local data. It can also effectively combine data from multiple parties, breaking down data silos and facilitating the valuable circulation of data.

[0074] Example 2:

[0075] An online transfer learning system based on blockchain privacy computing includes a data collection module, a first processing module, a second processing module, and a third processing module:

[0076] The data collection module is configured to receive n local data in a trusted execution environment, wherein the n local data include n-1 source domain data from multiple sources and one target domain data, wherein the source domain data includes: advertising data, user data, and user's advertising click data, and the target domain data is new user data;

[0077] The first processing module trains the n-1 source domain data respectively to obtain n-1 local models in the trusted execution environment, wherein intermediate parameters of the local models are adjusted and monitored based on a local differential privacy algorithm;

[0078] In the second processing module, the blockchain node collects all local models and aggregates them to form a new model, and sends the new model to all blockchain nodes respectively;

[0079] The third processing module is configured to download a new model from a blockchain node, use the new model to recommend advertisements to new users in the target domain, and update the new model based on feedback data of advertisement recommendations for the new users.

[0080] Various changes and modifications can be made without departing from the spirit and scope of the present invention, and all equivalent technical solutions also fall within the scope of the present invention.

[0081] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referenced to each other.

[0082] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, apparatus, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0083] The present invention is described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device produce a device for implementing the functions specified in one or more processes in the flowcharts and / or one or more blocks in the block diagrams.

[0084] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0085] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce computer-implemented processing, so that the instructions executed on the computer or other programmable terminal device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0086] It should be noted that:

[0087] References in this specification to "one embodiment" or "an embodiment" mean that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Therefore, appearances of the phrases "one embodiment" or "an embodiment" in various places throughout this specification do not necessarily refer to the same embodiment.

[0088] The above description of the embodiments is intended to facilitate understanding and application of the present invention by those skilled in the art. It will be apparent that those skilled in the art can readily make various modifications to the above embodiments and apply the general principles described herein to other embodiments without requiring inventive effort. Therefore, the present invention is not limited to the above embodiments, and improvements and modifications made by those skilled in the art based on the disclosure of the present invention should fall within the scope of protection of the present invention.

Claims

1. An online transfer learning method based on blockchain privacy computing, characterized in that: The steps include: Receiving n local data in a trusted execution environment, the n local data includes n-1 source domain data from multiple sources and one target domain data, wherein the source domain data includes: advertisement data, user data, and user advertisement click data, and the target domain data is new user data; In the trusted execution environment, the n-1 source domain data are respectively trained to obtain n-1 local models, wherein intermediate parameters of the local models are adjusted and monitored based on a local differential privacy algorithm; The blockchain node collects all local models and aggregates them to form a new model, which is then sent to all blockchain nodes. A new model is downloaded from a blockchain node, advertisements are recommended to new users in a target domain using the new model, and the new model is updated based on feedback data of advertisement recommendations for the new users.

2. The online transfer learning method based on blockchain privacy computing according to claim 1 is characterized in that: The local data set is used for e-commerce advertising recommendation tasks, including the user's advertising click behavior log, the characteristics of the advertisement itself, the user's own characteristics and the user's shopping behavior; The user's ad click log contains the following fields: user ID, timestamp, ad ID, resource display location, and whether it was clicked. Whether it was clicked is represented by 0 / 1, where 0 means no click and 1 means click. The characteristics of the advertisement include: advertisement ID, product category ID, brand ID, and product price; The user's own characteristics include: user ID, gender, age level, consumption level, shopping depth, and city level; The user's shopping behavior includes: user ID, timestamp, behavior type, product category ID and brand ID. Among them, behavior types include: browse, add to cart, like and purchase.

3. The online transfer learning method based on blockchain privacy computing according to claim 1 is characterized in that: The method of adjusting and monitoring the intermediate parameters of the local model based on the local differential privacy algorithm includes the following steps: The Laplace mechanism is used to add noise to the intermediate parameters of the local model update process. If the calculation task is the same, the calculation result after adding noise is similar to the calculation result of the original data. After each round of iteration, the intermediate parameters after adding noise are updated until the sum of the accumulated privacy budgets exceeds the preset budget constraint and the iteration is terminated.

4. The online transfer learning method based on blockchain privacy computing according to claim 1 is characterized in that: The blockchain node collects all local models for model aggregation, iterates multiple times, and sends a new aggregated model to all blockchain nodes. The steps include: Blockchain nodes collect local models that participate in training; Adopting the adaptive model aggregation algorithm to aggregate all participating local models to obtain a new model; The new model is iterated until the global loss function converges or reaches the preset accuracy, and the aggregated new model is sent to all participating blockchain nodes respectively.

5. The online transfer learning method based on blockchain privacy computing according to claim 4 is characterized in that: The method of using the adaptive model aggregation algorithm to aggregate all participating local models includes the following steps: Calculate the quality assessment score of each blockchain node based on the cross entropy loss function; Adopt the collaborator asynchronous parameter audit mechanism to calculate the reputation score of each blockchain node during the collaboration process; The model aggregation weight is adjusted by the quality assessment score of the blockchain node and the reputation score in the collaboration process. All participating local models are aggregated based on the model aggregation weight.

6. The online transfer learning method based on blockchain privacy computing according to claim 5 is characterized in that: The collaborator asynchronous parameter audit mechanism includes the following steps: The model quality audit data of the verified blockchain node is encrypted and sent to other blockchain nodes for verification; Other blockchain nodes verify the parameters of the model being verified based on their own local data and broadcast the verification results to other blockchain nodes; When all blockchain nodes pass the verification, the final verification result is obtained.

7. An online transfer learning system based on blockchain privacy computing, characterized in that: It includes a data collection module, a first processing module, a second processing module and a third processing module: The data collection module is used to receive n local data in a trusted execution environment, wherein the n local data include n-1 source domain data from multiple sources and one target domain data, wherein the source domain data includes: advertisement data, user data, and user advertisement click data, and the target domain data is new user data; The first processing module, in the trusted execution environment, trains the n-1 source domain data respectively to obtain n-1 local models, wherein intermediate parameters of the local models are adjusted and monitored based on a local differential privacy algorithm; In the second processing module, the blockchain node collects all local models for aggregation processing to form a new model, and sends the new model to all blockchain nodes respectively; The third processing module is used to download the new model from the blockchain node, use the new model to recommend advertisements to new users in the target domain, and update the new model based on feedback data of the advertisement recommendations for the new users.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

9. An online transfer learning device based on blockchain privacy computing, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Federal learning method, device and system based on block chain

    CN112765677A

  • Financial data information federal transfer learning method and device based on block chain

    CN113011598A

  • Medical data sharing privacy protection method based on block chain by utilizing federated learning

    CN113536382A

  • Multi-domain DDoS attack detection method and device based on trusted federated learning

    CN115102763A

  • Privacy security calculation verification method and system based on block chain and federal learning

    CN115203751A

Cited By

  • Blockchain-based audit budget-constrained training authenticity verification method for federated learning

    CN122528221A