CN112860805A - Block chain data interaction method and system - Google Patents
Block chain data interaction method and system Download PDFInfo
- Publication number
- CN112860805A CN112860805A CN202110355174.XA CN202110355174A CN112860805A CN 112860805 A CN112860805 A CN 112860805A CN 202110355174 A CN202110355174 A CN 202110355174A CN 112860805 A CN112860805 A CN 112860805A
- Authority
- CN
- China
- Prior art keywords
- information
- transaction
- transaction data
- data
- encrypted
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 76
- 230000003993 interaction Effects 0.000 title claims abstract description 52
- 230000002085 persistent effect Effects 0.000 claims abstract description 8
- 238000006243 chemical reaction Methods 0.000 claims description 15
- 238000004590 computer program Methods 0.000 claims description 15
- 230000010365 information processing Effects 0.000 claims description 5
- 230000002688 persistence Effects 0.000 claims description 3
- 230000008569 process Effects 0.000 abstract description 14
- 238000012545 processing Methods 0.000 description 26
- 230000006854 communication Effects 0.000 description 21
- 238000004891 communication Methods 0.000 description 20
- 238000010586 diagram Methods 0.000 description 16
- 238000005516 engineering process Methods 0.000 description 15
- 230000006870 function Effects 0.000 description 15
- 238000011161 development Methods 0.000 description 9
- 238000013500 data storage Methods 0.000 description 8
- 230000007246 mechanism Effects 0.000 description 8
- 238000012795 verification Methods 0.000 description 7
- 238000013499 data model Methods 0.000 description 6
- 238000007726 management method Methods 0.000 description 6
- 238000013475 authorization Methods 0.000 description 4
- 239000000872 buffer Substances 0.000 description 4
- 230000002457 bidirectional effect Effects 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 230000008520 organization Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000012790 confirmation Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q20/00—Payment architectures, schemes or protocols
- G06Q20/38—Payment protocols; Details thereof
- G06Q20/382—Payment protocols; Details thereof insuring higher security of transaction
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/28—Databases characterised by their database models, e.g. relational or object models
- G06F16/284—Relational databases
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Business, Economics & Management (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Accounting & Taxation (AREA)
- Computer Security & Cryptography (AREA)
- Computing Systems (AREA)
- Finance (AREA)
- Strategic Management (AREA)
- General Business, Economics & Management (AREA)
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
Abstract
The application provides a block chain data interaction method and system, which can be used in the technical field of block chains and other fields, and the method comprises the following steps: the prepositive service device receives transaction information generated by a transaction, wherein the transaction information comprises transaction data and service information, encrypts the service information and broadcasts the transaction data and the encrypted service information to a block chain; the block chain node receives the transaction data and the encrypted service information, identifies the transaction data together, and if the identification passes, the block chain node makes the transaction data and the encrypted service information persistent; the prepositive service device encrypts the service information in the transaction information and processes the uplink key information, so that the block link points only commonly identify the transaction data on the uplink of the transaction information, the service information is encrypted information, the privacy of the data on the link can be effectively protected, and meanwhile, the authenticity of the uplink information is ensured based on the technical characteristics of the block link that the block link cannot be tampered.
Description
Technical Field
The present application relates to the field of blockchain technologies, and in particular, to a method and a system for interacting blockchain data.
Background
At present, the trend of block chains is in the way of various industries, and becomes one of the most spotlighted information technologies at present, the block chain technology has the characteristics of decentralization, openness and transparency, no tampering and trustiness, and more individuals and enterprises begin to use the block chain technology to solve some problems along with the development of the block chain technology.
However, one of the bottlenecks in the widespread application of the blockchain is a performance bottleneck in low transaction processing efficiency, and the blockchain solution of the public chain or the alliance chain cannot compete with centralized solutions such as the Visa payment system and the airy cloud computing, so the performance bottleneck of the blockchain severely restricts the development of decentralized application.
Disclosure of Invention
Aiming at the problems in the prior art, the application provides a block chain data interaction method and a block chain data interaction system, which can encrypt part of information of a cochain, effectively protect privacy of data on the chain, and simultaneously ensure authenticity of the cochain information based on technical characteristics of the block chain, which cannot be tampered.
In order to solve the technical problem, the application provides the following technical scheme:
in a first aspect, the present application provides a method for interacting blockchain data, executed by a front end service device, including:
receiving transaction information generated by a transaction; the transaction information comprises transaction data and service information;
encrypting the service information, broadcasting the transaction data and the encrypted service information to a block chain, so that the block chain can identify the transaction data together and then persist the transaction data and the encrypted service information.
Further, the broadcasting the transaction data and the encrypted service information to a blockchain includes:
the transaction data and the encrypted service information are sent to corresponding block link points;
and storing the transaction data and the encrypted service information into a relational database.
Further, the sending the transaction data and the encrypted service information to corresponding block link points includes:
sending the transaction data and the encrypted service information to a specified message queue, and forming a service message in the specified message queue by the transaction data and the encrypted service information;
and sending the service message to a subscription node.
Further, the storing the transaction data and the encrypted service information into a relational database includes:
carrying out format conversion on the transaction data and the encrypted service information;
generating a corresponding relation of the transaction data and the encrypted service information according to the converted transaction data and the encrypted service information;
and generating transaction data according to the converted transaction data and the encrypted service information, and generating a relational database according to the corresponding relation between the transaction data and the encrypted service information.
In a second aspect, the present application provides a method for interacting block chain data, performed by a block chain node, including:
receiving transaction data and encrypted business information, wherein the transaction data and the business information are generated by a preposed service device according to transaction information generated by a transaction, and an encrypted key is a private key of the preposed service device;
consensus is carried out on the transaction data;
and if the agreement is passed, the transaction data and the encrypted service information are persisted.
In a third aspect, the present application provides a method for interacting block chain data, including:
the prepositive service device receives transaction information generated by a transaction, wherein the transaction information comprises transaction data and business information;
the prepositive service device encrypts the service information and broadcasts the transaction data and the encrypted service information to a block chain;
the block chain node receives the transaction data and the encrypted service information and identifies the transaction data;
if the common identification is passed, the block link node persists the transaction data and the encrypted service information.
In a fourth aspect, the present application provides a front-end service apparatus, including:
an information receiving module: receiving transaction information generated by a transaction; the transaction information comprises transaction data and service information;
an information broadcasting module: encrypting the service information, broadcasting the transaction data and the encrypted service information to a block chain, so that the block chain can identify the transaction data together and then persist the transaction data and the encrypted service information.
Further, the information broadcasting module includes:
message queue service unit: the transaction data and the encrypted service information are sent to corresponding block link points;
relational database unit: and storing the transaction data and the encrypted service information into a relational database.
Further, the message queue service unit includes:
a message queue component: sending the transaction data and the encrypted service information to a specified message queue, and forming a service message in the specified message queue by the transaction data and the encrypted service information;
a messaging component: and sending the service message to a subscription node.
Further, the relational database unit includes:
an information processing component: carrying out format conversion on the transaction data and the encrypted service information;
an information association component: generating a corresponding relation of the transaction data and the encrypted service information according to the converted transaction data and the encrypted service information;
the relational database component: and generating transaction data according to the converted transaction data and the encrypted service information, and generating a relational database according to the corresponding relation between the transaction data and the encrypted service information.
In a fifth aspect, the present application provides a block link point comprising:
a data receiving module: receiving transaction data and encrypted business information, wherein the transaction data and the business information are generated by a preposed service device according to transaction information generated by a transaction, and an encrypted key is a private key of the preposed service device;
a data consensus module: consensus is carried out on the transaction data;
a data persistence module: and if the agreement is passed, the transaction data and the encrypted service information are persisted.
In a sixth aspect, the present application provides a blockchain data interaction system, including: a pre-service device and a plurality of block link points forming a block chain;
the prepositive service device is used for receiving transaction information generated by a transaction, wherein the transaction information comprises transaction data and service information, encrypting the service information and broadcasting the transaction data and the encrypted service information to a block chain;
and the block link point is used for receiving the transaction data and the encrypted service information, commonly identifying the transaction data, and persisting the transaction data and the encrypted service information if the common identification is passed.
In a seventh aspect, the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the method for interacting block chain data when executing the program.
In an eighth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the method for interacting blockchain data.
According to the technical scheme, the block chain data interaction method and system provided by the application comprise the following steps: the prepositive service device receives transaction information generated by a transaction, wherein the transaction information comprises transaction data and service information, encrypts the service information and broadcasts the transaction data and the encrypted service information to a block chain; the block chain node receives the transaction data and the encrypted service information, identifies the transaction data together, and if the identification passes, the block chain node makes the transaction data and the encrypted service information persistent; the prepositive service device encrypts the service information in the transaction information and processes the uplink key information, so that the block link points only commonly identify the transaction data on the uplink of the transaction information, the service information is encrypted information, the privacy of the data on the link can be effectively protected, and meanwhile, the authenticity of the uplink information is ensured based on the technical characteristics of the block link that the block link cannot be tampered.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a pre-service device in a block chain data interaction method according to an embodiment of the present application.
Fig. 2 is a flowchart illustrating a step 200 of a method for interacting blockchain data according to an embodiment of the present disclosure.
Fig. 3 is a flowchart illustrating step 201 of the method for interacting blockchain data in the present embodiment.
Fig. 4 is a flowchart illustrating step 202 of the method for interacting blockchain data in the present embodiment.
Fig. 5 is a schematic flowchart of a blockchain node in a blockchain data interaction method according to an embodiment of the present disclosure.
Fig. 6 is a flowchart illustrating a method for interacting blockchain data according to an embodiment of the present disclosure.
Fig. 7 is a schematic structural diagram of a front service device in an embodiment of the present application.
Fig. 8 is a schematic structural diagram of an information broadcasting module of a front end service device in an embodiment of the present application.
Fig. 9 is a schematic structural diagram of a front service device in an embodiment of the present application.
Fig. 10 is a schematic structural diagram of a blockchain node in the embodiment of the present application.
Fig. 11 is a schematic structural diagram of a blockchain data interaction system provided in an application example of the present application.
Fig. 12 is a schematic flow chart of node data synchronization provided by an application example of the present application.
Fig. 13 is a block chain transaction flow diagram provided in the application example of the present application.
Fig. 14 is a schematic structural diagram of an electronic device in an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the block chain data interaction method, the block chain data interaction system, and the front-end service device disclosed in the present application may be used in the technical field of block chains, and may also be used in any field other than the technical field of block chains.
In view of the performance bottleneck that the existing blockchain is widely applied, namely, the performance bottleneck that the transaction processing efficiency is low and seriously restricts the development of decentralized application, the 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.
Based on the above, the present application further provides a blockchain data interaction system for implementing the blockchain data interaction method provided in one or more embodiments of the present application, where the blockchain data interaction system includes a front-end service device and a plurality of blockchain nodes, the front-end service device may be in communication connection with a client device, the client terminal device may be provided with a plurality of client devices, and the blockchain data interaction system may specifically access the client terminal device through an application server.
The block chain data interaction system comprises a preposed service device and a plurality of block chain nodes, wherein the preposed service device can receive transaction information from client terminal equipment, the transaction information comprises transaction data and service information, the service information is non-data information in the transaction information, the preposed service device encrypts the service information and broadcasts the transaction data and the encrypted service information to the block chain, the block chain identifies the transaction data together, and if the identification is passed, the block chain persists the transaction data and the encrypted service information.
It will be appreciated that the client devices may include smart phones, tablet electronic devices, portable computers, desktop computers, Personal Digital Assistants (PDAs), and the like.
The client device may have a communication module (i.e., a communication unit), and may be communicatively connected to a remote server to implement data transmission with the server. For example, the communication unit may send the transaction information to a server of the front-end service device, so that the front-end service device performs encryption processing according to the transaction information and broadcasts the encrypted transaction information to the blockchain; the communication unit may also send transaction data and encrypted traffic 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 may include a server cluster formed by a plurality of servers, or a server structure of a distributed apparatus.
The server and the client device may communicate using any suitable network protocol, including network protocols not yet developed at the filing date of this application. The network protocol may include, for example, a TCP/IP protocol, a UDP/IP protocol, an HTTP protocol, an HTTPS protocol, or the like. Of course, the network Protocol may also include, for example, an RPC Protocol (Remote Procedure Call Protocol), a REST Protocol (Representational State Transfer Protocol), and the like used above the above Protocol.
According to the block chain data interaction method, the prepositive service device, the block chain data interaction system, the electronic equipment and the computer readable storage medium, the prepositive service device encrypts the business information in the transaction information and processes the uplink key information, so that on the partially encrypted transaction information, the block chain link points only identify the transaction data, the business information is encrypted information, the privacy of the data on the chain can be effectively protected, and meanwhile, the authenticity of the uplink information is guaranteed based on the technical characteristics that the block chain cannot be tampered.
The following embodiments and application examples are specifically and respectively described.
In order to solve the problem that one of the bottlenecks of the existing blockchain that is widely applied is a performance bottleneck that is low in transaction processing efficiency, and the performance bottleneck severely restricts the development of decentralized applications, the present application provides an embodiment of a blockchain data interaction method, which is executed by a front-end service device, and referring to fig. 1, the blockchain data interaction method specifically includes the following contents:
step 100: receiving transaction information generated by a transaction; the transaction information includes transaction data and business information.
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 message is: 26/2020: 00, A purchases a car with a value of 2 ten thousand yuan from B in M place, in the transaction, the transaction data is one car and 2 ten thousand yuan, the business information is 26 days at 12 months in 2020, 14: 00. a, B, M and the relationship between a and B. The front-end service device analyzes the transaction information after receiving the transaction information, and divides the transaction information into transaction data and business information.
Step 200: encrypting the service information, broadcasting the transaction data and the encrypted service information to a block chain, so that the block chain can identify the transaction data together and then persist the transaction data and the encrypted service information.
It can be understood that the encrypted key is stored in the front-end service device, the key identifier needs to be sent when the encrypted key is used, the front-end service device adopts a hardware encryption machine technology, the encryption machine instruction is directly accessed 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 block chain, so that the block chain can ensure that the transaction data and the encrypted business information are persistent after the transaction data are identified and passed, and the real-time synchronization of the transaction data can be ensured while the privacy of the business information on the chain is ensured. The blockchain can adopt consensus mechanisms such as Pow workload certification, Pos rights and interests certification, DPos shares authorization certification mechanism, Pool verification Pool, Byzantine fault-tolerant algorithm certification and the like.
As can be seen from the above description, in the block chain data interaction method provided in this embodiment of the present application, the front end service device encrypts the service information in the transaction information, and processes the uplink key information, so that the block chain nodes only identify the transaction data on the transaction information uplink, and the service information is encrypted information, which can effectively protect the privacy of the data on the chain, and meanwhile, based on the technical characteristics of the block chain that cannot be tampered, ensure the authenticity of the uplink information.
In order to further improve the efficiency of transaction information synchronization, in an embodiment of the blockchain data interaction method provided by the present application, a preferred manner of node data synchronization is provided, referring to fig. 2, the broadcasting the transaction data and the encrypted service information to a blockchain in step 200 of the blockchain data interaction method specifically includes the following contents:
step 201: and sending the transaction data and the encrypted service information to corresponding block link points.
It can be understood that the front-end service device sends the transaction data and the encrypted service information to all corresponding block link points in the block chain, and the block chain may adopt a common recognition mechanism such as Pow workload certification, Pos rights and interests certification, DPos share authorization certification mechanism, Pool verification Pool, bypath fault-tolerant algorithm certification, and the like. In some embodiments, the blockchain transaction consensus is determined using a Byzantine Fault tolerant (PBFT) algorithm.
Step 202: and storing the transaction data and the encrypted service information into a relational database.
It is understood that a relational database is a type of database that stores and provides access to data points that are related to one another. Relational databases are based on relational models, which is an intuitive, straightforward way to represent data in tables. The relational model refers to a two-dimensional table model, and thus a relational database is a data organization composed of two-dimensional tables and the links between them. A table is a collection of data organized in rows and columns. A database includes one or more tables. For example, there may be a table named authors with author information. Each column contains a particular type, such as the last name of the author. Each row contains all information about a particular author: name, address, etc. One table is a relationship in a relational database, and a relational database may contain a plurality of tables. In a relational database, each row in a table is a record with a unique ID (called a key). The columns of the table hold attributes of the data, with each record typically having a value for each attribute, which facilitates establishing relationships between data points.
And storing the transaction data and the encrypted service information into a two-dimensional table to form a relational database, wherein the relational database can provide services such as data storage, data retrieval and the like. The transaction data and the encrypted service information are integrated, generalized and abstracted to form a data model independent of a specific DBMS, which can be represented by an entity-contact model, and then the data model is converted into a group of relationship modes supported by a selected relational database management system (RDBMS) and a physical structure suitable for an application environment is selected for the relational database management system (RDBMS), wherein the physical structure comprises a storage structure and an access method.
As can be seen from the above description, in the block chain data interaction method provided in this embodiment of the present application, the pre-service device performs format conversion on the block data and stores the block data in the relational database, so that a service party can quickly complete part of query-type service transactions through complex data retrieval, and key contents of the service data are encrypted by the hardware encryptor, so that the security of the data can also be effectively protected. The functions of data retrieval, event notification, data uplink, format conversion and the like commonly used in a service system are encapsulated, so that the processing efficiency of partial block chain transaction is improved, and the uplink data protection capability is enhanced.
In order to further improve the efficiency of transaction information synchronization, in an embodiment of the blockchain data interaction method provided by the present application, a preferred manner of transaction data sharing is provided, referring to fig. 3, step 201 in the blockchain data interaction method specifically includes the following contents:
step 211: and sending the transaction data and the encrypted service information to a specified message queue, and forming a service message in the specified message queue by the transaction data and the encrypted service information.
It will be appreciated that message queuing is a technique for exchanging information between distributed applications, where messages are continually written into a message queue on one side and read from the queue on the other side. The message publisher only takes care of posting messages to the message queue and not of who to fetch them, and the message consumer only takes messages from the message queue regardless of who posted them. So that neither the publisher nor the user is aware of the presence of the other. The message queue may reside on memory or disk, the queue storing messages until they are read by the application. With the message queue, applications can perform tasks independently, they do not need to know each other's location, or wait for a receiving program to receive the message before continuing execution. The transaction data and the encrypted service information are packaged into a message and stored in a designated message queue.
Step 212: and sending the service message to a subscription node.
It is understood that the blockchain node subscribes to the message queue, and the message queue sends the message to the subscribed blockchain node after receiving the message.
As can be seen from the above description, in the block chain data interaction method provided in the embodiment of the present application, when the message queue server is not used, the transaction data is directly sent to the block chain, and the data sending pressure of the front-end service device is increased dramatically under the high concurrency condition, so that the response speed is reduced. After the message queue is used, the front-end service device returns transaction data immediately after sending the transaction data to the message queue, and then the subscription node of the message queue acquires the data from the message queue and asynchronously stores the data to the blockchain node. The processing speed of the message queue server is faster than the transaction data sending speed of the preposed service device, so the performance of the block chain is greatly improved.
In order to further improve the efficiency of transaction information synchronization, in an embodiment of the blockchain data interaction method provided by the present application, a preferred manner of transaction data storage is provided, referring to fig. 4, step 202 in the blockchain data interaction method specifically includes the following contents:
step 221: and carrying out format conversion on the transaction data and the encrypted service information.
It can be understood that the relational database supports various relational databases such as oracle, mysql and the like, and is convenient for selecting and using the database according to different business scenarios and providing services such as data storage, retrieval and the like for other units. And analyzing the transaction data and the encrypted service information, and converting the transaction data and the encrypted service information into a format which can be stored in a relational database.
Step 222: and generating a corresponding relation of the transaction data and the encrypted service information according to the converted transaction data and the encrypted service information.
It will be appreciated 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 attributes of the data, each record generally has a value for each attribute, and a relationship table of transaction data and encrypted service information is established according to the unique ID and attribute value of the transaction data and encrypted service information. The transaction data and the encrypted service information are integrated, generalized and abstracted to form a data model independent of a specific DBMS, which can be represented by an entity-contact model, and then the data model is converted into a group of relationship modes supported by a selected relational database management system (RDBMS) and a physical structure suitable for an application environment is selected for the relational database management system (RDBMS), wherein the physical structure comprises a storage structure and an access method.
Step 223: and generating transaction data according to the converted transaction data and the encrypted service information, and generating a relational database according to the corresponding relation between the transaction data and the encrypted service information.
It is understood that a database includes one or more tables. For example, there may be a table named authors with author information. Each column contains a particular type, such as the last name of the author. Each row contains all information about a particular author: name, address, etc. One table is a relationship in a relational database, and a relational database may contain a plurality of tables. And establishing a relational database according to the transaction data and the relational table of the encrypted service information. And storing the transaction data and the encrypted service information into a two-dimensional table to form a relational database, wherein the relational database can provide services such as data storage, data retrieval and the like.
As can be seen from the above description, the block chain data interaction method provided in the embodiment of the present application completes real-time synchronization and format conversion of data on a chain through the front-end service device, so that a service system can perform complex data retrieval, and improve the service transaction efficiency of complex query classes.
In order to solve the problem that one of the bottlenecks of the existing blockchain that is widely applied is a performance bottleneck that is low in transaction processing efficiency, and the performance bottleneck severely restricts the development of decentralized application, the present application provides an embodiment of a blockchain data interaction method, which is executed by blockchain link points, referring to fig. 5, where the blockchain data interaction method specifically includes the following contents:
step 300: receiving transaction data and encrypted business information, wherein the transaction data and the business information are generated by a preposed service device according to transaction information generated by a transaction, and an encrypted secret key is a private key of the preposed service device.
It can be understood that the front service device classifies the transaction information into transaction data and business information, and the business information is non-data information in the transaction. For example, a transaction message is: 26/2020: 00, A purchases a car with a value of 2 ten thousand yuan from B in M place, in the transaction, the transaction data is one car and 2 ten thousand yuan, the business information is 26 days at 12 months in 2020, 14: 00. a, B, M and the relationship between a and B. The prepositive service device encrypts the business information by using a self private key.
Step 400: and performing consensus on the transaction data.
Step 500: and if the agreement is passed, the transaction data and the encrypted service information are persisted.
It can be understood that the block link points are transaction consensus for updating information, the transaction consensus is determined by a Byzantine fault tolerant (PBFT) algorithm, and when the transaction is deemed to be consensus achieved, a new block and a block link and a state database local to a large screen of the transaction can be submitted.
As can be seen from the above description, in the block chain data interaction method provided in this embodiment of the present application, the pre-service device encrypts the service information in the transaction information, and processes the uplink key information, so that the block chain nodes only identify the transaction data in the transaction information uplink, and the service information is encrypted information, which can effectively protect privacy of the data on the chain, and meanwhile, based on the technical characteristics of the block chain that cannot be tampered, ensure authenticity of the uplink information.
In order to solve the problem that one of the bottlenecks of the existing blockchain that is widely applied is a performance bottleneck with low transaction processing efficiency, which severely restricts the development of decentralized applications, the present application provides an embodiment of a blockchain data interaction method, which specifically includes the following contents, referring to fig. 6:
step 600: the prepositive service device receives transaction information generated by a transaction, wherein the transaction information comprises transaction data and business information;
step 700: the prepositive service device encrypts the service information and broadcasts the transaction data and the encrypted service information to a block chain;
step 800: the block chain node receives the transaction data and the encrypted service information and identifies the transaction data;
step 900: if the common identification is passed, the block link node persists the transaction data and the encrypted service information.
It is understood that the transaction information generated by the transaction includes transaction data and service information, and the service information is non-data information in the transaction. For example, a transaction message is: 26/2020: 00, A purchases a car with a value of 2 ten thousand yuan from B in M place, in the transaction, the transaction data is one car and 2 ten thousand yuan, the business information is 26 days at 12 months in 2020, 14: 00. a, B, M and the relationship between a and B. The encrypted key is stored in the preposed service device, the key identification is required to be sent when the encrypted key is used, the preposed service device adopts a hardware encryption machine technology, the encryption machine instruction is directly accessed to realize the encryption of the business information in the transaction information, the preposed service device broadcasts the transaction data and the encrypted business information to the block chain, so that after the block chain passes the consensus on the transaction data, the transaction data and the encrypted business information are duralized, and the real-time synchronization of the transaction data can be ensured while the privacy of the business information on the chain is ensured.
As can be seen from the above description, in the block chain data interaction method provided in this embodiment of the present application, the pre-service device encrypts the service information in the transaction information, and processes the uplink key information, so that the block chain nodes only identify the transaction data in the transaction information uplink, and the service information is encrypted information, which can effectively protect privacy of the data on the chain, and meanwhile, based on the technical characteristics of the block chain that cannot be tampered, ensure authenticity of the uplink information.
In terms of software, in order to solve the problem of low performance of processing blockchain transaction data, referring to fig. 7, an embodiment of the pre-service device provided in the present application includes the following contents:
the information receiving module 10: receiving transaction information generated by a transaction; the transaction information comprises transaction data and service information;
it is understood that the information receiving module 10 separates transaction information generated by a transaction into transaction data and service information, which is non-data information in the transaction. For example, a transaction message is: 26/2020: 00, A purchases a car with a value of 2 ten thousand yuan from B in M place, in the transaction, the transaction data is one car and 2 ten thousand yuan, the business information is 26 days at 12 months in 2020, 14: 00. a, B, M and the relationship between a and B. After receiving the transaction information, the information receiving module 10 analyzes the transaction information, and divides the transaction information into transaction data and service information.
The information broadcasting module 11: encrypting the service information, broadcasting the transaction data and the encrypted service information to a block chain, so that the block chain can identify the transaction data together and then persist the transaction data and the encrypted service information.
It can be understood that the information broadcasting module 11 includes an encryption service unit, the private key of the front-end service device is stored in a centralized manner by the encryption service unit in the information broadcasting module 11, a key identifier needs to be sent when the private key is used, the information broadcasting module 11 adopts a hardware encryption machine technology, the service information encryption in the transaction information is realized by directly accessing an encryption machine instruction, after the encryption processing is completed, the information broadcasting module 11 broadcasts the transaction data and the encrypted service information to a block chain, the block chain identifies the transaction data together, and if the identification is passed, the transaction data completes the uplink transaction. The blockchain can adopt consensus mechanisms such as Pow workload certification, Pos rights and interests certification, DPos shares authorization certification mechanism, Pool verification Pool, Byzantine fault-tolerant algorithm certification and the like.
As can be seen from the above description, the method of the pre-service apparatus provided in this embodiment of the present application encrypts the service information in the transaction information, and processes the key information of uplink, so that only the transaction data is identified by the block link point on the transaction information uplink, and the service information is encrypted information, which can effectively protect the privacy of the data on the link, and meanwhile, based on the technical characteristics of the block link that cannot be tampered with, ensure the authenticity of the uplink information.
In order to further improve the efficiency of transaction information synchronization, in an embodiment of the front end service device provided in the present application, a preferred manner of node data synchronization is provided, referring to fig. 8, where the information broadcasting module 11 specifically includes the following contents:
the message queue service unit 101: and sending the transaction data and the encrypted service information to corresponding block link points.
It is understood that the message queue service unit 101 sends the transaction data and the encrypted service information to all corresponding block link points in the block chain, and the block chain transaction consensus is determined by using a byzantine fault tolerant (PBFT) algorithm. The message queue service unit 101 follows the AMQP protocol and provides a loosely coupled approach to building distributed applications that are implemented in a synchronous or asynchronous manner, with API calls for the message queue service unit 101 being embedded in blockchain nodes and message receiving modules to provide information exchange by sending messages to and from memory or disk-based queues.
Relational database unit 102: and storing the transaction data and the encrypted service information into a relational database.
It is understood that a relational database is a type of database that stores and provides access to data points that are related to one another. Relational databases are based on relational models, which is an intuitive, straightforward way to represent data in tables. The relational model refers to a two-dimensional table model, and thus a relational database is a data organization composed of two-dimensional tables and the links between them. A table is a collection of data organized in rows and columns. A database includes one or more tables. For example, there may be a table named authors with author information. Each column contains a particular type, such as the last name of the author. Each row contains all information about a particular author: name, address, etc.
One table is a relationship in a relational database, and a relational database may contain a plurality of tables. In a relational database, each row in a table is a record with a unique ID (called a key). The columns of the table hold attributes of the data, with each record typically having a value for each attribute, which facilitates establishing relationships between data points. The relational database unit 102 stores the transaction data and the encrypted service information into 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 service information to form a data model independent of the specific DBMS, which can be represented by an entity-contact model, and then converts the data model into a set of relational patterns supported by the selected relational database management system RDBMS and selects a physical structure suitable for an application environment, including a storage structure and an access method.
As can be seen from the above description, the front-end service device provided in the embodiment of the present application performs format conversion on the block data and stores the block data in the relational database, so that a service party can quickly complete a part of query-type service transactions through complex data retrieval, and key contents of service data are encrypted by a hardware encryption engine, which can also effectively protect data security.
In order to further improve the efficiency of transaction information synchronization, in an embodiment of the pre-service device provided in the present application, a preferred manner of transaction data sharing is provided, where the message queue service unit 101 of the pre-service device specifically includes the following contents:
a message queue component: and sending the transaction data and the encrypted service information to a specified message queue, and forming a service message in the specified message queue by the transaction data and the encrypted service information.
It will be appreciated that message queuing is a technique for exchanging information between distributed applications, where messages are continually written into a message queue on one side and read from the queue on the other side. The message publisher only takes care of posting messages to the message queue and not of who to fetch them, and the message consumer only takes messages from the message queue regardless of who posted them. So that neither the publisher nor the user is aware of the presence of the other. The message queue may reside on memory or disk, the queue storing messages until they are read by the application. With the message queue, applications can perform tasks independently, they do not need to know each other's location, or wait for a receiving program to receive the message before continuing execution. The transaction data and the encrypted service information are packaged into a message and stored in a designated message queue. The message queue component encapsulates the transaction data and the encrypted service information into a new message, which can be stored in a memory or a disk of the message queue.
A messaging component: and sending the service message to a subscription node.
It can be understood that the blockchain node subscribes to the message queue, and after the message queue encapsulates the transaction data and the encrypted service information into a new message, the new message is sent to the subscribed blockchain node through the message sending component.
As can be seen from the above description, the front end service device provided in the embodiment of the present application directly transmits transaction data to the blockchain when the message queue server is not used, and the data transmission pressure of the front end service device is increased dramatically under the high concurrency condition, so that the response speed is reduced. After the message queue is adopted, the front-end service device immediately returns transaction data after sending the transaction data to the message queue, and then the subscription node of the message queue acquires the data from the message queue and asynchronously stores the data to the block chain node. The processing speed of the message queue server is faster than the transaction data sending speed of the preposed service device, so the performance of the block chain is greatly improved.
In order to further improve the efficiency of transaction information synchronization, in an embodiment of the pre-service device provided in the present application, a preferred manner of transaction data storage is provided, and the relational database unit 102 of the pre-service device specifically includes the following contents:
an information processing component: and carrying out format conversion on the transaction data and the encrypted service information.
It can be understood that the relational database supports various relational databases such as oracle, mysql and the like, and is convenient for selecting and using the database according to different business scenarios and providing services such as data storage, retrieval and the like for other units. The information processing component analyzes the transaction data and the encrypted service information and converts the transaction data and the encrypted service information into a format which can be stored in a relational database.
An information association component: and generating a corresponding relation of the transaction data and the encrypted service information according to the converted transaction data and the encrypted service information.
It will be appreciated 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 attributes of the data, each record generally has a value for each attribute, and the information association component establishes a relational table of transaction data and encrypted service information based on the unique ID and attribute values of the transaction data and encrypted service information. Specifically, the information association component synthesizes, summarizes and abstracts the transaction data and the encrypted service information to form a two-dimensional table, converts the two-dimensional table into a group of relational modes supported by a selected relational database management system (RDBMS), and selects a physical structure suitable for an application environment for the relational mode, wherein the physical structure comprises a storage structure and an access method.
The relational database component: and generating transaction data according to the converted transaction data and the encrypted service information, and generating a relational database according to the corresponding relation between the transaction data and the encrypted service information.
It is understood that a database includes one or more tables. For example, there may be a table named authors with author information. Each column contains a particular type, such as the last name of the author. Each row contains all information about a particular author: name, address, etc. One table is a relationship in a relational database, and a relational database may contain a plurality of tables. And the relational database component establishes a relational database according to the transaction data and the relational table of the encrypted service information.
The embodiment of the front end service apparatus provided in the present application may be specifically configured to execute the processing procedure of the embodiment of the front end service apparatus in the foregoing embodiment, and the functions of the embodiment are not described herein again, and reference may be made to the detailed description of the embodiment of the apparatus.
As can be seen from the above description, the front-end service device provided in this embodiment of the present application encrypts the service information in the transaction information, and processes the key information of uplink, so that uplink and block link points of the transaction information only identify the transaction data, and the service information is encrypted information, which can effectively protect privacy of data on the link, and meanwhile, based on the technical characteristics of the block link that cannot be tampered, ensure authenticity of the uplink information, and complete real-time synchronization and format conversion of data on the link through the message queue and the relational database, so that the service system can perform complex data retrieval, and improve the service transaction efficiency of complex query types.
For example, a transaction message is: 26/2020: 00, A purchases a car with a value of 2 ten thousand yuan from B in M place, in the transaction, the transaction data is one car and 2 ten thousand yuan, the business information is 26 days at 12 months in 2020, 14: 00. a, B, M and the relationship between a and B.
The information broadcasting module 11 encrypts the service information, and after the encryption is completed, the information broadcasting module 11 sends the transaction data and the encrypted service information to the message queue service unit 101 and the relational database unit 102; the message queue component packages the transaction data and the encrypted service information into a newly added message, and the message sending component sends the newly added message to the block chain node subscribed to the message queue; the information processing component carries out format conversion on the transaction data and the encrypted service information, the information correlation component generates one or more two-dimensional tables according to the converted transaction data and the encrypted service information, the two-dimensional tables refer to tables 1, 2 and 3, and the relational database component generates a relational database according to the two-dimensional tables.
ID | Date | Time | Location of a site |
1001 | 26/12/2020 | 14:00 | M ground |
1002 | 26/12/2020 | 14:00 | M ground |
TABLE 1
ID | Number of transactions | Amount of transaction |
1001 | 1 | 2 ten thousand |
1002 | 1 | 2 ten thousand |
TABLE 2
ID | Name (I) | Transaction relationships |
1001 | A | Buy into |
1002 | B | Sell out |
TABLE 3
In table 1, table 2 and table 3, a certain row in each table is related to a certain row in the other two tables, one table contains more data, the data is separated into different tables, different security levels are divided, transaction data are extracted to form a table, and the efficiency of data retrieval of the relational database is improved.
In some specific embodiments, referring to fig. 9, the front service device specifically further includes a log service module and a business service module.
It can be understood that the log service module is used for collecting the operation log of the front service device and the operation log of the network node of the federation blockchain, and providing the view for the administrator.
The service module is connected with a service system and completes communication through https bidirectional authentication. The business system is a system which needs to complete business transaction based on block chain technology.
The https bidirectional authentication means that a client sends information such as an SSL protocol version number, an encryption algorithm type, a random number and the like to a server, the server returns information such as the SSL protocol version number, the encryption algorithm type, the random number and the like to the client, and also returns a certificate of the server, namely a public key certificate, and the client verifies the legitimacy of the server by using the information returned by the server, and the https bidirectional authentication includes: whether the certificate is overdue, whether the CA of the hairstyle server certificate is reliable, whether the returned public key can correctly unlock the digital signature in the returned certificate and whether the domain name on the server certificate is matched with the actual domain name of the server, after the verification is passed, the communication is continued, otherwise, the communication is terminated, the server requires the client to send the certificate of the client, the client can send the certificate of the client to the server, the client can verify the certificate of the client, after the verification is passed, the public key of the client can be obtained, the client can send the symmetric encryption scheme which can be supported by the client to the server for the selection of the server, the server selects the encryption mode with the highest encryption degree from the encryption schemes provided by the client, encrypts the encryption scheme by using the public key obtained before, returns the encrypted scheme to the client, and after the client receives the encryption scheme ciphertext returned by the server, the server and the client use the password to carry out symmetric encryption in the next session, and the security of information in the communication process is ensured. And the business service module completes the business system request instruction through other units of the prepositive service device.
In order to solve the problem that one of the bottlenecks of the existing blockchain which is widely applied is a performance bottleneck with low transaction processing efficiency, which severely restricts the development of decentralized application, the present application provides an embodiment of a blockchain node, which is shown in fig. 10, where the blockchain node specifically includes the following contents:
the data receiving module 20: receiving transaction data and encrypted business information, wherein the transaction data and the business information are generated by a preposed service device according to transaction information generated by a transaction, and an encrypted secret key is a private key of the preposed service device.
It can be understood that the front service device classifies the transaction information into transaction data and business information, and the business information is non-data information in the transaction. For example, a transaction is as follows: on a certain day, 14: 00, A purchases a car with the value of 2 ten thousand yuan from B, wherein one car and 2 ten thousand yuan are transaction data, and the ratio of a day to a day is 14: 00. a, B the non-data information is traffic information. The prepositive service device encrypts the business information by using a self private key. The data receiving module 20 receives the transaction data and the encrypted service information sent by the front-end service device.
The data consensus module 21: and performing consensus on the transaction data.
The data persistence module 22: and if the agreement is passed, the transaction data and the encrypted service information are persisted.
It is understood that the block link points are transaction consensus for updating information, and may adopt consensus mechanisms such as Pow workload certification, Pos rights and interests certification, DPos share authorization certification mechanism, Pool verification Pool, byzantine fault-tolerant algorithm certification, and the like. In one embodiment of the present application, the block link point transaction consensus is determined using a Byzantine Fault tolerant (PBFT) algorithm, and when the transaction is deemed to be a consensus, the new block and its transaction chains and state database local to the large screen can be submitted.
The infrastructure for completing communication between the nodes of the block chain network can be in the forms of internet, private line and the like. The number of the common identification nodes of the block chain network is generally 3f +1, wherein f represents the number of fault-tolerant nodes which can be supported by the block chain system and is 1 at the minimum, because the transaction common identification and the determination by adopting a Byzantine fault-tolerant (PBFT) algorithm are realized, in the block chain system with 3f +1 common identification nodes, a main node is selected firstly, a new block is generated by the main node, each node broadcasts a transaction sent by a client to the whole network, the main node sorts and stores a plurality of transactions which need to be placed in the new block from the network into a list and broadcasts the list to the whole network, the three stages of submission and verification must be carried out in the block chain network of the alliance, and each node in each stage enters the next stage after receiving at least 2f +1 consistent confirmation messages from other nodes. If 2f +1 consistent acknowledgement messages from other stages cannot be received in any stage, the acknowledgement messages are not continuously sent. After the three stages are completed, the transaction is regarded as a consensus, and then a new block and a local block chain and a state database of the large screen of the transaction can be submitted.
As can be seen from the above description, the block chain node provided in the embodiment of the present application receives the transaction data and the encrypted service information sent by the front-end service device, and processes the service information, so that the block chain node only identifies the transaction data when the transaction information is uplink, and the service information is encrypted information, which can effectively protect the privacy of the data on the chain, and meanwhile, based on the technical characteristic that the block chain cannot be tampered, the authenticity of the uplink information is ensured.
In order to solve the problem that one of the bottlenecks of the existing blockchain that is widely applied is a performance bottleneck with low transaction processing efficiency, which severely restricts the development of decentralized applications, the present application provides an embodiment of a blockchain data interaction system, which specifically includes the following contents, referring to fig. 11: a pre-service device 30 and a plurality of block link points 31 forming a block chain.
The front-end service device 30 is specifically configured to execute the following:
step 100: receiving transaction information generated by a transaction; the transaction information includes transaction data and business information.
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: on a certain day, 14: 00, A purchases a car with the value of 2 ten thousand yuan from B, wherein one car and 2 ten thousand yuan are transaction data, and the ratio of a day to a day is 14: 00. a, B the non-data information is traffic information.
Step 200: encrypting the service information, broadcasting the transaction data and the encrypted service information to a block chain, so that the block chain can identify the transaction data together and then persist the transaction data and the encrypted service information.
It can be understood that the encrypted key is stored in the front-end service device, the key identifier needs to be sent when the encrypted key is used, the front-end service device adopts a hardware encryption machine technology, the encryption machine instruction is directly accessed 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 block chain, so that the block chain can ensure that the transaction data and the encrypted business information are persistent after the transaction data are identified and passed, and the real-time synchronization of the transaction data can be ensured while the privacy of the business information on the chain is ensured.
The block chain node 31 is specifically configured to execute the following:
step 300: receiving transaction data and encrypted business information, wherein the transaction data and the business information are generated by a preposed service device according to transaction information generated by a transaction, and an encrypted secret key is a private key of the preposed service device.
It can be understood that the front service device classifies the transaction information into transaction data and business information, and the business information is non-data information in the transaction. For example, a transaction is as follows: on a certain day, 14: 00, A purchases a car with the value of 2 ten thousand yuan from B, wherein one car and 2 ten thousand yuan are transaction data, and the ratio of a day to a day is 14: 00. a, B the non-data information is traffic information. The prepositive service device encrypts the business information by using a self private key.
Step 400: and performing consensus on the transaction data.
Step 500: and if the agreement is passed, the transaction data and the encrypted service information are persisted.
It can be understood that the block link points are transaction consensus for updating information, the transaction consensus is determined by a Byzantine fault tolerant (PBFT) algorithm, and when the transaction is deemed to be consensus achieved, a new block and a block link and a state database local to a large screen of the transaction can be submitted.
As can be seen from the above description, in the block chain data interaction system provided in the embodiment of the present application, the pre-service device encrypts the service information in the transaction information, and processes the uplink key information, so that the block chain nodes only identify the transaction data in the transaction information uplink, and the service information is encrypted information, which can effectively protect the privacy of the data on the chain, and meanwhile, based on the technical characteristics of the block chain that cannot be tampered, the authenticity of the uplink information is ensured.
In some embodiments, referring to fig. 11, the blockchain data interaction system further includes: a business system module 32 and a communication network module 33.
It is understood that the service system module 32 refers to a system that needs to complete service transaction based on the blockchain technology, and the communication network module 33 is an infrastructure for completing communication between nodes of the blockchain network, and may be in the form of internet, private line, and the like.
As can be seen from the above description, in the block chain data interaction system provided in this embodiment of the application, the pre-service device encrypts the private content of the service data before chaining, and then chains the private content, the key is stored in the pre-service device, the block data change event of the block chain node is pushed to the pre-service device by using the message queue technology, the pre-service device pulls the new data of the node, and performs format conversion on the block data and stores the block data in the relational database.
The following describes the synchronization of nodes with reference to an embodiment, which is shown in fig. 12.
Step 101: and the block link point pushes the block newly-added information to a specified queue of the message queue service unit.
Step 102: and the queue of the message queue service unit receives the node block data newly added information and pushes the information to the node server unit which subscribes to the queue.
Step 103: and the node service unit receives the node block data newly-added information and pulls the new block data generated by the block chain node according to the newly-added information.
Step 104: the node service unit completes the data format conversion of the node block through the data processing unit.
Step 105: if the data processing unit is successfully converted, step 106 is entered, otherwise step 107 is entered.
Step 106: the node service unit completes data storage through the relational database unit.
Step 107: the node service unit receives the data conversion and storage result.
Step 108: the terminal displays the processing result, and the log service unit records the recording processing process.
Step 109: the synchronous data transaction is ended.
The blockchain transaction is described in detail below with reference to an embodiment, which is shown in fig. 13.
Step 2000: and the business system initiates a transaction request to the business service module.
Step 2001: and the business service module receives the transaction request and checks the request.
Step 2002: if the check label is passed, the service system side is legal, step 204 is entered, otherwise step 203 is entered
Step 2003: the service system request is rejected.
Step 2004: and the information receiving module judges the type of the service transaction.
Step 2005: if it is a query type transaction, step 207 is entered, otherwise step 206 is entered.
Step 2006: the information broadcasting module encrypts the key service information through the encryption service unit and then sends the transaction to the block chain node to complete the uplink transaction.
Step 2007: the relational database unit completes data retrieval through the relational database unit.
Step 2008: and the business service module returns the processing result to the business system.
In terms of hardware, in order to solve a performance bottleneck that one of bottlenecks that existing blockchains are widely applied is low in transaction processing efficiency, and the performance bottleneck seriously restricts development of decentralized applications, the present application provides an embodiment of an electronic device for implementing all or part of contents in the blockchain data interaction method, where the electronic device specifically includes the following contents:
fig. 14 is a schematic block diagram of a system configuration of an electronic device 9600 according to an embodiment of the present application. As shown in fig. 14, the electronic device 9600 can include a central processor 9100 and a memory 9140; the memory 9140 is coupled to the central processor 9100. Notably, this FIG. 14 is exemplary; other types of structures may also be used in addition to or in place of the structure to implement telecommunications or other functions.
In one embodiment, the blockchain data interaction function may be integrated into a central processor. Wherein the central processor may be configured to control:
step 100: receiving transaction information generated by a transaction; the transaction information includes transaction data and business information.
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: on a certain day, 14: 00, A purchases a car with the value of 2 ten thousand yuan from B, wherein one car and 2 ten thousand yuan are transaction data, and the ratio of a day to a day is 14: 00. a, B the non-data information is traffic information.
Step 200: encrypting the service information, broadcasting the transaction data and the encrypted service information to a block chain, so that the block chain can identify the transaction data together and then persist the transaction data and the encrypted service information.
It can be understood that the encrypted key is stored in the front-end service device, the key identifier needs to be sent when the encrypted key is used, the front-end service device adopts a hardware encryption machine technology, the encryption machine instruction is directly accessed 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 block chain, so that the block chain can ensure that the transaction data and the encrypted business information are persistent after the transaction data are identified and passed, and the real-time synchronization of the transaction data can be ensured while the privacy of the business information on the chain is ensured.
As can be seen from the above description, the electronic device provided in the embodiment of the present application encrypts the service information in the transaction information, and processes the uplink key information, so that the block link point only identifies the transaction data on the transaction information uplink, and the service information is encrypted information, which can effectively protect the privacy of the data on the link, and meanwhile, based on the technical characteristic that the block link cannot be tampered with, ensure the authenticity of the uplink information.
In another embodiment, the front-end service device may be configured separately from the central processor 9100, for example, the front-end service device may be configured as a chip connected to the central processor 9100, and the block chain data interaction function is realized by the control of the central processor.
As shown in fig. 14, the electronic device 9600 may further include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is noted that the electronic device 9600 also does not necessarily include all of the components shown in fig. 14; further, the electronic device 9600 may further include components not shown in fig. 14, which can be referred to in the related art.
As shown in fig. 14, a central processor 9100, sometimes referred to as a controller or operational control, can include a microprocessor or other processor device and/or logic device, which central processor 9100 receives input and controls the operation of the various components of the electronic device 9600.
The memory 9140 can be, for example, one or more of a buffer, a flash memory, a hard drive, a removable media, a volatile memory, a non-volatile memory, or other suitable device. The information relating to the failure may be stored, and a program for executing the information may be stored. And the central processing unit 9100 can execute the program stored in the memory 9140 to realize information storage or processing, or the like.
The input unit 9120 provides input to the central processor 9100. The input unit 9120 is, for example, a key or a touch input device. Power supply 9170 is used to provide power to electronic device 9600. The display 9160 is used for displaying display objects such as images and characters. The display may be, for example, an LCD display, but is not limited thereto.
The memory 9140 can be a solid state memory, e.g., Read Only Memory (ROM), Random Access Memory (RAM), a SIM card, or the like. There may also be a memory that holds information even when power is off, can be selectively erased, and is provided with more data, an example of which is sometimes called an EPROM or the like. The memory 9140 could also be some other type of device. Memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application/function storage portion 9142, the application/function storage portion 9142 being used for storing application programs and function programs or for executing a flow of operations of the electronic device 9600 by the central processor 9100.
The memory 9140 can also include a data store 9143, the data store 9143 being used to store data, such as contacts, digital data, pictures, sounds, and/or any other data used by an electronic device. The driver storage portion 9144 of the memory 9140 may include various drivers for the electronic device for communication functions and/or for performing other functions of the electronic device (e.g., messaging applications, contact book applications, etc.).
The communication module 9110 is a transmitter/receiver 9110 that transmits 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 in the case of a conventional mobile communication terminal.
Based on different communication technologies, a plurality of communication modules 9110, such as a cellular network module, a bluetooth module, and/or a wireless local area network module, may be provided in the same electronic device. The communication module (transmitter/receiver) 9110 is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide audio output via the speaker 9131 and receive audio input from the microphone 9132, thereby implementing ordinary telecommunications functions. The audio processor 9130 may include any suitable buffers, decoders, amplifiers and so forth. In addition, the audio processor 9130 is also coupled to the central processor 9100, thereby enabling recording locally through the microphone 9132 and enabling locally stored sounds to be played through the speaker 9131.
An embodiment of the present application further provides a computer-readable storage medium capable of implementing all the steps in the blockchain data interaction method in the foregoing embodiment, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program implements all the steps of the blockchain data interaction method in which an execution subject is a server or a client, for example, when the processor executes the computer program, the processor implements the following steps:
step 100: receiving transaction information generated by a transaction; the transaction information includes transaction data and business information.
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: on a certain day, 14: 00, A purchases a car with the value of 2 ten thousand yuan from B, wherein one car and 2 ten thousand yuan are transaction data, and the ratio of a day to a day is 14: 00. a, B the non-data information is traffic information.
Step 200: encrypting the service information, broadcasting the transaction data and the encrypted service information to a block chain, so that the block chain can identify the transaction data together and then persist the transaction data and the encrypted service information.
It can be understood that the encrypted key is stored in the front-end service device, the key identifier needs to be sent when the encrypted key is used, the front-end service device adopts a hardware encryption machine technology, the encryption machine instruction is directly accessed 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 block chain, so that the block chain can ensure that the transaction data and the encrypted business information are persistent after the transaction data are identified and passed, and the real-time synchronization of the transaction data can be ensured while the privacy of the business information on the chain is ensured.
As can be seen from the above description, the computer-readable medium provided in this embodiment of the present application encrypts the service information in the transaction information, and processes the uplink key information, so that the block link points only perform common identification on the transaction data for the uplink of the transaction information, and the service information is encrypted information, which can effectively protect the privacy of the data on the link, and meanwhile, based on the technical characteristics of the block link that cannot be tampered with, ensure the authenticity of the uplink information.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (devices), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The principle and the implementation mode of the invention are explained by applying specific embodiments in the invention, and the description of the embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.
Claims (14)
1. A method for interacting block chain data, performed by a pre-service device, includes:
receiving transaction information generated by a transaction; the transaction information comprises transaction data and service information;
encrypting the service information, broadcasting the transaction data and the encrypted service information to a block chain, so that the block chain can identify the transaction data together and then persist the transaction data and the encrypted service information.
2. The blockchain data interaction method of claim 1, wherein the broadcasting the transaction data and the encrypted service information to a blockchain comprises:
the transaction data and the encrypted service information are sent to corresponding block link points;
and storing the transaction data and the encrypted service information into a relational database.
3. The method for interacting blockchain data according to claim 2, wherein the sending the transaction data and the encrypted service information to the corresponding blockchain link point includes:
sending the transaction data and the encrypted service information to a specified message queue, and forming a service message in the specified message queue by the transaction data and the encrypted service information;
and sending the service message to a subscription node.
4. The blockchain data interaction method of claim 2, wherein the storing the transaction data and the encrypted business information into a relational database comprises:
carrying out format conversion on the transaction data and the encrypted service information;
generating a corresponding relation of the transaction data and the encrypted service information according to the converted transaction data and the encrypted service information;
and generating transaction data according to the converted transaction data and the encrypted service information, and generating a relational database according to the corresponding relation between the transaction data and the encrypted service information.
5. A method for interacting data in a block chain, performed by a block chain node, includes:
receiving transaction data and encrypted business information, wherein the transaction data and the business information are generated by a preposed service device according to transaction information generated by a transaction, and an encrypted key is a private key of the preposed service device;
consensus is carried out on the transaction data;
and if the agreement is passed, the transaction data and the encrypted service information are persisted.
6. A method for interacting data in a block chain, comprising:
the prepositive service device receives transaction information generated by a transaction, wherein the transaction information comprises transaction data and business information;
the prepositive service device encrypts the service information and broadcasts the transaction data and the encrypted service information to a block chain;
the block chain node receives the transaction data and the encrypted service information and identifies the transaction data;
if the common identification is passed, the block link node persists the transaction data and the encrypted service information.
7. A front-end service device, comprising:
an information receiving module: receiving transaction information generated by a transaction; the transaction information comprises transaction data and service information;
an information broadcasting module: encrypting the service information, broadcasting the transaction data and the encrypted service information to a block chain, so that the block chain can identify the transaction data together and then persist the transaction data and the encrypted service information.
8. The front-end service device of claim 7, wherein the information broadcasting module comprises:
message queue service unit: the transaction data and the encrypted service information are sent to corresponding block link points;
relational database unit: and storing the transaction data and the encrypted service information into a relational database.
9. The front end service device of claim 8, wherein the message queue service unit comprises:
a message queue component: sending the transaction data and the encrypted service information to a specified message queue, and forming a service message in the specified message queue by the transaction data and the encrypted service information;
a messaging component: and sending the service message to a subscription node.
10. The front end service device of claim 8, wherein the relational database unit comprises:
an information processing component: carrying out format conversion on the transaction data and the encrypted service information;
an information association component: generating a corresponding relation of the transaction data and the encrypted service information according to the converted transaction data and the encrypted service information;
the relational database component: and generating transaction data according to the converted transaction data and the encrypted service information, and generating a relational database according to the corresponding relation between the transaction data and the encrypted service information.
11. A block link point, comprising:
a data receiving module: receiving transaction data and encrypted business information, wherein the transaction data and the business information are generated by a preposed service device according to transaction information generated by a transaction, and an encrypted key is a private key of the preposed service device;
a data consensus module: consensus is carried out on the transaction data;
a data persistence module: and if the agreement is passed, the transaction data and the encrypted service information are persisted.
12. A blockchain data interaction system, comprising: a pre-service device and a plurality of block link points forming a block chain;
the prepositive service device is used for receiving transaction information generated by a transaction, wherein the transaction information comprises transaction data and service information, encrypting the service information and broadcasting the transaction data and the encrypted service information to a block chain;
and the block link point is used for receiving the transaction data and the encrypted service information, commonly identifying the transaction data, and persisting the transaction data and the encrypted service information if the common identification is passed.
13. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the block chain data interaction method of any one of claims 1 to 6 when executing the program.
14. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the blockchain data interaction method according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110355174.XA CN112860805A (en) | 2021-04-01 | 2021-04-01 | Block chain data interaction method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110355174.XA CN112860805A (en) | 2021-04-01 | 2021-04-01 | Block chain data interaction method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112860805A true CN112860805A (en) | 2021-05-28 |
Family
ID=75992067
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110355174.XA Pending CN112860805A (en) | 2021-04-01 | 2021-04-01 | Block chain data interaction method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112860805A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114244851A (en) * | 2021-12-24 | 2022-03-25 | 四川启睿克科技有限公司 | Data distribution method based on block chain |
CN114722431A (en) * | 2022-04-11 | 2022-07-08 | 北京神州邦邦技术服务有限公司 | Method and device for monitoring generic IT service process based on block chain and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107169371A (en) * | 2017-04-27 | 2017-09-15 | 北京众享比特科技有限公司 | A kind of database operation method and system based on block chain |
CN108989475A (en) * | 2018-10-11 | 2018-12-11 | 国网河南省电力公司 | Distributed storage transmission architecture based on block chain |
CN110022217A (en) * | 2019-04-04 | 2019-07-16 | 深圳大通实业股份有限公司 | A kind of credible deposit system of advertisement media business datum based on block chain |
CN110428259A (en) * | 2019-08-01 | 2019-11-08 | 上海计算机软件技术开发中心 | Block chain business datum transaction system |
CN110992027A (en) * | 2019-11-29 | 2020-04-10 | 支付宝(杭州)信息技术有限公司 | Efficient transaction method and device for realizing privacy protection in block chain |
CN111523891A (en) * | 2020-04-23 | 2020-08-11 | 腾讯科技(深圳)有限公司 | Block chain based information encryption method, device, equipment and storage medium |
US20210034455A1 (en) * | 2018-08-31 | 2021-02-04 | Advanced New Technologies Co., Ltd. | Method, apparatus and electronic device for blockchain-based transaction consensus processing |
-
2021
- 2021-04-01 CN CN202110355174.XA patent/CN112860805A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107169371A (en) * | 2017-04-27 | 2017-09-15 | 北京众享比特科技有限公司 | A kind of database operation method and system based on block chain |
US20210034455A1 (en) * | 2018-08-31 | 2021-02-04 | Advanced New Technologies Co., Ltd. | Method, apparatus and electronic device for blockchain-based transaction consensus processing |
CN108989475A (en) * | 2018-10-11 | 2018-12-11 | 国网河南省电力公司 | Distributed storage transmission architecture based on block chain |
CN110022217A (en) * | 2019-04-04 | 2019-07-16 | 深圳大通实业股份有限公司 | A kind of credible deposit system of advertisement media business datum based on block chain |
CN110428259A (en) * | 2019-08-01 | 2019-11-08 | 上海计算机软件技术开发中心 | Block chain business datum transaction system |
CN110992027A (en) * | 2019-11-29 | 2020-04-10 | 支付宝(杭州)信息技术有限公司 | Efficient transaction method and device for realizing privacy protection in block chain |
CN111523891A (en) * | 2020-04-23 | 2020-08-11 | 腾讯科技(深圳)有限公司 | Block chain based information encryption method, device, equipment and storage medium |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114244851A (en) * | 2021-12-24 | 2022-03-25 | 四川启睿克科技有限公司 | Data distribution method based on block chain |
CN114722431A (en) * | 2022-04-11 | 2022-07-08 | 北京神州邦邦技术服务有限公司 | Method and device for monitoring generic IT service process based on block chain and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020063820A1 (en) | Asset transaction method, storage medium and computer device | |
US20180113752A1 (en) | Inter-ledger messaging in a blockchain | |
CN110390525B (en) | Direct access method for block chain world state and block chain node | |
CN110675145B (en) | Block chain-based data processing method, device, terminal and storage medium | |
CN110070357B (en) | Data processing method, device and system | |
CN112600830B (en) | Service data processing method and device, electronic equipment and storage medium | |
KR102409982B1 (en) | Operation method of blockchain currency remittance service system and electronic wallet for currency remittance | |
US11740817B2 (en) | Modular data processing and storage system | |
CN112560072B (en) | Key management method, device, medium and equipment based on block chain | |
CN110751484A (en) | Account receivable management system based on block chain | |
CN110998633A (en) | Method and apparatus for avoiding double-flower problem in block chain technology based on read-write set model | |
CN112860805A (en) | Block chain data interaction method and system | |
CN112328486A (en) | Interface automation test method and device, computer equipment and storage medium | |
CN113239375A (en) | Block chain-based privacy factor data sharing system, method, computer device, and medium | |
CN112767113A (en) | Account checking data processing method, device and system based on block chain | |
CN114519197A (en) | Data storage architecture and method based on block chain and cloud service | |
CN116226289A (en) | Electronic certificate management method, device, equipment and storage medium based on blockchain | |
CN113987062A (en) | Data uplink storage method, system, device and storage medium | |
CN113129008A (en) | Data processing method and device, computer readable medium and electronic equipment | |
CN111259411B (en) | Block chain management method, device, electronic equipment and readable storage medium | |
CN112181983A (en) | Data processing method, device, equipment and medium | |
CN115208630A (en) | Block chain based data acquisition method and system and block chain system | |
CN111125734B (en) | Data processing method and system | |
CN110781523B (en) | Method and apparatus for processing information | |
CN114238585A (en) | Query method and device based on 5G message, computer equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |