CN110889040A - Method and device for pushing information - Google Patents

Method and device for pushing information Download PDF

Info

Publication number
CN110889040A
CN110889040A CN201911150437.2A CN201911150437A CN110889040A CN 110889040 A CN110889040 A CN 110889040A CN 201911150437 A CN201911150437 A CN 201911150437A CN 110889040 A CN110889040 A CN 110889040A
Authority
CN
China
Prior art keywords
transaction
block
information
header
initial
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
CN201911150437.2A
Other languages
Chinese (zh)
Other versions
CN110889040B (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 Shuke Haiyi Information Technology Co Ltd
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 CN201911150437.2A priority Critical patent/CN110889040B/en
Publication of CN110889040A publication Critical patent/CN110889040A/en
Application granted granted Critical
Publication of CN110889040B publication Critical patent/CN110889040B/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/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Abstract

The embodiment of the application discloses a method and a device for pushing information. One embodiment of the method comprises: storing block heads and transaction summary information from other block chain nodes into a local account book, wherein the transaction summary information comprises a transaction head set, and the transaction head comprises transaction keywords and a transaction sequence number; traversing each transaction head in the transaction head set, acquiring a transaction key word and a transaction serial number in the currently traversed transaction head, and determining whether the transaction key word in the currently traversed transaction head is related to the block link point; in response to determining that the transaction key words in the currently traversed transaction head are related to the block link points, acquiring transaction information according to the transaction sequence number in the currently traversed transaction head; and pushing the transaction information. The implementation mode realizes information transmission on the basis of the block chain technology, so that the block chain node can acquire the transaction information related to the node.

Description

Method and device for pushing information
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a method and a device for pushing information.
Background
At present, more and more applications adopt a blockchain, more and more information is interacted through the blockchain, and the blockchain is not only used for data storage, but is related to a lot of information interaction. Since the information is usually included in the transaction, the transaction must be acquired if the information is to be acquired. The current blockchain system has no good solution for information interaction, especially information push.
Disclosure of Invention
The embodiment of the application provides a method and a device for pushing information.
In a first aspect, an embodiment of the present application provides a method for pushing information, which is applied to a blockchain node, and includes: storing block heads and transaction summary information from other block chain nodes into a local account book, wherein the transaction summary information comprises a transaction head set, and the transaction head comprises transaction keywords and a transaction sequence number; traversing each transaction head in the transaction head set, acquiring a transaction key word and a transaction serial number in the currently traversed transaction head, and determining whether the transaction key word in the currently traversed transaction head is related to the block link point; in response to determining that the transaction key words in the currently traversed transaction head are related to the block link points, acquiring transaction information according to the transaction sequence number in the currently traversed transaction head; and pushing the transaction information.
In some embodiments, prior to storing the blockhead and transaction summary information originating from other blockchain nodes to the local ledger, the method includes: in response to receiving initial block head and initial transaction summary information sent by other block chain nodes, checking whether the initial block head and the initial transaction summary information are correct; in response to checking that the initial block header and the initial transaction summary information are correct, determining the initial block header as a block header and determining the initial transaction summary information as transaction summary information.
In some embodiments, the block link node comprises a common node, wherein block information is stored in the common node, and the block information comprises a block header, transaction summary information and a block body; and in response to receiving the initial block header and the initial transaction summary information sent by other block chain nodes, checking whether the initial block header and the initial transaction summary information are correct, including: and responding to the received block information sent by other common nodes, acquiring an initial block header and initial transaction summary information from the received block information, and checking whether the initial block header and the initial transaction summary information are correct.
In some embodiments, in response to determining that the transaction key in the currently traversed transaction header is associated with a block link point, obtaining transaction information according to the transaction sequence number in the currently traversed transaction header includes: and in response to determining that the transaction key in the currently traversed transaction head is related to the block link point, searching the block body in the received block information for the transaction information corresponding to the transaction sequence number in the currently traversed transaction head.
In some embodiments, the transaction summary information includes a mercker root of the set of transaction headers; and in response to receiving the initial block header and the initial transaction summary information sent by other block chain nodes, checking whether the initial block header and the initial transaction summary information are correct, including: solving the Mercker root of the transaction head set by utilizing a Hash algorithm; determining whether the Merck root in the transaction summary information is the same as the Merck root obtained by calculation; and if the Mercker root in the transaction summary information is the same as the acquired Mercker root, determining that the initial transaction summary information is correct.
In some embodiments, in response to receiving the initial block header and the initial transaction summary information sent by the other blockchain node, checking whether the initial block header and the initial transaction summary information are correct includes: and traversing the transaction keywords in each transaction header in the transaction header set, and if the traversed transaction keywords are consistent with values in target keyword fields, determining that the transaction summary information is correct, wherein the target keyword fields are keyword fields in the target transaction information in the received block information, and the target transaction information is the transaction information indicated by the transaction sequence numbers in the traversed transaction keywords.
In some embodiments, prior to storing the blockhead and transaction summary information originating from other blockchain nodes to the local ledger, the method further comprises: acquiring the block height of the highest block currently stored in a local account book; and sending a block information acquisition request to other block chain nodes, wherein the block information acquisition request is used for requesting to acquire a block higher than the block height, and the block is a block header and transaction summary information.
In some embodiments, the block link nodes include a special node and a common node, the special node stores a block header and transaction summary information, the common node stores block information, and the block information includes the block header, the transaction summary information and a block body; and storing the block header and transaction summary information from other blockchain nodes to a local ledger, including: block headers and transaction summary information originating from other special nodes are stored to a local ledger.
In some embodiments, in response to determining that the transaction key in the currently traversed transaction header is associated with a block link point, obtaining transaction information according to the transaction sequence number in the currently traversed transaction header includes: in response to the fact that the transaction key words in the currently traversed transaction head are determined to be related to the block link points, transaction information acquisition requests are sent to other common nodes, wherein the transaction information acquisition requests comprise the block height of the currently targeted block and the transaction sequence number in the currently traversed transaction head; and receiving the transaction information returned by other common nodes, wherein the transaction information is acquired by the other common nodes according to the block height of the currently targeted block and the transaction sequence number in the currently traversed transaction header.
In a second aspect, an embodiment of the present application provides an apparatus for pushing information, where the apparatus is disposed in a blockchain node, and includes: the storage unit is configured to store block headers and transaction summary information from other block link nodes into a local ledger, wherein the transaction summary information comprises a transaction header set, and the transaction header comprises a transaction keyword and a transaction sequence number; the determining unit is configured to traverse each transaction head in the transaction head set, acquire a transaction keyword and a transaction serial number in the currently traversed transaction head, and determine whether the transaction keyword in the currently traversed transaction head is related to the block link point; the acquisition unit is configured to respond to the fact that the transaction key words in the currently traversed transaction head are related to the block chain nodes, and acquire transaction information according to the transaction serial number in the currently traversed transaction head; a push unit configured to push transaction information.
In a third aspect, embodiments of the present application provide a block link point, including: one or more processors; a storage device, on which one or more programs are stored, which, when executed by the one or more processors, cause the one or more processors to implement the method as described in any implementation manner of the first aspect.
In a fourth aspect, the present application provides a computer-readable medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method as described in any implementation manner of the first aspect.
According to the method and the device for pushing the information, the block heads and the transaction summary information from other block chain nodes are stored in a local account book, wherein the transaction summary information comprises a transaction head set, and the transaction head comprises transaction keywords and a transaction sequence number; then, traversing each transaction head in the transaction head set, acquiring a transaction keyword and a transaction serial number in the currently traversed transaction head, and determining whether the transaction keyword in the currently traversed transaction head is related to the block link point; then, if the fact that the transaction key words in the currently traversed transaction head are related to the block chain nodes is determined, transaction information is obtained according to the transaction serial number in the currently traversed transaction head; and finally, pushing the transaction information. By the information pushing mode, information transmission can be realized on the basis of the block chain technology under the condition that large storage is not added, so that the block chain node can acquire the transaction information related to the node.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which various embodiments of the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of a method for pushing information, according to the present application;
FIG. 3 is a flow diagram of yet another embodiment of a method for pushing information according to the present application;
FIG. 4 is a flow diagram of yet another embodiment of a method for pushing information according to the present application;
FIG. 5 is a timing diagram of an embodiment of a method for pushing information according to the present application;
FIG. 6 is a schematic block diagram illustrating one embodiment of an apparatus for pushing information according to the present application;
FIG. 7 is a block diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 shows an exemplary system architecture 100 to which embodiments of the method for pushing information of the present application may be applied.
As shown in fig. 1, the system architecture 100 may include block link points 1011, 1012, 1013, the network 102, and other block link points 1031, 1032, 1033. Network 102 is used to provide a medium for communication links between block link points 1011, 1012, 1013 and other block link points 1031, 1032, 1033. Network 102 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
It should be noted that block link points 1011, 1012, 1013 and other block link points 1031, 1032, 1033 are computers that exist in the same blockchain network, including but not limited to smart phones, tablets, laptop desktop computers, routers, mining machines, servers, etc. Block link point 1011, block link point 1012 and block link point 1013 also have a network providing a communication link with each other, and block link point 1031, block link point 1032 and block link point 1033 also have a network providing a communication link with each other, which is not shown in fig. 1.
Block link points 1011, 1012, 1013 may first store block headers and transaction summary information originating from other block link points 1031, 1032, 1033 to a local ledger; then, each transaction head in the transaction head set can be traversed, transaction keywords and transaction serial numbers in the currently traversed transaction heads are obtained, and whether the transaction keywords in the currently traversed transaction heads are related to the block link points or not is determined; then, if the fact that the transaction key words in the currently traversed transaction head are related to the block chain nodes is determined, transaction information is obtained according to the transaction serial number in the currently traversed transaction head; and finally, the transaction information can be pushed.
It should be noted that the block link points 1011, 1012, 1013 and the other block link points 1031, 1032, 1033 may be hardware or software. When block link points 1011, 1012, 1013 and other block link points 1031, 1032, 1033 are hardware, various electronic devices that support information interaction may be possible, including but not limited to smart phones, tablets, laptop desktop computers, routers, mining machines, servers, and the like. When the block link points 1011, 1012, 1013 and the other block link points 1031, 1032, 1033 are software, they may be installed in the electronic devices listed above. It may be implemented as multiple pieces of software or software modules, or as a single piece of software or software module. And is not particularly limited herein.
It should be further noted that the method for pushing information provided by the embodiments of the present application is generally performed by the block link points 1011, 1012, 1013.
It should be understood that the number of blockchain nodes, networks, and other blockchain link points in fig. 1 is merely illustrative. There may be any number of blockchain nodes, networks, and other blockchain nodes, as desired for the implementation.
With continued reference to fig. 2, a flow 200 of one embodiment of a method for pushing information in accordance with the present application is shown. The method for pushing information is generally applied to a blockchain node, and comprises the following steps:
in step 201, the block header and transaction summary information from other blockchain nodes are stored in a local account book.
In this embodiment, a blockchain node of a method for pushing information (e.g., the blockchain node shown in fig. 1) may store blockhead and transaction summary information originating from other blockchain nodes to a local ledger.
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, and an encryption algorithm. A blockchain is a shared distributed ledger. The method is essentially a decentralized database, and is used as a bottom layer technology of the bitcoin, namely a series of data blocks which are generated by correlation through a cryptographic method, wherein each data block contains information of a batch of bitcoin network transactions, and the information is used for verifying the validity (anti-counterfeiting) of the information and generating a next block. A blockchain node refers to a computer in a blockchain network, including a cell phone, a mining machine, a server, and so on. A blockchain is a user of a large number of individuals or families, each of which may be a node of the blockchain. Each blockchain node stores a local ledger.
It should be noted that the block link node of the method for pushing information is a special node in the block link network, and may also be referred to as a terminal node, and the block link node generally stores the block header and the transaction summary information, but does not store the block. And the block chain node can acquire the transaction related to the node through the transaction summary information.
In this embodiment, nodes other than the above-mentioned blockchain link point exist in the blockchain network in which the above-mentioned blockchain node exists, and these nodes may be referred to as other blockchain nodes.
In this embodiment, the block header usually stores header information of the block, including a Hash value (prelash) of the previous block, a Hash value (Hash) and a TimeStamp (TimeStamp) of the block, and so on. The transaction summary information may include a set of transaction headers, and the transaction headers may include transaction keywords and transaction serial numbers. The above transaction keywords generally refer to: in a business system, a user submitting a transaction and a user with whom he desires to acquire (or view) the transaction agree on keyword information. By way of example, assuming that a user submits a pending transaction that is expected to be approved by a superior leader, the transaction key may include the address of the superior leader, or the address of the superior leader and a pending status, which may be identified by a number. The transaction serial number generally refers to the serial number of the transaction in the current block where the current transaction keyword is located. And the block chain link points can acquire complete transaction information through the transaction serial numbers.
It should be noted that the transaction key needs to be provided in the transaction, that is, a field for characterizing the transaction key needs to be added to the transaction information. Not all transactions must provide a transaction key, allowing transactions to not provide a transaction key.
Step 202, traversing each transaction head in the transaction head set, and acquiring the transaction keywords and the transaction serial numbers in the currently traversed transaction heads.
In this embodiment, the above block chain node may traverse each transaction header in the transaction header set, and obtain a transaction keyword and a transaction sequence number in the currently traversed transaction header. In general, before traversing each transaction header in the transaction header set, the blockchain node usually needs to determine whether the transaction header set is empty. If not, traversing each transaction head in the transaction head set one by one, and aiming at the currently traversed transaction head, acquiring the transaction keywords and the transaction serial number in the currently traversed transaction head.
Step 203, determine whether the transaction key in the currently traversed transaction header is related to the block link point.
In this embodiment, the blockchain node may determine whether the transaction key in the currently traversed transaction header is related to the blockchain node. The block link point may generally determine whether a transaction key in a currently traversed transaction header is associated with the block link point according to business logic. As an example, the blockchain node may determine whether the transaction key in the currently traversed transaction header includes information related to the blockchain node, and if so, may determine that the transaction key in the currently traversed transaction header is related to the blockchain node. The information related to the above block chain node may include, but is not limited to, at least one of the following: node identifiers of the block chain nodes, and user information of users to which the block chain nodes belong, such as user identifiers and user addresses. If it is determined that the transaction key in the currently traversed transaction header is associated with the blockchain node, the blockchain node may perform step 204.
And step 204, in response to determining that the transaction key in the currently traversed transaction head is related to the block link point, acquiring transaction information according to the transaction serial number in the currently traversed transaction head.
In this embodiment, if it is determined in step 203 that the transaction key in the currently traversed transaction header is related to the block link point, the block link node may obtain the transaction information according to the transaction serial number in the currently traversed transaction header. The transaction serial number is the serial number of the transaction in the current block where the current transaction keyword is located. The block chain node may search the transaction information corresponding to the transaction sequence number from the current block.
And then, the block chain node continuously traverses the next transaction head until all transaction heads in the transaction head set are processed.
Step 205, pushing transaction information.
In this embodiment, the above block chain node may push the transaction information acquired in step 204. The block chain node can push the transaction information after acquiring the transaction information corresponding to one transaction head; the block link point may also push all acquired transaction information after traversing all transaction headers in the transaction header set is completed. If the block chain node is provided with a display screen, the block chain node can present the transaction information.
In some optional implementations of this embodiment, the block link point may determine whether initial block header and initial transaction summary information sent by other block link nodes are received. If the initial block header and the initial transaction summary information sent by other block chain nodes are received, the block chain nodes can check whether the initial block header and the initial transaction summary information are correct. The blockchain node may check the hash value in the initial blockhead. If the initial block header and the initial transaction summary information are checked to be correct, the block chain node may determine the initial block header as a block header and the initial transaction summary information as transaction summary information.
The method provided by the above embodiment of the present application realizes information transfer on the basis of the blockchain technology without increasing large storage, so that the blockchain node can acquire the transaction information related to the node.
With continued reference to fig. 3, a flow 300 of yet another embodiment of a method for pushing information is shown. The method for pushing information is generally applied to a blockchain node, and comprises the following steps:
step 301, determining whether block information sent by other common nodes is received.
In this embodiment, a block link point (e.g., the block link node shown in fig. 1) of the method for pushing information may determine whether block information sent by other common nodes is received, and if the block information sent by other common nodes is received, the block link node may perform step 302.
Here, after the respective blockchain link points in the blockchain network complete the consensus, the node located in the blockchain network (regardless of whether the node participates in the consensus) may receive the blockchain information broadcast by other nodes.
It should be noted that the block link node of the method for pushing information is a special node in the block link network, and may also be referred to as a terminal node, and the block link node generally stores the block header and the transaction summary information, but does not store the block. And the block chain node can acquire the transaction related to the node through the transaction summary information.
In this embodiment, other nodes besides the above-mentioned blockchain link point exist in the blockchain network where the above-mentioned blockchain node exists, and this part of nodes may be referred to as other blockchain nodes. The block link points may include common nodes. The common node may store block information, and the block information may include a block header, transaction summary information, and a block body. It should be noted that the difference between the normal node and the terminal node (the above-mentioned blockchain node for the method for pushing information) is that the normal node stores a block of the area, and the terminal node does not store a block of the area.
In this embodiment, the block header typically stores therein header information of the block, including a hash value of a previous block, a hash value and a time stamp of a block of the block, and so on. The transaction summary information may include a set of transaction headers, and the transaction headers may include transaction keywords and transaction serial numbers. The above transaction keywords generally refer to: in a business system, a user submitting a transaction and a user with whom he desires to acquire (or view) the transaction agree on keyword information. By way of example, assuming that a user submits a pending transaction that is expected to be approved by a superior leader, the transaction key may include the address of the superior leader, or the address of the superior leader and a pending status, which may be identified by a number. The transaction serial number generally refers to the serial number of the transaction in the current block where the current transaction keyword is located. And the block chain link points can acquire complete transaction information through the transaction serial numbers. The block records detailed data generated within a certain time, including all transaction records generated during the block creation process or other information of the current block which is verified.
It should be noted that the transaction key needs to be provided in the transaction, that is, a field for characterizing the transaction key needs to be added to the transaction information. Not all transactions must provide a transaction key, allowing transactions to not provide a transaction key.
Step 302, obtain initial block header and initial transaction summary information from the received block information.
In this embodiment, if the block information sent by other common nodes is received in step 301, the block chain node may obtain an initial block header and initial transaction summary information from the received block information.
Step 303, check if the initial block header and the initial transaction summary information are correct.
In this embodiment, the blockchain node may check whether the initial block header and the initial transaction summary information are correct. The blockchain node may check the hash value in the initial blockhead. If the initial block header and the initial transaction summary information are checked to be correct, the blockchain node may perform step 304.
Specifically, since the block header includes the hash value of the previous block and the hash value of the block in the current block, the block link point may obtain the block header of the block next to the block indicated by the initial block header from another block link node, determine whether the hash value of the previous block included in the block header of the next block is consistent with the hash value of the block in the current block stored in the initial block header, and if so, determine that the hash value of the block in the current block in the initial block header is correct. The block link point may obtain a block header of a block previous to the block indicated by the initial block header from another block link node, determine whether a hash value of a block of a local area included in the block header of the previous block is consistent with a hash value of a previous block stored in the initial block header, and if so, determine that the hash value of the previous block in the initial block header is correct.
In response to checking that the initial block header and the initial transaction summary information are correct, the initial block header is determined as a block header, and the initial transaction summary information is determined as transaction summary information, step 304.
In this embodiment, if it is checked in step 303 that the initial block header and the initial transaction summary information are correct, the block chain node may determine the initial block header as the block header and the initial transaction summary information as the transaction summary information.
And 305, storing the block header and the transaction summary information from other common nodes into a local account book.
In this embodiment, the blockchain node may store the blockhead and the transaction summary information from other common nodes into the local ledger.
And step 306, traversing each transaction head in the transaction head set, and acquiring the transaction keywords and the transaction serial numbers in the currently traversed transaction heads.
In this embodiment, the above block chain node may traverse each transaction header in the transaction header set, and obtain a transaction keyword and a transaction sequence number in the currently traversed transaction header. In general, before traversing each transaction header in the transaction header set, the blockchain node usually needs to determine whether the transaction header set is empty. If not, traversing each transaction head in the transaction head set one by one, and aiming at the currently traversed transaction head, acquiring the transaction keywords and the transaction serial number in the currently traversed transaction head.
Step 307, determine if the transaction key in the currently traversed transaction header is related to a block link point.
In this embodiment, the blockchain node may determine whether the transaction key in the currently traversed transaction header is related to the blockchain node. The block link point may generally determine whether a transaction key in a currently traversed transaction header is associated with the block link point according to business logic. As an example, the blockchain node may determine whether the transaction key in the currently traversed transaction header includes information related to the blockchain node, and if so, may determine that the transaction key in the currently traversed transaction header is related to the blockchain node. The information related to the above block chain node may include, but is not limited to, at least one of the following: node identifiers of the block chain nodes, and user information of users to which the block chain nodes belong, such as user identifiers and user addresses. If it is determined that the transaction key in the currently traversed transaction header is associated with the blockchain node, the blockchain node may perform step 308.
And step 308, in response to determining that the transaction key in the currently traversed transaction head is related to the block link point, searching the transaction information corresponding to the transaction serial number in the currently traversed transaction head from the block body in the received block information.
In this embodiment, if it is determined in step 307 that the transaction key in the currently traversed transaction header is related to the block link point, the block link point may search the block in the received block information for the transaction information corresponding to the transaction serial number in the currently traversed transaction header.
And then, the block chain node continuously traverses the next transaction head until all transaction heads in the transaction head set are processed.
Step 309, pushing transaction information.
In this embodiment, the above block chain node may push the transaction information acquired in step 308. The block chain node can push the transaction information after acquiring the transaction information corresponding to one transaction head; the block link point may also push all acquired transaction information after traversing all transaction headers in the transaction header set is completed. If the block chain node is provided with a display screen, the block chain node can present the transaction information.
In some optional implementations of this embodiment, the transaction summary information may include a mercker root of the transaction header set. The mercker root of the transaction header set is usually obtained by performing hash calculation on all transaction headers in the transaction header set. The block chain node may check whether the initial block header and the initial transaction summary information are correct by: the blockchain node may first use a hash algorithm to obtain the merck root of the transaction header set. Specifically, the blockchain node may obtain a hash value of each transaction header in the transaction header set, combine two adjacent hash values into a character string, and then calculate a hash of the character string, so that each two hashes may obtain a sub-hash. And then combining the two adjacent sub-hashes into a character string, and then calculating the hash of the character string. By pushing up, a smaller number of new primary hashes can be obtained, and finally an inverted tree is formed, the position of the tree root corresponds to a root hash, and the root hash can be determined as the mercker root of the transaction header set. Then, the blockchain node may determine whether the mercker root in the received transaction summary information is the same as the acquired mercker root. If the mercker root in the transaction summary information is the same as the acquired mercker root, it can be determined that the initial transaction summary information is correct.
In some optional implementations of this embodiment, the block link point may further check whether the initial block header and the initial transaction summary information are correct by: the block chain node can traverse the transaction keywords in each transaction header in the transaction header set one by one, and if the traversed transaction keywords are consistent with the values in the target keyword fields, the transaction summary information is determined to be correct. Here, the target keyword field may be a keyword field in target transaction information in the received tile information, where the target transaction information is transaction information indicated by a transaction sequence number in the traversed transaction keyword.
As can be seen from fig. 3, compared with the embodiment corresponding to fig. 2, the flow 300 of the method for pushing information in this embodiment embodies a step of obtaining an initial block header and initial transaction summary information from block information sent by other common nodes, and checking whether the initial block header and the initial transaction summary information are correct, and a step of searching for transaction information corresponding to a transaction sequence number in a currently traversed transaction header from a block in received block information. Therefore, the scheme described in this embodiment can store the initial block header and the initial transaction summary information when determining that the initial block header and the initial transaction summary information are correct, so that the correctness of the information stored in the account book can be ensured, and the correctness of the acquired transaction information is further ensured. Meanwhile, the embodiment provides a method for updating a local ledger by a node located in a blockchain network after the consensus of each blockchain link point in the blockchain network is completed.
With further reference to fig. 4, a flow 400 of yet another embodiment of a method for pushing information is shown. The method for pushing information is generally applied to a blockchain node, and comprises the following steps:
step 401, obtaining the block height of the highest block currently stored in the local account book.
In this embodiment, a block link point (e.g., the block link node shown in fig. 1) of the method for pushing information may obtain a block height of a highest block currently stored in the local ledger. The tile height may be used to identify the location of the tile in the blockchain and, based thereon, find all of the underlying attributes and transaction records associated with the tile.
Here, if a certain block link point newly joins the blockchain network for some reason (e.g., device restart), the block information is usually required to be updated.
Step 402, sending a block information acquisition request to other block chain nodes.
In this embodiment, the blockchain node may send a blockchain information acquisition request to other blockchain nodes. The block information acquisition request may be for requesting acquisition of a block higher than the block height. Here, the above-mentioned tile is generally a tile header and transaction summary information.
In this embodiment, a block link point may generally store a surrounding node list for storing nodes having a certain relationship (e.g., information has been exchanged) with the node. The other block link points may be nodes in a surrounding node list stored in the block chain node.
In one case, if the node receiving the block information obtaining request is an ordinary node, after the ordinary node sends block information to the blockchain node, the blockchain node may perform the method for pushing information in steps 301 to 309 to complete the transaction information pushing.
In another case, if the node receiving the block information obtaining request is a special node, the special node may obtain blocks stored in the local book and having a height greater than the height of the block, and send the obtained blocks to the block chain node one by one. Specifically, the special node may transmit the blocks in the descending order of their corresponding block heights, or may transmit each block randomly.
Step 403, determining whether initial block header and initial transaction summary information sent by other special nodes are received.
In this embodiment, the above blockchain node may determine whether initial blockhead and initial transaction summary information sent by other special nodes are received. If initial block headers and initial transaction summary information sent by other special nodes are received, the blockchain node may perform step 404.
In step 404, in response to receiving the initial block header and the initial transaction summary information sent by other special nodes, checking whether the initial block header and the initial transaction summary information are correct.
In this embodiment, if the initial block header and the initial transaction summary information sent by other special nodes are received in step 403, the block chain node may check whether the initial block header and the initial transaction summary information are correct. The blockchain node may check the hash value in the initial blockhead. If the initial block header and the initial transaction summary information are checked to be correct, the blockchain node may execute step 405.
Specifically, since the block header includes the hash value of the previous block and the hash value of the block in the current block, the block link point may obtain the block header of the block next to the block indicated by the initial block header from another block link node, determine whether the hash value of the previous block included in the block header of the next block is consistent with the hash value of the block in the current block stored in the initial block header, and if so, determine that the hash value of the block in the current block in the initial block header is correct. The block link point may obtain a block header of a block previous to the block indicated by the initial block header from another block link node, determine whether a hash value of a block of a local area included in the block header of the previous block is consistent with a hash value of a previous block stored in the initial block header, and if so, determine that the hash value of the previous block in the initial block header is correct.
Step 405, in response to checking that the initial block header and the initial transaction summary information are correct, determining the initial block header as the block header and determining the initial transaction summary information as the transaction summary information.
In this embodiment, if it is checked in step 404 that the initial block header and the initial transaction summary information are correct, the block chain node may determine the initial block header as the block header and the initial transaction summary information as the transaction summary information.
At step 406, the block header and transaction summary information from other special nodes are stored in the local ledger.
In this embodiment, the blockchain node may store the blockhead and the transaction summary information from other special nodes into the local ledger.
Step 407, traversing each transaction head in the transaction head set, and acquiring the transaction keywords and the transaction serial number in the currently traversed transaction head.
At step 408, it is determined whether the transaction key in the currently traversed transaction header is associated with a block link point.
In the present embodiment, the steps 407-408 can be performed in a similar manner as the steps 306-307, and will not be described herein again.
Step 409, in response to determining that the transaction key in the currently traversed transaction header is related to the block link point, sending a transaction information acquisition request to other common nodes.
In this embodiment, if it is determined in step 408 that the transaction key in the currently traversed transaction header is related to the blockchain node, the blockchain node may send a transaction information acquisition request to other common nodes. The transaction information acquisition request typically includes the block height of the currently targeted block and the transaction sequence number in the currently traversed transaction header.
Here, the other general node that receives the transaction information obtaining request may obtain the transaction information according to the block height and the transaction sequence number. Specifically, the other common nodes may search the transaction information corresponding to the transaction sequence number in the block of the block with the block height equal to the block height.
And step 410, receiving the transaction information returned by other common nodes.
In this embodiment, the blockchain node may receive the transaction information returned by the other common nodes. The transaction information may be obtained by the other common nodes according to the block height of the currently targeted block and the transaction sequence number in the currently traversed transaction header.
Step 411, pushing transaction information.
In this embodiment, step 411 may be performed in a similar manner as step 309, and will not be described herein again.
In some optional implementations of this embodiment, the transaction summary information may include a mercker root of the transaction header set. The mercker root of the transaction header set is usually obtained by performing hash calculation on all transaction headers in the transaction header set. The block chain node may check whether the initial block header and the initial transaction summary information are correct by: the blockchain node may first use a hash algorithm to obtain the merck root of the transaction header set. Specifically, the blockchain node may obtain a hash value of each transaction header in the transaction header set, combine two adjacent hash values into a character string, and then calculate a hash of the character string, so that each two hashes may obtain a sub-hash. And then combining the two adjacent sub-hashes into a character string, and then calculating the hash of the character string. By pushing up, a smaller number of new primary hashes can be obtained, and finally an inverted tree is formed, the position of the tree root corresponds to a root hash, and the root hash can be determined as the mercker root of the transaction header set. Then, the blockchain node may determine whether the mercker root in the received transaction summary information is the same as the acquired mercker root. If the mercker root in the transaction summary information is the same as the acquired mercker root, it can be determined that the initial transaction summary information is correct.
As can be seen from fig. 4, compared with the embodiment corresponding to fig. 2, the flow 400 of the method for pushing information in this embodiment embodies a step of acquiring the block height of the highest block currently stored in the local ledger, sending a request for acquiring a block higher than the block height to other block nodes, and sending a transaction information acquisition request to other common nodes and receiving transaction information returned by the other common nodes. Therefore, the solution described in this embodiment provides a method for updating a local ledger when a certain block link point newly joins a block link network for some reason.
With continued reference to fig. 5, fig. 5 illustrates a timing diagram of an embodiment of a method for pushing information according to the present application.
As shown in fig. 5, in step 501, the block link point obtains the block height of the highest block currently stored in the local ledger.
Here, the block link point may obtain the block height of the highest block currently stored by the local ledger. The tile height may be used to identify the location of the tile in the blockchain and, based thereon, find all of the underlying attributes and transaction records associated with the tile.
In step 502, the block link point sends a block information acquisition request to other block link nodes.
Here, the block link point may transmit a block information acquisition request to other block link nodes. The block information acquisition request may be for requesting acquisition of a block higher than the block height. Here, the above-mentioned tile is generally a tile header and transaction summary information.
In step 503, other special nodes query whether blocks larger than the block height are stored locally.
Here, other special nodes may query whether blocks having a block height greater than the block height are locally stored. If so, the other special node may perform step 504.
In step 504, in response to querying that locally stored blocks greater than the block height, other special nodes send blocks greater than the block height to block link points.
Here, if other special nodes of the block whose local storage is greater than the block height are queried in step 503, the other special nodes may obtain the blocks stored in the local book that are greater than the block height, and send the obtained blocks to the blockchain node one by one. Specifically, the special node may transmit the blocks in the descending order of their corresponding block heights, or may transmit each block randomly.
In step 505, the block link point determines whether the initial block header and initial transaction summary information sent by other special nodes is received.
Here, the block link point may determine whether initial block header and initial transaction summary information sent by other special nodes are received. If initial block headers and initial transaction summary information sent by other special nodes are received, the block chain node may perform step 506.
In step 506, the block link point checks whether the initial block header and the initial transaction summary information are correct.
Here, if the initial block header and the initial transaction summary information sent by other special nodes are received in step 505, the block chain node may check whether the initial block header and the initial transaction summary information are correct. The blockchain node may check the hash value in the initial blockhead. If the initial block header and the initial transaction summary information are checked to be correct, the blockchain node may perform step 507.
In step 507, in response to checking out the initial block header and the initial transaction summary information, the block link node determines the initial block header as the block header and the initial transaction summary information as the transaction summary information, if correct.
Here, if it is checked in step 506 that the initial block header and the initial transaction summary information are correct, the block link point may determine the initial block header as the block header and the initial transaction summary information as the transaction summary information.
In step 508, the block link node stores the block header and transaction summary information from other special nodes to the local ledger.
Here, the block link point may store block headers and transaction summary information originating from other special nodes to a local ledger.
In step 509, the block nodes traverse each transaction header in the transaction header set to obtain the transaction keywords and the transaction sequence numbers in the currently traversed transaction header.
Here, the block link point may traverse each transaction header in the transaction header set, and obtain the transaction keyword and the transaction sequence number in the currently traversed transaction header. In general, before traversing each transaction header in the transaction header set, the blockchain node usually needs to determine whether the transaction header set is empty. If not, traversing each transaction head in the transaction head set one by one, and aiming at the currently traversed transaction head, acquiring the transaction keywords and the transaction serial number in the currently traversed transaction head.
In step 510, the block link point determines that the transaction key in the currently traversed transaction header is associated with the block link point.
Here, the block link point may determine whether a transaction key in a currently traversed transaction header is related to the block link point. The block link point may generally determine whether a transaction key in a currently traversed transaction header is related to the block link point according to business logic. As an example, the block link point may determine whether the transaction key in the currently traversed transaction header includes information related to the block link node, and if so, may determine that the transaction key in the currently traversed transaction header is related to the block link point. The information related to the blockchain node may include, but is not limited to, at least one of: node identification of the block chain node, and user information of the user to which the block chain node belongs, such as user identification and user address. If it is determined that the transaction key in the currently traversed transaction header is associated with the block link point, then block link point may perform step 511.
In step 511, in response to determining that the transaction key in the currently traversed transaction header is associated with a block link point, the block link point sends a transaction information acquisition request to other common nodes.
Here, if it is determined in step 510 that the transaction key in the currently traversed transaction header is associated with a block link point, the block link point may send a transaction information acquisition request to other common nodes. The transaction information acquisition request typically includes the block height of the currently targeted block and the transaction sequence number in the currently traversed transaction header.
In step 512, the other regular nodes send transaction information to the blockchain node.
Here, the other common nodes may obtain the transaction information according to the block height and the transaction serial number. Specifically, the other common nodes may search the transaction information corresponding to the transaction sequence number in the block of the block with the block height equal to the block height. Other common nodes may then send the transaction information to the block link point.
In step 513, the block nodes push transaction information.
Here, the block link point may push the transaction information acquired in step 512. The block chain node can push the transaction information after acquiring the transaction information corresponding to one transaction head; the block link point may also push all the acquired transaction information after traversing all the transaction headers in the transaction header set is completed. If the block chain nodes are provided with the display screens, the transaction information can be presented by the block chain nodes.
With further reference to fig. 6, as an implementation of the methods shown in the above figures, the present application provides an embodiment of an apparatus for pushing information, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be specifically applied to a blockchain node.
As shown in fig. 6, the apparatus 600 for pushing information of the present embodiment includes: a storage unit 601, a determination unit 602, an acquisition unit 603, and a push unit 604. The storage unit 601 is configured to store block headers and transaction summary information derived from other block link nodes into a local ledger, where the transaction summary information includes a transaction header set, and the transaction header includes a transaction keyword and a transaction sequence number; the determining unit 602 is configured to traverse each transaction head in the transaction head set, obtain a transaction key and a transaction sequence number in the currently traversed transaction head, and determine whether the transaction key in the currently traversed transaction head is related to a block link point; the obtaining unit 603 is configured to, in response to determining that the transaction keyword in the currently traversed transaction header is related to the block link point, obtain transaction information according to the transaction sequence number in the currently traversed transaction header; the push unit 604 is configured to push transaction information.
In this embodiment, the specific processing of the storage unit 601 of the apparatus 600 for pushing information may refer to step 201 in the corresponding embodiment of fig. 2, the specific processing of the determination unit 602 may refer to step 202 and step 203 in the corresponding embodiment of fig. 2, and the specific processing of the acquisition unit 603 and the pushing unit 604 may refer to step 204 and step 205 in the corresponding embodiment of fig. 2.
In some optional implementations of the present embodiment, the apparatus 600 for pushing information may include a checking unit (not shown in the figure) and a processing unit (not shown in the figure). The checking unit may determine whether initial block header and initial transaction summary information sent by other blockchain nodes are received. If the initial block header and the initial transaction summary information sent by other block link nodes are received, the checking unit may check whether the initial block header and the initial transaction summary information are correct. The checking unit may check the hash value in the initial block header. If the initial block header and the initial transaction summary information are checked to be correct, the processing unit may determine the initial block header as a block header and the initial transaction summary information as transaction summary information.
In some alternative implementations of the present embodiment, the block link points may include common nodes. The common node may store block information, and the block information may include a block header, transaction summary information, and a block body. If block information sent by other common nodes is received, the checking unit may obtain an initial block header and initial transaction summary information from the received block information. The checking unit may check whether the initial block header and the initial transaction summary information are correct. The checking unit may check the hash value in the initial block header.
In some optional implementation manners of this embodiment, if it is determined that the transaction keyword in the currently traversed transaction header is related to the block link point, the obtaining unit 603 may search the transaction information corresponding to the transaction sequence number in the currently traversed transaction header from the block body in the received block information.
In some optional implementations of this embodiment, the transaction summary information may include a mercker root of the transaction header set. The mercker root of the transaction header set is usually obtained by performing hash calculation on all transaction headers in the transaction header set. The checking unit may check whether the initial block header and the initial transaction summary information are correct by: the checking unit may first use a hash algorithm to obtain the merck root of the transaction header set. Specifically, the checking unit may obtain a hash value of each transaction header in the transaction header set, combine two adjacent hash values into a character string, and then calculate a hash of the character string, so that each two hashes may obtain a sub-hash. And then combining the two adjacent sub-hashes into a character string, and then calculating the hash of the character string. By pushing up, a smaller number of new primary hashes can be obtained, and finally an inverted tree is formed, the position of the tree root corresponds to a root hash, and the root hash can be determined as the mercker root of the transaction header set. Then, the checking unit may determine whether the mercker root in the received transaction summary information is the same as the acquired mercker root. If the mercker root in the transaction summary information is the same as the acquired mercker root, the checking unit may determine that the initial transaction summary information is correct.
In some optional implementations of this embodiment, the checking unit may further check whether the initial block header and the initial transaction summary information are correct by: the checking unit may traverse the transaction keywords in each transaction header in the transaction header set one by one, and determine that the transaction summary information is correct if the traversed transaction keywords are consistent with values in the target keyword fields. Here, the target keyword field may be a keyword field in target transaction information in the received tile information, where the target transaction information is transaction information indicated by a transaction sequence number in the traversed transaction keyword.
In some optional implementations of the present embodiment, the apparatus 600 for pushing information may include a block height obtaining unit (not shown in the figure) and a sending unit (not shown in the figure). The block height obtaining unit may obtain a block height of a highest block currently stored in the local account book. The tile height may be used to identify the location of the tile in the blockchain and, based thereon, find all of the underlying attributes and transaction records associated with the tile. The sending unit may send the block information acquisition request to another block chain node. The block information acquisition request may be for requesting acquisition of a block higher than the block height. Here, the above-mentioned tile is generally a tile header and transaction summary information.
In some optional implementation manners of this embodiment, the block link node may include a special node and a general node, the special node may store a block header and transaction summary information, the general node may store block information, and the block information may include the block header, the transaction summary information, and a block body. The storage unit 601 may store the block header and the transaction summary information from other special nodes to a local ledger.
In some optional implementation manners of this embodiment, if it is determined that the transaction keyword in the currently traversed transaction header is related to a block link point, the obtaining unit 603 may send a transaction information obtaining request to another common node. The transaction information acquisition request typically includes the block height of the currently targeted block and the transaction sequence number in the currently traversed transaction header. Here, the other general node that receives the transaction information obtaining request may obtain the transaction information according to the block height and the transaction sequence number. Specifically, the other common nodes may search the transaction information corresponding to the transaction sequence number in the block of the block with the block height equal to the block height. Thereafter, the obtaining unit 603 may receive the transaction information returned by the other common nodes. The transaction information may be obtained by the other common nodes according to the block height of the currently targeted block and the transaction sequence number in the currently traversed transaction header.
Referring now to fig. 7, a schematic diagram of an electronic device (e.g., a blockchain node in fig. 1) 700 suitable for use in implementing embodiments of the present disclosure is shown. The electronic device shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 7, electronic device 700 may include a processing means (e.g., central processing unit, graphics processor, etc.) 701 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)702 or a program loaded from storage 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data necessary for the operation of the electronic apparatus 700 are also stored. The processing device 701, the ROM 702, and the RAM 703 are connected to each other by a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
Generally, the following devices may be connected to the I/O interface 705: input devices 706 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 707 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; and a communication device 709. The communication means 709 may allow the electronic device 700 to communicate wirelessly or by wire with other devices to exchange data. While fig. 7 illustrates an electronic device 700 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided. Each block shown in fig. 7 may represent one device or may represent multiple devices as desired.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such embodiments, the computer program may be downloaded and installed from a network via the communication means 709, or may be installed from the storage means 708, or may be installed from the ROM 702. The computer program, when executed by the processing device 701, performs the above-described functions defined in the methods of embodiments of the present disclosure. It should be noted that the computer readable medium described in the embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In embodiments of the disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In embodiments of the present disclosure, however, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The above-mentioned computer-readable medium may be included in the block link points described in the above-mentioned embodiments; or may exist separately and not be assembled into the blockchain node. The computer readable medium carries one or more programs which, when executed by the block link point, cause the block link point to: storing block heads and transaction summary information from other block chain nodes into a local account book, wherein the transaction summary information comprises a transaction head set, and the transaction head comprises transaction keywords and a transaction sequence number; traversing each transaction head in the transaction head set, acquiring a transaction key word and a transaction serial number in the currently traversed transaction head, and determining whether the transaction key word in the currently traversed transaction head is related to the block link point; in response to determining that the transaction key words in the currently traversed transaction head are related to the block link points, acquiring transaction information according to the transaction sequence number in the currently traversed transaction head; and pushing the transaction information.
Computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes a storage unit, a determination unit, an acquisition unit, and a pushing unit. Where the names of these units do not in some cases constitute a limitation on the unit itself, for example, a push unit may also be described as a "unit to push transaction information".
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is made without departing from the inventive concept as defined above. For example, the above features and (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure are mutually replaced to form the technical solution.

Claims (12)

1. A method for pushing information is applied to a blockchain node and comprises the following steps:
storing block heads and transaction summary information from other block chain nodes into a local account book, wherein the transaction summary information comprises a transaction head set, and the transaction head comprises transaction keywords and a transaction sequence number;
traversing each transaction head in the transaction head set, acquiring a transaction keyword and a transaction serial number in the currently traversed transaction head, and determining whether the transaction keyword in the currently traversed transaction head is related to the block link point;
in response to determining that the transaction key words in the currently traversed transaction head are related to the block link points, acquiring transaction information according to the transaction sequence number in the currently traversed transaction head;
and pushing the transaction information.
2. The method of claim 1, wherein prior to said storing block headers and transaction summary information originating from other blockchain nodes to a local ledger, the method comprises:
in response to receiving initial block heads and initial transaction summary information sent by other block chain nodes, checking whether the initial block heads and the initial transaction summary information are correct;
in response to checking that the initial block header and the initial transaction summary information are correct, determining the initial block header as a block header and determining the initial transaction summary information as transaction summary information.
3. The method of claim 2, wherein a block link node comprises a common node in which block information is stored, the block information comprising a block header, transaction summary information, and a block body; and
the checking whether the initial block header and the initial transaction summary information are correct in response to receiving the initial block header and the initial transaction summary information sent by other block chain nodes includes:
and responding to the received block information sent by other common nodes, acquiring an initial block header and initial transaction summary information from the received block information, and checking whether the initial block header and the initial transaction summary information are correct.
4. The method of claim 3, wherein the obtaining transaction information based on the transaction sequence number in the currently traversed transaction header in response to determining that the transaction key in the currently traversed transaction header is associated with the block link point comprises:
and in response to determining that the transaction key in the currently traversed transaction head is related to the block link point, searching the block body in the received block information for the transaction information corresponding to the transaction sequence number in the currently traversed transaction head.
5. The method of claim 2, wherein the transaction summary information includes a mercker root of the set of transaction headers; and
the checking whether the initial block header and the initial transaction summary information are correct in response to receiving the initial block header and the initial transaction summary information sent by other block chain nodes includes:
solving the Merck root of the transaction head set by utilizing a Hash algorithm;
determining whether the Mercker root in the transaction summary information is the same as the acquired Mercker root;
and if the Mercker root in the transaction summary information is the same as the acquired Mercker root, determining that the initial transaction summary information is correct.
6. The method of claim 3, wherein said checking whether the initial block header and the initial transaction summary information are correct in response to receiving initial block header and initial transaction summary information sent by other blockchain nodes comprises:
and traversing the transaction keywords in each transaction header in the transaction header set, and if the traversed transaction keywords are consistent with values in target keyword fields, determining that the transaction summary information is correct, wherein the target keyword fields are keyword fields in target transaction information in the received block information, and the target transaction information is transaction information indicated by transaction sequence numbers in the traversed transaction keywords.
7. The method of claim 1, wherein prior to said storing block headers and transaction summary information originating from other blockchain nodes to a local ledger, the method further comprises:
acquiring the block height of the highest block currently stored in a local account book;
and sending a block information acquisition request to other block chain nodes, wherein the block information acquisition request is used for requesting to acquire a block higher than the block height, and the block is a block head and transaction summary information.
8. The method of claim 7, wherein the block link nodes comprise a special node in which a block header and transaction summary information are stored and a general node in which block information is stored, the block information comprising a block header, transaction summary information and a block; and
the storing of the block header and the transaction summary information from other blockchain nodes to a local ledger includes:
block headers and transaction summary information originating from other special nodes are stored to a local ledger.
9. The method of claim 8, wherein the obtaining transaction information based on the transaction sequence number in the currently traversed transaction header in response to determining that the transaction key in the currently traversed transaction header is associated with the block link point comprises:
in response to determining that the transaction key in the currently traversed transaction head is related to the block link point, sending a transaction information acquisition request to other common nodes, wherein the transaction information acquisition request comprises the block height of the currently targeted block and the transaction sequence number in the currently traversed transaction head;
and receiving the transaction information returned by the other common nodes, wherein the transaction information is acquired by the other common nodes according to the block height of the current targeted block and the transaction sequence number in the currently traversed transaction header.
10. An apparatus for pushing information, disposed in a blockchain node, comprising:
the storage unit is configured to store block headers and transaction summary information from other block link nodes into a local ledger, wherein the transaction summary information comprises a transaction header set, and the transaction header comprises a transaction keyword and a transaction sequence number;
a determining unit configured to traverse each transaction head in the transaction head set, obtain a transaction keyword and a transaction sequence number in the currently traversed transaction head, and determine whether the transaction keyword in the currently traversed transaction head is related to the block link point;
the acquisition unit is configured to respond to the fact that the transaction key words in the currently traversed transaction head are related to the block chain nodes, and acquire transaction information according to the transaction serial number in the currently traversed transaction head;
a pushing unit configured to push the transaction information.
11. A block link point, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-9.
12. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-9.
CN201911150437.2A 2019-11-21 2019-11-21 Method and device for pushing information Active CN110889040B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911150437.2A CN110889040B (en) 2019-11-21 2019-11-21 Method and device for pushing information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911150437.2A CN110889040B (en) 2019-11-21 2019-11-21 Method and device for pushing information

Publications (2)

Publication Number Publication Date
CN110889040A true CN110889040A (en) 2020-03-17
CN110889040B CN110889040B (en) 2020-09-01

Family

ID=69748266

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911150437.2A Active CN110889040B (en) 2019-11-21 2019-11-21 Method and device for pushing information

Country Status (1)

Country Link
CN (1) CN110889040B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108810119A (en) * 2018-05-31 2018-11-13 中国联合网络通信集团有限公司 block chain processing method, device and block chain node
CN109587265A (en) * 2018-12-19 2019-04-05 中钞信用卡产业发展有限公司杭州区块链技术研究院 A kind of information push method, device, equipment and readable storage medium storing program for executing
CN109598540A (en) * 2018-11-09 2019-04-09 湖南工业大学 A kind of advertisement accurately method for pushing and advertisement accurately supplying system
CN109902258A (en) * 2019-03-06 2019-06-18 众安信息技术服务有限公司 Data processing method and equipment based on block chain
US20190244227A1 (en) * 2016-07-28 2019-08-08 Nec Corporation Bulletin board information management system
CN110442791A (en) * 2019-08-08 2019-11-12 北京阿尔山区块链联盟科技有限公司 Data push method and system
CN110473106A (en) * 2019-08-21 2019-11-19 腾讯科技(深圳)有限公司 A kind of method and relevant apparatus of trading processing

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190244227A1 (en) * 2016-07-28 2019-08-08 Nec Corporation Bulletin board information management system
CN108810119A (en) * 2018-05-31 2018-11-13 中国联合网络通信集团有限公司 block chain processing method, device and block chain node
CN109598540A (en) * 2018-11-09 2019-04-09 湖南工业大学 A kind of advertisement accurately method for pushing and advertisement accurately supplying system
CN109587265A (en) * 2018-12-19 2019-04-05 中钞信用卡产业发展有限公司杭州区块链技术研究院 A kind of information push method, device, equipment and readable storage medium storing program for executing
CN109902258A (en) * 2019-03-06 2019-06-18 众安信息技术服务有限公司 Data processing method and equipment based on block chain
CN110442791A (en) * 2019-08-08 2019-11-12 北京阿尔山区块链联盟科技有限公司 Data push method and system
CN110473106A (en) * 2019-08-21 2019-11-19 腾讯科技(深圳)有限公司 A kind of method and relevant apparatus of trading processing

Also Published As

Publication number Publication date
CN110889040B (en) 2020-09-01

Similar Documents

Publication Publication Date Title
US11689492B2 (en) System and method for identity resolution across disparate distributed immutable ledger networks
CN111344706B (en) Method and system for managing transactions on blockchain
EP3438903B1 (en) Hierarchical network system, and node and program used in same
US20220108285A1 (en) Methods and Systems for Object Validated Blockchain Accounts
CN107577427B (en) data migration method, device and storage medium for blockchain system
US20210049602A1 (en) Transaction method and system based on centralized settlement and blockchain deposit certificates
US20210049595A1 (en) Transaction method and system based on centralized settlement and block chain storage
US20210083856A1 (en) Improved hardware security module management
US20210160077A1 (en) Methods and systems for a consistent distributed memory pool in a blockchain network
EP3817333B1 (en) Method and system for processing requests in a consortium blockchain
CN111597567B (en) Data processing method, data processing device, node equipment and storage medium
CN111427971B (en) Business modeling method, device, system and medium for computer system
US10795882B2 (en) Blockchain-based data compression and searching
WO2021178719A1 (en) Cryptographic data entry blockchain data structure
WO2021195618A1 (en) System and method for integration and validation
CN112040015B (en) Consensus node list generation method and related device
US20130339493A1 (en) Information feedback method and corresponding server
WO2023207529A1 (en) Data processing method and apparatus, device, medium, and product
CN110889040B (en) Method and device for pushing information
CN112988738A (en) Data slicing method and device for block chain
US20230269091A1 (en) Systems and methods for maintaining secure, encrypted communications across distributed computer networks by linking cryptography-based digital repositories in order to perform blockchain operations in decentralized applications
US20230269084A1 (en) Systems and methods for selecting secure, encrypted communications across distributed computer networks for cryptography-based digital repositories in order to perform blockchain operations in decentralized applications
US20230269085A1 (en) Systems and methods for using secure, encrypted communications across distributed computer networks to efficiently update cryptography-based digital repositories for performing blockchain operations in decentralized applications
US20230306128A1 (en) Systems and methods for using secure, encrypted communications across distributed computer networks to provide variable resiliency when indexing blockchain states for performing blockchain operations in decentralized applications using cryptography-based digital repositories
US20230269086A1 (en) Systems and methods for using secure, encrypted communications across distributed computer networks to efficiently index blockchain states for performing blockchain operations in decentralized applications using cryptography-based digital repositories

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

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: Jingdong Shuke Haiyi Information Technology Co.,Ltd.

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

Patentee after: Jingdong Shuke Haiyi 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.

CP01 Change in the name or title of a patent holder