CN112019603B - Transaction data processing method and device - Google Patents

Transaction data processing method and device Download PDF

Info

Publication number
CN112019603B
CN112019603B CN202010796486.XA CN202010796486A CN112019603B CN 112019603 B CN112019603 B CN 112019603B CN 202010796486 A CN202010796486 A CN 202010796486A CN 112019603 B CN112019603 B CN 112019603B
Authority
CN
China
Prior art keywords
node
blockchain
transaction data
transaction
target
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.)
Active
Application number
CN202010796486.XA
Other languages
Chinese (zh)
Other versions
CN112019603A (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.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group 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 China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN202010796486.XA priority Critical patent/CN112019603B/en
Publication of CN112019603A publication Critical patent/CN112019603A/en
Application granted granted Critical
Publication of CN112019603B publication Critical patent/CN112019603B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • 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
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching

Abstract

The embodiment of the invention provides a method and a device for processing transaction data, relates to the technical field of communication, and can reduce the time delay of a first node for acquiring the transaction data corresponding to a first block chain and improve the processing efficiency of the transaction data. The method comprises the following steps: the network control equipment receives a transaction request message of a first node and state information of the first node; the network control equipment determines a target MEC node with the shortest communication distance with the first node according to the position information of the first node; the network control equipment determines whether the transaction data stored in the first node is the same as the transaction data corresponding to the first blockchain or not according to the height of the block of the transaction data stored in the first node and the timestamp of the transaction data stored in the first node; and under the condition that the transaction data stored by the first node is different from the transaction data corresponding to the first blockchain, the network control equipment sends a first data synchronization indication message to the first node.

Description

Transaction data processing method and device
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a method and a device for processing transaction data.
Background
Currently, a transaction sender device may store transaction data in its cache and in other nodes on the blockchain in which the transaction sender device resides. When the transaction sender device does not belong to the blockchain, or the transaction sender device cannot keep updating synchronously with the transaction data in the blockchain for some reason (e.g., server failure, etc.), the transaction data in the blockchain needs to be sent to the transaction sender device. Specifically, any node (referred to as a target node) in the blockchain may provide the transaction sender device with the transaction data in the blockchain.
However, when the target node is a server in an external data network, since the transaction sender device needs to obtain the transaction data of the block chain from the server (i.e., the target node) in the external data network through a 5G core network (5G core network, 5GC), a time delay for the transaction sender device to obtain the transaction data in the block chain may be long, which affects processing efficiency of the transaction data.
Disclosure of Invention
Embodiments of the present invention provide a method and an apparatus for processing transaction data, which can reduce a time delay for a first node to acquire transaction data corresponding to a first block chain, and improve processing efficiency of the transaction data.
In a first aspect, an embodiment of the present invention provides a method for processing transaction data, including: a first node sends a transaction request message and state information of the first node to a network control device, wherein the transaction request message comprises an account address of a second node and transaction data corresponding to a target transaction, the second node is a receiver device corresponding to the target transaction, the state information of the first node comprises position information of the first node, block height of the transaction data stored by the first node and a timestamp of the transaction data stored by the first node; the first node receives a first data synchronization indication message of the network control device, where the first data synchronization indication message is used to indicate the first node to obtain transaction data corresponding to a first block chain from a target Mobile Edge Computing (MEC) node, where the target MEC node is determined by the network control device according to location information of the first node, and the first block chain is a block chain corresponding to the target MEC node; the first node sends a first data synchronization request message to the target MEC node, wherein the first data synchronization request message is used for requesting to acquire transaction data corresponding to the first block chain; the first node receives a first data synchronization response message of the target MEC node, wherein the first data synchronization response message includes transaction data corresponding to the first blockchain.
In a second aspect, an embodiment of the present invention provides a method for processing transaction data, including: the method comprises the steps that a network control device receives a transaction request message of a first node and state information of the first node, the transaction request message comprises an account address of a second node and transaction data corresponding to a target transaction, the second node is a receiver device corresponding to the target transaction, the state information of the first node comprises position information of the first node, block height of the transaction data stored in the first node and a timestamp of the transaction data stored in the first node; the network control equipment determines a target MEC node with the shortest communication distance with the first node according to the position information of the first node; the network control equipment determines whether the transaction data stored by the first node is the same as the transaction data corresponding to a first block chain according to the block height of the transaction data stored by the first node and the timestamp of the transaction data stored by the first node, wherein the first block chain is the block chain corresponding to the target MEC node; and under the condition that the transaction data stored by the first node is different from the transaction data corresponding to the first blockchain, the network control equipment sends a first data synchronization indication message to the first node, wherein the first data synchronization indication message is used for indicating the first node to acquire the transaction data corresponding to the first blockchain from the target MEC node.
In a third aspect, an embodiment of the present invention provides a transaction data processing apparatus, including: a transmitting module and a receiving module; the sending module is used for sending a transaction request message and state information of a first node to the network control equipment, wherein the transaction request message comprises an account address of a second node and transaction data corresponding to a target transaction, the second node is a receiver device corresponding to the target transaction, and the state information of the first node comprises position information of the first node, block height of the transaction data stored in the first node and a timestamp of the transaction data stored in the first node; the receiving module is configured to receive a first data synchronization indication message of the network control device, where the first data synchronization indication message is used to indicate the first node to obtain transaction data corresponding to a first block chain from a target MEC node, where the target MEC node is determined by the network control device according to location information of the first node, and the first block chain is a block chain corresponding to the target MEC node; the sending module is further configured to send a first data synchronization request message to the target MEC node, where the first data synchronization request message is used to request to acquire transaction data corresponding to the first blockchain; the receiving module is further configured to receive a first data synchronization response message of the target MEC node, where the first data synchronization response message includes transaction data corresponding to the first blockchain.
In a fourth aspect, an embodiment of the present invention provides a transaction data processing apparatus, including: the device comprises a receiving module, a determining module and a sending module; the receiving module is configured to receive a transaction request message of a first node and state information of the first node, where the transaction request message includes an account address of a second node and transaction data corresponding to a target transaction, the second node is a receiver device corresponding to the target transaction, and the state information of the first node includes location information of the first node, a block height of the transaction data stored in the first node, and a timestamp of the transaction data stored in the first node; the determining module is configured to determine, according to the location information of the first node, a target MEC node having a shortest communication distance with the first node; determining whether the transaction data stored by the first node is the same as the transaction data corresponding to a first block chain according to the block height of the transaction data stored by the first node and the timestamp of the transaction data stored by the first node, wherein the first block chain is the block chain corresponding to the target MEC node; the sending module is configured to send a first data synchronization indication message to the first node when the transaction data stored in the first node is different from the transaction data corresponding to the first blockchain, where the first data synchronization indication message is used to indicate the first node to obtain the transaction data corresponding to the first blockchain from the target MEC node.
In a fifth aspect, an embodiment of the present invention provides another transaction data processing apparatus, including: a processor, a memory, a bus, and a communication interface; the memory is used for storing computer execution instructions, the processor is connected with the memory through a bus, and when the processing device of the transaction data runs, the processor executes the computer execution instructions stored in the memory, so that the processing device of the transaction data executes the processing method of the transaction data provided by the first aspect.
In a sixth aspect, an embodiment of the present invention provides another transaction data processing apparatus, including: a processor, a memory, a bus, and a communication interface; the memory is used for storing computer execution instructions, the processor is connected with the memory through a bus, and when the processing device of the transaction data runs, the processor executes the computer execution instructions stored in the memory, so that the processing device of the transaction data executes the processing method of the transaction data provided by the second aspect.
In a seventh aspect, an embodiment of the present invention provides a computer-readable storage medium, which includes instructions, when executed on a transaction data processing apparatus, to cause the transaction data processing apparatus to execute a transaction data processing method provided in the first aspect.
In an eighth aspect, an embodiment of the present invention provides a computer-readable storage medium, which includes instructions, when executed on a transaction data processing apparatus, to cause the transaction data processing apparatus to execute a transaction data processing method provided in the second aspect.
In a ninth aspect, an embodiment of the present invention provides a computer program product containing instructions, which when run on a computer, causes the computer to execute the method for processing transaction data of the first aspect and any one of the implementations thereof.
In a tenth aspect, an embodiment of the present invention provides a computer program product including instructions, which, when run on a computer, causes the computer to execute the method for processing transaction data of the second aspect and any one of the implementations thereof.
In the method and apparatus for processing transaction data provided in the embodiment of the present invention, a first node sends a transaction request message and state information of the first node to a network control device, where the transaction request message includes an account address of a second node (i.e., a transaction receiver device corresponding to a target transaction) and transaction data corresponding to the target transaction, and the state information of the first node includes location information of the first node, a block height of the transaction data stored in the first node, and a timestamp of the transaction data stored in the first node; after the network control device receives the transaction request message of the first node and the status information of the first node, it may determine a target MEC node (i.e., a node with the shortest communication distance to the first node) according to the location information of the first node, and determine whether the transaction data stored in the first node is the same as the transaction data corresponding to the first block chain (i.e., the block chain corresponding to the target MEC node) according to the block height of the transaction data stored in the first node and the timestamp of the transaction data stored in the first node. Then, when the transaction data stored in the first node is different from the transaction data corresponding to the first blockchain, the network control device sends a first data synchronization indication message to the first node, where the first data is the same as the indication message and is used for indicating the first node to acquire the transaction data corresponding to the first blockchain from the target MEC node.
The first node may send a first data synchronization indication message to the target MEC node after receiving the first data synchronization indication message sent by the network control device, and then receive a first data synchronization response message sent by the target MEC node, where the first data synchronization response message includes transaction data corresponding to the first blockchain. In this way, the first node may obtain the transaction data corresponding to the first blockchain. In this embodiment of the present invention, the network control device may determine, based on the location information of the first node, a target MEC node that may provide the first node with the transaction data corresponding to the first blockchain. Furthermore, under the condition that the first node update data is not timely or does not belong to the first block chain, the first node is instructed to acquire the transaction data corresponding to the first block chain from the target MEC node, so that the time delay of acquiring the transaction data corresponding to the first block chain by the first node can be reduced, and the processing efficiency of the transaction data is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a schematic network architecture diagram of a 5G communication system according to an embodiment of the present invention;
fig. 2 is a hardware schematic diagram of a network control device according to an embodiment of the present invention;
fig. 3 is a first schematic diagram illustrating a transaction data processing method according to an embodiment of the present invention;
fig. 4 is a second schematic diagram illustrating a transaction data processing method according to an embodiment of the present invention;
fig. 5 is a first schematic structural diagram of a first node according to an embodiment of the present invention;
fig. 6 is a second schematic structural diagram of a first node according to an embodiment of the present invention;
fig. 7 is a first schematic structural diagram of a network control device according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a network control device according to an embodiment of the present invention.
Detailed Description
The following describes a method and an apparatus for processing transaction data according to an embodiment of the present invention in detail with reference to the accompanying drawings.
The terms "first" and "second", etc. in the description and drawings of the present application are used to distinguish between different objects and not to describe a particular order of the objects, e.g., a first node and a second node, etc. are used to distinguish between different nodes and not a particular order for the nodes.
Furthermore, the terms "including" and "having," and any variations thereof, as referred to in the description of the present application, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements but may alternatively include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that, in the embodiments of the present invention, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "e.g.," an embodiment of the present invention is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
The term "and/or" as used herein includes the use of either or both of the two methods.
In the description of the present application, the meaning of "a plurality" means two or more unless otherwise specified.
Some concepts related to a transaction data processing method and apparatus provided by the embodiments of the present invention are explained below.
The MEC, mobile edge computing, is an open platform constructed by integrating the mobile network technology and the internet technology and adding the functions of computing, storing, data processing and the like on the mobile network side. The deployment of the MEC node can present the characteristics of low time delay, high bandwidth and the like of service data transmission, and can also provide more accurate position information service for users. In the embodiment of the invention, the time delay of the first node for acquiring the transaction data corresponding to the first block chain (namely the block chain corresponding to the target MEC node) can be reduced through the target MEC node determined by the network control equipment.
Based on the problems existing in the background art, embodiments of the present invention provide a method and an apparatus for processing transaction data, where a first node sends a transaction request message and state information of the first node to a network control device, where the transaction request message includes an account address of a second node (i.e., a transaction receiver device corresponding to a target transaction) and transaction data corresponding to the target transaction, and the state information of the first node includes location information of the first node, a block height of the transaction data stored in the first node, and a timestamp of the transaction data stored in the first node; after the network control device receives the transaction request message of the first node and the status information of the first node, it may determine a target MEC node (i.e., a node with the shortest communication distance to the first node) according to the location information of the first node, and determine whether the transaction data stored in the first node is the same as the transaction data corresponding to the first block chain (i.e., the block chain corresponding to the target MEC node) according to the block height of the transaction data stored in the first node and the timestamp of the transaction data stored in the first node. Then, when the transaction data stored in the first node is different from the transaction data corresponding to the first blockchain, the network control device sends a first data synchronization indication message to the first node, where the first data is the same as the indication message and is used for indicating the first node to acquire the transaction data corresponding to the first blockchain from the target MEC node.
The first node may send a first data synchronization indication message to the target MEC node after receiving the first data synchronization indication message sent by the network control device, and then receive a first data synchronization response message sent by the target MEC node, where the first data synchronization response message includes transaction data corresponding to the first blockchain. In this way, the first node may obtain the transaction data corresponding to the first blockchain. In this embodiment of the present invention, the network control device may determine, based on the location information of the first node, a target MEC node that may provide the first node with the transaction data corresponding to the first blockchain. Furthermore, under the condition that the first node update data is not timely or does not belong to the first block chain, the first node is instructed to acquire the transaction data corresponding to the first block chain from the target MEC node, so that the time delay of acquiring the transaction data corresponding to the first block chain by the first node can be reduced, and the processing efficiency of the transaction data is improved.
The transaction data processing method and apparatus provided in the embodiment of the present invention may be applied to a wireless communication system, taking the wireless communication system as a 5G communication system as an example, as shown in fig. 1, the 5G communication system includes a node 101, a network control device 102, a block chain 103, an overlapping data storage system 104, and a block chain 105, where the block chain 103 includes a node 1031 and a node 1032, the overlapping data storage system 104 includes an overlapping node 1041, and the block chain 105 includes a node 1051 and a node 1052. In general, in practical applications, the connections between the above-mentioned devices or service functions may be wireless connections, and fig. 1 illustrates the connections between the devices by solid lines for convenience of intuitively representing the connections between the devices.
Among them, a plurality of nodes (including the node 101, the node 1031, the node 1032, the node 1051, and the node 1052) illustrated in fig. 1 may serve as a transaction sender device or a transaction receiver device. For example, when node 101 needs to initiate a transaction to node 1031, node 101 may send a transaction request message to control device 102, and in a case that control device 102 determines that node 101 is a node in blockchain 103, node 101 may perform data interaction with node 1031, for example, node 101 may send transaction data to node 1031, that is, two nodes of the same blockchain may implement data interworking.
Network control device 102 may obtain status information for node 101 and data status information for each of blockchain 103 and blockchain 105 and determine whether node 101 is a node in blockchain 103 or blockchain 105. In this embodiment of the present invention, the network control device 102 may determine whether the transaction data stored by the node 101 is the same as the transaction data corresponding to the blockchain 103 (or the transaction data corresponding to the blockchain 105) according to the state information of the node 101 (specifically, the block height and the timestamp of the transaction data stored by the node 101).
Transaction data corresponding to the blockchain 103 and transaction data corresponding to the blockchain 105 are stored in a plurality of nodes (including the node 1031 and the node 1032) in the blockchain 103 and a plurality of nodes (including the node 1051 and the node 1052) in the blockchain 105, respectively. It should be understood that different nodes on the same blockchain store the same transaction data.
The overlapping data storage system 104 (specifically, the overlapping node 1041) stores transaction data corresponding to the blockchain 103 and transaction data corresponding to the blockchain 105. In this embodiment of the present invention, in a case that the network control device 102 determines that the node 101 is one node in the blockchain 103, but the transaction receiver device (assuming that the transaction receiver device is the node 1051) is one node in the blockchain 105, the network control device 102 may instruct the node 101 to obtain transaction data corresponding to the blockchain 105 from the overlapped node 1041.
Optionally, the 5G communication system may include a plurality of block chains, one block chain may include one or more nodes, and may further include one or more network control devices and one or more overlay data storage systems (or overlay nodes). The embodiment of the present invention does not limit the number of each device in the 5G communication system.
For convenience of example, in the following embodiments, the node 101 in fig. 1 described above is collectively referred to as a first node.
Fig. 2 is a schematic diagram of a hardware structure of a network control device according to an embodiment of the present invention. As shown in fig. 2, the network control device 20 includes a processor 201, a memory 202, a network interface 203, and the like.
The processor 201 is a core component of the network control device 20, and the processor 201 is configured to run an operating system of the network control device 20 and application programs (including a system application program and a third-party application program) on the network control device 20, so as to implement a method for processing transaction data by the network control device 20.
In this embodiment, the processor 201 may be a Central Processing Unit (CPU), a microprocessor, a Digital Signal Processor (DSP), an application-specific integrated circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof, which is capable of implementing or executing various exemplary logic blocks, modules, and circuits described in connection with the disclosure of the embodiment of the present invention; a processor may also be a combination of computing functions, e.g., comprising one or more microprocessors, a DSP and a microprocessor, or the like.
Alternatively, the processor 201 of the network control device 20 includes one or more CPUs, which are single-core CPUs (single-CPUs) or multi-core CPUs (multi-CPUs).
The memory 202 includes, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical memory, or the like. The memory 202 holds the code for the operating system.
Optionally, the processor 201 implements the transaction data processing method in the embodiment of the present invention by reading the instruction stored in the memory 202, or the processor 201 implements the transaction data processing method provided in the embodiment of the present invention by using an instruction stored inside. In the case where the processor 201 implements the processing method of the transaction data provided by the embodiment of the present invention by reading the memory, the memory stores therein an instruction for implementing the processing method of the transaction data provided by the embodiment of the present invention.
The network interface 203 is a wired interface, such as a Fiber Distributed Data Interface (FDDI) interface or a Gigabit Ethernet (GE) interface. Alternatively, the network interface 203 is a wireless interface. The network interface 203 is used for the network control device 20 to communicate with other devices.
The memory 202 is configured to store data status information of each of a plurality of blockchains, where the data status information of one blockchain includes a blockheight of transaction data corresponding to the blockchain and a timestamp of the transaction data. Optionally, the memory 202 is further configured to store a correspondence between an account address of the node and identification information of the blockchain, and the like. The at least one processor 201 further executes the method described in the embodiment of the present invention according to the data state information of each of the plurality of block chains stored in the memory 202 and the correspondence between the account address of the node and the identification information of the block chain. For more details of the above functions implemented by the processor 201, reference is made to the following description of various method embodiments.
Optionally, the network control device 20 further includes a bus, and the processor 201 and the memory 202 are connected to each other through the bus 204, or are connected to each other in other manners.
Optionally, the network control device 20 further comprises an input/output interface 205, and the input/output interface 205 is configured to connect with an input device and receive a transaction request message input by a user through the input device. Input devices include, but are not limited to, a keyboard, a touch screen, a microphone, and the like. The input/output interface 205 is further configured to connect with an output device, and output a processing result of the transaction data of the processor 201 (i.e., instruct the first node to obtain the transaction data corresponding to the first blockchain from the target MEC node). Output devices include, but are not limited to, a display, a printer, and the like.
It should be understood that, in the embodiment of the present invention, the hardware structure of the first node is similar to the hardware structure of the network control device shown in fig. 2, and the description of the hardware structure of the first node may refer to the description of the hardware structure of the network control device, and is not described in detail here.
The transaction data processing method provided by the embodiment of the invention is applied to an application scene that target transaction exists between a certain transaction sender device (such as a first node) and a transaction receiver device (a second node). When a first node needs to send a transaction request to a second node, the first node needs to first send a transaction request message and state information of the first node to a network control device, and the network control device determines whether the first node is a node on a first blockchain and whether the first node and the second node are on the same blockchain.
With reference to the communication system shown in fig. 1, the following fully describes the transaction data processing method provided in the embodiment of the present invention from the perspective of interaction among devices in the communication system, so as to describe a process in which the first node acquires transaction data corresponding to the first blockchain from the target MEC node (i.e., a first node uplink), and a process in which the first node stores the transaction data corresponding to the target transaction in its cache.
As shown in fig. 3, the method for processing transaction data according to the embodiment of the present invention may include S101 to S114.
S101, the first node sends a transaction request message and state information of the first node to the network control equipment.
The transaction request message comprises an account address of a second node and transaction data corresponding to the target transaction, and the second node is transaction receiver equipment corresponding to the target transaction. The state information of the first node includes location information of the first node, a block height of the transaction data stored by the first node, and a timestamp of the transaction data stored by the first node.
It should be appreciated that when a first node needs to initiate a target transaction to a second node (e.g., the first node needs to forward a bitcoin to the second node), a transaction request message and status information of the first node need to be sent to a network control device, and the network control device first determines the current status of the first node (i.e., whether it is a node on a blockchain). The account address of the second node is used to determine identification information of a block chain (hereinafter referred to as a second block chain) corresponding to the second node, and a plurality of nodes on the second block chain may perform transaction verification on transaction data corresponding to the target transaction to determine whether to store the transaction data in respective caches of the plurality of nodes on the second block chain; the position information of the first node is used for determining a target MEC node with the shortest communication distance with the first node, and the first node can further acquire transaction data corresponding to the first block chain from the target MEC node; the block height of the transaction data stored by the first node and the timestamp of the transaction data stored by the first node are used to determine whether the transaction data stored by the first node is the same as the transaction data corresponding to the block chain (hereinafter referred to as the first block chain) corresponding to the target MEC.
S102, the network control equipment receives the transaction request message of the first node and the state information of the first node.
In connection with the above description of the embodiments, it should be understood that the transaction request message of the first node includes the account address of the second node (i.e. the receiver device corresponding to the target transaction) and the transaction data corresponding to the target transaction, and the state information of the first node includes the location information of the first node, the block height of the transaction data stored by the first node, and the timestamp of the transaction data stored by the first node.
Specifically, the location information may be a longitude and latitude of the first node, or an Internet Protocol (IP) address of the first node. The block height of the transaction data stored by the first node may be understood as the number of blocks corresponding to the transaction data stored by the first node, and for example, assuming that 10 transactions of transaction data are included in 1 block, and assuming that the block height of the transaction data stored by the first node is 5 (i.e. the number of blocks corresponding to the transaction data is 5), it may be determined that the first node stores at least 41 transactions of transaction data. The time stamp of the transaction data stored by the first node is the time stamp of the transaction data of the latest transaction stored by the first node.
S103, the network control equipment determines a target MEC node with the shortest communication distance with the first node according to the position information of the first node.
It will be appreciated that in a network there are a plurality of nodes, each of which may provide transaction data for a first node. In this embodiment of the present invention, the network control device determines, from the plurality of nodes, the node having the shortest communication distance to the first node, that is, the target MEC, based on the location information of the first node. The target MEC node is a node on the first blockchain, the node uses the MEC server as infrastructure, and the target MEC node stores transaction data corresponding to the first blockchain. The network control device determines the target MEC node based on the location information of the first node so that the network control device can determine whether the first node is a node on the first blockchain.
S104, the network control equipment determines whether the transaction data stored in the first node is the same as the transaction data corresponding to the first blockchain or not according to the block height of the transaction data stored in the first node and the timestamp of the transaction data stored in the first node.
And the first block chain is a block chain corresponding to the target MEC node.
It should be understood that the target MEC node is a node on the first blockchain, and the transaction data stored in the target MEC node is the transaction data corresponding to the first blockchain. Since the network control device stores (or can acquire) data status information of each of the plurality of blockchains (the data status information of one blockchain includes a blockheight and a timestamp of the transaction data corresponding to the blockchain), the process of the network control device determining whether the transaction data stored by the first node is the same as the transaction data corresponding to the first blockchain may include steps 1 to 3.
Step 1, the network control equipment determines whether the block height of the transaction data stored in the first node is the same as the block height of the transaction data corresponding to the first blockchain.
And 2, the network control equipment determines whether the timestamp of the transaction data stored by the first node is the same as the timestamp of the transaction data corresponding to the first blockchain.
And 3, under the condition that the block height of the transaction data stored in the first node is the same as the block height of the transaction data corresponding to the first blockchain, and the timestamp of the transaction data stored in the first node is the same as the timestamp of the transaction data corresponding to the first blockchain, the network control equipment determines that the transaction data stored in the first node is the same as the transaction data corresponding to the first blockchain. Otherwise, the network control equipment determines that the transaction data stored by the first node is different from the transaction data corresponding to the first blockchain.
For example, assuming that the block height of the transaction data stored in the first node is 4, the timestamp of the transaction data stored in the first node is 08:00, 7/10/2020; the block height of the transaction data corresponding to the first block chain is 5, and the timestamp of the transaction data corresponding to the first block chain is 08:01, 7/10/2020. The network control equipment determines that the transaction data stored by the first node is different from the transaction data corresponding to the first blockchain.
It will be appreciated that all nodes on the same blockchain should store the same transaction data when operating normally. In the case that the network control device determines that the transaction data stored by the first node is the same as the transaction data corresponding to the first blockchain (specifically, the transaction data stored by the node on the first blockchain), it indicates that the first node is a node on the first blockchain. When the network control device determines that the transaction data stored in the first node is different from the transaction data corresponding to the first blockchain, it indicates that the first node is not a node on the first blockchain, and at this time, it needs to instruct the first node to join the first blockchain, that is, instruct the first node to obtain the transaction data corresponding to the first blockchain.
It should be noted that, when a certain node (e.g., the first node) exits a certain blockchain (e.g., the first blockchain) after completing the last transaction, or the first node fails to complete real-time updating of transaction data corresponding to the first blockchain due to network and server performance, etc., the network control device may determine that the first node is not really a node on the first blockchain (it may be understood that the first node is not uplink), and further, need to instruct the first node to complete the uplink (i.e., join the first blockchain) process.
And S105, under the condition that the transaction data stored in the first node is different from the transaction data corresponding to the first blockchain, the network control equipment sends a first data synchronization indication message to the first node.
The first data synchronization indication message is used for indicating the first node to acquire transaction data corresponding to the first blockchain from the target MEC node.
In another implementation, in a case that the transaction data stored by the first node is not the same as the transaction data corresponding to the first blockchain, the network control device may further instruct the target MEC node to send the transaction data corresponding to the first blockchain to the first node.
S106, the first node receives a first data synchronization indication message of the network control equipment.
With reference to the description of the above embodiments, it should be understood that the target MEC node is determined by the network control device according to the location information of the first node, and the first block chain is a block chain corresponding to the target MEC node (the target MEC node is a node on the first block chain).
S107, the first node sends a first data synchronization request message to the target MEC node.
Specifically, the first data synchronization request message is used to request to acquire transaction data corresponding to the first blockchain.
S108, the target MEC node receives a first data synchronization request message of the first node.
S109, the target MEC node sends a first data synchronization response message to the first node.
The first data synchronization response message includes transaction data corresponding to the first blockchain.
S110, the first node receives a first data synchronization response message of the target MEC node.
Therefore, the first node may acquire the transaction data corresponding to the first blockchain, that is, the transaction data stored by the first node and the transaction data corresponding to the first blockchain are kept synchronous, and the first node may serve as a node on the first blockchain, that is, the first node completes the uplink process.
It should be noted that, after S104, in a case that the transaction data stored by the first node is the same as the transaction data corresponding to the first blockchain, the network control device may determine that the first node is a node on the first blockchain, that is, the first node does not need to complete the synchronization process of the transaction data in S105 to S110.
In the method for processing transaction data provided by the embodiment of the present invention, a first node sends a transaction request message and state information of the first node to a network control device, where the transaction request message includes an account address of a second node (i.e., a transaction receiver device corresponding to a target transaction) and transaction data corresponding to the target transaction, and the state information of the first node includes location information of the first node, a block height of the transaction data stored in the first node, and a timestamp of the transaction data stored in the first node; after the network control device receives the transaction request message of the first node and the status information of the first node, it may determine a target MEC node (i.e., a node with the shortest communication distance to the first node) according to the location information of the first node, and determine whether the transaction data stored in the first node is the same as the transaction data corresponding to the first block chain (i.e., the block chain corresponding to the target MEC node) according to the block height of the transaction data stored in the first node and the timestamp of the transaction data stored in the first node. Then, when the transaction data stored in the first node is different from the transaction data corresponding to the first blockchain, the network control device sends a first data synchronization indication message to the first node, where the first data is the same as the indication message and is used for indicating the first node to acquire the transaction data corresponding to the first blockchain from the target MEC node.
The first node may send a first data synchronization indication message to the target MEC node after receiving the first data synchronization indication message sent by the network control device, and then receive a first data synchronization response message sent by the target MEC node, where the first data synchronization response message includes transaction data corresponding to the first blockchain. In this way, the first node may obtain the transaction data corresponding to the first blockchain. In this embodiment of the present invention, the network control device may determine, based on the location information of the first node, a target MEC node that may provide the first node with the transaction data corresponding to the first blockchain. Furthermore, under the condition that the first node update data is not timely or does not belong to the first block chain, the first node is instructed to acquire the transaction data corresponding to the first block chain from the target MEC node, so that the time delay of acquiring the transaction data corresponding to the first block chain by the first node can be reduced, and the processing efficiency of the transaction data is improved.
And S111, the network control equipment determines the identification information of the second block chain according to the account address of the second node.
The second block chain is a block chain corresponding to the second node, that is, the second node is a node on the second block chain.
In connection with the above description of the embodiments, it should be understood that, after receiving the transaction request message and the status information of the first node from the first node, the network control device first determines whether the first node is a node on the first blockchain based on the status information of the first node. After the network control device determines that the first node is a node on the blockchain, or after the first node acquires (or synchronizes) the transaction data corresponding to the first blockchain from the target MEC node, the network control device performs S111 again.
It is to be understood that the network control device may store in advance a correspondence relationship between the account address of the node and the identification information of the blockchain, and the network control device may determine the identification information of the second blockchain corresponding to the account address of the second node from the correspondence relationship.
Specifically, all nodes in the network may be divided into different blockchain fragments, where one blockchain fragment corresponds to one fragment identifier, and the fragment identifier is identification information of the blockchain.
Illustratively, table 1 below is an example of a correspondence relationship between an account address of a node and identification information of a block chain. The account address 1 and the account address 2 correspond to the identifier 1 together, which indicates that the node corresponding to the account address 1 and the node corresponding to the account address 2 are both a node on the block chain corresponding to the identifier 1 (that is, the node corresponding to the account address 1 and the node corresponding to the account address 2 belong to the same block chain), and similarly, the nodes corresponding to the account address 4, the account address 5 and the account address 6 are all a node on the block chain corresponding to the identifier 3.
TABLE 1
Account address Identification information
Account Address 1 Identification 1
Account Address 2 Identification 1
Account Address 3 Identification 2
Account address 4 Identification 3
Account Address 5 Identification 3
Account Address 6 Identification 3
Assuming that the account address of the second node is account address 1, from table 1, the network control device determines that the identification information of the second blockchain is identification 1.
S112, the network control device determines whether the identification information of the second blockchain is the same as the identification information of the first blockchain.
It should be understood that the network control device may store the identification information of the first block chain in advance, and may also obtain the identification information of the first block chain. In the embodiment of the present invention, it may be determined whether the second node and the first node are in the same block chain by determining whether the identification information of the second block chain is the same as the identification information of the first block chain. In the case where the network control device determines that the second node is in the same blockchain as the first node, the network control device may instruct the first node to begin the verification process for the target transaction.
S113, under the condition that the identification information of the second blockchain is the same as the identification information of the first blockchain, the network control device sends a first transaction verification indication message to the first node.
The transaction verification indication message is used for indicating the first node to send the transaction data corresponding to the target transaction to a plurality of nodes on the first blockchain.
It should be understood that the identification information of the second blockchain is the same as the identification information of the first blockchain, which means that the second blockchain is the same blockchain as the first blockchain, that is, the second node and the first node are in the same blockchain, so that the network control device may instruct the first node to send transaction data corresponding to the target transaction to a plurality of nodes on the first blockchain (or the second blockchain, which is the first blockchain) to verify the target transaction.
Optionally, the plurality of nodes on the first blockchain may be a plurality of full nodes on the first blockchain, where a full node is used to store all contents of the transaction data corresponding to the first blockchain; and the first blockchain may further include at least one lightweight node, where the at least one lightweight node is configured to store a part of content of the transaction data corresponding to the first blockchain, and when the at least one lightweight node needs to store the entire content of the transaction data corresponding to the first blockchain, the at least one lightweight node may be obtained from all nodes adjacent to the lightweight node.
S114, the first node receives a first transaction verification indication message of the network control equipment.
In this embodiment of the present invention, after S114, the first node may send target data corresponding to the target transaction to a plurality of nodes on the first blockchain to complete a verification process of the target transaction, and further determine whether to store transaction data corresponding to the target transaction in the first blockchain (specifically, in the plurality of nodes of the first blockchain). The process specifically comprises the following steps: step A-step B.
And step A, the first node respectively sends a first verification request message to a plurality of nodes on the first block chain.
The first verification request message is used for verifying the identity of the first node and the transaction data corresponding to the target transaction.
Specifically, the first node may perform operations such as encryption, signature, timestamp addition and the like on transaction data corresponding to a target transaction in a private key manner to form a target data block, and store the target data block in a cache of the first node; the target data block is then broadcast to a plurality of nodes on the first blockchain.
And step B, the first node receives a first verification return message of each of the plurality of nodes on the first block chain.
And the first verification return message comprises a verification result of one node in the first block chain on the target transaction, wherein the verification result is verification success or verification failure.
It should be appreciated that a plurality of nodes on the first blockchain begin to authenticate the target transaction after receiving the first authentication request message described above, respectively. The verification result of each of the plurality of nodes may be different, so that after the first node receives the first verification return message of each of the plurality of nodes, that is, after receiving the verification result of each of the plurality of nodes, the first node needs to agree with the plurality of nodes in the first blockchain, that is, determine whether to bill the target data block according to the verification result of each of the plurality of nodes, and it should be understood that billing is to store the target data block in the caches of the first node and the plurality of nodes. If the first node and the plurality of nodes jointly determine that the target data block needs to be booked, the first node and the plurality of nodes store the target data block (namely, the target data corresponding to the target transaction) in their respective caches, otherwise, the target data block is discarded.
In the embodiment of the present invention, when the network control device determines that the identification information of the second blockchain is the same as the identification information of the first blockchain, the network control device may send a first transaction verification indication message to the first node, instruct the first node to start a verification process of the target transaction, and further, after the first node receives a first verification return message of each of the plurality of nodes on the first blockchain, the first node and the plurality of nodes on the first blockchain together determine whether to store the target data corresponding to the target transaction in their respective caches, because the network control device determines that the identification information of the second blockchain is the same as the identification information of the first blockchain, the network control device determines that the second blockchain is the first blockchain, and the first node does not need to repeatedly acquire the transaction data of the second blockchain from the second blockchain, and further, the processing efficiency of the transaction data can be improved.
As shown in fig. 4, in one implementation, the transaction data processing method provided by the embodiment of the present invention includes S201 to S218.
S201, the first node sends a transaction request message and the state information of the first node to the network control equipment.
S202, the network control equipment receives the transaction request message of the first node and the state information of the first node.
S203, the network control equipment determines a target MEC node with the shortest communication distance with the first node according to the position information of the first node.
S204, the network control equipment determines whether the transaction data stored in the first node is the same as the transaction data corresponding to the first blockchain or not according to the block height of the transaction data stored in the first node and the timestamp of the transaction data stored in the first node.
S205, under the condition that the transaction data stored in the first node is different from the transaction data corresponding to the first blockchain, the network control device sends a first data synchronization indication message to the first node.
S206, the first node receives a first data synchronization indication message of the network control equipment.
S207, the first node sends a first data synchronization request message to the target MEC node.
S208, the target MEC node receives a first data synchronization request message of the first node.
S209, the target MEC node sends a first data synchronization response message to the first node.
S210, the first node receives a first data synchronization response message of the target MEC node.
S211, the network control device determines the identification information of the second block chain according to the account address of the second node.
S212, the network control device determines whether the identification information of the second blockchain is the same as the identification information of the first blockchain.
It should be understood that the explanation of S201-S212 can refer to the description of S101-S112 above, and the description is omitted here.
S213, under the condition that the identification information of the second block chain is different from the identification information of the first block chain, the network control device sends an overlapping data acquisition indication message to the first node.
The overlapped data indication message is used for indicating the first node to acquire the transaction data corresponding to the second blockchain from the overlapped node, and the overlapped node is used for storing the transaction data corresponding to the first blockchain and the transaction data corresponding to the second blockchain.
It should be understood that data does not intercommunicate between different block chains. For example, if the identification information of the first blockchain is different from the identification information of the second blockchain, it is indicated that the first blockchain and the second blockchain are not the same blockchain, and the node on the first blockchain cannot directly perform data interaction with the node on the second blockchain, for example, the node on the first blockchain cannot directly obtain the transaction data corresponding to the second blockchain, and similarly, the node on the second blockchain cannot directly obtain the transaction data corresponding to the first blockchain. At this time, the network control device may instruct the first node to acquire transaction data corresponding to the second blockchain from the overlapping node. The overlapping node may be understood as a database storing transaction data corresponding to the first blockchain and transaction data corresponding to the second blockchain, from which the first node may obtain the transaction data corresponding to the second blockchain.
S214, the first node receives the overlapped data acquisition indication message of the network control equipment.
S215, the first node sends an overlapping data request message to the overlapping node.
The overlapped data request message is used for requesting to acquire the transaction data corresponding to the second blockchain.
S216, the overlapping node receives the overlapping data request message of the first node.
S217, the overlapping node sends an overlapping data response message to the first node.
Specifically, the overlapped data response message includes transaction data corresponding to the second blockchain.
S218, the first node receives the overlapping data response message of the overlapping node.
At this point, the first node acquires the transaction data corresponding to the second blockchain from the overlapping node.
It should be understood that although the first node is a node on the first blockchain and the second blockchain are not the same blockchain, the first node obtains the logical identity of the node on the second blockchain by obtaining the transaction data corresponding to the second blockchain from the overlapping node. That is, at this time, although the first node still belongs to the first blockchain, the first node may perform data interaction with the node on the second blockchain (because the first node already has transaction data corresponding to blockchain 2). For example, the first node may send target data corresponding to the target transaction to a plurality of nodes on the second blockchain to complete a verification process of the target transaction, and further determine whether to store transaction data corresponding to the target transaction in the second blockchain (specifically, in a node of the second blockchain). The process specifically comprises the following steps: step C-step D.
And step C, the first node sends second verification request messages to a plurality of nodes on the second block chain respectively.
The second verification request message is used for verifying the identity of the first node and the transaction data corresponding to the target transaction.
And step D, the first node receives a second verification return message of each of the plurality of nodes on the second block chain.
And the second verification return message comprises a verification result of a node on the second block chain to the target transaction, wherein the verification result is verification success or verification failure.
It should be understood that the process of steps C-D is the same or similar to the process of steps A-B, and will not be described herein.
In this embodiment of the present invention, when the network control device determines that the identification information of the second blockchain is not the same as the identification information of the first blockchain, the network control device may send an overlapping data acquisition instruction message to the first node, and instruct the first node to acquire, from the overlapping node, the transaction data corresponding to the second blockchain. Thus, the first node does not need to uplink to the second blockchain after downlink from the first blockchain. Furthermore, after the first node acquires the transaction data corresponding to the second blockchain from the overlapping node, because the first node has the same transaction data as the transaction data corresponding to the second blockchain at this time (i.e., the node 2 does not need to add the second blockchain, and has already had the logical identity of a node on the second blockchain), the first node can determine whether to store the target data corresponding to the target transaction in its respective cache together with the nodes on the second blockchain, thereby solving the problem of data non-intercommunication between different blockchains, enabling the first node to directly perform data interaction with the second blockchain (specifically, the nodes on the second blockchain), and improving the processing practicability of the transaction data.
In one implementation, after S212, the method for processing transaction data provided by the embodiment of the present invention further includes S301-S306.
S301, under the condition that the identification information of the second block chain is different from the identification information of the first block chain, the network control equipment sends a second data synchronization indication message to the first node.
The second data synchronization indication message is used for indicating the first node to acquire the transaction data corresponding to the second blockchain from a target node, wherein the target node is one of a plurality of nodes on the second blockchain.
In conjunction with the description of the above embodiments, it should be understood that the identification information of the second blockchain is different from the identification information of the first blockchain, which indicates that the second blockchain is a different blockchain from the first blockchain (i.e., the second node and the first node belong to different blockchains). Because the nodes on different blockchains cannot perform data interaction, the network control device can instruct the first node to join the second blockchain, that is, instruct the first node to acquire the transaction data corresponding to the second blockchain. Moreover, the first node may obtain the transaction data corresponding to the second blockchain from any one of the plurality of nodes on the second blockchain, that is, any one of the plurality of nodes on the second blockchain may be a target node in the embodiment of the present invention.
S302, the first node receives a second data synchronization indication message of the network control equipment.
The second data synchronization indication message is used to instruct the first node to acquire the transaction data corresponding to the second blockchain from a target node, where the target node is one of the nodes on the second blockchain.
S303, the first node sends a second data synchronization request message to the target node.
The second data synchronization request message is used for requesting to acquire transaction data corresponding to the second blockchain.
S304, the target node receives a second data synchronization request message of the first node.
S305, the target node sends a second data synchronization response message to the first node.
The second data synchronization response message includes transaction data corresponding to the second blockchain.
S306, the first node receives a second data synchronization response message of the target node.
It should be understood that the process of the first node obtaining the transaction data corresponding to the second blockchain from the target node (i.e., S303-S306) is the same as or similar to the process of the first node obtaining the transaction data corresponding to the first blockchain from the target MEC node (i.e., S107-S110), and the explanation of S303-S306 may refer to the description in S107-S110, which is not repeated herein.
In this way, the first node may acquire the transaction data corresponding to the second blockchain, that is, the transaction data stored by the first node and the transaction data corresponding to the second blockchain are kept synchronous, and the first node becomes a node on the second blockchain, that is, the first node completes the process from the first blockchain to the second blockchain.
Further, the first node may send target data corresponding to the target transaction to a plurality of nodes on the second blockchain to complete a verification process of the target transaction, and further determine whether to store transaction data corresponding to the target transaction in the second blockchain (specifically, in a node of the second blockchain). The specific process is the same as the above step C-step D, and is not described herein again.
In this embodiment of the present invention, when the network control device determines that the identification information of the second blockchain is not the same as the identification information of the first blockchain, the network control device may send a second data synchronization indication message to the first node, and instruct the first node to obtain, from a target node (that is, any node of a plurality of nodes on the second blockchain), transaction data corresponding to the second blockchain. That is, the first node is instructed to uplink onto the second blockchain after downlink from the first blockchain, so that the first node becomes a node on the second blockchain, and thus data interaction with other nodes on the blockchain (i.e., nodes on the second blockchain) can be completed. Furthermore, the first node can complete the verification process of the target transaction through a plurality of nodes on the second block chain together, and the problem of data non-intercommunication between different block chains is solved.
In one implementation, in a case that the identification information of the second blockchain is not the same as the identification information of the first blockchain, the network control device may further determine whether to send the second data synchronization request message to the first node according to a number of transactions between the first node and at least one node on the second blockchain within a preset time.
Specifically, the network control device may obtain the transaction number of the first node with at least one node (the at least one node includes the second node) on the second blockchain within a preset time.
If the transaction number is greater than or equal to the transaction number threshold, it indicates that the transaction between the first node and at least one node on the second blockchain is a high frequency event, and thus, the first node may be instructed to join the second blockchain, i.e., become a node on the second blockchain. Further, the network control device determines to transmit a second data synchronization request message to the first node.
If the transaction count is less than the transaction count threshold, indicating that the transaction between the first node and at least one node on the second blockchain is a low frequency event, the first node may be more suitable as a node on the first blockchain. In this way, the network control device determines to send the above-mentioned overlapping data acquisition instruction message to the first node.
In the embodiment of the present invention, the first node, the network control device, and the like may be divided into functional modules according to the above method example, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. It should be noted that, the division of the modules in the embodiment of the present invention is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
In the case of dividing the functional modules by corresponding functions, fig. 5 shows a possible structural diagram of the first node involved in the foregoing embodiment, and as shown in fig. 5, the first node 30 may include: a sending module 301 and a receiving module 302.
A sending module 301, configured to send a transaction request message and state information of a first node to a network control device, where the transaction request message includes an account address of a second node and transaction data corresponding to a target transaction, the second node is a receiver device corresponding to the target transaction, and the state information of the first node includes location information of the first node, a block height of the transaction data stored in the first node, and a timestamp of the transaction data stored in the first node.
A receiving module 302, configured to receive a first data synchronization indication message of the network control device, where the first data synchronization indication message is used to indicate the first node to obtain transaction data corresponding to a first block chain from a target MEC node, where the target MEC node is determined by the network control device according to the location information of the first node, and the first block chain is a block chain corresponding to the target MEC node.
The sending module 301 is further configured to send a first data synchronization request message to the target MEC node, where the first data synchronization request message is used to request to acquire transaction data corresponding to the first blockchain.
The receiving module 302 is further configured to receive a first data synchronization response message of the target MEC node, where the first data synchronization response message includes transaction data corresponding to the first blockchain.
In case of integrated units, fig. 6 shows a possible structural schematic of the first node involved in the above embodiments. As shown in fig. 6, the first node 40 may include: a processing module 401 and a communication module 402. The processing module 401 may be used to control and manage the actions of the first node 40. The communication module 402 may be configured to support the first node 40 to communicate with other entities, for example, the communication module 402 may be configured to support the first node 40 to perform S101, S106, S107, S110, S114, and the like in the above method embodiments. Optionally, as shown in fig. 6, the first node 40 may further include a storage module 403 for storing program codes and data of the first node 40.
The processing module 401 may be a processor or a controller (for example, the processor 201 shown in fig. 2). The communication module 402 may be a transceiver, a transceiver circuit, a communication interface, etc. (e.g., may be the network interface 203 as shown in fig. 2 described above). The storage module 403 may be a memory (e.g., may be the memory 202 described above and shown in fig. 2).
When the processing module 401 is a processor, the communication module 402 is a transceiver, and the storage module 403 is a memory, the processor, the transceiver, and the memory may be connected by a bus. The bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc.
In the case of dividing each functional module by corresponding functions, fig. 7 shows a schematic diagram of a possible structure of the network control device according to the foregoing embodiment, and as shown in fig. 7, the network control device 50 may include: a receiving module 501, a determining module 502 and a sending module 503.
A receiving module 501, configured to receive a transaction request message of a first node and state information of the first node, where the transaction request message includes an account address of a second node and transaction data corresponding to a target transaction, the second node is a receiver device corresponding to the target transaction, and the state information of the first node includes location information of the first node, a block height of the transaction data stored in the first node, and a timestamp of the transaction data stored in the first node.
A determining module 502, configured to determine, according to the location information of the first node, a target MEC node with a shortest communication distance to the first node; and determining whether the transaction data stored by the first node is the same as the transaction data corresponding to the first blockchain according to the block height of the transaction data stored by the first node and the timestamp of the transaction data stored by the first node, wherein the first blockchain is the blockchain corresponding to the target MEC node.
A sending module 503, configured to send a first data synchronization indication message to the first node when the transaction data stored in the first node is different from the transaction data corresponding to the first blockchain, where the first data synchronization indication message is used to indicate that the first node acquires the transaction data corresponding to the first blockchain from the target MEC node.
Optionally, the determining module 502 is further configured to determine, according to the account address of the second node, identification information of a second blockchain, where the second blockchain is a blockchain corresponding to the second node; and determining whether the identification information of the second blockchain is the same as the identification information of the first blockchain.
Optionally, the sending module 503 is further configured to send a first transaction verification indication message to the first node when the identification information of the second blockchain is the same as the identification information of the first blockchain, where the first transaction verification indication message is used to indicate the first node to send the transaction data corresponding to the target transaction to multiple nodes in the first blockchain.
Optionally, the sending module 503 is further configured to send a second data synchronization indication message to the first node when the identification information of the second blockchain is different from the identification information of the first blockchain, where the second data synchronization indication message is used to indicate that the first node acquires the transaction data corresponding to the second blockchain from a target node, and the target node is a node in the second blockchain.
Optionally, the sending module 503 is further configured to send, to the first node, an overlapping data obtaining indication message when the identification information of the second blockchain is different from the identification information of the first blockchain, where the overlapping data indication message is used to indicate the first node to obtain the transaction data corresponding to the second blockchain from an overlapping node, and the overlapping node is used to store the transaction data corresponding to the first blockchain and the transaction data corresponding to the second blockchain.
In the case of an integrated unit, fig. 8 shows a possible structural diagram of the network control device 60 involved in the above-described embodiment. As shown in fig. 8, the network control device 60 may include: a processing module 601 and a communication module 602. The processing module 601 may be configured to control and manage the actions of the network control device 60, for example, the processing module 601 may be configured to support the network control device 60 to execute S103, S104, S111, S112, and the like in the above method embodiments. The communication module 602 may be configured to support the network control device 60 to communicate with other entities, for example, the communication module 602 may be configured to support the network control device 60 to perform S102, S105, S113, and the like in the above-described method embodiments. Optionally, as shown in fig. 8, the network control device 60 may further include a storage module 603 for storing program codes and data of the network control device 60.
The processing module 601 may be a processor or a controller (e.g., the processor 201 shown in fig. 2). The communication module 602 may be a transceiver, a transceiver circuit, a communication interface, etc. (e.g., may be the network interface 203 as shown in fig. 2 described above). The storage module 603 may be a memory (e.g., may be the memory 202 described above in fig. 2).
When the processing module 601 is a processor, the communication module 602 is a transceiver, and the storage module 603 is a memory, the processor, the transceiver, and the memory may be connected via a bus. The bus may be a PCI bus or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc.
It should be understood that, in various embodiments of the present invention, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented using a software program, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The procedures or functions described in accordance with the embodiments of the invention are all or partially effected when the computer program instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website, computer, server, or data center to another website, computer, server, or data center via wire (e.g., coaxial cable, fiber optics, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or can comprise one or more data storage devices, such as a server, a data center, etc., that can be integrated with the medium. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (12)

1. A method of processing transaction data, comprising:
a first node sends a transaction request message and state information of the first node to a network control device, wherein the transaction request message comprises an account address of a second node and transaction data corresponding to a target transaction, the second node is a receiver device corresponding to the target transaction, the state information of the first node comprises position information of the first node, block height of the transaction data stored in the first node and a timestamp of the transaction data stored in the first node;
the first node receives a first data synchronization indication message of the network control device, where the first data synchronization indication message is used to indicate the first node to obtain transaction data corresponding to a first block chain from a target mobile edge computing MEC node, the target MEC node is determined by the network control device according to location information of the first node, the first block chain is a block chain corresponding to the target MEC node, and the first data synchronization indication message is sent to the first node by the network control device when it is determined that the transaction data stored in the first node is different from the transaction data corresponding to the first block chain;
the first node sends a first data synchronization request message to the target MEC node, wherein the first data synchronization request message is used for requesting to acquire transaction data corresponding to the first block chain;
the first node receives a first data synchronization response message of the target MEC node, wherein the first data synchronization response message comprises transaction data corresponding to the first blockchain.
2. A method of processing transaction data, comprising:
the method comprises the steps that a network control device receives a transaction request message of a first node and state information of the first node, wherein the transaction request message comprises an account address of a second node and transaction data corresponding to a target transaction, the second node is a receiver device corresponding to the target transaction, the state information of the first node comprises position information of the first node, block height of the transaction data stored in the first node and a timestamp of the transaction data stored in the first node;
the network control equipment determines a target mobile edge with the shortest communication distance with the first node according to the position information of the first node to calculate an MEC node;
the network control equipment determines whether the transaction data stored by the first node is the same as transaction data corresponding to a first block chain according to the block height of the transaction data stored by the first node and the timestamp of the transaction data stored by the first node, wherein the first block chain is a block chain corresponding to the target MEC node;
and under the condition that the transaction data stored by the first node is different from the transaction data corresponding to the first blockchain, the network control equipment sends a first data synchronization indication message to the first node, wherein the first data synchronization indication message is used for indicating the first node to acquire the transaction data corresponding to the first blockchain from the target MEC node.
3. The method of claim 2, further comprising:
the network control equipment determines identification information of a second block chain according to the account address of the second node, wherein the second block chain is a block chain corresponding to the second node;
the network control device determines whether the identification information of the second blockchain is the same as the identification information of the first blockchain.
4. The method of claim 3, wherein after the network control device determines whether the identification information of the second blockchain is the same as the identification information of the first blockchain, the method further comprises:
and under the condition that the identification information of the second blockchain is the same as the identification information of the first blockchain, the network control equipment sends a first transaction verification indication message to the first node, wherein the first transaction verification indication message is used for indicating the first node to send transaction data corresponding to the target transaction to a plurality of nodes on the first blockchain.
5. The method of claim 3, wherein after the network control device determines whether the identification information of the second blockchain is the same as the identification information of the first blockchain, the method further comprises:
and under the condition that the identification information of the second blockchain is different from the identification information of the first blockchain, the network control equipment sends a second data synchronization indication message to the first node, wherein the second data synchronization indication message is used for indicating the first node to acquire transaction data corresponding to the second blockchain from a target node, and the target node is a node on the second blockchain.
6. The method of claim 3, wherein after the network control device determines whether the identification information of the second blockchain is the same as the identification information of the first blockchain, the method further comprises:
and under the condition that the identification information of the second block chain is different from the identification information of the first block chain, the network control equipment sends an overlapping data acquisition indication message to the first node, wherein the overlapping data indication message is used for indicating the first node to acquire the transaction data corresponding to the second block chain from an overlapping node, and the overlapping node is used for storing the transaction data corresponding to the first block chain and the transaction data corresponding to the second block chain.
7. An apparatus for processing transaction data, comprising: a transmitting module and a receiving module;
the sending module is configured to send a transaction request message and state information of a first node to a network control device, where the transaction request message includes an account address of a second node and transaction data corresponding to a target transaction, the second node is a receiver device corresponding to the target transaction, and the state information of the first node includes location information of the first node, a block height of the transaction data stored in the first node, and a timestamp of the transaction data stored in the first node;
the receiving module is configured to receive a first data synchronization indication message of the network control device, where the first data synchronization indication message is used to indicate the first node to obtain transaction data corresponding to a first block chain from a target mobile edge computing MEC node, the target MEC node is determined by the network control device according to location information of the first node, the first block chain is a block chain corresponding to the target MEC node, and the first data synchronization indication message is sent to the first node by the network control device when it is determined that the transaction data stored in the first node is different from the transaction data corresponding to the first block chain;
the sending module is further configured to send a first data synchronization request message to the target MEC node, where the first data synchronization request message is used to request to acquire transaction data corresponding to the first blockchain;
the receiving module is further configured to receive a first data synchronization response message of the target MEC node, where the first data synchronization response message includes transaction data corresponding to the first blockchain.
8. An apparatus for processing transaction data, comprising: the device comprises a receiving module, a determining module and a sending module;
the receiving module is configured to receive a transaction request message of a first node and state information of the first node, where the transaction request message includes an account address of a second node and transaction data corresponding to a target transaction, the second node is a receiver device corresponding to the target transaction, and the state information of the first node includes location information of the first node, a block height of the transaction data stored in the first node, and a timestamp of the transaction data stored in the first node;
the determining module is configured to determine, according to the location information of the first node, a target mobile edge with the shortest communication distance to the first node to calculate an MEC node; determining whether the transaction data stored by the first node is the same as transaction data corresponding to a first blockchain according to the block height of the transaction data stored by the first node and the timestamp of the transaction data stored by the first node, wherein the first blockchain is a blockchain corresponding to the target MEC node;
the sending module is configured to send a first data synchronization indication message to the first node when the transaction data stored in the first node is different from the transaction data corresponding to the first blockchain, where the first data synchronization indication message is used to indicate that the first node acquires the transaction data corresponding to the first blockchain from the target MEC node.
9. The apparatus of claim 8,
the determining module is further configured to determine, according to the account address of the second node, identification information of a second blockchain, where the second blockchain is a blockchain corresponding to the second node; and determining whether the identification information of the second blockchain is the same as the identification information of the first blockchain.
10. The apparatus of claim 9,
the sending module is further configured to send a first transaction verification indication message to the first node under the condition that the identification information of the second blockchain is the same as the identification information of the first blockchain, where the first transaction verification indication message is used to indicate the first node to send transaction data corresponding to the target transaction to multiple nodes in the first blockchain.
11. The apparatus of claim 9,
the sending module is further configured to send a second data synchronization indication message to the first node when the identification information of the second blockchain is different from the identification information of the first blockchain, where the second data synchronization indication message is used to indicate the first node to obtain the transaction data corresponding to the second blockchain from a target node, and the target node is a node in the second blockchain.
12. The apparatus of claim 9,
the sending module is further configured to send an overlapping data obtaining indication message to the first node when the identification information of the second blockchain is different from the identification information of the first blockchain, where the overlapping data indication message is used to indicate the first node to obtain the transaction data corresponding to the second blockchain from an overlapping node, and the overlapping node is used to store the transaction data corresponding to the first blockchain and the transaction data corresponding to the second blockchain.
CN202010796486.XA 2020-08-10 2020-08-10 Transaction data processing method and device Active CN112019603B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010796486.XA CN112019603B (en) 2020-08-10 2020-08-10 Transaction data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010796486.XA CN112019603B (en) 2020-08-10 2020-08-10 Transaction data processing method and device

Publications (2)

Publication Number Publication Date
CN112019603A CN112019603A (en) 2020-12-01
CN112019603B true CN112019603B (en) 2022-04-08

Family

ID=73499357

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010796486.XA Active CN112019603B (en) 2020-08-10 2020-08-10 Transaction data processing method and device

Country Status (1)

Country Link
CN (1) CN112019603B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114048270B (en) * 2022-01-14 2022-05-13 北京大学深圳研究生院 Method and computer-readable storage medium for block chain data synchronization

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106899680B (en) * 2017-03-09 2019-07-30 深圳壹账通智能科技有限公司 The fragment treating method and apparatus of multi-tiling chain
US10708716B2 (en) * 2018-10-16 2020-07-07 Cisco Technology, Inc. Methods and apparatus for selecting network resources for UE sessions based on locations of multi-access edge computing (MEC) resources and applications
US11232446B2 (en) * 2018-10-26 2022-01-25 Hewlett Packard Enterprise Development Lp Carrier grade telecom blockchain
CN109361688B (en) * 2018-11-16 2021-01-22 大唐高鸿信息通信(义乌)有限公司 Evidence storing method and system based on 5G architecture and block chain
CN111429134A (en) * 2018-12-21 2020-07-17 北京京东尚科信息技术有限公司 Data transaction method and device based on block chain
CN110232569B (en) * 2019-05-07 2021-04-16 北京奇艺世纪科技有限公司 Method and device for reading transaction record and storage medium
CN110727712B (en) * 2019-10-15 2021-06-04 腾讯科技(深圳)有限公司 Data processing method and device based on block chain network, electronic equipment and storage medium
CN111382164B (en) * 2020-03-06 2021-04-30 腾讯科技(深圳)有限公司 Service processing method based on block chain network

Also Published As

Publication number Publication date
CN112019603A (en) 2020-12-01

Similar Documents

Publication Publication Date Title
CN109492380B (en) Equipment authentication method and device and block link point
CN111163182B (en) Block chain-based device registration method and apparatus, electronic device, and storage medium
CN110489486B (en) Method, seed node and medium for generating block chain network
EP3968607B1 (en) Service invocation methods
EP3262552B1 (en) Methods, apparatus, and systems for identity authentication
CN110602108B (en) Data communication method, device, equipment and storage medium based on block chain network
CN112311779B (en) Data access control method and device applied to block chain system
CN110895603A (en) Multi-system account information integration method and device
CN114024876A (en) Network dial testing method, device, equipment and storage medium
CN110602234B (en) Block chain network node management method, device, equipment and storage medium
CN112019603B (en) Transaction data processing method and device
CN112087475B (en) Message pushing method and device for cloud platform component application and message server
CN112910663B (en) Method, device, equipment and storage medium for message broadcasting and terminal registration
CN112651044B (en) Business transaction method, system and storage medium based on block chain technology
CN114268490A (en) Equipment authentication method, Internet of things system, server and storage medium
CN111866993B (en) Wireless local area network connection management method, device, software program and storage medium
CN107819729B (en) Data request method and system, access device, storage device and storage medium
CN114882628B (en) Data processing method and device, electronic equipment and computer readable medium
CN116055403A (en) Message data transmission method, device and server
CN114125812A (en) Data synchronization method, device, server and storage medium
CN112202725B (en) Service verification method and device
CN112153021B (en) Service data acquisition method and device
CN115118727B (en) Data transmission method, device, equipment and storage medium of distributed computing architecture
CN110839034B (en) Communication connection control method and related equipment
CN114338669B (en) Block chain-based data transmission method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant