CN113691621A - Block chain data uplink method - Google Patents
Block chain data uplink method Download PDFInfo
- Publication number
- CN113691621A CN113691621A CN202110975979.4A CN202110975979A CN113691621A CN 113691621 A CN113691621 A CN 113691621A CN 202110975979 A CN202110975979 A CN 202110975979A CN 113691621 A CN113691621 A CN 113691621A
- Authority
- CN
- China
- Prior art keywords
- transaction
- identification code
- routing information
- data
- transaction data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/104—Peer-to-peer [P2P] networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1097—Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a block chain data uplink method, which is applied to a block chain data uplink system, wherein the block chain data uplink system comprises the following steps: at least one client, one gateway, and at least two blockchain clusters. The method comprises the following steps: the client generates a transaction identification code according to transaction data, generates a transaction data packet according to the transaction identification code and the transaction data, and sends the transaction data packet to the gateway, wherein the transaction identification code carries routing information of the uplink transaction data; and the gateway receives the transaction data packet, extracts the routing information from the transaction identification code, and sends the transaction data packet to a corresponding block chain cluster for data storage based on the routing information. When the transaction data is linked up, the routing information is hidden in the identification code of the transaction data packet, so that the information quantity sent to the gateway by the client is reduced, and the efficiency of data transmission and processing is improved.
Description
Technical Field
The embodiment of the invention relates to the technical field of block chains, in particular to a block chain data uplink method.
Background
In the blockchain network, when a transaction occurs at a client, uplink processing needs to be performed on transaction data. In the prior art, when a transaction occurs, a client needs to attach separate routing information when sending a transaction data packet to a gateway, the gateway sends the transaction data packet to a corresponding block chain cluster node for data storage according to the routing information, and when a high-frequency transaction occurs, the IO pressure of a gateway network is high.
Disclosure of Invention
The invention provides a block chain data chaining method, which is used for improving the efficiency of data transmission and processing when data chaining is traded.
The embodiment of the invention provides a block chain data uplink method, which is applied to a block chain data uplink system, wherein the block chain data uplink system comprises the following steps: at least one client, a gateway and at least one blockchain cluster, the method comprising:
the client generates a transaction identification code according to transaction data, generates a transaction data packet according to the transaction identification code and the transaction data, and sends the transaction data packet to the gateway, wherein the transaction identification code carries routing information of the uplink transaction data;
and the gateway receives the transaction data packet, extracts the routing information from the transaction identification code, and sends the transaction data packet to a corresponding block chain cluster for data storage based on the routing information.
Optionally, the transaction identification code includes first digit routing information and a second digit transaction random number.
Optionally, the generating, by the client, the transaction identification code according to the transaction data includes:
the client determines the service type of the transaction data and determines the routing information corresponding to the transaction data by combining a transaction routing mapping table;
and the client generates a transaction random number and generates a transaction identification code according to the routing information and the transaction random number.
Optionally, the transaction routing mapping table includes a mapping relationship between a pre-stored service type and pre-stored routing information.
Optionally, the routing information includes a third quantity block chain cluster identification code and a fourth quantity ledger identification code.
Optionally, the extracting the routing information from the transaction identification code includes:
determining a first number digit identification code in the transaction identification code as the routing information.
Optionally, the sending the transaction data packet to a corresponding blockchain cluster for data storage based on the routing information includes:
the gateway determines a target block chain node and a target port thereof in a block chain cluster corresponding to the routing information according to the routing information by combining a routing node mapping table;
and the gateway sends the transaction data packet to a target port of the target block link node.
Optionally, the routing node mapping table includes a mapping relationship between pre-stored routing information and pre-stored node port information, where the pre-stored node port information includes a pre-stored block chain node identification code and a pre-stored port identification code.
Optionally, after the client generates the transaction identification code according to the transaction data, the method further includes:
and the client encrypts the transaction identification code.
Optionally, after the gateway receives the transaction data packet, the method further includes:
the gateway decrypts the transaction identification code.
According to the method, a transaction identification code is generated through a client according to transaction data, a transaction data packet is generated according to the transaction identification code and the transaction data, and the transaction data packet is sent to a gateway, wherein the transaction identification code carries routing information of a chain of the transaction data, the gateway receives the transaction data packet, extracts the routing information from the transaction identification code, and sends the transaction data packet to a corresponding block chain cluster based on the routing information so as to store data. The invention reduces the problem of high gateway network IO pressure when high-frequency transactions occur, hides the routing information in the identification code of the transaction data packet when the transaction data is linked, reduces the information amount sent to the gateway by the client, and improves the efficiency of data transmission and processing.
Drawings
Fig. 1 is a flowchart of a block chain data uplink method according to an embodiment of the present invention;
FIG. 2 is a block chain data uplink system according to an embodiment of the present invention;
fig. 3 is a block diagram of a transaction id in a block-chain data uplink system according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be noted that, for convenience of description, only a part of the structures related to the present invention, not all of the structures, are shown in the drawings, and furthermore, embodiments of the present invention and features of the embodiments may be combined with each other without conflict.
Example one
Fig. 1 is a flowchart of a block chain data uplink method according to an embodiment of the present invention, where the present embodiment is applicable to a case of transaction data uplink storage in a block chain system, the method may be applied to the block chain data uplink system, and the block chain data uplink system may include: at least one client, one gateway, and at least one blockchain cluster.
Fig. 2 is a diagram of a block chain data uplink system according to an embodiment of the present invention. As shown in fig. 2, the uplink system of blockchain data includes a plurality of clients, a gateway, and three blockchain clusters: the cluster 1, the cluster 2 and the cluster 3 respectively comprise a plurality of block chain nodes.
As shown in fig. 1, the method specifically includes the following steps:
and step 110, the client generates a transaction identification code according to the transaction data, generates a transaction data packet according to the transaction identification code and the transaction data, and sends the transaction data packet to the gateway.
The transaction identifier can carry routing information of the uplink transaction data.
Specifically, when a transaction occurs, the client may generate a transaction identification code corresponding to the transaction data according to a preset transaction identification code generation rule. In the generated transaction identification code, the routing information of the transaction data to be transmitted can be hidden therein for the transmission operation of the transaction data. As shown in fig. 2, a transaction ID generator may be provided in the client, which may be used to generate a transaction identification code when a transaction occurs. After the transaction identification code is generated, the transaction data can be marked to form a transaction data packet, and the client sends the transaction data packet to the gateway.
Optionally, the transaction identification code may include first digit routing information and a second digit transaction random number.
Specifically, the generated transaction identification code may be a code with a preset fixed length, when the transaction identification code is generated, the first number of code positions of the transaction identification code are used for recording routing information for transmitting transaction data, and the first number of code positions except the transaction identification code, that is, the second number of code positions are used for storing the transaction random number.
Further, the routing information may include a third quantity digit blockchain cluster identification code and a fourth quantity digit ledger identification code.
In this embodiment, an encoding manner of the routing information may be further set, and the first digital routing information may be further subdivided into a third digital block chain cluster identification code and a fourth digital account book identification code. It is understood that the sum of the third number and the fourth number is the first number.
For example, fig. 3 is a schematic structural diagram of a transaction id in a block chain data uplink system according to an embodiment of the present invention. As shown in fig. 3, the transaction identification code may include 96 bits, the first 32 bits may record the routing information, and the last 64 bits may store the transaction random number; the first 32bit can be divided into two parts, namely a first 16bit blockchain cluster identification code, i.e. the blockchain ID in fig. 3, and a second 16bit ledger identification code, i.e. the ledger ID in fig. 3.
Accordingly, step 110 may be specifically implemented by the following steps: the client determines the service type of the transaction data, determines the routing information corresponding to the transaction data by combining with the transaction routing mapping table, generates a transaction random number, and generates a transaction identification code according to the routing information and the transaction random number.
The transaction routing mapping table may include a mapping relationship between a pre-stored service type and pre-stored routing information.
Specifically, the client needs to maintain a Map of pre-stored service types and pre-stored routing information, that is, a transaction routing mapping table, where routing addresses corresponding to different service types are recorded in the transaction routing mapping table. For example, different service types may have different service IDs, the routing information may be represented as a blockchain ID + an account ID, and a mapping relationship between the service ID and the blockchain ID + the account ID may be recorded in the transaction routing mapping table. When a transaction occurs, the client can search corresponding pre-stored routing information in the transaction routing mapping table according to the service type of the transaction data, and determine the searched pre-stored reason information as the reason information for chaining the transaction data. Meanwhile, the client can also generate a trading random code with a certain number of digits, and the routing information and the trading random code can form a complete trading identification code.
Optionally, after the client generates the transaction identification code according to the transaction data, the method may further include: the client encrypts the transaction identification code.
Specifically, in order to perform secure transmission on information, the client may encrypt the transaction identification code according to a preset encoding and encryption rule after the transaction identification code is generated, so as to improve the security of information transmission.
And step 120, the gateway receives the transaction data packet, extracts routing information from the transaction identification code, and sends the transaction data packet to a corresponding block chain cluster for data storage based on the routing information.
Optionally, if the client encrypts the transaction identifier, after the gateway receives the transaction data packet, the method may further include: the gateway decrypts the transaction identification code.
In practical application, for the safe transmission of information, the transmitted data is generally encrypted, and the transaction identification code also belongs to a part of the transmitted data, so that if the transaction identification code received by the gateway is encrypted, the gateway needs to decrypt the encrypted transaction identification code to obtain the decrypted transaction identification code, thereby facilitating the analysis of the information in the transaction identification code.
Specifically, when the gateway receives the transaction data packet, the gateway may obtain the transaction identifier of the transaction data packet, and extract the routing information from the transaction identifier. And the gateway forwards the transaction data packet to the corresponding blockchain node in the blockchain cluster according to the routing information, and the blockchain node which receives the transaction data packet stores the transaction data in an uplink mode.
Optionally, extracting the routing information from the transaction identification code may include: the first number digit identification code in the transaction identification code is determined as the routing information.
In this embodiment, the client uses the first number of coded positions of the transaction identification code to record the routing information for transmitting the transaction data, so that the gateway can extract the first number of coded positions from the transaction identification code and determine the extracted identification information as the routing information.
Optionally, sending the transaction data packet to the corresponding blockchain cluster for data storage based on the routing information may include: the gateway determines a target block link node and a target port thereof in the block link cluster corresponding to the routing information according to the routing information by combining with the routing node mapping table; and the gateway sends the transaction data packet to a target port of the target block chain node.
The routing node mapping table comprises a mapping relation between pre-stored routing information and pre-stored node port information, and the pre-stored node port information comprises a pre-stored block chain node identification code and a pre-stored port identification code.
Specifically, the gateway needs to maintain a Map of pre-stored routing information and pre-stored node port information, that is, a routing node mapping table, where node port information corresponding to different routing information is recorded in the routing node mapping table, and the node port information may include a block chain node identifier and a port identifier. For example, the routing information may be represented as a blockchain ID + ledger ID, the node port information may be represented as a node IP + port ID, and the mapping relationship between the blockchain ID + ledger ID and the node IP + port ID may be recorded in the routing node mapping table. When the gateway receives the transaction data packet and extracts the routing information, the gateway can search corresponding pre-stored node port information in a routing node mapping table according to the routing information, pre-stored block link node identification codes and pre-stored port identification codes in the pre-stored node port information are determined as block link point identification codes and port identification codes of the transaction data packet to be received, the gateway can forward the transaction data packet according to the determined block link point identification codes and the port identification codes thereof, and uplink storage of the transaction data can be carried out after the block link point corresponding to the block link point identification codes receives the transaction data packet.
According to the technical scheme of the embodiment, the transaction identification code is generated through the client according to the transaction data, the transaction data packet is generated according to the transaction identification code and the transaction data and sent to the gateway, wherein the transaction identification code carries routing information of a chain of the transaction data, the gateway receives the transaction data packet, extracts the routing information from the transaction identification code, and sends the transaction data packet to the corresponding block chain cluster for data storage based on the routing information. The embodiment of the invention reduces the problem of high IO pressure of the gateway network when high-frequency transactions occur, and hides the routing information in the identification code of the transaction data packet when the transaction data is linked, thereby reducing the information amount sent to the gateway by the client, and improving the efficiency of data transmission and processing.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the block chain data uplink method, each unit and each module included in the embodiment are only divided according to functional logic, but are not limited to the above division, as long as the corresponding function can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims (10)
1. A block chain data uplink method is applied to a block chain data uplink system, and the block chain data uplink system comprises the following steps: at least one client, one gateway and at least one blockchain cluster;
characterized in that the method comprises:
the client generates a transaction identification code according to transaction data, generates a transaction data packet according to the transaction identification code and the transaction data, and sends the transaction data packet to the gateway, wherein the transaction identification code carries routing information of the uplink transaction data;
and the gateway receives the transaction data packet, extracts the routing information from the transaction identification code, and sends the transaction data packet to a corresponding block chain cluster for data storage based on the routing information.
2. The blockchain uplink data method of claim 1 wherein the transaction identification code includes a first digital routing information and a second digital transaction random number.
3. The method of claim 2 wherein the step of the ue generating the transaction id based on the transaction data comprises:
the client determines the service type of the transaction data and determines the routing information corresponding to the transaction data by combining a transaction routing mapping table;
and the client generates a transaction random number and generates a transaction identification code according to the routing information and the transaction random number.
4. The blockchain uplink data method of claim 3, wherein the transaction routing mapping table includes a mapping relationship between pre-stored traffic types and pre-stored routing information.
5. The method of claim 2, wherein the routing information comprises a third-digit blockchain cluster id and a fourth-digit ledger id.
6. The blockchain data uplink method of claim 2 wherein the extracting the routing information from the transaction identifier code comprises:
determining a first number digit identification code in the transaction identification code as the routing information.
7. The method of claim 2, wherein sending the transaction packet to a corresponding blockchain cluster for data storage based on the routing information comprises:
the gateway determines a target block chain node and a target port thereof in a block chain cluster corresponding to the routing information according to the routing information by combining a routing node mapping table;
and the gateway sends the transaction data packet to a target port of the target block link node.
8. The method of claim 7 wherein the routing node mapping table comprises a mapping relationship between pre-stored routing information and pre-stored node port information, the pre-stored node port information comprising a pre-stored blockchain node identifier and a pre-stored port identifier.
9. The method of claim 1 wherein after the generating the transaction identifier according to the transaction data at the ue, further comprising:
and the client encrypts the transaction identification code.
10. The blockchain data uplink method of claim 9 further comprising, after the gateway receives the transaction packet:
the gateway decrypts the transaction identification code.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110975979.4A CN113691621B (en) | 2021-08-24 | 2021-08-24 | Block chain data uplink method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110975979.4A CN113691621B (en) | 2021-08-24 | 2021-08-24 | Block chain data uplink method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113691621A true CN113691621A (en) | 2021-11-23 |
CN113691621B CN113691621B (en) | 2023-10-13 |
Family
ID=78581971
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110975979.4A Active CN113691621B (en) | 2021-08-24 | 2021-08-24 | Block chain data uplink method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113691621B (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109658097A (en) * | 2018-12-07 | 2019-04-19 | 深圳市智税链科技有限公司 | Authentication management method, apparatus, medium and the electronic equipment of block catenary system |
CN109785136A (en) * | 2019-01-30 | 2019-05-21 | 北京京东尚科信息技术有限公司 | A kind of transaction processing method of block chain, client and block chain network |
WO2019100991A1 (en) * | 2017-11-27 | 2019-05-31 | 北京京东金融科技控股有限公司 | Information processing method, device and system, storage medium, and electronic device |
CN110516975A (en) * | 2019-08-30 | 2019-11-29 | 盈盛智创科技(广州)有限公司 | Order management method, server, block chain network and system based on block chain |
CN110602096A (en) * | 2019-09-12 | 2019-12-20 | 腾讯科技(深圳)有限公司 | Data processing method, device, storage medium and equipment in block chain network |
CN111008827A (en) * | 2019-11-25 | 2020-04-14 | 深圳前海微众银行股份有限公司 | Cross-chain transaction signature method and device |
WO2020181985A1 (en) * | 2019-03-12 | 2020-09-17 | 深圳前海微众银行股份有限公司 | Blockchain multiple alliance chain load balancing method and device |
CN113269545A (en) * | 2021-05-26 | 2021-08-17 | 杭州云象网络技术有限公司 | Hash time locking method and system based on cloud cross-chain transfer protocol |
-
2021
- 2021-08-24 CN CN202110975979.4A patent/CN113691621B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019100991A1 (en) * | 2017-11-27 | 2019-05-31 | 北京京东金融科技控股有限公司 | Information processing method, device and system, storage medium, and electronic device |
CN109658097A (en) * | 2018-12-07 | 2019-04-19 | 深圳市智税链科技有限公司 | Authentication management method, apparatus, medium and the electronic equipment of block catenary system |
CN109785136A (en) * | 2019-01-30 | 2019-05-21 | 北京京东尚科信息技术有限公司 | A kind of transaction processing method of block chain, client and block chain network |
WO2020181985A1 (en) * | 2019-03-12 | 2020-09-17 | 深圳前海微众银行股份有限公司 | Blockchain multiple alliance chain load balancing method and device |
CN110516975A (en) * | 2019-08-30 | 2019-11-29 | 盈盛智创科技(广州)有限公司 | Order management method, server, block chain network and system based on block chain |
CN110602096A (en) * | 2019-09-12 | 2019-12-20 | 腾讯科技(深圳)有限公司 | Data processing method, device, storage medium and equipment in block chain network |
CN111008827A (en) * | 2019-11-25 | 2020-04-14 | 深圳前海微众银行股份有限公司 | Cross-chain transaction signature method and device |
CN113269545A (en) * | 2021-05-26 | 2021-08-17 | 杭州云象网络技术有限公司 | Hash time locking method and system based on cloud cross-chain transfer protocol |
Also Published As
Publication number | Publication date |
---|---|
CN113691621B (en) | 2023-10-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112926982B (en) | Transaction data processing method, device, equipment and storage medium | |
CN108123800B (en) | Key management method, key management device, computer equipment and storage medium | |
CN110175840B (en) | Method, client, alliance chain and system for realizing light wallet mechanism in alliance chain | |
CN110689349B (en) | Transaction hash value storage and searching method and device in blockchain | |
CN112367169A (en) | Data encryption and decryption method, device, equipment and storage medium | |
CN110224808B (en) | Bank data sharing method and device based on block chain, computer equipment and storage medium | |
CN106610995B (en) | Method, device and system for creating ciphertext index | |
CN109194669B (en) | Data transmission method, device, equipment and medium of lightweight node | |
CN101286837B (en) | Message encryption device and method oriented to storage area network | |
CN114363412B (en) | Message data processing method, device, computer equipment and storage medium | |
CN112437060B (en) | Data transmission method and device, computer equipment and storage medium | |
US11418493B2 (en) | Identifying and securing unencrypted data in a production environment | |
CN112235104A (en) | Data encryption transmission method, system, terminal and storage medium | |
CN114338527B (en) | IPv6 active identifier processing method and system | |
CN111294359B (en) | Pressure testing method, pressure testing device, computer equipment and storage medium | |
CN113691621B (en) | Block chain data uplink method | |
US20200175512A1 (en) | Key Generation in Secure Electronic Payment Systems | |
CN112836239A (en) | Method and device for cooperatively determining target object data by two parties for protecting privacy | |
CN109657447B (en) | Equipment fingerprint generation method and device | |
CN112491904B (en) | Big data privacy protection sharing method and system | |
CN112689971A (en) | Chromosome identification | |
CN113282662B (en) | Block information processing method, device, equipment and medium | |
CN114691759B (en) | Data query statistical method, device, computer equipment and storage medium | |
CN109743188A (en) | Daily record data treating method and apparatus | |
CN116821082A (en) | Log file processing method, device, computer equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |