A data transaction system
By using a decentralized data trading system that leverages encryption and blockchain to manage the data trading process, the problem of data and payment information leakage is solved, ensuring the security of data transactions and the transparency of payments, and guaranteeing the control of data owners and the credibility of the transaction process.
Patent Information
- Application Number
- CN202511540034.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-27
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2045-10-27
AI Technical Summary
In existing data trading methods, the data to be traded and payment information are easily leaked, and payments are difficult to verify, making it impossible for data owners to effectively control the transparency and credibility of data use and the trading process.
A decentralized data trading system is adopted, in which the data providing device encrypts the data to be traded and stores it in the InterPlanetary File System. The transaction process is managed by blockchain devices and smart contracts. The data purchasing device initiates payment requests and generates payment vouchers through smart contracts, and the data providing device generates temporary keys and access vouchers, ensuring the security and transparency of payment information and data access.
By using decentralized storage and blockchain management, the risk of data and payment information leakage is reduced, the traceability of the transaction process and the transparency of payments are ensured, the problem of payment verification is avoided, and the control of data owners and the credibility of the transaction process are realized.
Smart Images

Figure CN121010379B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of blockchain technology, and in particular to a data transaction system. Background Technology
[0002] In the context of the digital economy and big data, data trading, as a cornerstone of innovation-driven development, injects strong momentum into economic growth and social progress by releasing data value, promoting industrial upgrading, stimulating innovation, and enhancing social governance capabilities. It is widely applied across various industries, particularly in finance, healthcare, transportation, energy, and intelligent manufacturing. With technological advancements and improved regulations, data trading will play an even more crucial role in promoting the high-quality development of the digital economy. Currently, core issues in data trading, such as privacy protection, access control, and identity authentication, still require significant breakthroughs and solutions.
[0003] Existing data transaction methods mainly rely on centralized intermediaries to manage the data transaction process by establishing a trusted centralized platform. They typically employ pre-defined auditing mechanisms, contracts, and payment systems to ensure the identity verification of all parties involved and the legality of the data.
[0004] However, in data trading methods that rely on centralized intermediaries, the data to be traded and payment information are easily obtained and leaked by the platform. Data may be resold without the provider's authorization, and there may be data abuse or malicious access. Data owners cannot effectively control their data, and it is difficult to verify whether the data has been legally traded and used.
[0005] Furthermore, in the existing data transaction process, on-chain payment methods that rely on tokens and fund staking are often difficult to be widely accepted by the public in practice and cannot support large-scale transaction applications. On the other hand, off-chain payment methods are consistent with the actual situation, but they usually cannot directly interact and verify with blockchain smart contracts, resulting in vulnerabilities between payment confirmation and data unlocking. For example, there may be collusion between data exchanges and consumers, and the transparency and accuracy of payment verification are still difficult to guarantee. Summary of the Invention
[0006] This invention provides a data transaction system to solve the problems of easy leakage of transaction data and payment information and difficulty in verifying payments in existing data transaction methods.
[0007] To address the aforementioned technical problems, the embodiments of the present invention provide the following technical solutions:
[0008] In a first aspect, embodiments of the present invention provide a data transaction system, comprising:
[0009] Data providing devices, data purchasing devices, trading devices, blockchain devices, and the InterPlanetary File System;
[0010] The data providing device encrypts the data to be traded to obtain encrypted data, sends the encrypted data to the InterPlanetary File System, and publishes a smart contract to the blockchain device, the smart contract including the price and subscription period of the data to be traded.
[0011] The data purchasing device sends a payment request to the trading device through the smart contract and the data purchasing device pays the transaction amount to the trading device. The payment request includes the decentralized identifier of the data purchasing device.
[0012] The transaction device generates a payment voucher based on the payment request and the payment transaction amount, and sends the payment voucher to the data purchase device.
[0013] The data purchasing device generates a payment statement based on the payment voucher and sends a data access request to the data providing device. The data access request includes the payment statement and the encrypted public key of the data purchasing device.
[0014] The data providing device generates a temporary key according to the data access request, sends the temporary key to the smart contract on the blockchain device, generates a data access certificate according to the payment statement, and sends the data access certificate to the transaction device through the smart contract;
[0015] The transaction device pays the transaction amount to the data providing device and generates a data access statement based on the data access certificate, and sends the data access statement to the data purchasing device.
[0016] The data purchasing device obtains an access token through the smart contract based on the data access statement, obtains the encrypted data sent by the InterPlanetary File System based on the access token, decrypts the encrypted data using the temporary key to obtain the data to be traded, and uses the data to be traded within the subscription period. The access token includes the temporary key and the subscription period.
[0017] Optionally, the data providing device encrypts the data to be traded to obtain encrypted data, including:
[0018] The data providing device generates an attribute-based encryption key according to the data access policy of the data to be traded, wherein the data access policy includes a centralized set of identifiers of potential data purchasing devices reviewed by the trading device and the subscription status period attribute corresponding to the potential data purchasing devices;
[0019] The data providing device uses the attribute-based encryption key to encrypt the data to be traded to obtain the encrypted data.
[0020] Optionally, the smart contract further includes a first hash value of the data to be traded and a hash index corresponding to the encrypted data; wherein, the first hash value of the data to be traded is generated by the data providing device based on the data to be traded;
[0021] Before the data providing device publishes a smart contract to the blockchain device, the data providing device obtains the hash index sent by the InterPlanetary File System (IPS), wherein the hash index is used to indicate the storage location of the encrypted data in the IPS.
[0022] Optionally, the data purchasing device pays the transaction amount to the transaction device, including:
[0023] The data purchasing device pays the transaction amount to the trading device via off-chain transfer.
[0024] Optionally, after the data purchasing device pays the transaction amount to the transaction device, the data purchasing device generates a transaction record of the transaction amount paid by the transaction device.
[0025] The data purchasing device stores the transaction records through the smart contract.
[0026] Optionally, after the data purchasing device sends a payment request to the trading device through the smart contract, the trading device generates a payment order based on the payment request, and the payment order includes the price and payment period of the data to be traded;
[0027] The transaction device receives the transaction payment from the data purchase device and obtains the payment time of the transaction payment from the data purchase device;
[0028] The transaction device determines the validity of the data purchase device paying the transaction amount to the transaction device based on the payment time and the payment period.
[0029] Optionally, the transaction device generates a payment voucher based on the payment request and the payment transaction amount, including:
[0030] The transaction device authenticates the data purchase device based on the decentralized identifier of the data purchase device;
[0031] After the transaction device verifies the identity of the data purchasing device, it generates a payment voucher based on the transaction amount.
[0032] Optionally, the data providing device generates a temporary key based on the data access request, including:
[0033] The data providing device generates an attribute base key that is only available to the data purchasing device based on the data access request;
[0034] The data providing device uses the encryption public key of the data purchasing device to encrypt the attribute base key to obtain the temporary key.
[0035] Optionally, the data purchasing device uses the temporary key to decrypt the encrypted data to obtain the data to be traded, including:
[0036] The data purchase device decrypts the temporary key to obtain the attribute base key;
[0037] The data purchasing device uses the attribute base key to decrypt the encrypted data to obtain the data to be traded.
[0038] Optionally, after the data purchasing device decrypts the encrypted data using the temporary key to obtain the data to be traded, the data purchasing device generates a second hash value of the data to be traded based on the data to be traded.
[0039] The data purchasing device determines the integrity of the data to be traded based on the first hash value and the second hash value of the data to be traded through the smart contract.
[0040] The beneficial effects of this invention are:
[0041] The data trading system provided by this invention includes a data providing device, a data purchasing device, a trading device, a blockchain device, and an InterPlanetary File System (IPS). The data providing device encrypts the data to be traded to obtain encrypted data, sends the encrypted data to the IPS, and publishes a smart contract to the blockchain device. The smart contract includes the price and subscription period of the data to be traded. The data purchasing device sends a payment request to the trading device via the smart contract and pays a transaction amount to the trading device. The payment request includes the decentralized identifier of the data purchasing device. The trading device generates a payment voucher based on the payment request and the transaction amount, and sends the payment voucher to the data purchasing device. The data purchasing device generates a payment statement based on the payment voucher and sends a data access request to the data providing device. Please include the payment statement and the encrypted public key of the data purchasing device; the data providing device generates a temporary key according to the data access request, sends the temporary key to the smart contract on the blockchain device, generates a data access credential according to the payment statement, and sends the data access credential to the trading device through the smart contract; the trading device pays the transaction amount to the data providing device and generates a data access statement according to the data access credential, and sends the data access statement to the data purchasing device; the data purchasing device obtains an access token through the smart contract according to the data access statement, obtains the encrypted data sent by the InterPlanetary File System according to the access token, decrypts the encrypted data using the temporary key to obtain the data to be traded, and uses the data to be traded within the subscription period, wherein the access token includes the temporary key and the subscription period. Through the above process, the data providing device stores the encrypted data corresponding to the data to be traded in the InterPlanetary File System. The payment information (including payment statements and payment vouchers) is stored in the trading device and the data providing device respectively. That is, the data to be traded and the payment information are no longer stored on a centralized platform, which reduces the risk of leakage of the data to be traded and the payment information, ensures the traceability of the transaction process, and verifies the correctness of the payment through the payment vouchers and payment statements issued by the trading device and the data providing device, ensuring the transparency and credible audit of the payment, and avoiding the problem of payment verification difficulties. Attached Figure Description
[0042] Figure 1 This diagram illustrates the structure of the data transaction system provided in an embodiment of the present invention.
[0043] Figure 2 This is a flowchart illustrating the data transmission process provided in an embodiment of the present invention.
[0044] Figure 3This diagram illustrates the data payment process provided in this embodiment of the invention.
[0045] Figure 4 This is a flowchart illustrating the verification and unlocking of transaction data provided in an embodiment of the present invention. Detailed Implementation
[0046] To make the technical problems, technical solutions, and advantages of this application clearer, a detailed description will be provided below in conjunction with the accompanying drawings and specific embodiments. In the following description, specific details such as particular configurations and components are provided merely to aid in a comprehensive understanding of the embodiments of this application. Therefore, those skilled in the art should understand that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this application. Furthermore, for clarity and brevity, descriptions of known functions and structures have been omitted.
[0047] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments.
[0048] In the various embodiments of this application, it should be understood that the sequence number of each process described below does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0049] The terms "first," "second," etc., used in this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first" and "second" are generally of the same class, without limiting the number of objects; for example, the first object can be one or more. Furthermore, "or" in this application indicates at least one of the connected objects. For example, "A or B" covers three scenarios: Scenario 1: including A but not B; Scenario 2: including B but not A; Scenario 3: including both A and B. The character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0050] The term "instruction" in this application can be either a direct instruction (or explicit instruction) or an indirect instruction (or implicit instruction). A direct instruction can be understood as one in which the sender explicitly informs the receiver of specific information, the operation to be performed, or the requested result, etc.; an indirect instruction can be understood as one in which the receiver determines the corresponding information based on the instruction sent by the sender, or makes a judgment and determines the operation to be performed or the requested result, etc., based on the judgment result.
[0051] Before describing the specific embodiments of the present invention, the following will be explained first:
[0052] A Decentralized Identifier (DID) is a digital identity method based on distributed ledger technology (such as blockchain). Unlike traditional centralized identity systems, DIDs are entirely controlled by the user and do not rely on third-party institutions. Each DID corresponds to a unique identifier and its security and privacy are ensured through encryption technology. DIDs are often used in conjunction with verifiable credentials (VCs) to prove a user's identity, attributes, or permissions.
[0053] Attribute-based encryption (ABE) is a user-attribute-based encryption technique that enables fine-grained data access control. Unlike traditional encryption methods, ABE binds encrypted data to access policies, allowing only users who meet specific attribute conditions to decrypt the data.
[0054] To address the problems of easy leakage of transaction data and payment information, and difficulty in verifying payments in existing data transaction methods, this invention provides a data transaction system.
[0055] like Figure 1 As shown, an embodiment of the present invention provides a data transaction system, including:
[0056] Data providing devices, data purchasing devices, trading devices, blockchain devices, and the InterPlanetary File System (IPFS).
[0057] The data providing device, also known as the data provider or data provider, is used to provide data to be traded and to encrypt it, deploy smart contracts for transactions, generate data access credentials, issue access tokens, and dynamically maintain data access permissions.
[0058] Data purchasing equipment, also known as data buyer, data consumer, data consumer, or data consumer, is used to initiate a payment request (or transaction request) for a certain piece of data to be traded, generate a payment voucher, decrypt and verify the validity of the transaction data, and use the data within a specified period.
[0059] Trading equipment, also known as a data exchange, is a trusted entity responsible for operating and supervising the data trading process, providing payment verification services, and issuing credible certificates of successful payments.
[0060] Blockchain devices and smart contracts are used to record and execute data transactions, verify payment credentials, manage access tokens, and support fine-grained access control. Blockchain devices store transaction records, DID documents, and contract execution logic. Smart contracts are executable programs deployed and running on blockchain devices, responsible for automatically executing access control, payment verification, and other logic.
[0061] The InterPlanetary File System (IPS) provides decentralized storage for storing encrypted transaction data.
[0062] The data trading system provided in this embodiment also includes a DID system, which is used to assign global digital identities to data providing devices, data purchasing devices, and trading devices, and provides standards and supports verifiable credentials (VC) and verifiable presentations (VP).
[0063] Before data transactions can take place, digital identity registration is required. Digital identity registration refers to the creation and maintenance of a unique identity identifier for each user within the DID system. The digital identity registration process can be summarized as follows:
[0064] Entities participating in data transactions (including data providing devices, data purchasing devices, trading devices, blockchain devices, and the InterPlanetary File System) submit digital identity registration requests to the DID system via smart contracts. The DID system assigns a unique identifier (or digital identity), i.e., a decentralized identifier, to each entity based on the registration request. For example, the decentralized identifier assigned to a data providing device is represented as: did:provider:123.
[0065] The DID system maps DID documents and stores them on blockchain devices. The DID document records metadata such as the entity's decentralized identifier, certificate signature, and public key information. This metadata is stored on the blockchain and can be accessed transparently. A corresponding hash value is generated for the metadata to ensure the integrity and immutability of the associated data. Entities participating in data transactions can obtain relevant information from the DID document to verify the correctness of credentials or claims.
[0066] The data exchange completes the registration of digital identity association information of entities participating in data transactions, and records and updates the digital identities of data supply and demand entities (i.e., data providing equipment and data purchasing equipment).
[0067] The data providing device encrypts the data to be traded to obtain encrypted data, sends the encrypted data to the InterPlanetary File System, and publishes a smart contract to the blockchain device, the smart contract including the price and subscription period of the data to be traded.
[0068] Specifically, the data providing device publishes the data, and the data providing device encrypts the data to be traded to obtain encrypted data. encrypt data Uploaded to the InterPlanetary File System (IPS) for storage; IPS receives encrypted data. Store encrypted data .
[0069] In some embodiments, the data providing device encrypts the data to be traded to obtain encrypted data, including:
[0070] The data providing device generates an attribute-based encryption key according to the data access policy of the data to be traded. The data access policy includes a centralized set of identifiers of potential data purchasing devices reviewed by the trading device and the subscription status period attribute corresponding to the potential data purchasing devices.
[0071] Specifically, before the data provider sends the encrypted data corresponding to the data to be traded to the InterPlanetary File System, the data provider generates a system master key. and encryption public key System Master Key and encryption public key The expression is as follows:
[0072] ;
[0073] in, Indicates security parameters (such as key length, encryption strength). This represents the attribute-based encryption key generation function.
[0074] The data provider defines the data access policy for the data to be traded. The expression is as follows:
[0075] ;
[0076] in, This refers to a centralized set of identifiers for potential data purchasing devices that have been verified by the transaction equipment. This centralized identifier set includes the centralized identifier for each of at least one potential data purchasing device verified by the transaction equipment. This indicates the subscription status period attribute corresponding to the potential data purchase device, which can be True (valid) or False (invalid). It also includes the subscription period for the data to be traded and the trading modes supported by the data to be traded, which include one-time transactions, subscription transactions, and phased transactions.
[0077] It is also understandable that the generation process of encrypted data is related to the data access strategy of the data to be traded. That is, the encrypted data contains the data access strategy, and the message is encrypted using the subscription state duration attribute corresponding to the potential data purchasing device. For example, in the process of ciphertext-based attribute encryption, the set of subscription state duration attributes for the data purchasing device (i.e., the potential data purchasing device) that satisfies the access requirement is: ,in, , These represent the subscription status and duration attributes of the potential data purchase device, respectively. Encrypted data can be represented as:
[0078] ;
[0079] in, , These represent the encrypted elements in the encrypted data. , During the encryption process, respectively with , Binding, This is an expression for the data access strategy.
[0080] The data providing device uses the attribute-based encryption key to encrypt the data to be traded to obtain the encrypted data.
[0081] Specifically, the data providing device uses an attribute encryption algorithm based on the ciphertext. The attribute-based encryption key is used to encrypt the approved transaction data, resulting in encrypted data. The expression is as follows:
[0082] ;
[0083] in, This indicates an attribute-based encryption algorithm based on ciphertext. This indicates data pending transaction. This indicates the data access strategy for the data to be traded.
[0084] The issuance of a smart contract by a data provider to a blockchain device can be understood as the data provider deploying a smart contract on the blockchain. This smart contract includes the price and subscription period of the data to be traded.
[0085] In some embodiments, the smart contract further includes a first hash value of the data to be traded and a hash index corresponding to the encrypted data; wherein, the first hash value of the data to be traded is generated by the data providing device based on the data to be traded;
[0086] Before the data providing device publishes a smart contract to the blockchain device, the data providing device obtains the hash index sent by the InterPlanetary File System (IPS), wherein the hash index is used to indicate the storage location of the encrypted data in the IPS.
[0087] In this embodiment, the smart contract is expressed as follows:
[0088] ;
[0089] in, A smart contract can be understood as including the first hash value of the data to be traded. The hash index of the location where the encrypted data corresponding to the transaction data is stored on the InterPlanetary File System. The price of the data to be traded Decentralized identifiers for data providing devices Subscription period for transaction data ,For example, It is 24 hours.
[0090] Specifically, before the data providing device publishes a smart contract to the blockchain device, the data providing device also calculates the first hash value of the data to be traded. ,as follows:
[0091] ;
[0092] Should This is used to verify that the data to be traded has not been tampered with. Specifically, the data providing device calculates a hash value for the original data to be traded, ensuring that the data version has not been privately altered.
[0093] The data providing device will encrypt the data. After being uploaded to the InterPlanetary File System (IPS) for storage, the IPS returns encrypted data. Hash index of the storage location The hash index This can be understood as encrypted data. Content addressing identifier generated after uploading to InterPlanetary File System.
[0094] Smart contract execution data provides access control defined by the device, that is, setting up access to the data to be traded that is allowed by verification within a specified period of time.
[0095] Data purchase equipment: Initiating a payment request and making the payment:
[0096] The data purchasing device sends a payment request to the transaction device via the smart contract. The payment request includes the decentralized identifier of the data purchasing device. ;
[0097] In this process, the data purchasing device sends a payment request to the transaction device through the smart contract. This can be understood as a programmable, automatically executed program used to write and execute the operational logic of the entire transaction process. When the data purchasing device accesses the smart contract, it automatically enters the process of sending a payment request to the transaction device.
[0098] In this process, the data purchasing device sends a payment request to the transaction device through the smart contract. This can be understood as a programmable, automatically executed program used to write and execute the operational logic of the entire transaction process. When the data purchasing device accesses the smart contract, it automatically enters the process of sending a payment request to the transaction device.
[0099] The transaction device receives payment requests sent by the data purchasing device via smart contracts.
[0100] In some embodiments, before the data providing device sends the encrypted data corresponding to the data to be traded to the InterPlanetary File System and publishes the smart contract to the blockchain device, the data providing device sends a data transaction publication request for the data to be traded to the trading device. The data transaction publication request includes the data to be traded. The trading device verifies the compliance of the data to be traded based on the data transaction publication request, i.e., verifies whether the data to be traded is compliant. After confirming that the data to be traded is compliant, the trading device announces that the data to be traded can be traded. The trading device obtains the decentralized identifiers (or the set of centralized identifiers of potential data purchasing devices reviewed by the trading device) of the potential data purchasing devices reviewed by the trading device, and sends all the decentralized identifiers of the potential data purchasing devices reviewed by the trading device to the data providing device.
[0101] The data purchasing device pays the transaction amount to the trading device. That is, the data purchasing device makes the payment to the trading device, and the trading device records the payment timestamp.
[0102] In some embodiments, the data purchasing device pays transaction fees to the transaction device, including:
[0103] The data purchasing device pays the transaction amount to the trading device via off-chain transfer.
[0104] Specifically, the data purchasing device sends a payment request to the transaction device via a smart contract. The transaction device receives the payment request sent by the data purchasing device via the smart contract, and this payment request includes the decentralized identifier of the data purchasing device. The trading device purchases the device's decentralized identifier based on the data. Verify the validity of the identity used to purchase the device.
[0105] After verifying the identity of the data purchasing device, the transaction device opens an off-chain payment channel, and the data purchasing device completes the payment through the off-chain payment channel.
[0106] In some embodiments, after the data purchasing device pays the transaction amount to the transaction device, the data purchasing device generates a transaction record of the transaction amount paid by the transaction device.
[0107] The data purchasing device stores the transaction records through the smart contract.
[0108] This means that once the transaction device opens an off-chain payment channel, the data purchasing device transfers the transaction funds to the transaction device, charges an appropriate handling fee according to the agreement, and records the operation in the smart contract to prevent issues such as repudiation and repeated requests for transaction fund transfer.
[0109] In some embodiments, after the data purchasing device sends a payment request to the trading device through the smart contract, the trading device generates a payment order based on the payment request, and the payment order includes the price and payment period of the data to be traded;
[0110] Among them, the payment order also includes a decentralized identifier for the purchased device.
[0111] Specifically, payment orders The expression is as follows:
[0112] ;
[0113] This can be understood as a payment order. Including the first hash value of the data to be traded The hash index of the location where the data to be traded is stored on the InterPlanetary File System. The price of the data to be traded Decentralized identifiers for data purchase devices Data purchasing equipment uses a payment initiation timestamp for the data to be traded. Payment validity period for pending transaction data If the data purchase equipment exceeds If payment is not made within the specified payment period, the transaction will be cancelled.
[0114] The transaction device receives the transaction payment from the data purchase device and obtains the payment time of the transaction payment from the data purchase device.
[0115] Specifically, the transaction device receives transaction funds paid by the data purchasing device through an off-chain payment channel, and obtains and records the payment time of the data purchasing device's payment of the transaction funds. This refers to the payment completion time.
[0116] The transaction device determines the validity of the data purchase device paying the transaction amount to the transaction device based on the payment time and the payment period.
[0117] From payment order The expression indicates that the payment order... It also includes the payment time (i.e., the timestamp of the payment initiation for the data to be transacted). ) and payment period (i.e., the validity period of payment for the data to be traded) );
[0118] The transaction device is based on the payment time. and the payment period To determine the validity of the data purchasing device paying the transaction amount to the transaction device.
[0119] That is, the payment timestamp for the transaction equipment to confirm the data purchase equipment for the data to be traded. Whether it is within the payment period, i.e., whether it meets the following requirements:
[0120] ;
[0121] If the conditions are met, the payment made by the data purchasing device to the trading device is deemed valid (or the payment is correct). Otherwise, the payment is deemed invalid.
[0122] The transaction device generates a payment voucher based on the payment request and the payment transaction amount, and sends the payment voucher to the data purchasing device; wherein, the payment voucher is used to instruct the data purchasing device to make payment for the data to be traded (or to complete the payment).
[0123] Specifically, after confirming the validity of the payment transaction, the transaction device generates a payment voucher based on the payment request and the payment transaction amount. The payment voucher The expression is as follows:
[0124] ;
[0125] Among them, payment vouchers Decentralized identifiers for data purchase devices The payment timestamp for data purchase devices to complete payment for data to be traded. The payment field signature has been correctly obtained. It is understandable that the payment field signature has been correctly obtained. The data purchase device is instructed to make payment (or complete payment) for the data to be traded.
[0126] Among them, the payment field signature has been correctly completed. The transaction device uses the signature private key to verify the correctly paid fields. The result obtained through signing is expressed as follows:
[0127] ;
[0128] Understandably, the field indicating correct payment... The data purchase device is instructed to make payment (or complete payment) for the data to be traded.
[0129] Then, the transaction device sends a payment voucher to the data purchase device. The data purchase device receives payment vouchers sent by the transaction device. .
[0130] In some embodiments, the transaction device generates a payment voucher based on the payment request and the payment transaction amount, including:
[0131] The transaction device authenticates the data purchase device based on the decentralized identifier of the data purchase device;
[0132] After the transaction device verifies the identity of the data purchase device, it generates a payment voucher based on the payment transaction amount.
[0133] Specifically, the payment request includes a decentralized identifier for the data purchase device. The transaction device receives a payment request sent by the data purchasing device via a smart contract, and the transaction device uses the decentralized identifier of the data purchasing device to... Verify the validity of the identity used to purchase the device.
[0134] The specific process for verifying the identity of the data purchase device is as follows: the transaction device sends a verification request to the blockchain device, and the verification request includes the decentralized identifier of the data purchase device. The blockchain device checks whether the verification request can be found on the blockchain device. The corresponding DID document is verified. The system checks the validity of the certificate signature, public key information, etc., stored in the corresponding DID document and sends an indication message to the transaction device. This indication message indicates whether the verification is valid. If the transaction device determines that the verification is valid or passes based on the indication message, it confirms the identity of the data purchasing device is valid.
[0135] The data purchase device generates a payment statement based on the payment voucher. The payment statement This is used to instruct the data purchasing device to make payment (or complete payment) for the data to be traded. The payment declaration... It can also be understood as a verifiable statement that payment has been made.
[0136] Specifically, the data purchasing device receives the payment voucher sent by the transaction device. Then, using the signing private key Payment vouchers Perform the signature and obtain the signature information. The expression is as follows:
[0137] ;
[0138] The data purchasing device, based on the signature information The payment voucher and the decentralized identifier of the data purchase device Generate payment statement Among them, payment statement This payment statement is used to instruct the data purchasing device to make payment for the data to be traded. The expression is as follows:
[0139] ;
[0140] Understandably, payment statement Including payment vouchers Signature information Decentralized identifiers for data purchase devices Correctly paid field Among them, the field indicating correct payment. The instruction data purchase device makes payment for the data to be traded.
[0141] The data purchasing device sends a data access request to the data providing device, the data access request including the payment statement and the encrypted public key of the data purchasing device.
[0142] Specifically, the data purchasing device also generates an encrypted public key. The data purchasing device sends a data access request to the data providing device via a smart contract on the blockchain device. This data access request carries a payment statement and a cryptographic public key. .
[0143] The data providing device generates a temporary key based on the data access request. The temporary key This is the unlock key for the data to be traded.
[0144] In some embodiments, the data providing device generates a temporary key based on the data access request, including:
[0145] The data providing device generates an attribute base key that is only available to the data purchasing device based on the data access request. Specifically, after receiving a data access request, the data providing device generates an attribute base key that is only available to the data purchasing device. This is the only data purchase device available attribute base key. The expression is as follows:
[0146] ;
[0147] in, This includes attributes that satisfy the data access strategy for the data to be traded. This indicates the system master key of the data providing device. This represents the attribute base key generation function.
[0148] The data providing device uses the data to purchase the device's encrypted public key. The attribute base key is encrypted to obtain the temporary key.
[0149] Specifically, the data providing device uses a public key for encryption. Encryption attribute base key Obtain the temporary key The expression is as follows:
[0150] ;
[0151] The data providing device sends the temporary key to the smart contract on the blockchain device. .
[0152] The data providing device generates a data access credential based on the payment statement.
[0153] Specifically, the data providing device verifies the payment statement through a smart contract on the blockchain device. , is represented as:
[0154] ;
[0155] in, This represents the public key used for signing.
[0156] Once verification is successful, payment will be made for the data to be purchased using the equipment.
[0157] Specifically, the data providing device is based on the payment statement. Find the decentralized identifier of the data provider device from the blockchain device. Obtain the signing public key from the associated DID document. According to the public key of the signature Verify signature information The correctness of the statement is verified; if it is verified to be correct, then the payment statement is proven. Issued by purchasing equipment based on data.
[0158] Data providing equipment according to payment statement Find the decentralized identifier of the data provider device from the blockchain device. Obtain the signing public key from the associated DID document. The data providing device uses the signing public key The payment statement confirms that the data purchasing device makes payment for the data to be traded. Specifically, the data providing device uses the signing public key. Verify payment statement The "Payment Correctly" field The correctness is expressed as follows:
[0159] ;
[0160] This can be understood as the data providing device using a signing public key. Sign the correctly paid field Perform verification; if the payment field signature is correct... Corresponding payment statement The "Payment Correctly" field This proves that the verification was successful, indicating that the payment field has been correctly processed. It is issued by the transaction equipment, confirming that the data purchasing equipment makes payment for the data to be traded.
[0161] In addition, the data providing equipment can also check whether the payment time meets the payment validity period.
[0162] If all the above verifications pass, the data providing device can know that the data purchasing device has made payment to the transaction device (or that the payment has been completed).
[0163] The data provider generates a data access credential based on the payment statement and the data provider's decentralized identifier. This data access credential Access authorization credentials.
[0164] Optionally, the data providing device generates data access credentials based on the payment statement, including:
[0165] Data providing devices utilize signature private keys For payment statement Sign, obtain signature information The expression is as follows:
[0166] ;
[0167] Data providing equipment based on signature information Payment Statement Decentralized identifiers for data providing devices Decentralized identifiers for data purchase devices Generate data access credentials Data access credentials The expression is as follows:
[0168] ;
[0169] Understandably, data access credentials Decentralized identifiers for data purchase devices Signature information Payment Statement Subscription period for pending transaction data Decentralized identifiers for data providing devices The first hash value of the data to be traded The hash index of the location where the data to be traded is stored on the InterPlanetary File System. .
[0170] The data providing device sends the data access certificate to the transaction device through the smart contract. The transaction device receives data access credentials sent by the data provider through a smart contract. .
[0171] The transaction device pays the transaction amount to the data providing device based on the data access certificate.
[0172] Specifically, when the transaction device receives the data access credential... Then, verification The validity of the data access credentials. Payment statement in Find the decentralized identifier of the data provider on the blockchain device. Obtain the signing public key from the associated DID document. According to the public key of the signature Verify data access credentials Signature information in The correctness of the verification. If the verification is correct (or passes), then the payment statement is proven. The data access credential is issued by the data providing device and confirms its validity. It includes a correctly paid receipt issued by the transaction device, i.e., a data access receipt instructing the data purchasing device to make payment for the data to be traded.
[0173] In determining data access credentials After receiving the correct payment voucher issued by the transaction device, the transaction device opens an off-chain payment channel to transfer the transaction funds to the data provider device. A handling fee is charged appropriately according to the agreement, and the operation is recorded in the smart contract to prevent issues such as repudiation and repeated requests for transaction fund transfer.
[0174] The transaction device generates a data access claim and sends the data access claim to the data purchase device.
[0175] Specifically, the transaction device uses a signing private key to sign the data access credential, obtaining signature information. Based on this signature information, the data access credential, and the decentralized identifier of the data purchasing device, the transaction device generates a data access claim. The transaction device sends a data access claim to the data purchasing device. .
[0176] Understandably, data access declaration A payment statement generated for the data purchase device by the transaction device. This data access statement. The generation process is basically the same as the generation process of the payment statement mentioned above, and the generated data access statement... The content is basically the same as the payment statement mentioned above, so it will not be repeated here.
[0177] Data purchase equipment will include data access claims The smart contract submitted to the blockchain device is sent to the data purchase device via the smart contract, and the data purchase device receives the data access claim. .
[0178] The data purchasing device obtains an access token through the smart contract based on the data access claim. The access token includes the temporary key and the subscription period.
[0179] Specifically, the data purchasing device sends a data access claim to a smart contract on the blockchain device. Smart contracts on blockchain devices receive data access statements Check data access declaration The legitimacy of the data is verified; if the verification is valid, the blockchain device is used to access the claim based on the data. Generate access token Access token Includes temporary keys and subscription duration, access tokens Represented as:
[0180] ;
[0181] Understandably, access tokens Decentralized identifiers for data purchase devices The first hash value of the data to be traded Hash index of the location where encrypted data is stored on the InterPlanetary File System (i.e., the location index of the encrypted data), and the subscription period for the data to be traded. .
[0182] Smart contracts on blockchain devices will access tokens Send to the data purchasing device, the data purchasing device receives the access token. .
[0183] The data purchasing device retrieves the encrypted data sent by the InterPlanetary File System (IPS) based on the access token. It is understood that the data purchasing device uses the access token... Hash index of the location where encrypted data is stored on the InterPlanetary File System The encrypted data was found on the InterPlanetary File System.
[0184] The data purchasing device uses the temporary key to decrypt the encrypted data to obtain the data to be traded, and uses the data to be traded during the subscription period.
[0185] Specifically, the data purchase device uses an access token. Request a temporary key from a blockchain device Data purchase equipment to obtain temporary keys Then, using the temporary key The encrypted data is decrypted to recover the original plaintext message (i.e., the data to be traded is obtained), and the data to be traded is used within the subscription period.
[0186] In some embodiments, the data purchasing device uses the temporary key to decrypt the encrypted data to obtain the data to be traded, including:
[0187] The data purchase device decrypts the temporary key to obtain the attribute base key;
[0188] The data purchasing device uses the attribute base key to decrypt the encrypted data to obtain the data to be traded.
[0189] Specifically, the data purchase device uses an access token. Request a temporary key from a blockchain device Data purchasing devices use encrypted private keys to access temporary keys. Decryption is performed to obtain the attribute base key. Data purchasing equipment utilization Decrypt the encrypted data to obtain the data to be traded.
[0190] It should be noted that, due to the data access strategy for encrypted data, which includes the data to be traded, the data purchasing device utilizes attribute-based keys. The decryption process of encrypted data utilizes attribute-based keys. The data access policy of the data to be traded in the encrypted data is calculated, and the data access policy of the data to be traded is decrypted. If the access policy of the data purchasing device includes the data access policy of the decrypted data to be traded, the decryption is confirmed to be successful, and the data to be traded is obtained.
[0191] Using attribute base key Decrypting the encrypted data yields the following set of attributes for the data purchase device: ,exist , Data access strategy to meet the needs of transaction data In the case of using attribute base keys Combination , The process is as follows:
[0192] ;
[0193] Based on attribute base key and encrypted data The encrypted elements in the data use bilinear pairs. To verify whether the data to be traded can be recovered, if the data includes the attributes of the device purchased and the encrypted data. If the access strategy for the pending data matches, the pending data can be recovered using the following formula:
[0194] ;
[0195] in, Indicates a bilinear pair. , These represent the encrypted elements in the encrypted data. and The calculation process is a standard step in attribute-based encryption algorithms. and These can be understood as two core components derived from the attribute-based key generation algorithm.
[0196] In some embodiments, after the data purchasing device decrypts the encrypted data using the temporary key to obtain the data to be traded, the data purchasing device generates a second hash value for the data to be traded based on the data to be traded.
[0197] The data purchasing device determines the integrity of the data to be traded based on the first hash value and the second hash value of the data to be traded through the smart contract.
[0198] Specifically, the data purchasing device generates a first hash value for the data to be traded based on the data to be traded. Send the first hash value to the smart contract .
[0199] After decrypting the encrypted data to obtain the data to be traded, the data purchasing device calculates a hash value for the decrypted data, thus obtaining a second hash value. This second hash value is then compared with the first hash value recorded in the smart contract. A comparison is performed to ensure data integrity. Once data integrity is ensured, the transaction of the pending data is completed.
[0200] In this case, if the second hash value matches the first hash value, the data is considered complete.
[0201] Furthermore, the data providing device is also used to enable access tokens. Invalidation: The data provider device calls the smart contract's revocation function to mark the access token as invalid (or revoked). A revoked access token... Unable to be used to obtain the unlock key. The smart contract automatically detects and cleans up any new messages containing invalid or revoked access tokens and associated keys.
[0202] The legitimacy of payments and data access is verified through blockchain devices.
[0203] Policy-based access control means that if a device attempts to decrypt data that does not meet the policy, the decryption will fail if the data's attributes do not satisfy the new policy.
[0204] Attribute cancellation: If the data purchase device subscription expires, violates regulations, or the transaction price is dynamically adjusted for highly real-time data, the data provider device will update its attribute set, such as changing the subscription status to invalid.
[0205] Regenerating encrypted data and updating the smart contract is expressed as follows:
[0206] .
[0207] The following is combined with Figure 2 The following describes the data transmission process provided in the embodiments of the present invention:
[0208] The data provider publishes data to be traded, the trading device verifies the compliance of the data to be traded, and simultaneously collects the centralized identifiers of potential data purchasers verified by the trading device; the data provider encrypts the data to be traded based on the attribute encryption algorithm of the encrypted data, and stores the encrypted data in the InterPlanetary File System; the data provider deploys a smart contract to publish the price of the data to be traded, the subscription period, the decentralized identifier of the data provider, and the hash index of the encrypted data's storage location in the InterPlanetary File System; the blockchain device executes access control logic and obtains payment requests sent by data purchasers.
[0209] The following is combined with Figure 3 The data payment process provided in this embodiment of the invention is explained in detail below:
[0210] The data purchasing device sends a payment request to a smart contract on the blockchain device. The payment request includes the decentralized identifier of the data purchasing device. The blockchain device generates a payment order for the data to be traded and records the timestamp of the payment initiation for the data to be traded. Payment validity period for pending transaction data The transaction device receives a payment request sent by the data purchasing device via a smart contract, and then uses the decentralized identifier of the data purchasing device in the payment request. The identity of the data purchasing device is verified. Upon successful verification, an off-chain payment channel is opened based on the payment order. The data purchasing device completes the payment through the off-chain payment channel. The transaction device determines the validity of the payment transaction based on the payment initiation time, payment completion time, and payment validity time, and generates a payment voucher based on the payment transaction amount and payment request. The data purchasing device generates a payment statement based on the signature information, payment voucher, and the decentralized identifier of the data purchasing device. The payment statement includes fields instructing the data purchasing device to make payment for the data to be traded. The data purchasing device then sends the payment statement and the generated encrypted public key to the transaction. Send it to the data provider device via a smart contract on the blockchain device.
[0211] The following is combined with Figure 4 The specific process for verifying and unlocking the transaction data is as follows:
[0212] The data providing device verifies the payment statement provided by the data purchasing device through a smart contract. If the verification is successful, the data purchasing device is confirmed to make payment for the data to be traded. The data providing device generates a data access certificate and sends it to the trading device through the blockchain device. Upon receiving the data access certificate, if the verification is valid, the trading device opens an off-chain payment channel to transfer the transaction funds to the data providing device, collects an appropriate handling fee according to the agreement, and records the operation in the smart contract. The trading device generates a data access statement for the data purchasing device. The data purchasing device submits the data access statement to the blockchain device. The smart contract on the blockchain device verifies the legality of the data access statement. Upon successful verification, an access token is generated. The data purchasing device requests the attribute base key of the data to be traded from the smart contract on the blockchain device based on the access token. It decrypts the attribute base key to obtain a temporary private key. Based on the temporary private key and the encrypted data sent by the InterPlanetary File System, it obtains the data to be traded. The integrity of the data to be traded is verified through the hash value, and it is used within the subscription validity period.
[0213] The data trading system provided in this invention establishes a distributed data trading architecture by introducing blockchain technology, solving problems such as single points of failure in existing technologies. It builds a trusted trading environment for participating entities, utilizes smart contracts to automatically execute trading strategies, and eliminates the risk of malicious human intervention by ensuring the process is uninterrupted. The data trading platform built on blockchain technology eliminates single points of failure while ensuring the transparency and immutability of the trading process. The automatic execution of data trading strategies using smart contracts avoids human intervention and malicious operations, improving system transparency. Furthermore, the introduction of a data exchange to monitor the entire trading process allows for timely intervention and resolution of transaction disputes between entities.
[0214] This system enables the legitimate identification of entities involved in data transactions, providing a decentralized digital identity verification mechanism and reducing the risks of identity forgery associated with centralized identity authentication institutions. The DID (Digital Identity Authentication) method provides participating entities with a decentralized digital identity verification mechanism, mitigating the risk of identity forgery. This information is stored on the blockchain, ensuring the credibility and immutability of the identity information.
[0215] A dynamic data transaction pricing management mechanism is implemented through attribute-based encryption. Smart contracts are used to execute transaction control strategies, ensuring data access is only possible within a specific time window. Once the access window expires, consumer access is revoked, preventing unauthorized access. Furthermore, for data transactions with high real-time requirements, dynamic pricing is achieved by setting time-lock windows. Attribute-based encryption technology enables fine-grained data access control, supporting dynamic transaction pricing and access control management. Smart contracts are used to automatically revoke access after the subscription period.
[0216] A trusted off-chain payment verification method is designed. The payment process employs dual verification of the payment amount using VCs and VPs issued by both the exchange and the data provider. This prevents potential collusion between the data exchange and the consumer, ensuring the reliable auditability of payment information. Payment completion is automatically confirmed via a smart contract. The dual verification of the payment amount using VCs and VPs issued by the exchange and data provider prevents collusion between the data exchange and the consumer, ensuring the transparency and reliable auditability of payment information.
[0217] This invention utilizes blockchain and DID technologies to decentralize user privacy information, transaction data, and payment information from centralized platforms, reducing the risk of data leakage and misuse. All transaction records are stored on-chain, ensuring transparency and traceability. Furthermore, compared to fully decentralized trading platforms, the introduction of an exchange entity enhances system robustness and the regulatory oversight of data transactions. Through attribute-based encryption and smart contracts, access permissions and usage scope are effectively controlled, preventing unauthorized access. For high-real-time data, it supports periodic subscription functions and dynamic pricing mechanisms, meeting the needs of data temporality and time sensitivity. By employing off-chain payment verification methods combined with a dual verification mechanism involving VCs and VPs from both the data provider and the exchange, the invention solves the problem of low efficiency in traditional on-chain payments while avoiding the difficulty in verifying interactions between off-chain payments and smart contracts, effectively preventing collusion between data exchanges and consumers.
[0218] The above describes the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also within the scope of protection of the present invention.
Claims
1. A data transaction system, characterized in that, include: Data providing devices, data purchasing devices, trading devices, blockchain devices, and the InterPlanetary File System; The data providing device generates an attribute-based encryption key according to the data access policy of the data to be traded. The data providing device uses the attribute-based encryption key to encrypt the data to be traded to obtain encrypted data. The data providing device sends the encrypted data to the InterPlanetary File System. The data access policy includes a centralized set of identifiers of potential data purchasing devices reviewed by the trading device and the subscription status period attribute corresponding to the potential data purchasing devices. The data providing device obtains the hash index corresponding to the encrypted data sent by the InterPlanetary File System, wherein the hash index is used to indicate the storage location of the encrypted data in the InterPlanetary File System; The data providing device publishes a smart contract to the blockchain device. The smart contract includes the price and subscription period of the data to be traded. The smart contract also includes a first hash value of the data to be traded and a hash index corresponding to the encrypted data. The first hash value of the data to be traded is generated by the data providing device based on the data to be traded. The data purchasing device sends a payment request to the transaction device through the smart contract, and the payment request includes the decentralized identifier of the data purchasing device; After the data purchasing device sends a payment request to the trading device through the smart contract, the trading device generates a payment order based on the payment request. The payment order includes the price of the data to be traded and the payment period. The data purchasing device pays the transaction amount to the transaction device; The transaction device receives the transaction payment from the data purchasing device and obtains the payment time of the data purchasing device's payment of the transaction payment; the transaction device determines the validity of the data purchasing device's payment of the transaction payment to the transaction device based on the payment time and the payment period; The transaction device authenticates the data purchasing device based on the decentralized identifier of the data purchasing device. After the transaction device successfully authenticates the data purchasing device, it generates a payment voucher based on the transaction amount and sends the payment voucher to the data purchasing device. The payment voucher is used to instruct the data purchasing device to make payment for the data to be traded. After receiving the payment voucher sent by the transaction device, the data purchase device uses the signing private key. The payment voucher is signed to obtain signature information. The data purchasing device, based on the signature information The payment certificate and the decentralized identifier of the data purchasing device are used to generate a payment statement and send a data access request to the data providing device. The data access request includes the payment statement and the encrypted public key of the data purchasing device. The payment statement is used to instruct the data purchasing device to make payment for the data to be traded. The data providing device generates an attribute base key that is only available to the data purchasing device according to the data access request, encrypts the attribute base key using the encryption public key of the data purchasing device to obtain a temporary key; the data providing device sends the temporary key to the smart contract on the blockchain device, generates a data access certificate according to the payment statement, and sends the data access certificate to the transaction device through the smart contract; The transaction device pays the transaction amount to the data providing device and generates a data access statement based on the data access certificate, and sends the data access statement to the data purchasing device. The data purchasing device obtains an access token through the smart contract based on the data access claim, and obtains the encrypted data sent by the InterPlanetary File System based on the access token; the data purchasing device decrypts the temporary key to obtain an attribute base key, and uses the attribute base key to decrypt the encrypted data to obtain the data to be traded; the data purchasing device generates a second hash value of the data to be traded based on the data to be traded; the data purchasing device determines the integrity of the data to be traded based on the first hash value and the second hash value of the data to be traded through the smart contract, and uses the data to be traded within the subscription period, wherein the access token includes the temporary key and the subscription period.
2. The data transaction system according to claim 1, characterized in that, The data purchasing device pays the transaction amount to the transaction device, including: The data purchasing device pays the transaction amount to the trading device via off-chain transfer.
3. The data transaction system according to claim 2, characterized in that, After the data purchasing device pays the transaction amount to the transaction device, the data purchasing device generates a transaction record of the transaction amount payment by the transaction device; The data purchasing device stores the transaction records through the smart contract.
Citation Information
Patent Citations
Data transaction privacy protection method based on block chain
CN120030592A