CN112783853A - Operation processing method, device and system based on block chain - Google Patents

Operation processing method, device and system based on block chain Download PDF

Info

Publication number
CN112783853A
CN112783853A CN202110087247.1A CN202110087247A CN112783853A CN 112783853 A CN112783853 A CN 112783853A CN 202110087247 A CN202110087247 A CN 202110087247A CN 112783853 A CN112783853 A CN 112783853A
Authority
CN
China
Prior art keywords
batch
job
jobs
nodes
consensus
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110087247.1A
Other languages
Chinese (zh)
Inventor
陈法山
苏恒
张叶飞
曾钊创
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202110087247.1A priority Critical patent/CN112783853A/en
Publication of CN112783853A publication Critical patent/CN112783853A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems

Landscapes

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

Abstract

The invention discloses a method, a device and a system for processing operation based on a block chain, which relate to the technical field of block chains, wherein the block chain comprises the following steps: batch nodes and consensus nodes, the method comprising: receiving batch jobs from batch nodes, and receiving batch jobs from other consensus nodes, the batch jobs including: at least one job sequence, each job sequence comprising: an operation serial number; and merging the received batch files according to the operation serial numbers to obtain complete batch operation, wherein the complete batch operation comprises the following steps: completing the operation sequence; in response to successful consensus on the complete batch jobs, storing the complete job sequence in a batch job pool; and in response to successful identification of the received plurality of online jobs and the job serial numbers of the partial batch jobs in the batch job pool, processing the plurality of online jobs preferentially, and after the plurality of online jobs are processed, processing the partial batch jobs according to the job serial numbers.

Description

Operation processing method, device and system based on block chain
Technical Field
The invention relates to the technical field of block chains, in particular to a method, a device and a system for processing operation based on a block chain.
Background
Currently, a mainstream alliance chain is composed of a consensus node and a non-consensus node, wherein the consensus node is responsible for maintaining data, and the non-consensus node is responsible for accessing a transaction request. The non-consensus node is optional, and if the non-consensus node does not exist, the consensus node is simultaneously responsible for accessing the transaction request. One of the consensus nodes is a master node and is responsible for summarizing and distributing transaction requests.
The transaction processing flow on the alliance chain is as follows: the non-consensus nodes distribute the transaction requests to all consensus nodes, the consensus nodes transmit the transaction requests to the main node, the main node collects the transaction requests, sorts and packages the transaction requests and distributes the transaction requests to all consensus nodes, all the consensus nodes perform consensus on the transaction packages, and the transactions are executed in sequence after the consensus is achieved.
The transaction processing flow is suitable for processing online transactions, the online transactions refer to transactions which are initiated by a single client and process a small amount of data, the timeliness requirement of the online transactions is high, and if the client inquires account balance, the system only needs to access data of one client, but needs several seconds to return results quickly. In addition to online transaction, another transaction mode is batch transaction in actual business, the transaction amount of batch transaction is large, but the timeliness requirement is not high, for example, in a surreptitious wage scene in banking business, an account needs to be set for all employees of a company through one batch transaction when opening an account, each employee needs to be checked through one batch transaction when the month ends, the transaction relates to a large number of accounts, but the timeliness requirement is not high, and the transaction is allowed to be completed within hours.
Traditional federation chains do not support batch transactions, which are implemented in large concurrent online transactions, which may lead to two problems:
1. batch transaction processing is inefficient. The main node is responsible for collecting, sequencing and distributing transaction requests in the online transaction processing process, and the network communication with other nodes is busy, so that the main node is the center and the bottleneck of the transaction processing flow. Under the scene of a large amount of burst online transactions, the processing capacity and network communication of the main node face huge pressure, for example, in the batch account opening scene, a large amount of account opening transactions need to be sent out to a alliance chain in a short time, if the main node cannot process the online transactions in time, the whole network is affected by the online transactions, and the processing efficiency is reduced;
2. affecting the timeliness of normal online transactions. When a client requests batch transaction service from the blockchain in a mode of initiating a large number of transaction requests, normal online transaction requests initiated by other clients need to compete with batch transaction for limited system resources, online transactions may not be processed due to the fact that the system is busy and late, and user experience is reduced.
Disclosure of Invention
In view of the above, the present invention provides a method, an apparatus and a system for processing operations based on a block chain to solve at least one of the above-mentioned problems.
According to a first aspect of the present invention, there is provided a method for processing a job based on a blockchain, the blockchain including: batch nodes and consensus nodes, the method being applied to the consensus nodes, the method comprising:
receiving batch jobs from batch nodes, and receiving batch jobs from other consensus nodes, the batch jobs including: at least one job sequence, each job sequence comprising: an operation serial number;
and merging the received batch files according to the operation serial number to obtain complete batch operation, wherein the complete batch operation comprises the following steps: completing the operation sequence;
in response to successful recognition of the complete batch job, storing the complete job sequence in a batch job pool;
and in response to successful identification of the received multiple online jobs and the job serial numbers of the partial batch jobs in the batch job pool, processing the multiple online jobs preferentially, and after the multiple online jobs are processed, processing the partial batch jobs according to the job serial numbers.
According to a second aspect of the present invention, there is provided a method for processing a job based on a blockchain, the blockchain including: batch nodes and consensus nodes, the method being applied to batch nodes, the method comprising:
receiving batch jobs from a client;
responding to the success of the integrity check of the batch operation, carrying out fragment processing on the batch operation according to the number of the common identification nodes in the block chain, and generating a plurality of batch operation fragments, wherein each batch operation fragment comprises: numbering the slices;
and respectively sending the batch job fragments to all the consensus nodes.
According to a third aspect of the present invention, there is provided a block chain-based job processing apparatus, the block chain including: batch node and consensus node, the device is located consensus node end, the device includes:
a data receiving unit, configured to receive a batch job from a batch node and receive batch jobs from other common nodes, where the batch job includes: at least one job sequence, each job sequence comprising: an operation serial number;
and the merging processing unit is used for merging the received batch files according to the operation serial numbers to obtain complete batch operation, and the complete batch operation comprises the following steps: completing the operation sequence;
the storage unit is used for responding to successful consensus on the complete batch jobs and storing the complete job sequence in a batch job pool;
and the job processing unit is used for preferentially processing the plurality of online jobs in response to successful identification of the received plurality of online jobs and the job serial numbers of the partial batch jobs in the batch job pool, and processing the partial batch jobs according to the job serial numbers after the plurality of online jobs are processed.
According to a fourth aspect of the present invention, there is provided a block chain-based job processing apparatus, the block chain including: batch node and consensus node, the device is located batch node end, the device includes:
the batch job receiving unit is used for receiving batch jobs from the client;
and the operation fragment generating unit is used for responding to the success of the integrity check of the batch operation, carrying out fragment processing on the batch operation according to the number of the common identification nodes in the block chain, and generating a plurality of batch operation fragments, wherein each batch operation fragment comprises: numbering the slices;
and the operation fragment sending unit is used for respectively sending the batch operation fragments to the common identification nodes.
According to a fifth aspect of the present invention, there is provided a blockchain-based job processing system, the system comprising: the job processing device at the consensus node and the job processing device at the batch node.
According to a sixth aspect of the present invention, there is provided an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the above method when executing the program.
According to a seventh aspect of the present invention, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the above method.
According to the technical scheme, the batch jobs from the batch nodes and the batch jobs of other common nodes are received, then the received batch files are merged according to the job serial numbers to obtain complete batch jobs, and when the complete batch jobs are successfully identified, the complete job sequence is stored in a batch job pool; and when the received plurality of online jobs are successfully identified with the job serial numbers of the partial batch jobs in the batch job pool, processing the plurality of online jobs preferentially, and after the plurality of online jobs are processed, processing the partial batch jobs according to the job serial numbers. Therefore, batch operation can be efficiently processed without influencing normal online operation, and the experience of a user can be 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 introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a block diagram of a job processing system according to an embodiment of the present invention;
fig. 2 is a block diagram of the structure of the batch node job processing apparatus 1 according to the embodiment of the present invention;
fig. 3 is a block diagram of the structure of the consensus node job processing apparatus 2 according to the embodiment of the present invention;
FIG. 4 is an exemplary block diagram of a federation chain in accordance with an embodiment of the present invention;
FIG. 5 is a block diagram of a batch node structure according to an embodiment of the invention;
FIG. 6 is a schematic diagram of a batch file structure according to an embodiment of the invention;
FIG. 7 is a block diagram of a structure of a consensus node according to an embodiment of the present invention;
FIG. 8 is a flow diagram of batch transaction processing based on the architecture shown in FIG. 4 according to an embodiment of the present invention;
FIG. 9 is a flowchart detailing step S101 according to an embodiment of the present invention;
FIG. 10 is a flowchart detailing step S102 according to an embodiment of the present invention;
FIG. 11 is a flowchart detailing step S103 according to an embodiment of the present invention;
FIG. 12 is a flowchart of a refinement of step S104 according to an embodiment of the present invention;
FIG. 13 is a flowchart detailing steps S105-S108 according to an embodiment of the present invention;
FIG. 14 is a diagram illustrating a data structure of an online phase consensus request, according to an embodiment of the invention;
FIG. 15 is a flow diagram of a job processing method according to an embodiment of the present invention;
FIG. 16 is another flowchart of a job processing method according to an embodiment of the present invention;
fig. 17 is a schematic block diagram of a system configuration of an electronic apparatus 600 according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The traditional alliance chain does not support batch transaction, the batch transaction is realized in a large concurrent online transaction mode, the batch transaction processing efficiency is low, meanwhile, the timeliness of normal online transaction is influenced, and the user experience is reduced. Based on this, the embodiment of the present invention provides a block chain-based job processing scheme, which can implement efficient processing of batch transactions on a federation chain without affecting normal online transactions, thereby improving the experience of users. Embodiments of the present invention are described in detail below with reference to the accompanying drawings.
The embodiment of the invention provides a block chain-based job processing system, and an application scene of the system is preferably a alliance chain. In the federation chain, including batch nodes and consensus nodes, a client submits batch jobs (which may also be referred to as transactions) to the batch nodes in the form of batch files.
Fig. 1 is a block diagram of the job processing system, and as shown in fig. 1, the system includes: a batch node job processing apparatus 1 located at a batch node side and a consensus node job processing apparatus 2 located at a consensus node side, which may preferably act as a master node. These two devices are described separately below.
(1) Batch node job processing apparatus 1
Fig. 2 is a block diagram showing the configuration of the batch node job processing apparatus 1, and as shown in fig. 2, the batch node job processing apparatus 1 includes: batch job receiving unit 11, job slice generating unit 12 and job slice transmitting unit 13, wherein:
a batch job receiving unit 11, configured to receive a batch job from a client.
The job fragmentation generation unit 12 is configured to, in response to a success of checking the integrity of the batch job, perform fragmentation processing on the batch job according to the number of the common nodes in the block chain, and generate a plurality of batch job fragmentation, where each batch job fragmentation includes: and (5) numbering the fragments.
The number of the fragments is determined according to the number of the common nodes, for example, if there are 4 common nodes in the federation chain, the batch job may be divided into 4, 8, or 16 shares. Then, the file fragments are numbered from 1, the number and the total number of the fragments are added to each fragment, and finally, the hash value of the fragment is calculated and added to the fragment.
And the job fragment sending unit 13 is configured to send the plurality of batch job fragments to each consensus node respectively.
In one embodiment, the job fragment transmitting unit 13 includes: module and operation fragment sending module get, wherein: the module taking module is used for carrying out module taking operation on the number of the common identification nodes according to the fragment numbers; and the operation fragment sending module is used for sending the batch operation fragments to all the common nodes respectively according to the modulus taking operation result.
In one embodiment, the job fragment transmitting unit 13 may also transmit the fragments to all the common nodes in parallel at the same time.
(2) Consensus node job processing apparatus 2
Fig. 3 is a block diagram showing the configuration of the consensus node job processing apparatus 2, and as shown in fig. 3, the consensus node job processing apparatus 2 includes: a data receiving unit 21, a merging processing unit 22, a storage unit 23, and a job processing unit 24, wherein:
a data receiving unit 21, configured to receive a batch job from a batch node, and receive batch jobs from other common nodes, where the batch job includes: at least one job sequence, each job sequence comprising: the job number.
Preferably, the common node job processing apparatus 2 further includes: first batch job check unit and batch job sending unit, wherein: the first batch job checking unit is used for carrying out integrity checking operation on the received batch jobs from the batch nodes; and the batch job sending unit is used for responding to the success of the integrity check of the batch jobs and respectively sending the batch jobs to other common nodes.
Preferably, the common node job processing apparatus 2 further includes: a second bulk job checking unit and a retransmission request transmitting unit, wherein: the second batch job checking unit is used for respectively carrying out integrity checking operation on the received batch jobs from other common nodes; and the retransmission request sending unit is used for sending the batch job retransmission request to the corresponding consensus node when the integrity check fails.
A merging processing unit 22, configured to merge the received batch files according to the job serial number to obtain a complete batch job, where the complete batch job includes: a complete job sequence, and a file header containing public key and signature information.
Preferably, the common node job processing apparatus 2 further includes: the device comprises a sequence hash value generation unit, a signature hash value generation unit and a verification result unit, wherein:
the sequence hash value generation unit is used for carrying out hash operation on the complete operation sequence to obtain a sequence hash value;
the signature hash value generation unit is used for carrying out decryption operation on the signature information (namely, the signature of the hash value of the complete operation sequence by the user private key) according to the public key to obtain a signature hash value;
and the verification result unit is used for responding to the matching of the sequence hash value and the signature hash value and determining that the integrity verification of the complete batch operation is successful.
The integrity of the complete batch operation can be verified through the sequence hash value generation unit, the signature hash value generation unit and the verification result unit.
And the storage unit 23 is configured to store the complete job sequence in a batch job pool in response to successful recognition of the complete batch job.
And the job processing unit 24 is configured to preferentially process the multiple online jobs in response to successful recognition of the received multiple online jobs and the job serial numbers of the partial batch jobs in the batch job pool, and process the partial batch jobs according to the job serial numbers after the multiple online jobs are processed.
Preferably, the common node job processing apparatus 2 further includes: and the consensus unit is used for performing consensus operation on the complete batch operation. Specifically, the consensus unit comprises: the device comprises a hash value receiving and sending module and a consensus result module, wherein:
the hash value receiving and sending module is used for sending the signature hash value generated by the signature hash value generating unit to other common nodes and respectively receiving the signature hash values from other common nodes;
and the consensus result module is used for responding to the consistency of the sent signature hash value and the received signature hash value and determining that the complete batch operation is successfully consensus.
In one embodiment, the common node job processing apparatus 2 further includes: and the batch job number determining unit is used for determining the number of the partial batch jobs according to the number of the received multiple online jobs, and the sum of the number of the multiple online jobs and the number of the partial batch jobs is less than or equal to a preset maximum job number value.
That is, the number of online jobs and batch jobs processed by the job processing unit 24 in one batch is equal to or less than a preset maximum number of jobs.
Receiving batch jobs from batch nodes and batch jobs of other common nodes through a data receiving unit 21, then merging the received batch files according to job serial numbers by a merging processing unit 22 to obtain complete batch jobs, and storing the complete job sequence in a batch job pool by a storage unit 23 when the complete batch jobs are successfully identified; when the received online jobs are successfully identified with the job numbers of the partial batch jobs in the batch job pool, the job processing unit 24 preferentially processes the online jobs, and processes the partial batch jobs according to the job numbers after the online jobs are processed. Therefore, batch operation can be efficiently processed without influencing normal online operation, and the experience of a user can be improved.
The embodiment of the invention realizes the concurrent execution of the batch operation and the online operation, can still process the newly accessed online operation in time while efficiently executing the batch operation, and has the execution sequence of the online operation prior to the batch operation, thereby giving consideration to the efficiency requirement of the batch operation and the user-friendly requirement of the online operation.
To further understand the embodiments of the present invention, a specific embodiment is given below based on a federation chain.
In this example, the federation chain is composed of batch nodes (having the functions of the batch node job processing apparatus 1 described above) and consensus nodes (having the consensus node job processing apparatus 2 described above). The client submits the batch transaction (i.e. the batch job) to the batch node in the form of a batch file, and the processing of the batch transaction mainly comprises the following steps:
(1) the batch nodes are responsible for analyzing, verifying, compressing, hashing and signing the batch files, then dividing the batch files according to the number of the common knowledge nodes in the network, respectively sending the cut batch files to different common knowledge nodes, and forwarding the fragments to all the other common knowledge nodes when receiving the fragments of the batch files.
(2) And after all the consensus nodes collect the complete batch files, each consensus node verifies the hash value and the signature of the batch files and broadcasts the verification result to other nodes, if the verification results of all the consensus nodes on the batch files are consistent, batch stage consensus is achieved, and the nodes store batch transactions for later use.
(3) When processing the batch transaction, the main node (also one of the consensus nodes) gradually arranges the serial number of the batch transaction into the online transaction request, and each consensus node achieves online stage consensus on the request.
(4) After the on-line stage consensus is achieved, the consensus node starts to execute batch transaction and on-line transaction. By repeating the online stage consensus, the alliance chain can efficiently and orderly complete batch transactions without influencing the newly accessed online transactions.
FIG. 4 is a diagram of an example structure of the federation chain, as shown in FIG. 4, the federation chain being composed of one or more bulk nodes 101 and a plurality of consensus nodes 102, each node functioning as follows:
the batch node 101 is responsible for receiving batch files sent by the client 103 and sending the fragments of the batch files to all the consensus nodes 102;
the consensus node 102 receives the batch file fragments and forwards the batch file fragments to each other, and then achieves batch stage consensus and online stage consensus, and finally performs batch transaction.
One of the consensus nodes is a master node and is responsible for initiating the consensus request in the online stage. The main node is not fixed and can be generated and replaced in the consensus node according to a certain rule.
FIG. 5 is a block diagram of a batch node, as shown in FIG. 5, comprising: the file system comprises a file receiving module 201, a file checking module 202, a file dividing module 203 and a fragment sending module 204, wherein:
a file receiving module 201, configured to receive batch files from a client;
the file checking module 202 is used for checking the integrity and correctness of the file;
the file segmentation module 203 is used for compressing the batch files and cutting the batch files into file fragments according to the number of the common identification nodes;
and the fragment sending module 204 is configured to send the file fragment to the consensus node.
FIG. 6 is a schematic diagram of a batch file structure, and as shown in FIG. 6, the batch file includes: a file header 401, a transaction sequence 402. Wherein, the file header 401 contains a certificate of the user public key and a signature of the user private key on the hash value of the transaction sequence 402; the transaction series 402 is composed of a plurality of transactions 403, and each transaction 403 comprises a transaction serial number, an intelligent contract ID, a contract function and a function parameter.
Fig. 7 is a block diagram illustrating a structure of a consensus node, as shown in fig. 7, including: a data receiving module 301, a data checking module 302, a data sending module 303, a data integrating module 304, a consensus module 305, a batch transaction pool 306, and an executing module 307, wherein:
the data receiving module 301 is configured to receive batch file fragments from batch nodes and other common nodes;
the data checking module 302 is configured to verify the integrity and correctness of the batch file fragments;
the data sending module 303 is configured to send batch file fragments to other common nodes;
the data integration module 304 is used for integrating the batch file fragments and restoring all batch transactions;
a consensus module 305, configured to perform batch phase consensus and online phase consensus with other consensus nodes;
a batch transaction pool 306 for storing batch transactions to be executed;
and an executing module 307 for executing batch transaction and online transaction.
FIG. 8 is a flow chart of batch transaction processing based on the structure shown in FIG. 4, as shown in FIG. 8, the flow includes:
step S101: the client 103 arranges the batch transactions into batch files, compresses the batch files and sends the batch nodes 101 of the alliance chain;
step S102: the batch nodes 101 decompress the batch files, check the batch files, if the batch files pass the check, divide the compressed batch files into a plurality of fragments and respectively send the fragments to the common nodes 102;
step S103: the common identification nodes 102 receive the file fragments, and the file fragments are mutually forwarded among the common identification nodes until all the common identification nodes 102 receive all the fragments, and the fragments are combined into a complete batch file and decompressed;
step S104: the consensus node 102 achieves batch stage consensus on the file headers 401 of the batch files, and temporarily stores the transaction sequence 402 in a batch transaction pool;
step S105: after the consensus node of the alliance chain receives the new online transaction, a main node in the consensus node intercepts a part of batch transactions to be executed, and combines the sequence number ranges of the transactions and the online transaction to initiate a consensus request;
step S106: the consensus node agrees on the online transaction and batch transaction sequence number ranges in the online stage;
step S107: the consensus node executes online transaction, then extracts batch transaction with a designated sequence number range from the transaction to be executed in the batch transaction pool, and executes the batch transactions;
step S108: the consensus node writes the already executed online transactions and batch transactions into the blockchain.
And repeatedly executing S105-S108 until the transaction processing of the batch transaction pool is completed.
In S105-S108, whether the federation chain receives a new online transaction does not affect the process flow. If the alliance chain does not receive a new online transaction, the main node still can treat the batch transaction to be executed in batches according to the preset consensus frequency to initiate online stage consensus until all the batch transactions are processed.
Fig. 9 is a flowchart for detailing the above step S101, and illustrates a processing flow of the client for batch files, as shown in fig. 9, the processing flow includes:
step S201: the client 103 sorts all transactions 403, numbering each transaction from 1 to form a transaction sequence 402;
step S202: the client 103 calculates the hash value of the transaction sequence 402, encrypts it with a private key, and generates a signature;
step S203: before the client 103 attaches the certificate and signature of the public key as a file header 401 to the transaction sequence 402, a batch of files are generated;
step S204: the client 103 compresses the batch file and sends the batch file to the batch node 101.
FIG. 10 is a flowchart for refining the above step S102, which shows the processing flow of batch nodes to batch files, and as shown in FIG. 10, the flow includes:
step S301: the file receiving module 201 of the batch node 101 receives the compressed batch files sent by the client 103, and the file checking module 202 decompresses the batch files;
step S302: and (3) checking the integrity of the file: the file verification module 202 calculates a hash value of the transaction sequence 402 of the batch of files to obtain a hash value 1, and decrypts a signature by using a public key in a certificate of the file header 401 to obtain a hash value 2; if the hash value 1 is matched with the hash value 2, the file integrity check is passed, otherwise, error information is returned to the client 103;
step S303: and (3) transaction validity checking: the document check module 202 checks each transaction 403 in the sequence of transactions 402 on a transaction-by-transaction basis, the contents of the check for each transaction 403 including: the transaction serial number is continuous, the intelligent contract corresponding to the contract ID exists and can be used, the contract function name is correct, and the number and the type of the contract parameters are correct. If all the transaction checks pass, the transaction validity check passes, otherwise, error information is returned to the client 103;
step S304: the file segmentation module 203 segments the compressed batch of files according to the number of the consensus nodes 102, the number of the file segments is equal to an integral multiple of the number of the consensus nodes 102, and taking 4 consensus nodes in a network as an example, the files can be segmented into 4, 8, 16, and the like, so that the size of the finally obtained file segments is appropriate; numbering the file fragments from 1, adding the number and the total number of the fragments to each fragment, and finally calculating the hash value of the fragments and adding the hash value to the fragments;
step S305: the fragment sending module 204 distributes the file fragments to all the consensus nodes 102, and in order to improve the distribution speed, the following two strategies may be adopted:
1-send different fragments to different common identification nodes 102, for example, the fragment serial number modulo the number of common identification nodes, and send the fragment to the node whose node ID (identity) matches the modulo;
2-sending the fragments in parallel to all the consensus nodes 402 at the same time.
Fig. 11 is a flowchart for refining the step S103, which shows a processing flow of the consensus node for fragmenting the batch files, and mainly includes two parallel flows: flow 1-consensus node 102 receives file fragments from batch node 101; flow 2-consensus node 102 receives file fragments from other consensus nodes. Wherein, the detailed steps of the process 1 are as follows:
step S401: a data receiving module 301 of the consensus node 102 receives file fragments sent by the batch nodes 101;
step S402: the data checking module 302 calculates a hash value of the file fragment, if the hash value matches a hash value attached to the file fragment, the integrity check of the fragment passes, otherwise, the batch node is required to resend the file fragment;
step S403: the data sending module 303 sends the fragment to all the other common nodes 102;
the detailed procedure of scheme 2 is as follows:
step S404: a data receiving module 301 of the consensus node 102 receives file fragments sent by other consensus nodes;
step S405: the data checking module 302 calculates a hash value of the file fragment, if the hash value matches a hash value attached to the file fragment, the integrity check of the fragment passes, otherwise, the node is required to resend the file fragment;
all the consensus nodes 102 repeat the process 1 and the process 2 until all the file fragments are received.
Fig. 12 is a detailed flowchart of the step S104, which shows a batch-phase consensus process of the consensus node, as shown in fig. 12, the detailed steps are as follows:
step S501: after the consensus node 102 collects all file fragments, the data integration module 304 merges the fragments into a complete compressed file, and decompresses the complete compressed file to obtain an original batch file;
step S502: the data integration module 302 of the consensus node 102 calculates a hash value of the transaction sequence 402 of the batch of files to obtain a hash value 1, and decrypts a signature by using a public key in a certificate of the file header 401 to obtain a hash value 2; if the hash value 1 is matched with the hash value 2, the file integrity check is passed, otherwise, error information is returned to the batch node 101;
step S503: the consensus module 305 of the consensus node 102 broadcasts the hash value to all other consensus nodes, and waits for the other consensus nodes to broadcast the hash values;
step S504: the consensus module 305 checks the hash values sent from other consensus nodes. If the hash values of all the consensus nodes including the self are consistent, broadcasting a batch-stage consensus notification to other consensus nodes, and waiting for other consensus nodes to broadcast the batch-stage consensus notification;
step S505: for each consensus node 102, the batch phase consensus is achieved if its consensus module 305 receives the batch phase consensus approval notification broadcast by all other consensus nodes. The consensus node 102 deposits the transaction sequence 402 to the batch transaction pool 306.
Fig. 13 is a detailed flowchart of the above steps S105 to S108, showing the processes including the online phase consensus process and the transaction execution process, and the detailed steps are as follows:
step S601: the data receiving module 301 of any consensus node 102 receives an online transaction request from the client 103, and the node forwards the request to a master node in the consensus node.
Step S602: the consensus module 305 of the master node builds an online stage consensus request from the online transaction requests and part of unexecuted batch transactions collected in a period of time, wherein the sum of the online transaction and the batch transaction in the consensus request is not more than the maximum value of the one-time consensus transaction quantity preset by the network.
Fig. 14 is a diagram illustrating a data structure of an online phase consensus request, as shown in fig. 14, the online phase consensus request comprises: a batch transaction serial number range 501, and an online transaction sequence 502.
The online transaction sequence 502 is composed of a plurality of online transaction requests 503 collected by the master node over a period of time, and the batch transaction sequence number range 501 is composed of a start sequence number and an end sequence number. The starting serial number is the serial number of the first unexecuted transaction in the batch transaction pool, and the calculation formula of the ending serial number is the ending serial number (the maximum value of the one-time online common-identification transaction number-the transaction number of the online transaction sequence + the starting serial number of the batch transaction-1). For example, the network sets the maximum transaction amount of one online consensus to 500, and the master node currently collects 50 online transaction requests, so the batch transaction number range contains 450 transactions at most. If online transaction of the alliance chain is busy and a large number of online requests are received in a short time, a large number of transactions exist in the online transaction sequence, and the number of batch transactions contained in the batch transaction sequence number range is correspondingly reduced, so that the online transaction is guaranteed to be preferentially executed; on the contrary, when the online transaction requests of the alliance chain are less, the batch transaction serial number range can designate more batch transactions, more batch transactions can be processed in one consensus, and the execution speed of the batch transactions is accelerated.
Step S603: the master node sends an online phase consensus request to all consensus nodes 102.
Step S604: the consensus module 305 of all consensus nodes 102 calculates the hash value of the online-phase consensus request and broadcasts the hash value to the remaining consensus nodes.
Step S605: the consensus node 102 checks the hash values sent by other consensus nodes, and broadcasts an online-stage consensus notification to all other consensus nodes if the hash values of all the consensus nodes including the consensus node are consistent.
Step S606: if the consensus node 102 receives the notification of the on-line phase consensus from all other consensus nodes, the on-line phase consensus is achieved.
Step S607: the execution module 307 of the consensus node 102 sequentially executes the online transactions in the online phase consensus request, and after the online transactions are executed, the corresponding batch transactions in the batch transaction pool 306 are taken out according to the batch transaction sequence numbers in the online phase consensus request and are executed in sequence. The consensus node ensures that the batch transaction does not affect the processing of the online transaction request by executing the online transaction first and then executing the sequence of the batch transaction.
Step S608: after the consensus node 102 executes the transaction, the online transaction and the batch transaction are written into the block chain.
The embodiment of the invention realizes the concurrent execution of batch transaction and online transaction by combining batch stage consensus and online stage consensus, the alliance chain can still process newly accessed online transaction in time while efficiently executing batch transaction, and the execution sequence of the online transaction is prior to the batch transaction, thereby giving consideration to the efficiency requirement of the batch transaction and the user-friendly requirement of the online transaction.
Compared with the traditional alliance chain and the batch transaction processing method thereof, the embodiment of the invention has the following advantages:
1. the processing efficiency of batch transaction is higher
(1) The processing pressure of the main node is reduced. In the traditional processing, a client sends a batch transaction request to a consensus node, the consensus node forwards the transaction request to a main node, the main node finally packs and broadcasts an online request within a period of time to the whole network, and the main node is the bottleneck of transaction forwarding and is busy in processing; in the embodiment of the invention, the client sends the batch files to the batch nodes, the batch nodes cut the batch files and then send the batch files to all the consensus nodes, and the consensus nodes exchange the file slices pairwise without applying pressure to the main node. The master node may be dedicated to processing online transaction requests.
(2) The number of consensus is reduced. In the traditional processing, a large number of transactions are carried out in an online consensus mode, and the number of consensus times is large; in the embodiment of the invention, the network only needs to perform batch stage consensus once no matter the number of batch transactions.
(3) The amount of consensus data is reduced. In the traditional processing, batch transactions are carried out in an online consensus mode, and a node needs to broadcast contract ID, functions and other data of each transaction request in a consensus stage; in the embodiment of the invention, the node only needs to broadcast the serial number range of the batch transaction in the online consensus stage, so that the data volume needing to be processed is reduced.
2. Has little influence on online transaction
In the traditional processing, batch transaction and online transaction of a client are sent to a blockchain network in an online transaction request mode, the batch transaction and the online transaction are in the same priority, and the batch transaction quantity is far greater than that of the online transaction generally, so that the network is busy processing the batch transaction, and cannot process the online transaction with higher requirement on timeliness later; in the embodiment of the invention, the concurrent execution of batch transaction and online transaction is realized by the method of combining batch stage consensus and online stage consensus, the alliance chain can still process newly accessed online transaction in time while efficiently executing batch transaction, and the execution sequence of the online transaction is prior to the batch transaction, thereby giving consideration to the efficiency requirement of the batch transaction and the user-friendly requirement of the online transaction.
Based on similar inventive concepts, an embodiment of the present invention further provides a job processing method based on a block chain, where the block chain includes: batch nodes and consensus nodes, the method being applied to batch nodes, preferably the method is applicable to the batch node job processing apparatus 1 described above.
Fig. 15 is a flowchart of the job processing method, which includes, as shown in fig. 15:
step 1501, receiving a batch job from a client;
step 1502, in response to successful verification of batch job integrity, performing fragment processing on the batch job according to the number of the common nodes in the block chain, and generating a plurality of batch job fragments, where each batch job fragment includes: numbering the slices;
and 1503, sending the plurality of batch job fragments to all consensus nodes respectively.
Preferably, the modulus operation can be performed on the number of the common identification nodes according to the fragment number; and then the plurality of batch operation fragments are respectively sent to all the common identification nodes according to the modulus taking operation result.
An embodiment of the present invention further provides a method for processing a job based on a block chain, where the block chain includes: batch nodes and consensus nodes, the method being applied to consensus nodes, preferably the method is applicable to the above-mentioned consensus node job processing apparatus 2.
Fig. 16 is a flowchart of the job processing method, which includes, as shown in fig. 16:
step 1601, receiving a batch job from a batch node, and receiving batch jobs from other common nodes, where the batch job includes: at least one job sequence, each job sequence comprising: the job number.
After receiving the batch jobs of the batch nodes, the integrity check operation can be carried out on the received batch jobs from the batch nodes; and responding to the success of the integrity check of the batch operation, and respectively sending the batch operation to other common identification nodes.
After receiving the batch jobs from other common nodes, performing integrity check operation on the received batch jobs from other common nodes respectively; and when the integrity check fails, sending the batch job resending request to the corresponding consensus node.
Step 1602, merging the received batch files according to the job serial number to obtain a complete batch job, where the complete batch job includes: a complete job sequence, and a file header containing public key and signature information.
After the full batch job is obtained, an integrity check operation is also required to be performed on the full batch job. The method specifically comprises the following steps: carrying out Hash operation on the complete operation sequence to obtain a sequence Hash value; decrypting the signature information according to the public key to obtain a signature hash value; and determining that the integrity check of the complete batch job is successful in response to the sequence hash value and the signature hash value matching.
Step 1603, in response to the complete batch job being successfully identified, storing the complete job sequence in a batch job pool.
Specifically, the performing the consensus operation on the complete batch job includes: sending the signature hash value to other consensus nodes, and respectively receiving the signature hash values from other consensus nodes; and determining that the complete batch job consensus is successful in response to the sent signature hash value and the received signature hash value being consistent.
And 1604, in response to successful recognition of the received multiple online jobs and the job serial numbers of the partial batch jobs in the batch job pool, preferentially processing the multiple online jobs, and after the multiple online jobs are processed, processing the partial batch jobs according to the job serial numbers.
In one embodiment, the number of the partial batch jobs may be determined according to the number of the received plurality of online jobs, and the sum of the number of the plurality of online jobs and the number of the partial batch jobs is less than or equal to a preset maximum number of jobs.
Receiving batch jobs from batch nodes and batch jobs of other common nodes, then merging the received batch files according to job serial numbers to obtain complete batch jobs, and storing the complete job sequence in a batch job pool when the complete batch jobs are successfully identified; and when the received plurality of online jobs are successfully identified with the job serial numbers of the partial batch jobs in the batch job pool, processing the plurality of online jobs preferentially, and after the plurality of online jobs are processed, processing the partial batch jobs according to the job serial numbers. Therefore, batch operation can be efficiently processed without influencing normal online operation, and the experience of a user can be improved.
For the specific execution process of the above steps, reference may be made to the description in the above method embodiment, and details are not described here again.
The present embodiment also provides an electronic device, which may be a desktop computer, a tablet computer, a mobile terminal, and the like, but is not limited thereto. In this embodiment, the electronic device may refer to the above method embodiment and the embodiment of the operation processing apparatus/system based on the block chain, and the contents thereof are incorporated herein, and repeated descriptions are omitted.
Fig. 17 is a schematic block diagram of a system configuration of an electronic apparatus 600 according to an embodiment of the present invention. As shown in fig. 17, the electronic device 600 may include a central processor 100 and a memory 140; the memory 140 is coupled to the central processor 100. Notably, this diagram is exemplary; other types of structures may also be used in addition to or in place of the structure to implement telecommunications or other functions.
In one embodiment, the blockchain-based job processing functionality may be integrated into the central processor 100. The central processor 100 may be configured to control as follows:
receiving batch jobs from batch nodes, and receiving batch jobs from other consensus nodes, the batch jobs including: at least one job sequence, each job sequence comprising: an operation serial number;
and merging the received batch files according to the operation serial number to obtain complete batch operation, wherein the complete batch operation comprises the following steps: completing the operation sequence;
in response to successful recognition of the complete batch job, storing the complete job sequence in a batch job pool;
and in response to successful identification of the received multiple online jobs and the job serial numbers of the partial batch jobs in the batch job pool, processing the multiple online jobs preferentially, and after the multiple online jobs are processed, processing the partial batch jobs according to the job serial numbers.
As can be seen from the above description, in the electronic device provided in the embodiment of the present application, a complete batch job is obtained by receiving batch jobs from batch nodes and batch jobs from other commonly-identified nodes, and then merging received batch files according to job serial numbers, and when the complete batch jobs are successfully identified, the complete job sequence is stored in a batch job pool; and when the received plurality of online jobs are successfully identified with the job serial numbers of the partial batch jobs in the batch job pool, processing the plurality of online jobs preferentially, and after the plurality of online jobs are processed, processing the partial batch jobs according to the job serial numbers. Therefore, batch operation can be efficiently processed without influencing normal online operation, and the experience of a user can be improved.
In another embodiment, the work processing apparatus/system based on the block chain may be configured separately from the central processor 100, for example, the work processing apparatus/system based on the block chain may be configured as a chip connected to the central processor 100, and the work processing function based on the block chain is realized by the control of the central processor.
As shown in fig. 17, the electronic device 600 may further include: communication module 110, input unit 120, audio processing unit 130, display 160, power supply 170. It is noted that the electronic device 600 does not necessarily include all of the components shown in FIG. 17; furthermore, the electronic device 600 may also include components not shown in fig. 17, which may be referred to in the prior art.
As shown in fig. 17, the central processor 100, sometimes referred to as a controller or operational control, may include a microprocessor or other processor device and/or logic device, the central processor 100 receiving input and controlling the operation of the various components of the electronic device 600.
The memory 140 may be, for example, one or more of a buffer, a flash memory, a hard drive, a removable media, a volatile memory, a non-volatile memory, or other suitable device. The information relating to the failure may be stored, and a program for executing the information may be stored. And the central processing unit 100 may execute the program stored in the memory 140 to realize information storage or processing, etc.
The input unit 120 provides input to the cpu 100. The input unit 120 is, for example, a key or a touch input device. The power supply 170 is used to provide power to the electronic device 600. The display 160 is used to display an object to be displayed, such as an image or a character. The display may be, for example, an LCD display, but is not limited thereto.
The memory 140 may be a solid state memory such as Read Only Memory (ROM), Random Access Memory (RAM), a SIM card, or the like. There may also be a memory that holds information even when power is off, can be selectively erased, and is provided with more data, an example of which is sometimes called an EPROM or the like. The memory 140 may also be some other type of device. Memory 140 includes buffer memory 141 (sometimes referred to as a buffer). The memory 140 may include an application/function storage section 142, and the application/function storage section 142 is used to store application programs and function programs or a flow for executing the operation of the electronic device 600 by the central processing unit 100.
The memory 140 may also include a data store 143, the data store 143 for storing data, such as contacts, digital data, pictures, sounds, and/or any other data used by the electronic device. The driver storage portion 144 of the memory 140 may include various drivers of the electronic device for communication functions and/or for performing other functions of the electronic device (e.g., messaging application, address book application, etc.).
The communication module 110 is a transmitter/receiver 110 that transmits and receives signals via an antenna 111. The communication module (transmitter/receiver) 110 is coupled to the central processor 100 to provide an input signal and receive an output signal, which may be the same as in the case of a conventional mobile communication terminal.
Based on different communication technologies, a plurality of communication modules 110, such as a cellular network module, a bluetooth module, and/or a wireless local area network module, may be provided in the same electronic device. The communication module (transmitter/receiver) 110 is also coupled to a speaker 131 and a microphone 132 via an audio processor 130 to provide audio output via the speaker 131 and receive audio input from the microphone 132 to implement general telecommunications functions. Audio processor 130 may include any suitable buffers, decoders, amplifiers and so forth. In addition, an audio processor 130 is also coupled to the central processor 100, so that recording on the local can be enabled through a microphone 132, and so that sound stored on the local can be played through a speaker 131.
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the steps of the above-mentioned block chain-based job processing method.
In summary, the embodiment of the present invention realizes the concurrent execution of the batch transaction and the online transaction by combining the batch-stage consensus and the online-stage consensus, the alliance chain can still process the newly accessed online transaction in time while efficiently executing the batch transaction, and the execution sequence of the online transaction is prior to the batch transaction, thereby considering the efficiency requirement of the batch transaction and the user-friendly requirement of the online transaction.
The preferred embodiments of the present invention have been described above with reference to the accompanying drawings. The many features and advantages of the embodiments are apparent from the detailed specification, and thus, it is intended by the appended claims to cover all such features and advantages of the embodiments which fall within the true spirit and scope thereof. Further, since numerous modifications and changes will readily occur to those skilled in the art, it is not desired to limit the embodiments of the invention to the exact construction and operation illustrated and described, and accordingly, all suitable modifications and equivalents may be resorted to, falling within the scope thereof.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The principle and the implementation mode of the invention are explained by applying specific embodiments in the invention, and the description of the embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (19)

1. A method for processing jobs based on a blockchain, the blockchain comprising: batch nodes and consensus nodes, the method being applied to the consensus nodes, the method comprising:
receiving batch jobs from batch nodes, and receiving batch jobs from other consensus nodes, the batch jobs including: at least one job sequence, each job sequence comprising: an operation serial number;
and merging the received batch files according to the operation serial number to obtain complete batch operation, wherein the complete batch operation comprises the following steps: completing the operation sequence;
in response to successful recognition of the complete batch job, storing the complete job sequence in a batch job pool;
and in response to successful identification of the received multiple online jobs and the job serial numbers of the partial batch jobs in the batch job pool, processing the multiple online jobs preferentially, and after the multiple online jobs are processed, processing the partial batch jobs according to the job serial numbers.
2. The method of claim 1, wherein after receiving the batch job from the batch node, the method further comprises:
carrying out integrity check operation on the received batch jobs from the batch nodes;
and responding to the success of the integrity check of the batch operation, and respectively sending the batch operation to other common identification nodes.
3. The method of claim 1, wherein after receiving batch jobs from other consensus nodes, the method further comprises:
respectively carrying out integrity check operation on the received batch jobs from other common nodes;
and when the integrity check fails, sending the batch job resending request to the corresponding consensus node.
4. The method of claim 1, wherein the full batch job further comprises: after obtaining the complete batch job, the method further includes:
carrying out Hash operation on the complete operation sequence to obtain a sequence Hash value;
decrypting the signature information according to the public key to obtain a signature hash value;
and determining that the integrity check of the complete batch job is successful in response to the sequence hash value and the signature hash value matching.
5. The method of claim 4, wherein the full batch job is consensus-operated by:
sending the signature hash value to other consensus nodes, and respectively receiving the signature hash values from other consensus nodes;
and determining that the complete batch job consensus is successful in response to the sent signature hash value and the received signature hash value being consistent.
6. The method of claim 1, further comprising:
and determining the number of the partial batch jobs according to the number of the received multiple online jobs, wherein the sum of the number of the multiple online jobs and the number of the partial batch jobs is less than or equal to a preset maximum job number.
7. A method for processing jobs based on a blockchain, the blockchain comprising: batch nodes and consensus nodes, the method being applied to batch nodes, the method comprising:
receiving batch jobs from a client;
responding to the success of the integrity check of the batch operation, carrying out fragment processing on the batch operation according to the number of the common identification nodes in the block chain, and generating a plurality of batch operation fragments, wherein each batch operation fragment comprises: numbering the slices;
and respectively sending the batch job fragments to all the consensus nodes.
8. The method of claim 7, wherein sending the plurality of batch job tiles to respective consensus nodes comprises:
performing modulus operation on the number of the common identification nodes according to the fragment number;
and respectively sending the batch operation fragments to all the consensus nodes according to the modulus taking operation result.
9. A blockchain-based job processing apparatus, the blockchain comprising: batch node and consensus node, the device is located consensus node end, the device includes:
a data receiving unit, configured to receive a batch job from a batch node and receive batch jobs from other common nodes, where the batch job includes: at least one job sequence, each job sequence comprising: an operation serial number;
and the merging processing unit is used for merging the received batch files according to the operation serial numbers to obtain complete batch operation, and the complete batch operation comprises the following steps: completing the operation sequence;
the storage unit is used for responding to successful consensus on the complete batch jobs and storing the complete job sequence in a batch job pool;
and the job processing unit is used for preferentially processing the plurality of online jobs in response to successful identification of the received plurality of online jobs and the job serial numbers of the partial batch jobs in the batch job pool, and processing the partial batch jobs according to the job serial numbers after the plurality of online jobs are processed.
10. The apparatus of claim 9, further comprising:
the first batch job checking unit is used for carrying out integrity checking operation on the received batch jobs from the batch nodes;
and the batch job sending unit is used for responding to the success of the integrity check of the batch jobs and respectively sending the batch jobs to other common nodes.
11. The apparatus of claim 9, further comprising:
the second batch job checking unit is used for respectively carrying out integrity checking operation on the received batch jobs from other common nodes;
and the retransmission request sending unit is used for sending the batch job retransmission request to the corresponding consensus node when the integrity check fails.
12. The apparatus of claim 9, wherein the full batch job further comprises: a header containing a public key and signature information, the apparatus further comprising:
the sequence hash value generation unit is used for carrying out hash operation on the complete operation sequence to obtain a sequence hash value;
the signature hash value generating unit is used for carrying out decryption operation on the signature information according to the public key to obtain a signature hash value;
and the verification result unit is used for responding to the matching of the sequence hash value and the signature hash value and determining that the integrity verification of the complete batch operation is successful.
13. The apparatus of claim 12, further comprising:
a consensus unit for performing a consensus operation on the complete batch job,
the consensus unit comprises:
the hash value receiving and sending module is used for sending the signature hash value to other common identification nodes and respectively receiving the signature hash values from other common identification nodes;
and the consensus result module is used for responding to the consistency of the sent signature hash value and the received signature hash value and determining that the complete batch operation is successfully consensus.
14. The apparatus of claim 9, further comprising:
and the batch job number determining unit is used for determining the number of the partial batch jobs according to the number of the received multiple online jobs, and the sum of the number of the multiple online jobs and the number of the partial batch jobs is less than or equal to a preset maximum job number value.
15. A blockchain-based job processing apparatus, the blockchain comprising: batch node and consensus node, the device is located batch node end, the device includes:
the batch job receiving unit is used for receiving batch jobs from the client;
and the operation fragment generating unit is used for responding to the success of the integrity check of the batch operation, carrying out fragment processing on the batch operation according to the number of the common identification nodes in the block chain, and generating a plurality of batch operation fragments, wherein each batch operation fragment comprises: numbering the slices;
and the operation fragment sending unit is used for respectively sending the batch operation fragments to the common identification nodes.
16. The apparatus according to claim 15, wherein the job fragment transmitting unit includes:
the module taking module is used for carrying out module taking operation on the number of the common identification nodes according to the fragment numbers;
and the operation fragment sending module is used for sending the batch operation fragments to all the common nodes respectively according to the modulus taking operation result.
17. A blockchain-based job processing system, the system comprising: the job processing apparatus at the common node side according to any one of claims 9 to 14, and the job processing apparatus at the batch node side according to claim 15 or 16.
18. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 8 are implemented when the processor executes the program.
19. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 8.
CN202110087247.1A 2021-01-22 2021-01-22 Operation processing method, device and system based on block chain Pending CN112783853A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110087247.1A CN112783853A (en) 2021-01-22 2021-01-22 Operation processing method, device and system based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110087247.1A CN112783853A (en) 2021-01-22 2021-01-22 Operation processing method, device and system based on block chain

Publications (1)

Publication Number Publication Date
CN112783853A true CN112783853A (en) 2021-05-11

Family

ID=75758569

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110087247.1A Pending CN112783853A (en) 2021-01-22 2021-01-22 Operation processing method, device and system based on block chain

Country Status (1)

Country Link
CN (1) CN112783853A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114066456A (en) * 2022-01-13 2022-02-18 环球数科集团有限公司 ERC 1155-based cross-chain NFT transfer and settlement system
CN114584567A (en) * 2022-03-04 2022-06-03 中国银行股份有限公司 Block chain-based batch job processing method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114066456A (en) * 2022-01-13 2022-02-18 环球数科集团有限公司 ERC 1155-based cross-chain NFT transfer and settlement system
CN114066456B (en) * 2022-01-13 2022-04-08 环球数科集团有限公司 ERC 1155-based cross-chain NFT transfer and settlement system
CN114584567A (en) * 2022-03-04 2022-06-03 中国银行股份有限公司 Block chain-based batch job processing method and device
CN114584567B (en) * 2022-03-04 2024-04-26 中国银行股份有限公司 Block chain-based batch operation processing method and device

Similar Documents

Publication Publication Date Title
CN107294729B (en) Communication method and device between different nodes in block chain
CN112699081B (en) File self-certification method and device based on blockchain
CN110601816B (en) Lightweight node control method and device in block chain system
CN110597911A (en) Certificate processing method and device for block chain network, electronic equipment and storage medium
CN112783853A (en) Operation processing method, device and system based on block chain
CN111563820B (en) Intelligent contract parallel execution method and device
CN111949958B (en) Authorization authentication method and device in Oauth protocol
CN112837163A (en) Block chain based batch transaction uplink method and system
CN111464295B (en) Bank card making method and device
CN110070357B (en) Data processing method, device and system
CN112787812A (en) Block chain-based calculation job processing method, device and system
CN111931209B (en) Contract information verification method and device based on zero knowledge proof
CN111680067A (en) Data processing method, device and system based on block chain
CN112767113A (en) Account checking data processing method, device and system based on block chain
CN112732650A (en) File fragmentation method and device
CN111314172A (en) Data processing method, device and equipment based on block chain and storage medium
CN111222869A (en) Transaction data processing method, device, computer equipment and medium
CN108900311A (en) A kind of no certificate bluetooth key endorsement method and system
CN111666589A (en) Block chain distributed risk data sharing system and method
CN116707821A (en) Transaction data processing method and device based on blockchain
CN114493884A (en) Data interaction method, device and system
CN112995317B (en) Block chain consensus method and block chain link points
CN112860805A (en) Block chain data interaction method and system
CN112119608B (en) System and asynchronous protocol for verifiable secret sharing
CN111404954A (en) Hierarchical sharing method and device

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