[go: up one dir, main page]

CN118608156A - A data trading method - Google Patents

A data trading method Download PDF

Info

Publication number
CN118608156A
CN118608156A CN202410856886.3A CN202410856886A CN118608156A CN 118608156 A CN118608156 A CN 118608156A CN 202410856886 A CN202410856886 A CN 202410856886A CN 118608156 A CN118608156 A CN 118608156A
Authority
CN
China
Prior art keywords
data
transaction
user
controller
target
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.)
Pending
Application number
CN202410856886.3A
Other languages
Chinese (zh)
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.)
Yunhai Chain Holdings Co ltd
Original Assignee
Yunhai Chain Holdings Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yunhai Chain Holdings Co ltd filed Critical Yunhai Chain Holdings Co ltd
Priority to CN202410856886.3A priority Critical patent/CN118608156A/en
Publication of CN118608156A publication Critical patent/CN118608156A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification
    • G06Q20/4016Transaction verification involving fraud or risk level assessment in transaction processing
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes
    • G06F21/6254Protecting personal data, e.g. for financial or medical purposes by anonymising data, e.g. decorrelating personal data from the owner's identification
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/02Payment architectures, schemes or protocols involving a neutral party, e.g. certification authority, notary or trusted third party [TTP]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3821Electronic credentials
    • G06Q20/38215Use of certificates or encrypted proofs of transaction rights

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Finance (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Databases & Information Systems (AREA)
  • Medical Informatics (AREA)
  • Storage Device Security (AREA)

Abstract

本申请公开了一种数据的交易方法。本申请实施例提供的方法应用于数据交易系统,由数据信托机构和包括TEE的数据控制者组成。在交易过程中,数据信托机构为数据交易请求匹配目标用户,同时数据控制者判断目标交易响应时间的合理性。当目标交易响应时间合理时,数据控制者查询目标用户存储的目标数据,TEE获取分析条件,并在TEE内对目标数据进行提取以生成交易数据,随后进行数据容量验证和实际交易响应时间验证。如果验证通过,交易数据将反馈给数据使用者。本申请利用TEE加密隔离数据,保障目标数据和分析条件安全。同时将智能合约设置在区块链上可以增强交易的公开性和透明性,并提高交易的信任度和可追溯性。

The present application discloses a data transaction method. The method provided by the embodiment of the present application is applied to a data transaction system, which is composed of a data trust agency and a data controller including a TEE. During the transaction process, the data trust agency matches the target user for the data transaction request, and the data controller determines the rationality of the target transaction response time. When the target transaction response time is reasonable, the data controller queries the target data stored by the target user, the TEE obtains the analysis conditions, and extracts the target data within the TEE to generate transaction data, followed by data capacity verification and actual transaction response time verification. If the verification passes, the transaction data will be fed back to the data user. The present application uses TEE to encrypt and isolate data to ensure the security of target data and analysis conditions. At the same time, setting the smart contract on the blockchain can enhance the openness and transparency of transactions, and improve the trust and traceability of transactions.

Description

一种数据的交易方法A data trading method

技术领域Technical Field

本申请涉及数据处理技术领域,具体涉及一种数据的交易方法。The present application relates to the field of data processing technology, and in particular to a data transaction method.

背景技术Background Art

在传统的数据交易模式中,交易往往通过第三方平台如交易所或云平台完成。然而,这种方式存在着安全性较低的风险和挑战。首先,第三方平台通常需要处理大量的数据流和交易,这使得它们成为潜在的攻击目标。黑客可能会试图入侵这些平台,窃取或篡改存储的数据,造成数据泄露或损坏的风险。In the traditional data trading model, transactions are often completed through third-party platforms such as exchanges or cloud platforms. However, this approach has risks and challenges of low security. First, third-party platforms usually need to handle a large number of data flows and transactions, which makes them potential targets for attack. Hackers may try to invade these platforms and steal or tamper with the stored data, causing the risk of data leakage or damage.

其次,第三方平台在数据处理和存储过程中可能存在安全漏洞或技术缺陷。尽管这些平台通常会采取安全措施来保护数据,如加密和访问控制,但技术风险和漏洞仍然是存在的。一旦这些漏洞被利用,可能导致数据的非法访问和利用,给数据交易的安全性带来严重威胁。Secondly, third-party platforms may have security vulnerabilities or technical defects in the process of data processing and storage. Although these platforms usually take security measures to protect data, such as encryption and access control, technical risks and vulnerabilities still exist. Once these vulnerabilities are exploited, they may lead to illegal access and use of data, posing a serious threat to the security of data transactions.

另外,第三方平台在数据交易中扮演了中介角色,这意味着数据的流动和处理都需要通过它们的系统和网络。这增加了数据在传输过程中被窃听或篡改的风险。虽然加密和安全协议可以部分减少这些风险,但完全消除这些威胁仍然非常困难。In addition, third-party platforms play an intermediary role in data transactions, which means that the flow and processing of data need to pass through their systems and networks. This increases the risk of data being eavesdropped or tampered with during transmission. Although encryption and security protocols can partially reduce these risks, it is still very difficult to completely eliminate these threats.

最后,第三方平台可能面临监管和合规问题,特别是在数据隐私保护方面。一些平台可能未能有效实施数据保护措施或者未能遵守相关法律法规,这可能会导致数据泄露或不当使用,进而对数据交易的合法性和安全性造成影响。Finally, third-party platforms may face regulatory and compliance issues, especially in terms of data privacy protection. Some platforms may fail to effectively implement data protection measures or fail to comply with relevant laws and regulations, which may lead to data leakage or improper use, thus affecting the legality and security of data transactions.

因此,虽然第三方平台提供了便捷的数据交易和处理服务,但其安全性较低。Therefore, although third-party platforms provide convenient data transaction and processing services, their security is relatively low.

发明内容Summary of the invention

基于上述问题,本申请提供了一种数据的交易方法,可以提高数据交易的安全性。Based on the above problems, the present application provides a data transaction method, which can improve the security of data transactions.

本申请实施例公开了如下技术方案:The embodiments of the present application disclose the following technical solutions:

一种数据的交易方法,应用于数据交易系统,所述数据交易系统包括数据信托机构和数据控制者,所述数据控制者包括可信执行环境TEE,所述数据信托机构已与所述数据控制者构建智能合约;所述智能合约包括合同管理合约、身份管理合约以及交易管理合约,所述智能合约中包含各个合约均部署在区块链之中,所述方法包括:A data transaction method is applied to a data transaction system, wherein the data transaction system includes a data trust institution and a data controller, wherein the data controller includes a trusted execution environment TEE, and the data trust institution has built a smart contract with the data controller; the smart contract includes a contract management contract, an identity management contract, and a transaction management contract, and each contract contained in the smart contract is deployed in a blockchain, and the method includes:

当所述数据信托机构接收到数据使用者发送到所述交易管理合约的数据交易请求时,所述数据信托机构基于所述合同管理合约和所述身份管理合约为所述数据交易请求匹配目标用户,所述数据控制者判断所述数据交易请求中的目标交易响应时间是否合理;When the data trust institution receives a data transaction request sent by a data user to the transaction management contract, the data trust institution matches a target user for the data transaction request based on the contract management contract and the identity management contract, and the data controller determines whether the target transaction response time in the data transaction request is reasonable;

当所述数据控制者判断所述数据交易请求中的目标交易响应时间合理时,所述数据控制者查询所述目标用户存储的目标数据,所述TEE基于所述身份管理合约获取分析条件;所述目标数据是通过目标数据密文进行解密得到的;所述目标数据密文是数据所有者定义的;所述目标数据被所述目标用户利用所述目标数据密文存储在数据控制者处;所述分析条件是通过分析条件密文进行解密得到的;所述分析条件密文是所述数据使用者定义的;When the data controller determines that the target transaction response time in the data transaction request is reasonable, the data controller queries the target data stored by the target user, and the TEE obtains the analysis condition based on the identity management contract; the target data is obtained by decrypting the target data ciphertext; the target data ciphertext is defined by the data owner; the target data is stored at the data controller by the target user using the target data ciphertext; the analysis condition is obtained by decrypting the analysis condition ciphertext; the analysis condition ciphertext is defined by the data user;

所述TEE基于所述数据交易请求和所述分析条件对所述目标数据进行数据提取,得到交易数据;The TEE extracts the target data based on the data transaction request and the analysis condition to obtain transaction data;

所述TEE对所述交易数据进行数据容量验证;The TEE performs data capacity verification on the transaction data;

若所述数据容量验证通过,所述TEE则基于所述交易管理合约将交易数据反馈给所述数据使用者。If the data capacity verification is passed, the TEE will feed back the transaction data to the data user based on the transaction management contract.

在一种可能的实现方式中,所述数据交易请求携带使用者保证金、使用者身份、使用领域、使用目的以及数据类别;In a possible implementation, the data transaction request carries the user deposit, user identity, usage field, usage purpose and data category;

所述数据信托机构基于所述合同管理合约和所述身份管理合约为所述数据交易请求匹配目标用户,包括:The data trust institution matches a target user for the data transaction request based on the contract management contract and the identity management contract, including:

所述数据信托机构所述身份管理合约中的去中心化数字身份DID文档验证所述使用者身份是否真实,并验证所述使用者保证金是否合理;所述DID文档对应的身份验证凭证中预先存储了所述使用者身份;The decentralized digital identity DID document in the identity management contract of the data trust institution verifies whether the user's identity is authentic and whether the user's deposit is reasonable; the identity of the user is pre-stored in the identity verification certificate corresponding to the DID document;

当所述使用者身份是否真实且所述使用者保证金合理时,所述数据信托机构识别所述数据交易请求所需的交易数据,并查询具备所述交易数据的一个或多个数据所有者;When the user's identity is authentic and the user's deposit is reasonable, the data trust institution identifies the transaction data required by the data transaction request and queries one or more data owners who have the transaction data;

所述数据信托机构基于所述合同管理合约获取数据所有者的交易策略;所述交易策略包括身份资格集合、数据应用领域集合、数据使用目的集合以及数据类别集合;The data trust institution obtains the transaction strategy of the data owner based on the contract management agreement; the transaction strategy includes an identity qualification set, a data application field set, a data usage purpose set, and a data category set;

所述数据信托机构将交易策略内包含所述使用者身份、所述使用领域、所述使用目的以及所述数据类别的交易策略确定为目标策略;The data trust institution determines the transaction strategy including the user identity, the usage field, the usage purpose and the data category in the transaction strategy as the target strategy;

将所述目标策略对应的数据所有者确定为所述目标用户。The data owner corresponding to the target policy is determined as the target user.

在一种可能的实现方式中,所述交易策略内包含所述使用者身份包括所述身份资格集合内包含所述使用者身份;In a possible implementation, the transaction strategy includes the user identity including the identity qualification set including the user identity;

所述交易策略内包含所述使用领域包括所述数据应用领域集合内包含所述使用领域;The usage domain included in the transaction strategy includes the usage domain included in the data application domain set;

所述交易策略内包含所述使用目的包括所述数据使用目的集合内包含所述使用目的;The transaction strategy includes the usage purpose, including the data usage purpose set including the usage purpose;

所述交易策略内包含所述数据类别包括所述数据类别集合内包含所述数据类别。The data category is included in the transaction strategy including the data category is included in the data category set.

在一种可能的实现方式中,所述方法还包括:In a possible implementation, the method further includes:

所述数据信托机构获取所述数据控制者缴纳的控制者保证金金额;The data trust institution obtains the controller deposit amount paid by the data controller;

所述数据信托机构基于所述交易管理合约验证所述控制者保证金金额是否合理;The data trust institution verifies whether the controller's deposit amount is reasonable based on the transaction management contract;

当所述数据信托机构验证所述控制者保证金金额合理时,所述数据信托机构通知数据所有者利用数据密文将数据存储在所述数据控制者处。When the data trust institution verifies that the controller's deposit amount is reasonable, the data trust institution notifies the data owner to store the data at the data controller using data ciphertext.

在一种可能的实现方式中,所述TEE基于所述数据交易请求和所述分析条件对所述脱敏数据进行提取,得到交易数据,包括:In a possible implementation, the TEE extracts the desensitized data based on the data transaction request and the analysis condition to obtain transaction data, including:

所述TEE使用数据脱敏技术对所述目标数据进行脱敏得到脱敏数据;The TEE uses data desensitization technology to desensitize the target data to obtain desensitized data;

所述TEE基于所述数据交易请求携带的数据类别对所述脱敏数据进行过滤得到过滤数据;The TEE filters the desensitized data based on the data category carried in the data transaction request to obtain filtered data;

所述TEE基于所述分析条件对所述过滤数据进行筛选得到所述交易数据。The TEE filters the filter data based on the analysis condition to obtain the transaction data.

在一种可能的实现方式中,所述数据容量验证,包括:In a possible implementation, the data capacity verification includes:

所述TEE计算所述交易数据的容量和所述过滤数据的容量;The TEE calculates the capacity of the transaction data and the capacity of the filtered data;

所述TEE获取所述数据所有者设置的交易数据约束;所述交易数据约束大于0且小于或等于1;The TEE obtains the transaction data constraint set by the data owner; the transaction data constraint is greater than 0 and less than or equal to 1;

若所述交易数据的容量小于或等于所述交易数据约束与所述过滤数据的容量的乘积,所述TEE则判定所述数据容量验证通过。If the capacity of the transaction data is less than or equal to the product of the transaction data constraint and the capacity of the filter data, the TEE determines that the data capacity verification is successful.

在一种可能的实现方式中,所述方法还包括:进行实际交易响应时间验证:In a possible implementation, the method further includes: performing actual transaction response time verification:

获取从所述TEE获取到所述分析条件开始,到所述TEE基于所述交易管理合约将交易数据反馈给所述数据使用者为止所有的时间,作为实际交易响应时间;Obtain all the time from when the TEE obtains the analysis condition to when the TEE feeds back the transaction data to the data user based on the transaction management contract as the actual transaction response time;

若所述实际交易响应时间小于或等于所述目标交易响应时间,所述TEE则判定实际交易响应时间验证通过;If the actual transaction response time is less than or equal to the target transaction response time, the TEE determines that the actual transaction response time verification is successful;

其中,所述实际交易响应时间验证是在所述数据容量验证通过后进行的。The actual transaction response time verification is performed after the data capacity verification is passed.

在一种可能的实现方式中,所述方法还包括:In a possible implementation, the method further includes:

获取所述数据所有者定义的利益分配系数;所述利益分配系数包括数据信托机构分配比例、数据控制者分配比例以及数据所有者分配比例;所述数据信托机构分配比例与所述数据控制者分配比例和所述数据所有者分配比例的和为1;Obtaining the profit distribution coefficient defined by the data owner; the profit distribution coefficient includes the distribution ratio of the data trust institution, the distribution ratio of the data controller and the distribution ratio of the data owner; the sum of the distribution ratio of the data trust institution, the distribution ratio of the data controller and the distribution ratio of the data owner is 1;

若所述数据容量验证和所述实际交易响应时间验证均通过,则将所述数据使用者缴纳的使用者保证金按照所述利益分配系数分配给所述数据信托机构、所述数据控制者和所述数据所有者,并将所述数据控制者缴纳的控制者保证金退回给所述数据控制者;If both the data capacity verification and the actual transaction response time verification are passed, the user deposit paid by the data user is distributed to the data trust institution, the data controller and the data owner according to the profit distribution coefficient, and the controller deposit paid by the data controller is returned to the data controller;

若所述数据容量验证通过但所述实际交易响应时间验证未通过,则将所述数据控制者缴纳的控制者保证金按照所述利益分配系数分配给所述数据信托机构、所述数据使用者和所述数据所有者,并将所述数据使用者缴纳的使用者保证金退回给所述数据控制者,其中,所述数据使用者得到的控制者保证金是按照所述数据控制者分配比例分配得到的;If the data capacity verification passes but the actual transaction response time verification fails, the controller deposit paid by the data controller shall be distributed to the data trust institution, the data user and the data owner according to the profit distribution coefficient, and the user deposit paid by the data user shall be returned to the data controller, wherein the controller deposit obtained by the data user is distributed according to the distribution ratio of the data controller;

若所述数据容量验证未通过,则将所述数据控制者缴纳的控制者保证金退回给所述数据控制者,并更换新的数据控制者进行数据的交易。If the data capacity verification fails, the controller deposit paid by the data controller will be returned to the data controller, and a new data controller will be replaced to conduct data transactions.

在一种可能的实现方式中,所述分析条件密文是所述数据使用者基于所述交易管理合约和所述身份管理合约进行加密得到的;In a possible implementation, the analysis condition ciphertext is obtained by the data user through encryption based on the transaction management contract and the identity management contract;

其中,当所述数据使用者基于所述身份管理合约验证使用者签名是真实时,所述数据使用者则利用所述交易管理合约中预先存储的分析条件私钥skDU对分析条件对称密钥kenc进行解密得到分析条件加密密钥k,所述数据使用者利用所述分析条件加密密钥k对所述分析条件进行加密得到所述分析条件密文;所述身份管理合约中预先存储了所述数据使用者的使用者签名;所述数据使用者的使用者签名用于验证使用者签名是否真实。Among them, when the data user verifies that the user signature is authentic based on the identity management contract, the data user uses the analysis condition private key sk DU pre-stored in the transaction management contract to decrypt the analysis condition symmetric key k enc to obtain the analysis condition encryption key k, and the data user uses the analysis condition encryption key k to encrypt the analysis condition to obtain the analysis condition ciphertext; the user signature of the data user is pre-stored in the identity management contract; the user signature of the data user is used to verify whether the user signature is authentic.

在一种可能的实现方式中,所述方法还包括:In a possible implementation, the method further includes:

在所述数据交易请求未匹配到所述目标用户时,将所述数据交易请求的请求状态设置为等待。When the data transaction request is not matched to the target user, the request state of the data transaction request is set to waiting.

在一种可能的实现方式中,所述方法还包括:In a possible implementation, the method further includes:

当所述数据控制者判断所述数据交易请求中的目标交易响应时间合理时,将所述数据交易请求的请求状态设置为回应。When the data controller determines that the target transaction response time in the data transaction request is reasonable, the request status of the data transaction request is set to response.

在一种可能的实现方式中,所述方法还包括:In a possible implementation, the method further includes:

当所述数据容量验证未通过时,将所述数据交易请求的请求状态由回应改为等待。When the data capacity verification fails, the request status of the data transaction request is changed from response to waiting.

相较于现有技术,本申请具有以下有益效果:Compared with the prior art, this application has the following beneficial effects:

本申请提供了一种数据的交易方法。具体地,本申请实施例提供的方法应用于由数据信托机构和包括TEE的数据控制者组成的数据交易系统。首先在数据信托机构接收到数据使用者发送的数据交易请求时,数据信托机构自动为数据交易请求匹配目标用户,同时数据控制者判断数据交易请求中的目标交易响应时间是否合理。当数据交易请求中的目标交易响应时间合理时,数据控制者查询目标用户存储的目标数据,同时TEE获取分析条件。TEE再基于数据交易请求和分析条件对所述目标数据进行数据提取得到交易数据,以使TEE对交易数据进行数据容量验证。若数据容量验证通过TEE则将交易数据通过交易管理合约反馈给数据使用者。本申请的数据交易过程中使用TEE,使得数据在处理和交换过程中得到有效的加密和隔离保护,确保数据所有者定义的目标数据密文和数据使用者定义的分析条件密文的安全性。同时通过智能合约,确保了数据交易请求的透明性,提供自动化的交易流程管理,减少了潜在的人为错误或不当干预。此外,区块链技术提供了交易的公开和透明性,所有交易参与方都可以查看交易的发生和执行过程。这增强了交易的信任度和可追溯性,降低了交易中信息不对称的风险。The present application provides a data transaction method. Specifically, the method provided in the embodiment of the present application is applied to a data transaction system composed of a data trust institution and a data controller including a TEE. First, when the data trust institution receives a data transaction request sent by a data user, the data trust institution automatically matches the target user for the data transaction request, and the data controller determines whether the target transaction response time in the data transaction request is reasonable. When the target transaction response time in the data transaction request is reasonable, the data controller queries the target data stored by the target user, and the TEE obtains the analysis condition. The TEE then extracts the target data based on the data transaction request and the analysis condition to obtain the transaction data, so that the TEE verifies the data capacity of the transaction data. If the data capacity verification passes the TEE, the transaction data is fed back to the data user through the transaction management contract. TEE is used in the data transaction process of the present application, so that the data is effectively encrypted and isolated during the processing and exchange process, ensuring the security of the target data ciphertext defined by the data owner and the analysis condition ciphertext defined by the data user. At the same time, through the smart contract, the transparency of the data transaction request is ensured, and automated transaction process management is provided, reducing potential human errors or improper intervention. In addition, blockchain technology provides openness and transparency of transactions, and all transaction participants can view the occurrence and execution process of the transaction. This enhances the trust and traceability of the transaction and reduces the risk of information asymmetry in the transaction.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

为更清楚地说明本实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单的介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in this embodiment or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

图1为本申请实施例提供的一种数据的交易方法的方法流程图;FIG1 is a flow chart of a data transaction method provided by an embodiment of the present application;

图2为本申请实施例提供的一种为数据交易请求匹配目标用户方法的方法流程图;FIG2 is a method flow chart of a method for matching target users for data transaction requests provided by an embodiment of the present application;

图3为本申请实施例提供的一种目标数据的获取方法的方法流程图;FIG3 is a flow chart of a method for acquiring target data provided by an embodiment of the present application;

图4为本申请实施例提供的一种交易数据的提取方法的方法流程图;FIG4 is a flow chart of a method for extracting transaction data provided by an embodiment of the present application;

图5为本申请实施例提供的一种保证金退回和分配方法的方法流程图。FIG5 is a method flow chart of a deposit return and allocation method provided in an embodiment of the present application.

具体实施方式DETAILED DESCRIPTION

为便于理解本申请实施例提供的技术方案,下面将先对本申请实施例涉及的背景技术进行说明。To facilitate understanding of the technical solutions provided by the embodiments of the present application, the background technology involved in the embodiments of the present application will be described below.

在传统的数据交易中,通常是在第三方平台(如交易所、云平台等)进行完成。这种方式存在安全性较低的风险主要有以下几个原因:In traditional data transactions, data is usually traded on third-party platforms (such as exchanges, cloud platforms, etc.). This method has the following main reasons for the low security risk:

单点故障风险:第三方平台作为数据交易的中介,一旦该平台遭受黑客攻击或数据泄露,可能导致大量用户数据被窃取或篡改,构成严重的安全威胁。Single point failure risk: As an intermediary for data transactions, once a third-party platform is attacked by hackers or data is leaked, a large amount of user data may be stolen or tampered with, posing a serious security threat.

数据隐私问题:在第三方平台上进行数据交易意味着将数据暴露给额外的中间方,存在潜在的隐私泄露风险。这些平台可能会搜集用户数据用于其他目的,增加了个人数据被滥用的可能性。Data privacy issues: Data transactions on third-party platforms mean exposing data to additional intermediaries, which poses a potential risk of privacy leakage. These platforms may collect user data for other purposes, increasing the possibility of personal data being abused.

信任问题:用户需要将数据托付给第三方平台进行交易,但这会引发信任问题。用户无法完全控制数据的流动和使用,容易受到数据不当处理或滥用的威胁。Trust issues: Users need to entrust their data to third-party platforms for transactions, but this will cause trust issues. Users cannot fully control the flow and use of data and are vulnerable to the threat of improper data processing or abuse.

数据篡改风险:在第三方平台上进行数据交易时,由于缺乏透明度和可追溯性,数据的真实性和完整性难以保证。数据可能会被篡改、修改或删除而无法察觉。Data tampering risk: When data is traded on a third-party platform, the authenticity and integrity of the data is difficult to guarantee due to the lack of transparency and traceability. Data may be tampered with, modified or deleted without detection.

综合来看,传统数据交易在第三方平台上的安全性相对较低,因为存在着单点故障风险、数据隐私问题、信任问题以及数据篡改风险等方面的挑战。Overall, the security of traditional data transactions on third-party platforms is relatively low due to challenges such as single point failure risks, data privacy issues, trust issues, and data tampering risks.

为了解决这一问题,在本申请实施例提供了一种数据的交易方法,本申请提出的方法应用于由数据信托机构和包括TEE的数据控制者组成的数据交易系统。数据信托机构接收数据使用者的交易请求后,自动匹配目标用户,同时数据控制者评估交易响应时间的合理性。在合理情况下,数据控制者查询目标用户存储的目标数据,TEE从数据使用者获取分析条件,进而对目标数据进行提取和数据验证,数据验证包括数据容量验证。通过TEE的加密和隔离保护,确保了数据密文和分析条件的安全性。智能合约确保了交易的合法性和透明性。区块链技术提供公开透明性,增强了交易的信任度和可追溯性,降低了信息不对称风险。In order to solve this problem, a data transaction method is provided in an embodiment of the present application. The method proposed in the present application is applied to a data transaction system composed of a data trust agency and a data controller including a TEE. After receiving the transaction request from the data user, the data trust agency automatically matches the target user, and the data controller evaluates the rationality of the transaction response time. Under reasonable circumstances, the data controller queries the target data stored by the target user, and the TEE obtains the analysis conditions from the data user, and then extracts and verifies the target data, and the data verification includes data capacity verification. The security of data ciphertext and analysis conditions is ensured through the encryption and isolation protection of TEE. Smart contracts ensure the legality and transparency of transactions. Blockchain technology provides openness and transparency, enhances the trust and traceability of transactions, and reduces the risk of information asymmetry.

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整的描述,显然,所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

参见图1,该图为本申请实施例提供的一种数据的交易方法的方法流程图。Refer to Figure 1, which is a method flow chart of a data transaction method provided in an embodiment of the present application.

需要说明的是,图1的方法流程图中的各步骤均是依赖于数据交易系统实现,而数据交易系统是由数据信托机构(DataTrust Institution,DTI)和数据控制者(DataController,DC)组成。It should be noted that each step in the method flow chart of FIG. 1 is implemented by relying on a data transaction system, and the data transaction system is composed of a data trust institution (DTI) and a data controller (DC).

其中,数据控制者包括可信执行环境(Trusted Execution Environment,TEE)。数据信托机构DTI已与数据控制者DC构建智能合约。智能合约包括合同管理合约(ContractManagement Contract,CMC)、身份管理合约(Identity Management Contract,IMC)以及交易管理合约(Transaction Management Contract,TMC)。智能合约中的各个合约均为区块链(Blockchain Platform,BP)上的节点。Among them, the data controller includes the Trusted Execution Environment (TEE). The data trust institution DTI has built a smart contract with the data controller DC. The smart contract includes the Contract Management Contract (CMC), the Identity Management Contract (IMC) and the Transaction Management Contract (TMC). Each contract in the smart contract is a node on the Blockchain Platform (BP).

数据信托机构DTI是具备充足的专家知识的数据交易服务机构,受数据所有者(Data Owner,DO)委托,将存储在数据控制者DC的数据售卖给数据使用者(DataUser,DU)。The Data Trust Institution (DTI) is a data trading service organization with sufficient expert knowledge. It is entrusted by the data owner (DO) to sell the data stored in the data controller DC to the data user (DU).

数据控制者DC用于收集数据所有者DO的数据,使用云存储服务存储数据,使用TEE支持的云计算服务处理基于数据的业务。数据控制者DC可以出于其商业利益与数据信托机构DTI合作,在数据所有者DO的许可下将数据所有者数据卖给数据使用者DU。The data controller DC is used to collect the data of the data owner DO, store the data using cloud storage services, and process data-based businesses using cloud computing services supported by TEE. The data controller DC can cooperate with the data trust institution DTI for its commercial interests and sell the data owner's data to the data user DU with the permission of the data owner DO.

TEE是一种计算机特殊硬件提供的安全计算区域,在该区域中运行的代码和数据不会被该区域之外的软件窃取,只有通过TEE内预先定义的接口才能安全访问其内部的代码和数据,因此TEE计算可以达到和密码学计算相似的隐私保护功能。同时由于TEE内部采用明文计算方式,所以效率几乎等同于在外部明文处理数据的效率。本申请中TEE可以确保其内部程序执行过程中的机密性和完整性。TEE is a secure computing area provided by special computer hardware. The code and data running in this area cannot be stolen by software outside this area. The code and data inside the TEE can only be safely accessed through the pre-defined interface in the TEE. Therefore, TEE computing can achieve privacy protection functions similar to cryptographic computing. At the same time, since the TEE uses plain text computing, the efficiency is almost the same as the efficiency of processing data in plain text outside. In this application, TEE can ensure the confidentiality and integrity of its internal program execution process.

区块链BP是一种不依赖第三方、通过自身分布式节点进行网络数据的存储、验证、传递和交流的一种技术方案,具有去中心化、公开透明、不可篡改的特点。可视为一种具有有限计算能力的“世界计算机”,可以通过自动执行智能合约的方式解决参与方的信任问题。Blockchain BP is a technical solution that does not rely on a third party and uses its own distributed nodes to store, verify, transmit and communicate network data. It has the characteristics of decentralization, openness, transparency and non-tamperability. It can be regarded as a "world computer" with limited computing power, which can solve the trust problem of participants by automatically executing smart contracts.

合同管理合约CMC,记录了数据所有者DO、数据控制者DC与数据信托机构DTI关于数据所有者DO委托数据信托机构售卖存储在数据控制者DC处的数据的合同,包括各角色身份标识、利益分配系数、交易数据类别等信息。本合约包含四个基本功能:创建(create)、读取(read)、更新(update)和删除(delete)。对于创建、更新和删除功能,只有数据拥有者、数据控制者与数据信托机构同时在交易中提交数字签名,合同管理合约才能执行上述功能。The contract management contract CMC records the contract between the data owner DO, the data controller DC and the data trust institution DTI regarding the data owner DO entrusting the data trust institution to sell the data stored at the data controller DC, including information such as the identity of each role, the profit distribution coefficient, and the transaction data category. This contract contains four basic functions: create, read, update, and delete. For the create, update, and delete functions, the contract management contract can only perform the above functions if the data owner, the data controller, and the data trust institution submit digital signatures in the transaction at the same time.

身份管理合约IMC,以明文形式记录了去中心化身份(Decentralized Identity,DID)标识和DID文档。本合约包含四个基本功能:创建(create)、读取(read)、更新(update)和删除(delete)。只有DID所有者可以对自己的DID文档进行创建、更新和删除。其余角色只能执行读取功能。The identity management contract IMC records the decentralized identity (DID) identifier and DID document in plain text. This contract contains four basic functions: create, read, update, and delete. Only the DID owner can create, update, and delete his or her DID document. The rest of the roles can only perform the read function.

交易管理合约TMC,以密文形式记录了数据使用者DU的数据交易请求。本合约包含八个功能:添加(add)、读取(read)、回应(response)、记录(record)、提交(submit)、拒绝(deny)、中止(abort)和结束(terminate)。只有数据使用者可以对自己的数据交易请求执行添加、记录、中止和结束功能,只有数据控制者可以执行回应、拒绝和提交功能。所有角色都能执行读取功能。The transaction management contract TMC records the data transaction request of the data user DU in ciphertext. This contract contains eight functions: add, read, respond, record, submit, deny, abort and terminate. Only data users can perform the add, record, abort and terminate functions on their own data transaction requests, and only data controllers can perform the respond, reject and submit functions. All roles can perform the read function.

如图1所示,该数据的交易方法可以包括步骤S101-S105:As shown in FIG1 , the data transaction method may include steps S101-S105:

S101:当所述数据信托机构接收到数据使用者发送到所述交易管理合约的数据交易请求时,所述数据信托机构基于所述合同管理合约和所述身份管理合约为所述数据交易请求匹配目标用户,所述数据控制者判断所述数据交易请求中的目标交易响应时间是否合理。S101: When the data trust institution receives a data transaction request sent by a data user to the transaction management contract, the data trust institution matches a target user for the data transaction request based on the contract management contract and the identity management contract, and the data controller determines whether the target transaction response time in the data transaction request is reasonable.

当数据信托机构收到来自数据使用者发送到交易管理合约(该交易管理合约部署在区块链之中)的数据交易请求时,根据事先约定的存放在合同管理合约中的合同,它会自动为请求寻找合适的目标用户。同时,数据控制者会评估请求中所指定的目标交易响应时间是否合理。此外,数据信托机构已经与数据使用者和目标用户签署了合同,以确保数据交易的合法性和规范性。When the data trust receives a data transaction request from a data user to the transaction management contract (which is deployed in the blockchain), it will automatically find a suitable target user for the request based on the pre-agreed contract stored in the contract management contract. At the same time, the data controller will evaluate whether the target transaction response time specified in the request is reasonable. In addition, the data trust has signed contracts with data users and target users to ensure the legality and standardization of data transactions.

在一种可能的实现方式中,所述数据交易请求携带了使用者保证金、使用者身份、使用领域、使用目的以及数据类别等交易请求数据。In a possible implementation, the data transaction request carries transaction request data such as user deposit, user identity, field of use, purpose of use, and data category.

使用者保证金(User Deposit):这是由数据使用者DU提交的资金,用于确保交易的诚意和数据使用的合法性。保证金通常在交易完成后退还或作为交易费用分配给数据控制者DC、数据所有者DO和数据信托机构DTI。User Deposit: This is the funds submitted by the data user DU to ensure the sincerity of the transaction and the legality of the use of data. The deposit is usually returned after the transaction is completed or distributed as transaction fees to the data controller DC, the data owner DO and the data trust institution DTI.

使用者身份(User Identity):这指数据使用者DU的唯一标识符或身份信息,用于确认其合法性和授权范围。User Identity: This refers to the unique identifier or identity information of the data user DU, which is used to confirm its legitimacy and authorization scope.

使用领域(Use Domain):即数据使用者DU希望在哪个特定领域或行业中使用目标数据,如医疗领域、教育领域等。Use Domain: refers to the specific field or industry in which the data user DU wants to use the target data, such as the medical field, education field, etc.

使用目的(Use Purpose):描述了数据使用者打算如何使用目标数据的具体用途或目标,如用于科研等。Use Purpose: describes the specific purpose or goal of how the data user intends to use the target data, such as for scientific research.

数据类别(Data Category):即目标数据的类型或类别,例如个人健康数据、财务数据、市场分析数据等。Data Category: the type or category of target data, such as personal health data, financial data, market analysis data, etc.

参见图2,图2为本申请实施例提供的一种为数据交易请求匹配目标用户方法的方法流程图,相应地,所述数据信托机构基于所述合同管理合约和所述身份管理合约为所述数据交易请求匹配目标用户可以通过步骤A1-A5来实现:Referring to FIG. 2 , FIG. 2 is a method flow chart of a method for matching a target user for a data transaction request provided by an embodiment of the present application. Accordingly, the data trust institution can match the target user for the data transaction request based on the contract management contract and the identity management contract through steps A1-A5:

A1:所述数据信托机构所述身份管理合约中的DID文档验证所述使用者身份是否真实,并验证所述使用者保证金是否合理。A1: The DID document in the identity management contract of the data trust institution verifies whether the user's identity is authentic and whether the user's deposit is reasonable.

数据信托机DTI构依托获取数据使用者DU的DID标识,并在身份管理合约中查询DID标识对应的DID文档,从查询到的DID文档内读取身份标识,并找到该身份标识对应的身份验证凭证,从该身份验证凭证中获取预先存储的使用者身份。将预先存储的使用者身份与数据交易请求中携带的使用者身份进行比对,若一致,则说明数据交易请求中携带的使用者身份真实。The data trust institution DTI obtains the DID of the data user DU, queries the DID document corresponding to the DID in the identity management contract, reads the identity from the queried DID document, finds the identity authentication certificate corresponding to the identity, and obtains the pre-stored user identity from the identity authentication certificate. The pre-stored user identity is compared with the user identity carried in the data transaction request. If they are consistent, it means that the user identity carried in the data transaction request is authentic.

示例性地,假设数据交易请求中携带的使用者身份为qua1,数据使用者DU的DID标识为did1。从身份管理合约中查询到did1对应的DID文档为diddoc1,diddoc1中的身份标识也为did1,在身份管理合约中找到did1对应的身份验证凭证为VCdid1,VCdid1中的使用者身份为qua1,那么则说明预先存储的使用者身份qua1与数据交易请求中携带的使用者身份qua1一致。For example, assume that the user identity carried in the data transaction request is qua1, and the DID identifier of the data user DU is did1. The DID document corresponding to did1 is queried from the identity management contract as did doc1 , and the identity identifier in did doc1 is also did1. The identity authentication credential corresponding to did1 is found in the identity management contract as VCdid1, and the user identity in VCdid1 is qua1, which means that the pre-stored user identity qua1 is consistent with the user identity qua1 carried in the data transaction request.

此外,数据控制者DC还会利用专家知识对数据交易请求中携带的使用者保证金进行合理性验证,以确保数据使用者DU有适当的经济动机和责任感来使用数据。In addition, the data controller DC will also use expert knowledge to verify the rationality of the user deposit carried in the data transaction request to ensure that the data user DU has appropriate economic motivation and sense of responsibility to use the data.

需要说明的是,在身份管理合约中会预先构建存储有使用者身份的DID文档。It should be noted that a DID document storing the user’s identity will be pre-built in the identity management contract.

A2:当所述使用者身份是否真实且所述使用者保证金合理时,所述数据信托机构识别所述数据交易请求所需的交易数据,并查询具备所述交易数据的一个或多个数据所有者。A2: When the user identity is authentic and the user deposit is reasonable, the data trust institution identifies the transaction data required for the data transaction request and queries one or more data owners who have the transaction data.

当数据信托机构验证使用者的身份真实并且使用者缴纳的保证金合理时,该数据信托机构会确定所需的交易数据,并查询具备这些数据的一个或多个数据所有者。这种方法确保了数据的安全性和合规性,同时也提供了一种有效的机制来管理数据交易过程中的访问权限和数据流动。When the data trust institution verifies that the user's identity is authentic and the deposit paid by the user is reasonable, the data trust institution will determine the required transaction data and query one or more data owners who have this data. This approach ensures the security and compliance of data, while also providing an effective mechanism to manage access rights and data flow during data transactions.

A3:所述数据信托机构基于所述合同管理合约获取数据所有者的交易策略。A3: The data trust agency obtains the transaction strategy of the data owner based on the contract management agreement.

由于合同管理合约中的合同记载了数据所有者的交易策略,因此数据信托机构调用合同管理合约中的read,以从合同管理合约中获取数据所有者的交易策略,这些策略包括身份资格集合、数据应用领域集合、数据使用目的集合以及数据类别集合。通过这些策略,数据信托机构能够了解数据所有者对其数据的访问要求和限制,从而有效管理数据交易流程,确保数据的安全性和隐私保护。Since the contract in the contract management contract records the transaction strategy of the data owner, the data trust agency calls the read in the contract management contract to obtain the transaction strategy of the data owner from the contract management contract. These strategies include identity qualification set, data application field set, data usage purpose set, and data category set. Through these strategies, the data trust agency can understand the data owner's access requirements and restrictions on its data, so as to effectively manage the data transaction process and ensure data security and privacy protection.

身份资格集合:指确定谁有权访问数据的身份认证信息和权限。这包括验证用户的身份、权限级别和相关凭证,以确保只有合适的人员可以获取数据。Identity qualification set: refers to the identity authentication information and permissions that determine who has access to the data. This includes verifying the user's identity, permission level, and related credentials to ensure that only the right people can access the data.

数据应用领域集合:指规定数据可用于哪些特定领域或行业。通过定义数据应用领域,数据所有者可以限制数据的使用范围,确保数据在适当的领域内得到合理利用。Data application domain set: refers to the specific fields or industries in which data can be used. By defining data application domains, data owners can limit the scope of data use and ensure that data is reasonably used in appropriate fields.

数据使用目的集合:涵盖了数据被使用的具体目的或用途。数据所有者可以明确定义数据的使用目的,以便确保数据仅用于经过授权的合法目标,并防止数据被滥用或不当使用。Data usage purpose set: covers the specific purpose or use of the data. Data owners can clearly define the purpose of data use to ensure that the data is only used for authorized and legitimate purposes and to prevent the data from being abused or improperly used.

数据类别集合:指分类和归类不同类型的数据,以便更好地管理和控制数据的访问和使用。根据数据的敏感性、机密性等特征,将数据划分为不同类别,有助于实施相应的安全措施和访问权限管控。Data category set: refers to the classification and categorization of different types of data in order to better manage and control the access and use of data. Classifying data into different categories based on characteristics such as sensitivity and confidentiality of the data will help implement corresponding security measures and access rights control.

A4:所述数据信托机构将交易策略内包含所述使用者身份、所述使用领域、所述使用目的以及所述数据类别的交易策略确定为目标策略。A4: The data trust institution determines the transaction strategy that includes the user identity, the usage field, the usage purpose and the data category as the target strategy.

数据信托机构将交易策略的身份资格集合中包括数据交易请求携带的使用者身份、数据应用领域集合中包括数据交易请求携带的使用领域、数据使用目的集合中包括数据交易请求携带的使用目的以及数据类别集合中包括数据交易请求携带的数据类别的交易策略作为目标策略。The data trust agency takes the transaction strategy whose identity qualification set includes the user identity carried in the data transaction request, the data application field set includes the usage field carried in the data transaction request, the data usage purpose set includes the usage purpose carried in the data transaction request, and the data category set includes the data category carried in the data transaction request as the target strategy.

A5:将所述目标策略对应的数据所有者确定为所述目标用户。A5: Determine the data owner corresponding to the target policy as the target user.

在查找到目标策略后,则继续查询该目标策略的数据所有者,并将其确定为数据交易请求的目标用户。After the target policy is found, the data owner of the target policy is queried and identified as the target user of the data transaction request.

S102:当所述数据控制者判断所述数据交易请求中的目标交易响应时间合理时,所述数据控制者查询所述目标用户存储的目标数据,所述TEE基于所述身份管理合约获取分析条件。S102: When the data controller determines that the target transaction response time in the data transaction request is reasonable, the data controller queries the target data stored by the target user, and the TEE obtains analysis conditions based on the identity management contract.

当数据控制者DC认为来自目标用户的数据交易请求的响应时间是合理的时候,数据控制者DC会调用交易管理合约中response功能将交易的状态设置为回应,提交数据控制者抵押金和加密后的对称密钥,并等待获取数据使用者的分析条件。数据控制者会通过身份管理合约来获取分析条件,数据控制者在得到分析条件后将分析条件发送给TEE。这些分析条件也以密文的形式存在,由数据使用者定义。在执行分析之前,目标数据需要通过解密目标数据密文来获得其原始内容。其中,加密后的对称密钥kenc是由TEE使用数据使用者预先设置的分析条件公钥pkDU对分析条件加密密钥k进行加密得到的。数据使用者预先设置了分析条件私钥skDU和分析条件公钥pkDU,并存储分析条件公钥pkDU在身份管理合约中。When the data controller DC believes that the response time of the data transaction request from the target user is reasonable, the data controller DC will call the response function in the transaction management contract to set the transaction status to response, submit the data controller's deposit and the encrypted symmetric key, and wait to obtain the analysis conditions of the data user. The data controller will obtain the analysis conditions through the identity management contract. After obtaining the analysis conditions, the data controller will send the analysis conditions to TEE. These analysis conditions also exist in the form of ciphertext and are defined by the data user. Before performing the analysis, the target data needs to obtain its original content by decrypting the target data ciphertext. Among them, the encrypted symmetric key k enc is obtained by TEE using the analysis condition public key pk DU pre-set by the data user to encrypt the analysis condition encryption key k. The data user pre-sets the analysis condition private key sk DU and the analysis condition public key pk DU , and stores the analysis condition public key pk DU in the identity management contract.

具体地,当数据使用者发现交易状态变为回应时,将分析条件加密后发送到交易管理合约调用record函数存放加密后的分析条件。此时,交易管理合约,记录实际交易响应时间的开始时间节点。同样地,分析条件需要通过解密分析条件密文来获得其原始内容。这样的流程确保了数据在交易和分析过程中的安全性和保密性,同时允许数据控制者和数据使用者按照事先定义的规则和条件进行合法的数据交易和分析活动。Specifically, when the data user finds that the transaction status has changed to response, the analysis condition is encrypted and sent to the transaction management contract to call the record function to store the encrypted analysis condition. At this time, the transaction management contract records the start time node of the actual transaction response time. Similarly, the analysis condition needs to be decrypted to obtain its original content. Such a process ensures the security and confidentiality of data during the transaction and analysis process, while allowing data controllers and data users to conduct legal data transactions and analysis activities in accordance with pre-defined rules and conditions.

在一种可能的实现方式中,所述分析条件密文是所述数据使用者基于所述交易管理合约和所述身份管理合约进行加密得到的。In a possible implementation, the analysis condition ciphertext is encrypted by the data user based on the transaction management contract and the identity management contract.

具体地,首先数据使用者DU利用分析条件私钥skDU对分析条件对称密钥kenc进行解密得到分析条件加密密钥k。然后,数据使用者DU基于身份管理合约中的TEE公钥来验证TEE签名是否真实,若真实,数据使用者DU则利用分析条件加密密钥k对分析条件进行加密得到分析条件密文。数据使用者DU会调用交易管理合约的record功能,将分析条件密文记录在交易管理合约中。Specifically, first, the data user DU uses the analysis condition private key sk DU to decrypt the analysis condition symmetric key k enc to obtain the analysis condition encryption key k. Then, the data user DU verifies whether the TEE signature is authentic based on the TEE public key in the identity management contract. If it is authentic, the data user DU uses the analysis condition encryption key k to encrypt the analysis condition to obtain the analysis condition ciphertext. The data user DU will call the record function of the transaction management contract and record the analysis condition ciphertext in the transaction management contract.

需要说明的是,身份管理合约中预先存储了TEE的TEE公钥,TEE的TEE公钥用来验证TEE签名是否真实。It should be noted that the TEE public key of the TEE is pre-stored in the identity management contract, and the TEE public key of the TEE is used to verify whether the TEE signature is authentic.

在一种可能的实现方式中,所述TEE基于所述身份管理合约获取分析条件,包括:数据控制者调用交易管理合约的read功能从交易管理合约中获取加密的分析条件,并发送到TEE之中。TEE预先存储分析条件对称密钥k,然后TEE利用密钥k对分析条件密文进行解密得到分析条件。In a possible implementation, the TEE obtains the analysis condition based on the identity management contract, including: the data controller calls the read function of the transaction management contract to obtain the encrypted analysis condition from the transaction management contract and sends it to the TEE. The TEE pre-stores the analysis condition symmetric key k, and then the TEE uses the key k to decrypt the analysis condition ciphertext to obtain the analysis condition.

参见图3,图3为本申请实施例提供的一种目标数据的获取方法的方法流程图,相应地,所述数据控制者基于所述交易管理合约向所述目标用户获取所述数据交易请求所需的目标数据可以通过步骤B1-B3来实现:Referring to FIG. 3 , FIG. 3 is a flow chart of a method for obtaining target data provided in an embodiment of the present application. Accordingly, the data controller may obtain the target data required for the data transaction request from the target user based on the transaction management contract through steps B1-B3:

B1:所述数据信托机构获取所述数据控制者缴纳的控制者保证金金额。B1: The data trust institution obtains the controller deposit amount paid by the data controller.

数据信托机构获取数据控制者支付的保证金金额,保证金保存在交易管理合约之中。这种保证金通常用于确保数据控制者在数据交易中遵守相关规定和合约条款,以保证数据交易的安全、透明和合规进行。通过要求数据控制者缴纳保证金,数据信托机构可以促使其对数据使用行为负责,并在必要时用于弥补可能的违约损失。这一做法有助于建立数据交易的信任机制,维护数据参与者的利益,确保数据交易过程的稳定性和可靠性。The data trust agency obtains the deposit amount paid by the data controller, and the deposit is kept in the transaction management contract. This deposit is usually used to ensure that the data controller complies with relevant regulations and contract terms in data transactions to ensure the security, transparency and compliance of data transactions. By requiring data controllers to pay deposits, data trust agencies can encourage them to be responsible for data usage behavior and use them to compensate for possible breach of contract losses when necessary. This practice helps to establish a trust mechanism for data transactions, safeguard the interests of data participants, and ensure the stability and reliability of the data transaction process.

为实现目标数据的获取,数据信托机构首先会获取数据控制者缴纳的控制者保证金金额。In order to obtain the target data, the data trust agency will first obtain the controller deposit amount paid by the data controller.

B2:所述数据信托机构基于所述交易管理合约验证所述控制者保证金金额是否合理。B2: The data trust institution verifies whether the controller's deposit amount is reasonable based on the transaction management contract.

通过交易管理合约中设定的规则和条件,数据信托机构可以对控制者提供的保证金金额进行审查和评估,以确保其符合既定的标准和要求。这种验证过程有助于保障数据交易的公平性和合规性,防止不当行为或违约情况发生,同时也确保数据控制者能够按照规定履行义务,促进数据交易环境的稳定和可持续发展。Through the rules and conditions set in the transaction management contract, the data trust institution can review and evaluate the amount of security deposit provided by the controller to ensure that it meets the established standards and requirements. This verification process helps to ensure the fairness and compliance of data transactions, prevent misconduct or breach of contract, and ensure that the data controller can fulfill its obligations in accordance with regulations, promoting the stability and sustainable development of the data trading environment.

B3:当所述数据信托机构验证所述控制者保证金金额合理时,所述数据信托机构通知数据所有者利用数据密文将数据存储在所述数据控制者处。B3: When the data trust institution verifies that the controller's deposit amount is reasonable, the data trust institution notifies the data owner to store the data at the data controller using data ciphertext.

当数据信托机构验证了控制者缴纳的保证金金额是合理的时候,数据信托机构会通知数据所有者利用数据密文的方式将数据存储在相应的数据控制者处。这表明经过验证后,数据所有者可以使用加密的数据形式将数据传送给数据控制者进行存储。When the data trust institution verifies that the amount of security deposit paid by the controller is reasonable, the data trust institution will notify the data owner to store the data in the corresponding data controller in the form of data encryption. This means that after verification, the data owner can use encrypted data to transmit the data to the data controller for storage.

S103:所述TEE基于所述数据交易请求和所述分析条件对所述目标数据进行数据提取,得到交易数据。S103: The TEE extracts the target data based on the data transaction request and the analysis condition to obtain transaction data.

TEE会根据数据交易请求和预设的分析条件,对目标数据进行处理和筛选,最终产生符合条件的交易数据。这种方式确保了对数据的提取和加工是基于事先确定的规则和条件,保护了数据的隐私和安全性,并使得数据的使用和处理更加透明和可靠。通过TEE进行数据提取,有助于确保数据交易的合规性和保密性。TEE will process and screen the target data according to the data transaction request and the preset analysis conditions, and finally generate the transaction data that meets the conditions. This method ensures that the extraction and processing of data are based on pre-determined rules and conditions, protects the privacy and security of data, and makes the use and processing of data more transparent and reliable. Data extraction through TEE helps to ensure the compliance and confidentiality of data transactions.

参见图4,图4为本申请实施例提供的一种交易数据的提取方法的方法流程图,相应地,所述TEE基于所述数据交易请求和所述分析条件对所述脱敏数据进行提取,得到交易数据,可以通过步骤C1-C3来实现:Referring to FIG. 4 , FIG. 4 is a flow chart of a method for extracting transaction data provided in an embodiment of the present application. Accordingly, the TEE extracts the desensitized data based on the data transaction request and the analysis condition to obtain the transaction data, which can be achieved through steps C1-C3:

C1:所述TEE使用数据脱敏技术对所述目标数据进行脱敏得到脱敏数据。C1: The TEE uses data desensitization technology to desensitize the target data to obtain desensitized data.

为得到交易数据,TEE首先会利用数据脱敏技术对目标数据进行脱敏处理,以生成脱敏数据。In order to obtain transaction data, TEE will first use data desensitization technology to desensitize the target data to generate desensitized data.

在一种可能的实现方式中,在数据脱敏过程中,TEE可以应用k匿名技术中的泛化和抑制等方法,对数据进行适当的转换和修改,使得每个记录在数据集中至少有k-1个相似的其他记录,从而达到一定的匿名级别。这样做旨在防止单个数据记录被识别出来,保护数据的隐私性。In one possible implementation, during the data desensitization process, TEE can apply methods such as generalization and suppression in k-anonymity technology to appropriately transform and modify the data so that each record has at least k-1 similar other records in the data set, thereby achieving a certain level of anonymity. This is intended to prevent individual data records from being identified and protect the privacy of the data.

需要说明的是,k匿名技术是一种隐私保护技术,旨在保护数据集中个体的隐私信息。在k匿名技术中,一个数据集被称为k匿名,当其中的每个数据记录都至少有k-1个相同的其他记录与之具有相同的属性值。这意味着在经过k匿名处理后的数据集中,每个数据记录所代表的个体都存在至少k-1个相似的其他记录,使得无法通过单独的记录来区分特定的个人。It should be noted that k-anonymity technology is a privacy protection technology that aims to protect the privacy information of individuals in a data set. In k-anonymity technology, a data set is called k-anonymity when each data record in it has at least k-1 other records with the same attribute values. This means that in the data set after k-anonymity processing, each individual represented by a data record has at least k-1 other similar records, making it impossible to distinguish a specific individual through a single record.

k匿名技术通过对数据进行泛化(Generalization)和抑制(Suppression)等操作,以确保数据在发布或分享时能够提供一定程度的匿名性保护。k-anonymity technology ensures a certain degree of anonymity protection when data is published or shared by performing operations such as generalization and suppression on the data.

C2:所述TEE基于所述数据交易请求携带的数据类别对所述脱敏数据进行过滤得到过滤数据。C2: The TEE filters the desensitized data based on the data category carried in the data transaction request to obtain filtered data.

在得到脱敏数据后,TEE会根据数据交易请求中包含的数据类别信息,对已经脱敏处理后的数据进行筛选,只保留与请求相关的数据,而过滤掉不必要或无关的信息。After obtaining the desensitized data, TEE will filter the desensitized data according to the data category information contained in the data transaction request, retaining only the data related to the request and filtering out unnecessary or irrelevant information.

示例性地,假设有一个数据交易请求涉及医疗数据,并且请求特定的诊断信息。在这种情况下,可信执行环境会根据数据交易请求中提供的数据类别(医疗数据),对已经脱敏的数据集进行过滤操作。它将只选择与该请求相关的诊断信息,过滤掉其他不相关的医疗数据,从而生成符合请求要求的过滤数据。For example, suppose there is a data transaction request involving medical data and requesting specific diagnostic information. In this case, the trusted execution environment will filter the desensitized data set according to the data category (medical data) provided in the data transaction request. It will only select the diagnostic information related to the request and filter out other irrelevant medical data, thereby generating filtered data that meets the request requirements.

通过这种方式,TEE可以确保在数据交易过程中只提供必要和相关的信息,避免泄霩过多数据或隐私信息。这有助于保护数据主体的隐私,同时确保数据使用符合用户需求和规定条件。In this way, TEE can ensure that only necessary and relevant information is provided during data transactions, avoiding the disclosure of excessive data or private information. This helps protect the privacy of data subjects while ensuring that data usage meets user needs and prescribed conditions.

C3:所述TEE基于所述分析条件对所述过滤数据进行筛选得到所述交易数据。C3: The TEE filters the filtering data based on the analysis condition to obtain the transaction data.

TEE还需要根据预先确定的分析条件对已经过滤和选择的数据进行进一步的筛选操作,以生成符合条件的交易数据。TEE also needs to perform further screening operations on the filtered and selected data according to predetermined analysis conditions to generate qualified transaction data.

示例性地,假设一个金融机构正在进行数据交易,需要提供有关客户贷款信用评分的数据。在这种情况下,TEE会根据事先设定的分析条件(比如只取最低信用评分对应的数据),对已经过滤出的与贷款信用评分相关的数据进行筛选。只有最低信用评分的客户数据才会被包括在最终的交易数据中。For example, suppose a financial institution is conducting a data transaction and needs to provide data on customer loan credit scores. In this case, the TEE will filter the filtered data related to loan credit scores according to pre-set analysis conditions (such as only taking data corresponding to the lowest credit score). Only the customer data with the lowest credit score will be included in the final transaction data.

通过这种方式,TEE可以保证最终生成的交易数据符合特定的分析条件和要求,确保数据的准确性和适用性。这样的处理流程有助于提高数据交易的效率和准确性,同时确保数据交易的合规性和安全性。In this way, TEE can ensure that the transaction data generated finally meets the specific analysis conditions and requirements, ensuring the accuracy and applicability of the data. Such a processing flow helps to improve the efficiency and accuracy of data transactions while ensuring the compliance and security of data transactions.

S104:所述TEE对所述交易数据进行数据容量验证。S104: The TEE performs data capacity verification on the transaction data.

TEE还需要对生成的交易数据进行数据容量验证。这意味着TEE会检查交易数据的容量是否符合预期范围或限制。通过数据容量验证,TEE可以确保交易数据在合理的范围内,避免数据异常或超出系统处理能力,确保数据传输和处理的有效性。TEE also needs to perform data capacity verification on the generated transaction data. This means that TEE will check whether the capacity of the transaction data meets the expected range or limit. Through data capacity verification, TEE can ensure that the transaction data is within a reasonable range, avoid data anomalies or exceed the system processing capacity, and ensure the effectiveness of data transmission and processing.

此外,若数据容量验证通过TEE还需要对交易数据进行实际交易响应时间验证。这包括测量和验证整个交易过程实际使用的时间,从接收交易请求到反馈交易数据的时间。In addition, if the data capacity verification passes TEE, the actual transaction response time verification of the transaction data is also required. This includes measuring and verifying the actual time used for the entire transaction process, from receiving the transaction request to feeding back the transaction data.

在一种可能的实现方式中,所述数据容量验证,包括:In a possible implementation, the data capacity verification includes:

首先TEE计算交易数据的容量和过滤数据的容量。然后TEE获取数据所有者设置的交易数据容量约束。如果交易数据的容量小于或等于交易数据容量约束与过滤数据容量的乘积,TEE则判定数据容量验证通过。其中,交易数据容量约束大于0且小于或等于1。First, TEE calculates the capacity of transaction data and the capacity of filtered data. Then TEE obtains the transaction data capacity constraint set by the data owner. If the transaction data capacity is less than or equal to the product of the transaction data capacity constraint and the filtered data capacity, TEE determines that the data capacity verification has passed. Among them, the transaction data capacity constraint is greater than 0 and less than or equal to 1.

示例性地,假设某个数据所有者设置了一个交易数据容量约束为0.8,并且根据计算,交易数据容量为20KB,过滤数据容量为50KB。根据规则,交易数据容量约束与过滤数据容量的乘积为0.8*50KB=40KB。因为交易数据容量(20KB)小于交易数据容量约束与过滤数据容量的乘积(40KB),所以数据容量验证通过。For example, suppose a data owner sets a transaction data capacity constraint of 0.8, and according to calculation, the transaction data capacity is 20KB and the filter data capacity is 50KB. According to the rule, the product of the transaction data capacity constraint and the filter data capacity is 0.8*50KB=40KB. Because the transaction data capacity (20KB) is less than the product of the transaction data capacity constraint and the filter data capacity (40KB), the data capacity verification passes.

在一种可能的实现方式中,所述实际交易响应时间验证,包括:In a possible implementation, the actual transaction response time verification includes:

首先,从TEE获取到所述分析条件开始,然后一直到TEE基于交易管理合约将交易数据反馈给数据使用者为止所用的时间被记录下来,作为实际交易响应时间。接着,如果记录下来的实际交易响应时间小于或等于目标交易响应时间,则TEE会判定实际交易响应时间验证通过。First, the time from when TEE obtains the analysis conditions until TEE feeds back the transaction data to the data user based on the transaction management contract is recorded as the actual transaction response time. Then, if the recorded actual transaction response time is less than or equal to the target transaction response time, TEE will determine that the actual transaction response time verification has passed.

具体地,当数据使用者发现交易状态变为回应时,将分析条件加密后发送到交易管理合约调用record函数存放加密后的分析条件。此时,交易管理合约,记录实际交易响应时间的开始时间节点,当交易管理合约收到数据控制者调用submit函数的交易时,记录实际交易响应时间的结束时间节点。此时交易管理合约通过启动时间节点和结束时间节点判断是否满足目标交易响应时间。通过计算结束时间节点和启动时间节点的差获得实际交易响应时间。若实际交易响应时间小于或等于目标交易响应时间,则可认定为实际交易响应时间通过验证。Specifically, when the data user finds that the transaction status has changed to response, the analysis conditions are encrypted and sent to the transaction management contract to call the record function to store the encrypted analysis conditions. At this time, the transaction management contract records the start time node of the actual transaction response time. When the transaction management contract receives the transaction in which the data controller calls the submit function, it records the end time node of the actual transaction response time. At this time, the transaction management contract determines whether the target transaction response time is met through the start time node and the end time node. The actual transaction response time is obtained by calculating the difference between the end time node and the start time node. If the actual transaction response time is less than or equal to the target transaction response time, it can be determined that the actual transaction response time has passed the verification.

示例性地,假设在数据使用者发送请求时所设置的目标交易响应时间为10小时。在数据使用者调用record函数时记录的启动时间节点为2024年6月10日10时0分0秒。在数据控制者调用submit函数时记录的结束时间节点为2024年6月10月12时0分0秒。后两者的时间间隔为实际交易响应时间2小时,且小于目标交易响应时间(10小时),所以满足了数据使用者的要求,可认定为实际交易响应时间通过验证。For example, assume that the target transaction response time set when the data user sends a request is 10 hours. The start time node recorded when the data user calls the record function is 10:0:00 on June 10, 2024. The end time node recorded when the data controller calls the submit function is 12:0:00 on June 10, 2024. The time interval between the latter two is 2 hours of the actual transaction response time, which is less than the target transaction response time (10 hours), so the requirements of the data user are met, and it can be determined that the actual transaction response time has passed the verification.

S105:若所述数据容量验证通过,所述TEE则基于所述交易管理合约将交易数据反馈给所述数据使用者。S105: If the data capacity verification is passed, the TEE feeds back the transaction data to the data user based on the transaction management contract.

经过数据容量验证后,系统确定生成的交易数据符合预期的大小标准,没有超出限制或异常。数据控制者将调用交易管理合约中的submit功能,以使TEE向数据使用者反馈交易数据。这意味着数据控制者认为生成的交易数据已经符合要求,并可以提供给数据使用者进行进一步处理或分析。After data capacity verification, the system determines that the generated transaction data meets the expected size standard and does not exceed the limit or exception. The data controller will call the submit function in the transaction management contract to enable the TEE to feedback the transaction data to the data user. This means that the data controller believes that the generated transaction data has met the requirements and can be provided to the data user for further processing or analysis.

参见图5,图5为本申请实施例提供的一种保证金退回和分配方法的方法流程图,具体可以通过以下步骤来实现:See FIG. 5 , which is a flow chart of a method for returning and allocating a deposit provided in an embodiment of the present application, which can be implemented by the following steps:

D1:获取所述数据所有者定义的利益分配系数。D1: Obtain the profit distribution coefficient defined by the data owner.

在数据交易过程中会从数据所有者处获取定义的利益分配系数,以确定各方在数据交易中的收益分配比例。该利益分配系数由三个部分组成,即数据信托机构分配比例、数据控制者分配比例和数据所有者分配比例。这些比例确定了不同参与者在数据交易中的权益份额。数据信托机构、数据控制者和数据所有者的分配比例之和应等于1。这确保了整个收益分配总额符合比例分配规定,每个参与方都有明确的分配份额。During the data transaction process, a defined benefit distribution coefficient is obtained from the data owner to determine the benefit distribution ratio of each party in the data transaction. The benefit distribution coefficient consists of three parts, namely the data trust agency distribution ratio, the data controller distribution ratio and the data owner distribution ratio. These ratios determine the equity shares of different participants in the data transaction. The sum of the distribution ratios of the data trust agency, the data controller and the data owner should be equal to 1. This ensures that the total benefit distribution complies with the proportional distribution regulations and each participant has a clear distribution share.

D21:若所述数据容量验证和所述实际交易响应时间验证均通过,则将所述数据使用者缴纳的使用者保证金按照所述利益分配系数分配给所述数据信托机构、所述数据控制者和所述数据所有者,并将所述数据控制者缴纳的控制者保证金退回给所述数据控制者。D21: If both the data capacity verification and the actual transaction response time verification are passed, the user deposit paid by the data user shall be distributed to the data trust institution, the data controller and the data owner according to the profit distribution coefficient, and the controller deposit paid by the data controller shall be returned to the data controller.

如果经过验证即数据容量满足要求且交易响应时间达到设定标准,则将数据使用者缴纳的保证金将按照预先定义的利益分配系数分配给数据信托机构、数据控制者和数据所有者。这意味着根据各方在交易中的权益比例分配保证金。If it is verified that the data capacity meets the requirements and the transaction response time meets the set standards, the deposit paid by the data user will be distributed to the data trust institution, data controller and data owner according to the pre-defined profit distribution coefficient. This means that the deposit is distributed according to the equity ratio of each party in the transaction.

数据控制者缴纳的保证金将完全退还给数据控制者本人。这是因为交易验证通过,表明数据控制者遵守了规定,并且没有导致任何违规行为或不符合规范的情况。The deposit paid by the data controller will be fully refunded to the data controller himself. This is because the transaction verification has passed, indicating that the data controller has complied with the regulations and has not caused any violations or non-compliance with regulations.

通过这一流程,确保了在数据交易中各方之间的权益得到公平分配和保障。数据使用者的保证金按照权益分配系数分配给各方,同时数据控制者获得其缴纳的保证金退回,这有助于维护良好的合作关系和促进数据交易的顺利进行。Through this process, the rights and interests of all parties in data transactions are fairly distributed and protected. The data user's deposit is distributed to all parties according to the equity distribution coefficient, and the data controller receives the return of the deposit paid, which helps maintain a good cooperative relationship and promote the smooth progress of data transactions.

D22:若所述数据容量验证通过但所述实际交易响应时间验证未通过,则将所述数据控制者缴纳的控制者保证金按照所述利益分配系数分配给所述数据信托机构、所述数据使用者和所述数据所有者,并将所述数据使用者缴纳的使用者保证金退回给所述数据控制者。D22: If the data capacity verification passes but the actual transaction response time verification fails, the controller deposit paid by the data controller shall be distributed to the data trust institution, the data user and the data owner according to the profit distribution coefficient, and the user deposit paid by the data user shall be returned to the data controller.

如果在数据交易过程中,数据容量验证通过了,但是实际交易响应时间验证未通过,未满足设定标准,那么数据控制者缴纳的保证金将按照预定义的利益分配系数分配给数据信托机构、数据使用者和数据所有者。这意味着根据各方在交易中的权益比例分配保证金。并且数据使用者将按照数据控制者的分配比例获得部分控制者保证金,作为补偿或根据既定协议。同时,数据使用者缴纳的保证金将完全退还给数据使用者。这是因为出现了约定时间验证不通过的情况,导致数据使用者经济受损。If during the data transaction, the data capacity verification is passed, but the actual transaction response time verification is not passed and does not meet the set standards, then the security deposit paid by the data controller will be distributed to the data trust institution, data user and data owner according to the predefined profit distribution coefficient. This means that the security deposit is distributed according to the equity ratio of each party in the transaction. And the data user will receive part of the controller's security deposit as compensation or according to the established agreement according to the distribution ratio of the data controller. At the same time, the security deposit paid by the data user will be fully returned to the data user. This is because the agreed time verification failed, resulting in economic losses to the data user.

D23:若所述数据容量验证未通过,则将所述数据控制者缴纳的控制者保证金退回给所述数据控制者,并更换新的数据控制者进行数据的交易。D23: If the data capacity verification fails, the controller deposit paid by the data controller will be returned to the data controller, and a new data controller will be replaced to conduct data transactions.

如果数据容量验证未通过,即数据控制者未按要求提供正确的数据容量信息,系统将退还给数据控制者缴纳的保证金,并选择替换新的数据控制者来进行数据交易。这旨在确保数据控制者遵守规定并提供准确的数据信息,否则将有新的数据控制者来接管交易。If the data capacity verification fails, that is, the data controller fails to provide the correct data capacity information as required, the system will return the deposit paid by the data controller and choose to replace a new data controller to conduct data transactions. This is to ensure that the data controller complies with regulations and provides accurate data information, otherwise a new data controller will take over the transaction.

通过上述流程,确保了在数据交易中的公平性和透明度。如果出现验证不通过的情况,相应的保证金将按照利益分配系数重新分配给相关参与方,以维护各方的权益并促进数据交易的合法进行。The above process ensures fairness and transparency in data transactions. If the verification fails, the corresponding deposit will be redistributed to the relevant participants according to the profit distribution coefficient to safeguard the rights and interests of all parties and promote the legality of data transactions.

在一种可能的实现方式中,所述方法还包括:In a possible implementation, the method further includes:

在数据交易请求未匹配到目标用户时,将数据交易请求的请求状态设置为等待,以标识该数据交易请求仍然有效,但目前没有匹配到合适的目标用户。When the data transaction request does not match a target user, the request status of the data transaction request is set to waiting to indicate that the data transaction request is still valid but currently has not matched a suitable target user.

在一种可能的实现方式中,所述方法还包括:In a possible implementation, the method further includes:

当数据控制者判断数据交易请求中的目标交易响应时间合理时,调用交易管理合约的response功能将数据交易请求的请求状态设置为回应,以标识可以为该数据交易请求反馈交易数据。When the data controller determines that the target transaction response time in the data transaction request is reasonable, the response function of the transaction management contract is called to set the request status of the data transaction request to response, so as to indicate that transaction data can be fed back for the data transaction request.

在一种可能的实现方式中,所述方法还包括:In a possible implementation, the method further includes:

当数据交易请求的请求状态为回应时,数据容量验证不通过,调用交易管理合约的deny功能将数据交易请求的请求状态设置为等待,以标识该数据交易请求恢复为等待,需重新匹配合适的目标用户。When the request status of the data transaction request is response, the data capacity verification fails, and the deny function of the transaction management contract is called to set the request status of the data transaction request to waiting, so as to indicate that the data transaction request has been restored to waiting and needs to be re-matched with a suitable target user.

在一种可能的实现方式中,所述方法还包括:In a possible implementation, the method further includes:

在数据交易请求未匹配到目标用户且需要中止该数据交易请求时,调用交易管理合约的abort功能将数据交易请求的请求状态设置为中止,以标识该数据交易请求无效,无需匹配合适的目标用户。When the data transaction request does not match the target user and needs to be aborted, the abort function of the transaction management contract is called to set the request status of the data transaction request to abort, so as to indicate that the data transaction request is invalid and does not need to match the appropriate target user.

基于S101-S105的内容可知,本申请的数据的交易方法依赖数据交易系统来实现,该数据交易系统由数据信托机构和数据控制者(包括TEE)组成。所述数据信托机构已与数据控制者构建合同管理合约、身份管理合约以及交易管理合约。在数据信托机构收到数据使用者的交易请求后,会自动匹配合适的目标用户,并由数据控制者评估交易响应时间的合理性。如果响应时间合理,数据控制者将获取目标数据,并使TEE基于交易请求和分析条件进行数据提取。TEE对提取的数据进行容量验证,通过验证后将交易数据通过交易管理合约进行交易实际时间验证并反馈给数据使用者。这一过程中,TEE提供了加密和隔离保护,确保了数据所有者定义的目标数据密文和数据使用者定义的分析条件密文的安全性。智能合约确保了交易请求的透明性,实现了自动化的交易流程管理,从而减少了潜在的人为错误和不当干预。此外,区块链技术提供了交易的公开和透明性,使得所有参与方都能查看交易的发生和执行过程,增强了交易的信任度和可追溯性,降低了信息不对称的风险。Based on the contents of S101-S105, it can be known that the data transaction method of the present application relies on a data transaction system to be implemented, and the data transaction system is composed of a data trust agency and a data controller (including TEE). The data trust agency has established a contract management contract, an identity management contract and a transaction management contract with the data controller. After the data trust agency receives the transaction request from the data user, it will automatically match the appropriate target user, and the data controller will evaluate the rationality of the transaction response time. If the response time is reasonable, the data controller will obtain the target data and enable the TEE to extract the data based on the transaction request and analysis conditions. The TEE verifies the capacity of the extracted data, and after verification, the transaction data is verified through the transaction management contract for the actual transaction time and fed back to the data user. In this process, TEE provides encryption and isolation protection to ensure the security of the target data ciphertext defined by the data owner and the analysis condition ciphertext defined by the data user. Smart contracts ensure the transparency of transaction requests and realize automated transaction process management, thereby reducing potential human errors and improper intervention. In addition, blockchain technology provides openness and transparency of transactions, allowing all participants to view the occurrence and execution process of transactions, enhancing the trust and traceability of transactions and reducing the risk of information asymmetry.

以上对本申请所提供的一种数据的交易方法进行了详细介绍。说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以对本申请进行若干改进和修饰,这些改进和修饰也落入本申请权利要求的保护范围内。The above is a detailed introduction to a data transaction method provided by the present application. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can refer to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can refer to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.

应当理解,在本申请中,“至少一个(项)”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,用于描述关联对象的关联关系,表示可以存在三种关系,例如,“A和/或B”可以表示:只存在A,只存在B以及同时存在A和B三种情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b或c中的至少一项(个),可以表示:a,b,c,“a和b”,“a和c”,“b和c”,或“a和b和c”,其中a,b,c可以是单个,也可以是多个。It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And/or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and/or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character "/" generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

Claims (12)

1.一种数据的交易方法,其特征在于,应用于数据交易系统,所述数据交易系统包括数据信托机构和数据控制者,所述数据控制者包括可信执行环境TEE,所述数据信托机构已与所述数据控制者构建智能合约;所述智能合约包括合同管理合约、身份管理合约以及交易管理合约,所述智能合约中包含各个合约均部署在区块链之中,所述方法包括:1. A data transaction method, characterized in that it is applied to a data transaction system, wherein the data transaction system includes a data trust institution and a data controller, wherein the data controller includes a trusted execution environment TEE, and the data trust institution has built a smart contract with the data controller; the smart contract includes a contract management contract, an identity management contract, and a transaction management contract, and each contract contained in the smart contract is deployed in a blockchain, and the method includes: 当所述数据信托机构接收到数据使用者发送到所述交易管理合约的数据交易请求时,所述数据信托机构基于所述合同管理合约和所述身份管理合约为所述数据交易请求匹配目标用户,所述数据控制者判断所述数据交易请求中的目标交易响应时间是否合理;When the data trust institution receives a data transaction request sent by a data user to the transaction management contract, the data trust institution matches a target user for the data transaction request based on the contract management contract and the identity management contract, and the data controller determines whether the target transaction response time in the data transaction request is reasonable; 当所述数据控制者判断所述数据交易请求中的目标交易响应时间合理时,所述数据控制者查询所述目标用户存储的目标数据,所述TEE基于所述身份管理合约获取分析条件;所述目标数据是通过目标数据密文进行解密得到的;所述目标数据密文是数据所有者定义的;所述目标数据被所述目标用户利用所述目标数据密文存储在数据控制者处;所述分析条件是通过分析条件密文进行解密得到的;所述分析条件密文是所述数据使用者定义的;When the data controller determines that the target transaction response time in the data transaction request is reasonable, the data controller queries the target data stored by the target user, and the TEE obtains the analysis condition based on the identity management contract; the target data is obtained by decrypting the target data ciphertext; the target data ciphertext is defined by the data owner; the target data is stored at the data controller by the target user using the target data ciphertext; the analysis condition is obtained by decrypting the analysis condition ciphertext; the analysis condition ciphertext is defined by the data user; 所述TEE基于所述数据交易请求和所述分析条件对所述目标数据进行数据提取,得到交易数据;The TEE extracts the target data based on the data transaction request and the analysis condition to obtain transaction data; 所述TEE对所述交易数据进行数据容量验证;The TEE performs data capacity verification on the transaction data; 若所述数据容量验证通过,所述TEE则基于所述交易管理合约将交易数据反馈给所述数据使用者。If the data capacity verification is passed, the TEE will feed back the transaction data to the data user based on the transaction management contract. 2.根据权利要求1所述的方法,其特征在于,所述数据交易请求携带使用者保证金、使用者身份、使用领域、使用目的以及数据类别;2. The method according to claim 1, characterized in that the data transaction request carries the user's deposit, user identity, field of use, purpose of use and data category; 所述数据信托机构基于所述合同管理合约和所述身份管理合约为所述数据交易请求匹配目标用户,包括:The data trust institution matches a target user for the data transaction request based on the contract management contract and the identity management contract, including: 所述数据信托机构所述身份管理合约中的去中心化数字身份DID文档验证所述使用者身份是否真实,并验证所述使用者保证金是否合理;所述DID文档对应的身份验证凭证中预先存储了所述使用者身份;The decentralized digital identity DID document in the identity management contract of the data trust institution verifies whether the user's identity is authentic and whether the user's deposit is reasonable; the identity of the user is pre-stored in the identity verification certificate corresponding to the DID document; 当所述使用者身份是否真实且所述使用者保证金合理时,所述数据信托机构识别所述数据交易请求所需的交易数据,并查询具备所述交易数据的一个或多个数据所有者;When the user's identity is authentic and the user's deposit is reasonable, the data trust institution identifies the transaction data required by the data transaction request and queries one or more data owners who have the transaction data; 所述数据信托机构基于所述合同管理合约获取数据所有者的交易策略;所述交易策略包括身份资格集合、数据应用领域集合、数据使用目的集合以及数据类别集合;The data trust institution obtains the transaction strategy of the data owner based on the contract management agreement; the transaction strategy includes an identity qualification set, a data application field set, a data usage purpose set, and a data category set; 所述数据信托机构将交易策略内包含所述使用者身份、所述使用领域、所述使用目的以及所述数据类别的交易策略确定为目标策略;The data trust institution determines the transaction strategy including the user identity, the usage field, the usage purpose and the data category in the transaction strategy as the target strategy; 将所述目标策略对应的数据所有者确定为所述目标用户。The data owner corresponding to the target policy is determined as the target user. 3.根据权利要求2所述的方法,其特征在于,3. The method according to claim 2, characterized in that 所述交易策略内包含所述使用者身份包括所述身份资格集合内包含所述使用者身份;The transaction strategy includes the user identity, including the identity qualification set including the user identity; 所述交易策略内包含所述使用领域包括所述数据应用领域集合内包含所述使用领域;The usage domain included in the transaction strategy includes the usage domain included in the data application domain set; 所述交易策略内包含所述使用目的包括所述数据使用目的集合内包含所述使用目的;The transaction strategy includes the usage purpose, including the data usage purpose set including the usage purpose; 所述交易策略内包含所述数据类别包括所述数据类别集合内包含所述数据类别。The data category is included in the transaction strategy including the data category is included in the data category set. 4.根据权利要求1所述的方法,其特征在于,所述方法还包括:4. The method according to claim 1, characterized in that the method further comprises: 所述数据信托机构获取所述数据控制者缴纳的控制者保证金金额;The data trust institution obtains the controller deposit amount paid by the data controller; 所述数据信托机构基于所述交易管理合约验证所述控制者保证金金额是否合理;The data trust institution verifies whether the controller's deposit amount is reasonable based on the transaction management contract; 当所述数据信托机构验证所述控制者保证金金额合理时,所述数据信托机构通知数据所有者利用数据密文将数据存储在所述数据控制者处。When the data trust institution verifies that the controller's deposit amount is reasonable, the data trust institution notifies the data owner to store the data at the data controller using data ciphertext. 5.根据权利要求1所述的方法,其特征在于,所述TEE基于所述数据交易请求和所述分析条件对所述脱敏数据进行提取,得到交易数据,包括:5. The method according to claim 1 is characterized in that the TEE extracts the desensitized data based on the data transaction request and the analysis condition to obtain transaction data, including: 所述TEE使用数据脱敏技术对所述目标数据进行脱敏得到脱敏数据;The TEE uses data desensitization technology to desensitize the target data to obtain desensitized data; 所述TEE基于所述数据交易请求携带的数据类别对所述脱敏数据进行过滤得到过滤数据;The TEE filters the desensitized data based on the data category carried in the data transaction request to obtain filtered data; 所述TEE基于所述分析条件对所述过滤数据进行筛选得到所述交易数据。The TEE filters the filter data based on the analysis condition to obtain the transaction data. 6.根据权利要求5所述的方法,其特征在于,所述数据容量验证,包括:6. The method according to claim 5, characterized in that the data capacity verification comprises: 所述TEE计算所述交易数据的容量和所述过滤数据的容量;The TEE calculates the capacity of the transaction data and the capacity of the filtered data; 所述TEE获取所述数据所有者设置的交易数据约束;所述交易数据约束大于0且小于或等于1;The TEE obtains the transaction data constraint set by the data owner; the transaction data constraint is greater than 0 and less than or equal to 1; 若所述交易数据的容量小于或等于所述交易数据约束与所述过滤数据的容量的乘积,所述TEE则判定所述数据容量验证通过。If the capacity of the transaction data is less than or equal to the product of the transaction data constraint and the capacity of the filter data, the TEE determines that the data capacity verification is successful. 7.根据权利要求1所述的方法,其特征在于,所述方法还包括:进行实际交易响应时间验证:7. The method according to claim 1, characterized in that the method further comprises: performing actual transaction response time verification: 获取从所述TEE获取到所述分析条件开始,到所述TEE基于所述交易管理合约将交易数据反馈给所述数据使用者为止所有的时间,作为实际交易响应时间;Obtain all the time from when the TEE obtains the analysis condition to when the TEE feeds back the transaction data to the data user based on the transaction management contract as the actual transaction response time; 若所述实际交易响应时间小于或等于所述目标交易响应时间,所述TEE则判定实际交易响应时间验证通过;If the actual transaction response time is less than or equal to the target transaction response time, the TEE determines that the actual transaction response time verification is successful; 其中,所述实际交易响应时间验证是在所述数据容量验证通过后进行的。The actual transaction response time verification is performed after the data capacity verification is passed. 8.根据权利要求7所述的方法,其特征在于,所述方法还包括:8. The method according to claim 7, characterized in that the method further comprises: 获取所述数据所有者定义的利益分配系数;所述利益分配系数包括数据信托机构分配比例、数据控制者分配比例以及数据所有者分配比例;所述数据信托机构分配比例与所述数据控制者分配比例和所述数据所有者分配比例的和为1;Obtaining the profit distribution coefficient defined by the data owner; the profit distribution coefficient includes the distribution ratio of the data trust institution, the distribution ratio of the data controller and the distribution ratio of the data owner; the sum of the distribution ratio of the data trust institution, the distribution ratio of the data controller and the distribution ratio of the data owner is 1; 若所述数据容量验证和所述实际交易响应时间验证均通过,则将所述数据使用者缴纳的使用者保证金按照所述利益分配系数分配给所述数据信托机构、所述数据控制者和所述数据所有者,并将所述数据控制者缴纳的控制者保证金退回给所述数据控制者;If both the data capacity verification and the actual transaction response time verification are passed, the user deposit paid by the data user is distributed to the data trust institution, the data controller and the data owner according to the profit distribution coefficient, and the controller deposit paid by the data controller is returned to the data controller; 若所述数据容量验证通过但所述实际交易响应时间验证未通过,则将所述数据控制者缴纳的控制者保证金按照所述利益分配系数分配给所述数据信托机构、所述数据使用者和所述数据所有者,并将所述数据使用者缴纳的使用者保证金退回给所述数据控制者,其中,所述数据使用者得到的控制者保证金是按照所述数据控制者分配比例分配得到的;If the data capacity verification passes but the actual transaction response time verification fails, the controller deposit paid by the data controller shall be distributed to the data trust institution, the data user and the data owner according to the profit distribution coefficient, and the user deposit paid by the data user shall be returned to the data controller, wherein the controller deposit obtained by the data user is distributed according to the distribution ratio of the data controller; 若所述数据容量验证未通过,则将所述数据控制者缴纳的控制者保证金退回给所述数据控制者,并更换新的数据控制者进行数据的交易。If the data capacity verification fails, the controller deposit paid by the data controller will be returned to the data controller, and a new data controller will be replaced to conduct data transactions. 9.根据权利要求1所述的方法,其特征在于,所述分析条件密文是所述数据使用者基于所述交易管理合约和所述身份管理合约进行加密得到的;9. The method according to claim 1, characterized in that the analysis condition ciphertext is obtained by the data user through encryption based on the transaction management contract and the identity management contract; 其中,当所述数据使用者基于所述身份管理合约验证使用者签名是真实时,所述数据使用者则利用所述交易管理合约中预先存储的分析条件私钥skDU对分析条件对称密钥kenc进行解密得到分析条件加密密钥k,所述数据使用者利用所述分析条件加密密钥k对所述分析条件进行加密得到所述分析条件密文;所述身份管理合约中预先存储了所述数据使用者的使用者签名;所述数据使用者的使用者签名用于验证使用者签名是否真实。Among them, when the data user verifies that the user signature is authentic based on the identity management contract, the data user uses the analysis condition private key sk DU pre-stored in the transaction management contract to decrypt the analysis condition symmetric key k enc to obtain the analysis condition encryption key k, and the data user uses the analysis condition encryption key k to encrypt the analysis condition to obtain the analysis condition ciphertext; the user signature of the data user is pre-stored in the identity management contract; the user signature of the data user is used to verify whether the user signature is authentic. 10.根据权利要求1所述的方法,其特征在于,所述方法还包括:10. The method according to claim 1, characterized in that the method further comprises: 在所述数据交易请求未匹配到所述目标用户时,将所述数据交易请求的请求状态设置为等待。When the data transaction request is not matched to the target user, the request state of the data transaction request is set to waiting. 11.根据权利要求1或10所述的方法,其特征在于,所述方法还包括:11. The method according to claim 1 or 10, characterized in that the method further comprises: 当所述数据控制者判断所述数据交易请求中的目标交易响应时间合理时,将所述数据交易请求的请求状态设置为回应。When the data controller determines that the target transaction response time in the data transaction request is reasonable, the request status of the data transaction request is set to response. 12.根据权利要求1或8所述的方法,其特征在于,所述方法还包括:12. The method according to claim 1 or 8, characterized in that the method further comprises: 当所述数据容量验证未通过时,将所述数据交易请求的请求状态由回应改为等待。When the data capacity verification fails, the request status of the data transaction request is changed from response to waiting.
CN202410856886.3A 2024-06-28 2024-06-28 A data trading method Pending CN118608156A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410856886.3A CN118608156A (en) 2024-06-28 2024-06-28 A data trading method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410856886.3A CN118608156A (en) 2024-06-28 2024-06-28 A data trading method

Publications (1)

Publication Number Publication Date
CN118608156A true CN118608156A (en) 2024-09-06

Family

ID=92559610

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410856886.3A Pending CN118608156A (en) 2024-06-28 2024-06-28 A data trading method

Country Status (1)

Country Link
CN (1) CN118608156A (en)

Similar Documents

Publication Publication Date Title
US11847197B2 (en) System and method for identity management
US11038868B2 (en) System and method for identity management
US11481768B2 (en) System and method of generating and validating encapsulated cryptographic tokens based on multiple digital signatures
JP3228339U (en) Personal authentication and verification system and method
US7587366B2 (en) Secure information vault, exchange and processing system and method
US9876803B2 (en) System and method for identity management
US10410213B2 (en) Encapsulated security tokens for electronic transactions
US20140223578A1 (en) Secure data delivery system
US11334884B2 (en) Encapsulated security tokens for electronic transactions
CN119557854A (en) Digital rights encryption management method and system based on blockchain
CN109697368A (en) Method, equipment and system that user information data safety uses, storage medium
CN118608156A (en) A data trading method
CN116308903A (en) Digital asset right-determining protection method based on block chain
CN111898886A (en) Collective asset clearing and checking system
Bakshi Improving privacy in e-governance in a country Like India using attribute-based cryptographic Schemes
Cheng Blockchain-Based Identification and Access Control Framework-A Case Study of Open Banking Ecosystem
Amin et al. A blockchain and capability based access control for internet of things using self-sovereign identity
Onamade et al. Privacy considerations in blockchain technology

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