Data processing method, device, system and equipment and storage medium

By generating the first transaction identifier on the transaction side and sending pre-submit requests to the blockchain node, the problem of data inconsistency in the big data system is solved, and the consistency, integrity and high availability of data storage are achieved.

CN119961945APending Publication Date: 2025-05-09BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411819889.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-05-09

AI Technical Summary

Technical Problem

In big data systems, the problem of data inconsistency caused by failure in storage of some blockchain nodes, and how to effectively solve data consistency has become an urgent problem.

Method used

By responding to the first transaction request sent by the server on the transaction side, a first transaction identifier is generated, and a pre-submit request is sent to each blockchain node in the server side, the blockchain node is triggered to perform the first transaction operation and store the data to be stored in the local space. If all nodes have successful feedback, a formal submission request will be sent, a second transaction operation will be performed, and the data will be written to the data blockchain in the blockchain node.

Benefits of technology

Through the transaction processing mechanism of two-stage submission, we ensure that all blockchain nodes do not send formal submission requests before successfully storing data, thus avoiding data inconsistency caused by failure of storage of some nodes and improving the consistency, integrity and high availability of data storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119961945A_ABST
    Figure CN119961945A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to a data processing method, device and system, equipment and a storage medium. The method is applied to a transaction processing end, and comprises the following steps: in response to a first transaction request sent by a server, obtaining to-be-stored data, and generating a first transaction identifier; sending a pre-submission request to each block chain node in the server based on the first transaction identifier and the to-be-stored data; if the first transaction state information returned by each block chain node is transaction execution success, sending a formal submission request to each block chain node, so that the block chain node writes the to-be-stored data into the corresponding data block chain; and feeding back the second transaction state information to the server based on the first transaction identifier. Therefore, the consistency, the integrity and the high availability of the data stored in each node in the system are better ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a data processing method, device, system, equipment and storage medium. Background Art

[0002] As various industries (such as the financial industry, medical industry, media industry, etc.) continue to rely more and more on big data technology, data integrity, availability and consistency have become the focus of attention for various industries.

[0003] At present, the multi-copy mechanism is mainly used to store and manage data in big data systems in various industries. Taking the use of blockchain mechanism to store data as an example, after the data of a certain blockchain node is uploaded to the chain, after the majority of blockchain nodes in the system pass the verification, all blockchain nodes are controlled to execute the storage of the uploaded data. However, there is a possibility that some blockchain nodes will fail to store in this process, which will lead to data inconsistency in the big data system.

[0004] Therefore, how to effectively solve the data consistency in big data systems has become an urgent problem to be solved. Summary of the invention

[0005] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a data processing method, apparatus, system, device and storage medium.

[0006] A first aspect of an embodiment of the present disclosure provides a data processing method, which is applied to a transaction processing end. The method includes:

[0007] In response to the first transaction request sent by the server, obtaining data to be stored and generating a first transaction identifier;

[0008] Based on the first transaction identifier and the data to be stored, a pre-submission request is sent to each blockchain node in the server; the pre-submission request is used to trigger the blockchain node to perform the first transaction operation, so as to store the data to be stored in the local space of the blockchain node, and feedback the first transaction status information to the transaction processing end;

[0009] If all the first transaction status information indicates that the transaction is successfully executed, a formal submission request is sent to each blockchain node based on the first transaction identifier; the formal submission request is used to trigger the blockchain node to execute the second transaction operation to write the data to be stored in the local space into the data blockchain in the blockchain node;

[0010] Based on the first transaction identifier, second transaction status information is fed back to the server; the second transaction status information indicates that the data is stored successfully.

[0011] In some embodiments, after sending a pre-submission request to each blockchain node in the server based on the first transaction identifier and the data to be stored, the data processing method further includes:

[0012] If any of the first transaction status information indicates that the transaction execution failed, an abort request is sent to each blockchain node based on the first transaction identifier; the abort request is used to trigger the blockchain node to perform a rollback operation based on the rollback information to cancel the data to be stored in the local space; the rollback information is generated during the process of the blockchain node executing the first transaction operation, and the rollback information is used to record the status information of the blockchain node before executing the first transaction operation;

[0013] Based on the first transaction identifier, third transaction status information is fed back to the server; the third transaction status information indicates that data storage has failed.

[0014] In some embodiments, if the data to be stored is encrypted data, the data processing method further includes:

[0015] In response to the second transaction request sent by the server, obtaining query conditions and permission verification information;

[0016] Based on the query conditions, a data query request is sent to at least one blockchain node; the data query request is used to trigger the blockchain node to perform a query operation based on the query conditions, and feed back the queried data to be stored to the transaction processing end;

[0017] Generate a data decryption request based on the data to be stored and the authority verification information, and send the data decryption request to the encryption unit in the server; the data decryption request is used to trigger the encryption unit to obtain a decryption key based on the data to be stored, and decrypt the data to be stored using a preset decryption algorithm based on the decryption key and the authority verification information to generate target read data;

[0018] The target read data fed back by the encryption unit is sent to the server.

[0019] A second aspect of the disclosed embodiment provides a data processing method, which is applied to a server, wherein the server includes a control unit and a plurality of blockchain nodes, and the method includes:

[0020] The control unit receives a data storage request sent by the client, and determines the data to be stored based on the data storage request;

[0021] The control unit generates a first transaction request based on the data to be stored, and sends the first transaction request to the transaction processing end; the first transaction request is used to trigger the transaction processing end to send a pre-commit request to each blockchain node based on the generated first transaction identifier and the data to be stored;

[0022] The blockchain node obtains the data to be stored in response to the pre-submission request, and performs a first transaction operation based on the data to be stored to store the data to be stored in a local space, and generates first transaction status information, where the first transaction status information is used to indicate whether the first transaction operation is successfully executed;

[0023] The blockchain node sends the first transaction status information to the transaction processing end, so that when the transaction processing end determines that the first transaction status information fed back by each blockchain node is that the transaction is successfully executed, the transaction processing end sends a formal submission request to each blockchain node based on the first transaction identifier;

[0024] In response to the formal submission request, the blockchain node executes a second transaction operation to write the to-be-stored data stored in the local space into the data blockchain.

[0025] In some embodiments, after the blockchain node obtains the data to be stored in response to the pre-submission request, the data processing method further includes:

[0026] The blockchain node generates rollback information during the process of executing the first transaction operation; the rollback information is used to record the state information of the blockchain node before executing the first transaction operation;

[0027] After the blockchain node sends the first transaction status information to the transaction processing end, the data processing method further includes:

[0028] The blockchain node responds to the abort request sent by the transaction processing end and performs a rollback operation based on the rollback information to restore the blockchain node to the state before executing the first transaction operation; the abort request is generated by the transaction processing end based on the first transaction identifier when it determines that any first transaction status information indicates that the transaction execution has failed.

[0029] In some embodiments, the control unit determines the data to be stored based on the data storage request, including:

[0030] The control unit parses the data storage request, obtains the initial data, and sends the initial data to the encryption unit of the server;

[0031] The encryption unit encrypts the initial data using a preset encryption algorithm based on the encryption key to generate data to be stored; the preset encryption algorithm at least includes a function of encrypting data fields corresponding to different data operation permissions to different degrees, and / or a function of encrypting a dependent data field based on a dependent data field;

[0032] The control unit receives the data to be stored sent by the encryption unit.

[0033] In some embodiments, before the control unit generates a first transaction request based on the data to be stored and sends the first transaction request to the transaction processing end, the data processing method further includes:

[0034] The control unit sends the data to be stored to each blockchain node;

[0035] Each blockchain node verifies the data to be stored based on a consensus mechanism, and after verification by multiple blockchain nodes, the data to be stored is packaged into blocks for chain processing.

[0036] In some embodiments, before the control unit sends the data to be stored to each blockchain node, the data processing method further includes:

[0037] The control unit divides the data to be stored into slices to generate multiple slice data;

[0038] The control unit determines a first storage node for the shard data and sends the shard data to the first storage node for storage;

[0039] The control unit generates at least one copy of the shard data for any shard data, and stores each copy of the data in a different second storage node; the second storage node is not the first storage node.

[0040] In some embodiments, the data processing method further includes:

[0041] The control unit receives the data reading request sent by the client and obtains the query conditions and permission verification information;

[0042] The control unit generates a second transaction request based on the query condition and the authority verification information, and sends the second transaction request to the transaction processing end; the second transaction request is used to trigger the transaction processing end to send a data query request to at least one blockchain node based on the query condition;

[0043] The blockchain node responds to the data query request, performs the query operation based on the query conditions, and sends the queried data to be stored to the transaction processing end; the data to be stored is used to trigger the transaction processing end to send a data decryption request to the encryption unit based on the data to be stored and the authority verification information;

[0044] The encryption unit obtains a decryption key based on the data to be stored in response to the decryption request, and decrypts the data to be stored using a preset decryption algorithm based on the decryption key and the authority verification information, generates target read data, and sends the target read data to the transaction processing end;

[0045] The control unit receives the target read data fed back by the transaction processing end, and sends the target read data to the client end.

[0046] In some embodiments, after the blockchain node executes a second transaction operation in response to the formal submission request to write the to-be-stored data stored in the local space into the data blockchain, the data processing method further includes:

[0047] The control unit receives the second transaction status information fed back by the transaction processing end, and sends a request feedback information of successful data storage to the client based on the second transaction status information;

[0048] And / or, the control unit receives third transaction status information fed back by the transaction processing end, and sends request feedback information of data storage failure to the client based on the third transaction status information.

