CN112634034A - Reservation method, reservation device, electronic equipment and computer readable storage medium - Google Patents

Reservation method, reservation device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN112634034A
CN112634034A CN202011290217.2A CN202011290217A CN112634034A CN 112634034 A CN112634034 A CN 112634034A CN 202011290217 A CN202011290217 A CN 202011290217A CN 112634034 A CN112634034 A CN 112634034A
Authority
CN
China
Prior art keywords
reservation
ordering
transaction request
random number
transaction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011290217.2A
Other languages
Chinese (zh)
Other versions
CN112634034B (en
Inventor
陈志明
姜鹏
陈晨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Citic Bank Corp Ltd
Original Assignee
China Citic Bank Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Citic Bank Corp Ltd filed Critical China Citic Bank Corp Ltd
Priority to CN202011290217.2A priority Critical patent/CN112634034B/en
Publication of CN112634034A publication Critical patent/CN112634034A/en
Application granted granted Critical
Publication of CN112634034B publication Critical patent/CN112634034B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3821Electronic credentials
    • G06Q20/38215Use of certificates or encrypted proofs of transaction rights
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3825Use of electronic signatures
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Multimedia (AREA)
  • General Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Technology Law (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the application provides a reservation method, a reservation device, electronic equipment and a computer-readable storage medium. The method comprises the following steps: receiving a block packaged with a reservation ordering transaction request; acquiring a random number corresponding to the reservation ordering transaction request based on the request type of the reservation ordering transaction request; the reservation ordered transaction requests are ordered based on the random number. In the scheme, due to the fact that the reservation ordering is carried out based on the random numbers, the fairness of ordering results can be guaranteed, and the business development is facilitated.

Description

Reservation method, reservation device, electronic equipment and computer readable storage medium
Technical Field
The present application relates to the field of block chain technologies, and in particular, to a reservation method, an apparatus, an electronic device, and a computer-readable storage medium.
Background
When a user transacts business in an organization such as a bank, the business to be transacted may need to be reserved, so that a business system of the organization such as the bank determines a business sequence based on the reservation of the user.
The block chain has the advantages of decentralization, transparency, openness, irreparability of data and the like, and is more and more valued by people. The block chain technology is used for processing services such as reservation and queuing in banking services, so that the service transparency can be improved, and the development of the banking services is facilitated. However, at present, fairness cannot be guaranteed when service reservation is performed on a block chain, and development of services is affected.
Disclosure of Invention
The present application aims to solve at least one of the above technical drawbacks. The technical scheme adopted by the application is as follows:
in a first aspect, an embodiment of the present application provides a reservation method, where the method includes:
receiving a block packaged with a reservation ordering transaction request;
acquiring a random number corresponding to the reservation ordering transaction request based on the request type of the reservation ordering transaction request;
the reservation ordered transaction requests are ordered based on the random number.
Optionally, obtaining a random number corresponding to the reservation ordering transaction request based on the request type of the reservation ordering transaction request includes:
and if the request type of the reservation ordering transaction request is the global reservation ordering transaction request, acquiring a random number corresponding to the reservation ordering transaction request broadcast by an ordering node in the block chain.
Optionally, the method further includes:
acquiring evidence corresponding to the random number broadcast by the sequencing node;
ordering the reservation ordering transaction requests based on the random number, comprising:
the random number is verified based on the evidence.
And if the verification is passed, sequencing the reservation sequencing transaction request based on the random number.
Optionally, the sorting node generates a random number and an evidence corresponding to the reservation sorting transaction request, based on the following manner:
based on the private key of the ordering node and the transaction content of the reservation ordering transaction request, and based on a preset digital signature algorithm, generating a random number and evidence corresponding to the reservation ordering transaction request.
Optionally, the ordering the reservation ordering transaction request based on the random number comprises:
determining whether ordering information of events corresponding to the reservation ordering transaction request exists in the service node;
if so, adding a sequencing result of the reservation sequencing transaction request to the sequencing information;
if not, creating ranking information based on the ranking result of the reservation ranking transaction request.
Optionally, obtaining a random number corresponding to the reservation ordering transaction request based on the request type of the reservation ordering transaction request includes:
and if the request type of the reservation ordering transaction request is the local reservation ordering transaction request, generating a random number corresponding to the reservation ordering transaction request.
Optionally, the method further includes:
evidence corresponding to the random number is generated.
Optionally, the ordering the reservation ordering transaction request based on the random number comprises:
determining whether corresponding sequencing information exists in the service node;
if so, adding a sequencing result of the reservation sequencing transaction request to the sequencing information;
if not, creating ranking information based on the ranking result of the reservation ranking transaction request.
Optionally, the block is wrapped by a leader consensus node in the block chain.
In a second aspect, an embodiment of the present application provides a reservation apparatus, including:
the block receiving module is used for receiving a block packaged with a reservation ordering transaction request;
the random number acquisition module is used for acquiring a random number corresponding to the reservation ordering transaction request based on the request type of the reservation ordering transaction request;
and the ordering module is used for ordering the reservation ordering transaction requests based on the random number.
Optionally, the random number obtaining module is specifically configured to:
and if the request type of the reservation ordering transaction request is the global reservation ordering transaction request, acquiring a random number corresponding to the reservation ordering transaction request broadcast by an ordering node in the block chain.
Optionally, the apparatus further comprises:
the evidence obtaining module is used for obtaining evidence corresponding to the random number broadcasted by the sequencing node;
the sorting module is specifically configured to:
the random number is verified based on the evidence.
And if the verification is passed, sequencing the reservation sequencing transaction request based on the random number.
Optionally, the sorting node generates a random number and an evidence corresponding to the reservation sorting transaction request, based on the following manner:
based on the private key of the ordering node and the transaction content of the reservation ordering transaction request, and based on a preset digital signature algorithm, generating a random number and evidence corresponding to the reservation ordering transaction request.
Optionally, the sorting module is specifically configured to:
determining whether ordering information of events corresponding to the reservation ordering transaction request exists in the service node;
if so, adding a sequencing result of the reservation sequencing transaction request to the sequencing information;
if not, creating ranking information based on the ranking result of the reservation ranking transaction request.
Optionally, the random number obtaining module is specifically configured to:
and if the request type of the reservation ordering transaction request is the local reservation ordering transaction request, generating a random number corresponding to the reservation ordering transaction request.
Optionally, the apparatus further comprises:
and the evidence generation module generates evidence corresponding to the random number.
Optionally, the sorting module is specifically configured to:
determining whether corresponding sequencing information exists in the service node;
if so, adding a sequencing result of the reservation sequencing transaction request to the sequencing information;
if not, creating ranking information based on the ranking result of the reservation ranking transaction request.
Optionally, the block is wrapped by a leader consensus node in the block chain.
In a third aspect, an embodiment of the present application provides an electronic device, including: a processor and a memory;
a memory for storing operating instructions;
a processor, configured to execute the reservation method as shown in any implementation of the first aspect of the present application by calling an operation instruction.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the reservation method shown in any implementation manner of the first aspect of the present application.
The technical scheme provided by the embodiment of the application has the following beneficial effects:
according to the scheme provided by the implementation of the application, the block packaged with the reservation ordering transaction request is received, and the random number corresponding to the reservation ordering transaction request is obtained based on the request type of the reservation ordering transaction request, so that the reservation ordering transaction request is ordered based on the random number. In the scheme, due to the fact that the reservation ordering is carried out based on the random numbers, the fairness of ordering results can be guaranteed, and the business development is facilitated.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments of the present application will be briefly described below.
Fig. 1 is a schematic flowchart of a reservation method according to an embodiment of the present application;
FIG. 2 is a schematic diagram illustrating a process for calculating a random number according to an embodiment of the present disclosure;
FIG. 3 is a process for calculating a random number according to an embodiment of the present applicationIn the calculation of gamma-hxA specific flow diagram of (1);
FIG. 4 is a flow chart illustrating the validity verification of a random number according to an embodiment of the present disclosure;
fig. 5 is a schematic flowchart of a specific implementation of a reservation method according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a reservation apparatus according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present invention.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
In the prior art, when reservation ordering is performed based on a block chain, the following problems may exist:
1. the block-out person in the public chain can choose to pack the transactions favorable to himself, for example, the transactions with high commission fees, which can affect the fairness of reservation ordering.
2. In the block-out process of the block chain, the time sequence of the algorithm for packaging transaction is not strong, and the accuracy of reservation sequencing is influenced.
3. In the alliance chain, the business sequence is generally determined directly according to the transaction sequence in the block, and certain improvement space still exists in the fairness.
The reservation method, the reservation device, the electronic device and the computer-readable storage medium provided by the embodiments of the present application aim to solve at least one of the above technical problems in the prior art.
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
The following describes the technical solutions of the present application and how to solve the above technical problems with specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 1 shows a schematic flow diagram of a reservation method provided in an embodiment of the present application, and as shown in fig. 1, the method mainly includes:
step S110: receiving a block packaged with a reservation ordering transaction request;
step S120: acquiring a random number corresponding to the reservation ordering transaction request based on the request type of the reservation ordering transaction request;
step S130: the reservation ordered transaction requests are ordered based on the random number.
In the embodiment of the application, a user can initiate a reservation and ordering transaction request through a client and send the reservation and ordering transaction request to a block chain. The request information in the reservation ordered transaction request may include a transaction ID, an event identification, a transaction date, a client signature on the transaction request, and the like. The reservation ordered transaction request may be packaged as a block and output as a block.
In the embodiment of the application, after the sorting node receives the block, the validity of the block can be verified. After the verification is passed, the request type of the reservation ordering transaction request can be determined, and random numbers are respectively obtained by different modes aiming at the reservation ordering transaction requests of different request types.
In the embodiment of the application, after the random number is acquired, the service node may sort the reservation-sorted transaction requests based on the random number.
Because the ordering is performed based on the random numbers generated randomly, the ordering result of each reservation ordering transaction request has fairness on the premise of ensuring the fairness of the random numbers.
According to the method provided by the implementation of the application, the block packaged with the reservation ordering transaction request is received, and the random number corresponding to the reservation ordering transaction request is obtained based on the request type of the reservation ordering transaction request, so that the reservation ordering transaction request is ordered based on the random number. In the scheme, due to the fact that the reservation ordering is carried out based on the random numbers, the fairness of ordering results can be guaranteed, and the business development is facilitated.
In an optional manner of the embodiment of the present application, obtaining a random number corresponding to a reservation ordering transaction request based on a request type of the reservation ordering transaction request includes:
and if the request type of the reservation ordering transaction request is the global reservation ordering transaction request, acquiring a random number corresponding to the reservation ordering transaction request broadcast by an ordering node in the block chain.
In the embodiment of the application, different request types can be defined in the reservation and ordering transaction requests, so that a reservation and ordering transaction request set is respectively constructed for the reservation and ordering transaction requests of different request types, and random numbers of the reservation and ordering transaction requests in the reservation and ordering transaction request set are respectively obtained in different modes.
In an embodiment of the present application, an "event" field may be added to a reservation queued transaction request to identify the type of request for the reservation queued transaction request,
the request types may include global reservation ordered transaction requests as well as local reservation ordered transaction requests. Specifically, a global reservation sort transaction request, i.e., a transaction request that sorts all reservation queuing transaction requests within a received block, such as a reservation request for a commemorative coin. The local reservation ordering transaction request is a transaction request for ordering a reservation queuing transaction request initiated by a certain service node, for example, a queuing request of a banking outlet.
As an example, if the first bit of the "event" field is 1, it may be determined that the request type is a global reservation ordered transaction request; if the first bit of the "event" field is 0, it can be determined that the request type is a local reservation ordering transaction request.
In actual use, the "event" field in the reservation ordering transaction request may be encoded as follows:
the "event" identifier may be 64 bits in length and encoded as follows:
(1) if the first bit is a global reservation ordering identification bit 1, the transaction request needs global reservation ordering; if the first bit is the local reserved sorting identification bit 0, it means that only local sorting is needed.
(2) The last 63 bits of the "event" identifier encode the event to which the request is directed
a. If the first bit is 1, the remaining bits are the time of the event initiation (the unit is day, generally days 1/1970, and the final analysis result can be the actual time) and the number of the corresponding event, which is marked as 1| | | time | | eventID.
b. If the first bit is 0, the rest bits are the time of event initiation and the number of the corresponding node, and are marked as 0| | time | | | nodeID.
The specific event is pointed to by the encoding value (identification bit + timestamp + event ID), so that the uniqueness of the event encoding is ensured. Wherein, the timestamp + eventID is ID pointing to the global queuing event, and the timestamp + nodeID is ID pointing to a certain node in the block.
In the embodiment of the application, in the field of "event" in the global reservation ordering transaction request, the event ID may correspond to the reserved service, the global reservation ordering transaction requests corresponding to each service may be respectively constructed into transaction sets, and random numbers are respectively calculated for the global reservation ordering transaction requests in the transaction sets.
In an optional manner of the embodiment of the present application, the method further includes:
acquiring evidence corresponding to the random number broadcast by the sequencing node;
ordering the reservation ordering transaction requests based on the random number, comprising:
the random number is verified based on the evidence.
And if the verification is passed, sequencing the reservation sequencing transaction request based on the random number.
In this embodiment of the present application, for a global reservation ordering transaction request, an ordering node may be designated in a service node, and a random number is generated by the ordering node and is broadcasted in a block chain, so that the service node receives the random number.
In the embodiment of the application, the sequencing node can generate the random number and the evidence corresponding to the random number at the same time, and the verification of the corresponding random number can be realized based on the evidence. The service node can perform reservation ordering based on the random number only when the random number passes verification so as to ensure the fairness of the reservation ordering.
In an optional mode of the embodiment of the application, the generation of the random number and the evidence corresponding to the reservation ordering transaction request by the ordering node is based on the following mode:
based on the private key of the ordering node and the transaction content of the reservation ordering transaction request, and based on a preset digital signature algorithm, generating a random number and evidence corresponding to the reservation ordering transaction request.
In the embodiment of the application, the preset digital signature algorithm may be a unique signature algorithm, and based on the data signature algorithm, a unique random number may be generated and an evidence corresponding to the random number may be generated when the private key of the sorting node and the transaction content of the reservation sorting transaction request are input. The random number generated based on the digital signature algorithm can be verified based on evidence to ensure the fairness of the random number.
In an optional mode of the embodiment of the present application, the ordering the reservation ordering transaction requests based on the random number includes:
determining whether ordering information of events corresponding to the reservation ordering transaction request exists in the service node;
if so, adding a sequencing result of the reservation sequencing transaction request to the sequencing information;
if not, creating ranking information based on the ranking result of the reservation ranking transaction request.
In the embodiment of the present application, when the global reservation and ordering transaction request is ordered, in an "event" field in the reservation and ordering transaction request, an event ID may correspond to a reserved service, ordering information (e.g., an ordering queue) of a certain service may already exist in a service node, and at this time, an ordering result of the reservation and ordering transaction request corresponding to the service in a newly added block may be added to the ordering information.
If the service node does not have the ordering information of a certain service, the ordering information can be established based on the ordering result of the reservation ordering transaction request corresponding to the service in the newly added block.
In an optional manner of the embodiment of the present application, if the request type of the reservation ordering transaction request is a local reservation ordering transaction request, acquiring a random number corresponding to the reservation ordering transaction request includes:
and generating a random number corresponding to the reservation ordering transaction request.
In the embodiment of the application, the corresponding service node can be determined through the node ID in the 'event' field in the local reservation ordering transaction request, the local reservation ordering transaction requests corresponding to the same service node in the block are constructed into the transaction set, and the service node respectively generates corresponding random numbers aiming at all the local reservation ordering transaction requests in the transaction set, so that the local reservation ordering transaction requests are ordered based on the random numbers.
In an optional manner of the embodiment of the present application, the method further includes:
and generating evidence corresponding to the random number broadcasted by the sequencing node.
In the embodiment of the application, the service node can generate the random number and simultaneously generate the evidence corresponding to the random number. The service node may retain the evidence for subsequent verification of the corresponding random number based on the evidence.
In this embodiment of the present application, the service node may input the private key of the service node and the transaction content of the reservation ordering transaction request by using the above digital signature algorithm, generate a unique random number, and generate an evidence corresponding to the random number.
In an optional mode of the embodiment of the present application, the ordering the reservation ordering transaction requests based on the random number includes:
determining whether corresponding sequencing information exists in the service node;
if so, adding a sequencing result of the reservation sequencing transaction request to the sequencing information;
if not, creating ranking information based on the ranking result of the reservation ranking transaction request.
In the embodiment of the present application, when the local reservation ordering transaction request is ordered, the service node may already have ordering information (e.g., an ordering queue) of the corresponding service, and at this time, an ordering result of the reservation ordering transaction request in the newly added block may be added to the ordering information.
If the ordering information of the corresponding service does not exist in the service node, the ordering information can be established based on the ordering result of the reservation ordering transaction request in the newly added block.
In an alternative of the embodiments of the present application, the block is packed out of blocks by a leader node in a block chain.
In the embodiment of the application, a consensus algorithm of a leader mode can be adopted, one consensus node is selected from a plurality of consensus nodes according to the consensus algorithm to serve as a leader consensus node, and the leader consensus node is responsible for transaction packaging to generate a new block.
And the non-leader consensus node receives the reservation ordering transaction request sent by the node and forwards the reservation ordering transaction request to the leader consensus node.
The leader consensus node may pack the deals in order, and specifically, the leader consensus node may serialize the received deals based on a consensus algorithm, pack the deal blocks in order of the received deals, that is, pack the deal blocks first, and finally broadcast the deal blocks to other nodes through the block.
In the embodiment of the application, in the block packed by the leader consensus node, the actual occurrence time of each reservation ordering transaction request may be relatively close, and for the sake of fairness, the reservation ordering transaction requests in the block may be randomly ordered based on a random number.
In this embodiment of the present application, a communication architecture of raft consensus + alliance chain may be adopted.
The raft algorithm contains three roles, which are: follower (Follower), Candidate (Candidate), and Leader (Leader).
Leader (Leader): the leader is generated by the re-ordering node's dynamic election, the leader processes all client requests, and the leader copies the message to the follower node. Typically, there is only one leader in the system and all other nodes are followers.
Follower (Follower): are passive and do not send any requests, but simply respond to requests from the leader or candidate. If a client contacts the follower, the follower will redirect the request to the leader;
candidate (Follower): initially, all nodes are followers. And once a follower does not normally communicate and does not receive the heartbeat request sent by the leader, the follower is converted into a candidate. One or more candidates attempt to become a leader. If a candidate wins the election, he then acts as a leader for the next tenure.
The method comprises the following steps that the Raft starts election of a leading node by using a heartbeat mechanism, and the election process is as follows:
(1) all nodes in the system are in a following state initially, and an election timer is started simultaneously;
(2) the leader periodically sends heartbeat signals to all followers;
(3) if a certain node does not receive the heartbeat request sent by the leader after the time of the election timer is exceeded, the follower is converted into a candidate;
(4) a candidate sends a voting request to other nodes, if the candidate is agreed by more than half of the nodes, the candidate can be converted into a leader, and the rest candidates return to a following state;
(5) if the election is overtime, re-election;
(6) after the leader election is completed, the leader sends heartbeat signals to other nodes at regular time to inform the other nodes that the leader is still running, and meanwhile, the election timers of the nodes are reset.
Fig. 2 shows a process of calculating a random number provided in the embodiment of the present application, which specifically includes:
(1) calculating gamma as hx(see FIG. 3 for a specific scheme);
(2) randomly selecting k epsilon to Zq; q is the order of the base point of the elliptic curve and is an elliptic curve parameter; zq denotes a number modulo q, e.g. Z30,1, 2. Typically q is close to 2256
(3) Verifying whether k is equal to 0 or 1, and if so, reselecting k; if not, continuing to execute the next step;
(4) calculating c ═ H (g, H, g)x,hx,gk,hk);
Wherein g is a base point on the elliptic curve and is an elliptic curve parameter;
h is the point calculated in (1);
gxis the public key of the reordering node;
hxh can be obtained from h and xx
gkG can be obtained from k and gk
hkH can be obtained from h and kk
Finally, by hash operation, c ═ H (g, H, g) is obtainedx,hx,gk,hk)。
(5) Calculating s ═ k-cxmodq; q is the order of the base point of the elliptic curve.
(6) And verifying whether s is equal to 0 or 1, if so, reselecting k, and if not, continuing to execute the next step.
(7) And outputting a result: the evidence pi is (γ, c, s), and hashing γ yields β which is the generated random number.
Finally, the above results can be collated, and the output transaction information is:
{ transaction ID1Random number b1, proof pi1
Transaction ID2Random number b1, proof pi2
…;
Transaction IDnRandom number bnEvidence of Pin}
Wherein the content of the first and second substances,
transaction ID: the original transaction event identification can be analyzed according to the transaction ID;
evidence pi: outputting through a unique signature algorithm for verifying the validity of the random number;
random number: a random number output by a unique signature algorithm.
The random number is calculated through the algorithm, and the output random number cannot be controlled by the sequencing node, so that the algorithm is high in fairness.
Fig. 3 shows the calculation of γ ═ h in the calculation of the random numberxThe specific process comprises the following steps:
a) h-Alpha (Alpha is the transaction content pass through for ordering transaction requests for reservations)
The result of the Hash operation, i.e. Alpha-Hash (the transaction content)), initializes hx=h;
b) Taking hx as the abscissa, and solving the ordinate h according to an elliptic curve algorithmy
c) Judging whether the algorithm can pass h according to the elliptic curvexSolve out hy(ii) a If yes, say hx is on the elliptic curve, then output h ═ h (h)x,hy) (ii) a If not, explain hxIf not on the elliptic curve, continuing to execute hx+ + until h is passed according to the elliptic curve algorithmxH can be calculatedy
d) By means of a private key x and the coordinate h ═ h (h)x,hy) Then y-h can be calculatedxThe calculation is a calculation on an elliptic curve.
Fig. 4 shows a validity verification process of a random number provided in the embodiment of the present application, which specifically includes:
(1) the public key g can be resolved from the certificate of the service node generating the random numberx. Inputting the public key g parsed from the certificatexThe received evidence pi, the random number and the transaction information;
(2) resolving gamma, c and s from the evidence pi, and calculating u-gx)c·gs
(3) Acquiring the transaction needing to be verified from the transaction set according to the transaction ID, and performing hash operation on the transaction content to obtain Alpha;
(4) h (coordinate) is calculated by Alpha, and the method is the same as the method for calculating h in FIG. 3;
(5) calculating v ═ (gamma)c·hs
(6) Verification of c and H (g, H, g)xγ, u, v) are equal;
c is resolved according to the evidence pi;
g is a base point on the elliptic curve;
h is a point on the elliptic curve calculated in 3);
gxis the public key of the random source node;
gamma is resolved according to the evidence pi;
u is calculated by b) in the process;
v is calculated by e) in this scheme.
Finally, for (g, h, g)xGamma, u, v) are hashed to obtain H (g, H, g)xγ, u, v), is compared with cIf yes, the next step is continuously executed, otherwise, the verification fails.
(7) Verifying whether the input random number and H (gamma) are equal;
comparing the input random number with H (gamma), wherein gamma is resolved according to the evidence pi, and H (gamma) is obtained by carrying out Hash operation on gamma; if the two are equal, the verification is passed, otherwise, the verification fails.
(8) The verification is passed, and the corresponding random number of the transaction is legal.
All verifications can be passed in practical use without special conditions. Meanwhile, during verification, Alpha is calculated through the transaction information received by the node, and then the validity of the random number is verified, and any data inconsistency in the process can cause the verification of the random number not to pass.
Fig. 5 is a flowchart illustrating a specific implementation manner of a reservation method according to an embodiment of the present application. The method comprises the following specific steps:
(1) each client initiates a reservation and ordering transaction request to the blockchain network, which includes a transaction ID, a transaction date, an event identifier (64 bits, for convenience of example, the complement before the date is omitted), a signature:
the client 1 initiates a transaction 1: {0101234821, 20200818, 1| | |2020081810| | |01234516, signature 1 };
client 1 initiates transaction 2: {0101234822, 20200818, 1| | |2020081810| | |01234516, signature 2 };
the client 2 initiates a transaction 3: {0101234823, 20200818, 1| | |2020081810| | |01234616, signature 3 };
the client 2 initiates a transaction 4: {0101234824, 20200818, 0| | |2020081810| | |00000316, signature 4 };
the client 2 initiates a transaction 5: {0101234825, 20200818, 0| | |2020081810| | |00000316, signature 5 };
(2) the node 1 and the node 3 receive the request information of the reservation and ordering transaction request:
a. verifying the signature of the client, confirming whether the identity of the client is authorized to execute the transaction, if not, prompting that the transaction is invalid, and returning prompting information to the client; if so, continuing to verify;
b. verifying the legality of the transaction content, and if the transaction content is legal, continuing to execute the next step; and if the client is illegal, returning failure information to the client.
(3) And the nodes 1 and 5 pass the verification and send the transaction to the common node set.
(4) And the consensus node 1 receives the trade 1 and the trade 2, and the consensus node 2 receives the trade 3, the trade 4 and the trade 5, and forwards the received trade to the leader consensus node.
(5) And the leader consensus node packs the received transaction sequences, packs all the transactions 1,2, 3, 4 and 5 into a new block with the block height of 80, and broadcasts the block in the whole network.
(6) The node 1, the node 2, the node 3 and the reordering node receive a new block with the height of 80, each node analyzes the block, verifies the validity of the block, circularly verifies the validity of transaction contents, judges a flow according to an event identifier in a scheme after the verification is passed, and generates two transaction sets:
transaction set P with event identification highest bit 1:
transaction ID Event identification Date of transaction Signature
Transaction 1 0101234821 1||2020081810||01234516 20200818 Signature 1
Transaction 2 0101234822 1||2020081810||01234516 20200818 Signature 2
Transaction 3 0101234823 1||2020081810||01234616 20200818 Signature 3
Transaction set Q with the highest bit of 0 of the event identification:
transaction ID Event identification Date of transaction Signature
Transaction 4 0101234824 0||2020081810||00000316 20200818 Signature 4
Transaction 5 0101234825 0||2020081810||00000316 20200818 Signature 5
Firstly, transaction waiting reordering node ordering information in a set P;
the sequencing node circularly processes the transactions (transaction 1, transaction 2 and transaction 3) in the transaction set P with the highest bit of the event identifier being 1:
1) the corresponding random number is calculated by the unique signature algorithm described in the scheme:
transaction 1:
alpha1 ═ H (trade 1);
b. outputting an evidence pi 1 ═ (γ 1, c1, s 1);
c. a new string random seed β 1 ═ H (γ 1);
d. the random number generator generates a reliable random number n1 according to the random seed beta 1;
transaction 2:
alpha2 ═ H (trade 2);
b. outputting one evidence pi 2 ═ (γ 2, c2, s 2);
c. a new string random seed β 2 ═ H (γ 2);
d. the random number generator generates a reliable random number n2 according to the random seed beta 2;
transaction 3:
alpha3 ═ H (transaction 3);
b. outputting one evidence pi 3 ═ (γ 3, c3, s 3);
c. a new string random seed β 3 ═ H (γ 3);
d. the random number generator generates a reliable random number n3 according to the random seed beta 3;
2) the sequencing node broadcasts the generated random number n and evidence pi to each node:
{ block height, { transaction ID: random number n, proof pi, … …, certificate of ordered node }
{80,
{0101234821, random number n1, witness π 1;
0101234822, random number n2, witness π 2;
0101234823, random number n3, witness pi 3},
certificate of sorting node }
After receiving the random number and the evidence broadcast by the reordering node, the node 1, the node 2 and the node 3 sequentially verify the validity of the random number (the specific verification process refers to fig. 4), and after the verification is passed, the transaction continues.
1) Analyzing the original transaction event identification according to the transaction ID;
2) temporarily storing the transaction ID and the random number according to the analyzed event identifier;
transaction ID Event identification Date of transaction Random number
0101234821 1||2020081810||01234516 20200818 n1=87
0101234822 1||2020081810||01234516 20200818 n2=23
0101234823 1||2020081810||01234616 20200818 n3=65
3) The node divides the request into a plurality of sets based on the event identification, and sorts all transactions under the same event according to the random number in an ascending order, wherein the sequence number is a sorting order, and the sequence after sorting is as follows;
Figure BDA0002782638800000151
Figure BDA0002782638800000161
Figure BDA0002782638800000162
4) inquiring node queuing information according to the event identifier;
judging whether the node has queuing information:
if yes, adding the transactions in sequence, wherein the position of the transaction is the reserved serial number of the transaction;
otherwise, newly building queuing information, and adding the transactions in sequence, wherein the serial number of the exchange is the reserved serial number of the exchange;
012345, add the new transaction in set 1 because it gathers the existing queuing information:
Figure BDA0002782638800000163
012346 set has no queuing information, then 012346 set is created as follows:
Figure BDA0002782638800000164
5) the node records all random numbers and evidences, the reservation sequence numbers 88 and 89 are fed back to the initiator client 1 by the transaction IDs 0101234822 and 0101234821, and the reservation sequence number 1 is fed back to the initiator client 2 by the transaction ID 010123482.
Fourthly, the set Q with the highest position of the event identification being 0 is a local reservation ranking, each node judges whether the number of the corresponding node in the transaction points to the node, if the node points to the node, the node calculates random numbers for the transactions in a circulating mode, and ranks:
1) the node 1 and the node 2 judge that the node numbers sent in the transaction in the set Q do not point to the node, and all the node numbers are not processed;
the node 3 processes the transactions in the set Q:
calculating the random number corresponding to each transaction in the node through a unique signature algorithm in the scheme:
transaction id: 0101234824 corresponding to the random number n4 ═ 143
Transaction id: 0101234825 corresponding to random number n5 ═ 34
2) Temporarily storing the transaction ID, the request initiation date in the event identifier and the random number;
transaction ID Event identification Date of initiation of request Random number
0101234824 0||2020081810||00000316 20200818 143
0101234825 0||2020081810||00000316 20200818 34
3) All transactions in the set Q are sorted in ascending order according to random numbers within the day of the request initiation date, and the result is as follows;
Figure BDA0002782638800000171
4) adding the transactions in sequence, wherein the sequence number of the exchange is the reserved sequence number of the exchange;
node 3 has no queuing information at present on the day, so a new queue is created, and the above transactions are added in sequence:
Figure BDA0002782638800000172
the node 3 records the random number and evidence of each transaction and feeds back the corresponding reservation sequence numbers 35 and 36 to the client 2 initiating the transaction.
Based on the same principle as the method shown in fig. 1, fig. 6 shows a schematic structural diagram of a reservation device provided by an embodiment of the present application, and as shown in fig. 6, the reservation device 20 may include:
a block receiving module 210, configured to receive a block packaged with a reservation ordering transaction request;
a random number obtaining module 220, configured to obtain a random number corresponding to the reservation ordering transaction request based on the request type of the reservation ordering transaction request;
a ranking module 230 for ranking the reservation ranking transaction requests based on the random number.
The device provided by the application obtains the random number corresponding to the reservation and sequencing transaction request based on the request type of the reservation and sequencing transaction request by receiving the block packaged with the reservation and sequencing transaction request, thereby sequencing the reservation and sequencing transaction request based on the random number. In the scheme, due to the fact that the reservation ordering is carried out based on the random numbers, the fairness of ordering results can be guaranteed, and the business development is facilitated.
Optionally, the random number obtaining module is specifically configured to:
and if the request type of the reservation ordering transaction request is the global reservation ordering transaction request, acquiring a random number corresponding to the reservation ordering transaction request broadcast by an ordering node in the block chain.
Optionally, the apparatus further comprises:
the evidence obtaining module is used for obtaining evidence corresponding to the random number broadcasted by the sequencing node;
the sorting module is specifically configured to:
the random number is verified based on the evidence.
And if the verification is passed, sequencing the reservation sequencing transaction request based on the random number.
Optionally, the sorting node generates a random number and an evidence corresponding to the reservation sorting transaction request, based on the following manner:
based on the private key of the ordering node and the transaction content of the reservation ordering transaction request, and based on a preset digital signature algorithm, generating a random number and evidence corresponding to the reservation ordering transaction request.
Optionally, the sorting module is specifically configured to:
determining whether ordering information of events corresponding to the reservation ordering transaction request exists in the service node;
if so, adding a sequencing result of the reservation sequencing transaction request to the sequencing information;
if not, creating ranking information based on the ranking result of the reservation ranking transaction request.
Optionally, the random number obtaining module is specifically configured to:
and if the request type of the reservation ordering transaction request is the local reservation ordering transaction request, generating a random number corresponding to the reservation ordering transaction request.
Optionally, the apparatus further comprises:
and the evidence generation module generates evidence corresponding to the random number.
Optionally, the sorting module is specifically configured to:
determining whether corresponding sequencing information exists in the service node;
if so, adding a sequencing result of the reservation sequencing transaction request to the sequencing information;
if not, creating ranking information based on the ranking result of the reservation ranking transaction request.
Optionally, the block is wrapped by a leader consensus node in the block chain.
It is understood that the above modules of the reservation device in the present embodiment have functions of implementing the corresponding steps of the reservation method in the embodiment shown in fig. 1. The function can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above. The modules can be software and/or hardware, and each module can be implemented independently or by integrating a plurality of modules. For the functional description of each module of the reservation apparatus, reference may be specifically made to the corresponding description of the reservation method in the embodiment shown in fig. 1, and details are not repeated here.
The embodiment of the application provides an electronic device, which comprises a processor and a memory;
a memory for storing operating instructions;
and the processor is used for executing the reservation method provided by any embodiment of the application by calling the operation instruction.
As an example, fig. 7 shows a schematic structural diagram of an electronic device to which an embodiment of the present application is applicable, and as shown in fig. 7, the electronic device 2000 includes: a processor 2001 and a memory 2003. Wherein the processor 2001 is coupled to a memory 2003, such as via a bus 2002. Optionally, the electronic device 2000 may also include a transceiver 2004. It should be noted that the transceiver 2004 is not limited to one in practical applications, and the structure of the electronic device 2000 is not limited to the embodiment of the present application.
The processor 2001 is applied to the embodiment of the present application to implement the method shown in the above method embodiment. The transceiver 2004 may include a receiver and a transmitter, and the transceiver 2004 is applied to the embodiments of the present application to implement the functions of the electronic device of the embodiments of the present application to communicate with other devices when executed.
The Processor 2001 may be a CPU (Central Processing Unit), general Processor, DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), FPGA (Field Programmable Gate Array) or other Programmable logic device, transistor logic device, hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. The processor 2001 may also be a combination of computing functions, e.g., comprising one or more microprocessors, DSPs and microprocessors, and the like.
Bus 2002 may include a path that conveys information between the aforementioned components. The bus 2002 may be a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus 2002 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 7, but this is not intended to represent only one bus or type of bus.
The Memory 2003 may be a ROM (Read Only Memory) or other type of static storage device that can store static information and instructions, a RAM (Random Access Memory) or other type of dynamic storage device that can store information and instructions, an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical Disc storage, optical Disc storage (including Compact Disc, laser Disc, optical Disc, digital versatile Disc, blu-ray Disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to these.
Optionally, the memory 2003 is used for storing application program code for performing the disclosed aspects, and is controlled in execution by the processor 2001. The processor 2001 is configured to execute the application program code stored in the memory 2003 to implement the reservation method provided in any of the embodiments of the present application.
The electronic device provided by the embodiment of the application is applicable to any embodiment of the method, and is not described herein again.
Compared with the prior art, the embodiment of the application provides the electronic equipment, and the random number corresponding to the reservation ordering transaction request is obtained based on the request type of the reservation ordering transaction request by receiving the block packaged with the reservation ordering transaction request, so that the reservation ordering transaction request is ordered based on the random number. In the scheme, due to the fact that the reservation ordering is carried out based on the random numbers, the fairness of ordering results can be guaranteed, and the business development is facilitated.
The embodiment of the application provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to realize the reservation method shown in the above method embodiment.
The computer-readable storage medium provided in the embodiments of the present application is applicable to any of the embodiments of the foregoing method, and is not described herein again.
Compared with the prior art, the embodiment of the application provides a computer-readable storage medium, and the random number corresponding to the reservation ordering transaction request is obtained based on the request type of the reservation ordering transaction request by receiving the block packaged with the reservation ordering transaction request, so that the reservation ordering transaction request is ordered based on the random number. In the scheme, due to the fact that the reservation ordering is carried out based on the random numbers, the fairness of ordering results can be guaranteed, and the business development is facilitated.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
The foregoing is only a partial embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (12)

1. A reservation method applied to a service node in a blockchain, the method comprising:
receiving a block packaged with a reservation ordering transaction request;
acquiring a random number corresponding to the reservation ordering transaction request based on the request type of the reservation ordering transaction request;
the reservation ordered transaction requests are ordered based on the random number.
2. The method of claim 1, wherein obtaining the random number corresponding to the reservation ordered transaction request based on the request type of the reservation ordered transaction request comprises:
and if the request type of the reservation ordering transaction request is a global reservation ordering transaction request, acquiring a random number corresponding to the reservation ordering transaction request broadcast by an ordering node in the block chain.
3. The method of claim 2, further comprising:
acquiring evidence corresponding to the random number broadcasted by the sequencing node;
the ordering the reservation ordering transaction request based on the random number comprises:
verifying the random number based on the evidence,
and if the transaction requests pass the verification, sequencing the reservation sequencing transaction requests based on the random numbers.
4. The method of claim 3, wherein the generation of the random number and the evidence for the reservation and sort transaction request by the sort node is based on:
and generating a random number corresponding to the reservation ordering transaction request and the evidence based on a private key of the ordering node and the transaction content of the reservation ordering transaction request and based on a preset digital signature algorithm.
5. The method of any of claims 2-4, wherein the ordering the reservation ordering transaction request based on the random number comprises:
determining whether the ordering information of the event corresponding to the reservation ordering transaction request exists in the service node;
if so, adding a sorting result of the reservation and sorting transaction request to the sorting information;
if not, creating ranking information based on the ranking result of the reservation ranking transaction request.
6. The method of claim 1, wherein obtaining the random number corresponding to the reservation ordered transaction request based on the request type of the reservation ordered transaction request comprises:
and if the request type of the reservation ordering transaction request is a local reservation ordering transaction request, generating a random number corresponding to the reservation ordering transaction request.
7. The method of claim 6, further comprising:
generating evidence corresponding to the random number.
8. The method of claim 6 or 7, wherein said ordering the reservation ordering transaction request based on the random number comprises:
determining whether corresponding sequencing information exists in the service node;
if so, adding a sequencing result of the reservation sequencing transaction request to the sequencing information;
if not, creating ranking information based on the ranking result of the reservation ranking transaction request.
9. The method of any one of claims 1-8, wherein the block is wrapped by a leader consensus node in a block chain.
10. A reservation apparatus, comprising:
the block receiving module is used for receiving a block packaged with a reservation ordering transaction request;
a random number obtaining module, configured to obtain a random number corresponding to the reservation ordering transaction request based on a request type of the reservation ordering transaction request;
and the ordering module is used for ordering the reservation ordering transaction request based on the random number.
11. An electronic device comprising a processor and a memory;
the memory is used for storing operation instructions;
the processor is used for executing the method of any one of claims 1-9 by calling the operation instruction.
12. A computer-readable storage medium, characterized in that the storage medium has stored thereon a computer program which, when being executed by a processor, carries out the method of any one of claims 1-10.
CN202011290217.2A 2020-11-17 2020-11-17 Reservation method, reservation device, electronic equipment and computer readable storage medium Active CN112634034B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011290217.2A CN112634034B (en) 2020-11-17 2020-11-17 Reservation method, reservation device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011290217.2A CN112634034B (en) 2020-11-17 2020-11-17 Reservation method, reservation device, electronic equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN112634034A true CN112634034A (en) 2021-04-09
CN112634034B CN112634034B (en) 2024-06-11

Family

ID=75303475

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011290217.2A Active CN112634034B (en) 2020-11-17 2020-11-17 Reservation method, reservation device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112634034B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112949798A (en) * 2021-05-17 2021-06-11 北京楠昊鹏物联网科技有限公司 Laboratory equipment management method and system based on RFID technology
CN116361385A (en) * 2022-09-01 2023-06-30 矩阵时光数字科技有限公司 Block chain consensus method and system

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170149819A1 (en) * 2015-11-25 2017-05-25 International Business Machines Corporation Resisting replay attacks efficiently in a permissioned and privacy- preserving blockchain network
CN107491946A (en) * 2017-07-10 2017-12-19 北京云知科技有限公司 It is a kind of to store virtual objects to the method, apparatus of block chain and electronic equipment
CN108629588A (en) * 2018-05-09 2018-10-09 合肥达朴汇联科技有限公司 A kind of computer-readable medium reached for block chain common recognition
CN109615422A (en) * 2018-11-29 2019-04-12 哈希未来(北京)科技有限公司 Competing pumping method, system and storage medium based on block chain
US20190311358A1 (en) * 2018-04-09 2019-10-10 Storecoin Inc. Fork-Tolerant Consensus Protocol
CN110602138A (en) * 2019-09-26 2019-12-20 腾讯科技(深圳)有限公司 Data processing method and device for block chain network, electronic equipment and storage medium
CN111008825A (en) * 2019-11-27 2020-04-14 山东爱城市网信息技术有限公司 Cross-border payment method, device and medium based on block chain
CN111147242A (en) * 2019-12-31 2020-05-12 百度在线网络技术(北京)有限公司 Block generation method and device, electronic equipment and storage medium
CN111161072A (en) * 2019-12-30 2020-05-15 山东爱城市网信息技术有限公司 Block chain-based random number generation method, equipment and storage medium
CN111445333A (en) * 2020-03-26 2020-07-24 腾讯科技(深圳)有限公司 Block generation method and device, computer equipment and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170149819A1 (en) * 2015-11-25 2017-05-25 International Business Machines Corporation Resisting replay attacks efficiently in a permissioned and privacy- preserving blockchain network
CN107491946A (en) * 2017-07-10 2017-12-19 北京云知科技有限公司 It is a kind of to store virtual objects to the method, apparatus of block chain and electronic equipment
US20190311358A1 (en) * 2018-04-09 2019-10-10 Storecoin Inc. Fork-Tolerant Consensus Protocol
CN108629588A (en) * 2018-05-09 2018-10-09 合肥达朴汇联科技有限公司 A kind of computer-readable medium reached for block chain common recognition
CN109615422A (en) * 2018-11-29 2019-04-12 哈希未来(北京)科技有限公司 Competing pumping method, system and storage medium based on block chain
CN110602138A (en) * 2019-09-26 2019-12-20 腾讯科技(深圳)有限公司 Data processing method and device for block chain network, electronic equipment and storage medium
CN111008825A (en) * 2019-11-27 2020-04-14 山东爱城市网信息技术有限公司 Cross-border payment method, device and medium based on block chain
CN111161072A (en) * 2019-12-30 2020-05-15 山东爱城市网信息技术有限公司 Block chain-based random number generation method, equipment and storage medium
CN111147242A (en) * 2019-12-31 2020-05-12 百度在线网络技术(北京)有限公司 Block generation method and device, electronic equipment and storage medium
CN111445333A (en) * 2020-03-26 2020-07-24 腾讯科技(深圳)有限公司 Block generation method and device, computer equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112949798A (en) * 2021-05-17 2021-06-11 北京楠昊鹏物联网科技有限公司 Laboratory equipment management method and system based on RFID technology
CN112949798B (en) * 2021-05-17 2021-09-24 北京楠昊鹏物联网科技有限公司 Laboratory equipment management method and system based on RFID technology
CN116361385A (en) * 2022-09-01 2023-06-30 矩阵时光数字科技有限公司 Block chain consensus method and system

Also Published As

Publication number Publication date
CN112634034B (en) 2024-06-11

Similar Documents

Publication Publication Date Title
US20240214180A1 (en) Systems and methods for storage, generation and verification of tokens used to control access to a resource
US10341431B2 (en) System and method for announcing cryptographic keys on a blockchain
US20190074966A1 (en) Revocation of cryptographic keys in the absence of a trusted central authority
CN108320155B (en) Method for realizing block chain consensus mechanism
CN108769230B (en) Transaction data storage method, device, server and storage medium
CN108831001B (en) Block chain-based node random selection method, system, node and electronic equipment
US20220278854A1 (en) Unity Protocol Consensus
CN114281888A (en) Block chain consensus method, device, equipment and storage medium
CN112634034A (en) Reservation method, reservation device, electronic equipment and computer readable storage medium
CN110659905B (en) Transaction verification method, device, terminal equipment and storage medium
CN113342838B (en) Data processing method, device and equipment based on block chain and readable storage medium
CN112053153A (en) Endorsement signature data storage method and device, electronic equipment and readable storage medium
CN110928880A (en) Data processing method, device, terminal and medium based on block chain
CN110990790B (en) Data processing method and equipment
CN111431908A (en) Access processing method and device and readable storage medium
CN112037062B (en) Transaction consensus method, device, electronic equipment and readable storage medium
WO2020061822A1 (en) Method and system for arbitrating authenticity of data in a blockchain
CN112989419A (en) Voting result generation and verification method and device and electronic equipment
CN112636904A (en) Random number generation and verification method and device, electronic equipment and readable storage medium
KR102248890B1 (en) System and method for lottery based on public blockchain and verification thereof
US10553062B2 (en) Method for generating winning numbers and apparatus
CN112615895A (en) Voting result generation and statistical method and device and electronic equipment
CN111600960A (en) Switching method of hybrid consensus mechanism in block chain and related equipment
US20230388246A1 (en) Resource-Sharing System with Cryptographically Enforced Fair Access
US20230047924A1 (en) Ledger-based verifiable code execution

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