Data transaction method and device, equipment, storage medium and product

By using proxy reencrypting data and functions in data transactions, the problem of data leakage risk and low transaction efficiency in existing data transactions is solved, and a more efficient and secure data transaction process is achieved.

CN119515483APending Publication Date: 2025-02-25CHINA MOBILE ZIJIN INNOVATION INST CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411547410.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The existing data trading methods have problems such as data leakage risk and low transaction efficiency, especially because third-party institutions are untrustworthy during data storage and transactions, resulting in data security being threatened.

Method used

A data trading method is proposed, by determining the proxy of the transaction data re-encrypting data when the transaction data meets the purchase needs, and forwarding it to the data purchaser through the first forwarding party. At the same time, based on the preset private key, the public key of the data purchaser and the proxy re-encryption algorithm, the proxy re-encryption function is generated and sent to the data purchaser through the second forwarding party. The data purchaser decrypts the proxy re-encrypts the data based on this function. Get transaction data.

Benefits of technology

Through this method, the risk of third parties leaking transaction data is avoided, the efficiency of data transactions is improved, and the security of data is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119515483A_ABST
    Figure CN119515483A_ABST
Patent Text Reader

Abstract

The invention discloses a data transaction method and device, equipment, a storage medium and a product, and relates to the technical field of data processing, and the data transaction method comprises the steps: determining proxy re-encrypted data corresponding to transaction data when the transaction data meets the purchase demand of a data purchaser; forwarding the proxy re-encrypted data to the data purchaser through a first forwarding party; generating a proxy re-encryption function according to a preset private key, the public key of the data purchaser and a proxy re-encryption algorithm; and the proxy re-encryption function is sent to the data purchaser through a second forwarding party, the data purchaser decrypts the proxy re-encryption data based on the proxy re-encryption function, and the transaction data is acquired according to a decryption result. Compared with an existing mode in which the data provider and the data purchaser are entitled to carry out agency transaction based on a third party, the method can prevent the third party from leaking transaction data, and improves the efficiency of data transaction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to data transaction methods, devices, equipment, storage media and products. Background Art

[0002] With the rapid development of informatization and digitalization, the internal data of various enterprises is also growing explosively, and the value of data information is becoming more and more prominent. How to convert data into corporate benefits and how to trade data with other enterprises have become difficult problems that many enterprises want to solve.

[0003] The current data trading method is to conduct agency transactions through a trusted third party. The enterprise providing the data stores the transaction data in a third-party agency, which then hands it over to the enterprise purchasing the data. This trading method requires the third-party agency to be absolutely trustworthy, because all data is stored in the third-party agency, and the transaction times and transaction objects are not transparent. The third-party agency can sell the data to other companies without notifying the data provider. In addition, the data is provided to the third party in plain text. When the third-party agency is attacked by hackers, the data security will be greatly threatened. Summary of the invention

[0004] The main purpose of this application is to provide a data transaction method, device, equipment, storage medium and product, aiming to solve the technical problems of data leakage risk and low data transaction efficiency in existing data transactions.

[0005] To achieve the above purpose, the present application proposes a data transaction method, which is applied to a data provider. The data transaction method comprises the following steps:

[0006] When the transaction data meets the purchase requirements of the data buyer, determine the proxy re-encrypted data corresponding to the transaction data;

[0007] forwarding the proxy re-encrypted data to the data buyer through the first forwarding party;

[0008] Generate a proxy re-encryption function according to a preset private key, a public key of the data buyer, and a proxy re-encryption algorithm;

[0009] The proxy re-encryption function is sent to the data buyer through a second forwarding party. The data buyer decrypts the proxy re-encrypted data based on the proxy re-encryption function and obtains the transaction data according to the decryption result.

[0010] Optionally, the step of determining the proxy re-encrypted data corresponding to the transaction data includes:

[0011] The transaction data is encrypted by using a preset key to obtain ciphertext data;

[0012] Uploading the ciphertext data to a data storage server, and obtaining a hash value fed back by the data storage server based on the ciphertext data;

[0013] Applying for a random verification code from the data storage server according to the hash value and the purchaser information of the data purchaser;

[0014] The random verification code and the preset key are encrypted to obtain proxy re-encrypted data.

[0015] Optionally, the step of encrypting the random verification code and the preset key to obtain proxy re-encrypted data includes:

[0016] Performing data division on the random verification code to obtain a first data segment;

[0017] Dividing the preset key into a preset number of second data segments;

[0018] The first data fragment and the second data fragment are encrypted by using a preset public key to obtain proxy re-encrypted data.

[0019] Optionally, before the step of sending the proxy re-encryption function to the data buyer through the second forwarding party, the step further includes:

[0020] Acquire false user information, and generate a false proxy re-encryption function according to the false user information;

[0021] The step of sending the proxy re-encryption function to the data buyer through the second forwarding party includes:

[0022] Sending the proxy re-encryption function to the data buyer through a second forwarding party;

[0023] The false proxy re-encryption function is sent to the false user corresponding to the false proxy re-encryption function through the second forwarding party.

[0024] Optionally, after the step of sending the proxy re-encryption function to the data buyer through the second forwarding party, the method further includes:

[0025] receiving a determination file, and determining a determination result according to the determination file and the transaction data;

[0026] The determination result is uploaded to the blockchain for data transaction default determination.

[0027] Optionally, the determination file includes an executable file corresponding to the real determination program and a false executable file.

[0028] In addition, to achieve the above purpose, the present application also proposes a data transaction device, the data transaction device comprising:

[0029] A determination module, used to determine the proxy re-encrypted data corresponding to the transaction data when the transaction data meets the purchase requirements of the data buyer;

[0030] A proxy re-encrypted data forwarding module, used for forwarding the proxy re-encrypted data to the data purchaser through a first forwarding party;

[0031] A proxy re-encryption function generation module, used to generate a proxy re-encryption function according to a preset private key, a public key of the data buyer and a proxy re-encryption algorithm;

[0032] A proxy re-encryption function forwarding module is used to send the proxy re-encryption function to the data buyer through a second forwarding party. The data buyer decrypts the proxy re-encrypted data based on the proxy re-encryption function and obtains the transaction data according to the decryption result.

[0033] In addition, to achieve the above objectives, the present application also proposes a data trading device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the data trading method described above.

[0034] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the data transaction method described above are implemented.

[0035] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the data transaction method described above are implemented.

[0036] When the transaction data meets the purchase requirements of the data buyer, the present application determines the proxy re-encrypted data corresponding to the transaction data; forwards the proxy re-encrypted data to the data buyer through a first forwarder; generates a proxy re-encryption function based on a preset private key, the public key of the data buyer, and a proxy re-encryption algorithm; sends the proxy re-encryption function to the data buyer through a second forwarder, and the data buyer decrypts the proxy re-encrypted data based on the proxy re-encryption function, and obtains the transaction data according to the decryption result. Since the present application forwards the proxy re-encrypted data to the data buyer through a first forwarder; sends the proxy re-encryption function to the data buyer through a second forwarder, and the data buyer decrypts the proxy re-encrypted data based on the proxy re-encryption function, and obtains the transaction data according to the decryption result. Compared with the existing method in which data providers and data buyers conduct proxy transactions based solely on third parties, the above method of the present application can prevent third parties from leaking transaction data and improve the efficiency of data transactions. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0038] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0039] Figure 1 A flowchart of the first embodiment of the data transaction method of this application;

[0040] Figure 2 A flowchart of the second embodiment of the data transaction method of this application is provided;

[0041] Figure 3 This is a schematic diagram of the module structure of the data transaction device according to an embodiment of the present application;

[0042] Figure 4 This is a schematic diagram of the device structure of the hardware operating environment involved in the data transaction method in the embodiment of the present application.

[0043] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0044] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0045] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0046] The main solution of the embodiment of the present application is: when the transaction data meets the purchase requirements of the data buyer, determine the proxy re-encrypted data corresponding to the transaction data; forward the proxy re-encrypted data to the data buyer through the first forwarder; generate a proxy re-encryption function according to the preset private key, the public key of the data buyer and the proxy re-encryption algorithm; send the proxy re-encryption function to the data buyer through the second forwarder, the data buyer decrypts the proxy re-encrypted data based on the proxy re-encryption function, and obtains the transaction data according to the decryption result. Since the present application forwards the proxy re-encrypted data to the data buyer through the first forwarder; sends the proxy re-encryption function to the data buyer through the second forwarder, the data buyer decrypts the proxy re-encrypted data based on the proxy re-encryption function, and obtains the transaction data according to the decryption result. Compared with the existing method in which the data provider and the data buyer conduct proxy transactions based on a third party, the above method of the present application can avoid the leakage of transaction data by a third party and improve the efficiency of data transactions.

[0047] It should be noted that the execution subject of this embodiment may be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a data transaction device, etc. The following takes a data transaction device as an example to illustrate this embodiment and the following embodiments.

[0048] Based on this, the present application embodiment provides a data transaction method, referring to Figure 1 , Figure 1 A flowchart of the first embodiment of the data transaction method of this application is provided.

[0049] In this embodiment, the data transaction method includes the following steps:

[0050] Step S10, when the transaction data meets the purchase requirements of the data buyer, determining the proxy re-encrypted data corresponding to the transaction data;

[0051] It should be noted that the transaction data may be data with a certain value that can be used for transactions. The transaction data in this embodiment is provided by the data provider. The data provider may publish metadata of the transaction data, which includes the price of the data, product description information I, hash value H, product data structure information B, etc. The data buyer selects the data product to be purchased based on the metadata of the transaction data, and then initiates a data purchase request. The data purchase request may include: purchase money, purchase requirement description R, DUID, and the encrypted public key PK of the data buyer DU.u And other information, and the id of this transaction will be generated: TID. Among them, DUID is the ID of the data buyer DU. The data provider determines whether the transaction data meets the needs of the data buyer based on the data purchase request. If it does, the proxy re-encrypted data corresponding to the transaction data is determined. Specifically, the determination of the proxy re-encrypted data corresponding to the transaction data may include symmetrically encrypting the transaction data M with the key S to obtain the ciphertext M' and the key S. The ciphertext M' is uploaded to the distributed storage server based on IPFS. Then the ciphertext M' is uploaded to the distributed storage server based on IPFS through the public key PK of the data provider DP. p The key S is symmetrically encrypted to obtain the proxy re-encrypted data.

[0052] Furthermore, in order to improve the security of data transactions, the step of determining the proxy re-encrypted data corresponding to the transaction data includes:

[0053] The transaction data is encrypted by using a preset key to obtain ciphertext data;

[0054] Uploading the ciphertext data to a data storage server, and obtaining a hash value fed back by the data storage server based on the ciphertext data;

[0055] Applying for a random verification code from the data storage server according to the hash value and the purchaser information of the data purchaser;

[0056] The random verification code and the preset key are encrypted to obtain proxy re-encrypted data.

[0057] It should be noted that the preset key may be the key S used by the data provider DP. The data storage server may be a distributed storage server based on IPFS. The data storage server generates a hash value H corresponding to the ciphertext M' based on the ciphertext M', and sends the hash value H to the data provider DP. The hash value H is generated based on the ciphertext M'. Once the ciphertext M' changes, the hash value H will definitely change. At this time, the data provider DP needs to update the hash value corresponding to the ciphertext M', so every data change will be monitored. If the data provider DP tampers with the data privately but does not update the corresponding hash value, then according to the content addressing characteristics of IPFS, it will not be possible to obtain the tampered data based on the old hash value, and the data will be immediately discovered to have been tampered with.

[0058] It should be noted that the application for a random verification code from the data storage server based on the hash value and the purchaser information of the data purchaser can be that when the transaction data meets the purchase requirements of the data purchaser, the data provider DP uses DUID, the transaction id: TID and the hash value H to apply for a random verification code from the data storage server. The data storage server generates a random verification code C based on DUID and TID, adds the random verification code C to the permission list corresponding to the hash value H, and returns the random verification code C to the data provider DP. The encryption of the random verification code and the preset key to obtain the proxy re-encrypted data can be performed using the public key PK of the data provider DP. p The random verification code and the preset key are encrypted. The subsequent data purchaser uses the verification code C and the hash value H to apply for the ciphertext M' from the data storage server. The data storage server first retrieves the permission list corresponding to the hash value H. If the verification code C exists, it is determined to have passed the verification and returns the ciphertext M' corresponding to the hash value H.

[0059] Furthermore, in order to improve the security of data, the step of encrypting the random verification code and the preset key to obtain the proxy re-encrypted data includes:

[0060] Performing data division on the random verification code to obtain a first data segment;

[0061] Dividing the preset key into a preset number of second data segments;

[0062] The first data fragment and the second data fragment are encrypted by using a preset public key to obtain proxy re-encrypted data.

[0063] It should be noted that the data division of the random verification code to obtain the first data segment may be to divide the random verification code into a preset number of data segments, such as six data segments, to obtain the first data segment. At the same time, the preset key is divided into a preset number of second data segments. The first data segment and the second data segment are encrypted by a preset public key to obtain the proxy re-encrypted data, which may be obtained by encrypting the public key PK of the data provider DP. p Asymmetrically encrypt each data segment in the first data segment and the second data segment to obtain proxy re-encrypted data. When asymmetrically encrypting each data segment in the first data segment and the second data segment, a TID may be added to each data segment.

[0064] Step S20, forwarding the proxy re-encrypted data to the data buyer through the first forwarding party;

[0065] It should be noted that the first forwarding party may be a node in the blockchain.

[0066] Step S30, generating a proxy re-encryption function according to a preset private key, a public key of the data buyer, and a proxy re-encryption algorithm;

[0067] It should be noted that the preset private key may be the private key SK of the data provider DP. p The proxy re-encryption algorithm may adopt an existing proxy re-encryption algorithm, and this embodiment does not impose any specific limitation.

[0068] Step S40: sending the proxy re-encryption function to the data buyer through the second forwarding party; the data buyer decrypts the proxy re-encrypted data based on the proxy re-encryption function, and obtains the transaction data according to the decryption result.

[0069] It should be noted that the second forwarder may be a node in the blockchain that is different from the first forwarder. The data buyer decrypts the proxy re-encrypted data based on the proxy re-encryption function, and obtains the transaction data based on the decryption result. The data buyer DU uses its own private key SK u The decryption agent re-encrypts the data to obtain the key S, then obtains the encrypted transaction data from the distributed storage server according to the hash value, and then decrypts the encrypted transaction data using the key S to obtain the plaintext transaction data.

[0070] Furthermore, in order to avoid data leakage, before step S40, the method further includes: obtaining false user information, and generating a false proxy re-encryption function according to the false user information;

[0071] The step of sending the proxy re-encryption function to the data buyer through the second forwarding party includes:

[0072] Sending the proxy re-encryption function to the data buyer through a second forwarding party;

[0073] The false proxy re-encryption function is sent to the false user corresponding to the false proxy re-encryption function through the second forwarding party.

[0074] It should be noted that the fake user information may include the public key FPK of the fake user. i .

[0075] The generating of the fake proxy re-encryption function according to the fake user information may be based on the public key FPK of the fake user. i , the data provider's private key SK p And the proxy re-encryption algorithm generates a fake proxy re-encryption function FFi.

[0076] In the specific implementation, the present embodiment includes the following roles: data provider DP, data buyer DU, fake user FDU, agent, forwarder, determiner, and auditor. Among them, the fake user FDU, agent, forwarder, determiner, and auditor are all nodes in the blockchain.

[0077] 1. The data provider DP uses the key S to symmetrically encrypt the transaction data M and obtain the key S and ciphertext M'. The ciphertext M' is uploaded to the distributed storage server based on IPFS.

[0078] 2. Based on the ciphertext M', the storage server generates a hash value H corresponding to the ciphertext M', and sends the hash value H to the data provider DP. The hash value H is generated based on the ciphertext M'. Once the ciphertext M' changes, the hash value H will definitely change. At this time, the data provider DP needs to update the hash value corresponding to the ciphertext M', so it will monitor every data change. If the data provider DP tampered with the data privately but did not update the corresponding hash value, according to the content addressing characteristics of IPFS, it will not be able to obtain the tampered data based on the old hash value, and it will be immediately discovered that the data has been tampered.

[0079] 3. The data provider DP uploads the metadata D of the transaction data to the blockchain through a smart contract. The metadata D includes the price of the data, product description information I, hash value H, product data structure information B, etc.

[0080] 4. The data buyer DU selects the data product to be purchased, initiates a purchase application through the smart contract, and provides the purchase amount, purchase requirement description R, DUID, and the encrypted public key PK of the data buyer DU u , and the id of this transaction will be generated: TID. Among them, DUID is the ID of the data buyer DU.

[0081] 5. The data provider DP receives the purchase application reminder and determines whether the product applied for purchase meets the requirements according to the purchase requirements of the data buyer DU. If not, the application is rejected and the transaction is terminated. If it meets the requirements, the application is approved and the DUID, TID and hash value H are used to apply for a random verification code from the storage server. For example, the data provider DP sends a verification code request to the storage server, which carries the DUID, TID and hash value H.

[0082] 6. The storage server generates a random verification code C based on DUID and TID, adds the random verification code C to the permission list corresponding to the hash value H, and returns the random verification code C to the data provider DP.

[0083] 7. The data provider DP divides the key S into 6 fragments (for example, the number of fragments can be customized), adds TID to each of the 6 fragments, and obtains key fragments S1, ..., S6. For S1, ..., S6, the public key PK of the data provider DP is used respectively. p Perform asymmetric encryption to obtain key fragment ciphertext S1′, ..., S6′. Perform the same fragmentation and encryption on the random verification code C pair to obtain verification code fragment ciphertext C1′, ..., C6′. At the same time, extract several built-in false users to obtain false user ID: FID, and generate several false data FS according to FID i , fake metadata FD. Use the public key PK of the data provider DP p FS for false data i Perform asymmetric encryption to obtain false data ciphertext FS i ′, the key fragment ciphertext S1′, ..., S6′ and the corresponding metadata D and data buyer DUID, the verification code fragment ciphertext C1′, ..., C6′ and the corresponding metadata D and data buyer DUID, the false data ciphertext FS i ′ and the corresponding false metadata FD and false user FID are sent to any forwarding party, for example, to the first forwarding party.

[0084] The detailed description of the key S slice is as follows:

[0085] Choose any two random numbers a1 and a2 and construct a polynomial:

[0086] f(x)=a0+a1x+a2x 2

[0087] Where f(0)=a0=S.

[0088] Using the above polynomial, we calculate f(1), ..., f(6) respectively and get (i, f(i)). After adding TID respectively, we get the above 6 segments S1, ..., S6.

[0089] 8. The first forwarding party forwards the key fragment ciphertext S1′, ..., S6′, the verification code fragment ciphertext C1′, ..., C6′ and the false data ciphertext FS i 'Randomly send to any agent, after receiving the data, the agent generates a temporary id and sends it back to the first forwarder, and the first forwarder transmits the temporary id of the agent to the data provider DP.

[0090] 9. Data provider DP uses its own private key SK p , the public key PK provided by the data buyer DU u, and the proxy re-encryption algorithm, generate a proxy re-encryption function F. F and the corresponding proxy temporary id are randomly sent to any second forwarder that is different from the first forwarder. This makes it impossible for the same forwarder to simultaneously possess the proxy re-encryption function and the corresponding data to be re-encrypted by the proxy, reducing the risk of collusion between the forwarder and the data purchaser DU.

[0091] And, according to the public key FPK of the built-in fake user extracted from the system in step 7 i , your own private key SK p And the proxy re-encryption algorithm generates a false proxy re-encryption function FFi. FFi and the corresponding proxy temporary id are randomly sent to any second forwarding party different from the first forwarding party.

[0092] 10. The second forwarder sends the proxy re-encryption function F and the fake proxy re-encryption function FFi ​​to the corresponding proxy in step 8 according to the temporary id of the proxy. The proxy uses F and FFi to perform proxy re-encryption on the corresponding ciphertext in step 8 to obtain S1″, ..., S6″, C1″, ..., C6″, FS i ″, sent to the first forwarder, which triggers the smart contract to calculate and record the hash value of the proxy re-encryption result. The corresponding hash values ​​SH1, ..., SH6 are calculated by S1″, ..., S6″, and the corresponding hash values ​​CH1, ..., CH6 are calculated by C1″, ..., C6″, FS i Calculate the corresponding hash value FSH i .

[0093] Among them, although the first forwarding party knows the data buyer DUID, it cannot obtain the proxy re-encryption function, that is, it cannot obtain all the key information, so it cannot collude with the data buyer DU to obtain the private key SK of the data provider DP p Due to the interference of fake users, the first forwarding party cannot know whether the corresponding data buyer is a fake user. Once a violation occurs, the probability of being discovered increases significantly, thus reducing the risk of collusion between the first forwarding party and the data buyer DU.

[0094] 11. The first forwarder sends S1″, ..., S6″, C1″, ..., C6″ and metadata D to the data buyer DU according to the data buyer's DUID, and sends FS i ″ and the fake metadata FD are sent to the corresponding fake user according to the fake user FID. Among them, the first forwarding party cannot distinguish whether it is the real data purchaser DU or the fake user according to DUID and FID, and only does the forwarding work.

[0095] 12. Fake users use built-in private key FSK i FS i″ is decrypted to obtain the false data FS generated according to the false user FID in step 7 i , analyze FS i Is there a correct FID in the data? If yes, it means it is normal data; if not, it is malicious data. At this time, calculate FS i ″, and the hash value FSH recorded in step 10 i A consistency comparison is performed. If they are consistent, it means that the proxy party did not perform proxy re-encryption in good faith, triggering a penalty mechanism for the relevant proxy party; if they are inconsistent, it means that the first forwarding party did not forward in good faith, triggering a penalty mechanism for the relevant first forwarding party.

[0096] 13. Data buyer DU uses private key SK u Decrypt S1″, ..., S6″ respectively to obtain S1, ..., S6, and check whether there is a correct TID in S1, ..., S6. If so, remove the TID and combine them to obtain the key S; if not, it is malicious data, and the smart contract is triggered at this time, and the hash value corresponding to S1″, ..., S6″ is calculated and compared with SH1, ..., SH6 recorded in step 10 for consistency. If they are consistent, it means that the agent did not perform the agent re-encryption in good faith, triggering the penalty mechanism for the relevant agent; if they are inconsistent, it means that the first forwarder did not forward in good faith, triggering the penalty mechanism for the relevant first forwarder. Use the same method to process the verification code slice to obtain the verification code C.

[0097] The detailed description of the key S obtained by combining is as follows:

[0098] The data buyer DU only needs to obtain any three key fragments, which are set as (x i ,y i ), and reconstructed using the Lagrange interpolation formula. The reconstruction formula is as follows:

[0099]

[0100] Where t=3, the calculation formula of f(x) can be derived based on any three key fragments, and S can be calculated based on S=f(0).

[0101] In addition, the design of using TID for verification is to prevent the extra workload caused by malicious data. The data buyer DU only needs any three key fragments to combine the key S. If T ID is not used for verification, the data buyer DU cannot determine which of the received key fragments is valid data, and can only conduct combination experiments one by one to try to obtain the key S, wasting a lot of computing resources.

[0102] 14. Use the verification code C and hash value H to apply for the ciphertext M' from the storage server. The storage server first retrieves the permission list corresponding to the hash value H. If the verification code C exists, it is determined to have passed the verification and returns the ciphertext M' corresponding to the hash value H.

[0103] 15. The data buyer DU uses S to decrypt M′ and obtains the transaction data M.

[0104] This embodiment designs multiple forwarders, multiple agents, and sliced ​​transmissions. After slicing the transmission data, the TID of this transaction is added, and multiple false transmission data are automatically generated and randomly assigned to any forwarder, which is then randomly forwarded by the forwarder to the agent for encryption. After multiple random and false data disturbances, not only the risk of collusion between the agent and the data buyer is greatly reduced, but also malicious agents can be detected. At the same time, a random verification code will be generated based on the unique DUID of the data buyer and the TID of this transaction, and the request for data permission from the storage server will be intercepted through the verification code, which not only realizes the dual protection of data security, but also realizes the revocation of the data buyer's permission and the tracking of verification code leaks.

[0105] When the transaction data meets the purchase requirements of the data buyer, this embodiment determines the proxy re-encrypted data corresponding to the transaction data; forwards the proxy re-encrypted data to the data buyer through the first forwarder; generates a proxy re-encryption function based on a preset private key, the public key of the data buyer, and the proxy re-encryption algorithm; sends the proxy re-encryption function to the data buyer through the second forwarder, and the data buyer decrypts the proxy re-encrypted data based on the proxy re-encryption function, and obtains the transaction data according to the decryption result. Since this embodiment forwards the proxy re-encrypted data to the data buyer through the first forwarder; sends the proxy re-encryption function to the data buyer through the second forwarder, the data buyer decrypts the proxy re-encrypted data based on the proxy re-encryption function, and obtains the transaction data according to the decryption result. Compared with the existing method in which the data provider and the data buyer conduct proxy transactions based on a third party, the above method of this embodiment can prevent the third party from leaking transaction data and improve the efficiency of data transactions.

[0106] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 2 , Figure 2 This is a flow chart of the second embodiment of the data transaction method of this application. After step S30, the following steps are also included:

[0107] Step S40: receiving a determination file, and determining a determination result according to the determination file and the transaction data;

[0108] It should be understood that there is a lack of a safe and effective complaint mechanism in existing data transaction methods. Usually, only the transaction completion is focused on, not the transaction violation. In order to meet the data security requirements of the data provider, the transaction data is usually encrypted and stored by the data provider, and then the description of the transaction data is published. In some existing methods, data verification is only performed through a simple hash value comparison, which only considers data tampering and does not consider the problem of false data stored by the data provider. Therefore, there is a lack of corresponding violation handling mechanism, and the rights and interests of the data buyer cannot be protected.

[0109] It should be noted that the data purchaser DU can determine whether the transaction data M meets the purchase requirements provided previously, and if so, complete the transaction. If not, the complaint mechanism can be triggered. Specifically:

[0110] 16. The data purchaser DU determines whether the transaction data M meets the purchase requirements provided previously. If so, the transaction is completed. If not, the complaint mechanism is triggered and the process continues to step 17.

[0111] 17. The forwarding party collects the purchase requirement description R provided by the data purchaser DU in step 4 and the product description information I and product data structure information B corresponding to the transaction data M uploaded by the data provider DP in step 3, screens the judges in the corresponding fields, randomly selects several judges from them, and sends a judgment application.

[0112] 18. The judgement party determines whether it is capable of making a judgment based on the information provided by the forwarding party. If it is capable, it accepts the task and generates a judgment program P based on the information provided. The judgment program P will output a clear judgment result based on the input transaction data M. There are only two results: 1 and 0, which correspond to the transaction data M meeting or not meeting the purchase requirements. After the judgment program P is developed, it will be randomly sent to any auditor. At the same time, it will trigger the generation and sending program of the false malicious judgment program FP, generate a false malicious judgment program FP and send it to the auditor. Among them, the false malicious judgment program FP is used to interfere with the auditor and detect whether the auditor is conducting an honest audit.

[0113] 19. The auditor performs a malicious detection on the source code of the judgment program P. After passing the detection, an executable file is generated and sent to the data provider DP and the data buyer DU. At the same time, a fake executable file forgery program will be triggered, and the data provider DP and the data buyer DU will receive the same fake executable files at the same time. That is, the judgment file includes the executable file corresponding to the real judgment program and the fake executable file.

[0114] The fake executable file has a certain output result, which is used to interfere with the data provider DP and the data buyer DU, and detect whether the data provider DP and the data buyer DU cheat.

[0115] The source code of the judgment program received by the auditor may contain the source code of the false malicious judgment program FP. The auditor cannot know whether the program being tested is a false program. If the result of the false malicious judgment program FP tested by the auditor is passed, it means that the auditor has not conducted the audit in good faith and will be punished. This method can reduce the risk of cheating by the auditor.

[0116] Step S50: Upload the determination result to the blockchain for data transaction default determination.

[0117] In the specific implementation, 20. The data provider DP and the data buyer DU execute each executable file respectively, input the transaction data M, output the judgment result, and generate a result set with all the results. At this time, the result judgment smart contract is triggered, and the result sets of both parties are compared first. If the results are inconsistent, it means that one party is cheating. The corresponding execution results of the false executable files in the result sets of the data provider DP and the data buyer DU are compared with the correct results. If they are inconsistent, the inconsistent party is judged to be cheating, and the cheating party is judged as the violating party this time and bears all the expenses of this judgment.

[0118] If the result sets of both parties are consistent, the judgment result set is considered to be credible. After removing the false data in the result set, the result that accounts for the majority of the remaining results is the final result. If the final result is that the transaction data M does not meet the purchase requirements, the data provider DP is judged to be in violation, the transaction fails, the purchase money is returned, and the data provider DP bears all the expenses of this judgment. If the final result is that the transaction data M meets the purchase requirements, the data buyer is judged to have maliciously complained about the theft of data, the transaction is successful, and the data buyer DU bears all the expenses of this judgment.

[0119] In the above steps 7, 8, 9, and 10, multiple forwarding parties are designed to forward the proxy re-encryption task to any proxy party. After multiple random forwardings, the proxy party is completely unable to know who the data comes from and to whom it is sent, which can reduce the risk of collusion between the proxy party and the data buyer DU.

[0120] At the same time, the design forwards the slices of the key S and the proxy re-encryption function F through different first forwarders and second forwarders respectively, so that the same forwarder cannot possess the slices of the key S and the proxy re-encryption function F at the same time, reducing the collusion risk between the forwarder and the data buyer DU.

[0121] The fake ciphertext FS described in steps 7 and 12 i' design makes it impossible for the agent to know whether the data it re-encrypts is real or fake. Once the agent generates malicious data and sends it to a fake user, the penalty mechanism will be triggered immediately. However, if the agent encrypts in good faith, even if it is fake data, it will still receive a reward. This method can motivate the agent to encrypt in good faith and reduce the risk of sending malicious data. At the same time, the design of fake users can also reduce the risk of collusion between the agent and the data buyer DU.

[0122] In step 7, the key S is sliced ​​and added to TID before transmission. In step 13, the data buyer DU will first perform TID judgment after decryption. Since the agent cannot obtain TID, when the agent sends malicious data, the malicious data cannot pass the TID verification. Therefore, this method can identify malicious data.

[0123] Steps 5 and 6 are designed to generate a random verification code based on the unique DUID of the data buyer and the TID of this transaction. The generated verification code will be added to the permission list corresponding to the hash value H, and in step 14, when the data provider DU applies for ciphertext, the verification code will be verified. Only after passing the verification code verification can the ciphertext be obtained. This design can further ensure data security. Only when the data buyer has both the verification code C and the key S can the data be decrypted.

[0124] At the same time, the key S and verification code C are forwarded by different forwarders, and different agents perform proxy re-encryption. The same agent or forwarder cannot obtain the verification code slice even if they have the key slice, which greatly reduces the risk of collusion.

[0125] The above design can also track the leakage of verification codes. Once the verification code is leaked, the verification code can be analyzed to obtain the corresponding DUID and accurately locate the leaker. In addition, based on this design, user permissions can be revoked. When the data buyer DU violates the rules or other events that require the prohibition of data buyer permissions occur, the data provider DP can remove the corresponding verification code from the permission list to achieve the effect of revoking permissions.

[0126] In steps 18 and 19, designing multiple judges and multiple reviewers to conduct the complaint judgment process can prevent centralization and improve the credibility of the judgment results. The purpose of adding the review link is to prevent the judge from generating malicious judgment programs.

[0127] In step 20, in order to ensure the absolute security of the data, the execution process of the executable file is performed locally by the user. In order to prevent the data provider DP from cheating, the data buyer DU is also designed to participate in the result set calculation. Once the result sets of both parties are different, one party is considered to have cheated. In order to prevent the data buyer DU from cheating, the interference of false executable files is added. Both parties cannot know whether the executable files are true or false. Once cheating, it is easy to be judged. Once it is judged to be cheating, the cheater is directly judged as the violator of this time and bears all the judgment costs of this time.

[0128] When the final violator is determined, the violator will bear all the expenses of this determination. For the data provider DP, the risk of violation is too high and the cost is too high, which can greatly reduce the probability of violation of the data provider DP. For the data buyer DU, the cost of malicious complaints is too high, which can greatly reduce the probability of violation of the data buyer DU.

[0129] This embodiment designs a violation complaint mechanism. When the data purchaser determines that the data provider provides false data, the complaint mechanism can be triggered. The complaint process is completed by the forwarding party, multiple determiners and multiple auditors. The forwarding party is responsible for randomly assigning the judgment task to the determiner. The determiner provides the judgment program and hands it over to the auditor. After the auditor passes the inspection, an executable file is generated and sent to the data purchaser and the data provider. Each executable file is executed by both parties to generate a result set, triggering the smart contract to automatically judge. When the result sets of both parties are the same, the result set is judged to be valid, otherwise one party is judged to have cheated and violated the rules. When the result set is valid, the result that accounts for the majority of the result set is the final result, and the final violator will bear all the expenses of this judgment. The above process will also add false data interference to prevent collusion and cheating.

[0130] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the data transaction method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0131] This application also provides a data transaction device, please refer to Figure 3 , the data transaction device comprises:

[0132] A determination module 10, for determining the proxy re-encrypted data corresponding to the transaction data when the transaction data meets the purchase requirements of the data buyer;

[0133] The proxy re-encrypted data forwarding module 20 is used to forward the proxy re-encrypted data to the data purchaser through the first forwarding party;

[0134] A proxy re-encryption function generation module 30, for generating a proxy re-encryption function according to a preset private key, a public key of the data purchaser and a proxy re-encryption algorithm;

[0135] The proxy re-encryption function forwarding module 40 is used to send the proxy re-encryption function to the data buyer through a second forwarding party. The data buyer decrypts the proxy re-encrypted data based on the proxy re-encryption function and obtains the transaction data according to the decryption result.

[0136] When the transaction data meets the purchase requirements of the data buyer, this embodiment determines the proxy re-encrypted data corresponding to the transaction data; forwards the proxy re-encrypted data to the data buyer through the first forwarder; generates a proxy re-encryption function based on a preset private key, the public key of the data buyer, and the proxy re-encryption algorithm; sends the proxy re-encryption function to the data buyer through the second forwarder, and the data buyer decrypts the proxy re-encrypted data based on the proxy re-encryption function, and obtains the transaction data according to the decryption result. Since this embodiment forwards the proxy re-encrypted data to the data buyer through the first forwarder; sends the proxy re-encryption function to the data buyer through the second forwarder, the data buyer decrypts the proxy re-encrypted data based on the proxy re-encryption function, and obtains the transaction data according to the decryption result. Compared with the existing method in which the data provider and the data buyer conduct proxy transactions based on a third party, the above method of this embodiment can prevent the third party from leaking transaction data and improve the efficiency of data transactions.

[0137] The data transaction device provided by the present application adopts the data transaction method in the above embodiment, which can solve the technical problems that the existing data transaction has the risk of data leakage and the data transaction efficiency is low. Compared with the prior art, the beneficial effects of the data transaction device provided by the present application are the same as the beneficial effects of the data transaction method provided by the above embodiment, and the other technical features in the data transaction device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0138] The present application provides a data transaction device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the data transaction method in the above-mentioned embodiment 1.

[0139] Reference below Figure 4, which shows a schematic diagram of the structure of a data transaction device suitable for implementing the embodiment of the present application. The data transaction device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The data transaction device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0140] like Figure 4 As shown, the data transaction device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. Various programs and data required for the operation of the data transaction device are also stored in the RAM 1004. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems may be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 may allow the data transaction device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a data transaction device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have instead.

[0141] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0142] The data transaction device provided by the present application adopts the data transaction method in the above embodiment, which can solve the technical problems that the existing data transaction has the risk of data leakage and the data transaction efficiency is low. Compared with the prior art, the beneficial effects of the data transaction device provided by the present application are the same as the beneficial effects of the data transaction method provided by the above embodiment, and the other technical features in the data transaction device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0143] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0144] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0145] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, wherein the computer-readable program instructions are used to execute the data transaction method in the above-mentioned embodiment.

[0146] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0147] The computer-readable storage medium may be included in the data transaction device; or may exist independently without being assembled into the data transaction device.

[0148] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0149] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0150] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0151] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned data transaction method, and can solve the technical problems that the existing data transaction has the risk of data leakage and the data transaction efficiency is low. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the data transaction method provided by the above-mentioned embodiment, and will not be repeated here.

[0152] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned data transaction method when executed by a processor.

[0153] The computer program product provided by the present application can solve the technical problems of data leakage risk and low data transaction efficiency in existing data transactions. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the data transaction method provided by the above embodiment, which will not be elaborated here.

[0154] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A data transaction method, characterized in that: Applied to a data provider, the data transaction method comprises the following steps: When the transaction data meets the purchase requirements of the data buyer, determine the proxy re-encrypted data corresponding to the transaction data; forwarding the proxy re-encrypted data to the data buyer through the first forwarding party; Generate a proxy re-encryption function according to a preset private key, a public key of the data buyer, and a proxy re-encryption algorithm; The proxy re-encryption function is sent to the data buyer through a second forwarding party. The data buyer decrypts the proxy re-encrypted data based on the proxy re-encryption function and obtains the transaction data according to the decryption result.

2. The data transaction method according to claim 1, characterized in that: The step of determining the proxy re-encrypted data corresponding to the transaction data comprises: The transaction data is encrypted by using a preset key to obtain ciphertext data; Uploading the ciphertext data to a data storage server, and obtaining a hash value fed back by the data storage server based on the ciphertext data; Applying for a random verification code from the data storage server according to the hash value and the purchaser information of the data purchaser; The random verification code and the preset key are encrypted to obtain proxy re-encrypted data.

3. The data transaction method according to claim 2, characterized in that: The step of encrypting the random verification code and the preset key to obtain proxy re-encrypted data includes: Performing data division on the random verification code to obtain a first data segment; Dividing the preset key into a preset number of second data segments; The first data fragment and the second data fragment are encrypted by using a preset public key to obtain proxy re-encrypted data.

4. The data transaction method according to claim 1, characterized in that: Before the step of sending the proxy re-encryption function to the data buyer via the second forwarding party, the step further includes: Acquire false user information, and generate a false proxy re-encryption function according to the false user information; The step of sending the proxy re-encryption function to the data buyer through the second forwarding party includes: Sending the proxy re-encryption function to the data buyer through a second forwarding party; The false proxy re-encryption function is sent to the false user corresponding to the false proxy re-encryption function through the second forwarding party.

5. The data transaction method according to any one of claims 1 to 4, characterized in that: After the step of sending the proxy re-encryption function to the data buyer through the second forwarding party, the method further includes: receiving a determination file, and determining a determination result according to the determination file and the transaction data; The determination result is uploaded to the blockchain for data transaction default determination.

6. The data transaction method according to claim 5, characterized in that: The determination file includes an executable file corresponding to the real determination program and a false executable file.

7. A data transaction device, characterized in that: The data transaction device comprises: A determination module, used to determine the proxy re-encrypted data corresponding to the transaction data when the transaction data meets the purchase requirements of the data buyer; A proxy re-encrypted data forwarding module, used for forwarding the proxy re-encrypted data to the data purchaser through a first forwarding party; A proxy re-encryption function generation module, used to generate a proxy re-encryption function according to a preset private key, a public key of the data buyer and a proxy re-encryption algorithm; A proxy re-encryption function forwarding module is used to send the proxy re-encryption function to the data buyer through a second forwarding party. The data buyer decrypts the proxy re-encrypted data based on the proxy re-encryption function and obtains the transaction data according to the decryption result.

8. A data transaction device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the data transaction method according to any one of claims 1 to 6.

9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the data transaction method according to any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the data transaction method according to any one of claims 1 to 6 are implemented.