[0049] A third aspect of the embodiments of the present disclosure provides a data processing method, including:

[0050] The server receives the data storage request sent by the client, and determines the data to be stored based on the data storage request;

[0051] The server generates a first transaction request based on the data to be stored, and sends the first transaction request to the transaction processing end;

[0052] The transaction processing end obtains the data to be stored in response to the first transaction request, and generates a first transaction identifier;

[0053] The transaction processing end sends a pre-commit request to each blockchain node based on the first transaction identifier and the data to be stored;

[0054] The blockchain node obtains the data to be stored in response to the pre-submission request;

[0055] The blockchain node executes a first transaction operation based on the data to be stored, stores the data to be stored in a local space, generates first transaction status information, and sends the first transaction status information to the transaction processing end; the first transaction status information is used to indicate whether the first transaction operation is successfully executed;

[0056] When the first transaction status information indicates that the transaction is successfully executed, the transaction processing end sends a formal submission request to each blockchain node based on the first transaction identifier;

[0057] The blockchain node executes a second transaction operation in response to the formal submission request, and writes the data to be stored in the local space into the data blockchain in the blockchain node;

[0058] The transaction processing end feeds back second transaction status information to the service end based on the first transaction identifier; the second transaction status information indicates that the data storage is successful.

[0059] A fourth aspect of the embodiments of the present disclosure provides a data processing device, which is configured at a transaction processing end, and includes:

[0060] An information processing module, configured to obtain data to be stored and generate a first transaction identifier in response to a first transaction request sent by the server;

[0061] A pre-submission request sending module is used to send a pre-submission request to each blockchain node in the server based on the first transaction identifier and the data to be stored; the pre-submission request is used to trigger the blockchain node to perform the first transaction operation, so as to store the data to be stored in the local space of the blockchain node, and feedback the first transaction status information to the transaction processing end;

[0062] A formal submission request sending module, used for sending a formal submission request to each blockchain node based on the first transaction identifier if each first transaction status information indicates that the transaction is successfully executed; the formal submission request is used to trigger the blockchain node to execute the second transaction operation to write the data to be stored in the local space into the data blockchain in the blockchain node;

[0063] The transaction status sending module is used to feed back second transaction status information to the server based on the first transaction identifier; the second transaction status information indicates that the data is stored successfully.

[0064] A fifth aspect of the embodiments of the present disclosure provides a data processing device, which is configured on a server side and includes:

[0065] Control unit for:

[0066] Receive a data storage request sent by a client, and determine the data to be stored based on the data storage request;

[0067] Generate a first transaction request based on the data to be stored, and send the first transaction request to the transaction processing end; the first transaction request is used to trigger the transaction processing end to send a pre-commit request to each blockchain node based on the generated first transaction identifier and the data to be stored;

[0068] Blockchain nodes, used for:

[0069] In response to the pre-commit request, the data to be stored is obtained, and a first transaction operation is performed based on the data to be stored, so as to store the data to be stored in the local space, and generate first transaction status information; the first transaction status information is used to indicate whether the first transaction operation is successfully executed;

[0070] The first transaction status information is sent to the transaction processing end, so that when the transaction processing end determines that the first transaction status information fed back by each blockchain node is that the transaction is successfully executed, the formal submission request is sent to each blockchain node based on the first transaction identifier;

[0071] In response to the formal submission request, a second transaction operation is performed to write the to-be-stored data stored in the local space into the data blockchain.

[0072] A sixth aspect of the embodiments of the present disclosure provides an electronic device, the electronic device comprising:

[0073] Processor and memory;

[0074] The processor is used to execute the data processing method described in any embodiment of the present disclosure by calling the program or instruction stored in the memory.

[0075] A seventh aspect of an embodiment of the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores a program or an instruction, wherein the program or the instruction enables a computer to execute the data processing method described in any embodiment of the present disclosure.

[0076] An eighth aspect of the embodiments of the present disclosure provides a data processing system, including a communication-connected service end and a transaction processing end; wherein:

[0077] The server is used to execute the data processing method applied to the server as described in any embodiment of the present disclosure;

[0078] The transaction processing end is used to execute the data processing method applied to the transaction processing end described in any embodiment of the present disclosure.

[0079] The data processing method, apparatus, system, device and storage medium provided by the embodiments of the present disclosure can respond to a first transaction request sent by a server through a transaction processing end, obtain data to be stored based on the first transaction request, and generate a first transaction identifier; based on the first transaction identifier and the data to be stored, send a pre-submission request to each blockchain node in the server to trigger the blockchain node to execute a first transaction operation and store the data to be stored in the local space of the blockchain node, and feedback first transaction status information to the transaction processing end; if the first transaction status information corresponding to each blockchain node received indicates that the transaction is successfully executed, send a formal submission request to each blockchain node based on the first transaction identifier to trigger the blockchain node to execute a second transaction operation and write the data to be stored in the local space into the data blockchain in the blockchain node; then, based on the first transaction identifier, feedback second transaction status information indicating successful data storage to the server. As a result, the data to be stored can be stored and processed through the two-phase commit transaction processing mechanism, and when all blockchain nodes respond to the pre-commit request and feedback that the storage operation can be successfully executed, a formal submission request is sent to enable all blockchain nodes to write the data to be stored into the data blockchain they store, avoiding the problem of data inconsistency caused by storage failure of some blockchain nodes, and greatly improving the consistency, integrity and high availability of data storage in distributed systems. BRIEF DESCRIPTION OF THE DRAWINGS

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

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

[0082] Figure 1 A schematic diagram of an application scenario of a data processing method provided by an embodiment of the present disclosure;

[0083] Figure 2 An interactive schematic diagram of a data processing process provided by an embodiment of the present disclosure;

[0084] Figure 3 A flowchart of a data processing method provided by an embodiment of the present disclosure;

[0085] Figure 4 A flowchart of another data processing method provided by an embodiment of the present disclosure;

[0086] Figure 5 A flowchart of another data processing method provided by an embodiment of the present disclosure;

[0087] Figure 6 A flowchart of another data processing method provided by an embodiment of the present disclosure;

[0088] Figure 7 A flowchart of another data processing method provided by an embodiment of the present disclosure;

[0089] Figure 8 A flowchart of another data processing method provided by an embodiment of the present disclosure;

[0090] Fig. 9 A schematic diagram of the structure of a data processing device provided in an embodiment of the present disclosure;

[0091] Fig.10 A schematic diagram of the structure of another data processing device provided by an embodiment of the present disclosure;

[0092] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0093] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described in detail below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0094] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0095] The data processing method provided in the embodiments of the present disclosure is mainly applicable to scenarios of storing and / or reading data in a distributed system. Figure 1 The following is a schematic diagram of an application scenario of a data processing method provided by an embodiment of the present disclosure. Figure 1 As shown, the application scenario includes a client 10 and a data processing system 20, and the client 10 can communicate with the data processing system 20 through a network. It should be noted that the data processing method can also be applied to other application scenarios, which are not limited here.

[0096] like Figure 1 As shown, the data processing system 20 includes a server 21, a transaction processing terminal 22, an encryption unit 23, an alarm terminal 24, a monitoring terminal 25, a disaster recovery terminal 26, and distributed storage nodes (for example, distributed storage node 1 and distributed storage node N). The server 21 includes a control unit, at least one blockchain node (for example, blockchain node 1 and blockchain node M) and an encryption unit 23. The number of blockchain nodes and the number of distributed storage nodes can be set according to actual conditions and user needs, and are not limited here.

[0097] Among them, the server 21 can communicate with the client 10, and the control unit in the server 21 receives the data storage request sent by the client 10, and determines the data to be stored based on the data storage request; after receiving the data storage request, the data to be stored corresponding to the data storage request can be sent to the encryption unit 23 in the server, so that the encryption unit 23 encrypts the data to be stored; the encrypted data and metadata returned by the encryption unit 23 can be received; the control unit can generate a first transaction request based on the data to be stored, and send the first transaction request to the transaction processing end 22, so that the transaction processing end 22 generates a first transaction identifier based on the first transaction request, and send a data chain request (including a pre-submission request and a formal submission request) to the blockchain node in the server (such as blockchain node 1, blockchain node M), so that the blockchain node executes the data chain request, performs data storage processing on the data to be stored, that is, records the relevant operations of the transaction to the blockchain.

[0098] The transaction processing end 22 can receive the first transaction request sent by the service end 21, generate a first transaction identifier based on the transaction request, and send a data on-chain request (including a pre-submission request and a formal submission request, or a pre-submission request and a termination request) to the blockchain node (such as blockchain node 1, blockchain node M) to enable the blockchain node to execute the data on-chain request and perform data storage processing on the data to be stored, that is, record the relevant operations of the transaction to the blockchain. At the same time, a backup request can also be made to the disaster recovery end 26 to start the backup strategy. It can also interact with distributed storage nodes (such as distributed storage node 1, distributed storage node N) to enable distributed storage of data.

[0099] The encryption unit 23 can receive the initial data sent by the control unit in the server end 21, encrypt the initial data, and can also receive the data decryption request sent by the transaction processing end 22, decrypt the data to be stored corresponding to the data decryption request, and send the decrypted data to the transaction processing end 22.

[0100] The alarm terminal 24 is provided with an alarm mechanism, which can obtain the monitoring result of the monitoring terminal 25 and trigger an alarm event when it is determined that the monitoring result is abnormal (such as abnormal system operation status and / or abnormal data integrity).

[0101] The monitoring terminal 25 can monitor the various indicator data (such as distributed storage node status, data consistency, transaction status, etc.) collected and analyzed by the data processing system 20 in real time, such as real-time monitoring of the transaction processing terminal 22 and distributed storage nodes, and send the monitored indicator data to the alarm terminal.

[0102] The disaster recovery end 26 can improve the data recovery capability of the data processing system 20 in the event of a disaster through methods such as timed snapshots and off-site backup.

[0103] The blockchain node (such as blockchain node 1 and blockchain node M) can receive the data upload request sent by the transaction processing end 22, perform data storage processing of the data to be stored, and feedback the execution result (such as transaction status information) to the transaction processing end 22.

[0104] The distributed storage nodes (such as distributed storage node 1 and distributed storage node N) can receive data to be stored and perform distributed storage on the data to be stored.

[0105] Further, Figure 2 This is an interactive diagram of a data processing process provided by an embodiment of the present disclosure. Figure 2 The data processing process between the terminals in the data processing system is described in detail, and the specific interaction process includes the data storage process and the data reading process.

[0106] The data storage process is specifically as follows: the client 10 sends a data storage request to the server 21. After receiving the data storage request, the control unit in the server 21 determines the data to be stored based on the data storage request; generates a first transaction request based on the data to be stored, and sends the first transaction request to the transaction processing end 22. After receiving the first transaction request, the transaction processing end 22 obtains the data to be stored based on the first transaction request, generates a first transaction identifier, and sends a pre-submission request to each blockchain node based on the first transaction identifier and the data to be stored. After receiving the pre-submission request, each blockchain node obtains the data to be stored, and performs a first transaction operation corresponding to the pre-submission request based on the data to be stored, stores the data to be stored in the local space, generates the first transaction status information, and sends the first transaction status information to the transaction processing end 22.

[0107] After receiving the first transaction status information sent by each blockchain node, the transaction processing end 22 checks each first transaction status information.

[0108] In some instances, when the transaction processing terminal 22 determines that each first transaction status information indicates that the transaction is successfully executed, it sends a formal submission request to each blockchain node. After receiving the formal submission request, each blockchain node executes the second transaction operation corresponding to the formal submission request and sends the second transaction status information to the transaction processing terminal 22.

[0109] In other examples, when the transaction processing end 22 determines that at least one first transaction status information indicates a transaction execution failure, it sends an abort request to each blockchain node. After receiving the abort request, each blockchain node performs a rollback operation corresponding to the abort request and sends third transaction status information to the transaction processing end 22.

[0110] After receiving the second transaction status information or the third transaction status information, the transaction processing end 22 sends the final transaction status information (ie, the second transaction status information or the third transaction status information) to the server end 21 , and the control unit in the server end 21 feeds back the transaction status information to the client end 10 .

[0111] The data reading process is specifically as follows: the client 10 sends a data reading request to the server 21. After receiving the data reading request, the control unit in the server 21 obtains the query conditions and permission verification information, generates a second transaction request based on the query conditions and permission verification information, and sends the second transaction request to the transaction processing end 22. After receiving the second transaction request, the transaction processing end 22 obtains the query conditions and permission verification information corresponding to the second transaction request, and sends a data query request to each blockchain node. After receiving the data query request, each blockchain node executes a query operation, obtains the data to be stored, and returns the data to be stored to the transaction processing end 22.

[0112] After receiving the data to be stored, if the data to be stored is encrypted data, the transaction processing end 22 sends a data decryption request to the encryption unit 23. After receiving the data decryption request, the encryption unit 23 performs data decryption processing to obtain the target read data and sends the target read data to the transaction processing end 22.

[0113] After receiving the target read data, the transaction processing end 22 sends the target read data to the server end 21 , and the server end 21 feeds back the target read data to the client end 10 .

[0114] The data processing method provided by the embodiments of the present disclosure can be applied to the financial industry, medical industry, media industry and other industries to ensure the consistency and integrity of data. The data processing method can be executed by a data processing device, which can be implemented by software and / or hardware, and the device can be integrated in an electronic device with data processing function, such as a handheld computer, a tablet computer, a laptop or a desktop computer, and a server or a server cluster.

[0115] Figure 3 1 is a flow chart of a data processing method provided by an embodiment of the present disclosure. The present disclosure embodiment mainly applies this method to a transaction processing end, such as Figure 1 The transaction processing end 22 shown in FIG. Wherein, the data processing method includes a data storage method and a data reading method, such as Figure 3 As shown, the data processing method may be a method for storing data at a transaction processing end, comprising the following steps:

[0116] S310: In response to a first transaction request sent by a server, obtain data to be stored and generate a first transaction identifier.

[0117] The first transaction request may be a request for storing data. The request may include data to be stored and metadata corresponding to the data to be stored. The data to be stored may be encrypted data. When the data to be stored is encrypted data, the metadata may include information such as a preset encryption algorithm version and encryption time.

[0118] The first transaction identifier can be understood as being used to identify the first transaction request, so as to ensure transaction uniqueness, support transaction atomicity, reply and rollback, etc.

[0119] The data to be stored can be any data uploaded by the user that needs to be stored.

[0120] Specifically, after responding to the first transaction request sent by the service end, the transaction processing end parses the first transaction request and obtains the data to be stored corresponding to the first transaction request. After obtaining the data to be stored, a first transaction identifier is generated based on a preset identifier generation rule, thereby uniquely identifying the first transaction request based on the first transaction identifier.

[0121] S320. Based on the first transaction identifier and the data to be stored, a pre-submission request is sent to each blockchain node in the server; the pre-submission request is used to trigger the blockchain node to perform a first transaction operation to store the data to be stored in the local space of the blockchain node, and to feedback the first transaction status information to the transaction processing end.

[0122] The pre-submission request includes the data to be stored and metadata corresponding to the data to be stored.

[0123] The first transaction operation can be understood as an operation of temporarily storing or locally storing the data to be stored.

[0124] The first transaction status information may be understood as information used to characterize the execution status corresponding to the first transaction operation. Exemplarily, the first transaction status information may include transaction execution success, transaction execution failure, and the like.

[0125] Specifically, after generating the first transaction identifier, the transaction processing end generates a pre-commit request based on the first transaction identifier and the data to be stored, and sends the pre-commit request to each blockchain node, so that after receiving the pre-commit request, each blockchain node executes the first transaction operation, stores the data to be stored in the local space, and stores the rollback information and redo information generated during the execution of the first transaction operation in the local transaction log. Then, after executing the first transaction operation, the first transaction status information is fed back to the transaction processing end based on the execution status corresponding to the first transaction operation. In this way, the transaction processing end can determine the transaction execution status of each blockchain node for the pre-commit request according to the first transaction status information.

[0126] S330. If the status information of each first transaction indicates that the transaction is successfully executed, a formal submission request is sent to each blockchain node based on the first transaction identifier; the formal submission request is used to trigger the blockchain node to execute the second transaction operation to write the data to be stored in the local space into the data blockchain in the blockchain node.

[0127] Among them, the second transaction operation can be understood as an operation of writing the data to be stored in the local space into the data blockchain.

[0128] Specifically, after receiving the first transaction status information fed back by each blockchain node, the transaction processing end checks the first transaction status information to determine whether the first transaction status information corresponding to each blockchain node is all successful transaction execution. When it is determined that the first transaction status information is all successful transaction execution, it indicates that each blockchain node is ready to execute the formal submission of the transaction, and then a formal submission request is generated based on the first transaction identifier, and the formal submission request is sent to each blockchain node, so that each blockchain node executes the second transaction operation after receiving the formal submission request, so as to write the data to be stored in the local space into the data blockchain in the blockchain node, and feedback the execution result corresponding to the second transaction operation to the transaction processing end.

[0129] S340: Feedback second transaction status information to the server based on the first transaction identifier; the second transaction status information indicates that the data is stored successfully.

[0130] The second transaction status information may be understood as information used to characterize the data storage result determined based on the execution result corresponding to the second transaction operation. Specifically, the second transaction status information may characterize that the data storage is successful.

[0131] Specifically, after receiving the execution result corresponding to the second transaction operation fed back by each blockchain node, the transaction processing end determines the second transaction status information, checks the second transaction status information, and feeds back the second transaction status information to the server.

[0132] In the disclosed embodiment, the transaction processing end can respond to the first transaction request sent by the server end, obtain the data to be stored based on the first transaction request, and generate a first transaction identifier; wherein, based on the first transaction identifier and the data to be stored, a pre-submission request is sent to each blockchain node in the server end, so as to trigger the blockchain node to perform the first transaction operation and store the data to be stored in the local space of the blockchain node, and feedback the first transaction status information to the transaction processing end; if the first transaction status information corresponding to each blockchain node received is that the transaction is successfully executed, a formal submission request is sent to each blockchain node based on the first transaction identifier, so as to trigger the blockchain node to perform the second transaction operation and write the data to be stored in the local space into the data blockchain in the blockchain node; then, based on the first transaction identifier, feedback the second transaction status information representing the successful data storage to the server end. Thus, the data to be stored can be stored and processed through the transaction processing mechanism of two-stage submission, and when all blockchain nodes respond to the pre-submission request and feedback that the storage operation can be successfully executed, a formal submission request is sent so that all blockchain nodes write the data to be stored into the data blockchain stored in them, avoiding the problem of data inconsistency caused by the storage failure of some blockchain nodes, and greatly improving the consistency, integrity and high availability of data storage in the distributed system.

[0133] On the basis of the above-mentioned embodiments of the present disclosure, after sending a pre-commit request to each blockchain node in the server based on the first transaction identifier and the data to be stored, the data processing method may also include: if any first transaction status information indicates that the transaction execution failed, sending an abort request to each blockchain node based on the first transaction identifier; the abort request is used to trigger the blockchain node to perform a rollback operation based on the rollback information to cancel the data to be stored in the local space; the rollback information is generated in the process of the blockchain node executing the first transaction operation, and the rollback information is used to record the status information of the blockchain node before executing the first transaction operation; based on the first transaction identifier, third transaction status information is fed back to the server; the third transaction status information represents data storage failure.

[0134] The third transaction status information may be understood as information used to characterize a data storage result determined based on an execution result corresponding to the rollback operation. Specifically, the third transaction status information may characterize a data storage failure.

[0135] Specifically, if any first transaction status information is a transaction execution failure, indicating that the blockchain node where the transaction execution failed is not ready to execute the formal submission of the transaction, an abort request is sent to all blockchain nodes, so that all blockchain nodes perform a rollback operation based on the rollback information after receiving the abort request, and restore to the state before executing the first transaction operation, thereby ensuring the data consistency of each blockchain node, and feeding back the third transaction status information corresponding to the rollback operation to the transaction processing end.

[0136] In the disclosed embodiment, when it is determined that the first transaction status information corresponding to any blockchain node is a transaction execution failure, an abort request can be sent to all blockchain nodes so that all blockchain nodes perform a rollback operation, that is, no data on-chain operation is performed, thereby improving the data consistency and integrity of all blockchain nodes.

[0137] Figure 4 A flow chart of another data processing method provided in an embodiment of the present disclosure is provided. The data processing method is applied to a transaction processing end, such as Figure 1 The transaction processing terminal 22 shown in FIG. Figure 4 As shown, the data processing method may be a method for a transaction processing end to read data. If the data to be stored is encrypted data, the method may specifically include the following steps:

[0138] S410. In response to the second transaction request sent by the server, obtain query conditions and authority verification information.

[0139] The second transaction request may be a request for reading data, including query conditions and authority verification information.

[0140] The query condition may include at least one of a query keyword, identification information of the data to be queried, path information of the data to be queried, and the like.

[0141] The permission verification information can be understood as information used to verify the user's query authority, so as to confirm whether the user has the right to access specific data to be queried. Based on the permission verification information, unauthorized users are prevented from accessing restricted data, ensuring the security and integrity of the data.

[0142] Specifically, the transaction processing end responds to the second transaction request sent by the service end, parses the second transaction request, and obtains the query condition corresponding to the second transaction request and the authority verification information of the user corresponding to the second transaction request.

[0143] S420. Based on the query conditions, a data query request is sent to at least one blockchain node; the data query request is used to trigger the blockchain node to perform a query operation based on the query conditions, and feed back the queried data to be stored to the transaction processing end.

[0144] Among them, the data query request is a request for a blockchain node to perform a data query operation based on the query conditions in its corresponding data blockchain account book.

[0145] Specifically, after obtaining the query conditions, the transaction processing end generates a data query request based on the query conditions, and then sends the data query request to at least one blockchain node, so that at least one blockchain node performs a query operation based on the query conditions, and after the query operation is completed, the query data to be stored is fed back to the transaction processing end.

[0146] S430, generating a data decryption request based on the data to be stored and the permission verification information, and sending the data decryption request to the encryption unit in the server; the data decryption request is used to trigger the encryption unit to obtain a decryption key based on the data to be stored, and based on the decryption key and the permission verification information, use a preset decryption algorithm to decrypt the data to be stored to generate target read data.

[0147] The encryption unit is used to perform encryption and decryption processing on data, wherein the encryption unit may include a data encryption module and a hardware security module.

[0148] The preset decryption algorithm is a decryption algorithm adapted to the preset encryption algorithm.

[0149] Specifically, the transaction processing end receives the data to be stored, or the data to be stored and metadata returned by at least one blockchain node. After receiving the data to be stored, a data decryption request is generated based on the data to be stored and the permission verification information, and the encryption unit is called based on the preset application program interface, and the data decryption request is sent to the encryption unit, so that the data encryption module of the encryption unit parses the data decryption request, obtains the data to be stored, and requests a decryption key from the hardware security module based on the data to be stored, and the hardware security module sends the decryption key to the data encryption module. The data encryption module uses a preset decryption algorithm to decrypt the data to be stored according to the decryption key and the permission verification information, generates the target read data corresponding to the data to be stored, and sends the target read data to the transaction processing end.

[0150] S440, sending the target read data fed back by the encryption unit to the server.

[0151] Specifically, after receiving the target read data returned by the encryption unit, the transaction processing end sends the target read data to the service end, that is, to the control unit in the service end.

[0152] In the disclosed embodiment, after receiving the second transaction request sent by the server, the query conditions and permission verification information corresponding to the second transaction request can be obtained. Then, based on the query conditions, a data query request is sent to at least one blockchain node, so that at least one blockchain node performs a query operation based on the query conditions and obtains the data to be stored. After obtaining the data to be stored, the encryption unit is further called based on the preset application program interface, so that the encryption unit performs decryption processing based on the permission verification information to obtain the target read data. As a result, when reading data, the user's permission verification information can be combined to further improve the security and integrity of the data.

[0153] Figure 5 A flowchart of another data processing method provided in an embodiment of the present disclosure is provided. The data processing method is applied to a server. Figure 1 The server 21 shown in the figure includes a control unit and multiple blockchain nodes. Figure 5 As shown, the data processing method may be a method for storing data on the server side, comprising the following steps:

[0154] S510: The control unit receives a data storage request sent by the client, and determines data to be stored based on the data storage request.

[0155] In an embodiment of the present disclosure, the control unit determines the data to be stored based on the data storage request, which may specifically include: the control unit parses the data storage request, obtains initial data, and sends the initial data to the encryption unit of the server; the encryption unit encrypts the initial data based on the encryption key using a preset encryption algorithm to generate data to be stored; the preset encryption algorithm at least includes the function of encrypting data fields corresponding to different data operation permissions to different degrees, and / or the function of encrypting dependent data fields based on dependent data fields; the control unit receives the data to be stored sent by the encryption unit.

[0156] Specifically, the server can communicate with the client, and the control unit in the server receives the data storage request sent by the client in real time. After receiving the data storage request, the control unit parses the data storage request and obtains the initial data in the data storage request. Then, the encryption unit is called based on the preset application interface, and the initial data is sent to the encryption unit, so that the data encryption module of the encryption unit requests the encryption key from the hardware security module after receiving the initial data, and the hardware security module returns the encryption key to the data encryption module. The data encryption module encrypts the data to be stored based on the preset encryption algorithm and the encryption key, obtains the data to be stored and the metadata corresponding to the data to be stored, and then sends the data to be stored and the metadata to the control unit in the server, and the control unit receives the data to be stored and the metadata, and then obtains the data to be stored.

[0157] The preset encryption algorithm may be Advanced Encryption Standard (AES), also known as Rijndael encryption.

[0158] In some examples, the server can obtain the user's permission verification information corresponding to the data storage request, and send the user's permission verification information and the initial data to the encryption unit. The encryption unit performs different degrees of encryption processing on the data fields corresponding to different data operation permissions based on the user's permission verification information, and generates data to be stored, or data to be stored and its corresponding metadata. This allows users to access partial fields or all fields according to their corresponding permission verification information, thereby improving the security of data access.

[0159] In other examples, after the server sends the initial data to the encryption unit, the encryption unit determines the dependency relationship between the data fields in the initial data, and based on the function of encrypting the dependent data field based on the dependent data field in the preset encryption algorithm, encrypts the initial data to generate data to be stored, or the data to be stored and its corresponding metadata, thereby improving the security and integrity of the data. For example, the preset encryption and decryption algorithm itself uses certain fields of the data to generate the key. A column of data is calculated based on multiple columns of data in front, and the dependent data is used for encryption and decryption to further verify whether the data is lost.

[0160] In some other examples, the server can obtain the user's permission verification information corresponding to the data storage request, and send the user's permission verification information and initial data to the encryption unit. The encryption unit encrypts the data to be stored based on the permission verification information and the dependency relationship between the data fields in the initial data based on a preset encryption algorithm to generate data to be stored, or data to be stored and its corresponding metadata, thereby improving the security and integrity of the data.

[0161] In some embodiments of the present disclosure, when a failure occurs in the encryption unit and affects the execution of the encryption operation of the initial data or the decryption operation of the data to be stored, the data processing method further includes: starting the redundant encryption unit, and the redundant encryption unit performs the encryption or decryption operation of the data to achieve automatic fault switching. At the same time, the encryption unit also performs a key backup operation when performing the encryption operation or decryption operation to ensure that the key data is backed up in a different place so as to perform data recovery in an emergency.

[0162] In other embodiments of the present disclosure, in order to avoid decryption failure due to key damage or preset encryption algorithm upgrade, the data processing method further includes: recording the version information of the key and the preset encryption algorithm corresponding to the key to prevent confusion between keys of different versions. At the same time, a preset encryption algorithm fallback mechanism is set, and when the decryption operation cannot be performed, the backup decryption algorithm is used to restore the data.

[0163] S520. The control unit generates a first transaction request based on the data to be stored, and sends the first transaction request to the transaction processing end; the first transaction request is used to trigger the transaction processing end to send a pre-submission request to each blockchain node based on the generated first transaction identifier and the data to be stored.

[0164] Specifically, after receiving the data to be stored sent by the encryption unit, the server generates a first transaction request based on the data to be stored and a preset transaction request generation rule, and sends the first transaction request to the transaction processing end, so that the transaction processing end generates a first transaction identifier after receiving the first transaction request, and sends a pre-submission request to each blockchain node based on the first transaction identifier and the data to be stored.

[0165] S530. The blockchain node obtains the data to be stored in response to the pre-submission request, and performs a first transaction operation based on the data to be stored to store the data to be stored in the local space, and generates first transaction status information; the first transaction status information is used to indicate whether the first transaction operation is successfully executed.

[0166] Specifically, the blockchain node obtains the data to be stored in response to the pre-submission request, and performs a first transaction operation based on the data to be stored to store the data to be stored in the local space, and generates first transaction status information according to whether the execution of the first transaction operation is successful or not.

[0167] S540, the blockchain node sends the first transaction status information to the transaction processing end, so that when the transaction processing end determines that the first transaction status information fed back by each blockchain node indicates that the transaction is successfully executed, the transaction processing end sends a formal submission request to each blockchain node based on the first transaction identifier.

[0168] Specifically, after generating the first transaction status information, the blockchain node sends the first transaction status information to the transaction processing end, so that the transaction processing end parses the first transaction status information and determines whether the first transaction status information corresponding to each blockchain node is used to represent the successful execution of the first transaction operation. When it is determined that the first transaction status information is all successful, a formal submission request is sent to each blockchain node based on the first transaction identifier.

[0169] S550. The blockchain node executes a second transaction operation in response to the formal submission request to write the data to be stored in the local space into the data blockchain.

[0170] Specifically, the blockchain node executes a second transaction operation in response to the formal submission request to write the data to be stored in the local space into the data blockchain, and feeds back the execution result corresponding to the second transaction operation to the transaction processing end, so that the transaction processing end determines the second transaction status information based on the execution result corresponding to the second transaction operation, and sends the second transaction status information to the server.

[0171] Furthermore, the server may receive the second transaction status information fed back by the transaction processing end, and determine whether the data is stored successfully based on the second transaction status information, and when it is determined that the data is stored successfully, send request feedback information of successful data storage to the client.

[0172] In the disclosed embodiment, it is possible to receive a data storage request from a client, encrypt the data to be stored in the data storage request, obtain the data to be stored, and then generate a first transaction request based on the data to be stored, send the first transaction request to the transaction processing end, so that the transaction processing end triggers the transaction processing to check the data storage, that is, to ensure that all blockchain nodes can only execute the second transaction operation corresponding to the formal submission request when the first transaction status information is that the transaction is successfully executed, so as to perform data storage processing on the data to be stored corresponding to the data to be stored. Finally, based on the second transaction status information fed back by the transaction processing end, a request feedback information of successful data storage is sent to the client, thereby improving the consistency, integrity and high availability of data storage.

[0173] Based on the above embodiments of the present disclosure, after the blockchain node obtains the data to be stored in response to the pre-submission request, the data processing method may further include: the blockchain node generates rollback information during the execution of the first transaction operation; the rollback information is used to record the status information of the blockchain node before executing the first transaction operation.

[0174] Furthermore, after the blockchain node sends the first transaction status information to the transaction processing end, the data processing method may also include: the blockchain node responds to the abort request sent by the transaction processing end, and performs a rollback operation based on the rollback information to restore the blockchain node to the state before executing the first transaction operation; the abort request is generated based on the first transaction identifier when the transaction processing end determines that any first transaction status information indicates a transaction execution failure.

[0175] In the disclosed embodiment, the blockchain node can generate rollback information during the execution of the first transaction operation, and after responding to the abort request sent by the transaction processing end, perform a rollback operation according to the rollback information to restore the blockchain node to the state before the execution of the first transaction operation, thereby improving the convenience and accuracy of the rollback operation and improving the user experience.

[0176] In an embodiment of the present disclosure, before the control unit generates a first transaction request based on the data to be stored and sends the first transaction request to the transaction processing end, the data processing method may also include: the control unit sends the data to be stored to each blockchain node; the blockchain node verifies the data to be stored based on a consensus mechanism, and after verification by multiple blockchain nodes, packages the data to be stored into a block for chain processing.

[0177] It should be noted that in the embodiment of the present disclosure, the specific implementation method of verifying the data to be stored based on the consensus mechanism, and packaging the data to be stored into blocks for chain processing after the verification is similar to the implementation method of verifying the data based on the consensus mechanism in the existing blockchain technology, and packaging it into blocks for chain processing, and will not be repeated here.

[0178] In the disclosed embodiment, the data to be stored is sent to each blockchain node, so that each blockchain node verifies the data to be stored based on a consensus mechanism, and after the verification is passed, the data to be stored is packaged into a block for chain processing, that is, before transaction processing, a blockchain node must first upload the data to be stored to the chain before triggering other subsequent blockchain nodes to execute data storage. The transaction processing mechanism intercepts the process of other blockchain nodes verifying and storing the data to be stored in the block, ensuring the authenticity, non-repudiation and non-tamperability of the transaction, thereby improving the security, consistency and integrity of the data.

[0179] In an embodiment of the present disclosure, before the control unit sends the data to be stored to each blockchain node, the data processing method may also include: the control unit shards the data to be stored to generate multiple shard data; the control unit determines the first storage node of the shard data, and sends the shard data to the first storage node for storage; the control unit generates at least one copy data of the shard data for any shard data, and stores each copy data in a different second storage node; the second storage node is not the first storage node.

[0180] Specifically, before sending the data to be stored to each blockchain node, the control unit in the server can shard the data to be stored based on a preset sharding strategy to generate multiple shard data, and calculate the storage location corresponding to each shard data through a preset hash function such as a consistent hash function, determine the first storage node of the shard data based on the storage location, and send each shard data to the first storage node corresponding to it. Then, for each shard data, generate at least one copy data corresponding to it, and store each copy data in a different second storage node.

[0181] Among them, the preset sharding strategy can be sharding based on data type, sharding based on data size, sharding based on data attributes, etc., which is not limited here.

[0182] In the disclosed embodiment, the data to be stored can be sliced ​​to generate multiple slice data, and at least one replica data corresponding to each slice data is stored in a second storage node different from the first storage node of the slice data. Thus, through the redundant storage method, it is ensured that when a system failure or data damage occurs, data recovery can still be performed through other replica data, thereby improving data reliability and availability, and further improving data security and integrity.

[0183] Figure 6 A flowchart of another data processing method provided in an embodiment of the present disclosure is provided. The data processing method is applied to a server. Figure 1 The server 21 shown. Figure 6 As shown, the data processing method may be a method for the server to read data, comprising the following steps:

[0184] S610: The control unit receives a data read request sent by the client, and obtains query conditions and authority verification information.

[0185] Specifically, the control unit in the server may receive a data read request sent by the client, and after obtaining the data read request, parse the data read request to obtain the query condition and authority verification information from the data read request.

[0186] S620. The control unit generates a second transaction request based on the query condition and the authority verification information, and sends the second transaction request to the transaction processing end; the second transaction request is used to trigger the transaction processing end to send a data query request to at least one blockchain node based on the query condition.

[0187] Specifically, after obtaining the query conditions and authority verification information, the control unit generates a second transaction request based on the query conditions and authority verification information and preset transaction request generation rules, and sends the second transaction request to the transaction processing end, so that after receiving the second transaction request, the transaction processing end sends a data query request to at least one of the blockchain nodes based on the query conditions corresponding to the second transaction request.

[0188] S630. The blockchain node responds to the data query request, performs a query operation based on the query conditions, and sends the queried data to be stored to the transaction processing end; the data to be stored is used to trigger the transaction processing end to send a data decryption request to the encryption unit based on the data to be stored and the authority verification information.

[0189] Specifically, the blockchain node responds to the data query request, performs the query operation based on the query conditions and obtains the queried data to be stored, and after obtaining the data to be stored, sends the data to be stored to the transaction processing end, so that the processing end sends a data decryption request to the encryption unit based on the data to be stored and the authority verification information.

[0190] S640. The encryption unit responds to the decryption request, obtains a decryption key based on the data to be stored, and decrypts the data to be stored using a preset decryption algorithm based on the decryption key and the authority verification information, generates target read data, and sends the target read data to the transaction processing end.

[0191] S650: The control unit receives the target read data fed back by the transaction processing end, and sends the target read data to the client end.

[0192] Specifically, the server may receive the target read data fed back by the transaction processing end, and send the target read data to the client, so that the client can receive the target read data corresponding to the data read request in a timely manner.

[0193] In the disclosed embodiment, a second transaction request can be generated through the query conditions and permission verification information corresponding to the data reading request sent by the client, and the second transaction request can be sent to the transaction processing end, so that the transaction processing end sends a data query request to at least one blockchain node based on the query conditions corresponding to the second transaction request, and at least one blockchain node responds to the data query request, executes a query operation to obtain the data to be stored and the metadata corresponding to the data to be stored, and then the encryption unit decrypts the data to be stored to obtain the target read data, thereby improving the security and accuracy of data reading.

[0194] Figure 7 A flowchart of another data processing method provided in an embodiment of the present disclosure is provided. The data processing method is applied to a blockchain node, such as Figure 1 The blockchain node 1 and blockchain node N are shown. Figure 7 As shown, the data processing method can be a method for blockchain nodes to store data, including the following steps:

[0195] S710: In response to a pre-commit request sent by a transaction processing end, obtain data to be stored.

[0196] Specifically, the blockchain node responds to the pre-submission request sent by the transaction processing end, parses the pre-submission request, and obtains the data to be stored corresponding to the pre-submission request.

[0197] S720. Execute a first transaction operation based on the data to be stored, store the data to be stored in a local space, generate first transaction status information, and send the first transaction status information to the transaction processing end; the first transaction status information is used to indicate whether the first transaction operation is successfully executed.

[0198] Specifically, after obtaining the data to be stored, the blockchain node executes the first transaction operation based on the data to be stored, stores the data to be stored in the local space, and stores the rollback information and redo information generated during the execution of the first transaction operation in the local transaction log. Then, the first transaction status information is generated and sent to the transaction processing end.

[0199] S730. In response to the formal submission request sent by the transaction processing end, execute the second transaction operation to write the data to be stored in the local space into the data blockchain in the blockchain node; the formal submission request is generated by the transaction processing end based on the first transaction identifier when the status information of each first transaction indicates that the transaction is successfully executed.

[0200] Specifically, after sending the first transaction status information to the transaction processing end, the blockchain node can receive a formal submission request sent by the transaction processing end, and in response to the formal submission request sent by the transaction processing end, execute a second transaction operation to write the data to be stored in the local space into the data blockchain in the blockchain node.

[0201] In the embodiment of the present disclosure, after executing the pre-submission request sent by the transaction processing end, if the first transaction operations corresponding to the pre-submission request are all executed successfully, in response to the formal submission request sent by the transaction processing end, the second transaction operation is executed, and the data to be stored in the local space is written into the data blockchain in the blockchain node, thereby improving the consistency, integrity and high availability of data storage.

[0202] In the above embodiment of the present disclosure, after obtaining the data to be stored in response to the pre-commit request sent by the transaction processing end, the data processing method may also include: the blockchain node generates rollback information during the execution of the first transaction operation, and stores the rollback information in the local transaction log; the rollback information is used to record the status information of the blockchain node before executing the first transaction operation.

[0203] After executing a first transaction operation based on the data to be stored, storing the data to be stored in the local space, generating first transaction status information, and sending the first transaction status information to the transaction processing end, the data processing method may further include: the blockchain node responds to an abort request sent by the transaction processing end, performing a rollback operation based on the rollback information to undo the storage of the data to be stored in the local space, and restoring the blockchain node to the state before executing the first transaction operation.

[0204] In the embodiment of the present disclosure, by horizontally supporting the rollback information during the execution of the first transaction operation and storing the rollback information in the local transaction log, it is ensured that when the first transaction operation corresponding to at least one blockchain node in the first transaction status information fails to execute, the rollback operation is performed based on the rollback information, and the data to be stored stored in the local space is revoked, thereby ensuring the accuracy of the rollback operation and improving the system performance.

[0205] In the embodiment of the present disclosure, the data processing method may also include: receiving the data to be stored sent by the control unit in the server, and verifying the data to be stored based on the consensus mechanism, and after multiple blockchain nodes have passed the verification, packaging the data to be stored into a block for chain processing.

[0206] In the disclosed embodiment, the data to be stored can be verified based on the consensus mechanism. After multiple blockchain nodes have passed the verification, the current blockchain node is characterized as a blockchain node that generates transaction data and verifies the chain. Then, the data to be stored is packaged into a block for chain processing, ensuring the authenticity, non-repudiation and non-tamperability of the transaction, thereby improving the security, consistency and integrity of the data.

[0207] In the embodiment of the present disclosure, when a node communication failure occurs during the execution of the first transaction operation or the second transaction operation by the blockchain node, the data to be stored corresponding to the data to be stored may not be successfully written. At this time, the data processing method may further include: based on a preset retry mechanism, when it is determined that the writing of the data to be stored fails, determining whether it is a communication failure; when it is determined that the communication fails, performing a retry operation, or when it is determined that the communication duration is greater than the preset communication duration, performing a transaction rollback operation.

[0208] In the disclosed embodiment, the data processing method can also be a method for blockchain nodes to read data, specifically including: obtaining query conditions in response to a data query request sent by a transaction processing end; executing a query operation based on the query conditions, and feeding back the queried data to be stored to the transaction processing end, thereby ensuring the accuracy of data reading and the consistency of the read data.

[0209] In the embodiments of the present disclosure, a data cache mechanism may be used to cache commonly used data to improve data reading efficiency.

[0210] Figure 8 A flowchart of another data processing method provided in an embodiment of the present disclosure is provided. The data processing method is applied to a data processing system, such as Figure 1 The data processing system 20 shown. Figure 8 As shown, the data processing method may include the following steps:

[0211] S810: The server receives a data storage request sent by the client, and determines data to be stored based on the data storage request.

[0212] S820. The server generates a first transaction request based on the data to be stored, and sends the first transaction request to the transaction processing end.

[0213] S830: The transaction processing end obtains the data to be stored in response to the first transaction request and generates a first transaction identifier.

[0214] S840: The transaction processing end sends a pre-commit request to each blockchain node based on the first transaction identifier and the data to be stored.

[0215] S850. The blockchain node obtains the data to be stored in response to the pre-submission request.

[0216] S860. The blockchain node executes a first transaction operation based on the data to be stored, stores the data to be stored in the local space, generates first transaction status information, and sends the first transaction status information to the transaction processing end; the first transaction status information is used to indicate whether the first transaction operation is successfully executed.

[0217] S870: When the status information of each first transaction indicates that the transaction is successfully executed, the transaction processing end sends a formal submission request to each blockchain node based on the first transaction identifier.

[0218] S880. The blockchain node executes a second transaction operation in response to the formal submission request, and writes the data to be stored in the local space into the data blockchain in the blockchain node.

[0219] S890. The transaction processing end feeds back second transaction status information to the service end based on the first transaction identifier; the second transaction status information indicates that the data is stored successfully.

[0220] S8010. The server sends a request feedback information of successful data storage to the client based on the second transaction status information.

[0221] It should be noted that the server in the embodiment of the present disclosure is a control unit in the server.

[0222] The specific implementation of steps S810-S8010 is similar to the implementation of the corresponding steps in the above embodiments of the present disclosure and is not limited here.

[0223] In the disclosed embodiments, a transaction processing terminal can be added between the server and the blockchain node during data processing, so that the transaction processing terminal triggers the transaction processing mechanism, and a two-phase commit transaction processing mechanism is used to store data, so as to ensure that when the transaction processing status corresponding to the pre-commit request of all blockchain nodes is that the transaction is successfully executed, a formal commit request is sent, so that all blockchain nodes write the data to be stored into the data blockchain stored therein, thereby greatly improving the consistency, integrity and high availability of data storage in the distributed system.

[0224] In the embodiments of the present disclosure, during data processing, such as data storage or data reading, multi-threading and distributed computing can be used to improve the processing speed of the data processing system; and / or, network communications can be optimized to ensure the efficiency of network bandwidth and communication protocols and reduce invalid data transmission.

[0225] In the embodiment of the present disclosure, the data processing system also includes a disaster recovery module, such as Figure 1 The disaster recovery end 26 is shown.

[0226] In some examples, the disaster recovery end can periodically perform snapshot operations on the data status in the data processing system, store snapshot files, and improve the data recovery capability of the system in the event of a disaster through the timed snapshot method.

[0227] In other examples, the disaster recovery end can perform off-site backup processing of data, copying data copies to different geographical locations to ensure that data can be restored in the event of a disaster.

[0228] Fig. 9 The structure diagram of a data processing device provided by the embodiment of the present disclosure is configured at the transaction processing end. Fig. 9 As shown, the data processing device 900 may include:

[0229] The information processing module 910 may be used to obtain the data to be stored and generate a first transaction identifier in response to the first transaction request sent by the server;

[0230] The pre-submission request sending module 920 can be used to send a pre-submission request to each blockchain node in the server based on the first transaction identifier and the data to be stored; the pre-submission request is used to trigger the blockchain node to perform the first transaction operation, so as to store the data to be stored in the local space of the blockchain node, and feedback the first transaction status information to the transaction processing end;

[0231] The formal submission request sending module 930 can be used to send a formal submission request to each blockchain node based on the first transaction identifier if each first transaction status information is that the transaction is successfully executed; the formal submission request is used to trigger the blockchain node to execute the second transaction operation to write the data to be stored in the local space into the data blockchain in the blockchain node;

[0232] The transaction status sending module 940 may be used to feed back second transaction status information to the server based on the first transaction identifier; the second transaction status information indicates that the data is stored successfully.

[0233] A data processing device provided by the embodiment of the present disclosure can respond to the first transaction request sent by the service end through the transaction processing end, obtain the data to be stored based on the first transaction request, and generate a first transaction identifier; based on the first transaction identifier and the data to be stored, send a pre-submission request to each blockchain node in the service end, so as to trigger the blockchain node to perform the first transaction operation and store the data to be stored in the local space of the blockchain node, and feedback the first transaction status information to the transaction processing end; if the first transaction status information corresponding to each blockchain node received is that the transaction is successfully executed, then send a formal submission request to each blockchain node based on the first transaction identifier, so as to trigger the blockchain node to perform the second transaction operation and write the data to be stored in the local space into the data blockchain in the blockchain node; then, based on the first transaction identifier, feedback the second transaction status information representing the successful data storage to the service end. Thus, the data to be stored can be stored and processed through the transaction processing mechanism of two-stage submission, and when all blockchain nodes respond to the pre-submission request and feedback that the storage operation can be successfully executed, send a formal submission request so that all blockchain nodes write the data to be stored into the data blockchain stored in it, avoiding the problem of data inconsistency caused by the storage failure of some blockchain nodes, and greatly improving the consistency, integrity and high availability of data storage in the distributed system.

[0234] In some embodiments, the data processing device 900 may further include:

