CN110837536A - Information processing method, device and storage medium - Google Patents

Information processing method, device and storage medium Download PDF

Info

Publication number
CN110837536A
CN110837536A CN201910951449.9A CN201910951449A CN110837536A CN 110837536 A CN110837536 A CN 110837536A CN 201910951449 A CN201910951449 A CN 201910951449A CN 110837536 A CN110837536 A CN 110837536A
Authority
CN
China
Prior art keywords
block
target
node
terminal
request
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.)
Granted
Application number
CN201910951449.9A
Other languages
Chinese (zh)
Other versions
CN110837536B (en
Inventor
孙东凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jingdong Technology Information Technology Co Ltd
Original Assignee
Beijing Haiyi Tongzhan Information Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Haiyi Tongzhan Information Technology Co Ltd filed Critical Beijing Haiyi Tongzhan Information Technology Co Ltd
Priority to CN201910951449.9A priority Critical patent/CN110837536B/en
Publication of CN110837536A publication Critical patent/CN110837536A/en
Application granted granted Critical
Publication of CN110837536B publication Critical patent/CN110837536B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Multimedia (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses an information processing method, which comprises the following steps: receiving a block broadcast message sent by a consensus node, and sending a block request message to the consensus node according to the broadcast message; receiving a block response message sent by the consensus node aiming at the block request message, and executing a first synchronous operation according to the block response message; wherein the first synchronization operation comprises at least one of: and synchronizing the blocks, updating the world state table, updating the history index table and updating the block index table according to the block response message. The invention also discloses an information processing device and a storage medium.

Description

Information processing method, device and storage medium
Technical Field
The present invention relates to a block chain technology, and in particular, to an information processing method, apparatus, and computer-readable storage medium.
Background
With the development of computer technology, the application of blockchains is more and more extensive. Broadly, the blockchain technique is a completely new distributed infrastructure and computing approach that utilizes blockchain data structures to verify and store data, utilizes distributed node consensus algorithms to generate and update data, utilizes cryptography to secure data transmission and access, and utilizes intelligent contracts composed of automated script code to program and manipulate data. At present, a blockchain based on a hyper-ledger (hyper-hedge fabric) is widely applied, and in the application of the blockchain based on the hyper-ledger, each Peer (Peer) node is a full-volume node, that is, each Peer node stores all data, which results in a large occupied space and a large amount of storage resources being wasted when the data volume is large. In addition, with further increase of service data, related files in the blockchain are also increased, and if there are more Peer nodes included in the blockchain network, when capacity expansion is required, the large storage capacity of the Peer nodes also brings about complicated maintenance work.
Disclosure of Invention
In view of the above, the present invention provides an information processing method, an information processing apparatus, and a computer-readable storage medium.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
the embodiment of the invention provides an information processing method, which comprises the following steps:
receiving a block broadcast message sent by a consensus node, and sending a block request message to the consensus node according to the block broadcast message;
receiving a block response message sent by the consensus node aiming at the block request message, and executing a first synchronous operation according to the block response message;
wherein the first synchronization operation comprises at least one of: and synchronizing the blocks, updating the world state table, updating the history index table and updating the block index table according to the block response message.
In the above scheme, the method further comprises:
receiving a transaction request sent by a terminal, carrying out transaction endorsement according to the transaction request, and sending a transaction endorsement result to the terminal.
In the above scheme, the method further comprises:
sending an event monitoring response message to the terminal to inform the terminal of an event processing result; the event processing result comprises at least one of the following: a block request message has been sent to the consensus node that a first synchronization operation has been performed.
In the above scheme, the method further comprises:
receiving an inquiry request sent by a terminal;
inquiring the world state table according to the inquiry request;
determining the latest value of a first target block corresponding to the query request;
and sending the determined latest value of the first target block to a terminal.
In the above scheme, the method further comprises:
receiving a first acquisition request sent by a terminal;
inquiring the block index table according to the first acquisition request, and determining a first target node where a second target block corresponding to the first acquisition request is located; the first target node stores at least one block;
sending a second acquisition request to the determined first target node, and receiving a data block of a second target block sent by the first target node aiming at the second acquisition request;
and sending the data block of the second target block to the terminal.
In the above scheme, the method further comprises:
receiving a third acquisition request sent by the terminal;
inquiring the historical index table according to the third acquisition request, and determining a third target block where a target transaction place corresponding to the third acquisition request is located and a second target node where the third target block is located; the second target node stores at least one block;
sending a fourth acquisition request to the second target node, and receiving a target historical operation record of a target transaction sent by the second target node aiming at the fourth acquisition request;
and sending the target historical operation record of the target transaction to the terminal.
An embodiment of the present invention further provides an information processing apparatus, where the apparatus includes: a first processing module and a second processing module; wherein the content of the first and second substances,
the first processing module is configured to receive a block broadcast message sent by a consensus node, and send a block request message to the consensus node according to the block broadcast message;
the second processing module is configured to receive a block response message sent by the consensus node for a block request message, and execute a first synchronization operation according to the block response message;
wherein the first synchronization operation comprises at least one of: and synchronizing the blocks, updating the world state table, updating the history index table and updating the block index table according to the block response message.
In the above scheme, the apparatus further comprises: and the third processing module is used for receiving the transaction request sent by the terminal, carrying out transaction endorsement according to the transaction request and sending a transaction endorsement result to the terminal.
In the above scheme, the apparatus further comprises: a fourth processing module, configured to send an event monitoring response message to the terminal, so as to inform the terminal of an event processing result; the event processing result comprises at least one of the following: a block request message has been sent to the consensus node that a first synchronization operation has been performed.
In the above scheme, the apparatus further comprises: the query module is used for receiving a query request sent by a terminal; inquiring the world state table according to the inquiry request; determining the latest value of a first target block corresponding to the query request; and sending the determined latest value of the first target block to a terminal.
In the above scheme, the apparatus further comprises: the first acquisition module is used for receiving a data acquisition request sent by a terminal;
querying the historical index table according to the data acquisition request, and determining a node where a second target block corresponding to the data acquisition request is located; at least one block is stored in a node where the second target block is located; the block, comprising: history recording;
sending an acquisition request to the determined node, and receiving a history record of a second target block sent by the node aiming at the acquisition request;
and sending the history record of the second target block to the terminal.
In the above scheme, the apparatus further comprises: the second acquisition module is used for receiving a third acquisition request sent by the terminal;
inquiring the historical index table according to the third acquisition request, and determining a third target block where a target transaction place corresponding to the third acquisition request is located and a second target node where the third target block is located; the second target node stores at least one block;
sending a fourth acquisition request to the second target node, and receiving a target historical operation record of a target transaction sent by the second target node aiming at the fourth acquisition request;
and sending the target historical operation record of the target transaction to the terminal.
An embodiment of the present invention further provides an information processing apparatus, where the apparatus includes: a processor and a memory for storing a computer program capable of running on the processor; wherein the content of the first and second substances,
the processor is configured to execute the steps of any one of the information processing methods when the computer program is executed.
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of any one of the information processing methods described above.
The information processing method, the device and the computer readable storage medium provided by the embodiment of the invention receive a block broadcast message sent by a consensus node, and send a block request message to the consensus node according to the block broadcast message; receiving a block response message sent by the consensus node aiming at the block request message, and executing a first synchronous operation according to the block response message; wherein the first synchronization operation comprises at least one of: and synchronizing the blocks, updating the world state table, updating the history index table and updating the block index table according to the block response message. In the embodiment of the invention, the Peer node only needs to synchronize the block, update the world state table, the history index table and/or the block index table, and does not need to write a new block into the book data, thereby saving the storage space of the node.
Drawings
Fig. 1 is a schematic flowchart of an information processing method according to an embodiment of the present invention;
fig. 2 is a schematic diagram illustrating a comparison between a first node and a second node according to an embodiment of the present invention;
FIG. 3 is a flow chart illustrating another information processing method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an information processing apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of another information processing apparatus according to an embodiment of the present invention.
Detailed Description
In various embodiments of the present invention, a block broadcast message sent by a consensus node is received, and a block request message is sent to the consensus node according to the block broadcast message; receiving a block response message sent by the consensus node aiming at the block request message, and executing a first synchronous operation according to the block response message; wherein the first synchronization operation comprises at least one of: and synchronizing the blocks, updating the world state table, updating the history index table and updating the block index table according to the block response message.
The present invention will be described in further detail with reference to examples.
Fig. 1 is a schematic flowchart of an information processing method according to an embodiment of the present invention; the method can be applied to a first node in a block chain network, and the first node can be any Peer node in the block chain network; as shown in fig. 1, the method includes:
step 101, receiving a block broadcast message sent by a consensus node, and sending a block request message to the consensus node according to the block broadcast message.
Specifically, before step 101, the method further includes:
receiving a transaction request sent by a terminal, carrying out transaction endorsement according to the transaction request, and sending a transaction endorsement result to the terminal. Here, the first node may perform transaction endorsement as an endorsement node.
It should be noted that the transaction endorsement may also be performed by other nodes in the blockchain network, i.e. the first node no longer acts as an endorsement node.
Specifically, some embodiments provide an information processing method that can be applied to a transaction flow between an Application program (APP) and a blockchain network. Transaction endorsements are typically performed prior to performing step 101. The transaction endorsement process comprises the following steps: the method comprises the steps that a user creates a transaction through an Application program (APP) on a terminal of the user, the APP determines a transaction request according to the created transaction, and sends the transaction request to a chosen endorsement node of the user, and in some embodiments, the endorsement node can be any Peer node in a block chain network, such as the first node. The endorsement node simulates transaction to generate an endorsement signature, namely, the endorsement transaction is carried out; and after the transaction endorsement is completed, the endorsement node sends a transaction endorsement result to the APP. After determining a transaction endorsement result, the APP can send a transaction consensus request to a consensus node, and the consensus node receives the transaction consensus request sent by the APP and generates a block according to the transaction consensus request; sending a block broadcast message according to the generated block, wherein the block broadcast message is used for informing the generated block; after receiving the block broadcast message, the first node sends a block request message to the common node according to the block broadcast message, that is, the first node executes step 101.
Here, the endorsement node simulates a transaction, i.e. the endorsement node attempts to execute the transaction, specifically, the endorsement node executes the name and parameters of the chain code to be executed in the transaction, and the simulated transaction is essentially the chain code specified in the simulated execution transaction. Endorsement signatures can be generated by endorsement of state changes (recorded in a read-write set, and the record content can include a read state key and version, and a written state key value) caused by transactions.
It should be noted that, when the first node receives a block broadcast message sent by a consensus node and sends a block request message to the consensus node according to the block broadcast message, the identity of the first node is an accounting node, and is used to maintain structures (including a world state table, a history index table, and a block index table) of a block chain and a super account book.
Here, the functions of the respective nodes in the block chain network are further explained as follows.
APP: the terminal interacts with the blockchain network based on the downloaded and installed APP. Before initiating a formal transaction, a transaction (promosal) needs to be created and submitted to an endorsement node for endorsement; after the APP collects enough endorsement support (the specific number is determined according to the endorsement strategy), a legal transaction request (endorsement with an endorsement node) can be constructed by using the endorsement and sent to the consensus node; and generating a block corresponding to the transaction request by the consensus node according to the transaction request.
Endorsement node (Endorser): the method is mainly used for calling the APP to complete endorsement processing of a transaction proposal. After receiving a transaction proposal from the APP, checking validity, authority and the like, simulating the transaction if the check is passed, endorseing the state change caused by the transaction, and generating an endorsement signature; and returning a transaction endorsement result to the APP after the transaction is simulated, wherein the transaction endorsement result comprises the generated endorsement signature.
Consensus node (Orderer): and receiving the transaction containing the endorsement signature, sequencing the received transactions and generating a block, wherein the generated block is used for broadcasting to the Peer node.
Accounting node (commit): and maintaining the structures of the block chain and the account book.
102, receiving a block response message sent by the consensus node for the block request message, and executing a first synchronization operation according to the block response message; wherein the first synchronization operation comprises at least one of: and synchronizing the blocks, updating the world state table, updating the history index table and updating the block index table according to the block response message.
In this embodiment, the first node stores a world state table, a history index table, and a block index table.
Here, the world state table, also referred to as a state DataBase (DB, DataBase), records a correspondence relationship between the latest value of each block after the execution of the transaction and the key of the block.
Accordingly, the updating the world state table comprises: and updating the latest world state, namely updating the latest value of each block.
The history index table, also called history DB, is used to record the correspondence between the history operation executed for any transaction in any block and the corresponding key of the block and the transaction key.
Correspondingly, the updating the history index table comprises the following steps: historical index records are added for the block response message synchronization block and for transactions in the block.
The block index table, also called index DB, is used to record the correspondence between the storage location where the block is located and the key of the block.
Correspondingly, the updating the block index table includes: adding a block index record; the block index record comprises: the key of the block and the storage location of the block (e.g., a node in the chain network of blocks where the block resides).
Generally, the key of the transaction may be the name of the transaction. The key of the tile may be the filename (nFile) and/or the tile name (nBlockPos) of the tile. That is, according to nFile and/or nbockpos, the corresponding table is searched, and the latest value, the storage location where the block is located, and the like can be determined. Furthermore, in the block index table, for each block, two pointer keys may be recorded, which correspond to the previous and next blocks of the block, respectively, so that the entire block chain may be determined according to the block index table.
In this embodiment, the synchronization block includes: and verifying the block corresponding to the block response message (such as verifying the transaction message structure, the signature integrity, whether the read-write set versions are repeated, whether the read-write set versions are matched and the like). After the verification is passed, the world state table, the history index table and the block index table can be updated.
In this embodiment, the method further includes:
sending an event monitoring response message to the terminal to inform the terminal of an event processing result; the event processing result comprises at least one of the following: a block request message has been sent to the consensus node that a first synchronization operation has been performed.
Here, before the sending the event listening response message to the terminal, the method further includes: and determining whether the terminal is configured with an event monitoring request.
Specifically, the terminal has a human-computer interaction interface, and a user can operate the APP through the human-computer interaction interface, where the operation includes the above-mentioned creation transaction, and may also include a configuration event monitoring request; for example, when a transaction is created, the APP may provide an event monitoring request button, and when a user clicks the event monitoring request button, the APP may determine a corresponding event monitoring instruction.
In an embodiment, the event monitoring instruction may be carried in the transaction request and sent to the first node, so that the first node determines whether the terminal is configured with the event monitoring request according to whether the event monitoring instruction is received.
In another embodiment, the first node may send a confirmation request to the terminal to confirm whether the terminal is configured with an event monitoring request; after receiving the confirmation request, the terminal determines whether the terminal is configured with an event monitoring request, and replies a confirmation message if the terminal is configured with the event monitoring request; and if the terminal is determined not to be configured with the event monitoring request, replying a denial message.
In this embodiment, the method further includes:
receiving an inquiry request sent by a terminal;
inquiring the world state table according to the inquiry request;
determining the latest value of a first target block corresponding to the query request;
and sending the determined latest value of the first target block to a terminal.
Here, when the query request is a query request for a first target block, the latest value of the first target block includes: a latest value of at least one transaction in the first target block.
When the query request is a query request for a transaction in a first target block, the latest value of the first target block specifically refers to: the latest value for a transaction in the first target block.
In this embodiment, the method further includes:
receiving a first acquisition request sent by a terminal;
inquiring the block index table according to the first acquisition request, and determining a first target node where a second target block corresponding to the first acquisition request is located; the first target node stores at least one block;
sending a second acquisition request to the determined first target node, and receiving a data block of a second target block sent by the first target node aiming at the second acquisition request;
and sending the data block of the second target block to the terminal.
Here, the second acquisition request is generated by the first node, and the second acquisition request should include at least an identification of the second target block. And sending a second acquisition request to inform the first target node of requesting to acquire the data block of the second target block corresponding to the identifier.
In this embodiment, the method further includes:
receiving a third acquisition request sent by the terminal;
inquiring the historical index table according to the third acquisition request, and determining a third target block where a target transaction place corresponding to the third acquisition request is located and a second target node where the third target block is located; the second target node stores at least one block;
sending a fourth acquisition request to the second target node, and receiving a target historical operation record of a target transaction sent by the second target node aiming at the fourth acquisition request;
and sending the target historical operation record of the target transaction to the terminal.
Here, the fourth obtaining request is generated by the first node, and the second obtaining request should at least include an identifier of the third target block and an identifier of the target historical operation record, so as to inform the second target node of the request for obtaining the target historical operation record in the third target block.
The sending to the terminal specifically refers to the APP sent to the terminal.
Here, the query request, the first obtaining request, and the third obtaining request sent by the receiving terminal specifically refer to the query request, the first obtaining request, and the third obtaining request sent by the APP of the receiving terminal.
In this embodiment, the blockchain network may include a first node and a second node, where the second node is different from the first node, and the second node stores ledger data including at least one block in addition to a world state table, a history index table, and a block index table; further, it is understood that the second node holds at least one block, and the block includes related data of the block, such as a data block (including a history record), block header information of the data block, and the like.
The first target node where the first target block is located and the second target node where the second target block is located may be any second node in the block chain network.
The number of the first nodes and the number of the second nodes allocated in the blockchain network are determined by a developer, and the allocation may be performed based on how many resources of the blockchain network are, specifically, when the resources are more, the number of the second nodes may be relatively more, and when the resources are less, the number of the second nodes may be relatively less, but it should be noted that at least one second node is included in the blockchain network.
The following description is made for the consensus node, and the information processing method applied to the consensus node includes:
receiving transaction information sent by a terminal, and generating a block according to the transaction information;
receiving a block request message transmitted by a node (here, the first node or the second node) according to the generated block transmission block broadcast message;
sending a block response message according to the block request message, wherein the block response message is received by the node and executes synchronous operation; when the node is a first node, executing a first processing operation, and when the node is a second node, executing a second processing operation;
wherein the first processing operation comprises at least one of: synchronizing the blocks according to the block response message, updating a world state table according to the synchronized blocks, updating a history index table according to the synchronized blocks, and updating a block index table according to the synchronized blocks;
the second processing operation comprises at least one of: synchronizing blocks according to the block response message, writing the blocks into ledger data (such as a local ledger), updating a world state table according to the synchronized blocks, updating a history index table according to the synchronized blocks, and updating a block index table according to the synchronized blocks.
It can be seen that the operations performed by the first node and the second node are different, and the first node does not need to write the block into the book data, so that resource consumption of the node is reduced, and for the whole blockchain network, resource consumption in the blockchain network is also reduced.
It should be noted that the blockchain network must include at least one second node and may also include at least one first node. The number of the first nodes and the second nodes is determined according to the number of resources of the block chain network; when the resources are more, developers can set more second nodes, and when the resources are less, the developers can set more first nodes on the basis of ensuring at least one second node.
Fig. 2 is a schematic diagram illustrating a comparison between a first node and a second node according to an embodiment of the present invention; as shown in fig. 2, the right side is a lightweight node, and the lightweight node only stores a world state table, a history index table, and a block index table. When the lightweight node needs to query historical data (such as specific data for a certain transaction), the lightweight node can be queried in a full-scale mode.
And the left side of the system is provided with a full-scale node, and the full-scale node is stored with account book data besides a world state table, a history index table and a block index table. Here, the book data stores, in addition to the real data blocks: chain information for each node in the blockchain, block header information for the data block, a signature for each transaction, a certificate, etc.
The full-magnitude node may serve as the second node in the method shown in fig. 1, and the lightweight node may serve as the first node in the method shown in fig. 1.
FIG. 3 is a flow chart illustrating another information processing method according to an embodiment of the present invention; as shown in fig. 3, the method includes:
step 301, the APP submits the transaction to the lightweight node.
And step 302, the lightweight node carries out transaction endorsement according to the submitted transaction, and returns an endorsement result to the APP after the transaction endorsement is completed.
And step 303, the APP sends the endorsement result to a consensus node for consensus.
Specifically, the APP sends a transaction consensus request to the consensus node, the transaction consensus request including the endorsement result.
Step 304, the consensus node generates a block according to the transaction consensus request, and broadcasts new block information in the blockchain network.
Step 305, after receiving the broadcast, each relevant node sends a block request message to the common node to request block information.
Step 306, the consensus node replies to the block response message, and each relevant node performs a corresponding operation according to the block response message.
In particular, the related nodes include: a lightweight node (which may be understood as a first node in the method shown in fig. 1) and a full-scale node (which may be understood as a second node in the method shown in fig. 1).
For a full-scale node, step 3061 is performed: after the block is synchronized, the new block is written into the local chain (i.e. the new block is written into the account book data), and then the local world state table, the historical index table and the account book index table are updated.
For lightweight nodes, step 3062 is performed: and a local account book does not need to be written, and only the local world state table, the historical index table and the account book index table need to be updated.
It can be seen that the above steps are the steps when the front blockchain is from sending a transaction to writing a block, with the difference that the processing is different for the full-weight node than for the lightweight node for the block taken.
It should be noted that, in the above method, after receiving the broadcast new block information, the lightweight node may send an event monitoring response to the APP. Specifically, reference may be made to the method in fig. 1, which is not described herein for further details.
Fig. 4 is a schematic structural diagram of an information processing apparatus according to an embodiment of the present invention; the apparatus may be applied to a communication device; as shown in fig. 4, the apparatus includes: the device comprises a first processing module and a second processing module.
The first processing module is configured to receive a block broadcast message sent by a consensus node, and send a block request message to the consensus node according to the block broadcast message;
the second processing module is configured to receive a block response message sent by the consensus node for a block request message, and execute a first synchronization operation according to the block response message;
wherein the first synchronization operation comprises at least one of: and synchronizing the blocks, updating the world state table, updating the history index table and updating the block index table according to the block response message.
Specifically, the apparatus further comprises: and the third processing module is used for receiving the transaction request sent by the terminal, carrying out transaction endorsement according to the transaction request and sending a transaction endorsement result to the terminal.
Specifically, the apparatus further comprises: a fourth processing module, configured to send an event monitoring response message to the terminal, so as to inform the terminal of an event processing result; the event processing result comprises at least one of the following: a block request message has been sent to the consensus node that a first synchronization operation has been performed.
Specifically, the apparatus further comprises: the query module is used for receiving a query request sent by a terminal; inquiring the world state table according to the inquiry request; determining the latest value of a first target block corresponding to the query request; and sending the determined latest value of the first target block to a terminal.
Specifically, the apparatus further comprises: the first acquisition module is used for receiving a data acquisition request sent by a terminal;
querying the historical index table according to the data acquisition request, and determining a node where a second target block corresponding to the data acquisition request is located; at least one block is stored in a node where the second target block is located; the block, comprising: history recording;
sending an acquisition request to the determined node, and receiving a history record of a second target block sent by the node aiming at the acquisition request;
and sending the history record of the second target block to the terminal.
Specifically, the apparatus further comprises: the second acquisition module is used for receiving a third acquisition request sent by the terminal;
inquiring the historical index table according to the third acquisition request, and determining a third target block where a target transaction place corresponding to the third acquisition request is located and a second target node where the third target block is located; the second target node stores at least one block;
sending a fourth acquisition request to the second target node, and receiving a target historical operation record of a target transaction sent by the second target node aiming at the fourth acquisition request;
and sending the target historical operation record of the target transaction to the terminal.
It should be noted that: in the information processing apparatus provided in the above embodiment, when performing information processing, only the division of each program module is exemplified, and in practical applications, the processing may be distributed to different program modules according to needs, that is, the internal structure of the apparatus may be divided into different program modules to complete all or part of the processing described above. In addition, the information processing apparatus and the information processing method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments and are not described herein again.
Fig. 5 is a schematic structural diagram of another information processing apparatus according to an embodiment of the present invention. The apparatus 50 comprises: a processor 501 and a memory 502 for storing computer programs executable on the processor; wherein, the processor 501 is configured to execute, when running the computer program, the following steps: receiving a block broadcast message sent by a consensus node, and sending a block request message to the consensus node according to the block broadcast message; receiving a block response message sent by the consensus node aiming at the block request message, and executing a first synchronous operation according to the block response message; wherein the first synchronization operation comprises at least one of: and synchronizing the blocks, updating the world state table, updating the history index table and updating the block index table according to the block response message.
In an embodiment, the processor 501 is further configured to execute, when running the computer program, the following: receiving a transaction request sent by a terminal, carrying out transaction endorsement according to the transaction request, and sending a transaction endorsement result to the terminal.
In an embodiment, the processor 501 is further configured to execute, when running the computer program, the following: sending an event monitoring response message to the terminal to inform the terminal of an event processing result; the event processing result comprises at least one of the following: a block request message has been sent to the consensus node that a first synchronization operation has been performed.
In an embodiment, the processor 501 is further configured to execute, when running the computer program, the following: receiving an inquiry request sent by a terminal; inquiring the world state table according to the inquiry request; determining the latest value of a first target block corresponding to the query request; and sending the determined latest value of the first target block to a terminal.
In an embodiment, the processor 501 is further configured to execute, when running the computer program, the following: receiving a first acquisition request sent by a terminal; inquiring the block index table according to the first acquisition request, and determining a first target node where a second target block corresponding to the first acquisition request is located; the first target node stores at least one block; sending a second acquisition request to the determined first target node, and receiving a data block of a second target block sent by the first target node aiming at the second acquisition request; and sending the data block of the second target block to the terminal.
In an embodiment, the processor 501 is further configured to execute, when running the computer program, the following: receiving a third acquisition request sent by the terminal; inquiring the historical index table according to the third acquisition request, and determining a third target block where a target transaction place corresponding to the third acquisition request is located and a second target node where the third target block is located; the second target node stores at least one block; sending a fourth acquisition request to the second target node, and receiving a target historical operation record of a target transaction sent by the second target node aiming at the fourth acquisition request; and sending the target historical operation record of the target transaction to the terminal.
It should be noted that: the information processing apparatus and the information processing method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments and are not described herein again.
In practical applications, the apparatus 50 may further include: at least one network interface 503. Various components within information handling device 50 are coupled together by bus system 504. It is understood that the bus system 504 is used to enable communications among the components. The bus system 504 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 504 in fig. 5. The number of the processors 501 may be at least one. The network interface 503 is used for communication between the information processing apparatus 50 and other devices in a wired or wireless manner.
The memory 502 in the embodiment of the present invention is used to store various types of data to support the operation of the information processing apparatus 50.
The method disclosed by the above-mentioned embodiments of the present invention may be applied to the processor 501, or implemented by the processor 501. The processor 501 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 501. The Processor 501 may be a general purpose Processor, a DiGital Signal Processor (DSP), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc. Processor 501 may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the present invention. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed by the embodiment of the invention can be directly implemented by a hardware decoding processor, or can be implemented by combining hardware and software modules in the decoding processor. The software modules may be located in a storage medium located in the memory 502, and the processor 501 reads the information in the memory 502 and performs the steps of the aforementioned methods in conjunction with its hardware.
In an exemplary embodiment, the information processing apparatus 50 may be implemented by one or more Application Specific Integrated Circuits (ASICs), DSPs, Programmable Logic Devices (PLDs), Complex Programmable Logic Devices (CPLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, Micro Controllers (MCUs), microprocessors (microprocessors), or other electronic components for performing the foregoing methods.
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, performs: receiving a block broadcast message sent by a consensus node, and sending a block request message to the consensus node according to the block broadcast message; receiving a block response message sent by the consensus node aiming at the block request message, and executing a first synchronous operation according to the block response message; wherein the first synchronization operation comprises at least one of: and synchronizing the blocks, updating the world state table, updating the history index table and updating the block index table according to the block response message.
In one embodiment, the computer program, when executed by the processor, performs: receiving a transaction request sent by a terminal, carrying out transaction endorsement according to the transaction request, and sending a transaction endorsement result to the terminal.
In one embodiment, the computer program, when executed by the processor, performs: sending an event monitoring response message to the terminal to inform the terminal of an event processing result; the event processing result comprises at least one of the following: a block request message has been sent to the consensus node that a first synchronization operation has been performed.
In one embodiment, the computer program, when executed by the processor, performs: receiving an inquiry request sent by a terminal; inquiring the world state table according to the inquiry request; determining the latest value of a first target block corresponding to the query request; and sending the determined latest value of the first target block to a terminal.
In one embodiment, the computer program, when executed by the processor, performs: receiving a first acquisition request sent by a terminal; inquiring the block index table according to the first acquisition request, and determining a first target node where a second target block corresponding to the first acquisition request is located; the first target node stores at least one block; sending a second acquisition request to the determined first target node, and receiving a data block of a second target block sent by the first target node aiming at the second acquisition request; and sending the data block of the second target block to the terminal.
In one embodiment, the computer program, when executed by the processor, performs: receiving a third acquisition request sent by the terminal; inquiring the historical index table according to the third acquisition request, and determining a third target block where a target transaction place corresponding to the third acquisition request is located and a second target node where the third target block is located; the second target node stores at least one block; sending a fourth acquisition request to the second target node, and receiving a target historical operation record of a target transaction sent by the second target node aiming at the fourth acquisition request; and sending the target historical operation record of the target transaction to the terminal.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all the functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: a mobile storage device, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Alternatively, the integrated unit of the present invention may be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or a part contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media that can store program code.
The above description is only exemplary of the present invention and should not be taken as limiting the scope of the present invention, and any modifications, equivalents, improvements, etc. that are within the spirit and principle of the present invention should be included in the present invention.

Claims (14)

1. An information processing method, characterized in that the method comprises:
receiving a block broadcast message sent by a consensus node, and sending a block request message to the consensus node according to the block broadcast message;
receiving a block response message sent by the consensus node aiming at the block request message, and executing a first synchronous operation according to the block response message;
wherein the first synchronization operation comprises at least one of: and synchronizing the blocks, updating the world state table, updating the history index table and updating the block index table according to the block response message.
2. The method of claim 1, further comprising:
receiving a transaction request sent by a terminal, carrying out transaction endorsement according to the transaction request, and sending a transaction endorsement result to the terminal.
3. The method of claim 1, further comprising:
sending an event monitoring response message to the terminal to inform the terminal of an event processing result; the event processing result comprises at least one of the following: a block request message has been sent to the consensus node that a first synchronization operation has been performed.
4. The method of claim 1, further comprising:
receiving an inquiry request sent by a terminal;
inquiring the world state table according to the inquiry request;
determining the latest value of a first target block corresponding to the query request;
and sending the determined latest value of the first target block to a terminal.
5. The method of claim 1, further comprising:
receiving a first acquisition request sent by a terminal;
inquiring the block index table according to the first acquisition request, and determining a first target node where a second target block corresponding to the first acquisition request is located; the first target node stores at least one block;
sending a second acquisition request to the determined first target node, and receiving a data block of a second target block sent by the first target node aiming at the second acquisition request;
and sending the data block of the second target block to the terminal.
6. The method of claim 1, further comprising:
receiving a third acquisition request sent by the terminal;
inquiring the historical index table according to the third acquisition request, and determining a third target block where a target transaction place corresponding to the third acquisition request is located and a second target node where the third target block is located; the second target node stores at least one block;
sending a fourth acquisition request to the second target node, and receiving a target historical operation record of a target transaction sent by the second target node aiming at the fourth acquisition request;
and sending the target historical operation record of the target transaction to the terminal.
7. An information processing apparatus characterized in that the apparatus comprises: a first processing module and a second processing module; wherein the content of the first and second substances,
the first processing module is configured to receive a block broadcast message sent by a consensus node, and send a block request message to the consensus node according to the block broadcast message;
the second processing module is configured to receive a block response message sent by the consensus node for a block request message, and execute a first synchronization operation according to the block response message;
wherein the first synchronization operation comprises at least one of: and synchronizing the blocks, updating the world state table, updating the history index table and updating the block index table according to the block response message.
8. The apparatus of claim 7, further comprising: and the third processing module is used for receiving the transaction request sent by the terminal, carrying out transaction endorsement according to the transaction request and sending a transaction endorsement result to the terminal.
9. The apparatus of claim 7, further comprising: a fourth processing module, configured to send an event monitoring response message to the terminal, so as to inform the terminal of an event processing result; the event processing result comprises at least one of the following: a block request message has been sent to the consensus node that a first synchronization operation has been performed.
10. The apparatus of claim 7, further comprising: the query module is used for receiving a query request sent by a terminal; inquiring the world state table according to the inquiry request; determining the latest value of a first target block corresponding to the query request; and sending the determined latest value of the first target block to a terminal.
11. The apparatus of claim 7, further comprising: the first acquisition module is used for receiving a data acquisition request sent by a terminal;
querying the historical index table according to the data acquisition request, and determining a node where a second target block corresponding to the data acquisition request is located; at least one block is stored in a node where the second target block is located; the block, comprising: history recording;
sending an acquisition request to the determined node, and receiving a history record of a second target block sent by the node aiming at the acquisition request;
and sending the history record of the second target block to the terminal.
12. The apparatus of claim 7, further comprising: the second acquisition module is used for receiving a third acquisition request sent by the terminal;
inquiring the historical index table according to the third acquisition request, and determining a third target block where a target transaction place corresponding to the third acquisition request is located and a second target node where the third target block is located; the second target node stores at least one block;
sending a fourth acquisition request to the second target node, and receiving a target historical operation record of a target transaction sent by the second target node aiming at the fourth acquisition request;
and sending the target historical operation record of the target transaction to the terminal.
13. An information processing apparatus characterized in that the apparatus comprises: a processor and a memory for storing a computer program capable of running on the processor; wherein the content of the first and second substances,
the processor is adapted to perform the steps of the method of any one of claims 1 to 6 when running the computer program.
14. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
CN201910951449.9A 2019-10-08 2019-10-08 Information processing method, device and storage medium Active CN110837536B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910951449.9A CN110837536B (en) 2019-10-08 2019-10-08 Information processing method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910951449.9A CN110837536B (en) 2019-10-08 2019-10-08 Information processing method, device and storage medium

Publications (2)

Publication Number Publication Date
CN110837536A true CN110837536A (en) 2020-02-25
CN110837536B CN110837536B (en) 2021-05-04

Family

ID=69575138

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910951449.9A Active CN110837536B (en) 2019-10-08 2019-10-08 Information processing method, device and storage medium

Country Status (1)

Country Link
CN (1) CN110837536B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108665359A (en) * 2017-03-29 2018-10-16 中国移动通信有限公司研究院 Block chain processing method, accounting nodes and verification node
CN108830733A (en) * 2018-06-21 2018-11-16 中国银行股份有限公司 A kind of information processing method, block scm cluster and system
US20190012595A1 (en) * 2017-07-07 2019-01-10 Pointr Data, Inc. Neural network consensus using blockchain
CN109815291A (en) * 2018-12-28 2019-05-28 北京城市网邻信息技术有限公司 Method of data synchronization, device, electronic equipment and storage medium
CN110245956A (en) * 2019-05-15 2019-09-17 众安信息技术服务有限公司 A kind of block chain transaction confirmation method and system based on asynchronous multichain

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108665359A (en) * 2017-03-29 2018-10-16 中国移动通信有限公司研究院 Block chain processing method, accounting nodes and verification node
US20190012595A1 (en) * 2017-07-07 2019-01-10 Pointr Data, Inc. Neural network consensus using blockchain
CN108830733A (en) * 2018-06-21 2018-11-16 中国银行股份有限公司 A kind of information processing method, block scm cluster and system
CN109815291A (en) * 2018-12-28 2019-05-28 北京城市网邻信息技术有限公司 Method of data synchronization, device, electronic equipment and storage medium
CN110245956A (en) * 2019-05-15 2019-09-17 众安信息技术服务有限公司 A kind of block chain transaction confirmation method and system based on asynchronous multichain

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
企鹅号-区块链技术专员: "区块链的全节点与轻节点?", 《云+社区 - 腾讯云》 *

Also Published As

Publication number Publication date
CN110837536B (en) 2021-05-04

Similar Documents

Publication Publication Date Title
CN110033244B (en) Intelligent contract execution method and device based on block chain and electronic equipment
CN108805570B (en) Data processing method, device and storage medium
CN110263035B (en) Block chain-based data storage and query method and device and electronic equipment
EP3678346B1 (en) Blockchain smart contract verification method and apparatus, and storage medium
EP3779760B1 (en) Blockchain-based data processing method and apparatus, and electronic device
CN110163755B (en) Block chain-based data compression and query method and device and electronic equipment
CN108572986B (en) Data updating method and node equipment
CN110825420A (en) Configuration parameter updating method, device, equipment and storage medium for distributed cluster
CN103164523A (en) Inspection method, device and system of data consistency inspection
CN111931220B (en) Consensus processing method, device, medium and electronic equipment for block chain network
CN112966311A (en) Intelligent contract checking method and device and electronic equipment
CN112970020A (en) Monitoring device components using distributed ledger
CN109714249B (en) Method and related device for pushing applet messages
CN111611249A (en) Data management method, device, equipment and storage medium
CN111767144A (en) Transaction routing determination method, device, equipment and system for transaction data
CN113722277A (en) Data import method, device, service platform and storage medium
CN111339551B (en) Data verification method and related device and equipment
CN109586949A (en) Block generation method and computer storage medium
CN113111125A (en) Business evidence storage method based on block chain
CN110837536B (en) Information processing method, device and storage medium
Khelaifa et al. A new adaptive causal consistency approach in edge computing environment
CN113347033B (en) Root cause positioning method and system based on block chain and verification node
CN115455059A (en) Method, device and related medium for analyzing user behavior based on underlying data
CN115422184A (en) Data acquisition method, device, equipment and storage medium
CN111737223B (en) File copying method, device, 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
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 100176 601, 6th floor, building 2, No. 18, Kechuang 11th Street, Daxing Economic and Technological Development Zone, Beijing

Patentee after: Jingdong Technology Information Technology Co.,Ltd.

Address before: 100176 601, 6th floor, building 2, No. 18, Kechuang 11th Street, Daxing Economic and Technological Development Zone, Beijing

Patentee before: BEIJING HAIYI TONGZHAN INFORMATION TECHNOLOGY Co.,Ltd.