[go: up one dir, main page]

CN114861211B - A data privacy protection method, system, and storage medium for metaverse scenarios - Google Patents

A data privacy protection method, system, and storage medium for metaverse scenarios Download PDF

Info

Publication number
CN114861211B
CN114861211B CN202210631627.1A CN202210631627A CN114861211B CN 114861211 B CN114861211 B CN 114861211B CN 202210631627 A CN202210631627 A CN 202210631627A CN 114861211 B CN114861211 B CN 114861211B
Authority
CN
China
Prior art keywords
chain
client
local
local model
slave
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210631627.1A
Other languages
Chinese (zh)
Other versions
CN114861211A (en
Inventor
康嘉文
李明磊
刘桢谋
余荣
章阳
刘毅
谢胜利
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong University of Technology
Original Assignee
Guangdong University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong University of Technology filed Critical Guangdong University of Technology
Priority to CN202210631627.1A priority Critical patent/CN114861211B/en
Publication of CN114861211A publication Critical patent/CN114861211A/en
Application granted granted Critical
Publication of CN114861211B publication Critical patent/CN114861211B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning

Landscapes

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

Abstract

The invention discloses a data privacy protection method, a system and a storage medium for a meta-universe scene; the method comprises the following steps: uploading non-private data to a data storage module in the virtual world as a first local private data set to train a first local model; while private data with sensitive information is stored locally as a second local private data set training a second local model; constructing a metauniverse cross-chain federal machine learning framework, wherein the metauniverse cross-chain federal machine learning framework comprises a task publisher, a first client for training a first local model through a first local private data set, and a second client for training a second local model through a second local private data set; the task publisher and the first client are arranged in the virtual world, and the second client is arranged in the real world; the first client and the second client update and aggregate the first local model parameters and the second local model parameters based on a cross-chain aggregation method to obtain a new global model.

Description

一种面向元宇宙场景的数据隐私保护方法、系统、存储介质A data privacy protection method, system, and storage medium for metaverse scenarios

技术领域Technical Field

本发明涉及通信信号解调技术领域,更具体的,涉及一种面向元宇宙场景的数据隐私保护方法、系统、存储介质。The present invention relates to the field of communication signal demodulation technology, and more specifically, to a data privacy protection method, system, and storage medium for a metaverse scenario.

背景技术Background technique

联邦学习(federated learning)是一种新兴的人工智能技术,其设计目标是在保障大数据共享时的信息安全、保护终端数据和个人数据隐私;保证合法合规的前提下,在多参与方或多计算节点之间开展高效率的机器学习模型训练。联邦学习通过迭代训练运算方式实现“数据可用不可见”、“数据不出门”,在模型训练的过程中对交互数据进行加密运算,一定程度上实现了高效的模型训练和最大程度上保护了参与方数据的隐私,从而解决传统机器学习模型需要访问数据从而导致的数据隐私问题,同时可引入更多组织或机构的数据加入,整体上提升模型质量。Federated learning is an emerging artificial intelligence technology. Its design goal is to ensure information security when sharing big data, protect terminal data and personal data privacy; and carry out efficient machine learning model training between multiple participants or multiple computing nodes under the premise of ensuring legality and compliance. Federated learning achieves "data is available but invisible" and "data does not leave the house" through iterative training operations. In the process of model training, interactive data is encrypted, which to a certain extent achieves efficient model training and protects the privacy of participants' data to the greatest extent, thereby solving the data privacy problem caused by the need for traditional machine learning models to access data. At the same time, it can introduce data from more organizations or institutions to improve the overall quality of the model.

区块链凭借其匿名、不可篡改、分布式等特征,在多个不可信的参与方之间,提供了一种安全可靠的解决方案。区块链的本质是一种分布式账本,其最大的特征,是由传统的中心化方案变为分布式网络结构,通过非对称加密等密码学技术确保链上数据的安全;同时,通过共识机制、智能合约等,在多个不可信的分布式参与方之间,保证链数据的可靠性。通过区块链的授权机制、身份管理等,可以将互不可信的用户作为参与方整合到一起,建立一个安全可信的合作机制;并且,联邦学习的模型参数可以存储在区块链中,保证了模型参数的安全性与可靠性。Blockchain, with its anonymity, immutability, and distribution, provides a secure and reliable solution between multiple untrusted parties. The essence of blockchain is a distributed ledger. Its biggest feature is that it has changed from a traditional centralized solution to a distributed network structure, ensuring the security of on-chain data through cryptographic technologies such as asymmetric encryption; at the same time, through consensus mechanisms, smart contracts, etc., the reliability of chain data is guaranteed between multiple untrusted distributed participants. Through the authorization mechanism and identity management of blockchain, mutually untrusted users can be integrated as participants to establish a secure and reliable cooperation mechanism; and the model parameters of federated learning can be stored in the blockchain, ensuring the security and reliability of the model parameters.

目前已运行的区块链网络丰富多样,但各区块链网络之间是相互独立的,极大的限制了区块链间的互通性。为了将不同的区块链网络连接起来实现价值互联网,区块链跨链技术成为关键。跨链技术整体架构可分为信息收集、信息验证、系统连接和信息反馈,通过建立连接方或扩充智能合约,实现不同平行链之间的信息交互,经过双方或多方验证后,记入总区块链账本。中继链是目前主流的跨链技术之一,中继链不完全依赖于可信第三方的验证判断,仅通过中间人收集两条区块链的数据状态进行自我验证,其验证方式根据自身结构不同而存在显著差异。中继链虽然实现难度相对偏大,但是在功能和特性上却是最完善的,具有独特而重要的应用价值。Currently, there are many and diverse blockchain networks in operation, but each blockchain network is independent of each other, which greatly limits the interoperability between blockchains. In order to connect different blockchain networks to realize the value Internet, blockchain cross-chain technology has become the key. The overall architecture of cross-chain technology can be divided into information collection, information verification, system connection and information feedback. By establishing a connection party or expanding a smart contract, information interaction between different parallel chains is realized. After verification by two or more parties, it is recorded in the total blockchain ledger. The relay chain is one of the current mainstream cross-chain technologies. The relay chain does not completely rely on the verification judgment of a trusted third party. It only collects the data status of the two blockchains through an intermediary for self-verification. Its verification method varies significantly depending on its own structure. Although the relay chain is relatively difficult to implement, it is the most complete in terms of functions and characteristics, and has unique and important application value.

元宇宙是继web和移动互联网之后的下一代互联网,人们可以自由的在一个虚拟的世界进行社交、娱乐等,通过VR和AR等技术人们可以沉浸式的访问元宇宙。为了提升元宇宙的沉浸感,元宇宙需要进行连续的数据同步,从现实世界获取新鲜的数据,这个过程收集的个人数据的数量和种类丰富度将会是前所未有的。比如在VR游戏中为了保持渲染场景的真实,需要通过传感器实时读取用户的动作,同时也可能未经用户的同意读取用户的生理反应以及脑电模式等隐私数据。如果全部上传的虚拟世界会导致隐私数据存在泄露和滥用的风险,因此在虚拟世界中如何保护隐私数据就尤为重要了。The Metaverse is the next generation of the Internet after the web and mobile Internet. People can freely socialize and entertain themselves in a virtual world. Through technologies such as VR and AR, people can immersively access the Metaverse. In order to enhance the immersion of the Metaverse, the Metaverse needs to synchronize data continuously and obtain fresh data from the real world. The amount and variety of personal data collected in this process will be unprecedented. For example, in VR games, in order to maintain the authenticity of the rendered scene, it is necessary to read the user's actions in real time through sensors. At the same time, it is also possible to read the user's physiological reactions and EEG patterns and other private data without the user's consent. If the entire virtual world is uploaded, there will be a risk of privacy data leakage and abuse. Therefore, it is particularly important to protect privacy data in the virtual world.

目前现有技术的缺点如下:元宇宙中的AI模型需要借助现实世界和虚拟世界中产生的数据进行训练来获取更好的模型表现,但本地的隐私数据如果全部上传到虚拟世界再进行训练,一方面现实世界的数据上传到虚拟世界存储模块会存在较大的通信开销与存储开销,另一方面也会导致隐私数据存在隐私泄露和数据被滥用的风险。The shortcomings of the current existing technology are as follows: the AI model in the metaverse needs to be trained with the help of data generated in the real world and the virtual world to obtain better model performance. However, if all local private data is uploaded to the virtual world for training, on the one hand, uploading the real world data to the virtual world storage module will incur large communication and storage overheads. On the other hand, it will also lead to the risk of privacy leakage and data abuse.

发明内容Summary of the invention

本发明为了解决现有技术存在不足与缺点的问题,提供一种面向元宇宙场景的数据隐私保护方法、系统、存储介质,该方法实现本地隐私数据保护的同时,更好地训练虚拟世界中AI模型。In order to solve the problems of deficiencies and shortcomings in the prior art, the present invention provides a data privacy protection method, system, and storage medium for metaverse scenarios. The method realizes local privacy data protection while better training AI models in the virtual world.

为实现上述本发明目的,采用的技术方案如下:In order to achieve the above-mentioned purpose of the present invention, the technical scheme adopted is as follows:

一种面向元宇宙场景的数据隐私保护方法,所述的方法包括步骤如下:A data privacy protection method for a metaverse scenario, the method comprising the following steps:

将数据按数据类型与隐私保护要求一分为二,非隐私数据直接上传虚拟世界中的数据存储模块,作为第一本地私有数据集训练第一本地模型;而具有敏感信息的隐私数据存储在本地,作为第二本地私有数据集训练第二本地模型;The data is divided into two parts according to the data type and privacy protection requirements. The non-privacy data is directly uploaded to the data storage module in the virtual world and used as the first local private data set to train the first local model. The privacy data with sensitive information is stored locally and used as the second local private data set to train the second local model.

构建具有隐私保护的元宇宙跨链联邦机器学习框架,所述的元宇宙跨链联邦机器学习框架包括用于存储全局模型的任务发布方、用于通过第一本地私有数据集训练第一本地模型的第一客户端、用于通过第二本地私有数据集训练第二本地模型的第二客户端;所述的任务发布方、第一客户端设置在虚拟世界中,所述的第二客户端设置在现实世界;Constructing a Metaverse cross-chain federated machine learning framework with privacy protection, the Metaverse cross-chain federated machine learning framework comprising a task publisher for storing a global model, a first client for training a first local model through a first local private data set, and a second client for training a second local model through a second local private data set; the task publisher and the first client are set in a virtual world, and the second client is set in a real world;

所述的第一客户端、第二客户端基于跨链聚合方法将第一本地模型参数、第二本地模型参数更新并聚合得到新的全局模型。The first client and the second client update the first local model parameters and the second local model parameters based on the cross-chain aggregation method and aggregate them to obtain a new global model.

优选地,利用区块链技术,搭建去中心化的元宇宙跨链联邦机器学习框架,其中,一条区块链作为主链,并将主链作为全局模型参数的存储管理模块;一条区块链作为第一从链,并将第一从链作为第一本地模型参数的第一存储模块;一条区块链作为第二从链,并将第二从链作为第二本地模型参数的第二存储模块;还设有中继链,利用中继链作为跨链管理平台;Preferably, a decentralized metaverse cross-chain federated machine learning framework is built using blockchain technology, wherein one blockchain is used as the main chain, and the main chain is used as the storage management module of the global model parameters; one blockchain is used as the first slave chain, and the first slave chain is used as the first storage module of the first local model parameters; one blockchain is used as the second slave chain, and the second slave chain is used as the second storage module of the second local model parameters; a relay chain is also provided, and the relay chain is used as the cross-chain management platform;

所述的任务发布方通过主链下发初始化的全局模型,并通过主链接收更新后第一本地模型、第二本地模型参数;The task publisher sends the initialized global model through the main chain, and receives the updated first local model and second local model parameters through the main chain;

所述的第一客户端通过第一从链接收初始化的全局模型,并将更新后的第一本地模型参数上传到第一从链;The first client receives the initialized global model through the first slave chain, and uploads the updated first local model parameters to the first slave chain;

所述的第二客户端通过第二从链接收初始化的全局模型,并将更新后的第二本地模型参数上传到第二从链;The second client receives the initialized global model through the second slave link, and uploads the updated second local model parameters to the second slave link;

所述的中继链实现第一从链、第二从链与主链跨接。The relay chain realizes the cross-connection between the first slave chain, the second slave chain and the main chain.

进一步地,在所述的元宇宙跨链联邦机器学习框架进行训练之前,先初始化,具体如下:Furthermore, before the Metaverse cross-chain federated machine learning framework is trained, it is initialized as follows:

第一从链、第二从链向中继链进行注册,由任务发布方确定联邦机器学习任务,寻找参与联邦机器学习训练的第一客户端、第二客户端;The first slave chain and the second slave chain register with the relay chain, and the task publisher determines the federated machine learning task and searches for the first client and the second client that participate in the federated machine learning training;

第一客户端、第二客户端根据需求确定是否参加联邦机器学习任务;双方达成协议后,进入联邦机器学习过程;The first client and the second client determine whether to participate in the federated machine learning task according to their needs; after the two parties reach an agreement, they enter the federated machine learning process;

任务发布方将初始化的全局模型wt上传到主链,虚拟世界的第一客户端和现实世界的第二客户端分别通过对应的第一从链、第二从链通获取初始化的全局模型wtThe task publisher uploads the initialized global model wt to the main chain, and the first client in the virtual world and the second client in the real world obtain the initialized global model wt through the corresponding first slave chain and second slave chain respectively.

再进一步地,联邦机器学习过程,具体如下:Going further, the federated machine learning process is as follows:

第二客户端、第一客户端接收任务发布方下发的初始化的全局模型wt,并分别对全局模型wt进行初始化,得到第二本地模型第一本地模型/>初始化过程如下:The second client and the first client receive the initialized global model w t issued by the task publisher, and initialize the global model w t respectively to obtain the second local model First local model/> The initialization process is as follows:

其中,表示现实世界的第二客户端集合,/>表示虚拟世界的第一客户端集合;然后,第一客户端、第二客户端分别使用第一本地私有数据集Dj、第二本地私有数据集Di进行训练,Di表示现实世界第二客户端i所持有的第二本地私有数据集,Dj表示虚拟世界第一客户端j所持有的第一本地私有数据集;第二本地模型、第一本地模型训练需要优化的损失函数分别定义如下:in, Represents the second client set in the real world,/> represents the first client set in the virtual world; then, the first client and the second client use the first local private data set D j and the second local private data set D i for training respectively, where D i represents the second local private data set held by the second client i in the real world, and D j represents the first local private data set held by the first client j in the virtual world; the loss functions to be optimized for the training of the second local model and the first local model are defined as follows:

现实世界: real world:

虚拟世界: virtual reality:

其中,w为全局模型参数,|Di|为第二客户端i的数据集的大小,|Dj|为第一客户端j的数据集的大小,fk(w)是本地损失函数,每个客户端执行给定迭代次数的随机梯度下降,训练得到第二本地模型、第一本地模型如下:Where w is the global model parameter, |D i | is the size of the data set of the second client i, |D j | is the size of the data set of the first client j, f k (w) is the local loss function, and each client performs stochastic gradient descent for a given number of iterations to train the second local model and the first local model as follows:

其中,η为学习率,为梯度。Where η is the learning rate, is the gradient.

再进一步地,在虚拟世界的第一客户端和现实世界的第二客户端对第一本地模型、第二本地模型训练之后,把训练后的第一本地模型参数、第二本地模型参数分别上传至第一从链、第二从链中,分别在第一从链、第二从链对主链发起跨链请求,通过区块链跨链的方式将第一本地模型参数、第二本地模型参数更新上传主链,主链对收到的第一本地模型参数、第二本地模型参数进行验证,并执行聚合操作得到新的全局模型wt+1,其定义如下:Furthermore, after the first client in the virtual world and the second client in the real world train the first local model and the second local model, the trained first local model parameters and the second local model parameters are uploaded to the first slave chain and the second slave chain respectively, and cross-chain requests are initiated to the main chain in the first slave chain and the second slave chain respectively. The first local model parameters and the second local model parameters are updated and uploaded to the main chain through the blockchain cross-chain method. The main chain verifies the received first local model parameters and the second local model parameters, and performs aggregation operations to obtain a new global model w t+1 , which is defined as follows:

通过迭代一定次数直至全局模型收敛,此时结束联邦机器学习任务;学习到的全局模型将被保留在主链,供后续预测或分类工作服务。The federated machine learning task ends after a certain number of iterations until the global model converges; the learned global model will be retained in the main chain for subsequent prediction or classification work.

再进一步地,所述的基于跨链聚合方法中共有四种参与方,其功能如下:Furthermore, there are four participants in the cross-chain aggregation method, and their functions are as follows:

验证人:负责中继链网络的出块,运行一个中继链的客户端,对其提名的区块链产生的区块进行核验;Validator: responsible for the block generation of the relay chain network, running a relay chain client, and verifying the blocks generated by the blockchain nominated by it;

整理人:维护一个区块链的全节点,帮助验证人收集和验证交易的正确性以及提交候选区块到验证人;Collator: Maintains a full node of the blockchain, helps validators collect and verify the correctness of transactions, and submits candidate blocks to validators;

提名人:拥有代币的相关方,维护和负责验证人的安全性;Nominator: A party that owns tokens and is responsible for maintaining and securing the validator.

监督人:通过检举非法交易或非法区块来获得收益。Supervisor: Earn income by reporting illegal transactions or illegal blocks.

再进一步地,所述的第二从链和主链之间的跨链流程如下:Furthermore, the cross-chain process between the second slave chain and the main chain is as follows:

S101:第二客户端在第二从链上创建账户,并初始化存储在第二从链上的信息;S101: The second client creates an account on the second slave chain and initializes the information stored on the second slave chain;

S102:当第二客户端完成对第二本地模型训练之后,第二客户端在第二从链上创建交易向主链发送包括第二本地模型参数以及身份信息;所述的交易为第二本地模型参数上传请求;S102: After the second client completes training the second local model, the second client creates a transaction on the second slave chain and sends the second local model parameters and identity information to the main chain; the transaction is a second local model parameter upload request;

S103:第二客户端对交易进行签名并广播;S103: The second client signs and broadcasts the transaction;

S104:第二从链的整理人收集交易信息,验证交易的有效性,整理交易数据,打包成候选区块;S104: The organizer of the second slave chain collects transaction information, verifies the validity of the transaction, organizes the transaction data, and packages it into a candidate block;

S105:整理人向第二从链的验证人展示候选区块以及状态的转移证明;S105: The collation staff shows the candidate block and the proof of state transfer to the validator of the second slave chain;

S106:验证人验证接收到的候选区块,只有验证通过,确保候选区块中只包含有效的交易,验证人会抵押其代币为候选区块上链做准备;S106: The validator verifies the received candidate block. Only if the verification is passed, ensuring that the candidate block contains only valid transactions, the validator will pledge its tokens to prepare for the candidate block to be put on the chain;

S107:当有足够的提名人抵押其代币并提名验证人时,向区块链广播其候选区块的行为将得到授权;S107: When enough nominators stake their tokens and nominate validators, the broadcast of their candidate blocks to the blockchain will be authorized;

S108:当所有验证人对中继链区块达成共识,验证人将第二从链上的交易从第二从链的出口移动到主链的入口以完成消息的传输;S108: When all validators reach a consensus on the relay chain block, the validator moves the transaction on the second slave chain from the exit of the second slave chain to the entrance of the main chain to complete the message transmission;

S109:主链在入口队列中执行该交易并修改自己的账本;S109: The main chain executes the transaction in the entry queue and modifies its own ledger;

S110:任务发布方服务器获得第二本地模型更新后的参数并暂存,等待若干个的第二客户端返回结果后进行聚合操作。S110: The task issuing server obtains and temporarily stores the updated parameters of the second local model, and waits for several second clients to return results before performing an aggregation operation.

再进一步地,所述的第一从链和主链之间的跨链流程如下:Furthermore, the cross-chain process between the first slave chain and the master chain is as follows:

S201:第一客户端在第一从链上创建账户,并初始化存储在第一从链上的信息;S201: The first client creates an account on the first slave chain and initializes the information stored on the first slave chain;

S202:当第一客户端完成对第一本地模型训练之后,第一客户端在第一从链上创建交易向主链发送包括第一本地模型参数以及身份信息;所述的交易为第一本地模型参数上传请求;S202: After the first client completes training the first local model, the first client creates a transaction on the first slave chain and sends the first local model parameters and identity information to the master chain; the transaction is a first local model parameter upload request;

S203:第一客户端对交易进行签名并广播;S203: The first client signs and broadcasts the transaction;

S204:第一从链的整理人收集交易信息,验证交易的有效性,整理交易数据,打包成候选区块;S204: First, the chain organizer collects transaction information, verifies the validity of the transaction, organizes the transaction data, and packages it into a candidate block;

S205:整理人向第一从链的验证人展示候选区块以及状态的转移证明;S205: The collation staff shows the candidate block and the proof of state transfer to the validator of the first slave chain;

S206:验证人验证接收到的候选区块,只有验证通过,确保候选区块中只包含有效的交易,验证人会抵押其代币为候选区块上链做准备;S206: The validator verifies the received candidate block. Only if the verification is passed, ensuring that the candidate block contains only valid transactions, the validator will pledge its tokens to prepare for the candidate block to be put on the chain;

S207:当有足够的提名人抵押其代币并提名验证人时,向区块链广播其候选区块的行为将得到授权;S207: When enough nominators stake their tokens and nominate validators, the broadcast of their candidate blocks to the blockchain will be authorized;

S208:当所有验证人对中继链区块达成共识,验证人将第一从链上的交易从第一从链的出口移动到主链的入口以完成消息的传输;S208: When all validators reach a consensus on the relay chain block, the validator moves the transaction on the first slave chain from the exit of the first slave chain to the entrance of the main chain to complete the message transmission;

S209:主链在入口队列中执行该交易并修改自己的账本;S209: The main chain executes the transaction in the entry queue and modifies its own ledger;

S210:任务发布方服务器获得第一本地模型更新后的参数并暂存,等待若干个的第一客户端返回结果后进行聚合操作。S210: The task issuing server obtains and temporarily stores the updated parameters of the first local model, and waits for a number of first clients to return results before performing an aggregation operation.

一种计算机设备,包括存储器、处理器以及存储在存储器上并可在处理器上运行的计算机程序,所述的处理器执行所述的计算机程序时,实现如上述的方法的步骤。A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the above method are implemented.

一种计算机可读存储介质,其上存储有计算机程序,所述的计算机程序被处理器执行时,实现如上述的方法的步骤。A computer-readable storage medium stores a computer program, which implements the steps of the above method when executed by a processor.

本发明的有益效果如下:The beneficial effects of the present invention are as follows:

本发明不是简单的将传感器采集的所有物理数据直接上传虚拟世界,而是将数据按数据类型与隐私保护要求一分为二,非隐私数据可以直接上传虚拟世界数据存储模块(如云服务器、边缘服务器等),具有敏感信息的隐私数据存储在本地,从而实现元宇宙场景下人工智能应用的隐私保护。The present invention does not simply upload all physical data collected by sensors directly to the virtual world, but divides the data into two parts according to data type and privacy protection requirements. Non-privacy data can be directly uploaded to the virtual world data storage module (such as cloud servers, edge servers, etc.), and privacy data with sensitive information is stored locally, thereby realizing privacy protection of artificial intelligence applications in the metaverse scenario.

本发明利用区块链技术,搭建去中心化的元宇宙跨链联邦机器学习框架,该框架不同与传统的联邦机器学习框架,该框架中的一条区块链称为主链,作为全局模型参数的存储管理模块,多条从链作为本地模型参数的存储模块,本地训练模型参数上传到从链中。所述的元宇宙跨链联邦机器学习框架能记录本地模型的训练过程,实现隐私保护和本地训练过程的可审计性、可追溯性。The present invention uses blockchain technology to build a decentralized Metaverse cross-chain federated machine learning framework. This framework is different from the traditional federated machine learning framework. One blockchain in this framework is called the main chain, which serves as a storage management module for global model parameters, and multiple slave chains serve as storage modules for local model parameters. Local training model parameters are uploaded to the slave chains. The Metaverse cross-chain federated machine learning framework can record the training process of the local model, achieve privacy protection and the auditability and traceability of the local training process.

本发明还提出采用跨链聚合方法,该方法中主从链间的本地模型参数的交互通过跨链形式进行,保证可追溯性同时也在一定程度保证本地模型参数交互的安全性。The present invention also proposes to adopt a cross-chain aggregation method, in which the interaction of local model parameters between the master and slave chains is carried out in a cross-chain form, ensuring traceability while also ensuring the security of local model parameter interaction to a certain extent.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1是实施例1所述数据隐私保护方法的原理图。FIG. 1 is a schematic diagram of the data privacy protection method according to Embodiment 1.

图2是实施例1所述基于跨链聚合方法的原理图。FIG. 2 is a schematic diagram of the cross-chain polymerization method described in Example 1.

具体实施方式Detailed ways

下面结合附图和具体实施方式对本发明做详细描述。The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.

实施例1Example 1

如图1所示,一种面向元宇宙场景的数据隐私保护方法,所述的方法包括步骤如下:As shown in FIG1 , a data privacy protection method for a metaverse scenario is provided, wherein the method comprises the following steps:

将数据按数据类型与隐私保护要求一分为二,非隐私数据直接上传虚拟世界中的数据存储模块,作为第一本地私有数据集训练第一本地模型;而具有敏感信息的隐私数据存储在本地,作为第二本地私有数据集训练第二本地模型;The data is divided into two parts according to the data type and privacy protection requirements. The non-privacy data is directly uploaded to the data storage module in the virtual world and used as the first local private data set to train the first local model. The privacy data with sensitive information is stored locally and used as the second local private data set to train the second local model.

构建具有隐私保护的元宇宙跨链联邦机器学习框架,所述的元宇宙跨链联邦机器学习框架包括用于存储全局模型的任务发布方、用于通过第一本地私有数据集训练第一本地模型的第一客户端、用于通过第二本地私有数据集训练第二本地模型的第二客户端;所述的任务发布方、第一客户端设置在虚拟世界中,所述的第二客户端设置在现实世界;Constructing a Metaverse cross-chain federated machine learning framework with privacy protection, the Metaverse cross-chain federated machine learning framework comprising a task publisher for storing a global model, a first client for training a first local model through a first local private data set, and a second client for training a second local model through a second local private data set; the task publisher and the first client are set in a virtual world, and the second client is set in a real world;

所述的第一客户端、第二客户端基于跨链聚合方法将第一本地模型参数、第二本地模型参数更新并聚合得到新的全局模型。The first client and the second client update the first local model parameters and the second local model parameters based on the cross-chain aggregation method and aggregate them to obtain a new global model.

在一个具体的实施例中,利用区块链技术,搭建去中心化的元宇宙跨链联邦机器学习框架,其中,一条区块链作为主链,并将主链作为全局模型参数的存储管理模块;一条区块链作为第一从链,并将第一从链作为第一本地模型参数的第一存储模块;一条区块链作为第二从链,并将第二从链作为第二本地模型参数的第二存储模块;还设有中继链,利用中继链作为跨链管理平台;In a specific embodiment, a decentralized metaverse cross-chain federated machine learning framework is built using blockchain technology, wherein one blockchain is used as the main chain, and the main chain is used as the storage management module of the global model parameters; one blockchain is used as the first slave chain, and the first slave chain is used as the first storage module of the first local model parameters; one blockchain is used as the second slave chain, and the second slave chain is used as the second storage module of the second local model parameters; a relay chain is also provided, and the relay chain is used as the cross-chain management platform;

所述的任务发布方通过主链下发初始化的全局模型,并通过主链接收更新后第一本地模型、第二本地模型参数;The task publisher sends the initialized global model through the main chain, and receives the updated first local model and second local model parameters through the main chain;

所述的第一客户端通过第一从链接收初始化的全局模型,并将更新后的第一本地模型参数上传到第一从链;The first client receives the initialized global model through the first slave chain, and uploads the updated first local model parameters to the first slave chain;

所述的第二客户端通过第二从链接收初始化的全局模型,并将更新后的第二本地模型参数上传到第二从链;The second client receives the initialized global model through the second slave link, and uploads the updated second local model parameters to the second slave link;

所述的中继链实现第一从链、第二从链与主链跨接。The relay chain realizes the cross-connection between the first slave chain, the second slave chain and the main chain.

在一个具体的实施例中,在所述的元宇宙跨链联邦机器学习框架进行训练之前,先初始化,具体如下:In a specific embodiment, before the Metaverse cross-chain federated machine learning framework is trained, it is initialized as follows:

第一从链、第二从链向中继链进行注册,由任务发布方确定联邦机器学习任务,寻找参与联邦机器学习训练的第一客户端、第二客户端;The first slave chain and the second slave chain register with the relay chain, and the task publisher determines the federated machine learning task and searches for the first client and the second client that participate in the federated machine learning training;

第一客户端、第二客户端根据需求确定是否参加联邦机器学习任务;双方达成协议后,进入联邦机器学习过程;The first client and the second client determine whether to participate in the federated machine learning task according to their needs; after the two parties reach an agreement, they enter the federated machine learning process;

任务发布方将初始化的全局模型wt上传到主链,虚拟世界的第一客户端和现实世界的第二客户端分别通过对应的第一从链、第二从链通获取初始化的全局模型wtThe task publisher uploads the initialized global model wt to the main chain, and the first client in the virtual world and the second client in the real world obtain the initialized global model wt through the corresponding first slave chain and second slave chain respectively.

在一个具体的实施例中,联邦机器学习过程,具体如下:In a specific embodiment, the federated machine learning process is as follows:

第二客户端、第一客户端接收任务发布方下发的初始化的全局模型wt,并分别对全局模型wt进行初始化,得到第二本地模型第一本地模型/>初始化过程如下:The second client and the first client receive the initialized global model w t issued by the task publisher, and initialize the global model w t respectively to obtain the second local model First local model/> The initialization process is as follows:

其中,表示现实世界的第二客户端集合,/>表示虚拟世界的第一客户端集合;然后,第一客户端、第二客户端分别使用第一本地私有数据集Dj、第二本地私有数据集Di进行训练,Di表示现实世界第二客户端i所持有的第二本地私有数据集,Dj表示虚拟世界第一客户端j所持有的第一本地私有数据集;第二本地模型、第一本地模型训练需要优化的损失函数分别定义如下:in, Represents the second client set in the real world,/> represents the first client set in the virtual world; then, the first client and the second client use the first local private data set D j and the second local private data set D i for training respectively, where D i represents the second local private data set held by the second client i in the real world, and D j represents the first local private data set held by the first client j in the virtual world; the loss functions to be optimized for the training of the second local model and the first local model are defined as follows:

现实世界: real world:

虚拟世界: virtual reality:

其中,w为全局模型参数,|Di|为第二客户端i的数据集的大小,|Dj|为第一客户端j的数据集的大小,fk(w)是本地损失函数,每个客户端执行给定迭代次数的随机梯度下降,训练得到第二本地模型、第一本地模型如下:Where w is the global model parameter, |D i | is the size of the data set of the second client i, |D j | is the size of the data set of the first client j, f k (w) is the local loss function, and each client performs stochastic gradient descent for a given number of iterations to train the second local model and the first local model as follows:

其中,η为学习率,为梯度。Where η is the learning rate, is the gradient.

在一个具体的实施例中,在虚拟世界的第一客户端和现实世界的第二客户端对第一本地模型、第二本地模型训练之后,把训练后的第一本地模型参数、第二本地模型参数分别上传至第一从链、第二从链中,分别在第一从链、第二从链对主链发起跨链请求,通过区块链跨链的方式将第一本地模型参数、第二本地模型参数更新上传主链,主链对收到的第一本地模型参数、第二本地模型参数进行验证,并执行聚合操作得到新的全局模型wt+1,其定义如下:In a specific embodiment, after the first client in the virtual world and the second client in the real world train the first local model and the second local model, the trained first local model parameters and the second local model parameters are uploaded to the first slave chain and the second slave chain respectively, and cross-chain requests are initiated to the main chain in the first slave chain and the second slave chain respectively. The first local model parameters and the second local model parameters are updated and uploaded to the main chain through the blockchain cross-chain method. The main chain verifies the received first local model parameters and the second local model parameters, and performs aggregation operations to obtain a new global model w t+1 , which is defined as follows:

通过迭代一定次数直至全局模型收敛,此时结束联邦机器学习任务;学习到的全局模型将被保留在主链,供后续预测或分类工作服务。The federated machine learning task ends after a certain number of iterations until the global model converges; the learned global model will be retained in the main chain for subsequent prediction or classification work.

在一个具体的实施例中,所述的基于跨链聚合方法中共有四种参与方,其功能如下:In a specific embodiment, there are four participants in the cross-chain aggregation method, and their functions are as follows:

验证人:负责中继链网络的出块,运行一个中继链的客户端,对其提名的区块链产生的区块进行核验;Validator: responsible for the block generation of the relay chain network, running a relay chain client, and verifying the blocks generated by the blockchain nominated by it;

整理人:维护一个区块链的全节点,帮助验证人收集和验证交易的正确性以及提交候选区块到验证人;Collator: Maintains a full node of the blockchain, helps validators collect and verify the correctness of transactions, and submits candidate blocks to validators;

提名人:拥有代币的相关方,维护和负责验证人的安全性;Nominator: A party that owns tokens and is responsible for maintaining and securing the validator.

监督人:通过检举非法交易或非法区块来获得收益。Supervisor: Earn income by reporting illegal transactions or illegal blocks.

在一个具体的实施例中,所述的第二从链和主链之间的跨链流程如下:In a specific embodiment, the cross-chain process between the second slave chain and the master chain is as follows:

S101:第二客户端在第二从链上创建账户,并初始化存储在第二从链上的信息;S101: The second client creates an account on the second slave chain and initializes the information stored on the second slave chain;

S102:当第二客户端完成对第二本地模型训练之后,第二客户端在第二从链上创建交易向主链发送包括第二本地模型参数以及身份信息;所述的交易为第二本地模型参数上传请求;S102: After the second client completes training the second local model, the second client creates a transaction on the second slave chain and sends the second local model parameters and identity information to the main chain; the transaction is a second local model parameter upload request;

S103:第二客户端对交易进行签名并广播;S103: The second client signs and broadcasts the transaction;

S104:第二从链的整理人收集交易信息,验证交易的有效性,整理交易数据,打包成候选区块;S104: The organizer of the second slave chain collects transaction information, verifies the validity of the transaction, organizes the transaction data, and packages it into a candidate block;

S105:整理人向第二从链的验证人展示候选区块以及状态的转移证明;S105: The collation staff shows the candidate block and the proof of state transfer to the validator of the second slave chain;

S106:验证人验证接收到的候选区块,只有验证通过,确保候选区块中只包含有效的交易,验证人会抵押其代币为候选区块上链做准备;S106: The validator verifies the received candidate block. Only if the verification is passed, ensuring that the candidate block contains only valid transactions, the validator will pledge its tokens to prepare for the candidate block to be put on the chain;

S107:当有足够的提名人抵押其代币并提名验证人时,向区块链广播其候选区块的行为将得到授权;S107: When enough nominators stake their tokens and nominate validators, the broadcast of their candidate blocks to the blockchain will be authorized;

S108:当所有验证人对中继链区块达成共识,验证人将第二从链上的交易从第二从链的出口移动到主链的入口以完成消息的传输;S108: When all validators reach a consensus on the relay chain block, the validator moves the transaction on the second slave chain from the exit of the second slave chain to the entrance of the main chain to complete the message transmission;

S109:主链在入口队列中执行该交易并修改自己的账本;S109: The main chain executes the transaction in the entry queue and modifies its own ledger;

S110:任务发布方服务器获得第二本地模型更新后的参数并暂存,等待若干个的第二客户端返回结果后进行聚合操作。S110: The task issuing server obtains and temporarily stores the updated parameters of the second local model, and waits for several second clients to return results before performing an aggregation operation.

在一个具体的实施例中,所述的第一从链和主链之间的跨链流程如下:In a specific embodiment, the cross-chain process between the first slave chain and the master chain is as follows:

S201:第一客户端在第一从链上创建账户,并初始化存储在第一从链上的信息;S201: The first client creates an account on the first slave chain and initializes the information stored on the first slave chain;

S202:当第一客户端完成对第一本地模型训练之后,第一客户端在第一从链上创建交易向主链发送包括第一本地模型参数以及身份信息;所述的交易为第一本地模型参数上传请求;S202: After the first client completes training the first local model, the first client creates a transaction on the first slave chain and sends the first local model parameters and identity information to the master chain; the transaction is a first local model parameter upload request;

S203:第一客户端对交易进行签名并广播;S203: The first client signs and broadcasts the transaction;

S204:第一从链的整理人收集交易信息,验证交易的有效性,整理交易数据,打包成候选区块;S204: First, the chain organizer collects transaction information, verifies the validity of the transaction, organizes the transaction data, and packages it into a candidate block;

S205:整理人向第一从链的验证人展示候选区块以及状态的转移证明;S205: The collation staff shows the candidate block and the proof of state transfer to the validator of the first slave chain;

S206:验证人验证接收到的候选区块,只有验证通过,确保候选区块中只包含有效的交易,验证人会抵押其代币为候选区块上链做准备;S206: The validator verifies the received candidate block. Only if the verification is passed, ensuring that the candidate block contains only valid transactions, the validator will pledge its tokens to prepare for the candidate block to be put on the chain;

S207:当有足够的提名人抵押其代币并提名验证人时,向区块链广播其候选区块的行为将得到授权;S207: When enough nominators stake their tokens and nominate validators, the broadcast of their candidate blocks to the blockchain will be authorized;

S208:当所有验证人对中继链区块达成共识,验证人将第一从链上的交易从第一从链的出口移动到主链的入口以完成消息的传输;S208: When all validators reach a consensus on the relay chain block, the validator moves the transaction on the first slave chain from the exit of the first slave chain to the entrance of the main chain to complete the message transmission;

S209:主链在入口队列中执行该交易并修改自己的账本;S209: The main chain executes the transaction in the entry queue and modifies its own ledger;

S210:任务发布方服务器获得第一本地模型更新后的参数并暂存,等待若干个的第一客户端返回结果后进行聚合操作。S210: The task issuing server obtains and temporarily stores the updated parameters of the first local model, and waits for a number of first clients to return results before performing an aggregation operation.

本发明不是简单的将传感器采集的所有物理数据直接上传虚拟世界,而是将数据按数据类型与隐私保护要求一分为二,非隐私数据可以直接上传虚拟世界数据存储模块(如云服务器、边缘服务器等),具有敏感信息的隐私数据存储在本地,从而实现元宇宙场景下人工智能应用的隐私保护。The present invention does not simply upload all physical data collected by sensors directly to the virtual world, but divides the data into two parts according to data type and privacy protection requirements. Non-privacy data can be directly uploaded to the virtual world data storage module (such as cloud servers, edge servers, etc.), and privacy data with sensitive information is stored locally, thereby realizing privacy protection of artificial intelligence applications in the metaverse scenario.

本发明利用区块链技术,搭建去中心化的元宇宙跨链联邦机器学习框架,该框架不同与传统的联邦机器学习框架,该框架中的一条区块链称为主链,作为全局模型参数的存储管理模块,多条从链作为本地模型参数的存储模块,本地训练模型参数上传到从链中。所述的元宇宙跨链联邦机器学习框架能记录本地模型的训练过程,实现隐私保护和本地训练过程的可审计性、可追溯性。The present invention uses blockchain technology to build a decentralized Metaverse cross-chain federated machine learning framework. This framework is different from the traditional federated machine learning framework. One blockchain in this framework is called the main chain, which serves as a storage management module for global model parameters, and multiple slave chains serve as storage modules for local model parameters. Local training model parameters are uploaded to the slave chains. The Metaverse cross-chain federated machine learning framework can record the training process of the local model, achieve privacy protection and the auditability and traceability of the local training process.

本发明还提出采用跨链聚合方法,该方法中主从链间的本地模型参数的交互通过跨链形式进行,保证可追溯性同时也在一定程度保证本地模型参数交互的安全性。The present invention also proposes to adopt a cross-chain aggregation method, in which the interaction of local model parameters between the master and slave chains is carried out in a cross-chain form, ensuring traceability while also ensuring the security of local model parameter interaction to a certain extent.

实施例2Example 2

一种计算机设备,包括存储器、处理器以及存储在存储器上并可在处理器上运行的计算机程序,所述的处理器执行所述的计算机程序时,实现面向元宇宙场景的数据隐私保护方法的步骤:A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of a data privacy protection method for a metaverse scenario are implemented:

将数据按数据类型与隐私保护要求一分为二,非隐私数据直接上传虚拟世界中的数据存储模块,作为第一本地私有数据集训练第一本地模型;而具有敏感信息的隐私数据存储在本地,作为第二本地私有数据集训练第二本地模型;The data is divided into two parts according to the data type and privacy protection requirements. The non-privacy data is directly uploaded to the data storage module in the virtual world and used as the first local private data set to train the first local model. The privacy data with sensitive information is stored locally and used as the second local private data set to train the second local model.

构建具有隐私保护的元宇宙跨链联邦机器学习框架,所述的元宇宙跨链联邦机器学习框架包括用于存储全局模型的任务发布方、用于通过第一本地私有数据集训练第一本地模型的第一客户端、用于通过第二本地私有数据集训练第二本地模型的第二客户端;所述的任务发布方、第一客户端设置在虚拟世界中,所述的第二客户端设置在现实世界;Constructing a Metaverse cross-chain federated machine learning framework with privacy protection, the Metaverse cross-chain federated machine learning framework comprising a task publisher for storing a global model, a first client for training a first local model through a first local private data set, and a second client for training a second local model through a second local private data set; the task publisher and the first client are set in a virtual world, and the second client is set in a real world;

所述的第一客户端、第二客户端基于跨链聚合方法将第一本地模型参数、第二本地模型参数更新并聚合得到新的全局模型。The first client and the second client update the first local model parameters and the second local model parameters based on the cross-chain aggregation method and aggregate them to obtain a new global model.

其中,存储器和处理器采用总线方式连接,总线可以包括任意数量的互联的总线和桥,总线将一个或多个处理器和存储器的各种电路连接在一起。总线还可以将诸如外围设备、稳压器和功率管理电路等之类的各种其他电路连接在一起,这些都是本领域所公知的,因此,本文不再对其进行进一步描述。总线接口在总线和收发机之间提供接口。收发机可以是一个元件,也可以是多个元件,比如多个接收器和发送器,提供用于在传输介质上与各种其他装置通信的单元。经处理器处理的数据通过天线在无线介质上进行传输,进一步,天线还接收数据并将数据传送给处理器。Among them, the memory and the processor are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors and memories together. The bus can also connect various other circuits such as peripherals, voltage regulators, and power management circuits, which are all well known in the art and are therefore not further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor is transmitted on a wireless medium via an antenna, and further, the antenna also receives data and transmits the data to the processor.

实施例3Example 3

一种计算机可读存储介质,其上存储有计算机程序,所述的计算机程序被处理器执行时,实现面向元宇宙场景的数据隐私保护方法的步骤:A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of implementing a data privacy protection method for a metaverse scenario are as follows:

将数据按数据类型与隐私保护要求一分为二,非隐私数据直接上传虚拟世界中的数据存储模块,作为第一本地私有数据集训练第一本地模型;而具有敏感信息的隐私数据存储在本地,作为第二本地私有数据集训练第二本地模型;The data is divided into two parts according to the data type and privacy protection requirements. The non-privacy data is directly uploaded to the data storage module in the virtual world and used as the first local private data set to train the first local model. The privacy data with sensitive information is stored locally and used as the second local private data set to train the second local model.

构建具有隐私保护的元宇宙跨链联邦机器学习框架,所述的元宇宙跨链联邦机器学习框架包括用于存储全局模型的任务发布方、用于通过第一本地私有数据集训练第一本地模型的第一客户端、用于通过第二本地私有数据集训练第二本地模型的第二客户端;所述的任务发布方、第一客户端设置在虚拟世界中,所述的第二客户端设置在现实世界;Constructing a Metaverse cross-chain federated machine learning framework with privacy protection, the Metaverse cross-chain federated machine learning framework comprising a task publisher for storing a global model, a first client for training a first local model through a first local private data set, and a second client for training a second local model through a second local private data set; the task publisher and the first client are set in a virtual world, and the second client is set in a real world;

所述的第一客户端、第二客户端基于跨链聚合方法将第一本地模型参数、第二本地模型参数更新并聚合得到新的全局模型。The first client and the second client update the first local model parameters and the second local model parameters based on the cross-chain aggregation method and aggregate them to obtain a new global model.

本领域技术人员可以理解,实现上述实施例方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-OnlyMemory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。Those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

显然,本发明的上述实施例仅仅是为清楚地说明本发明所作的举例,而并非是对本发明的实施方式的限定。凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明权利要求的保护范围之内。Obviously, the above embodiments of the present invention are only examples for clearly explaining the present invention, and are not intended to limit the implementation methods of the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention shall be included in the protection scope of the claims of the present invention.

Claims (10)

1. A data privacy protection method for a meta-universe scene is characterized by comprising the following steps of: the method comprises the following steps:
Dividing data into two parts according to data types and privacy protection requirements, and directly uploading non-private data to a data storage module in a virtual world to be used as a first local private data set to train a first local model; while private data with sensitive information is stored locally as a second local private data set training a second local model;
Constructing a metauniverse cross-chain federation machine learning framework with privacy protection, wherein the metauniverse cross-chain federation machine learning framework comprises a task publisher for storing a global model, a first client for training a first local model through a first local private data set and a second client for training a second local model through a second local private data set; the task publisher and the first client are arranged in the virtual world, and the second client is arranged in the real world;
The first client and the second client update and aggregate the first local model parameters and the second local model parameters based on a cross-chain aggregation method to obtain a new global model;
Constructing a decentralised meta universe cross-chain federation machine learning framework by using a blockchain technology, wherein one blockchain is used as a main chain, and the main chain is used as a storage management module of global model parameters; a first storage module taking one blockchain as a first slave chain and taking the first slave chain as a first local model parameter; a second storage module for taking one blockchain as a second slave chain and taking the second slave chain as a second local model parameter; and a relay chain is also arranged, and the relay chain is used as a cross-chain management platform.
2. The meta-universe scene-oriented data privacy protection method of claim 1, characterized by:
The task publisher transmits the initialized global model through the main chain, and receives updated parameters of the first local model and the second local model through the main chain;
The first client receives the initialized global model through a first slave chain and uploads the updated first local model parameters to the first slave chain;
the second client receives the initialized global model through a second slave chain and uploads the updated second local model parameters to the second slave chain;
the relay chain realizes bridging of the first slave chain, the second slave chain and the main chain.
3. The meta-universe scene-oriented data privacy protection method of claim 2, characterized by: before training the meta-universe cross-chain federal machine learning framework, initializing is carried out, and the method specifically comprises the following steps:
the first slave chain and the second slave chain register to the relay chain, a task publisher determines a federal machine learning task and searches a first client and a second client which participate in federal machine learning training;
the first client and the second client determine whether to participate in a federal machine learning task according to requirements; after the two parties reach the agreement, entering a federal machine learning process;
The task publisher uploads the initialized global model w t to the main chain, and the first client of the virtual world and the second client of the real world acquire the initialized global model w t through the corresponding first slave chain and the second slave chain respectively.
4. The meta-universe scene-oriented data privacy protection method of claim 3, characterized by: the federal machine learning process is specifically as follows:
The second client and the first client receive the initialized global model w t issued by the task issuing party and initialize the global model w t respectively to obtain a second local model First local model/>The initialization process is as follows:
Where P represents a second set of real-world clients, A first set of clients representing a virtual world; then, the first client and the second client respectively use the first local private data set D j and the second local private data set D i for training, D i represents the second local private data set held by the real-world second client i, and D j represents the first local private data set held by the virtual world first client j; the second local model and the first local model are respectively defined as follows:
Real world:
Virtual world:
Wherein w is a global model parameter, |d i | is the size of the dataset of the second client i, |d j | is the size of the dataset of the first client j, f k (w) is a local loss function, each client performs random gradient descent for a given number of iterations, and the training results in a second local model, the first local model being as follows:
wherein, eta is the learning rate, Is a gradient.
5. The meta-universe scene-oriented data privacy protection method of claim 4, characterized by: after the first client in the virtual world and the second client in the real world train the first local model and the second local model, the trained first local model parameters and second local model parameters are respectively uploaded to a first slave chain and a second slave chain, a cross-link request is respectively initiated on the main chain by the first slave chain and the second slave chain, the first local model parameters and the second local model parameters are updated and uploaded to the main chain in a block chain cross-link mode, and the main chain verifies the received first local model parameters and second local model parameters and performs aggregation operation to obtain a new global model w t+1, which is defined as follows:
Iterating for a certain number of times until the global model converges, and ending the federal machine learning task at the moment; the learned global model will be retained in the backbone for subsequent predictive or classification work services.
6. The meta-universe scene-oriented data privacy protection method of claim 5, characterized by: four participants are in total in the cross-chain polymerization method, and the functions of the four participants are as follows:
the verifier: the method comprises the steps of taking charge of the block out of a relay chain network, running a client of one relay chain, and verifying a block generated by a nominated blockchain;
and (3) finishing: maintaining all nodes of a blockchain, helping a verifier to collect and verify the correctness of a transaction and submitting candidate blocks to the verifier;
the nominator: the party concerned who owns the token maintains and is responsible for verifying the security of the person;
the supervisor: the benefit is obtained by the detection of illegal transactions or illegal blocks.
7. The meta-universe scene-oriented data privacy protection method of claim 6, characterized by: the process of crossing the chain between the second slave chain and the main chain is as follows:
s101: the second client creates an account on the second slave chain and initializes information stored on the second slave chain;
s102: after the second client finishes training the second local model, the second client creates a transaction on the second slave chain and sends the transaction including the second local model parameters and the identity information to the main chain; the transaction is a second local model parameter uploading request;
s103: the second client signs and broadcasts the transaction;
S104: collecting transaction information from a collator of the chain, verifying the validity of the transaction, collating transaction data, and packaging into candidate blocks;
s105: the collator presents the candidate block and the transition proof of state to a verifier of the second slave chain;
s106: the verifier verifies the received candidate block, only the verification passes, only effective transactions are ensured to be contained in the candidate block, and the verifier mortises the tokens of the candidate block to prepare for the uplink of the candidate block;
s107: broadcasting the candidate block to the blockchain will be authorized when there are enough nominators to mortgage their tokens and nominating the verifier;
s108: when all authenticators agree on the relay chain block, the authenticators move the transaction on the second slave chain from the exit of the second slave chain to the entrance of the master chain to complete the transmission of the message;
S109: the main chain executes the transaction in the entrance queue and modifies the account book of the main chain;
s110: the task issuing side server obtains the updated parameters of the second local model, temporarily stores the updated parameters, and performs aggregation operation after waiting for the return results of a plurality of second clients.
8. The meta-universe scene-oriented data privacy protection method of claim 6, characterized by: the first slave chain and the main chain have the following cross-chain flow path:
s201: the first client creates an account on the first slave chain and initializes information stored on the first slave chain;
S202: after the first client finishes training the first local model, the first client creates a transaction on the first slave chain and sends the first local model parameters and identity information to the main chain; the transaction is a first local model parameter uploading request;
s203: the first client signs and broadcasts the transaction;
S204: collecting transaction information by a collator of a chain, verifying the validity of a transaction, collating transaction data, and packaging into candidate blocks;
s205: the collator presents the candidate block and the transition proof of state to the verifier of the first slave chain;
S206: the verifier verifies the received candidate block, only the verification passes, only effective transactions are ensured to be contained in the candidate block, and the verifier mortises the tokens of the candidate block to prepare for the uplink of the candidate block;
S207: broadcasting the candidate block to the blockchain will be authorized when there are enough nominators to mortgage their tokens and nominating the verifier;
S208: when all authenticators agree on the relay chain block, the authenticators move the transaction on the first slave chain from the exit of the first slave chain to the entrance of the master chain to complete the transmission of the message;
s209: the main chain executes the transaction in the entrance queue and modifies the account book of the main chain;
S210: the task issuing side server obtains the updated parameters of the first local model, temporarily stores the parameters, and performs aggregation operation after waiting for the return results of a plurality of first clients.
9. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized by: the processor, when executing the computer program, performs the steps of the method according to any one of claims 1 to 8.
10. A computer-readable storage medium having stored thereon a computer program, characterized by: the computer program, when executed by a processor, performs the steps of the method according to any one of claims 1 to 8.
CN202210631627.1A 2022-06-06 2022-06-06 A data privacy protection method, system, and storage medium for metaverse scenarios Active CN114861211B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210631627.1A CN114861211B (en) 2022-06-06 2022-06-06 A data privacy protection method, system, and storage medium for metaverse scenarios

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210631627.1A CN114861211B (en) 2022-06-06 2022-06-06 A data privacy protection method, system, and storage medium for metaverse scenarios

Publications (2)

Publication Number Publication Date
CN114861211A CN114861211A (en) 2022-08-05
CN114861211B true CN114861211B (en) 2024-06-07

Family

ID=82624055

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210631627.1A Active CN114861211B (en) 2022-06-06 2022-06-06 A data privacy protection method, system, and storage medium for metaverse scenarios

Country Status (1)

Country Link
CN (1) CN114861211B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115329385B (en) * 2022-10-11 2022-12-16 北京理工大学 A model training method and device based on blockchain cross-chain privacy protection
CN116015736B (en) * 2022-12-05 2025-07-11 南京邮电大学 A large-scale cross-chain dynamic access management system and method
CN116489637B (en) * 2023-04-25 2023-11-03 北京交通大学 A privacy-preserving mobile edge computing method for the metaverse

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114417421A (en) * 2022-01-26 2022-04-29 深圳技术大学 A metaverse-based shared information privacy protection method and related device
CN114510150A (en) * 2022-02-17 2022-05-17 李双江 Experience system of virtual digital world

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100161413A1 (en) * 2008-12-18 2010-06-24 International Business Machines Corporation Virtual universe exchanges based on real-world transactions
US11694110B2 (en) * 2019-06-12 2023-07-04 International Business Machines Corporation Aggregated machine learning verification for database
US11580240B2 (en) * 2020-03-24 2023-02-14 Kyndryl, Inc. Protecting sensitive data
CN112434313B (en) * 2020-11-11 2024-12-10 北京邮电大学 Data sharing method, system, electronic device and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114417421A (en) * 2022-01-26 2022-04-29 深圳技术大学 A metaverse-based shared information privacy protection method and related device
CN114510150A (en) * 2022-02-17 2022-05-17 李双江 Experience system of virtual digital world

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
面向移动计算的安全与隐私保护研究;康嘉文;《中国博士学位论文全文数据库(电子期刊)》;20181015(第10期);I138-11 *

Also Published As

Publication number Publication date
CN114861211A (en) 2022-08-05

Similar Documents

Publication Publication Date Title
Zhou et al. Solutions to scalability of blockchain: A survey
Bilal et al. Blockchain technology: Opportunities & challenges
JP7518220B2 (en) Methods for nodes in a blockchain network
CN109964446B (en) Consensus method based on voting
CN114861211B (en) A data privacy protection method, system, and storage medium for metaverse scenarios
Kaur et al. Scalability in blockchain: Challenges and solutions
Xu et al. BESIFL: Blockchain-empowered secure and incentive federated learning paradigm in IoT
Zheng et al. An overview of blockchain technology: Architecture, consensus, and future trends
JP2023033407A (en) Method and system for mining block-chain transaction provided by validator node
Yadav Blockchain security
CN110163607A (en) The personal reference method of college student number based on block chain intelligence contract
WO2019242285A1 (en) Blockchain-based equity asset value token money creating method and system, and blockchain-based equity asset value token money transaction method and system
CN110417790A (en) Block chain system of real name queuing system and method
CN113037824B (en) A construction method of high-performance blockchain for cloud computing
CN113554421A (en) Police affair resource data governance cooperation method based on block chain
CN114362987A (en) Distributed voting system and method based on block chain and intelligent contract
CN116595094A (en) Federal learning incentive method, device, equipment and storage medium based on block chain
CN110557276B (en) Block chain computer room management system based on Fabric architecture
Jennath et al. Survey on blockchain consensus strategies
CN112995167A (en) Kafka mechanism-based power utilization information acquisition method, block chain network and user side
CN115952532A (en) A privacy protection method based on alliance chain federated learning
CN113839768A (en) A cross-chain communication method based on satellite chain relay
Alkhodair et al. Consensus algorithms of distributed ledger technology--a comprehensive analysis
Zhou et al. Overview to blockchain scalability challenges and solutions
CN111222885B (en) Data processing request endorsement method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant