A blockchain data interaction method and system

By encrypting and processing business information and using message queues and relational databases in blockchain data interaction methods, the problem of low efficiency of blockchain transaction processing is solved, data privacy protection and transaction efficiency are improved, and decentralized applications are supported development.

CN112860805BActive Publication Date: 2024-12-10INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110355174.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-01
Publication Date
2024-12-10
Estimated Expiration
2041-04-01

AI Technical Summary

Technical Problem

The low efficiency of blockchain transaction processing has led to performance bottlenecks, which seriously restricts the development of decentralized applications.

Method used

By introducing a pre-service device to encrypt the business information in the blockchain data interaction method, and broadcast the encrypted information to the blockchain, the blockchain node only agrees on the transaction data and uses message queues and relationship types Databases store and search data to improve the synchronization and retrieval efficiency of transaction information.

Benefits of technology

Effectively protect the privacy of data on the chain, while ensuring the authenticity of information on the chain, improving the efficiency and performance of blockchain transaction processing, and supporting the development of decentralized applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112860805B_ABST
    Figure CN112860805B_ABST
Patent Text Reader

Abstract

A blockchain data interaction method and system provided by the present application can be used in the field of blockchain technology and other fields. The method includes: a front-end service device receives transaction information generated by a transaction, the transaction information includes transaction data and business information, and encrypts the business information, and broadcasts the transaction data and the encrypted business information to the blockchain; the blockchain node receives the transaction data and the encrypted business information, and reaches a consensus on the transaction data. If the consensus is passed, the blockchain node persists the transaction data and the encrypted business information; the front-end service device encrypts the business information in the transaction information and processes the key information on the chain. In this way, when the transaction information is put on the chain, the blockchain node only reaches a consensus on the transaction data, and the business information is encrypted information, which can effectively protect the privacy of the data on the chain. At the same time, based on the technical characteristics of the blockchain that cannot be tampered with, the authenticity of the information on the chain is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of blockchain technology, and specifically to a blockchain data interaction method and system. Background Art

[0002] At present, the blockchain craze has swept all walks of life and has become one of the hottest and most watched information technologies. The characteristics of blockchain technology are decentralization, openness, transparency, immutability and trustworthiness. With the development of blockchain technology, more and more individuals and companies have begun to use blockchain technology to solve some problems.

[0003] However, one of the bottlenecks for the widespread application of blockchain is the performance bottleneck of low transaction processing efficiency. Both public chain and consortium chain blockchain solutions cannot compete with centralized solutions such as Visa payment system and Alibaba Cloud Computing. Therefore, the performance bottleneck of blockchain has seriously restricted the development of decentralized applications. Summary of the invention

[0004] In response to the problems in the prior art, the present application provides a blockchain data interaction method and system, which encrypts part of the information on the chain, effectively protects the privacy of the data on the chain, and at the same time, based on the tamper-proof technical characteristics of the blockchain, ensures the authenticity of the information on the chain.

[0005] In order to solve the above technical problems, this application provides the following technical solutions:

[0006] In a first aspect, the present application provides a blockchain data interaction method, which is performed by a front-end service device, including:

[0007] Receiving transaction information generated by a transaction; the transaction information includes transaction data and business information;

[0008] The business information is encrypted, and the transaction data and the encrypted business information are broadcast to the blockchain, so that after the blockchain reaches a consensus on the transaction data, the transaction data and the encrypted business information are persisted.

[0009] Furthermore, broadcasting the transaction data and the encrypted business information to the blockchain includes:

[0010] Sending the transaction data and the encrypted business information to the corresponding blockchain node;

[0011] The transaction data and the encrypted business information are stored in a relational database.

[0012] Furthermore, sending the transaction data and the encrypted business information to a corresponding blockchain node includes:

[0013] Sending the transaction data and the encrypted business information to a designated message queue, so that the transaction data and the encrypted business information form a business message in the designated message queue;

[0014] The service message is sent to the subscription node.

[0015] Furthermore, storing the transaction data and the encrypted business information in a relational database includes:

[0016] Performing format conversion on the transaction data and the encrypted business information;

[0017] Generate a correspondence between the transaction data and the encrypted business information according to the converted transaction data and the encrypted business information;

[0018] The transaction data is generated according to the converted transaction data and the encrypted business information, and a relational database is generated according to the corresponding relationship between the transaction data and the encrypted business information.

[0019] In a second aspect, the present application provides a blockchain data interaction method, which is executed by a blockchain node, including:

[0020] Receiving transaction data and encrypted business information, wherein the transaction data and business information are generated by a front-end service device according to transaction information generated by a transaction, and the encryption key is a private key of the front-end service device;

[0021] Reaching consensus on the transaction data;

[0022] If the consensus is passed, the transaction data and encrypted business information will be persisted.

[0023] In a third aspect, the present application provides a blockchain data interaction method, comprising:

[0024] The front-end service device receives transaction information generated by a transaction, wherein the transaction information includes transaction data and business information;

[0025] The front-end service device encrypts the business information, and broadcasts the transaction data and the encrypted business information to the blockchain;

[0026] The blockchain node receives the transaction data and the encrypted business information, and reaches a consensus on the transaction data;

[0027] If the consensus is passed, the blockchain node will persist the transaction data and the encrypted business information.

[0028] In a fourth aspect, the present application provides a front-end service device, including:

[0029] Information receiving module: receiving transaction information generated by a transaction; the transaction information includes transaction data and business information;

[0030] Information broadcast module: encrypt the business information, broadcast the transaction data and the encrypted business information to the blockchain, so that after the blockchain reaches a consensus on the transaction data, the transaction data and the encrypted business information are persisted.

[0031] Furthermore, the information broadcast module includes:

[0032] Message queue service unit: sending the transaction data and the encrypted business information to the corresponding blockchain node;

[0033] Relational database unit: stores the transaction data and the encrypted business information in a relational database.

[0034] Furthermore, the message queue service unit includes:

[0035] Message queue component: sending the transaction data and the encrypted business information to a designated message queue, so that the transaction data and the encrypted business information form a business message in the designated message queue;

[0036] Message sending component: sends the business message to the subscription node.

[0037] Furthermore, the relational database unit includes:

[0038] Information processing component: converting the format of the transaction data and the encrypted business information;

[0039] Information association component: generates the correspondence between transaction data and encrypted business information based on the converted transaction data and encrypted business information;

[0040] Relational database component: generates transaction data according to the converted transaction data and the encrypted business information, as well as the corresponding relationship between the transaction data and the encrypted business information, and generates a relational database.

[0041] In a fifth aspect, the present application provides a blockchain node, including:

[0042] Data receiving module: receiving a transaction data and an encrypted business information, wherein the transaction data and the business information are generated by a front-end service device according to the transaction information generated by a transaction, and the encryption key is the private key of the front-end service device;

[0043] Data consensus module: consensus on the transaction data;

[0044] Data persistence module: If the consensus is passed, the transaction data and encrypted business information will be persisted.

[0045] In a sixth aspect, the present application provides a blockchain data interaction system, comprising: a front-end service device and a plurality of blockchain nodes forming a blockchain;

[0046] The front-end service device is used to receive transaction information generated by a transaction, the transaction information including transaction data and business information, encrypt the business information, and broadcast the transaction data and the encrypted business information to the blockchain;

[0047] The blockchain node is used to receive the transaction data and the encrypted business information, and to reach a consensus on the transaction data. If the consensus is passed, the transaction data and the encrypted business information are persisted.

[0048] In a seventh aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the blockchain data interaction method when executing the program.

[0049] In an eighth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the blockchain data interaction method when executed by a processor.

[0050] It can be seen from the above technical solution that the present application provides a blockchain data interaction method and system, the method comprising: a front-end service device receives transaction information generated by a transaction, the transaction information includes transaction data and business information, and encrypts the business information, and broadcasts the transaction data and the encrypted business information to the blockchain; the blockchain node receives the transaction data and the encrypted business information, and reaches a consensus on the transaction data. If the consensus is passed, the blockchain node persists the transaction data and the encrypted business information; the front-end service device encrypts the business information in the transaction information, and processes the key information on the chain. In this way, when the transaction information is put on the chain, the blockchain node only reaches a consensus on the transaction data, and the business information is encrypted information, which can effectively protect the privacy of the data on the chain, and at the same time, based on the technical characteristics of the blockchain that cannot be tampered with, the authenticity of the information on the chain is guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0052] Figure 1It is a flow chart of the front-end service device in the blockchain data interaction method in the embodiment of the present application.

[0053] Figure 2 It is a flowchart of step 200 in the blockchain data interaction method in an embodiment of the present application.

[0054] Figure 3 It is a flowchart of step 201 in the blockchain data interaction method in an embodiment of the present application.

[0055] Figure 4 It is a flowchart of step 202 in the blockchain data interaction method in an embodiment of the present application.

[0056] Figure 5 It is a flow chart of blockchain nodes in the blockchain data interaction method in the embodiment of the present application.

[0057] Figure 6 It is a flowchart of the blockchain data interaction method in an embodiment of the present application.

[0058] Figure 7 It is a structural diagram of the front-end service device in an embodiment of the present application.

[0059] Figure 8 It is a structural diagram of the information broadcast module of the front-end service device in an embodiment of the present application.

[0060] Fig. 9 It is a structural diagram of a front-end service device in an embodiment of the present application.

[0061] Fig.10 It is a schematic diagram of the structure of the blockchain node in the embodiment of the present application.

[0062] Fig.11 It is a structural diagram of the blockchain data interaction system provided by the application example of this application.

[0063] Fig.12 It is a flowchart of node data synchronization provided by the application example of this application.

[0064] Fig.13 This is a schematic diagram of the blockchain transaction process provided by the application example of this application.

[0065] Fig.14 It is a schematic diagram of the structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0066] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0067] It should be noted that the blockchain data interaction method, blockchain data interaction system and front-end service device disclosed in the present application can be used in the field of blockchain technology, and can also be used in any field outside the field of blockchain technology. The application field of the blockchain data interaction method, blockchain data interaction system and front-end service device disclosed in the present application is not limited.

[0068] Considering that one of the bottlenecks for the widespread application of existing blockchains is the performance bottleneck of low transaction processing efficiency, which seriously restricts the development of decentralized applications, the present application provides a blockchain data interaction method, a front-end service device, a blockchain data interaction system, an electronic device and a computer-readable storage medium. The front-end service device encrypts part of the information on the chain and broadcasts the encrypted information to the blockchain, which can effectively protect the privacy of the data on the chain. At the same time, based on the tamper-proof technical characteristics of the blockchain, the authenticity of the information on the chain is guaranteed.

[0069] Based on the above content, the present application also provides a blockchain data interaction system for implementing the blockchain data interaction method provided in one or more embodiments of the present application. The blockchain data interaction system includes a front-end service device and multiple blockchain nodes. The front-end service device can be communicated with the client device. The client terminal device can be provided with multiple ones. The blockchain data interaction system can specifically access the client terminal device through an application server.

[0070] Among them, the blockchain data interaction system includes a front-end service device and multiple blockchain nodes. The front-end service device can receive transaction information from a client terminal device. The transaction information includes transaction data and business information. The business information is non-data information in the transaction information. The front-end service device encrypts the business information and broadcasts the transaction data and the encrypted business information to the blockchain. The blockchain reaches a consensus on the transaction data. If the consensus is passed, the blockchain will persist the transaction data and the encrypted business information.

[0071] It is to be understood that the client device may include a smart phone, a tablet electronic device, a portable computer, a desktop computer, a personal digital assistant (PDA), etc.

[0072] The above-mentioned client device may have a communication module (i.e., a communication unit), which can be connected to a remote server for communication and data transmission with the server. For example, the communication unit may send transaction information to the server of the front-end service device so that the front-end service device encrypts and processes the transaction information and broadcasts it to the blockchain; the communication unit may also send transaction data and encrypted business information to the blockchain. The communication unit may also receive the identification result returned by the server. The server may include a single computer device, or a server cluster consisting of multiple servers, or a server structure of a distributed device.

[0073] The server and the client device may communicate with each other using any suitable network protocol, including network protocols that have not yet been developed on the date of filing this application. The network protocols may include, for example, TCP / IP, UDP / IP, HTTP, HTTPS, etc. Of course, the network protocols may also include, for example, RPC (Remote Procedure Call Protocol) and REST (Representational State Transfer) protocols used on top of the above protocols.

[0074] The blockchain data interaction method, front-end service device, blockchain data interaction system, electronic device and computer-readable storage medium provided by the present application, the front-end service device encrypts the business information in the transaction information and processes the key information on the chain, so that the partially encrypted transaction information is uploaded to the chain, the blockchain nodes only reach a consensus on the transaction data, and the business information is encrypted information, which can effectively protect the privacy of the data on the chain, and at the same time, based on the technical characteristics of the blockchain that cannot be tampered with, the authenticity of the information on the chain is guaranteed.

[0075] The details are described through the following multiple embodiments and application examples.

[0076] In order to solve the bottleneck of low transaction processing efficiency, which is one of the bottlenecks for the widespread application of existing blockchains, and the performance bottleneck seriously restricts the development of decentralized applications, this application provides an embodiment of a blockchain data interaction method, which is executed by a front-end service device, see Figure 1 , the blockchain data interaction method specifically includes the following contents:

[0077] Step 100: Receive transaction information generated by a transaction; the transaction information includes transaction data and business information.

[0078] In step 100, the front-end service device divides the transaction information generated by the transaction into transaction data and business information, where the business information is non-data information in the transaction. For example, a transaction information is: at 14:00 on December 26, 2020, A purchased a car worth 20,000 yuan from B at M. In this transaction, the transaction data is a car and 20,000 yuan, and the business information is December 26, 2020, 14:00, A, B, M, and the relationship between A and B. After receiving the transaction information, the front-end service device parses the transaction information and divides the transaction information into transaction data and business information.

[0079] Step 200: Encrypt the business information, broadcast the transaction data and the encrypted business information to the blockchain, so that after the blockchain reaches a consensus on the transaction data, the transaction data and the encrypted business information are persisted.

[0080] It is understandable that the encrypted key is stored in the front-end service device, and the key identifier needs to be sent when it is used. The front-end service device uses hardware encryption machine technology to directly access the encryption machine instructions to encrypt the business information in the transaction information. The front-end service device broadcasts the transaction data and the encrypted business information to the blockchain, so that after the blockchain reaches a consensus on the transaction data, the transaction data and the encrypted business information are persisted, which can ensure the privacy of the business information on the chain while ensuring the real-time synchronization of the transaction data. The blockchain can adopt consensus mechanisms such as Pow proof of work, Pos proof of equity, DPos share authorization proof mechanism, Pool verification pool, and Byzantine fault tolerance algorithm proof.

[0081] From the above description, it can be seen that in the blockchain data interaction method provided in the embodiment of the present application, the front-end service device encrypts the business information in the transaction information and processes the key information on the chain. In this way, the transaction information is uploaded to the chain, and the blockchain nodes only reach a consensus on the transaction data, while the business information is encrypted information, which can effectively protect the privacy of the data on the chain. At the same time, based on the tamper-proof technical characteristics of the blockchain, the authenticity of the information on the chain is guaranteed.

[0082] In order to further improve the efficiency of transaction information synchronization, in one embodiment of the blockchain data interaction method provided in this application, a preferred method for node data synchronization is provided, see Figure 2 In step 200 of the blockchain data interaction method, broadcasting the transaction data and the encrypted business information to the blockchain specifically includes the following contents:

[0083] Step 201: Send the transaction data and the encrypted business information to the corresponding blockchain node.

[0084] It is understandable that the front-end service device sends the transaction data and encrypted business information to all corresponding blockchain nodes in the blockchain. The blockchain can adopt consensus mechanisms such as Pow proof of work, Pos proof of equity, DPos share authorization proof mechanism, Pool verification pool, Byzantine fault tolerance algorithm proof, etc. In some specific implementations, the blockchain transaction consensus is determined by the Byzantine fault tolerance (PBFT) algorithm.

[0085] Step 202: Store the transaction data and the encrypted business information in a relational database.

[0086] As you can understand, a relational database is a type of database that stores and provides access to data points that are related to each other. Relational databases are based on the relational model, which is an intuitive and direct way to represent data in tables. The relational model refers to a two-dimensional table model, so a relational database is a data organization consisting of two-dimensional tables and the connections between them. A table is a collection of data organized in the form of rows and columns. A database consists of one or more tables. For example, there may be a table called authors with information about authors. Each column contains a specific type, such as the author's last name. Each row contains all the information about a specific author: name, address, etc. In a relational database, a table is a relationship, and a relational database can contain multiple tables. In a relational database, each row in a table is a record, which has a unique ID (called a key). The columns of the table hold the attributes of the data, and each record usually has a value for each attribute, which makes it easy to establish relationships between data points.

[0087] The transaction data and encrypted business information are stored in a two-dimensional table to form a relational database, which can provide data storage, data retrieval and other services. Specifically, the transaction data and encrypted business information are integrated, summarized and abstracted to form a data model independent of the specific DBMS, which can be represented by an entity-relationship model, and then converted into a set of relational models supported by the selected relational database management system RDBMS and a physical structure suitable for the application environment is selected, including storage structure and access method.

[0088] From the above description, it can be seen that in the blockchain data interaction method provided by the embodiment of the present application, the front-end service device converts the format of the block data and stores it in the relational database. In this way, the business party can quickly complete some query-type business transactions through complex data retrieval. The key content of the business data is encrypted by the hardware encryption machine, which can also effectively protect the security of the data. The functions such as data retrieval, event notification, data chaining and format conversion commonly used in the business system are encapsulated to improve the processing efficiency of some blockchain transactions and strengthen the protection capability of chained data.

[0089] In order to further improve the efficiency of transaction information synchronization, in one embodiment of the blockchain data interaction method provided in this application, a preferred method for sharing transaction data is provided, see Figure 3 , step 201 in the blockchain data interaction method specifically includes the following contents:

[0090] Step 211: Send the transaction data and the encrypted business information to a designated message queue, so that the transaction data and the encrypted business information form a business message in the designated message queue.

[0091] It can be understood that message queue technology is a technology for exchanging information between distributed applications. One end continuously writes messages to the message queue, while the other end can read the messages in the queue. The message publisher only publishes the message to the message queue without caring who takes it, and the message user only takes the message from the message queue without caring who publishes it. In this way, the publisher and the user do not need to know the existence of each other. The message queue can reside in memory or on disk, and the queue stores messages until they are read by the application. Through the message queue, applications can perform tasks independently. They do not need to know each other's location or wait for the receiving program to receive the message before continuing to execute. The transaction data and encrypted business information are encapsulated as a message and stored in the specified message queue.

[0092] Step 212: Send the service message to the subscription node.

[0093] It can be understood that the blockchain node subscribes to the message queue, and after receiving the message, the message queue sends the message to the subscribed blockchain node.

[0094] From the above description, it can be seen that in the blockchain data interaction method provided by the embodiment of the present application, when the message queue server is not used, the transaction data is sent directly to the blockchain. In the case of high concurrency, the data sending pressure of the front-end service device increases dramatically, which slows down the response speed. However, after using the message queue, the front-end service device returns immediately after sending the transaction data to the message queue, and then the subscription node of the message queue obtains the data from the message queue and stores it asynchronously to the blockchain node. Since the processing speed of the message queue server is faster than the transaction data sending speed of the front-end service device, the performance of the blockchain is greatly improved.

[0095] In order to further improve the efficiency of transaction information synchronization, in one embodiment of the blockchain data interaction method provided in this application, a preferred method for storing transaction data is provided, see Figure 4 , step 202 in the blockchain data interaction method specifically includes the following content:

[0096] Step 221: Convert the format of the transaction data and the encrypted business information.

[0097] It is understandable that relational databases support multiple relational databases such as Oracle and MySQL, which makes it easy to choose which database to use according to different business scenarios and provide data storage, retrieval and other services to other units. Parse transaction data and encrypted business information, and convert transaction data and encrypted business information into a format that can be stored in a relational database.

[0098] Step 222: Generate a correspondence between the transaction data and the encrypted business information based on the converted transaction data and the encrypted business information.

[0099] It is understandable that in a relational database, each row in a table is a record, and the record has a unique ID (called a key). The columns of the table store the attributes of the data, and each record usually has a value for each attribute. According to the unique ID and attribute value of the transaction data and the encrypted business information, a relational table of the transaction data and the encrypted business information is established. Specifically, the transaction data and the encrypted business information are integrated, summarized and abstracted to form a data model independent of the specific DBMS, which can be represented by an entity-relationship model, and then converted into a set of relational models supported by the selected relational database management system RDBMS and a physical structure suitable for the application environment is selected for it, including storage structure and access method.

[0100] Step 223: Generate transaction data based on the converted transaction data and the encrypted business information, as well as the corresponding relationship between the transaction data and the encrypted business information, and generate a relational database.

[0101] It is understandable that a database includes one or more tables. For example, there may be a table called authors with information about authors. Each column contains a specific type, such as the author's last name. Each row contains all the information about a specific author: name, address, etc. In a relational database, a table is a relationship, and a relational database can contain multiple tables. A relational database is established based on the relational table of transaction data and encrypted business information. The transaction data and encrypted business information are stored in a two-dimensional table to form a relational database, which can provide data storage, data retrieval and other services.

[0102] From the above description, it can be seen that the blockchain data interaction method provided in the embodiment of the present application completes the real-time synchronization and format conversion of the on-chain data through the front-end service device, so that the business system can perform complex data retrieval and improve the efficiency of business transactions such as complex queries.

[0103] In order to solve the bottleneck of low transaction processing efficiency, which is one of the bottlenecks for the widespread application of existing blockchains, and the performance bottleneck seriously restricts the development of decentralized applications, this application provides an embodiment of a blockchain data interaction method, which is executed by a blockchain node, see Figure 5 , the blockchain data interaction method specifically includes the following contents:

[0104] Step 300: receiving a transaction data and an encrypted business information, wherein the transaction data and the business information are generated by a front-end service device according to the transaction information generated by a transaction, and the encryption key is the private key of the front-end service device.

[0105] It is understandable that the front-end service device classifies transaction information into transaction data and business information, and the business information is non-data information in the transaction. For example, a transaction information is: at 14:00 on December 26, 2020, A purchased a car worth 20,000 yuan from B at M. In this transaction, the transaction data is a car and 20,000 yuan, and the business information is December 26, 2020, 14:00, A, B, M, and the relationship between A and B. The front-end service device encrypts the business information with its own private key.

[0106] Step 400: reaching consensus on the transaction data.

[0107] Step 500: If the consensus is passed, the transaction data and encrypted business information are persisted.

[0108] It can be understood that the blockchain node is the transaction consensus for upgrading information. The transaction consensus is determined by the Byzantine Fault Tolerance (PBFT) algorithm. When the transaction is considered to have reached a consensus, the new block and its transaction can be submitted to the local blockchain and status database.

[0109] From the above description, it can be seen that the blockchain data interaction method provided in the embodiment of the present application encrypts the business information in the transaction information through the front-end service device and processes the key information on the chain. In this way, the transaction information is uploaded to the chain, and the blockchain nodes only reach a consensus on the transaction data, while the business information is encrypted information, which can effectively protect the privacy of the data on the chain. At the same time, based on the technical characteristics of the blockchain that cannot be tampered with, the authenticity of the information on the chain is guaranteed.

[0110] In order to solve the problem that one of the bottlenecks for the widespread application of existing blockchains is the performance bottleneck of low transaction processing efficiency, which seriously restricts the development of decentralized applications, this application provides an embodiment of a blockchain data interaction method, see Figure 6 , the blockchain data interaction method specifically includes the following contents:

[0111] Step 600: The front-end service device receives transaction information generated by a transaction, wherein the transaction information includes transaction data and business information;

[0112] Step 700: The front-end service device encrypts the business information and broadcasts the transaction data and the encrypted business information to the blockchain;

[0113] Step 800: The blockchain node receives the transaction data and the encrypted business information, and reaches a consensus on the transaction data;

[0114] Step 900: If the consensus is passed, the blockchain node will persist the transaction data and the encrypted business information.

[0115] It is understandable that the transaction information generated by the transaction includes transaction data and business information, and the business information is non-data information in the transaction. For example, a transaction information is: at 14:00 on December 26, 2020, A purchased a car worth 20,000 yuan from B at M. In this transaction, the transaction data is a car and 20,000 yuan, and the business information is December 26, 2020, 14:00, A, B, M, and the relationship between A and B. The encrypted key is stored in the front-end service device, and the key identifier needs to be sent when it is used. The front-end service device adopts hardware encryption machine technology and directly accesses the encryption machine instructions to realize the encryption of business information in the transaction information. The front-end service device broadcasts the transaction data and the encrypted business information to the blockchain, so that after the blockchain passes the consensus on the transaction data, the transaction data and the encrypted business information will be persisted, which can ensure the privacy of the business information on the chain while ensuring the real-time synchronization of the transaction data.

[0116] From the above description, it can be seen that the blockchain data interaction method provided in the embodiment of the present application encrypts the business information in the transaction information through the front-end service device and processes the key information on the chain. In this way, the transaction information is uploaded to the chain, and the blockchain nodes only reach a consensus on the transaction data, while the business information is encrypted information, which can effectively protect the privacy of the data on the chain. At the same time, based on the technical characteristics of the blockchain that cannot be tampered with, the authenticity of the information on the chain is guaranteed.

[0117] From the software level, in order to solve the problem of low performance of blockchain transaction data processing, an embodiment of the front-end service device provided in this application is shown in FIG. Figure 7 , the front-end service device specifically includes the following contents:

[0118] Information receiving module 10: receiving transaction information generated by a transaction; the transaction information includes transaction data and business information;

[0119] It is understandable that the information receiving module 10 divides the transaction information generated by the transaction into transaction data and business information, and the business information is non-data information in the transaction. For example, a transaction information is: at 14:00 on December 26, 2020, A purchased a car worth 20,000 yuan from B at M. In this transaction, the transaction data is a car and 20,000 yuan, and the business information is December 26, 2020, 14:00, A, B, M, and the relationship between A and B. After receiving the transaction information, the information receiving module 10 parses the transaction information and divides the transaction information into transaction data and business information.

[0120] Information broadcast module 11: Encrypt the business information, broadcast the transaction data and the encrypted business information to the blockchain, so that after the blockchain reaches a consensus on the transaction data, the transaction data and the encrypted business information are persisted.

[0121] It is understandable that the information broadcast module 11 includes an encryption service unit, and the private key of the front-end service device is centrally stored by the encryption service unit in the information broadcast module 11. When using it, the key identifier needs to be sent. The information broadcast module 11 adopts hardware encryption machine technology and directly accesses the encryption machine instructions to encrypt the business information in the transaction information. After the encryption process is completed, the information broadcast module 11 broadcasts the transaction data and the encrypted business information to the blockchain. The blockchain reaches a consensus on the transaction data. If the consensus is passed, the transaction data is completed and chained. The blockchain can adopt consensus mechanisms such as Pow proof of work, Pos proof of equity, DPos share authorization proof mechanism, Pool verification pool, and Byzantine fault tolerance algorithm proof.

[0122] From the above description, it can be seen that the front-end service device method provided in the embodiment of the present application encrypts the business information in the transaction information and processes the key information on the chain. In this way, the transaction information is uploaded to the chain, and the blockchain nodes only reach a consensus on the transaction data, while the business information is encrypted information, which can effectively protect the privacy of the data on the chain. At the same time, based on the tamper-proof technical characteristics of the blockchain, the authenticity of the information on the chain is guaranteed.

[0123] In order to further improve the efficiency of transaction information synchronization, in one embodiment of the front-end service device provided in the present application, a preferred method for node data synchronization is provided, see Figure 8 , the information broadcast module 11 specifically includes the following contents:

[0124] Message queue service unit 101: sends the transaction data and the encrypted business information to the corresponding blockchain node.

[0125] It is understandable that the message queue service unit 101 sends the transaction data and encrypted business information to all corresponding blockchain nodes in the blockchain, and the blockchain transaction consensus is determined by the Byzantine Fault Tolerance (PBFT) algorithm. The message queue service unit 101 follows the AMQP protocol and provides a loosely coupled method for constructing distributed applications implemented in a synchronous or asynchronous manner. The API call of the message queue service unit 101 is embedded in the blockchain node and the information receiving module, and provides information exchange by sending messages to or reading from a memory or disk-based queue.

[0126] The relational database unit 102 stores the transaction data and the encrypted business information in a relational database.

[0127] As you can understand, a relational database is a type of database that stores and provides access to data points that are related to each other. Relational databases are based on the relational model, which is an intuitive and direct way to represent data in tables. The relational model refers to a two-dimensional table model, so a relational database is a data organization consisting of two-dimensional tables and the connections between them. A table is a collection of data organized in the form of rows and columns. A database consists of one or more tables. For example, there may be a table called authors with information about authors. Each column contains a specific type, such as the author's last name. Each row contains all the information about a specific author: name, address, and so on.

[0128] In a relational database, a table is a relationship, and a relational database can contain multiple tables. In a relational database, each row in a table is a record, and the record has a unique ID (called a key). The columns of the table store the attributes of the data, and each record usually has a value for each attribute, which makes it easy to establish relationships between data points. The relational database unit 102 stores the transaction data and the encrypted business information in a two-dimensional table, thereby forming a relational database, which can provide services such as data storage and data retrieval. Specifically, the relational database unit 102 integrates, summarizes and abstracts the transaction data and the encrypted business information to form a data model independent of the specific DBMS, which can be represented by an entity-relationship model, and then converts it into a set of relational models supported by the selected relational database management system RDBMS and selects a physical structure suitable for the application environment, including storage structure and access method.

[0129] From the above description, it can be seen that the front-end service device provided in the embodiment of the present application converts the format of block data and stores it into a relational database. In this way, the business party can quickly complete some query-type business transactions through complex data retrieval. The key content of the business data is encrypted by a hardware encryption machine, which can also effectively protect the security of the data.

[0130] In order to further improve the efficiency of transaction information synchronization, in one embodiment of the front-end service device provided in the present application, a preferred method for sharing transaction data is provided, and the message queue service unit 101 of the front-end service device specifically includes the following contents:

[0131] Message queue component: sends the transaction data and the encrypted business information to a designated message queue, and then the transaction data and the encrypted business information form a business message in the designated message queue.

[0132] It can be understood that message queue technology is a technology for exchanging information between distributed applications. One end continuously writes messages to the message queue, while the other end can read the messages in the queue. The message publisher only publishes the message to the message queue without caring who takes it, and the message user only takes the message from the message queue without caring who publishes it. In this way, the publisher and the user do not need to know the existence of each other. The message queue can reside in memory or on disk, and the queue stores messages until they are read by the application. Through the message queue, applications can perform tasks independently. They do not need to know each other's location or wait for the receiving program to receive the message before continuing to execute. Encapsulate the transaction data and encrypted business information into a message and store it in the specified message queue. The message queue component encapsulates the transaction data and encrypted business information into a new message, which can be stored in the memory or on the disk of the message queue.

[0133] Message sending component: sends the business message to the subscription node.

[0134] It can be understood that the blockchain node subscribes to the message queue, and the message queue encapsulates the transaction data and encrypted business information into a new message, and then sends the new message to the subscribed blockchain node through the message sending component.

[0135] From the above description, it can be seen that the front-end service device provided in the embodiment of the present application, when the message queue server is not used, the transaction data is sent directly to the blockchain. In the case of high concurrency, the data sending pressure of the front-end service device increases dramatically, which slows down the response speed. However, after adopting the message queue, the front-end service device returns immediately after sending the transaction data to the message queue, and then the subscription node of the message queue obtains the data from the message queue and stores it asynchronously to the blockchain node. Since the processing speed of the message queue server is faster than the transaction data sending speed of the front-end service device, the performance of the blockchain is greatly improved.

[0136] In order to further improve the efficiency of transaction information synchronization, in one embodiment of the front-end service device provided in the present application, a preferred method for storing transaction data is provided. The relational database unit 102 of the front-end service device specifically includes the following contents:

[0137] Information processing component: converts the format of the transaction data and the encrypted business information.

[0138] It is understandable that the relational database supports multiple relational databases such as Oracle and MySQL, which is convenient for choosing which database to use according to different business scenarios, and providing data storage, retrieval and other services to other units. The information processing component parses the transaction data and encrypted business information, and converts the transaction data and encrypted business information into a format that can be stored in the relational database.

[0139] Information association component: generates a correspondence between transaction data and encrypted business information based on the converted transaction data and encrypted business information.

[0140] It is understandable that in a relational database, each row in a table is a record with a unique ID (called a key). The columns of the table store the attributes of the data, and each record usually has a value for each attribute. The information association component establishes a relational table of transaction data and encrypted business information based on the unique ID and attribute value of the transaction data and encrypted business information. Specifically, the information association component synthesizes, summarizes and abstracts the transaction data and encrypted business information to form a two-dimensional table, and then converts it into a set of relational models supported by the selected relational database management system RDBMS and selects a physical structure suitable for the application environment, including storage structure and access method.

[0141] Relational database component: generates transaction data according to the converted transaction data and the encrypted business information, as well as the corresponding relationship between the transaction data and the encrypted business information, and generates a relational database.

[0142] It is understood that a database consists of one or more tables. For example, there may be a table called authors that contains information about authors. Each column contains a specific type, such as the author's last name. Each row contains all the information about a specific author: name, address, etc. In a relational database, a table is a relationship, and a relational database can contain multiple tables. The relational database component establishes a relational database based on the relational tables of transaction data and encrypted business information.

[0143] The embodiment of the front-end service device provided in the present application can be specifically used to execute the processing flow of the embodiment of the front-end service device in the above embodiment. Its functions will not be repeated here, and reference can be made to the detailed description of the above device embodiment.

[0144] From the above description, it can be seen that the front-end service device provided in the embodiment of the present application encrypts the business information in the transaction information and processes the key information on the chain. In this way, the transaction information is uploaded to the chain, and the blockchain nodes only reach a consensus on the transaction data, while the business information is encrypted information, which can effectively protect the privacy of the data on the chain. At the same time, based on the tamper-proof technical characteristics of the blockchain, the authenticity of the information on the chain is guaranteed, and the real-time synchronization and format conversion of the data on the chain are completed through the message queue and the relational database. In this way, the business system can perform complex data retrieval and improve the efficiency of business transactions such as complex queries.

[0145] Combined with a specific embodiment, for example, a transaction information is: at 14:00 on December 26, 2020, A purchased a car worth 20,000 yuan from B at M. In this transaction, the transaction data is a car and 20,000 yuan, and the business information is December 26, 2020, 14:00, A, B, M, and the relationship between A and B.

[0146] The information broadcast module 11 encrypts the business information. After the encryption is completed, the information broadcast module 11 sends the transaction data and the encrypted business information to the message queue service unit 101 and the relational database unit 102; the message queue component encapsulates the transaction data and the encrypted business information into a new message, and the message sending component sends the new message to the blockchain node that has subscribed to the message queue; the information processing component converts the format of the transaction data and the encrypted business information, and the information association component generates one or more two-dimensional tables based on the converted transaction data and encrypted business information. The two-dimensional tables are shown in Table 1, Table 2, and Table 3. The relational database component generates a relational database based on these two-dimensional tables.

[0147] ID date time Place 1001 December 26, 2020 14:00 M Land 1002 December 26, 2020 14:00 M Land

[0148] Table 1

[0149] ID Number of transactions Transaction amount 1001 1 20,000 1002 1 20,000

[0150] Table 2

[0151] ID Name Trading Relationship 1001 A Buy it in 1002 B Sell

[0152] Table 3

[0153] In Table 1, Table 2 and Table 3, a row in each table is related to a row in the other two tables. If a table contains more data, the data can be separated into different tables and divided into different security levels. The transaction data can be extracted to form a table to improve the efficiency of data retrieval in the relational database.

[0154] In some specific embodiments, see Fig. 9 The front-end service device specifically also includes a log service module and a business service module.

[0155] It can be understood that the log service module is used to collect the operation logs of the front-end service device and the operation logs of the alliance blockchain network nodes, and provide them to management personnel for viewing.

[0156] The business service module is connected to the business system and completes communication through https two-way authentication. The business system refers to a system that needs to complete business transactions based on blockchain technology.

[0157] https two-way authentication means that the client sends the SSL protocol version number, encryption algorithm type, random number and other information to the server, and the server returns the SSL protocol version number, encryption algorithm type, random number and other information to the client, and also returns the server's certificate, that is, the public key certificate. The client uses the information returned by the server to verify the legitimacy of the server, including: whether the certificate is expired, whether the CA that issued the server certificate is reliable, whether the returned public key can correctly decrypt the digital signature in the returned certificate, and whether the domain name on the server certificate matches the actual domain name of the server. After the verification is passed, communication will continue, otherwise, the communication will be terminated. The server requires the client to send its certificate, and the client will send its own certificate to the server to verify the client's certificate. After the verification is passed, the client's public key will be obtained. , the client sends the symmetric encryption schemes it can support to the server for selection. The server selects the encryption method with the highest encryption degree from the encryption schemes provided by the client, encrypts the encryption scheme by using the public key obtained previously, and returns it to the client. After the client receives the encryption scheme ciphertext returned by the server, it uses its own private key to decrypt and obtain the specific encryption method. Then, it generates a random code for the encryption method, which is used as the key in the encryption process. After encrypting it with the public key obtained from the server certificate before, it sends it to the server. After receiving the message sent by the client, the server uses its own private key to decrypt and obtain the symmetric encryption key. In the next session, the server and the client will use this password for symmetric encryption to ensure the security of information during the communication process. The business service module completes the business system request instruction through other units of the front-end service device.

[0158] In order to solve the bottleneck of low transaction processing efficiency, which is one of the bottlenecks for the widespread application of existing blockchains, and the performance bottleneck seriously restricts the development of decentralized applications, this application provides an embodiment of a blockchain node, see Fig.10 , the blockchain node specifically includes the following contents:

[0159] Data receiving module 20: receives transaction data and encrypted business information, wherein the transaction data and business information are generated by a front-end service device according to transaction information generated by a transaction, and the encryption key is the private key of the front-end service device.

[0160] It is understandable that the front-end service device classifies the transaction information into transaction data and business information, and the business information is the non-data information in the transaction. For example, a transaction is as follows: at 14:00 on a certain day, A purchased a car worth 20,000 yuan from B, of which the car and 20,000 yuan are transaction data, and the non-data information at 14:00 on a certain day, A, and B are business information. The front-end service device encrypts the business information with its own private key. The data receiving module 20 receives the transaction data and encrypted business information sent by the front-end service device.

[0161] Data consensus module 21: consensus on the transaction data.

[0162] Data persistence module 22: If the consensus is passed, the transaction data and encrypted business information will be persisted.

[0163] It is understandable that the blockchain node is a transaction consensus for upgrading information, and can adopt consensus mechanisms such as Pow proof of work, Pos proof of equity, DPos share authorization proof mechanism, Pool verification pool, Byzantine fault tolerance algorithm proof, etc. In one embodiment of the present application, the blockchain node transaction consensus is determined by the Byzantine Fault Tolerance (PBFT) algorithm. When the transaction is regarded as reaching a consensus, the new block and its transaction screen local blockchain and status database can be submitted.

[0164] The infrastructure for communication between nodes in a blockchain network can be in the form of the Internet, dedicated lines, etc. The number of consensus nodes in a blockchain network is generally 3f+1, where f represents the number of fault-tolerant nodes that the blockchain system can support, with a minimum of 1. This is determined by the transaction consensus and the use of the Byzantine Fault Tolerance (PBFT) algorithm. In a blockchain system with 3f+1 consensus nodes, a master node is first selected, and the new block is generated by the master node. Each node broadcasts the transaction sent by the client to the entire network. The master node collects multiple transactions from the network that need to be placed in the new block and sorts them into a list, and broadcasts the list to the entire network. In the alliance blockchain network, three stages of submission and verification must be performed. In each stage, each node receives at least 2f+1 consistent confirmation messages from other nodes before entering the next stage. If 2f+1 consistent confirmation messages from other stages cannot be received in any stage, the confirmation message will not be sent. After completing the three stages, the transaction is considered to have reached a consensus, and the new block and its transaction screen can be submitted to the local blockchain and status database.

[0165] From the above description, it can be seen that the blockchain node provided in the embodiment of the present application receives the transaction data and encrypted business information sent by the front-end service device, and processes the business information. In this way, the transaction information is uploaded to the chain. The blockchain node only reaches a consensus on the transaction data, and the business information is encrypted information, which can effectively protect the privacy of the data on the chain. At the same time, based on the tamper-proof technical characteristics of the blockchain, the authenticity of the information on the chain is guaranteed.

[0166] In order to solve the problem that one of the bottlenecks for the widespread application of existing blockchains is the performance bottleneck of low transaction processing efficiency, which seriously restricts the development of decentralized applications, this application provides an embodiment of a blockchain data interaction system, see Fig.11 The blockchain data interaction system specifically includes the following contents: a front-end service device 30 and multiple blockchain nodes 31 that form a blockchain.

[0167] The front-end service device 30 is specifically used to perform the following contents:

[0168] Step 100: Receive transaction information generated by a transaction; the transaction information includes transaction data and business information.

[0169] In step 100, the front-end service device divides the transaction information generated by the transaction into transaction data and business information, wherein the business information is non-data information in the transaction. For example, a transaction is as follows: at 14:00 on a certain day, A purchased a car worth 20,000 yuan from B, wherein the car and 20,000 yuan are transaction data, and the non-data information at 14:00 on a certain day, A, and B are business information.

[0170] Step 200: Encrypt the business information, broadcast the transaction data and the encrypted business information to the blockchain, so that after the blockchain reaches a consensus on the transaction data, the transaction data and the encrypted business information are persisted.

[0171] It can be understood that the encrypted key exists in the front-end service device, and the key identifier needs to be sent when it is used. The front-end service device adopts hardware encryption machine technology and directly accesses the encryption machine instructions to encrypt the business information in the transaction information. The front-end service device broadcasts the transaction data and the encrypted business information to the blockchain, so that after the blockchain reaches a consensus on the transaction data, the transaction data and the encrypted business information will be persisted, which can ensure the privacy of the business information on the chain while ensuring real-time synchronization of the transaction data.

[0172] The blockchain node 31 is specifically used to execute the following contents:

[0173] Step 300: receiving a transaction data and an encrypted business information, wherein the transaction data and the business information are generated by a front-end service device according to the transaction information generated by a transaction, and the encryption key is the private key of the front-end service device.

[0174] It is understandable that the front-end service device classifies transaction information into transaction data and business information, and the business information is the non-data information in the transaction. For example, a transaction is as follows: at 14:00 on a certain day, A purchased a car worth 20,000 yuan from B. The car and 20,000 yuan are transaction data, and the non-data information at 14:00 on a certain day, A, and B are business information. The front-end service device encrypts the business information with its own private key.

[0175] Step 400: reaching consensus on the transaction data.

[0176] Step 500: If the consensus is passed, the transaction data and encrypted business information are persisted.

[0177] It can be understood that the blockchain node is the transaction consensus for upgrading information. The transaction consensus is determined by the Byzantine Fault Tolerance (PBFT) algorithm. When the transaction is considered to have reached a consensus, the new block and its transaction can be submitted to the local blockchain and status database.

[0178] From the above description, it can be seen that the blockchain data interaction system provided in the embodiment of the present application encrypts the business information in the transaction information through the front-end service device and processes the key information on the chain. In this way, the transaction information is uploaded to the chain, and the blockchain nodes only reach a consensus on the transaction data, while the business information is encrypted information, which can effectively protect the privacy of the data on the chain. At the same time, based on the technical characteristics of the blockchain that cannot be tampered with, the authenticity of the information on the chain is guaranteed.

[0179] In some specific embodiments, see Fig.11 , the blockchain data interaction system specifically also includes: a business system module 32 and a communication network module 33.

[0180] It can be understood that the business system module 32 refers to a system that needs to complete business transactions based on blockchain technology, and the communication network module 33 is the infrastructure for completing communication between nodes in the blockchain network, which can be in the form of the Internet, dedicated lines, etc.

[0181] From the above description, it can be seen that in the blockchain data interaction system provided by the embodiment of the present application, the front-end service device encrypts the private content of the business data through a hardware encryption machine before uploading it to the chain. The key is stored in the front-end service device, and the block data change events of the blockchain node are pushed to the front-end service device using message queue technology. The front-end service device pulls the new data of the node, converts the block data into a format and stores it in a relational database. In this way, the business party can quickly complete some query-type business transactions through complex data retrieval. The key content of the business data is encrypted by a hardware encryption machine, which can also effectively protect the security of the data.

[0182] The node data synchronization is described in detail below with reference to a specific embodiment. Fig.12 .

[0183] Step 101: The blockchain node pushes the newly added block information to the designated queue of the message queue service unit.

[0184] Step 102: The queue of the message queue service unit receives the newly added information of the node block data, and pushes the information to the node server unit that has subscribed to the queue.

[0185] Step 103: The node service unit receives the new information of the node block data, and pulls the new block data generated by the blockchain node according to the new information.

[0186] Step 104: The node service unit completes the node block data format conversion through the data processing unit.

[0187] Step 105: If the data processing unit conversion is successful, then go to step 106; otherwise, go to step 107.

[0188] Step 106: The node service unit completes data storage through the relational database unit.

[0189] Step 107: The node service unit receives the data conversion and storage results.

[0190] Step 108: The terminal displays the processing result, and the log service unit records the processing process.

[0191] Step 109: The synchronous data transaction ends.

[0192] The following is a detailed description of blockchain transactions in conjunction with specific embodiments. Fig.13 .

[0193] Step 2000: The business system initiates a transaction request to the business service module.

[0194] Step 2001: The business service module receives a transaction request and verifies the signature of the request.

[0195] Step 2002: If the signature verification is passed and the business system is legal, then go to step 204, otherwise go to step 203

[0196] Step 2003: Reject the business system request.

[0197] Step 2004: The information receiving module determines the business transaction type.

[0198] Step 2005: If it is an inquiry type transaction, proceed to step 207, otherwise proceed to step 206.

[0199] Step 2006: After the information broadcast module encrypts the key business information through the encryption service unit, it sends the transaction to the blockchain node to complete the transaction on the chain.

[0200] Step 2007: The relational database unit completes data retrieval through the relational database unit.

[0201] Step 2008: The business service module returns the processing result to the business system.

[0202] From the hardware level, in order to solve the problem that one of the bottlenecks for the widespread application of existing blockchains is the performance bottleneck of low transaction processing efficiency, which seriously restricts the development of decentralized applications, this application provides an embodiment of an electronic device for implementing all or part of the content of the blockchain data interaction method, and the electronic device specifically includes the following content:

[0203] Fig.14 FIG. 9 is a schematic block diagram of the system structure of the electronic device 9600 according to an embodiment of the present application. Fig.14 As shown, the electronic device 9600 may include a central processor 9100 and a memory 9140; the memory 9140 is coupled to the central processor 9100. It is worth noting that Fig.14 is exemplary; other types of structures may also be used to supplement or replace this structure to implement telecommunication functions or other functions.

[0204] In one embodiment, the blockchain data interaction function can be integrated into the central processing unit. The central processing unit can be configured to perform the following control:

[0205] Step 100: Receive transaction information generated by a transaction; the transaction information includes transaction data and business information.

[0206] In step 100, the front-end service device divides the transaction information generated by the transaction into transaction data and business information, wherein the business information is non-data information in the transaction. For example, a transaction is as follows: at 14:00 on a certain day, A purchased a car worth 20,000 yuan from B, wherein the car and 20,000 yuan are transaction data, and the non-data information at 14:00 on a certain day, A, and B are business information.

[0207] Step 200: Encrypt the business information, broadcast the transaction data and the encrypted business information to the blockchain, so that after the blockchain reaches a consensus on the transaction data, the transaction data and the encrypted business information are persisted.

[0208] It can be understood that the encrypted key exists in the front-end service device, and the key identifier needs to be sent when it is used. The front-end service device adopts hardware encryption machine technology and directly accesses the encryption machine instructions to encrypt the business information in the transaction information. The front-end service device broadcasts the transaction data and the encrypted business information to the blockchain, so that after the blockchain reaches a consensus on the transaction data, the transaction data and the encrypted business information will be persisted, which can ensure the privacy of the business information on the chain while ensuring real-time synchronization of the transaction data.

[0209] From the above description, it can be seen that the electronic device provided in the embodiment of the present application encrypts the business information in the transaction information and processes the key information on the chain. In this way, the transaction information is uploaded to the chain, and the blockchain nodes only reach a consensus on the transaction data, while the business information is encrypted information, which can effectively protect the privacy of the data on the chain. At the same time, based on the tamper-proof technical characteristics of the blockchain, the authenticity of the information on the chain is guaranteed.

[0210] In another embodiment, the front-end service device can be configured separately from the central processor 9100. For example, the front-end service device can be configured as a chip connected to the central processor 9100, and the blockchain data interaction function is realized through the control of the central processor.

[0211] like Fig.14 As shown, the electronic device 9600 may also include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is worth noting that the electronic device 9600 does not necessarily have to include Fig.14In addition, the electronic device 9600 may also include Fig.14 For components not shown, reference may be made to the prior art.

[0212] like Fig.14 As shown, the central processing unit 9100 is sometimes also referred to as a controller or an operation control, and may include a microprocessor or other processor device and / or logic device. The central processing unit 9100 receives input and controls the operation of various components of the electronic device 9600.

[0213] The memory 9140 may be, for example, one or more of a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory or other suitable devices. The above-mentioned information related to the failure may be stored, and a program for executing the relevant information may also be stored. The CPU 9100 may execute the program stored in the memory 9140 to implement information storage or processing, etc.

[0214] The input unit 9120 provides input to the central processing unit 9100. The input unit 9120 is, for example, a key or a touch input device. The power supply 9170 is used to provide power to the electronic device 9600. The display 9160 is used to display display objects such as images and texts. The display may be, for example, an LCD display, but is not limited thereto.

[0215] The memory 9140 may be a solid-state memory, such as a read-only memory (ROM), a random access memory (RAM), a SIM card, etc. It may also be a memory that saves information even when the power is off, can be selectively erased, and is provided with more data, examples of which are sometimes referred to as EPROMs, etc. The memory 9140 may also be some other type of device. The memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application / function storage unit 9142, which is used to store application programs and function programs or processes for executing the operation of the electronic device 9600 through the central processor 9100.

[0216] The memory 9140 may also include a data storage unit 9143 for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage unit 9144 of the memory 9140 may include various drivers for communication functions of the electronic device and / or for executing other functions of the electronic device (such as messaging applications, address book applications, etc.).

[0217] The communication module 9110 is a transmitter / receiver 9110 that sends and receives signals via an antenna 9111. The communication module (transmitter / receiver) 9110 is coupled to the central processor 9100 to provide input signals and receive output signals, which may be the same as the case of a conventional mobile communication terminal.

[0218] Based on different communication technologies, multiple communication modules 9110 may be provided in the same electronic device, such as a cellular network module, a Bluetooth module and / or a wireless LAN module, etc. The communication module (transmitter / receiver) 9110 is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide an audio output via the speaker 9131 and receive an audio input from the microphone 9132, thereby realizing a common telecommunication function. The audio processor 9130 may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor 9130 is also coupled to the central processor 9100, so that recording can be performed on the local machine through the microphone 9132, and the sound stored on the local machine can be played through the speaker 9131.

[0219] The embodiments of the present application also provide a computer-readable storage medium capable of implementing all the steps in the blockchain data interaction method in the above embodiments. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, all the steps of the blockchain data interaction method in the above embodiments are implemented by the execution subject being a server or a client. For example, when the processor executes the computer program, the following steps are implemented:

[0220] Step 100: Receive transaction information generated by a transaction; the transaction information includes transaction data and business information.

[0221] In step 100, the front-end service device divides the transaction information generated by the transaction into transaction data and business information, wherein the business information is non-data information in the transaction. For example, a transaction is as follows: at 14:00 on a certain day, A purchased a car worth 20,000 yuan from B, wherein the car and 20,000 yuan are transaction data, and the non-data information at 14:00 on a certain day, A, and B are business information.

[0222] Step 200: Encrypt the business information, broadcast the transaction data and the encrypted business information to the blockchain, so that after the blockchain reaches a consensus on the transaction data, the transaction data and the encrypted business information are persisted.

[0223] It can be understood that the encrypted key exists in the front-end service device, and the key identifier needs to be sent when it is used. The front-end service device adopts hardware encryption machine technology and directly accesses the encryption machine instructions to encrypt the business information in the transaction information. The front-end service device broadcasts the transaction data and the encrypted business information to the blockchain, so that after the blockchain reaches a consensus on the transaction data, the transaction data and the encrypted business information will be persisted, which can ensure the privacy of the business information on the chain while ensuring real-time synchronization of the transaction data.

[0224] From the above description, it can be seen that the computer-readable medium provided in the embodiment of the present application encrypts the business information in the transaction information and processes the key information on the chain. In this way, when the transaction information is uploaded to the chain, the blockchain nodes only reach a consensus on the transaction data, and the business information is encrypted information, which can effectively protect the privacy of the data on the chain. At the same time, based on the tamper-proof technical characteristics of the blockchain, the authenticity of the information on the chain is guaranteed.

[0225] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0226] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (apparatus), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0227] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0228] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0229] The present invention uses specific embodiments to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A blockchain data interaction method, characterized in that: Executed by the front-end service device, including: Receive transaction information generated by a transaction; the transaction information includes transaction data and business information, specifically including: Analyze transaction information and divide it into transaction data and business information; Encrypt the business information, broadcast the transaction data and the encrypted business information to the blockchain, so that after the blockchain reaches a consensus on the transaction data, the transaction data and the encrypted business information are persisted, and the encryption key is the stored private key; The broadcasting of the transaction data and the encrypted business information to the blockchain includes: Sending the transaction data and the encrypted business information to the corresponding blockchain node; The transaction data and the encrypted business information are stored in a relational database.

2. The blockchain data interaction method according to claim 1, characterized in that: The sending of the transaction data and the encrypted business information to the corresponding blockchain node includes: Sending the transaction data and the encrypted business information to a designated message queue, so that the transaction data and the encrypted business information form a business message in the designated message queue; The service message is sent to the subscription node.

3. The blockchain data interaction method according to claim 1, characterized in that: The storing the transaction data and the encrypted business information in a relational database includes: Performing format conversion on the transaction data and the encrypted business information; Generate a correspondence between the transaction data and the encrypted business information according to the converted transaction data and the encrypted business information; The transaction data is generated according to the converted transaction data and the encrypted business information, and a relational database is generated according to the corresponding relationship between the transaction data and the encrypted business information.

4. A blockchain data interaction method, characterized in that: Executed by blockchain nodes, including: Receiving a transaction data and an encrypted business information, wherein the transaction data and the business information are generated by a front-end service device parsing the transaction information generated by a transaction, and the encryption key is the private key of the front-end service device; Reaching consensus on the transaction data; If the consensus is passed, the transaction data and encrypted business information will be persisted.

5. A blockchain data interaction method, characterized in that: include: The front-end service device receives transaction information generated by a transaction, wherein the transaction information includes transaction data and business information, specifically including: Analyze transaction information and divide it into transaction data and business information; The front-end service device encrypts the business information, and broadcasts the transaction data and the encrypted business information to the blockchain, where the encryption key is the private key of the front-end service device; The blockchain node receives the transaction data and the encrypted business information, and reaches a consensus on the transaction data; If the consensus is passed, the blockchain node will persist the transaction data and the encrypted business information; The broadcasting of the transaction data and the encrypted business information to the blockchain includes: Sending the transaction data and the encrypted business information to the corresponding blockchain node; The transaction data and the encrypted business information are stored in a relational database.

6. A front-end service device, characterized in that: include: Information receiving module: receiving transaction information generated by a transaction; The transaction information includes transaction data and business information; Information broadcast module: encrypt the business information, broadcast the transaction data and the encrypted business information to the blockchain, so that after the blockchain reaches a consensus on the transaction data, the transaction data and the encrypted business information are persisted, and the encryption key is the stored private key; The information receiving module is used to analyze the transaction information and divide the transaction information into transaction data and business information; The information broadcast module includes: Message queue service unit: sending the transaction data and the encrypted business information to the corresponding blockchain node; Relational database unit: stores the transaction data and the encrypted business information in a relational database.

7. The front-end service device according to claim 6, characterized in that: The message queue service unit comprises: Message queue component: sending the transaction data and the encrypted business information to a designated message queue, so that the transaction data and the encrypted business information form a business message in the designated message queue; Message sending component: sends the business message to the subscription node.

8. The front-end service device according to claim 6, characterized in that: The relational database unit comprises: Information processing component: converting the format of the transaction data and the encrypted business information; Information association component: generates the correspondence between transaction data and encrypted business information based on the converted transaction data and encrypted business information; Relational database component: generates transaction data according to the converted transaction data and the encrypted business information, as well as the corresponding relationship between the transaction data and the encrypted business information, and generates a relational database.

9. A blockchain node, characterized in that: include: Data receiving module: receiving a transaction data and an encrypted business information, wherein the transaction data and the business information are generated by a front-end service device parsing the transaction information generated by a transaction, and the encryption key is the private key of the front-end service device; Data consensus module: consensus on the transaction data; Data persistence module: If the consensus is passed, the transaction data and encrypted business information will be persisted.

10. A blockchain data interaction system, characterized in that: include: A front-end service device and a plurality of blockchain nodes forming a blockchain; The front-end service device is used to receive transaction information generated by a transaction, the transaction information includes transaction data and business information, encrypt the business information, and broadcast the transaction data and the encrypted business information to the blockchain, and the encryption key is the private key of the front-end service device; The blockchain node is used to receive the transaction data and the encrypted business information, and reach a consensus on the transaction data. If the consensus is passed, the transaction data and the encrypted business information are persisted; The front-end service device is specifically used to parse the transaction information and divide the transaction information into transaction data and business information; The front-end service device is also used to send the transaction data and the encrypted business information to the corresponding blockchain node; and store the transaction data and the encrypted business information in a relational database.

11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the blockchain data interaction method described in any one of claims 1 to 5 is implemented.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the blockchain data interaction method described in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Advertisement media business data credible storage system based on block chain

    CN110022217A