CN113779155A - Block chain transaction processing method, device and equipment - Google Patents

Block chain transaction processing method, device and equipment Download PDF

Info

Publication number
CN113779155A
CN113779155A CN202111121844.8A CN202111121844A CN113779155A CN 113779155 A CN113779155 A CN 113779155A CN 202111121844 A CN202111121844 A CN 202111121844A CN 113779155 A CN113779155 A CN 113779155A
Authority
CN
China
Prior art keywords
transaction
blockchain
anchor
data
platform
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111121844.8A
Other languages
Chinese (zh)
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.)
Alipay Hangzhou Information Technology Co Ltd
Ant Blockchain Technology Shanghai Co Ltd
Original Assignee
Alipay Hangzhou Information Technology Co Ltd
Ant Blockchain Technology Shanghai 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 Alipay Hangzhou Information Technology Co Ltd, Ant Blockchain Technology Shanghai Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202111121844.8A priority Critical patent/CN113779155A/en
Publication of CN113779155A publication Critical patent/CN113779155A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2471Distributed queries
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Business, Economics & Management (AREA)
  • Finance (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Accounting & Taxation (AREA)
  • Technology Law (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Computing Systems (AREA)
  • General Business, Economics & Management (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The embodiment of the specification provides a block chain transaction processing method, a block chain transaction processing device and block chain transaction processing equipment. The method comprises the following steps: the concept of anchor data of the blockchain is introduced, and the transaction is anchored to the blockchain to which the transaction belongs in a mode of adding the anchor data in the transaction, so that when a client sends a transaction request to the blockchain platform, the blockchain platform can decide whether to execute the transaction in the transaction request by verifying the matching between the anchor data carried by the transaction in the transaction request and the anchor data of the blockchain platform, and the problem of transaction replay is avoided.

Description

Block chain transaction processing method, device and equipment
Technical Field
The present disclosure relates to the field of blockchain technologies, and in particular, to a method, an apparatus, and a device for processing blockchain transactions.
Background
Replay Attacks (Replay Attacks), also known as Replay Attacks and Replay Attacks, refer to an attacker sending a packet that has been received by a destination host to achieve the purpose of spoofing a system. In the blockchain field, replay attacks generally refer to transactions initiated on one chain that may be rebroadcast, and possibly confirmed, to another chain. The typical case is that when the ether house is in hard bifurcation, the address of the two separated chains is the same as the algorithm for private key production, and the transaction format is also completely the same, so that the transaction on one chain is probably completely legal on the other chain.
Therefore, a more reliable blockchain transaction processing scheme is needed.
Disclosure of Invention
The embodiments of the present specification provide a method, an apparatus, and a device for processing a blockchain transaction, so as to avoid the problem of transaction replay and ensure the security of user information.
An embodiment of the present specification further provides a method for processing blockchain transactions, including:
a block chain platform receives a transaction request sent by a first client, wherein the transaction request carries first anchoring data, and the first anchoring data is used for anchoring a transaction in the transaction request to a block chain to which the transaction belongs;
acquiring second anchor data corresponding to the block chain of the block chain platform;
and if the second anchor data is matched with the first anchor data, performing submission operation of the transaction in the transaction request in a blockchain of the blockchain platform.
An embodiment of the present specification further provides a method for processing blockchain transactions, including:
a client sends a query request to a block chain platform;
receiving first anchor data returned by the blockchain platform in response to the query request, wherein the first anchor data are used for anchoring a transaction to a blockchain of the blockchain platform by the client;
and sending a transaction request to the blockchain platform, wherein the request of the transaction request carries the first anchoring data.
An embodiment of the present specification further provides a blockchain transaction processing apparatus, including:
the receiving module is used for receiving a transaction request sent by a first client, wherein the transaction request carries first anchoring data, and the first anchoring data is used for anchoring a transaction in the transaction request to a block chain to which the transaction belongs;
the acquisition module acquires second anchor data corresponding to the block chain of the block chain platform;
and the processing module executes the submitting operation of the transaction in the transaction request in the blockchain of the blockchain platform if the second anchor data is matched with the first anchor data.
An embodiment of the present specification further provides a blockchain transaction processing apparatus, including:
the sending module sends a query request to the block chain platform;
a receiving module, configured to receive first anchor data returned by the blockchain platform in response to the query request, where the first anchor data is used for the client to anchor a transaction to a blockchain of the blockchain platform;
and the processing module is used for sending a transaction request to the blockchain platform, wherein the request of the transaction request carries the first anchoring data.
An embodiment of the present specification further provides an electronic device, including:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
receiving a transaction request sent by a first client, wherein the transaction request carries first anchoring data, and the first anchoring data is used for anchoring a transaction in the transaction request to a block chain to which the transaction belongs;
acquiring second anchor data corresponding to the block chain of the block chain platform;
and if the second anchor data is matched with the first anchor data, performing submission operation of the transaction in the transaction request in a blockchain of the blockchain platform.
Embodiments of the present specification further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the following operations:
receiving a transaction request sent by a first client, wherein the transaction request carries first anchoring data, and the first anchoring data is used for anchoring a transaction in the transaction request to a block chain to which the transaction belongs;
acquiring second anchor data corresponding to the block chain of the block chain platform;
and if the second anchor data is matched with the first anchor data, performing submission operation of the transaction in the transaction request in a blockchain of the blockchain platform.
An embodiment of the present specification further provides an electronic device, including:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
sending a query request to a blockchain platform;
receiving first anchor data returned by the blockchain platform in response to the query request, wherein the first anchor data are used for anchoring a transaction to a blockchain of the blockchain platform by the client;
and sending a transaction request to the blockchain platform, wherein the request of the transaction request carries the first anchoring data.
Embodiments of the present specification further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the following operations:
sending a query request to a blockchain platform;
receiving first anchor data returned by the blockchain platform in response to the query request, wherein the first anchor data are used for anchoring a transaction to a blockchain of the blockchain platform by the client;
and sending a transaction request to the blockchain platform, wherein the request of the transaction request carries the first anchoring data.
One embodiment of the present specification achieves anchoring a transaction to a blockchain to which the transaction belongs by adding anchor data in the transaction, so that when a client sends a transaction request to a blockchain platform, the blockchain platform can decide whether to execute the transaction in the transaction request by verifying the matching between the anchor data carried in the transaction and the anchor data of the blockchain platform, thereby avoiding the problem of transaction replay and further ensuring the security of user information.
Drawings
The accompanying drawings, which are included to provide a further understanding of the specification and are incorporated in and constitute a part of this specification, illustrate embodiments of the specification and together with the description serve to explain the specification and not to limit the specification in a non-limiting sense. In the drawings:
FIG. 1 is a schematic diagram of an application scenario provided herein;
fig. 2 is a flowchart illustrating a method for processing blockchain transactions according to an embodiment of the present disclosure;
fig. 3 is a flowchart illustrating a method for processing blockchain transactions according to another embodiment of the present disclosure;
FIG. 4 is an interaction diagram of a blockchain transaction processing method according to another embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a blockchain transaction processing apparatus according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a blockchain transaction processing device according to another embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the present disclosure more clear, the technical solutions of the present disclosure will be clearly and completely described below with reference to the specific embodiments of the present disclosure and the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present disclosure, and not all embodiments. All other embodiments obtained by a person skilled in the art without making any inventive step based on the embodiments in this description belong to the protection scope of this document.
Based on the statement in the background section, the transaction of the user may be replayed on other chains because the transaction does not carry the certification of the trusted environment identified by the user when the user executes the transaction, and further, the user information is leaked. Based on this, the present specification provides a blockchain transaction processing method, which introduces a concept of anchor data of a blockchain, and anchors a transaction to a blockchain to which the transaction belongs in a manner of adding the anchor data in the transaction, so that when a client sends a transaction request to a blockchain platform, the blockchain platform can decide whether to execute the transaction in the transaction request by verifying the matching between the anchor data carried by the transaction in the transaction request and the anchor data of the blockchain platform, thereby avoiding the problem of transaction replay.
The following exemplifies an application scenario of the present solution:
in connection with fig. 1, in an example of an application scenario, it includes: block chain, block chain platform and client, wherein:
the blockchain platform is a service platform constructed based on a blockchain architecture and used as an interface of blockchain related services, such as various light wallets; the client is a product that can be really and directly used by ordinary people, and corresponds to the block chain related services that can be provided by the block chain platform, such as various light wallet clients. Based on the interaction between the client and the block chain platform, the block chain technology can quickly enter the application field to serve the public.
As shown in fig. 1, the client corresponding to the blockchain platform may be supported to be installed on a mobile terminal or a PC, and the mobile terminal or called mobile communication terminal refers to a computer device that can be used in mobile, and broadly includes a mobile phone, a notebook, a tablet computer, a POS machine, and even includes a vehicle-mounted computer.
The technical solutions provided by the embodiments of the present description are described in detail below with reference to the accompanying drawings.
Fig. 2 is a flowchart of a blockchain transaction processing method provided in an embodiment of the present disclosure, which can be executed by the blockchain platform in fig. 1, with reference to fig. 2, where the method specifically includes the following steps:
202, a blockchain platform receives a transaction request sent by a first client, wherein the transaction request carries first anchoring data, and the first anchoring data is used for anchoring a transaction in the transaction request to a blockchain to which the transaction belongs;
the blockchain to which the transaction belongs refers to a blockchain accessed by all nodes participating in the transaction, for example, for the transactions participated by the nodes a and b, the transaction belongs to the blockchain accessed by the nodes a and b together.
In combination with the statements in the background section, since there may be a situation that a transaction initiated on one chain may be rebroadcast to another chain, and may also be confirmed, before a client initiates a transaction request to a blockchain platform, it is necessary to first obtain anchor data of a blockchain to which the transaction belongs from the blockchain platform, and anchor the transaction to the blockchain to which the transaction belongs according to the anchor data, thereby ensuring that the transaction is executed in a trusted environment corresponding to the blockchain to which the transaction belongs.
The following describes the transaction anchoring process in detail by taking a scenario of block chain forking as an example:
two branched chains of the block chain are respectively a first block chain and a second block chain, wherein the block chain which is accessed by the target transaction party together including the node a and the node b is the first block chain.
When a client submits a target transaction, firstly, the anchoring data of a first block chain is inquired from a block chain platform constructed based on the first block chain, and the anchoring data of the first block chain is set in the target transaction, so that the target transaction is anchored to the first block chain.
Step 204, acquiring second anchor data corresponding to the block chain of the block chain platform;
the blockchain of the blockchain platform refers to the blockchain according to which the blockchain platform shown in fig. 1 is constructed, and the blockchain may be the same as or different from the blockchain to which the transaction belongs.
The implementation of step 204 is described in detail below:
s1, calling an intelligent contract on the blockchain of the blockchain platform to acquire an anchor type, wherein the intelligent contract is used for configuring the anchor type of the blockchain, and the anchor type is used for indicating an anchor object of the transaction in the blockchain; the intelligent contracts can be configured in the creation blocks of the blockchain platform through background management by an administrator of the blockchain platform.
And S2, generating second anchor data based on the anchor object corresponding to the anchor type.
For the anchor objects, it should be noted that the anchor objects are of many kinds, and are not exhaustive, as long as the anchor objects can uniquely identify the block chain and are different from the same type of parameters of other block chains. Specific examples can be:
example 1, the anchor types include: node anchoring;
one implementation of S2 may be:
determining a node list of a blockchain of the blockchain platform; and carrying out hash processing on the node list to obtain second anchor data. Wherein the node list may include all nodes of the blockchain currently.
Example 2, the anchor types include: anchoring the block;
another implementation of S2 may be:
determining a target block in a block chain of the block chain platform, wherein the target block is an anchor object indicated by the anchor type; and obtaining second anchor data based on the hash value of the target block.
Preferably, the target block is an established block of a block chain of the block chain platform.
Of course, it is understood that the anchor type may also be a combination of the two examples, or other objects of the block chain, such as a timestamp, may also be introduced, and the other objects may be used as anchor objects or combined with node anchors and block anchors as anchor objects, which is not limited herein.
On the basis, on one hand, the method avoids leakage of the anchor type by writing the anchor type into the intelligent contract, so that the security of the anchor data is ensured; on the other hand, the concept of node anchoring/block anchoring is introduced, and the transaction is anchored to the block chain according to the node/block related data of the block chain, so that the certification of the trusted environment of transaction confirmation is definitely performed. Furthermore, the embodiment of the present specification shows a specific implementation manner of the foregoing pre-block hash. Of course, it should be understood that the preceding block hash may also be implemented in other ways, and this is not limited by the embodiment of the present application.
In addition, in order to further avoid the leakage of the anchor type and improve the proof effectiveness of the trusted environment identified when the transaction is executed, the embodiment further proposes a maintenance scheme of the anchor type, which includes the following steps:
s1' receives an execution completion event that modifies the anchor type transaction;
s2' responds to the execution completion event, and calls the intelligent contract to acquire the modified anchor type.
The transaction to modify the anchor type is typically initiated by an administrator when the anchor rules need to be maintained, such as when the node anchor needs to be modified to a node + timestamp anchor type, the administrator needs to initiate a transaction request to maintain the previously submitted intelligent contract configuring the node anchor. When the transaction request passes through the consensus of the blockchain platform and the execution of the transaction of the modified anchor type is completed, the blockchain platform responds to the event of the execution completion and calls the latest intelligent contract to perform the synchronization of the modified anchor type.
In connection with step 204, the following introduces a second client and explains the transaction anchoring process again from the perspective of the second client anchoring the transaction to the blockchain platform:
firstly, a second client initiates a query request to a block chain platform; responding to the query request sent by the second client, and generating anchor data of the block chain platform according to the latest anchor type and recording the anchor data as second anchor data by the block chain platform according to the step 204 and the related content; returning the second anchoring data in response to a query request sent by a second client; the second client initiates a transaction request after setting the second anchor data in a transaction, thereby anchoring the transaction to a blockchain of a blockchain platform.
The second client and the first client may be the same client or different clients.
And step 206, if the second anchor data is matched with the first anchor data, performing submission operation of the transaction in the transaction request in the blockchain of the blockchain platform.
And if the first anchor data and the second anchor data do not match, refusing to execute the submission operation of the transaction in the transaction request in the blockchain of the blockchain platform.
It should be understood that if the second anchor data matches the first anchor data, it indicates that the blockchain of the transaction anchor and the blockchain of the blockchain platform are the same blockchain, i.e. the transaction can be executed in the blockchain of the blockchain platform; and if the first anchor data and the second anchor data are not matched, the block chain of the transaction anchor is not the block chain of the block chain platform, but other block chains, and the block chain platform refuses the transaction to be executed in the block chain of the block chain platform.
Therefore, in the embodiment, the transaction is anchored to the block chain to which the transaction belongs in a manner of adding the anchor data in the transaction, so that when the client sends the transaction request to the block chain platform, the block chain platform can decide whether to execute the transaction in the transaction request by verifying the matching between the anchor data carried in the transaction and the anchor data of the block chain platform, thereby avoiding the problem of transaction replay and further ensuring the security of user information.
Fig. 3 is a flowchart illustrating a blockchain transaction processing method according to another embodiment of the present disclosure, which may be executed by the client in fig. 1, referring to fig. 3, where the method may specifically include the following steps:
step 302, the client sends a query request to the blockchain platform;
step 304, receiving first anchor data returned by the blockchain platform in response to the query request, wherein the first anchor data is used for anchoring a transaction to a blockchain of the blockchain platform by the client;
specifically, the method comprises the following steps: and the block chain platform responds to the query request to acquire and return pre-generated first anchor data, wherein the first anchor data are generated by the block chain platform based on the anchor type configured in the intelligent contract. The specific generation scheme has been described in detail in the embodiment corresponding to fig. 2, and therefore, the detailed description is omitted here.
Step 306, sending a transaction request to the blockchain platform, wherein the request of the transaction request carries the first anchor data.
Specifically, the method comprises the following steps: before step 306 is executed, a step of setting first anchor data in the transaction is further included, and specifically, the first anchor data may be written in an extension field of the transaction. Therefore, different anchor data are added in the transaction extension field, the transaction can be executed only under a certain trusted environment, and the problems of information leakage and the like caused by the replay behavior of the transaction are prevented.
Further, the first anchor data carried in the request of the transaction request is matched with the anchor data corresponding to the blockchain of the blockchain platform by the blockchain platform, and if the first anchor data and the anchor data are matched, the submission operation of the transaction in the transaction request is executed in the blockchain of the blockchain platform.
In addition, it is understood that if the client sends the transaction request to another blockchain platform, the other blockchain platform also matches the first anchor data carried in the transaction request with the anchor data corresponding to the blockchain of the other blockchain platform, and since the anchor data of the blockchain platform are different, the matching cannot be successful, and thus the submission operation of the transaction in the transaction request cannot be executed in the blockchain of the other blockchain platform.
Therefore, in the embodiment, the transaction is anchored to the block chain to which the transaction belongs by adding the anchor data in the transaction, so that when the client sends the transaction request to the block chain platform, the block chain platform can decide whether to execute the transaction in the transaction request by verifying the matching between the anchor data carried in the transaction and the anchor data of the block chain platform, thereby avoiding the problem of transaction replay and further ensuring the security of user information.
Fig. 4 is an interaction diagram of a blockchain transaction processing method according to another embodiment of the present disclosure, referring to fig. 4, the method may specifically include the following steps:
step 402, setting an anchoring type;
specifically, the method comprises the following steps: the administrator sets the anchor type in the created blocks in the form of smart contracts.
Step 404, generating a creating block;
step 406, inquiring the anchoring type;
step 408, returning the anchor type;
specifically, the method comprises the following steps: and generating a founding block and starting a system platform, wherein the block chain platform inquires the anchoring type from the system contract.
Step 410, generating anchoring data based on the anchoring type;
specifically, the method comprises the following steps: if the anchoring type is the type of node anchoring, inquiring an id list of a recognition node in the current node environment; and carrying out hash on the node list to generate anchor data.
And if the anchor type is a block anchor type, taking the hash of the created block as anchor data.
Step 412, inquiring anchoring data;
specifically, the method comprises the following steps: client sdk starts by first querying the blockchain for the current anchor data.
Step 414, setting anchor data in the transaction;
step 416, sending a transaction request;
specifically, the method comprises the following steps: sdk places the anchor information in the extension field of the transaction and sends it to the platform (blockchain platform).
Step 418, whether the anchor data in the transaction is matched with the anchor data in the current system;
if yes, executing the transaction in a block chain of the block chain platform; otherwise, transaction failure is returned.
Therefore, in the embodiment, the transaction is anchored to the block chain to which the transaction belongs in a manner of adding the anchor data in the transaction, so that when the client sends the transaction request to the block chain platform, the block chain platform can decide whether to execute the transaction in the transaction request by verifying the matching between the anchor data carried in the transaction and the anchor data of the block chain platform, thereby avoiding the problem of transaction replay and further ensuring the security of user information.
Fig. 5 is a schematic structural diagram of a blockchain transaction processing apparatus according to an embodiment of the present disclosure, and referring to fig. 5, the apparatus may specifically include:
a receiving module 501, configured to receive a transaction request sent by a first client, where the transaction request carries first anchor data, and the first anchor data is used to anchor a transaction in the transaction request to a block chain to which the transaction belongs;
an obtaining module 502, configured to obtain second anchor data corresponding to a blockchain of the blockchain platform;
a processing module 503, configured to perform a commit operation of the transaction in the transaction request in the blockchain of the blockchain platform if the second anchor data matches the first anchor data.
Optionally, the apparatus further comprises:
the calling module is used for calling an intelligent contract on a block chain of the block chain platform to acquire an anchor type, the intelligent contract is used for configuring the anchor type of the block chain, and the anchor type is used for indicating an anchor object of a transaction in the block chain; and generating second anchor data based on the anchor object corresponding to the anchor type.
Optionally, the anchor types include: node anchoring;
the calling module determines a node list of a block chain of the block chain platform; and carrying out hash processing on the node list to obtain second anchor data.
Optionally, the anchor types include: anchoring the block;
the calling module determines a target block in a block chain of the block chain platform, wherein the target block is an anchor object indicated by the anchor type; and obtaining second anchor data based on the hash value of the target block.
Optionally, the target block is an established block of a block chain of the block chain platform.
Optionally, the apparatus further comprises:
a contract maintenance module to receive an execution completion event that modifies an anchor type transaction; and responding to the execution completion event, and calling the intelligent contract to acquire the modified anchoring type.
Optionally, the apparatus further comprises:
and the response module responds to the query request sent by the second client and returns the second anchor data for the second client to initiate a transaction request after the second anchor data is set in the transaction.
Optionally, the processing module 503 refuses to execute the submitting operation of the transaction in the transaction request in the blockchain of the blockchain platform if the first anchor data and the second anchor data do not match.
Therefore, in the embodiment, the transaction is anchored to the block chain to which the transaction belongs by adding the anchor data in the transaction, so that when the client sends the transaction request to the block chain platform, the block chain platform can decide whether to execute the transaction in the transaction request by verifying the matching between the anchor data carried in the transaction and the anchor data of the block chain platform, thereby avoiding the problem of transaction replay and further ensuring the security of user information.
Fig. 6 is a schematic structural diagram of a blockchain transaction processing apparatus according to another embodiment of the present disclosure, referring to fig. 6, the apparatus may specifically include:
a sending module 601, configured to send a query request to the blockchain platform;
a receiving module 602, configured to receive first anchor data returned by the blockchain platform in response to the query request, where the first anchor data is used for the client to anchor a transaction to a blockchain of the blockchain platform;
the processing module 603 sends a transaction request to the blockchain platform, where the transaction request carries the first anchor data.
Optionally, the apparatus further comprises:
a write module to write the first anchor data into an extension field of the transaction.
Therefore, in the embodiment, the transaction is anchored to the block chain to which the transaction belongs by adding the anchor data in the transaction, so that when the client sends the transaction request to the block chain platform, the block chain platform can decide whether to execute the transaction in the transaction request by verifying the matching between the anchor data carried in the transaction and the anchor data of the block chain platform, thereby avoiding the problem of transaction replay and further ensuring the security of user information.
In addition, it should be noted that, in the respective components of the apparatus of the present specification, the components therein are logically divided according to the functions to be implemented thereof, but the present specification is not limited thereto, and the respective components may be newly divided or combined as necessary.
Fig. 7 is a schematic structural diagram of an electronic device provided in an embodiment of the present disclosure, and referring to fig. 7, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include hardware required by other services. The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs the computer program to form the block chain transaction processing device on the logic level. Of course, besides the software implementation, the present specification does not exclude other implementations, such as logic devices or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may be hardware or logic devices.
The network interface, the processor and the memory may be interconnected by a bus system. The bus may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 7, but this does not indicate only one bus or one type of bus.
The memory is used for storing programs. In particular, the program may include program code comprising computer operating instructions. The memory may include both read-only memory and random access memory, and provides instructions and data to the processor. The Memory may include a Random-Access Memory (RAM) and may also include a non-volatile Memory (non-volatile Memory), such as at least 1 disk Memory.
The processor is used for executing the program stored in the memory and specifically executing:
receiving a transaction request sent by a first client, wherein the transaction request carries first anchoring data, and the first anchoring data is used for anchoring a transaction in the transaction request to a block chain to which the transaction belongs;
acquiring second anchor data corresponding to the block chain of the block chain platform;
and if the second anchor data is matched with the first anchor data, performing submission operation of the transaction in the transaction request in a blockchain of the blockchain platform.
Alternatively, the first and second electrodes may be,
sending a query request to a blockchain platform;
receiving first anchor data returned by the blockchain platform in response to the query request, wherein the first anchor data are used for anchoring a transaction to a blockchain of the blockchain platform by the client;
and sending a transaction request to the blockchain platform, wherein the request of the transaction request carries the first anchoring data.
The methods performed by the blockchain transaction processing apparatus or Master (Master) node according to the embodiments of the present disclosure shown in fig. 5-6 can be implemented in or by a processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present specification may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present specification may be embodied directly in a hardware decoding processor, or in a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
The blockchain transaction processing device may also perform the methods of fig. 2-4 and implement the methods performed by the manager node.
Based on the same inventive creation, the present specification also provides a computer readable storage medium storing one or more programs, which when executed by an electronic device including a plurality of application programs, cause the electronic device to execute the blockchain transaction processing method provided by the corresponding embodiment of fig. 2 to 4.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The description has been presented with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the description. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above description is only an example of the present specification, and is not intended to limit the present specification. Various modifications and alterations to this description will become apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification should be included in the scope of the claims of the present specification.

Claims (16)

1. A blockchain transaction processing method, comprising:
a block chain platform receives a transaction request sent by a first client, wherein the transaction request carries first anchoring data, and the first anchoring data is used for anchoring a transaction in the transaction request to a block chain to which the transaction belongs;
acquiring second anchor data corresponding to the block chain of the block chain platform;
and if the second anchor data is matched with the first anchor data, performing submission operation of the transaction in the transaction request in a blockchain of the blockchain platform.
2. The method of claim 1, prior to obtaining second anchor data corresponding to a blockchain of the blockchain platform, the method further comprising:
calling an intelligent contract on a blockchain of the blockchain platform to acquire an anchor type, wherein the intelligent contract is used for configuring the anchor type of the blockchain, and the anchor type is used for indicating an anchor object of a transaction in the blockchain;
and generating second anchor data based on the anchor object corresponding to the anchor type.
3. The method of claim 2, the anchor type comprising: node anchoring;
wherein the generating second anchor data based on the anchor object corresponding to the anchor type includes:
determining a node list of a blockchain of the blockchain platform;
and carrying out hash processing on the node list to obtain second anchor data.
4. The method of claim 2, the anchor type comprising: anchoring the block;
wherein the generating second anchor data based on the anchor object corresponding to the anchor type includes:
determining a target block in a block chain of the block chain platform, wherein the target block is an anchor object indicated by the anchor type;
and obtaining second anchor data based on the hash value of the target block.
5. The method of claim 4, wherein the first and second light sources are selected from the group consisting of,
the target block is a created block of a block chain of the block chain platform.
6. The method of claim 2, further comprising:
receiving an execution completion event that modifies an anchor type transaction;
and responding to the execution completion event, and calling the intelligent contract to acquire the modified anchoring type.
7. The method of claim 2, further comprising:
and returning the second anchoring data in response to a query request sent by a second client, so that the second client initiates a transaction request after setting the second anchoring data in a transaction.
8. The method of claim 1, further comprising:
and if the first anchor data and the second anchor data do not match, refusing to execute the submission operation of the transaction in the transaction request in the blockchain of the blockchain platform.
9. A blockchain transaction processing method, comprising:
a client sends a query request to a block chain platform;
receiving first anchor data returned by the blockchain platform in response to the query request, wherein the first anchor data are used for anchoring a transaction to a blockchain of the blockchain platform by the client;
and sending a transaction request to the blockchain platform, wherein the request of the transaction request carries the first anchoring data.
10. The method of claim 9, prior to sending a transaction request to the first blockchain platform, further comprising:
writing the first anchor data into an extension field of the transaction.
11. A blockchain transaction processing apparatus comprising:
the receiving module is used for receiving a transaction request sent by a first client, wherein the transaction request carries first anchoring data, and the first anchoring data is used for anchoring a transaction in the transaction request to a block chain to which the transaction belongs;
the acquisition module acquires second anchor data corresponding to the block chain of the block chain platform;
and the processing module executes the submitting operation of the transaction in the transaction request in the blockchain of the blockchain platform if the second anchor data is matched with the first anchor data.
12. A blockchain transaction processing apparatus comprising:
the sending module sends a query request to the block chain platform;
a receiving module, configured to receive first anchor data returned by the blockchain platform in response to the query request, where the first anchor data is used for the client to anchor a transaction to a blockchain of the blockchain platform;
and the processing module is used for sending a transaction request to the blockchain platform, wherein the request of the transaction request carries the first anchoring data.
13. An electronic device, comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
receiving a transaction request sent by a first client, wherein the transaction request carries first anchoring data, and the first anchoring data is used for anchoring a transaction in the transaction request to a block chain to which the transaction belongs;
acquiring second anchor data corresponding to the block chain of the block chain platform;
and if the second anchor data is matched with the first anchor data, performing submission operation of the transaction in the transaction request in a blockchain of the blockchain platform.
14. A computer-readable storage medium having a computer program stored thereon, which when executed by a processor, performs operations comprising:
receiving a transaction request sent by a first client, wherein the transaction request carries first anchoring data, and the first anchoring data is used for anchoring a transaction in the transaction request to a block chain to which the transaction belongs;
acquiring second anchor data corresponding to the block chain of the block chain platform;
and if the second anchor data is matched with the first anchor data, performing submission operation of the transaction in the transaction request in a blockchain of the blockchain platform.
15. An electronic device, comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
sending a query request to a blockchain platform;
receiving first anchor data returned by the blockchain platform in response to the query request, wherein the first anchor data are used for anchoring a transaction to a blockchain of the blockchain platform by the client;
and sending a transaction request to the blockchain platform, wherein the request of the transaction request carries the first anchoring data.
16. A computer-readable storage medium having a computer program stored thereon, which when executed by a processor, performs operations comprising:
sending a query request to a blockchain platform;
receiving first anchor data returned by the blockchain platform in response to the query request, wherein the first anchor data are used for anchoring a transaction to a blockchain of the blockchain platform by the client;
and sending a transaction request to the blockchain platform, wherein the request of the transaction request carries the first anchoring data.
CN202111121844.8A 2021-09-24 2021-09-24 Block chain transaction processing method, device and equipment Pending CN113779155A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111121844.8A CN113779155A (en) 2021-09-24 2021-09-24 Block chain transaction processing method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111121844.8A CN113779155A (en) 2021-09-24 2021-09-24 Block chain transaction processing method, device and equipment

Publications (1)

Publication Number Publication Date
CN113779155A true CN113779155A (en) 2021-12-10

Family

ID=78853101

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111121844.8A Pending CN113779155A (en) 2021-09-24 2021-09-24 Block chain transaction processing method, device and equipment

Country Status (1)

Country Link
CN (1) CN113779155A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109067541A (en) * 2018-06-29 2018-12-21 阿里巴巴集团控股有限公司 Data verification method and device, electronic equipment based on block chain
CN109426949A (en) * 2017-08-29 2019-03-05 华为技术有限公司 Across the chain method of commerce of one kind and device
CN110839015A (en) * 2019-10-12 2020-02-25 深圳壹账通智能科技有限公司 Log storage and reading method, device, equipment and medium based on block chain
CN111539730A (en) * 2020-05-29 2020-08-14 支付宝(杭州)信息技术有限公司 Data processing method and device based on block chain and electronic equipment
CN111914021A (en) * 2020-07-02 2020-11-10 连连智能科技有限公司 Cross-block-chain interaction method and system, computer equipment and storage medium
WO2020233630A1 (en) * 2019-05-20 2020-11-26 创新先进技术有限公司 User type-based receipt storing method and node
CN112019586A (en) * 2019-05-29 2020-12-01 国际商业机器公司 Approximate hash verification for blockchains
CN112632064A (en) * 2020-12-17 2021-04-09 北京中数创新科技股份有限公司 Handle system-based block chain enhancement method and system
CN112804211A (en) * 2020-12-31 2021-05-14 北京存金所贵金属有限公司 Hybrid chain data verification method and system based on alliance block chain and public chain
CN113378218A (en) * 2021-06-02 2021-09-10 浙江数秦科技有限公司 Intellectual property data storage and authentication method based on block chain

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109426949A (en) * 2017-08-29 2019-03-05 华为技术有限公司 Across the chain method of commerce of one kind and device
CN109067541A (en) * 2018-06-29 2018-12-21 阿里巴巴集团控股有限公司 Data verification method and device, electronic equipment based on block chain
WO2020233630A1 (en) * 2019-05-20 2020-11-26 创新先进技术有限公司 User type-based receipt storing method and node
CN112019586A (en) * 2019-05-29 2020-12-01 国际商业机器公司 Approximate hash verification for blockchains
CN110839015A (en) * 2019-10-12 2020-02-25 深圳壹账通智能科技有限公司 Log storage and reading method, device, equipment and medium based on block chain
CN111539730A (en) * 2020-05-29 2020-08-14 支付宝(杭州)信息技术有限公司 Data processing method and device based on block chain and electronic equipment
CN111914021A (en) * 2020-07-02 2020-11-10 连连智能科技有限公司 Cross-block-chain interaction method and system, computer equipment and storage medium
CN112632064A (en) * 2020-12-17 2021-04-09 北京中数创新科技股份有限公司 Handle system-based block chain enhancement method and system
CN112804211A (en) * 2020-12-31 2021-05-14 北京存金所贵金属有限公司 Hybrid chain data verification method and system based on alliance block chain and public chain
CN113378218A (en) * 2021-06-02 2021-09-10 浙江数秦科技有限公司 Intellectual property data storage and authentication method based on block chain

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘雄文;: "多区块链交易分发和事件处理的***方案", 计算机科学, no. 2, 15 November 2018 (2018-11-15) *

Similar Documents

Publication Publication Date Title
AU2019101613A4 (en) Method and apparatus for processing transaction requests
CN110033244B (en) Intelligent contract execution method and device based on block chain and electronic equipment
CN110032880B (en) Screen recording evidence obtaining method and system based on block chain and electronic equipment
EP3591510A1 (en) Method and device for writing service data in block chain system
CN105592011B (en) Account login method and device
CN109669709B (en) Data migration method and data migration system for block chain upgrading
CN111461887B (en) Block chain consensus processing method and device and electronic equipment
CN110597918B (en) Account management method, account management device and computer readable storage medium
CN112235278B (en) Method and device for monitoring address information of trader and electronic equipment
CN113205416A (en) Service processing method and system based on block chain prediction machine
CN111651467B (en) Block chain node interface issuing and calling method and device
CN112714158A (en) Transaction processing method, relay network, cross-link gateway, system, medium, and device
CN114528601B (en) Access method and device based on block chain data, processor and electronic equipment
CN113821817A (en) Data processing method, device, equipment and system based on block chain
CN112988470B (en) Consensus method, consensus node and system in alliance chain
CN112887436B (en) Consensus method, consensus node and block chain system of pipeline mode
CN112291321A (en) Service processing method, device and system
CN113779155A (en) Block chain transaction processing method, device and equipment
CN112991067B (en) Block chain consensus method, device and system
CN114880300A (en) Processing method and device based on block chain file, processor and electronic equipment
CN113761581A (en) Authority control method and device in block chain and electronic equipment
CN111651469A (en) Method and device for managing block chain system contract
CN113507432A (en) Alliance link authority management method and device
CN111884808A (en) Method and device for preventing cross-chain replay of transaction and electronic equipment
CN111030826A (en) Certificate revocation method and device for block chain network and electronic equipment

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