[0235] The abort request sending module can be used to send an abort request to each blockchain node in the server based on the first transaction identifier after sending a pre-commit request to each blockchain node in the server, if any first transaction status information indicates that the transaction execution fails; the abort request is used to trigger the blockchain node to perform a rollback operation based on the rollback information to cancel the data to be stored in the local space; the rollback information is generated in the process of the blockchain node executing the first transaction operation, and the rollback information is used to record the status information of the blockchain node before executing the first transaction operation;

[0236] Based on the first transaction identifier, third transaction status information is fed back to the server; the third transaction status information indicates that data storage has failed.

[0237] In some embodiments, the data processing device 900 may further include:

[0238] The first data reading module may be used to obtain the query condition and the authority verification information in response to the second transaction request sent by the server if the data to be stored is encrypted data;

[0239] Based on the query conditions, a data query request is sent to at least one blockchain node; the data query request is used to trigger the blockchain node to perform a query operation based on the query conditions, and feed back the queried data to be stored to the transaction processing end;

[0240] Generate a data decryption request based on the data to be stored and the authority verification information, and send the data decryption request to the encryption unit in the server; the data decryption request is used to trigger the encryption unit to obtain a decryption key based on the data to be stored, and decrypt the data to be stored using a preset decryption algorithm based on the decryption key and the authority verification information to generate target read data;

[0241] The target read data fed back by the encryption unit is sent to the server.

[0242] The data processing device 900 provided in the embodiment of the present disclosure can execute each step of the data processing method corresponding to the transaction processing end provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0243] Fig.10 This is a schematic diagram of the structure of another data processing device provided in an embodiment of the present disclosure, which is configured on the server side. Fig.10 As shown, the data processing device 1000 may include:

[0244] The control unit 1010 is configured to:

[0245] Receive a data storage request sent by a client, and determine the data to be stored based on the data storage request;

[0246] Generate a first transaction request based on the data to be stored, and send the first transaction request to the transaction processing end; the first transaction request is used to trigger the transaction processing end to send a pre-submission request to each of the blockchain nodes based on the generated first transaction identifier and the data to be stored;

[0247] Blockchain node 1020 is used to:

[0248] In response to the pre-commit request, the data to be stored is obtained, and a first transaction operation is performed based on the data to be stored, so as to store the data to be stored in the local space, and generate first transaction status information; the first transaction status information is used to indicate whether the first transaction operation is successfully executed;

[0249] The first transaction status information is sent to the transaction processing end, so that when the transaction processing end determines that the first transaction status information fed back by each blockchain node is that the transaction is successfully executed, the formal submission request is sent to each blockchain node based on the first transaction identifier;

[0250] In response to the formal submission request, a second transaction operation is performed to write the to-be-stored data stored in the local space into the data blockchain.

[0251] In the disclosed embodiment, it is possible to receive a data storage request from a client, encrypt the data to be stored in the data storage request, obtain the data to be stored, and then generate a first transaction request based on the data to be stored, send the first transaction request to the transaction processing end, so that the transaction processing end triggers the transaction processing to check the data storage, that is, to ensure that all blockchain nodes can only execute the second transaction operation corresponding to the formal submission request when the first transaction status information is that the transaction is successfully executed, so as to perform data storage processing on the data to be stored corresponding to the data to be stored. Finally, based on the second transaction status information fed back by the transaction processing end, a request feedback information of successful data storage is sent to the client, thereby improving the consistency, integrity and high availability of data storage.

[0252] In some embodiments, the blockchain node 1020 can be used to generate rollback information during the execution of a first transaction operation after obtaining the data to be stored in response to a pre-commit request; the rollback information is used to record the status information of the blockchain node before executing the first transaction operation.

[0253] The blockchain node 1020 can also be used to, after sending the first transaction status information to the transaction processing end, respond to an abort request sent by the transaction processing end, and perform a rollback operation based on the rollback information to restore the blockchain node to the state before executing the first transaction operation; the abort request is generated by the transaction processing end based on the first transaction identifier when it is determined that any first transaction status information indicates a transaction execution failure.

[0254] In some embodiments, the control unit 1010 can be specifically used to parse a data storage request, obtain initial data, and send the initial data to an encryption unit on the server side; and receive the data to be stored sent by the encryption unit.

[0255] The data processing device 1000 may further include an encryption unit.

[0256] The encryption unit can be used to encrypt the initial data based on the encryption key using a preset encryption algorithm to generate data to be stored; the preset encryption algorithm at least includes the function of encrypting data fields corresponding to different data operation permissions to different degrees, and / or the function of encrypting dependent data fields based on dependent data fields.

[0257] In some embodiments, the control unit 1010 may also be used to send the data to be stored to each blockchain node before generating a first transaction request based on the data to be stored and sending the first transaction request to the transaction processing end.

[0258] Blockchain node 1020 can also be used to verify the data to be stored based on a consensus mechanism, and after verification by multiple blockchain nodes, the data to be stored is packaged into blocks for chain processing.

[0259] In some embodiments, the control unit 1010 may also be used to shard the data to be stored to generate multiple shard data before sending the data to be stored to each blockchain node;

[0260] Determine a first storage node for the shard data, and send the shard data to the first storage node for storage;

[0261] For any shard data, at least one copy of the shard data is generated, and each copy of the data is stored in a different second storage node; the second storage node is not the first storage node.

[0262] In some embodiments, the control unit 1010 may also be used to receive a data read request sent by a client, and obtain query conditions and authority verification information;

[0263] A second transaction request is generated based on the query conditions and the authority verification information, and the second transaction request is sent to the transaction processing end; the second transaction request is used to trigger the transaction processing end to send a data query request to at least one blockchain node based on the query conditions; the target read data fed back by the transaction processing end is received, and the target read data is sent to the client.

[0264] Blockchain node 1020 can also be used to respond to data query requests, perform query operations based on query conditions, and send the queried data to be stored to the transaction processing end; the data to be stored is used to trigger the transaction processing end to send a data decryption request to the encryption unit based on the data to be stored and authority verification information.

[0265] The encryption unit can also be used to respond to a decryption request, obtain a decryption key based on the data to be stored, and decrypt the data to be stored using a preset decryption algorithm based on the decryption key and authority verification information, generate target read data, and send the target read data to the transaction processing end.

[0266] In some embodiments, the control unit 1010 may also be used to receive second transaction status information fed back by the transaction processing end after the blockchain node responds to the formal submission request and executes the second transaction operation to write the to-be-stored data stored in the local space into the data blockchain, and send request feedback information of successful data storage to the client based on the second transaction status information;

[0267] And / or, receiving third transaction status information fed back by the transaction processing end, and sending request feedback information of data storage failure to the client based on the third transaction status information.

[0268] The data processing device 1000 provided in the embodiment of the present disclosure can execute each step of the data processing method corresponding to the server provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0269] It is worth noting that in the embodiment of the above-mentioned data processing device, the various modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be realized; in addition, the specific names of the various functional modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present disclosure.

[0270] Fig.11 The structure diagram of an electronic device provided by the embodiment of the present disclosure is shown in FIG. Fig.11 As shown, the electronic device 1100 includes one or more processors 1101 and a memory 1102 .

[0271] The processor 1101 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 1100 to perform desired functions.

[0272] The memory 1102 may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, a random access memory (RAM) and / or a cache memory (cache), etc. The non-volatile memory may include, for example, a read-only memory (ROM), a hard disk, a flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 1101 may run the program instructions to implement the data processing method of the embodiment of the present disclosure described above and / or other desired functions. Various contents such as data to be stored, transaction status information, etc. may also be stored in the computer-readable storage medium.

[0273] In one example, the electronic device 1100 may further include: an input device 1103 and an output device 1104, which are interconnected via a bus system and / or other forms of connection mechanisms (not shown). The input device 1103 may include, for example, a keyboard, a mouse, etc. The output device 1104 may output various information to the outside, including the determined first transaction state information, the generated data information to be stored, etc. The output device 1104 may include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, etc.

[0274] Of course, to simplify, Fig.11 Only some of the components related to the present disclosure in the electronic device 1100 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device 1100 may also include any other appropriate components.

[0275] In addition to the above-mentioned method and device, the embodiments of the present disclosure may also be a computer program product, which includes computer program instructions, and when the computer program instructions are executed by a processor, the processor executes the data processing method provided by the embodiments of the present disclosure.

[0276] The computer program product may be written in any combination of one or more programming languages ​​to write program code for performing the operations of the disclosed embodiments, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0277] In addition, the embodiments of the present disclosure may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the data processing method provided by the embodiments of the present disclosure.

[0278] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0279] It should be noted that the terms used in the present disclosure are only for describing specific embodiments, rather than limiting the scope of the present application. As shown in the present disclosure specification and claims, unless the context clearly indicates an exception, the words "one", "a", "a kind of" and / or "the" do not specifically refer to the singular, but may also include the plural. The term "and / or" includes any and all combinations of one or more related listed items. Relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. The term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method or device including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such process, method or device. In the absence of more restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method or device including the elements.

[0280] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A data processing method, characterized in that: Applied to the transaction processing end, including: In response to the first transaction request sent by the server, obtaining data to be stored and generating a first transaction identifier; Based on the first transaction identifier and the data to be stored, a pre-submission request is sent to each blockchain node in the server; the pre-submission request is used to trigger the blockchain node to perform a first transaction operation to store the data to be stored in the local space of the blockchain node, and to feed back first transaction status information to the transaction processing end; If each of the first transaction status information indicates that the transaction is successfully executed, a formal submission request is sent to each of the blockchain nodes based on the first transaction identifier; the formal submission request is used to trigger the blockchain node to perform a second transaction operation to write the data to be stored in the local space into the data blockchain in the blockchain node; Based on the first transaction identifier, second transaction status information is fed back to the server; the second transaction status information indicates that data storage is successful.

2. The method according to claim 1, characterized in that After sending a pre-submission request to each blockchain node in the server based on the first transaction identifier and the data to be stored, the method further includes: If any of the first transaction status information indicates that the transaction execution has failed, a termination request is sent to each of the blockchain nodes based on the first transaction identifier; the termination request is used to trigger the blockchain node to perform a rollback operation based on the rollback information to cancel the storage of the to-be-stored data in the local space; the rollback information is generated during the process of the blockchain node performing the first transaction operation, and the rollback information is used to record the status information of the blockchain node before performing the first transaction operation; Based on the first transaction identifier, third transaction status information is fed back to the server; the third transaction status information indicates that data storage fails.

3. The method according to claim 1, characterized in that If the data to be stored is encrypted data, the method further includes: In response to the second transaction request sent by the server, obtaining query conditions and authority verification information; Based on the query condition, a data query request is sent to at least one of the blockchain nodes; the data query request is used to trigger the blockchain node to perform a query operation based on the query condition, and feed back the queried data to be stored to the transaction processing end; Generate a data decryption request based on the data to be stored and the authority verification information, and send the data decryption request to the encryption unit in the server; the data decryption request is used to trigger the encryption unit to obtain a decryption key based on the data to be stored, and decrypt the data to be stored using a preset decryption algorithm based on the decryption key and the authority verification information to generate target read data; The target read data fed back by the encryption unit is sent to the server.

4. A data processing method, characterized in that: Applied to a server, the server includes a control unit and multiple blockchain nodes, and the method includes: The control unit receives a data storage request sent by a client, and determines data to be stored based on the data storage request; The control unit generates a first transaction request based on the data to be stored, and sends the first transaction request to the transaction processing end; the first transaction request is used to trigger the transaction processing end to send a pre-commit request to each of the blockchain nodes based on the generated first transaction identifier and the data to be stored; The blockchain node obtains the data to be stored in response to the pre-submission request, and performs a first transaction operation based on the data to be stored to store the data to be stored in a local space, and generates first transaction status information; the first transaction status information is used to indicate whether the first transaction operation is successfully executed; The blockchain node sends the first transaction status information to the transaction processing end, so that when the transaction processing end determines that the first transaction status information fed back by each blockchain node is that the transaction is successfully executed, the transaction processing end sends a formal submission request to each blockchain node based on the first transaction identifier; The blockchain node executes a second transaction operation in response to the formal submission request to write the to-be-stored data stored in the local space into the data blockchain.

5. The method according to claim 4, characterized in that After the blockchain node obtains the data to be stored in response to the pre-submission request, the method further includes: The blockchain node generates rollback information during the process of executing the first transaction operation; the rollback information is used to record the state information of the blockchain node before executing the first transaction operation; After the blockchain node sends the first transaction status information to the transaction processing end, the method further includes: The blockchain node responds to the abort request sent by the transaction processing end and performs a rollback operation based on the rollback information to restore the blockchain node to a state before executing the first transaction operation; the abort request is generated by the transaction processing end based on the first transaction identifier when it is determined that any of the first transaction status information indicates a transaction execution failure.

6. The method according to claim 4, characterized in that The control unit determines the data to be stored based on the data storage request, including: The control unit parses the data storage request, obtains initial data, and sends the initial data to the encryption unit of the server; The encryption unit encrypts the initial data using a preset encryption algorithm based on an encryption key to generate the data to be stored; the preset encryption algorithm at least includes a function of encrypting data fields corresponding to different data operation permissions to different degrees, and / or a function of encrypting a dependent data field based on a dependent data field; The control unit receives the data to be stored sent by the encryption unit.

7. The method according to any one of claims 4 to 6, characterized in that: Before the control unit generates a first transaction request based on the data to be stored and sends the first transaction request to the transaction processing end, the method further includes: The control unit sends the data to be stored to each of the blockchain nodes; The blockchain node verifies the data to be stored based on a consensus mechanism, and after verification by multiple blockchain nodes, packages the data to be stored into a block for chain processing.

8. The method according to claim 7, characterized in that Before the control unit sends the data to be stored to each of the blockchain nodes, the method further includes: The control unit slices the data to be stored into pieces to generate a plurality of slice data; The control unit determines a first storage node for the shard data, and sends the shard data to the first storage node for storage; The control unit generates at least one copy of the shard data for any of the shard data, and stores each copy of the shard data in a different second storage node; the second storage node is not the first storage node.

9. The method according to claim 6, characterized in that The method further comprises: The control unit receives the data reading request sent by the client and obtains the query condition and authority verification information; The control unit generates a second transaction request based on the query condition and the authority verification information, and sends the second transaction request to the transaction processing end; the second transaction request is used to trigger the transaction processing end to send a data query request to at least one of the blockchain nodes based on the query condition; The blockchain node responds to the data query request, performs a query operation based on the query condition, and sends the queried data to be stored to the transaction processing end; the data to be stored is used to trigger the transaction processing end to send a data decryption request to the encryption unit based on the data to be stored and the authority verification information; The encryption unit obtains a decryption key based on the data to be stored in response to the decryption request, and decrypts the data to be stored using a preset decryption algorithm based on the decryption key and the authority verification information to generate target read data, and sends the target read data to the transaction processing end; The control unit receives the target read data fed back by the transaction processing end, and sends the target read data to the client.

10. The method according to claim 4, characterized in that After the blockchain node executes a second transaction operation in response to the formal submission request to write the to-be-stored data stored in the local space into the data blockchain, the method further includes: The control unit receives the second transaction status information fed back by the transaction processing end, and sends a request feedback information of successful data storage to the client based on the second transaction status information; And / or, the control unit receives third transaction status information fed back by the transaction processing end, and sends request feedback information of data storage failure to the client based on the third transaction status information.

11. A data processing method, characterized in that: include: The server receives a data storage request sent by the client, and determines the data to be stored based on the data storage request; The server generates a first transaction request based on the data to be stored, and sends the first transaction request to the transaction processing end; The transaction processing end obtains the data to be stored in response to the first transaction request, and generates a first transaction identifier; The transaction processing end sends a pre-submission request to each blockchain node based on the first transaction identifier and the data to be stored; The blockchain node obtains the data to be stored in response to the pre-submission request; The blockchain node performs a first transaction operation based on the data to be stored, stores the data to be stored in a local space, generates first transaction status information, and sends the first transaction status information to the transaction processing end; The first transaction status information is used to indicate whether the first transaction operation is successfully executed; When each of the first transaction status information indicates that the transaction is successfully executed, the transaction processing end sends a formal submission request to each of the blockchain nodes based on the first transaction identifier; The blockchain node executes a second transaction operation in response to the formal submission request, and writes the data to be stored in the local space into the data blockchain in the blockchain node; The transaction processing end feeds back second transaction status information to the service end based on the first transaction identifier; The second transaction status information indicates that the data is stored successfully.

12. A data processing device, characterized in that: Configured on the transaction processing side, including: An information processing module, configured to obtain data to be stored and generate a first transaction identifier in response to a first transaction request sent by the server; A pre-submission request sending module, used to send a pre-submission request to each blockchain node in the server based on the first transaction identifier and the data to be stored; the pre-submission request is used to trigger the blockchain node to perform a first transaction operation to store the data to be stored in the local space of the blockchain node, and feedback the first transaction status information to the transaction processing end; A formal submission request sending module, configured to send a formal submission request to each of the blockchain nodes based on the first transaction identifier if each of the first transaction status information indicates that the transaction is successfully executed; the formal submission request is used to trigger the blockchain node to perform a second transaction operation to write the data to be stored in the local space into the data blockchain in the blockchain node; The transaction status sending module is used to feed back second transaction status information to the server based on the first transaction identifier; the second transaction status information indicates that data storage is successful.

13. A data processing device, characterized in that: Configuration on the server side includes: Control unit for: Receive a data storage request sent by a client, and determine data to be stored based on the data storage request; Generate a first transaction request based on the data to be stored, and send the first transaction request to the transaction processing end; the first transaction request is used to trigger the transaction processing end to send a pre-commit request to each blockchain node based on the generated first transaction identifier and the data to be stored; The blockchain node is used to: In response to the pre-commit request, the data to be stored is obtained, and a first transaction operation is performed based on the data to be stored, so as to store the data to be stored in a local space, and generate first transaction status information; the first transaction status information is used to indicate whether the first transaction operation is successfully executed; Sending the first transaction status information to the transaction processing end, so that when the transaction processing end determines that the first transaction status information fed back by each of the blockchain nodes is that the transaction is successfully executed, the transaction processing end sends a formal submission request to each of the blockchain nodes based on the first transaction identifier; In response to the formal submission request, a second transaction operation is performed to write the to-be-stored data stored in the local space into the data blockchain.

14. An electronic device, characterized in that: The electronic device comprises: Processor and memory; The processor is used to execute the data processing method according to any one of claims 1 to 11 by calling the program or instruction stored in the memory.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program or an instruction, wherein the program or the instruction enables a computer to execute the data processing method according to any one of claims 1 to 11.

16. A data processing system, characterized in that: include: The service end and transaction processing end of the communication connection; wherein, The server is used to execute the data processing method according to any one of claims 4 to 10; The transaction processing end is used to execute the data processing method as described in any one of claims 1 to 3.