CN112529707A - Transaction uplink error prevention method and device based on instance election consensus and electronic equipment - Google Patents

Transaction uplink error prevention method and device based on instance election consensus and electronic equipment Download PDF

Info

Publication number
CN112529707A
CN112529707A CN202011478363.8A CN202011478363A CN112529707A CN 112529707 A CN112529707 A CN 112529707A CN 202011478363 A CN202011478363 A CN 202011478363A CN 112529707 A CN112529707 A CN 112529707A
Authority
CN
China
Prior art keywords
transaction
instance
current
signature
signature instruction
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
CN202011478363.8A
Other languages
Chinese (zh)
Other versions
CN112529707B (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.)
Congfa Information Technology Co ltd
Original Assignee
Congfa Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Congfa Information Technology Co ltd filed Critical Congfa Information Technology Co ltd
Priority to CN202011478363.8A priority Critical patent/CN112529707B/en
Publication of CN112529707A publication Critical patent/CN112529707A/en
Application granted granted Critical
Publication of CN112529707B publication Critical patent/CN112529707B/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
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Abstract

The embodiment of the specification provides a transaction uplink error prevention method based on instance election consensus, a plurality of instances sharing the same block address are created for a service provider, each instance independently performs contract fair transaction with a service demander to generate a transaction log, the transaction log is provided with transaction content and a signature instruction with a changeable state, the transaction log of the current transaction of the current instance is synchronized to other instances, the multiple instances are kept consistent through log synchronization, whether the signature instruction is in an initial state is judged by combining the transaction logs synchronized among the instances, the transaction content is signed by using a digital certificate in the signature instruction based on a judgment result, an abnormal condition or attack that one signature instruction is repeatedly used by different instances can be identified so as to prevent repeated use, a leader instance generated by election serves as an access node of a block chain to uplink the signed transaction content, the uplink of the transaction is controlled, thereby improving the security and reliability of the multi-instance transaction mode.

Description

Transaction uplink error prevention method and device based on instance election consensus and electronic equipment
Technical Field
The present application relates to the field of internet, and in particular, to a method, an apparatus, and an electronic device for preventing error in a transaction uplink based on an instance election consensus.
Background
The strong notarization is to endow the corresponding document of the trade contract with the mandatory execution efficacy. The compulsory execution of the official document has authenticity and legality, and the meaning of "endowing with force" is endowed with force.
In the process of making contract transaction, the service provider and the service demander carry out notarization on the contract through the intermediary of the notarization place, so that when the service provider, the service demander and even the guarantor do not or refuse to fulfill the obligation due, one party can hold the creditor document endowed with the enforcement effectiveness through the notarization to apply for the execution certificate to the notarization place, and hold the creditor document and the execution certificate to apply for the enforcement to the national court.
Although the concept of online notarization is proposed in the industry at present, few implementation schemes are provided, because the business systems at present are still centralized systems, and for the trading contracts signed by notarization, the trading contracts temporarily extracted from the centralized systems in the strengthening stage can hardly make other business parties believe that the trading contracts are the trading contents when the contracts are signed.
On the other hand, for a service provider such as a bank, a plurality of service lines often develop services for a plurality of clients and sign contracts, if a decentralized system is used to provide storage services, the contracts are necessarily signed to ensure the true identity of the contract signers, however, if each service line has a respective digital certificate and private key, a block chain is difficult to manage (for example, when a node on the chain verifies the identity of the node, the public keys of the bank are required to be used for verifying one by one, and the identity verification failure can be finally determined after each verification failure), if each service line respectively generates a signature instruction to sign transaction contents by using the same private key, and then the information is linked up, a security problem and an error that one signature instruction is used for many times may occur.
Therefore, in order to further advance the online implementation of strong notarization, it is necessary to use a block chain to implement transaction signature and then uplink, and in order to adapt to the special situation that multiple service lines simultaneously perform services, it is necessary to provide a new uplink method to prevent errors caused by repeated use of signatures, thereby improving security and reliability.
The above information disclosed in this background section is only for enhancement of understanding of the background of the disclosure and therefore it may contain information that does not constitute prior art that is already known to a person of ordinary skill in the art.
Disclosure of Invention
The embodiment of the specification provides a transaction uplink mistake proofing method, device and electronic equipment based on example election consensus, and the method, device and electronic equipment are used for safety and credibility.
An embodiment of the present specification provides an uplink transaction error prevention method based on an example election consensus, including:
creating multiple instances sharing the same block address for a service provider;
each instance independently carries out contract notarization transaction with a service demand party to generate a transaction log, and the transaction log is provided with transaction contents and signature instructions with changeable states;
synchronizing a transaction log generated by a current instance based on the current transaction to an instance sharing the same block address with the transaction log, judging whether the state of a signature instruction of the current transaction is an initial state or not by combining a historical transaction log generated by the current instance and the transaction log synchronously received, and signing transaction contents by using a digital certificate in the signature instruction based on a judgment result;
and the leader instance generated by the multiple instance elections serves as an access node of the block chain to chain the signed transaction content.
Optionally, the method further comprises:
dividing the multiple instances into a leader instance and follower instances, wherein the number of the leader instances is 1, configuring a vote counting right for the leader instance, and configuring a voting request right and a voting right for each follower instance;
the step of synchronizing the transaction log generated by the current instance based on the current transaction to the instance sharing the same block address with the current instance, and determining whether the state of the signature instruction of the current transaction is an initial state by combining the historical transaction log generated by the current instance and the transaction log received synchronously comprises the following steps:
the current instance sends a transaction log of the transaction to be signed to the leader instance, wherein the transaction log comprises transaction content and a current signature instruction;
the leader instance synchronizes the transaction log to each follower instance and requests each follower instance to vote on the state of the signature instruction in the transaction to be signed;
each follower instance receives the synchronized transaction logs, judges whether the current signature instruction is in an initial state or not by combining the transaction logs stored in the history of the follower instance, and sends a judgment result to the leader instance if the current signature instruction is in the initial state;
and the leader instance counts tickets to obtain a consensus judgment result.
Optionally, the determining whether the current signature instruction is in an initial state includes:
and judging whether the signature command is in an initial state or not by using the state identifier carried by the signature command.
Optionally, the leader instance synchronizing the transaction log to each follower instance, further comprising:
and after the current instance carries out signature by using the current signature instruction, changing the state identifier of the current signature instruction, and synchronizing the changed state identifier to each instance.
Optionally, the method further comprises:
and setting a free period, and randomly dividing the multiple instances into the leader instance and the follower instance again at each free period.
Optionally, the signature instruction is also associated with a transaction identifier;
the signing the transaction content by using the digital certificate in the signing instruction based on the judgment result further comprises:
judging whether the transaction identification associated with the current signature instruction corresponds to the transaction to be signed;
and if the signature instruction is in an initial state and the associated transaction identifier corresponds to the transaction direction to be signed, signing the transaction content by using the digital certificate in the signature instruction.
Optionally, the service provider is a bank.
An embodiment of the present specification further provides an apparatus for preventing error in a transaction uplink based on an example election consensus, including:
the instance management module is used for creating a plurality of instances sharing the same block address for a service provider;
the transaction module is used for independently performing contract notarization transaction with a service demand party by each instance to generate a transaction log, and the transaction log is provided with transaction contents and signature instructions with changeable states;
the synchronization module synchronizes a transaction log generated by the current instance based on the current transaction to the instance sharing the same block address with the transaction log;
the verification signature module is used for judging whether the state of a signature instruction of the current transaction is an initial state or not by combining a historical transaction log generated by the current instance and a transaction log synchronously received, and signing the transaction content by using a digital certificate in the signature instruction based on the judgment result;
and the uplink module is used for taking the leader instance generated by the multiple instance elections as an access node of the block chain to uplink the signed transaction content.
Optionally, the instance management module is further configured to:
dividing the multiple instances into a leader instance and follower instances, wherein the number of the leader instances is 1, configuring a vote counting right for the leader instance, and configuring a voting request right and a voting right for each follower instance;
the step of synchronizing the transaction log generated by the current instance based on the current transaction to the instance sharing the same block address with the current instance, and determining whether the state of the signature instruction of the current transaction is an initial state by combining the historical transaction log generated by the current instance and the transaction log received synchronously comprises the following steps:
the current instance sends a transaction log of the transaction to be signed to the leader instance, wherein the transaction log comprises transaction content and a current signature instruction;
the leader instance synchronizes the transaction log to each follower instance and requests each follower instance to vote on the state of the signature instruction in the transaction to be signed;
each follower instance receives the synchronized transaction logs, judges whether the current signature instruction is in an initial state or not by combining the transaction logs stored in the history of the follower instance, and sends a judgment result to the leader instance if the current signature instruction is in the initial state;
and the leader instance counts tickets to obtain a consensus judgment result.
Optionally, the determining whether the current signature instruction is in an initial state includes:
and judging whether the signature command is in an initial state or not by using the state identifier carried by the signature command.
Optionally, the leader instance synchronizing the transaction log to each follower instance, further comprising:
and after the current instance carries out signature by using the current signature instruction, changing the state identifier of the current signature instruction, and synchronizing the changed state identifier to each instance.
Optionally, the instance management module is further configured to:
and setting a free period, and randomly dividing the multiple instances into the leader instance and the follower instance again at each free period.
Optionally, the signature instruction is also associated with a transaction identifier;
the signing the transaction content by using the digital certificate in the signing instruction based on the judgment result further comprises:
judging whether the transaction identification associated with the current signature instruction corresponds to the transaction to be signed;
and if the signature instruction is in an initial state and the associated transaction identifier corresponds to the transaction direction to be signed, signing the transaction content by using the digital certificate in the signature instruction.
Optionally, the service provider is a bank.
An embodiment of the present specification further provides an electronic device, where the electronic device includes:
a processor; and the number of the first and second groups,
a memory storing computer-executable instructions that, when executed, cause the processor to perform any of the methods described above.
The present specification also provides a computer readable storage medium, wherein the computer readable storage medium stores one or more programs which, when executed by a processor, implement any of the above methods.
In various technical solutions provided by embodiments of the present specification, a plurality of instances sharing the same block address are created for a service provider, each instance independently performs a contract fair transaction with a service demander to generate a transaction log, wherein each instance has transaction content and a signature instruction capable of changing a state, the transaction log of the current transaction of the current instance is synchronized to other instances, the multiple instances are kept consistent through log synchronization, and then whether the signature instruction is in an initial state is determined by combining the transaction logs synchronized among the instances, the transaction content is signed by using a digital certificate in the signature instruction based on a determination result, an abnormal situation or attack in which one signature instruction is repeatedly used by different instances can be identified so as to prevent repeated use, a leader instance generated by election serves as an access node of a block chain to chain the signed transaction content, so that the chain of the transaction is controlled, thus, the security and trustworthiness of the multi-instance transaction model is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a schematic diagram illustrating a method for preventing error in a trade link based on an example election consensus according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of an uplink transaction error prevention apparatus based on example election consensus according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an electronic device provided in an embodiment of the present disclosure;
fig. 4 is a schematic diagram of a computer-readable medium provided in an embodiment of the present specification.
Detailed Description
Exemplary embodiments of the present invention will now be described more fully with reference to the accompanying drawings. The exemplary embodiments, however, may be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these exemplary embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the invention to those skilled in the art. The same reference numerals denote the same or similar elements, components, or parts in the drawings, and thus their repetitive description will be omitted.
Features, structures, characteristics or other details described in a particular embodiment do not preclude the fact that the features, structures, characteristics or other details may be combined in a suitable manner in one or more other embodiments in accordance with the technical idea of the invention.
In describing particular embodiments, the present invention has been described with reference to features, structures, characteristics or other details that are within the purview of one skilled in the art to provide a thorough understanding of the embodiments. One skilled in the relevant art will recognize, however, that the invention may be practiced without one or more of the specific features, structures, characteristics, or other details.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The term "and/or" and/or "includes all combinations of any one or more of the associated listed items.
Fig. 1 is a schematic diagram of a method for preventing errors in a trade link based on an example election consensus according to an embodiment of the present disclosure, where the method may include:
s101: multiple instances sharing the same block address are created for the service provider.
In the embodiment of the present specification, the service provider is a bank.
The digital certificate comprises an asymmetric key pair, namely a public key and a private key, wherein the private key is used for signing by the service party, the public key is used for decrypting signed contents by other block nodes, and the signed contents are compared with the contents before signing, so that the identity of the signer can be further verified.
Any service party or block node needs to sign the uplink or forwarding of the transaction content, so as to ensure the reliability of the uplink content.
In an embodiment of the present description, we may provide a blockchain into the node for the service provider, through which the service provider may chain transactions.
The multiple instances can improve the business processing efficiency, and each instance can generate a signature instruction by using a common private key and is used for signing the transaction content to be signed.
Since multiple instances share a private key, the contents of the uplink transaction remain as a signature with an identity, which avoids management confusion.
Since each instance can randomly generate signature commands, it is inevitable to generate duplication of signature commands, which still results in reduced credibility if the instances are left to develop, or one signature command is linked up already, so other block nodes can consider that the signature command is not a temporarily forged signature command, i.e. a valid signature command, and if an instance signs the temporarily generated transaction content with the signature command, it is difficult to recognize that the signed transaction content is temporarily forged, which is also a security error caused by reusing the signature command.
Therefore, if multiple instances can be kept consistent, the default signature instruction can only be used once, and the problem of signature instruction reuse can be avoided.
S102: each instance independently carries out contract notarization transaction with a business demand party to generate a transaction log, and the transaction log is provided with transaction contents and signature instructions with changeable states.
To be able to make a decision whether the signature instruction has been used, we can add state identification data to the signature instruction.
In this case, a serial number (a value of the statement) of the number of times the transaction is called may be used as the state identification data.
For example, the initial state of the signature instruction may be defaulted to 0 calls or 1 calls.
Thus, the signature instructions are synchronized when the instances generate the signature instructions, and the updated state identification data are synchronized after the signature instructions are used, so that the instances can be kept consistent, and the double-flower problem is prevented.
S103: synchronizing a transaction log generated by the current instance based on the current transaction to an instance sharing the same block address with the transaction log, judging whether the state of a signature instruction of the current transaction is an initial state or not by combining a historical transaction log generated by the current instance and the transaction log synchronously received, and signing transaction content by using a digital certificate in the signature instruction based on a judgment result.
In the embodiment of the specification, the signature instruction is also associated with a transaction identifier;
the signing the transaction content by using the digital certificate in the signing instruction based on the judgment result may further include:
judging whether the transaction identification associated with the current signature instruction corresponds to the transaction to be signed;
and if the signature instruction is in an initial state and the associated transaction identifier corresponds to the transaction direction to be signed, signing the transaction content by using the digital certificate in the signature instruction.
In this way, each signature instruction can only be used for signing the transaction content of the user notarization, and other transaction content cannot be freely signed.
In the embodiment of the present specification, for signed data, who is uplink, we can determine by way of election.
In one of the ways, the method may include:
the first instance initiates voting on the leader instance, and synchronizes the Nonce and the state;
if the second instance agrees with the voting of the first instance, the voting is issued to other instances;
if the third instance agrees with the ticket of the second instance, the third instance is issued to other instances;
after all instances have agreed, the cluster begins to function properly.
In another manner, the method may also include:
a random number is determined using a random function, and a leader instance is determined based on the random number.
Alternatively, the instance with the most votes may be the leader instance.
It should be noted that we can specify an tenure such that different instances take turns to become leader instances, which are not described here.
The leader instance is used for judging whether the signature instruction can be used or not, feeding back a judgment result and linking the signed transaction content.
In an embodiment of the present specification, the method may further include:
and cleaning a log newly generated when the instance is synchronized, and generating and storing snapshot information by using the transaction content and the state identification data.
Of course, the leader instance can still independently perform a contract fair transaction with the business demander, and generate a transaction log, which is not specifically described herein.
Therefore, in the embodiment of the present specification, the method may further include:
dividing the multiple instances into a leader instance and follower instances, wherein the number of the leader instances is 1, configuring a vote counting right for the leader instance, and configuring a voting request right and a voting right for each follower instance;
the synchronizing the transaction log generated by the current instance based on the current transaction to the instance sharing the same block address with the current instance, and determining whether the state of the signature instruction of the current transaction is the initial state by combining the historical transaction log generated by the current instance and the transaction log received synchronously may include:
the current instance sends a transaction log of the transaction to be signed to the leader instance, wherein the transaction log comprises transaction content and a current signature instruction;
the leader instance synchronizes the transaction log to each follower instance and requests each follower instance to vote on the state of the signature instruction in the transaction to be signed;
each follower instance receives the synchronized transaction logs, judges whether the current signature instruction is in an initial state or not by combining the transaction logs stored in the history of the follower instance, and sends a judgment result to the leader instance if the current signature instruction is in the initial state;
and the leader instance counts tickets to obtain a consensus judgment result.
Because the leader instance is required to count tickets and judge before signing by the signature instruction every time, and the judgment basis of each instance is the synchronously received log, each log generated by each instance is recorded by other instances, so that although each instance independently develops business, the log of each instance has the signature condition of other instances through log synchronization, and the condition of repeated use can be avoided.
In the embodiment of the present specification, the method may further include:
and setting a free period, and randomly dividing the multiple instances into the leader instance and the follower instance again at each free period.
In this embodiment of the present specification, the determining whether the current signature instruction is in an initial state may include:
and judging whether the signature command is in an initial state or not by using the state identifier carried by the signature command.
In an embodiment of this specification, the synchronizing, by the leader instance, the transaction log to each follower instance may further include:
and after the current instance carries out signature by using the current signature instruction, changing the state identifier of the current signature instruction, and synchronizing the changed state identifier to each instance.
Therefore, if the same signature command is generated or the signature command is tried to be used again, the signature can be identified and stopped, and the repeated use is avoided.
S104: and the leader instance generated by the multiple instance elections serves as an access node of the block chain to chain the signed transaction content.
Creating a plurality of instances sharing the same block address for a service provider, independently performing contract notarization transaction with a service demander by each instance to generate a transaction log, the signature instruction with transaction content and changeable state synchronizes the transaction log of the current transaction of the current instance to other instances, multiple instances keep consistent through log synchronization, and then whether the signature instruction is in an initial state is judged by combining the transaction log synchronized among the instances, the transaction content is signed by using a digital certificate in the signature instruction based on a judgment result, an abnormal condition or attack that one signature instruction is repeatedly used by different instances can be identified, so that repeated use is prevented, and the signature instruction is used as an access node of a block chain to enable the chain of the transaction to be controlled, so that the safety and the credibility of a multi-instance transaction mode are improved.
In an embodiment of the present specification, the method may further include:
each block node performs identity authentication and voting on the transaction content linked up by the access node by using the public key of the service provider;
and the main chain counts the authentication voting result, and if the passing proportion of the votes is greater than a threshold value, the signed transaction content is stored in a storage node of the block chain.
In an embodiment of the present specification, the method may further include:
and the main chain calls the signed transaction content to send to a transaction calling requester based on a transaction calling request carrying a transaction identifier.
Thus, the court can judge whether to sign mandatory documents, such as official documents, according to the transaction content.
Fig. 2 is a schematic structural diagram of an uplink transaction error prevention apparatus based on example election consensus according to an embodiment of the present disclosure, where the apparatus may include:
an instance management module 201, which creates a plurality of instances sharing the same block address for a service provider;
the transaction module 202 is used for independently performing contract notarization transaction with a service demand party by each instance to generate a transaction log, and the transaction log is provided with transaction contents and signature instructions with changeable states;
the synchronization module 203 synchronizes a transaction log generated by the current instance based on the current transaction to the instance sharing the same block address with the current instance;
the verification signature module 204 is used for judging whether the state of a signature instruction of the current transaction is an initial state or not by combining the historical transaction log generated by the current instance and the transaction log synchronously received, and signing the transaction content by using a digital certificate in the signature instruction based on the judgment result;
and an uplink module 205, for taking the leader instance generated by the multiple instance elections as the access node of the block chain to uplink the signed transaction content.
In this embodiment, the instance management module 201 is further configured to:
dividing the multiple instances into a leader instance and follower instances, wherein the number of the leader instances is 1, configuring a vote counting right for the leader instance, and configuring a voting request right and a voting right for each follower instance;
the step of synchronizing the transaction log generated by the current instance based on the current transaction to the instance sharing the same block address with the current instance, and determining whether the state of the signature instruction of the current transaction is an initial state by combining the historical transaction log generated by the current instance and the transaction log received synchronously comprises the following steps:
the current instance sends a transaction log of the transaction to be signed to the leader instance, wherein the transaction log comprises transaction content and a current signature instruction;
the leader instance synchronizes the transaction log to each follower instance and requests each follower instance to vote on the state of the signature instruction in the transaction to be signed;
each follower instance receives the synchronized transaction logs, judges whether the current signature instruction is in an initial state or not by combining the transaction logs stored in the history of the follower instance, and sends a judgment result to the leader instance if the current signature instruction is in the initial state;
and the leader instance counts tickets to obtain a consensus judgment result.
In an embodiment of this specification, the determining whether the current signature instruction is in an initial state includes:
and judging whether the signature command is in an initial state or not by using the state identifier carried by the signature command.
In an embodiment of the present specification, the leader instance synchronizing the transaction logs to follower instances further comprises:
and after the current instance carries out signature by using the current signature instruction, changing the state identifier of the current signature instruction, and synchronizing the changed state identifier to each instance.
In this embodiment, the instance management module 201 is further configured to:
and setting a free period, and randomly dividing the multiple instances into the leader instance and the follower instance again at each free period.
In the embodiment of the specification, the signature instruction is also associated with a transaction identifier;
the signing the transaction content by using the digital certificate in the signing instruction based on the judgment result further comprises:
judging whether the transaction identification associated with the current signature instruction corresponds to the transaction to be signed;
and if the signature instruction is in an initial state and the associated transaction identifier corresponds to the transaction direction to be signed, signing the transaction content by using the digital certificate in the signature instruction.
In the embodiment of the present specification, the service provider is a bank.
The device creates a plurality of examples sharing the same block address for a service provider, each example independently carries out contract notarization transaction with a service demander to generate a transaction log, the signature instruction with transaction content and changeable state synchronizes the transaction log of the current transaction of the current instance to other instances, multiple instances keep consistent through log synchronization, and then whether the signature instruction is in an initial state is judged by combining the transaction log synchronized among the instances, the transaction content is signed by using a digital certificate in the signature instruction based on a judgment result, an abnormal condition or attack that one signature instruction is repeatedly used by different instances can be identified, so that repeated use is prevented, and the signature instruction is used as an access node of a block chain to enable the chain of the transaction to be controlled, so that the safety and the credibility of a multi-instance transaction mode are improved.
Based on the same inventive concept, the embodiment of the specification further provides the electronic equipment.
In the following, embodiments of the electronic device of the present invention are described, which may be regarded as specific physical implementations for the above-described embodiments of the method and apparatus of the present invention. Details described in the embodiments of the electronic device of the invention should be considered supplementary to the embodiments of the method or apparatus described above; for details which are not disclosed in embodiments of the electronic device of the invention, reference may be made to the above-described embodiments of the method or the apparatus.
Fig. 3 is a schematic structural diagram of an electronic device provided in an embodiment of the present disclosure. An electronic device 300 according to this embodiment of the invention is described below with reference to fig. 3. The electronic device 300 shown in fig. 3 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 3, electronic device 300 is embodied in the form of a general purpose computing device. The components of electronic device 300 may include, but are not limited to: at least one processing unit 310, at least one memory unit 320, a bus 330 connecting the various system components (including the memory unit 320 and the processing unit 310), a display unit 340, and the like.
Wherein the storage unit stores program code executable by the processing unit 310 to cause the processing unit 310 to perform the steps according to various exemplary embodiments of the present invention described in the above-mentioned processing method section of the present specification. For example, the processing unit 310 may perform the steps as shown in fig. 1.
The storage unit 320 may include readable media in the form of volatile storage units, such as a random access memory unit (RAM)3201 and/or a cache storage unit 3202, and may further include a read only memory unit (ROM) 3203.
The storage unit 320 may also include a program/utility 3204 having a set (at least one) of program modules 3205, such program modules 3205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 330 may be one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 300 may also communicate with one or more external devices 400 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 300, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 300 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 350. Also, the electronic device 300 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 360. Network adapter 360 may communicate with other modules of electronic device 300 via bus 330. It should be appreciated that although not shown in FIG. 3, other hardware and/or software modules may be used in conjunction with electronic device 300, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments of the present invention described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiment of the present invention can be embodied in the form of a software product, which can be stored in a computer-readable storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to make a computing device (which can be a personal computer, a server, or a network device, etc.) execute the above-mentioned method according to the present invention. The computer program, when executed by a data processing apparatus, enables the computer readable medium to implement the above-described method of the invention, namely: such as the method shown in fig. 1.
Fig. 4 is a schematic diagram of a computer-readable medium provided in an embodiment of the present specification.
A computer program implementing the method shown in fig. 1 may be stored on one or more computer readable media. The computer readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
In summary, the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that some or all of the functionality of some or all of the components in embodiments in accordance with the invention may be implemented in practice using a general purpose data processing device such as a microprocessor or a Digital Signal Processor (DSP). The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
While the foregoing embodiments have described the objects, aspects and advantages of the present invention in further detail, it should be understood that the present invention is not inherently related to any particular computer, virtual machine or electronic device, and various general-purpose machines may be used to implement the present invention. The invention is not to be considered as limited to the specific embodiments thereof, but is to be understood as being modified in all respects, all changes and equivalents that come within the spirit and scope of the invention.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. An example election consensus-based uplink transaction error proofing method, comprising:
creating multiple instances sharing the same block address for a service provider;
each instance independently carries out contract notarization transaction with a service demand party to generate a transaction log, and the transaction log is provided with transaction contents and signature instructions with changeable states;
synchronizing a transaction log generated by a current instance based on the current transaction to an instance sharing the same block address with the transaction log, judging whether the state of a signature instruction of the current transaction is an initial state or not by combining a historical transaction log generated by the current instance and the transaction log synchronously received, and signing transaction contents by using a digital certificate in the signature instruction based on a judgment result;
and the leader instance generated by the multiple instance elections serves as an access node of the block chain to chain the signed transaction content.
2. The method of claim 1, further comprising:
dividing the multiple instances into a leader instance and follower instances, wherein the number of the leader instances is 1, configuring a vote counting right for the leader instance, and configuring a voting request right and a voting right for each follower instance;
the step of synchronizing the transaction log generated by the current instance based on the current transaction to the instance sharing the same block address with the current instance, and determining whether the state of the signature instruction of the current transaction is an initial state by combining the historical transaction log generated by the current instance and the transaction log received synchronously comprises the following steps:
the current instance sends a transaction log of the transaction to be signed to the leader instance, wherein the transaction log comprises transaction content and a current signature instruction;
the leader instance synchronizes the transaction log to each follower instance and requests each follower instance to vote on the state of the signature instruction in the transaction to be signed;
each follower instance receives the synchronized transaction logs, judges whether the current signature instruction is in an initial state or not by combining the transaction logs stored in the history of the follower instance, and sends a judgment result to the leader instance if the current signature instruction is in the initial state;
and the leader instance counts tickets to obtain a consensus judgment result.
3. The method of claim 2, wherein said determining whether the current signature instruction is in an initial state comprises:
and judging whether the signature command is in an initial state or not by using the state identifier carried by the signature command.
4. The method of claim 3, wherein the leader instance synchronizes the transaction log to follower instances, further comprising:
and after the current instance carries out signature by using the current signature instruction, changing the state identifier of the current signature instruction, and synchronizing the changed state identifier to each instance.
5. The method of claim 2, further comprising:
and setting a free period, and randomly dividing the multiple instances into the leader instance and the follower instance again at each free period.
6. The method of claim 1, wherein the signature instruction is further associated with a transaction identifier;
the signing the transaction content by using the digital certificate in the signing instruction based on the judgment result further comprises:
judging whether the transaction identification associated with the current signature instruction corresponds to the transaction to be signed;
and if the signature instruction is in an initial state and the associated transaction identifier corresponds to the transaction direction to be signed, signing the transaction content by using the digital certificate in the signature instruction.
7. The method of claim 1, wherein the service provider is a bank.
8. An example election consensus based uplink transaction error proofing apparatus, comprising:
the instance management module is used for creating a plurality of instances sharing the same block address for a service provider;
the transaction module is used for independently performing contract notarization transaction with a service demand party by each instance to generate a transaction log, and the transaction log is provided with transaction contents and signature instructions with changeable states;
the synchronization module synchronizes a transaction log generated by the current instance based on the current transaction to the instance sharing the same block address with the transaction log;
the verification signature module is used for judging whether the state of a signature instruction of the current transaction is an initial state or not by combining a historical transaction log generated by the current instance and a transaction log synchronously received, and signing the transaction content by using a digital certificate in the signature instruction based on the judgment result;
and the uplink module is used for taking the leader instance generated by the multiple instance elections as an access node of the block chain to uplink the signed transaction content.
9. An electronic device, wherein the electronic device comprises:
a processor; and the number of the first and second groups,
a memory storing computer-executable instructions that, when executed, cause the processor to perform the method of any of claims 1-8.
10. A computer readable storage medium, wherein the computer readable storage medium stores one or more programs which, when executed by a processor, implement the method of any of claims 1-8.
CN202011478363.8A 2020-12-15 2020-12-15 Transaction uplink error prevention method and device based on instance election consensus and electronic equipment Active CN112529707B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011478363.8A CN112529707B (en) 2020-12-15 2020-12-15 Transaction uplink error prevention method and device based on instance election consensus and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011478363.8A CN112529707B (en) 2020-12-15 2020-12-15 Transaction uplink error prevention method and device based on instance election consensus and electronic equipment

Publications (2)

Publication Number Publication Date
CN112529707A true CN112529707A (en) 2021-03-19
CN112529707B CN112529707B (en) 2022-12-13

Family

ID=75000176

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011478363.8A Active CN112529707B (en) 2020-12-15 2020-12-15 Transaction uplink error prevention method and device based on instance election consensus and electronic equipment

Country Status (1)

Country Link
CN (1) CN112529707B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106682907A (en) * 2016-12-10 2017-05-17 江苏恒为信息科技有限公司 Comparison and consensus method for block chain data
CN106878071A (en) * 2017-01-25 2017-06-20 上海钜真金融信息服务有限公司 A kind of block chain common recognition mechanism based on Raft algorithms
CN109104286A (en) * 2018-07-26 2018-12-28 杭州安恒信息技术股份有限公司 A kind of new block generation method of the common recognition based on threshold digital signature
US20190165948A1 (en) * 2016-07-29 2019-05-30 Nec Corporation System, data management method, and program
US20190319798A1 (en) * 2018-04-16 2019-10-17 R3 Ltd. Blockchain post-quantum signature scheme
CN111489159A (en) * 2020-04-09 2020-08-04 腾讯科技(深圳)有限公司 Data processing method, data processing device, computer equipment and medium
CN111600720A (en) * 2020-05-20 2020-08-28 腾讯科技(深圳)有限公司 Data processing method, device and equipment based on block chain and readable storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190165948A1 (en) * 2016-07-29 2019-05-30 Nec Corporation System, data management method, and program
CN106682907A (en) * 2016-12-10 2017-05-17 江苏恒为信息科技有限公司 Comparison and consensus method for block chain data
CN106878071A (en) * 2017-01-25 2017-06-20 上海钜真金融信息服务有限公司 A kind of block chain common recognition mechanism based on Raft algorithms
US20190319798A1 (en) * 2018-04-16 2019-10-17 R3 Ltd. Blockchain post-quantum signature scheme
CN109104286A (en) * 2018-07-26 2018-12-28 杭州安恒信息技术股份有限公司 A kind of new block generation method of the common recognition based on threshold digital signature
CN111489159A (en) * 2020-04-09 2020-08-04 腾讯科技(深圳)有限公司 Data processing method, data processing device, computer equipment and medium
CN111600720A (en) * 2020-05-20 2020-08-28 腾讯科技(深圳)有限公司 Data processing method, device and equipment based on block chain and readable storage medium

