A data processing method and related device based on blockchain

Through blockchain-based data processing methods and the use of identity authentication and encryption and decryption technologies, the efficiency and security issues in government data sharing are solved, and the security and efficiency of the data sharing process are achieved.

CN116418546BActive Publication Date: 2025-10-03TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210009382.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-05
Publication Date
2025-10-03
Estimated Expiration
2042-01-05

AI Technical Summary

Technical Problem

In the process of government data sharing, as the scale of data increases, data management becomes inconvenient, resulting in a decrease in data sharing efficiency and security, and problems such as data acquisition delay or loss.

Method used

A blockchain-based data processing method is adopted, in which a data reading request is sent to the blockchain through the first terminal, including the identity identification of the second terminal, data fingerprint and signature of the first terminal, for identity authentication, and the data is decrypted by the encrypted public key, thereby improving the security and efficiency of the data sharing process.

Benefits of technology

By verifying and recording each step through blockchain, the security of the data sharing process is guaranteed, the efficiency and security of data sharing are improved, and the reliability and traceability of data transmission are ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116418546B_ABST
    Figure CN116418546B_ABST
Patent Text Reader

Abstract

This application discloses a blockchain-based data processing method and related devices. A data read request is sent to the blockchain via a first terminal; the first terminal then receives the blockchain record result sent, and sends the record result, the first terminal's corresponding identity, and an encryption public key to a second terminal; the first terminal further receives the encrypted data sent by the second terminal; the first terminal then decrypts the encrypted data based on the encryption public key to obtain the target data, and sends a data response to the blockchain. This enables a blockchain-based data sharing process. Since each step in the data sharing process is verified and recorded via the blockchain, the security of the data sharing process is guaranteed, and data is directly transmitted between data parties, improving the efficiency and security of data sharing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a blockchain-based data processing method and related devices. Background Art

[0002] With the rapid development of Internet technology, people have higher and higher requirements for data sharing. Especially in the process of government data management, a large amount of data is often generated, and how to share data between departments has become a difficult problem.

[0003] Typically, municipal government departments collect, exchange, store, clean, integrate, share, and open up data through a centralized, unified urban big data sharing platform, providing unified government services to all government departments and society. Relying on e-government networks and shared exchange platforms, each government department maintains, updates, and shares government data on the centralized, unified government big data platform, ultimately achieving government data sharing.

[0004] However, as data accumulates in the government big data platform, the data scale will become larger and larger, making it inconvenient to manage the data. In addition, data acquisition delays or data loss may occur during the data sharing process, affecting the efficiency and security of data sharing. Summary of the Invention

[0005] In view of this, the present application provides a blockchain-based data processing method that can effectively improve the efficiency and security of data sharing.

[0006] In a first aspect, the present application provides a blockchain-based data processing method, which can be applied to a system or program in a terminal device that includes a blockchain-based data processing function, specifically comprising:

[0007] The first terminal sends a data read request to the blockchain, where the data read request includes an identity identifier corresponding to the second terminal, a data fingerprint, and a first signature corresponding to the first terminal, where the first signature is used to instruct the blockchain to authenticate the first terminal to generate a chain record result;

[0008] The first terminal receives the chain-recording result sent by the blockchain, and sends the chain-recording result, the identity identifier corresponding to the first terminal, and the encryption public key to the second terminal. The chain-recording result is used to instruct the second terminal to initiate a query request to the blockchain and record the second signature corresponding to the second terminal. The result of the query request is used to instruct the second terminal to send encrypted data corresponding to the data fingerprint to the first terminal, where the encrypted data is encrypted using the encryption public key.

[0009] The first terminal receives the encrypted data sent by the second terminal;

[0010] The first terminal decrypts the encrypted data based on the encryption public key to obtain target data, and sends a data response to the blockchain, where the data response is used to indicate that the blockchain records the association relationship between the first terminal and the target data.

[0011] Optionally, in some possible implementations of the present application, before the first terminal sends a data read request to the blockchain, the method further includes:

[0012] The first terminal generates an encryption key pair and a signature key pair, wherein the encryption key includes the encryption public key and the signature key pair is used to manage the encryption and decryption process of the first signature;

[0013] The first terminal generates identity registration information based on the encryption key pair and the signature key pair;

[0014] The first terminal sends the identity registration information to the blockchain, so that the blockchain generates a blockchain certificate for the first terminal and records it.

[0015] Optionally, in some possible implementations of the present application, the method further includes:

[0016] The first terminal generates a data fingerprint corresponding to the data to be processed;

[0017] The first terminal generates a data release instruction based on the data fingerprint corresponding to the data to be processed;

[0018] The first terminal sends the data publishing instruction to the blockchain, so that the blockchain verifies the first signature and records the data to be processed on the chain.

[0019] Optionally, in some possible implementations of the present application, before the first terminal sends a data read request to the blockchain, the method further includes:

[0020] The first terminal sends a data sharing request and the first signature to the blockchain, so that the blockchain authenticates the first terminal based on the first signature, wherein the data collaboration request includes a data sharing object set and shared data, and the data sharing object set is used to instruct the blockchain to determine a sharing scope of the shared data;

[0021] The first terminal receives the request result fed back by the blockchain.

[0022] Optionally, in some possible implementations of the present application, the method further includes:

[0023] The first terminal determines an update object in response to the sharing update instruction;

[0024] The first terminal sends the update object and the first signature to the blockchain, so that the blockchain updates the shared object set based on the update object;

[0025] The first terminal receives an update response fed back by the blockchain.

[0026] Optionally, in some possible implementations of the present application, the method further includes:

[0027] The first terminal sends a target identifier to the blockchain, where the target identifier is used to instruct the blockchain to perform a data request broadcast in the data nodes recorded in the blockchain based on the target identifier, and the data request broadcast is used to instruct the data nodes that receive the data request broadcast to feedback associated data associated with the target identifier;

[0028] The first terminal receives the associated data fed back by the data node in the blockchain.

[0029] Optionally, in some possible implementations of the present application, the blockchain is a consortium chain, the first terminal and the second terminal are nodes in the consortium chain, and the nodes in the consortium chain are used for government services.

[0030] A second aspect of the present application provides a blockchain-based data processing device, comprising:

[0031] a sending unit, configured to send a data reading request to the blockchain, the data reading request including an identity identifier corresponding to the second terminal, a data fingerprint, and a first signature corresponding to the first terminal, the first signature being used to instruct the blockchain to authenticate the first terminal to generate a chain entry result;

[0032] a receiving unit, configured to receive the chain-recording result sent by the blockchain, and send the chain-recording result, an identity identifier corresponding to the first terminal, and an encryption public key to the second terminal, wherein the chain-recording result is used to instruct the second terminal to initiate a query request to the blockchain and record a second signature corresponding to the second terminal, and the result of the query request is used to instruct the second terminal to send encrypted data corresponding to the data fingerprint to the first terminal, wherein the encrypted data is encrypted using the encryption public key;

[0033] The sending unit is further configured to receive the encrypted data sent by the second terminal;

[0034] The processing unit is used to decrypt the encrypted data based on the encryption public key to obtain target data, and send a data response to the blockchain, where the data response is used to indicate that the blockchain records the association relationship between the first terminal and the target data.

[0035] Optionally, in some possible implementations of the present application, the processing unit is specifically configured to generate an encryption key pair and a signature key pair, the encryption key including the encryption public key, and the signature key pair being used to manage the encryption and decryption processes of the first signature;

[0036] The processing unit is specifically configured to generate identity registration information based on the encryption key pair and the signature key pair;

[0037] The processing unit is specifically used to send the identity registration information to the blockchain, so that the blockchain generates a blockchain certificate and records it.

[0038] Optionally, in some possible implementations of the present application, the processing unit is specifically configured to generate a data fingerprint corresponding to the data to be processed;

[0039] The processing unit is specifically configured to generate a data release instruction based on a data fingerprint corresponding to the data to be processed;

[0040] The processing unit is specifically configured to send the data publishing instruction to the blockchain, so that the blockchain verifies the first signature and records the data to be processed on the blockchain.

[0041] Optionally, in some possible implementations of the present application, the processing unit is specifically configured to send a data sharing request and the first signature to the blockchain, so that the blockchain performs authentication based on the first signature, wherein the data collaboration request includes a data sharing object set and shared data, and the data sharing object set is used to instruct the blockchain to determine a sharing scope of the shared data;

[0042] The processing unit is specifically configured to receive a request result fed back by the blockchain.

[0043] Optionally, in some possible implementations of the present application, the processing unit is specifically configured to determine an update object in response to a shared update instruction;

[0044] The processing unit is specifically configured to send the update object and the first signature to the blockchain, so that the blockchain updates the shared object set based on the update object;

[0045] The processing unit is specifically configured to receive an update response fed back by the blockchain.

[0046] Optionally, in some possible implementations of the present application, the processing unit is specifically configured to send a target identifier to the blockchain, where the target identifier is used to instruct the blockchain to perform a data request broadcast in the data nodes recorded in the blockchain based on the target identifier, and the data request broadcast is used to instruct the data nodes that receive the data request broadcast to feedback associated data associated with the target identifier;

[0047] The processing unit is specifically configured to receive the associated data fed back by the data node in the blockchain.

[0048] In a third aspect, the present application provides a computer device comprising: a memory, a processor, and a bus system; the memory is used to store program code; and the processor is used to execute the blockchain-based data processing method described in the first aspect or any one of the first aspects according to instructions in the program code.

[0049] In a fourth aspect, the present application provides a computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium. When the computer-readable storage medium is run on a computer, the computer executes the blockchain-based data processing method described in the first aspect or any one of the first aspects.

[0050] According to one aspect of the present application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the blockchain-based data processing method provided in the first aspect or various optional implementations of the first aspect.

[0051] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0052] A data read request is sent to the blockchain via a first terminal. The data read request includes the identity identifier corresponding to the second terminal, the data fingerprint, and the first signature corresponding to the first terminal. The first signature is used to instruct the blockchain to authenticate the first terminal to generate a chain record result. The first terminal then receives the chain record result sent by the blockchain and sends the chain record result, the identity identifier corresponding to the first terminal, and the encryption public key to the second terminal. The chain record result is used to instruct the second terminal to initiate a query request to the blockchain and record the second signature corresponding to the second terminal. The result of the query request is used to instruct the second terminal to send encrypted data corresponding to the data fingerprint to the first terminal. The encrypted data is encrypted using the encryption public key. The first terminal further receives the encrypted data sent by the second terminal. The first terminal then decrypts the encrypted data based on the encryption public key to obtain the target data and sends a data response to the blockchain. The data response is used to instruct the blockchain to record the association relationship between the first terminal and the target data. This implements a data sharing process based on the blockchain. Since each step in the data sharing process is verified and recorded by the blockchain, the security of the data sharing process is guaranteed. Moreover, data is directly transmitted between each data party, improving the efficiency and security of data sharing. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without any creative work.

[0054] Figure 1 A diagram of the network architecture that runs a blockchain-based data processing system;

[0055] Figure 2 A flowchart of a blockchain-based data processing process provided in an embodiment of the present application;

[0056] Figure 3 A flowchart of a blockchain-based data processing method provided in an embodiment of the present application;

[0057] Figure 4 A schematic diagram of a scenario of a blockchain-based data processing method provided in an embodiment of the present application;

[0058] Figure 5 A flowchart of another blockchain-based data processing method provided in an embodiment of the present application;

[0059] Figure 6 A flowchart of another blockchain-based data processing method provided in an embodiment of the present application;

[0060] Figure 7 A schematic diagram of another blockchain-based data processing method provided in an embodiment of the present application;

[0061] Figure 8 A flowchart of another blockchain-based data processing method provided in an embodiment of the present application;

[0062] Figure 9 A schematic diagram of another blockchain-based data processing method provided in an embodiment of the present application;

[0063] Figure 10 A schematic diagram of another blockchain-based data processing method provided in an embodiment of the present application;

[0064] Figure 11 A flowchart of another blockchain-based data processing method provided in an embodiment of the present application;

[0065] Figure 12 A flowchart of another blockchain-based data processing method provided in an embodiment of the present application;

[0066] Figure 13 A schematic diagram of the structure of a blockchain-based data processing device provided in an embodiment of the present application;

[0067] Figure 14 A schematic diagram of the structure of a server provided in an embodiment of the present application;

[0068] Figure 15A A data sharing system provided in an embodiment of the present application;

[0069] Figure 15B A block composition of a blockchain provided in an embodiment of the present application;

[0070] Figure 15C This is input information of a blockchain node provided in an embodiment of the present application. DETAILED DESCRIPTION

[0071] An embodiment of the present application provides a blockchain-based data processing method and related devices, which can be applied to a system or program in a terminal device that includes a blockchain-based data processing function. A data reading request is sent to the blockchain through a first terminal. The data reading request includes an identity identifier corresponding to the second terminal, a data fingerprint, and a first signature corresponding to the first terminal. The first signature is used to instruct the blockchain to authenticate the first terminal to generate a chain record result; then the first terminal receives the chain record result sent by the blockchain, and sends the chain record result, the identity identifier corresponding to the first terminal, and the encryption public key to the second terminal. The chain record result is used to instruct the second terminal to initiate a request query to the blockchain and record the second signature corresponding to the second terminal. The result of the request query is used to instruct the second terminal to send encrypted data corresponding to the data fingerprint to the first terminal, and the encrypted data is encrypted by the encryption public key; further, the first terminal receives the encrypted data sent by the second terminal; and then the first terminal decrypts the encrypted data based on the encryption public key to obtain the target data, and sends a data response to the blockchain. The data response is used to instruct the blockchain to record the association relationship between the first terminal and the target data. This enables a blockchain-based data sharing process. Since each step in the data sharing process will be verified and recorded through the blockchain, the security of the data sharing process is guaranteed, and data is directly transmitted between each data party, which improves the efficiency and security of data sharing.

[0072] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the numbers used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can, for example, be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "corresponding to" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0073] First, some terms that may appear in the embodiments of this application are explained.

[0074] Blockchain: Blockchain is a new application model for computer technologies, integrating distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, a blockchain is a decentralized database, a series of data blocks generated using cryptography. Each block is linked using a random hash (also known as a hash algorithm), with each subsequent block containing the hash value of the previous one. Blockchain technology has a wide range of applications in digital assets, smart contracts, logistics search, and product protection.

[0075] Consortium chains are designed for members of a specific group and a limited number of third parties. Multiple pre-selected nodes are designated as bookkeepers. Blockchain generation is determined by all pre-selected nodes. Other connected nodes can participate in transactions but are not subject to the bookkeeping process. Third parties can conduct limited queries through the blockchain's open API. To achieve optimal performance, consortium chains have certain requirements for the configuration and network environment of consensus or verification nodes. This access mechanism can improve transaction performance and avoid issues caused by uneven participation.

[0076] Blockchain data collaboration: Based on blockchain technology, it realizes cross-domain real-time sharing of government data and tamper-proof recording of administrative information. At the same time, it supports full-process security management and data traceability of data sharing, uses smart contracts to achieve multi-level access permission management, and provides a blockchain-based data sharing protection system for the government data sharing platform, realizing data sharing rights and responsibilities and controllable flow.

[0077] It should be understood that the blockchain-based data processing method provided in this application can be applied to a system or program containing a blockchain-based data processing function in a terminal device, such as a government service. Specifically, the blockchain-based data processing system can be run on Figure 1 In the network architecture shown in Figure 1 As shown in FIG, it is a network architecture diagram of the data processing system based on blockchain. As can be seen from the figure, the data processing system based on blockchain can provide a data processing process based on blockchain with multiple information sources, that is, through the trigger operation on the terminal side, multiple interactive videos sent by the server are switched to achieve the association of multiple interactive videos; it can be understood that Figure 1 A variety of terminal devices are shown in FIG. 4 . The terminal devices may be computer devices. In actual scenarios, more or fewer types of terminal devices may participate in the blockchain-based data processing process. The specific number and type depend on the actual scenario and are not limited here. In addition, Figure 1 One server is shown in the figure, but in actual scenarios, multiple servers may also be involved, especially in scenarios of multi-model training interaction. The specific number of servers depends on the actual scenario.

[0078] In this embodiment, the server can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal can be a smartphone, tablet computer, laptop computer, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. The terminal and server can be connected directly or indirectly via wired or wireless communication, and the terminal and server can be connected to form a blockchain network, which is not limited in this application.

[0079] It can be understood that the above-mentioned blockchain-based data processing system can run on personal mobile terminals, for example: as an application such as government services, it can also run on a server, and it can also run on a third-party device to provide blockchain-based data processing to obtain blockchain-based data processing results of the information source; the specific blockchain-based data processing system can be run in the above-mentioned device in the form of a program, or it can be run as a system component in the above-mentioned device, or it can be used as a cloud service program. The specific operation mode depends on the actual scenario and is not limited here.

[0080] With the rapid development of Internet technology, people have higher and higher requirements for data sharing. Especially in the process of government data management, a large amount of data is often generated, and how to share data between departments has become a difficult problem.

[0081] Typically, municipal government departments collect, exchange, store, clean, integrate, share, and open up data through a centralized, unified urban big data sharing platform, providing unified government services to all government departments and society. Relying on e-government networks and shared exchange platforms, each government department maintains, updates, and shares government data on the centralized, unified government big data platform, ultimately achieving government data sharing.

[0082] However, as data accumulates in the government big data platform, the data scale will become larger and larger, making it inconvenient to manage the data. In addition, data acquisition delays or data loss may occur during the data sharing process, affecting the efficiency and security of data sharing.

[0083] To address the above issues, this application proposes a blockchain-based data processing method that utilizes blockchain technology. Blockchain technology is a decentralized, open, and transparent distributed data storage technology that can reduce trust costs and enable secure and reliable data exchange. Blockchain is maintained by multiple parties, employing a variety of cryptographic techniques to ensure transmission and access security to meet the needs of different scenarios, and employing hash pointer connections to effectively prevent tampering. Blockchain reliably records, synchronizes, shares, and verifies transactions and data, facilitating the rapid establishment of interdepartmental trust in the complex business environment of e-government. It enables efficient collaboration across multiple entities across space and time within a city or even larger areas.

[0084] Furthermore, the data asset collaborative management and ownership traceability service system uses data fingerprint and blockchain technology to achieve distributed trusted consensus verification and trusted management of data asset sharing, and form an unalterable record of data asset circulation and use, providing effective support for data asset sharing, collaboration, ownership traceability services.

[0085] In addition, the data asset collaborative management and ownership confirmation and traceability service system provides three services: data asset publishing and ownership confirmation, data asset transfer and sharing management, and data asset trusted traceability query and presentation. The data exchange forms that can be connected include three types: database, file, and interface. The security suite can be used to extract data fingerprints and call back-end security services. Specifically, this application can be applied to Figure 2 The architecture shown, Figure 2 A process architecture diagram of blockchain-based data processing provided in an embodiment of this application. The technical architecture of the data asset collaborative management and control and property rights traceability service system mainly includes two parts: the service system and the security SDK suite. The service system mainly includes the blockchain service system, data correlation analysis and query, data asset evaluation statistics, system parameter configuration, national secret algorithm module, etc.

[0086] The blockchain service system is primarily divided into blockchain foundational services, consensus algorithms, and smart contract protocols. Through blockchain foundational services, each node is responsible for storing data asset collaboration records. The consensus algorithm enables multi-party consensus verification of data asset collaboration across multiple nodes. Smart contract protocols primarily implement data asset services based on the operational requirements of data asset collaboration and are deployed across different distributed nodes, providing verification of the correctness of data asset collaboration operations.

[0087] It is understandable that the method provided in this application can be written as a program to serve as a processing logic in a hardware system, or as a data processing device based on a blockchain, which implements the above processing logic in an integrated or external manner. As an implementation method, the data processing device based on a blockchain sends a data read request to the blockchain through a first terminal, and the data read request includes an identity identifier corresponding to the second terminal, a data fingerprint, and a first signature corresponding to the first terminal, and the first signature is used to instruct the blockchain to authenticate the first terminal to generate a chain record result; then the first terminal receives the chain record result sent by the blockchain, and sends the chain record result, the identity identifier corresponding to the first terminal, and the encryption public key to the second terminal, and the chain record result is used to instruct the second terminal to initiate a request query to the blockchain and record the second signature corresponding to the second terminal, and the result of the request query is used to instruct the second terminal to send encrypted data corresponding to the data fingerprint to the first terminal, and the encrypted data is encrypted by the encryption public key; further, the first terminal receives the encrypted data sent by the second terminal; and then the first terminal decrypts the encrypted data based on the encryption public key to obtain the target data, and sends a data response to the blockchain, and the data response is used to instruct the blockchain to record the association relationship between the first terminal and the target data. This enables a blockchain-based data sharing process. Since each step in the data sharing process will be verified and recorded through the blockchain, the security of the data sharing process is guaranteed, and data is directly transmitted between each data party, which improves the efficiency and security of data sharing.

[0088] In combination with the above process architecture, the following will introduce the data processing method based on blockchain in this application. Figure 3 , Figure 3 A flowchart of a blockchain-based data processing method provided in an embodiment of the present application. The management method can be executed by a terminal. The embodiment of the present application includes at least the following steps:

[0089] 301. The first terminal sends a data read request to the blockchain.

[0090] In this embodiment, the blockchain is a consortium chain, the first terminal and the second terminal are nodes in the consortium chain, and the nodes in the consortium chain are used for government services. The specific node application scenarios can also be distributed data management scenarios such as data services of multiple subsidiaries under the company structure. The data management process of government services is used as an example for explanation here.

[0091] It can be understood that the first terminal and the second terminal can be any terminal registered in the blockchain, and the specific distinction method depends on their functions, that is, the data request collaborator (first terminal) or the data owner (second terminal).

[0092] In one possible scenario, the data read request includes the identity identifier RID corresponding to the second terminal, the data fingerprint dFingerprint_data, and the first signature Sign_R_ssk(*) corresponding to the first terminal. For example, the data requesting collaborator (the first terminal) sends {getDataRequire, RID, CID, dFingerprint_data, Sign_R_ssk(*)} to the blockchain to request data reading;

[0093] Specifically, the first signature is used to instruct the blockchain to authenticate the first terminal to generate a chain record result, that is, the blockchain verification signature VerifySign(*), check whether the RID is a legal data sharing object, and record the chain read request, thereby ensuring the reliability of the first terminal.

[0094] 302. The blockchain authenticates the first terminal to generate a chain record result.

[0095] In this embodiment, identity authentication of the first terminal is used to ensure the legitimacy of the request. That is, due to the confidentiality of data in government services, only the data of the registered terminal is allowed to be used for the data sharing process in this embodiment.

[0096] Specifically, identity authentication can be terminal identification verification, that is, verifying the signature VerifySign(*) to check whether the RID is a legal data sharing object; it can also be request format verification, for example, a fixed format request form is set for the terminal in the blockchain to improve the security of data sharing.

[0097] 303. The first terminal receives the chain recording result sent by the blockchain, and sends the chain recording result, the identity identifier corresponding to the first terminal and the encrypted public key to the second terminal.

[0098] In this embodiment, the chain result is used to instruct the second terminal to initiate a query request to the blockchain and record the second signature corresponding to the second terminal. For example, the chain result is chainResult={getDataRequire, RID, CID, dFingerprint_data}.

[0099] Specifically, the query result instructs the second terminal to send encrypted data corresponding to the data fingerprint to the first terminal. The encrypted data is encrypted using the public key. That is, the data requesting collaborator (the first terminal) sends {chainResult, RID, epk} to the data contributor, requesting data access. This causes the data owner (the second terminal) to query the chainResult on the blockchain. The blockchain then returns a chain value {0, 1} to the data owner, effectively recording the data on the blockchain.

[0100] 304. The second terminal initiates a query request to the blockchain based on the chain recording result and records the second signature corresponding to the second terminal.

[0101] In this embodiment, the second terminal initiates a request query to the blockchain based on the chain recording result, that is, to verify the validity of the data request of the first terminal. On the one hand, the validity of the request can be verified; on the other hand, due to the frequent data requests in the government system, the request query can also verify whether the current data sharing is the data of the specified sequence in the approved sequence, that is, there are multiple groups of shared data queues between the first terminal and the second terminal, and the request query is used to verify whether the serial numbers in the data queues match.

[0102] Furthermore, after verifying the requested query, the blockchain will record the query record of the second terminal, thereby ensuring the integrity of the data verification process.

[0103] 305. The second terminal sends encrypted data corresponding to the data fingerprint to the first terminal.

[0104] In this embodiment, the extraction of encrypted data through data fingerprint is a secondary encryption process, that is, on the one hand, the data is encrypted by the consensus encryption algorithm to obtain encrypted data, and on the other hand, the encrypted data is fingerprinted to achieve the effect of blurring the data form.

[0105] It is understandable that the above encryption process can also be to first perform fingerprint processing and then encrypt using the consensus encryption algorithm. The specific method depends on the actual scenario.

[0106] 306. The first terminal receives the encrypted data sent by the second terminal.

[0107] In this embodiment, before the second terminal sends the encrypted data, it calculates C=Enc_R_epk(data), that is, encrypts the data, and then sends C to the first terminal.

[0108] Specifically, the second terminal will also send {getDataRequire, dFingerprint_data, RID, Sign_C_ssk(*)} to the blockchain, requesting it to be uploaded to the chain to ensure the traceability of the data.

[0109] 307. The first terminal decrypts the encrypted data based on the encryption public key to obtain the target data, and sends a data response to the blockchain.

[0110] In this embodiment, the decryption process of the first terminal, ie, the data requesting collaborator calculates data=Dec_R_esk(C) to obtain the shared data data (target data).

[0111] Furthermore, the first terminal will send {Response, dFingerprint_data, Sign_R_ssk(*)} to the blockchain, so that the blockchain verifies the signature VerifySign(*) and records the chain. Then the blockchain returns the chain recording result {0,1} to the first terminal to ensure the traceability of the data.

[0112] 308. The blockchain records the association between the first terminal and the target data.

[0113] In this embodiment, the blockchain will record the shared data in response to the data response sent by the first terminal. On the one hand, it is a closed-loop operation of the sharing process, and on the other hand, it is recorded on the chain. When other terminals require the target data, the blockchain can respond to the request and provide joint feedback from the first terminal and the second terminal, thereby improving the convenience of data sharing.

[0114] Combine Figure 2 The architecture shown, the data processing method included in this application is mainly carried out through data collaborative sharing protocols, such as Figure 4 As shown,

[0115] Figure 4 A scenario diagram of a blockchain-based data processing method provided in an embodiment of the present application; that is, the design of a blockchain-based data collaborative sharing protocol mainly includes five parts: object registration smart contract protocol, data release smart contract protocol, data collaboration smart contract protocol, data collaboration update smart contract protocol, and data reception and reading smart contract protocol.

[0116] It can be understood that the object in this embodiment can be a user, a terminal or an indicative identifier. For example, the object registration can be a user registration. The specific object form depends on the actual scenario.

[0117] Specifically, the object registration smart contract protocol is mainly used for identity compliance authentication of data owners and data collaborators.

[0118] The data publishing smart contract protocol is mainly used to generate data fingerprints, ownership information and some feature information of shared collaborative data.

[0119] The data collaboration smart contract protocol is mainly used to generate request instructions for data collaboration.

[0120] The data collaboration update smart contract protocol is mainly used to generate updated data collaboration request instructions.

[0121] The data receiving and reading smart contract protocol mainly describes the complete data collaboration request, data collaboration response, and data compliance verification involved in the process.

[0122] The following is the above agreement Figure 2 The execution process in the shown architecture is explained.

[0123] For the data sharing process, see Figure 5 , Figure 5 A flowchart of another blockchain-based data processing method provided in an embodiment of the present application; wherein the data requesting collaborator is the first terminal, and the data owner is the second terminal. The figure shows the following steps:

[0124] 501. The data requester sends a data request.

[0125] In this embodiment, the data request may include the identity of the data requester, the requested data, the signature of the data requester, and the identity of the data owner. The signature is the legal certificate registered by the data requester when registering on the chain.

[0126] Specifically, the data requesting collaborator can send {getDataRequire, RID, CID, dFingerprint_data, Sign_R_ssk(*)} to the blockchain to request data reading.

[0127] The following describes the fields that appear in this embodiment. Specifically, RID represents the identity of the data requesting collaborator. CID represents the identity of the data owner. getDataRequire represents the data acquisition request identifier. dFingerprint_data represents the data fingerprint of data data. Sign_R_ssk(*) represents the signature of the data requesting collaborator. epk represents the encryption public key of the data requesting collaborator. enc_*_* represents encryption. dec_*_* represents decryption. Sign_C_ssk(*) represents the signature of the data owner. chainResult represents the chain result.

[0128] 502. The blockchain verifies the legitimacy of the data request and records it on the chain.

[0129] In this embodiment, verifying the legitimacy of the data request can be identity authentication, that is, verifying whether the data requester is a registered object; verifying the legitimacy of the data request can also be data verification, such as verifying whether the requested data is legal or non-shared data; verifying the legitimacy of the data request can also be signature verification, that is, whether the data requester is itself. Specifically, the verification process can be one or more combinations of the above methods.

[0130] In one possible scenario, the blockchain verifies the signature VerifySign(*), checks whether the RID is a legitimate data sharing object, and records the chain read request.

[0131] 503. The blockchain sends the on-chain result to the data requester.

[0132] In this embodiment, the on-chain result may include the identity of the requester, the requested data, the signature of the data requester, and the verification result of the identity of the data owner.

[0133] Specifically, if the verification fails, the verification result may also include the reason for failure, so that the data requester can conduct self-identity check, such as incomplete on-chain registration, etc., thereby improving the executability of the data sharing process.

[0134] In a possible scenario, the chain result may be chainResult={getDataRequire, RID, CID, dFingerprint_data}.

[0135] 504. The data requester sends a data request to the data owner.

[0136] In this embodiment, after the data requester has authenticated its identity through the blockchain, it can send a data request to the data owner, which may specifically include the data requester's on-chain results, identity identification, and encrypted public key.

[0137] It can be understood that in this embodiment, the on-chain results between different steps can be shared, that is, the data requester needs to verify the on-chain results of the data owner before proceeding to subsequent steps, and the data owner needs to verify the on-chain results of the data requester before proceeding to subsequent steps, thereby ensuring the security of the data.

[0138] In one possible scenario, the data requester can send {chainResult, RID, epk} to the data contributor to request data reading.

[0139] 505. The data owner queries the blockchain based on the data request.

[0140] In this embodiment, the data owner requests the blockchain to query the chainResult, that is, the data owner determines whether the data request has been verified on the blockchain to prevent the terminal with a forged request from obtaining data.

[0141] 506. The blockchain returns the query results.

[0142] In this embodiment, the query result indicates whether the data request has been verified on the blockchain. Specifically, it can be a numerical representation, a text representation, or other meaningful identifier. For example, the blockchain returns a chain value {0, 1} to the data owner.

[0143] 507. The data owner sends a data packet to the data requester.

[0144] In this embodiment, the data sent by the data owner are all data packets encrypted by the shared key, for example, C=Enc_R_epk(data) is calculated and C is sent to the reader, thereby avoiding data leakage caused by interception of data in the middle.

[0145] 508. Data owners share information on the chain.

[0146] In this embodiment, after the data owner sends a data packet to the data requester, it can record it on the blockchain, that is, share the on-chain information, thereby ensuring the traceability of the data, and other terminals can obtain the data from the data requester.

[0147] Specifically, the data owner can send {getDataRequire, dFingerprint_data, RID, Sign_C_ssk(*)} to the blockchain to request to be uploaded to the blockchain.

[0148] 509. Blockchain records are uploaded to the chain.

[0149] In this embodiment, the blockchain can also verify the signature of the data owner during the process of recording on the chain. That is, before the blockchain executes the task in this embodiment, the authority can verify the requester's signature. That is, verify VerifySign(*) and then upload it to the chain.

[0150] 510. The blockchain returns the on-chain result.

[0151] In this embodiment, the blockchain returns the chain record result {0,1}.

[0152] 511. The data requester decrypts the data packet.

[0153] In this embodiment, the process of decrypting the data packet by the data requester is based on the decryption algorithm shared in the blockchain, that is, the data requesting collaborator calculates data = Dec_R_esk(C) to obtain the shared data data, thereby ensuring the security of the data.

[0154] 512. The data requester sends a data response to the blockchain.

[0155] In this embodiment, from the perspective of data sharing, the data requester has already obtained the target data; however, in order to achieve data traceability, in this embodiment, the data requester can also perform a blockchain recording process after obtaining the target data.

[0156] Specifically, the data requesting collaborator sends {Response, dFingerprint_data, Sign_R_ssk(*)} to the blockchain.

[0157] 513. Blockchain records are uploaded to the chain.

[0158] In this embodiment, the blockchain verifies the signature VerifySign(*) and records the chain.

[0159] 514. The blockchain returns the on-chain result.

[0160] In this embodiment, the blockchain returns the chain record result {0,1} to the reader.

[0161] Based on the above embodiment, in a possible scenario, the data sharing process can be performed based on the following operation steps.

[0162] Step 1: The data requesting collaborator sends {getDataRequire, RID, CID, dFingerprint_data, Sign_R_ssk(*)} to the blockchain to request data reading.

[0163] Step 2: The blockchain verifies the signature VerifySign(*), checks whether the RID is a legal data sharing object, and records the chain read request.

[0164] Step 3: Return the chain result chainResult = {getDataRequire, RID, CID, dFingerprint_data}.

[0165] Step 4: The data requester sends {chainResult, RID, epk} to the data contributor to request data reading.

[0166] Step 5: The data owner's blockchain requests to query chainResult.

[0167] Step 6: The blockchain returns the chain value {0,1} to the contributor.

[0168] Step 7: The data owner calculates C = Enc_R_epk(data) and sends C to the reader.

[0169] Step 8: The data owner sends {getDataRequire, dFingerprint_data, RID, Sign_C_ssk(*)} to the blockchain, requesting to upload the data to the blockchain.

[0170] Step 9: Blockchain verifies VerifySign(*) and uploads it to the blockchain.

[0171] Step 10: The blockchain returns the chain record result {0,1}.

[0172] Step 11: The data requesting collaborator calculates data = Dec_R_esk(C) and obtains the shared data data.

[0173] Step 12: The data requesting collaborator sends {Response, dFingerprint_data, Sign_R_ssk(*)} to the blockchain.

[0174] Step 13: The blockchain verifies the signature VerifySign(*) and records the chain.

[0175] Step 14: The blockchain returns the chain record result {0,1} to the reader.

[0176] In one possible scenario, the first terminal needs to register on the blockchain before it can carry out the data collaborative sharing process, that is, the first terminal first generates an encryption key pair and a signature key pair, the encryption key includes an encryption public key, and the signature key pair is used to manage the encryption and decryption process of the first signature; then the first terminal generates identity registration information based on the encryption key pair and the signature key pair; and then the first terminal sends the identity registration information to the blockchain, so that the blockchain generates a blockchain certificate for the first terminal and records it.

[0177] Specifically, the registration process is as follows Figure 6 As shown, Figure 6 A flowchart of another blockchain-based data processing method provided in an embodiment of the present application; the figure shows the following steps:

[0178] 601. The candidate terminal generates an encryption key pair.

[0179] In this embodiment, the encryption key pair is the data encryption and decryption rules specified when the candidate terminal registers. The rules can be shared in the blockchain, set for the candidate terminal, or shared by multiple terminals. For example, the judicial system in the government system shares a set of encryption key pairs, and the financial system shares a set of encryption key pairs, thereby realizing the secondary block process, such as object generation encryption key pairs (esk, epk) and signature key pairs (ssk, spk).

[0180] The fields in this embodiment are described below: ID represents the object identity; (esk, epk) represents the encryption key pair; (ssk, spk) represents the signature key pair; EnrollRequire represents the identity registration request identifier; email, organization, and position represent the object identity attributes, including email, unit, and position; RF (RF1, RF2) represents Redundant field, which represents other attribute information of the object.

[0181] 602. The candidate terminal sends identity registration information to the blockchain.

[0182] In this embodiment, the identity registration information may include a registration request, a registered identity, encryption and decryption keys, contact information, and other redundant fields that the candidate terminal can select to indicate other attribute information of the object, such as a common key, that is, a backup key when the encryption key pair is lost.

[0183] Specifically, the object can send {EnrollRequire, ID, epk, spk, email, orgnization, position, RF1, RF2, Sign(*)} to the blockchain to request identity registration.

[0184] 603. The blockchain associates the public key and records it on the chain.

[0185] In this embodiment, the blockchain-associated public key records the key and identity of the candidate terminal, and can verify the object signature VerifySign(*), associate the binding object public key, generate a blockchain certificate for the object, and record the chain.

[0186] Furthermore, the blockchain can issue certificates to candidate terminals to facilitate convenient identity authentication processes for candidate terminals in subsequent operations.

[0187] In addition, for the release process of data assets, such as Figure 7 As shown, Figure 7 This diagram illustrates another blockchain-based data processing method for an embodiment of the present application. When a data asset is published by a resource provider, the security SDK extracts the asset's data fingerprint and logs it, along with information such as the release time and publisher, into the blockchain service system, generating an unalterable record. After the data asset is published, the asset's data fingerprint can be used to retrieve the initial release record at any time, thereby achieving ownership confirmation.

[0188] Specifically, during the release of data assets, the first terminal first generates a data fingerprint corresponding to the data to be processed; then the first terminal generates a data release instruction based on the data fingerprint corresponding to the data to be processed; and then the first terminal sends the data release instruction to the blockchain, so that the blockchain verifies the first signature and records the data to be processed on the chain.

[0189] In one possible scenario, the data asset publishing process is as follows: Figure 8 As shown, Figure 8 A flowchart of another blockchain-based data processing method provided in an embodiment of the present application; the figure shows the following steps:

[0190] 801. The candidate terminal generates data to be published.

[0191] In this embodiment, the data to be published may be published in the form of a data fingerprint, that is, identification data obtained by processing the data, such as dFingerprint_data of the object generated data.

[0192] 802. The candidate terminal sends a data publishing request to the blockchain.

[0193] In this embodiment, the data release request may include the identification of the candidate terminal and the data fingerprint; in addition, since the use areas of data in the government system are different, the data areas can also be divided during the release process, such as the financial area, the judicial area, etc., so as to improve the operability of the data.

[0194] In one possible scenario, the object (candidate terminal) can send {putRequire, dFingerprint_data, dDomain, dSensitivity, RF1, RF2, Sign(*)} to the blockchain to request data release.

[0195] 803. The blockchain verifies the data to be published and records it on the chain.

[0196] In this embodiment, the blockchain verifies the object signature VerifySign(*), checks the data fingerprint dFingerprint_data, and records the chain.

[0197] 804. The blockchain returns the on-chain results.

[0198] The blockchain returns the chain record result {0,1} asynchronously to the object.

[0199] Specifically, in this embodiment, the fields are defined as follows: dFingerprint_data represents the data fingerprint; putRequire represents the data release request identifier; dDomain represents the domain to which the data belongs; dSensitivity represents the data sensitivity; RF represents a redundant field and other data attributes; and Sign(*) represents the object signature.

[0200] In addition, data can be managed after it is released. That is, data sharing distributed consensus management, the specific architecture is as follows Figure 9As shown, it is a scenario diagram of another blockchain-based data processing method provided by an embodiment of the present application; that is, in the data sharing process, after requests such as publishing data, formulating sharing strategies, and reading data are sent to the blockchain service system, each node distributed in the blockchain network will carry out multi-party verification according to the consensus algorithm: for data release, each node conducts consensus verification on the recording method and location, and records the data fingerprint after reaching a consensus; for sharing strategies, each node verifies according to the strategy format, compliance, etc., and confirms after reaching a consensus; for requests to read data, each node verifies the reading conditions according to the sharing strategy and authorizes after reaching a consensus.

[0201] In addition, the operation flow in the data control process can be traced. For details, please refer to Figure 10 The architecture shown, Figure 10 A scenario diagram of another blockchain-based data processing method provided for an embodiment of the present application; that is, relying on global data rights confirmation and tamper-proof records of shared exchanges, it can ensure that shared data has relatively complete circulation and use evidence throughout its life cycle, and then obtain information such as the user, user object, data usage method, data usage time, and data usage scope during the entire data usage process, thereby realizing traceability of data asset circulation.

[0202] Specifically, for the data sharing (control) process, a data sharing request and a first signature can be sent to the blockchain through the first terminal, so that the blockchain can authenticate the first terminal based on the first signature. The data collaboration request includes a data sharing object set and shared data. The data sharing object set is used to instruct the blockchain to determine the sharing scope of the shared data; then the first terminal receives the request result fed back by the blockchain. In a possible scenario, such as Figure 11 As shown, Figure 11 A flowchart of another blockchain-based data processing method provided in an embodiment of the present application; the object is a government terminal in the blockchain, and the figure shows the following steps:

[0203] 1101. A candidate terminal requests data sharing.

[0204] In this embodiment, the process of the candidate terminal requesting data sharing requires the candidate terminal to initiate an application to the blockchain. Specifically, it may be when the candidate terminal receives a request from another terminal but the candidate terminal has not published data on the chain.

[0205] Specifically, the object (candidate terminal) can send {shareRequire, shareObjects{}, dFingerprint_data, Sign(*)} to the blockchain to request data sharing.

[0206] 1102. Blockchain verifies objects and data and records them on the chain.

[0207] In this embodiment, verifying the legitimacy of the data request can be identity authentication, that is, verifying whether the data requester is a constituent object; verifying the legitimacy of the data request can also be data verification, such as verifying whether the requested data is legal or non-shared data; verifying the legitimacy of the data request can also be signature verification, that is, whether the data requester is itself. Specifically, the verification process can be one or more combinations of the above methods.

[0208] In one possible scenario, the blockchain verifies the object signature VerifySign(*) and the data fingerprint dFingerprint_data and records them on the chain.

[0209] 1103. The blockchain returns the chain recording result to the candidate terminal.

[0210] In this embodiment, the blockchain returns the chain record result {0, 1} to the object, where 1 indicates that the chain record is successful and 0 indicates that the chain record fails, so that the candidate terminal can perform subsequent sharing operations. The specific identification type depends on the actual scenario and is not limited here.

[0211] Specifically, in this embodiment, the fields are defined as follows: shareRequire: data collaborative sharing request identifier; shareObjects{}: data sharing object set; dFingerprint_data: data fingerprint of data.

[0212] In addition, data sharing objects can also be updated in real time. Specifically, the first terminal determines the update object in response to the shared update instruction; then the first terminal sends the update object and the first signature to the blockchain, so that the blockchain updates the shared object set based on the update object; further, the first terminal receives the update response fed back by the blockchain. The specific process is as follows: Figure 12 As shown, Figure 12 A flowchart of another blockchain-based data processing method provided in an embodiment of the present application; the figure shows the following steps:

[0213] 1201. A candidate terminal requests to update shared data.

[0214] In this embodiment, the object sends {updateShareRequire, dFingerprint_data, shareObjects{}, Sign(*)} to the blockchain to request update data sharing.

[0215] 1202. The blockchain verifies the identity of the candidate terminal and records the chain.

[0216] In this embodiment, verifying the legitimacy of the data request can be identity authentication, that is, verifying whether the data requester is a component object; verifying the legitimacy of the data request can also be updated shared data verification, such as verifying whether the requested data is legal or non-shared data; verifying the legitimacy of the data request can also be signature verification, that is, whether the data requester is itself. Specifically, the verification process can be one or more combinations of the above methods.

[0217] In one possible scenario, the blockchain verifies the object signature VerifySign(*), checks dFingerprint_data, and records the chain.

[0218] 1203. The blockchain returns the chain recording result.

[0219] In this embodiment, the blockchain returns a chain record result {0, 1} to the object. 1 indicates successful chain record, and 0 indicates failed chain record, so that the candidate terminal can perform subsequent sharing operations. The specific identification type depends on the actual scenario and is not limited here.

[0220] Specifically, in this embodiment, the fields are defined as follows: updateShareRequire: data collaborative sharing update request identifier; dFingerprint_data: data fingerprint of data; {0, 1}: chaining result.

[0221] In another possible scenario, information can also be collected, such as collecting data of a certain ID number in various government systems. First, the first terminal sends a target identifier (such as ID number, passport number, etc.) to the blockchain. The target identifier is used to instruct the blockchain to broadcast a data request in the data node recorded in the blockchain based on the target identifier. The data request broadcast is used to instruct the data node that receives the data request broadcast to feedback the associated data associated with the target identifier; then the first terminal receives the associated data fed back by the data node in the blockchain.

[0222] The above-mentioned embodiments collect data on a larger scale based on collaborative processing, mainly targeting the issue of rights and responsibilities in the process of data asset management. Data fingerprint technology is used to effectively identify data, and blockchain consensus verification technology is used to conduct multi-party consensus verification on the release and rights confirmation, shared management and control, and use traceability of data assets. Fine-grained permission control is performed on data sharing to ensure that sensitive encrypted data is not shipped out of the warehouse, reducing the collaboration costs between data providers and demanders. Through data sharing collaboration and traceability mechanisms, a good audit mechanism is established for data, and ultimately an unalterable record of the entire life cycle of data rights confirmation, collaboration, and use is formed, laying the foundation for building a safe, reliable, and prosperous data sharing ecosystem.

[0223] As can be seen from the above examples, this embodiment clearly establishes the transfer of data responsibilities. The blockchain distributed ledger notarizes and records the data submission, authorization, application, sharing, and confirmation processes, providing highly reliable data support for data traceability. This, combined with data instantiation, further enhances traceability efficiency. Furthermore, data control responsibilities are shared across multiple parties: multiple parties participate in bookkeeping, and the ledger remains immutable. Resource providers participate in the recording and confirmation of transactions, reducing trust in the platform while also sharing the platform's data control responsibilities. Specifically, a first terminal sends a data read request to the blockchain. The data read request includes the identity identifier corresponding to the second terminal, the data fingerprint, and the first signature corresponding to the first terminal. The first signature is used to instruct the blockchain to authenticate the first terminal to generate a chain record result. The first terminal then receives the chain record result sent by the blockchain and sends the chain record result, the identity identifier corresponding to the first terminal, and the encryption public key to the second terminal. The chain record result is used to instruct the second terminal to initiate a query request to the blockchain and record the second signature corresponding to the second terminal. The result of the query request is used to instruct the second terminal to send encrypted data corresponding to the data fingerprint to the first terminal. The encrypted data is encrypted using the encryption public key. The first terminal further receives the encrypted data sent by the second terminal. The first terminal then decrypts the encrypted data based on the encryption public key to obtain the target data and sends a data response to the blockchain. The data response is used to instruct the blockchain to record the association relationship between the first terminal and the target data. This realizes a data sharing process based on the blockchain. Since each step in the data sharing process will be verified and recorded by the blockchain, the security of the data sharing process is guaranteed. In addition, data is directly transmitted between each data party, improving the efficiency and security of data sharing.

[0224] In order to better implement the above solution of the embodiment of the present application, the following also provides related devices for implementing the above solution. Figure 13 , Figure 13 This is a schematic diagram of the structure of a blockchain-based data processing device provided in an embodiment of the present application. The blockchain-based data processing device 1300 includes:

[0225] A sending unit 1301 is configured to send a data read request to the blockchain, where the data read request includes an identity identifier corresponding to the second terminal, a data fingerprint, and a first signature corresponding to the first terminal, where the first signature is used to instruct the blockchain to authenticate the first terminal to generate a chain record result;

[0226] Receiving unit 1302 is configured to receive the chain-recording result sent by the blockchain, and send the chain-recording result, the identity identifier and encryption public key corresponding to the first terminal to the second terminal, wherein the chain-recording result is used to instruct the second terminal to initiate a query request to the blockchain and record the second signature corresponding to the second terminal, and the result of the query request is used to instruct the second terminal to send encrypted data corresponding to the data fingerprint to the first terminal, wherein the encrypted data is encrypted using the encryption public key;

[0227] The sending unit 1301 is further configured to receive the encrypted data sent by the second terminal;

[0228] The processing unit 1303 is used to decrypt the encrypted data based on the encryption public key to obtain target data, and send a data response to the blockchain, where the data response is used to indicate that the blockchain records the association relationship between the first terminal and the target data.

[0229] Optionally, in some possible implementations of the present application, the processing unit 1303 is specifically configured to generate an encryption key pair and a signature key pair, where the encryption key includes the encryption public key, and the signature key pair is used to manage the encryption and decryption processes of the first signature;

[0230] The processing unit 1303 is specifically configured to generate identity registration information based on the encryption key pair and the signature key pair;

[0231] The processing unit 1303 is specifically configured to send the identity registration information to the blockchain, so that the blockchain generates and records a blockchain certificate.

[0232] Optionally, in some possible implementations of the present application, the processing unit 1303 is specifically configured to generate a data fingerprint corresponding to the data to be processed;

[0233] The processing unit 1303 is specifically configured to generate a data publishing instruction based on the data fingerprint corresponding to the data to be processed;

[0234] The processing unit 1303 is specifically configured to send the data publishing instruction to the blockchain, so that the blockchain verifies the first signature and records the data to be processed on the blockchain.

[0235] Optionally, in some possible implementations of the present application, the processing unit 1303 is specifically configured to send a data sharing request and the first signature to the blockchain, so that the blockchain performs authentication based on the first signature, wherein the data collaboration request includes a data sharing object set and shared data, and the data sharing object set is used to instruct the blockchain to determine a sharing scope of the shared data;

[0236] The processing unit 1303 is specifically configured to receive the request result fed back by the blockchain.

[0237] Optionally, in some possible implementations of the present application, the processing unit 1303 is specifically configured to determine an update object in response to a shared update instruction;

[0238] The processing unit 1303 is specifically configured to send the update object and the first signature to the blockchain, so that the blockchain updates the shared object set based on the update object;

[0239] The processing unit 1303 is specifically configured to receive an update response fed back by the blockchain.

[0240] Optionally, in some possible implementations of the present application, the processing unit 1303 is specifically configured to send a target identifier to the blockchain, where the target identifier is used to instruct the blockchain to perform a data request broadcast in the data nodes recorded in the blockchain based on the target identifier, and the data request broadcast is used to instruct the data nodes that receive the data request broadcast to feedback associated data associated with the target identifier;

[0241] The processing unit 1303 is specifically configured to receive the associated data fed back by the data node in the blockchain.

[0242] A data read request is sent to the blockchain via a first terminal. The data read request includes the identity identifier corresponding to the second terminal, the data fingerprint, and the first signature corresponding to the first terminal. The first signature is used to instruct the blockchain to authenticate the first terminal to generate a chain record result. The first terminal then receives the chain record result sent by the blockchain and sends the chain record result, the identity identifier corresponding to the first terminal, and the encryption public key to the second terminal. The chain record result is used to instruct the second terminal to initiate a query request to the blockchain and record the second signature corresponding to the second terminal. The result of the query request is used to instruct the second terminal to send encrypted data corresponding to the data fingerprint to the first terminal. The encrypted data is encrypted using the encryption public key. The first terminal further receives the encrypted data sent by the second terminal. The first terminal then decrypts the encrypted data based on the encryption public key to obtain the target data and sends a data response to the blockchain. The data response is used to instruct the blockchain to record the association relationship between the first terminal and the target data. This implements a data sharing process based on the blockchain. Since each step in the data sharing process is verified and recorded by the blockchain, the security of the data sharing process is guaranteed. Moreover, data is directly transmitted between each data party, improving the efficiency and security of data sharing.

[0243] The present application also provides a server. Figure 14 , Figure 14 This is a structural diagram of a server provided in an embodiment of the present application. The server 1400 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 1422 (for example, one or more processors) and memory 1432, and one or more storage media 1430 (for example, one or more massive storage devices) for storing application programs 1442 or data 1444. Among them, the memory 1432 and the storage medium 1430 can be temporary storage or permanent storage. The program stored in the storage medium 1430 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 1422 can be configured to communicate with the storage medium 1430 to execute a series of instruction operations in the storage medium 1430 on the server 1400.

[0244] The server 1400 may also include one or more power supplies 1426, one or more wired or wireless network interfaces 1450, one or more input and output interfaces 1458, and / or one or more operating systems 1441, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0245] The steps performed by the management device in the above embodiment can be based on the Figure 14 The server structure shown.

[0246] In an embodiment of the present application, a computer-readable storage medium is further provided. The computer-readable storage medium stores a data processing instruction based on blockchain. When the computer is run on the computer, the computer executes the above-mentioned Figures 3 to 12 The steps performed by the blockchain-based data processing device in the method described in the illustrated embodiment.

[0247] The present application also provides a computer program product including blockchain-based data processing instructions, which, when executed on a computer, enables the computer to execute the aforementioned Figures 3 to 12 The steps performed by the blockchain-based data processing device in the method described in the illustrated embodiment.

[0248] The present application also provides a data processing system based on blockchain, which may include Figure 13 The blockchain-based data processing device in the described embodiment, or Figure 14 The server being described.

[0249] In one possible scenario, the network resource management method in this application is applied to a blockchain device, that is, the authoritative DNS, LDNS or terminal is a blockchain device, and the blockchain device is a node in the blockchain, which is described below with reference to the accompanying drawings; see Figure 15A The data sharing system shown, data sharing system 1500 refers to a system for sharing data between nodes, and the data sharing system may include multiple nodes 1501, and multiple nodes 1501 may refer to various clients in the data sharing system. Each node 1501 can receive input information during normal operation and maintain the shared data in the data sharing system based on the received input information. In order to ensure information intercommunication within the data sharing system, an information connection can exist between each node in the data sharing system, and information can be transmitted between nodes through the above-mentioned information connection. For example, when any node in the data sharing system receives input information, other nodes in the data sharing system obtain the input information according to the consensus algorithm, and store the input information as data in the shared data, so that the data stored on all nodes in the data sharing system are consistent.

[0250] Each node in the data sharing system has a corresponding node identifier, and each node in the data sharing system can store the node identifiers of other nodes in the data sharing system so that the generated blocks can be broadcast to other nodes in the data sharing system based on the node identifiers of other nodes. Each node can maintain a node identifier list as shown in the table below, and store the node name and node identifier in the node identifier list accordingly. The node identifier can be an IP (Internet Protocol, a protocol for interconnecting networks) address or any other information that can be used to identify the node. Table 1 only uses the IP address as an example for explanation.

[0251] Table 1 Correspondence between node names and node identifiers

[0252] Node Name Node ID Node 1 117.114.151.174 Node 2 117.116.189.145 … … Node N 119.123.789.258

[0253] Each node in the data sharing system stores the same blockchain. The blockchain consists of multiple blocks, see Figure 15BThe blockchain consists of multiple blocks. The genesis block includes a block header and a block body. The block header stores the input information feature value, version number, timestamp and difficulty value, and the block body stores the input information; the next block of the genesis block uses the genesis block as the parent block, and the next block also includes a block header and a block body. The block header stores the input information feature value of the current block, the block header feature value, version number, timestamp and difficulty value of the parent block, and so on, so that the block data stored in each block in the blockchain is associated with the block data stored in the parent block, ensuring the security of the input information in the block.

[0254] When generating each block in the blockchain, see Figure 15C When the node where the blockchain is located receives the input information, it verifies the input information. After the verification is completed, the input information is stored in the memory pool and the hash tree used to record the input information is updated. After that, the update timestamp is updated to the time when the input information is received, and different random numbers are tried. The eigenvalue calculation is performed multiple times so that the calculated eigenvalue can satisfy the following formula:

[0255] SHA256(SHA256(version+prev_hash+merkle_root+ntime+nbits+x))<TARGET, where SHA256 is the eigenvalue algorithm used to calculate the eigenvalue; version (version number) is the version information of the relevant block protocol in the blockchain; prev_hash is the block header eigenvalue of the parent block of the current block; merkle_root is the eigenvalue of the input information; ntime is the update time of the update timestamp; nbits is the current difficulty, which is a fixed value within a period of time and is determined again after exceeding the fixed time period; x is a random number; TARGET is the eigenvalue threshold, which can be determined based on nbits.

[0256] In this way, when a random number that satisfies the above formula is calculated, the information can be stored accordingly, and the block header and block body can be generated to obtain the current block. Subsequently, the blockchain node sends the newly generated block to other nodes in the data sharing system based on the node identifiers of other nodes in the data sharing system. The other nodes verify the newly generated block and, after verification, add the newly generated block to their stored blockchain.

[0257] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0258] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0259] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0260] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0261] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a blockchain-based data processing device, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program code.

[0262] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A data processing method based on blockchain, characterized in that: include: The first terminal sends a data read request to the blockchain, where the data read request includes an identity identifier corresponding to the second terminal, a data fingerprint, and a first signature corresponding to the first terminal, where the first signature is used to instruct the blockchain to authenticate the first terminal to generate a chain record result; The first terminal receives the chain-recording result sent by the blockchain, and sends the chain-recording result, the identity identifier corresponding to the first terminal, and the encryption public key to the second terminal. The chain-recording result is used to instruct the second terminal to initiate a query request to the blockchain and record the second signature corresponding to the second terminal. The result of the query request is used to instruct the second terminal to send encrypted data corresponding to the data fingerprint to the first terminal, where the encrypted data is encrypted using the encryption public key. The first terminal receives the encrypted data sent by the second terminal; The first terminal decrypts the encrypted data based on the encryption public key to obtain target data, and sends a data response to the blockchain, where the data response is used to indicate that the blockchain records the association relationship between the first terminal and the target data.

2. The method according to claim 1, characterized in that Before the first terminal sends a data reading request to the blockchain, the method further includes: The first terminal generates an encryption key pair and a signature key pair, wherein the encryption key pair includes the encryption public key and the signature key pair is used to manage the encryption and decryption process of the first signature; The first terminal generates identity registration information based on the encryption key pair and the signature key pair; The first terminal sends the identity registration information to the blockchain, so that the blockchain generates a blockchain certificate for the first terminal and records it.

3. The method according to claim 2, characterized in that The method further comprises: The first terminal generates a data fingerprint corresponding to the data to be processed; The first terminal generates a data release instruction based on the data fingerprint corresponding to the data to be processed; The first terminal sends the data publishing instruction to the blockchain, so that the blockchain verifies the first signature and records the data to be processed on the chain.

4. The method according to claim 1, wherein Before the first terminal sends a data reading request to the blockchain, the method further includes: The first terminal sends a data sharing request and the first signature to the blockchain, so that the blockchain authenticates the first terminal based on the first signature, wherein the data sharing request includes a data sharing object set and shared data, and the data sharing object set is used to instruct the blockchain to determine a sharing scope of the shared data; The first terminal receives the request result fed back by the blockchain.

5. The method according to claim 4, characterized in that The method further comprises: The first terminal determines an update object in response to the sharing update instruction; The first terminal sends the update object and the first signature to the blockchain, so that the blockchain updates the shared object set based on the update object; The first terminal receives an update response fed back by the blockchain.

6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: The first terminal sends a target identifier to the blockchain, where the target identifier is used to instruct the blockchain to perform a data request broadcast in the data nodes recorded in the blockchain based on the target identifier, and the data request broadcast is used to instruct the data nodes that receive the data request broadcast to feedback associated data associated with the target identifier; The first terminal receives the associated data fed back by the data node in the blockchain.

7. The method according to claim 1, characterized in that The blockchain is a consortium chain, the first terminal and the second terminal are nodes in the consortium chain, and the nodes in the consortium chain are used for government services.

8. A data processing device based on blockchain, characterized in that: The data processing device is applied to the first terminal, and the data processing device includes: a sending unit, configured to send a data reading request to the blockchain, the data reading request including an identity identifier corresponding to the second terminal, a data fingerprint, and a first signature corresponding to the first terminal, the first signature being used to instruct the blockchain to authenticate the first terminal to generate a chain entry result; a receiving unit, configured to receive the chain-recording result sent by the blockchain, and send the chain-recording result, an identity identifier corresponding to the first terminal, and an encryption public key to the second terminal, wherein the chain-recording result is used to instruct the second terminal to initiate a query request to the blockchain and record a second signature corresponding to the second terminal, and the result of the query request is used to instruct the second terminal to send encrypted data corresponding to the data fingerprint to the first terminal, wherein the encrypted data is encrypted using the encryption public key; The receiving unit is further configured to receive the encrypted data sent by the second terminal; A processing unit is used to decrypt the encrypted data based on the encryption public key to obtain target data, and send a data response to the blockchain, where the data response is used to indicate that the blockchain records the association relationship between the first terminal and the target data.

9. A computer device, characterized in that: The computer device includes a processor and a memory: The memory is used to store program code; the processor is used to execute the blockchain-based data processing method according to any one of claims 1 to 7 according to instructions in the program code.

10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the blockchain-based data processing method described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Blockchain-based data sharing method, device and storage medium

    CN110493220A

  • Block chain-based data sharing method and system

    CN113656365A