Also Published As

Publication number Publication date
CN112529707B (en) 2022-12-13

Similar Documents

Publication Publication Date Title
CN108833081B (en) Block chain-based equipment networking authentication method
CN108111314B (en) Method and equipment for generating and verifying digital certificate
CN111464518B (en) Method and device for sending and verifying cross-link communication data
CN111801910A (en) System and method for authenticating off-chain data based on proof verification
JP2021502746A (en) A system to protect the verification key from modification and to verify the validity of the legitimacy proof
CN109379369A (en) Single-point logging method, device, server and storage medium
WO2018189634A1 (en) Securing blockchain transaction based on undetermined data
CN110569251A (en) Data processing method, related equipment and computer readable storage medium
CN111080295A (en) Block chain-based electronic contract processing method and equipment
CN112632629B (en) Voting management method, device, medium and electronic equipment based on block chain
CN111327564B (en) Access method and device for alliance chain
CN110084600B (en) Processing and verifying method, device, equipment and medium for resolution transaction request
CN111314172A (en) Data processing method, device and equipment based on block chain and storage medium
CN112291372B (en) Asynchronous posting method, device, medium and electronic equipment for block chain
CN112069550A (en) Electronic contract deposit certificate system based on intelligent contract mode
CN113256297A (en) Data processing method, device and equipment based on block chain and readable storage medium
US20200394162A1 (en) Operation management method for distributed ledger system, operation management system for distributed ledger system, and operation management program for distributed ledger system
CN110223075B (en) Identity authentication method and device, computer equipment and storage medium
CN111222963A (en) Bidding information processing method and device based on block chain
CN108022104B (en) Login method, terminal and system for digital currency wallet
CN101807237B (en) Signature method and device
CN112734421A (en) Asset hosting and clearing method and system based on three-party multi-signature and credible signature transaction
CN111311260A (en) Method and device for resetting account private key
CN112529707B (en) Transaction uplink error prevention method and device based on instance election consensus and electronic equipment
US11863689B1 (en) Security settlement using group signatures

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