CN108596764B - Transaction method, system and terminal device based on block chain - Google Patents

Transaction method, system and terminal device based on block chain Download PDF

Info

Publication number
CN108596764B
CN108596764B CN201810380908.8A CN201810380908A CN108596764B CN 108596764 B CN108596764 B CN 108596764B CN 201810380908 A CN201810380908 A CN 201810380908A CN 108596764 B CN108596764 B CN 108596764B
Authority
CN
China
Prior art keywords
transaction
acquiring
information
users
voting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810380908.8A
Other languages
Chinese (zh)
Other versions
CN108596764A (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.)
Hefei Huike Jinyang Technology Co Ltd
Original Assignee
Hefei Huike Jinyang 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 Hefei Huike Jinyang Technology Co Ltd filed Critical Hefei Huike Jinyang Technology Co Ltd
Priority to CN201810380908.8A priority Critical patent/CN108596764B/en
Publication of CN108596764A publication Critical patent/CN108596764A/en
Application granted granted Critical
Publication of CN108596764B publication Critical patent/CN108596764B/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
    • 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
    • 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/42Confirmation, e.g. check or permission by the legal debtor of payment

Landscapes

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

Abstract

The invention is suitable for the technical field of block chains, and provides a transaction method, a system and terminal equipment based on block chains, wherein the transaction method comprises the following steps: acquiring transaction information created by a transaction party, and correspondingly generating a transaction block; acquiring first voting data of all users, and acquiring a voting result of a witness according to the first voting data; wherein, all users comprise transaction parties and witnesses; obtaining the number of witnesses determined by a transaction party in a preset proportion, and determining the number of witnesses the same as the number of the witnesses according to the voting result and the number of the witnesses; acquiring authentication information in an authentication block corresponding to a witness; and when the transaction information is successfully authenticated according to the authentication information, writing the transaction information into the transaction block to make the transaction information deal. The invention selects the witnesses to authenticate the transaction information by acquiring the voting data and the number of the witnesses, acquires the authentication information provided by the witnesses, and can confirm the transaction information in time according to the authentication information, thereby improving the accuracy of the transaction information and the success rate of the transaction.

Description

Transaction method, system and terminal device based on block chain
Technical Field
The invention belongs to the technical field of block chains, and particularly relates to a transaction method, a transaction system and a terminal device based on a block chain.
Background
Recently, since transaction information recorded on a blockchain is not changeable, security of the blockchain-based information is high, and the amount of blockchain-based transactions is gradually increasing.
However, since the transaction information recorded on the blockchain is not changeable, the transaction information is not confirmed in time, which causes transaction failure or transaction error, thereby causing irreparable loss.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, a system, and a terminal device for transaction based on a blockchain, so as to solve the problem in the prior art that transaction information cannot be confirmed in time easily because the transaction information recorded on the blockchain cannot be changed, thereby causing transaction failure or transaction error and further causing irreparable loss.
A first aspect of an embodiment of the present invention provides a transaction method based on a blockchain, including:
acquiring transaction information created by a transaction party, and correspondingly generating a transaction block;
acquiring first voting data of all users, and acquiring a voting result of a witness according to the first voting data; wherein the all users include the transaction party and the witness;
obtaining the number of witnesses determined by a transaction party in a preset proportion, and determining the number of witnesses the same as the number of the witnesses according to the voting result and the number of the witnesses;
acquiring authentication information in an authentication block corresponding to the witness;
and when the transaction information is successfully authenticated according to the authentication information, writing the transaction information into the transaction block to make the transaction information deal.
A second aspect of an embodiment of the present invention provides a block chain-based transaction system, including:
the first acquisition module is used for acquiring transaction information created by a transaction party and correspondingly generating a transaction block;
the second acquisition module is used for acquiring first voting data of all users and acquiring voting results of witnesses according to the first voting data; wherein the all users include the transaction party and the witness;
the third acquisition module is used for acquiring the number of witnesses determined by a transaction party in a preset proportion and determining the number of witnesses the same as the number of the witnesses according to the voting result and the number of the witnesses;
the fourth acquisition module is used for acquiring the authentication information in the authentication block corresponding to the witness;
and the authentication module is used for writing the transaction information into the transaction block when the transaction information is successfully authenticated according to the authentication information so as to deal with the transaction information.
A third aspect of an embodiment of the present invention provides a terminal device, including: a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the method as described above when executing the computer program.
A fourth aspect of embodiments of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method as described above.
According to the embodiment of the invention, the witnesses are selected to authenticate the transaction information by acquiring the voting data and the number of the witnesses, the authentication information provided by the witnesses is acquired, and the transaction information can be confirmed in time according to the authentication information, so that the accuracy of the transaction information and the transaction success rate are improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic flow chart of a block chain-based transaction method according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a transaction method based on a blockchain according to a second embodiment of the present invention;
fig. 3 is a schematic flow chart of a transaction method based on a blockchain according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a transaction method based on a blockchain according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of a block chain-based transaction system according to a fifth embodiment of the present invention;
fig. 6 is a schematic structural diagram of a second obtaining module according to a sixth embodiment of the present invention;
fig. 7 is a schematic structural diagram of a fourth obtaining module according to a seventh embodiment of the present invention;
fig. 8 is a schematic structural diagram of a transaction system based on a blockchain according to an eighth embodiment of the present invention;
fig. 9 is a schematic diagram of a terminal device according to a ninth embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood by those skilled in the art, the technical solutions in the embodiments of the present invention will be clearly described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "comprises" and "comprising," and any variations thereof, in the description and claims of this invention and the above-described drawings are intended to cover non-exclusive inclusions. For example, a process, method, or system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus. Furthermore, the terms "first," "second," and "third," etc. are used to distinguish between different objects and are not used to describe a particular order.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
Example one
As shown in fig. 1, the present embodiment provides a transaction method based on a blockchain, which may be applied to a cloud server or a device such as a cloud and a remote server applied to the blockchain. The block chain-based transaction method provided by the embodiment includes:
s101, acquiring transaction information created by a transaction party, and correspondingly generating a transaction block.
In a specific application, transaction information created by transaction parameters input by a transaction party through a display device of the transaction party is acquired, and a transaction block is correspondingly generated according to the transaction information and used for storing the transaction parameters, wherein the transaction parameters can include but are not limited to transaction amount, transaction quantity and transaction time limit.
S102, acquiring first voting data of all users, and acquiring a voting result of a witness according to the first voting data; wherein the all users include the transaction party and the witness.
In a specific application, first voting data of voting of all users through display equipment of all users are obtained, voting results of witnesses needed for a transaction are obtained according to the obtained first voting data, and the first voting data comprise voting data which are set to be equal to or less than the number of all users within voting time according to actual conditions. Wherein all users include trading parties and witnesses and other users in the current blockchain. The witness refers to a user who is elected by a witness voting mechanism among all users and verifies the transaction information of the current transaction.
S103, obtaining the number of witnesses determined by a transaction party in a preset proportion, and determining the number of witnesses the same as the number of the witnesses according to the voting result and the number of the witnesses.
In the specific application, the number of required witnesses for the current transaction is determined by acquiring transaction parties with a preset proportion, which users are witnesses of current transaction information in all users are determined according to the voting result of the acquired first voting data and the number of the required witnesses for the current transaction, and the number of the determined witnesses is the same as the number of the required witnesses for the current transaction determined by the transaction parties with the preset proportion. The preset proportion is the proportion of the transaction parties which determine the number of witnesses in all the transaction parties of the current transaction information according to the requirements set by actual conditions. Typically, the predetermined ratio is set to be greater than 50%.
And S104, acquiring authentication information in an authentication block corresponding to the witness.
In a specific application, the authentication information included in the authentication block corresponding to the determined witness is acquired and used for authenticating the current transaction information. The authentication block refers to a block created by the prover for authenticating the transaction information, and includes but is not limited to authentication information. The authentication information comprises signature authentication information, timestamp authentication information, transaction price authentication information and transaction passing information, and the signature of both transaction parties of the transaction, the transaction timestamp, the transaction price and whether the transaction passes or not are verified.
And S105, when the transaction information is successfully authenticated according to the authentication information, writing the transaction information into the transaction block to make the transaction information deal.
In a specific application, if the authentication information is obtained, when the authentication of the current transaction information is determined to be successful, the transaction information is written into a transaction block corresponding to the current transaction, so that the transaction information is committed. It should be noted that, the transaction party of the current transaction information may perform a viewing operation on the status of the current transaction information at any time and in any case.
In this embodiment, when the transaction party creates transaction information, a target price is set in advance, when the price of the transaction reaches the target price and the witnesses of the current transaction information with the preset authentication ratio pass the authentication of the transaction information, the transaction information is written into the corresponding transaction block and the transaction information is committed, and the display device of the transaction party sends information to inform the transaction party that the transaction is successful, wherein the preset authentication ratio includes the ratio of the number of the passed witnesses of the authentication transaction information to the total authentication amount of the transaction information, which is set according to actual conditions.
In a specific application, if the transaction party does not set a target price when creating transaction information, or sets that final judgment on whether the transaction is successful is needed, the transaction party is informed of the successful judgment on the transaction when the witness of the current transaction information passes the authentication on the transaction information.
In this embodiment, the step a: acquiring the number of witnesses determined by transaction parties in a preset proportion;
and B: acquiring first voting data of all users, and acquiring a voting result of a witness according to the first voting data;
and C: and determining the number of the witnesses which is the same as the number of the witnesses according to the voting result and the number of the witnesses. The witness voting selection is carried out through the sequential steps, so that after transaction information is created each time, the witness voting selection is an updating operation for the witness, the steps of updating a witness list are reduced, the transaction process is simpler, and the time required by transaction is saved.
In one embodiment, step S105 includes:
judging whether the transaction information authentication is successful or not according to the authentication information, and writing the transaction information into the transaction block when the transaction information authentication is successful so that the transaction information is handed over; the authentication information comprises signature authentication information, timestamp authentication information, transaction price authentication information and transaction passing information.
In a specific application, according to the acquired authentication information, whether the signature authentication information passes or not, whether the timestamp authentication information passes or not, whether the transaction passes or not is determined according to whether the transaction information passes or not, whether the transaction price authentication information passes or not is determined, and the like, when the information passes the authentication, the transaction passing information is acquired, the authentication success of the current transaction information is determined, the transaction information is written into a transaction block corresponding to the current transaction, the transaction information is committed, the authentication salary is sent to an account of a witness, and the information is sent to a display device of a transaction party to inform the transaction party of the successful transaction. The authentication information comprises signature authentication information, timestamp authentication information, transaction price authentication information and transaction passing information.
In one embodiment, the method further comprises:
acquiring facial image data and voice data sent by display equipment of a user, generating account information of the user and sending the account information to the display equipment of the user; the account information comprises a user name, an operation key, an encryption key and a decryption key, and is used for the user to log in and perform transaction operation.
In specific application, facial image data and voice data sent by display equipment of a user are acquired, account information of the current user is generated, and the account information is sent to the display equipment of the user. It should be noted that all users' display devices should have software and hardware devices capable of transaction creation, facial image data acquisition, and voice data acquisition. In addition, the account information may be generated by acquiring other biometric data of the user, for example, biometric data such as iris data, palm print data, and fingerprint data, according to actual circumstances. The account information includes a user name, an operation key, an encryption key, a decryption key or other information related to the current user, transaction or block. Wherein the decryption key is information of the highest authority operation that the user can use for execution. The user can log in through the received account information through the display device, the user can also perform operations such as transaction creation, transaction success judgment and the like on the current account information, the user can also perform operations such as modification and the like on an operation key, an encryption key or a decryption key through inputting facial image data and voice data, the user can still perform related operations on the key through biological characteristic data under the condition that the key is lost, and the safety of the user account is ensured. The user can also obtain the relevant information of the transaction through the display equipment, and the display equipment of the user informs the user of the information through voice, text or other modes.
According to the embodiment, the witnesses are selected to authenticate the transaction information by acquiring the voting data and the number of the witnesses, the authentication information provided by the witnesses is acquired, and the transaction information can be confirmed in time according to the authentication information, so that the accuracy of the transaction information and the success rate of the transaction are improved.
Example two
As shown in fig. 2, this embodiment is a further description of the method steps in the first embodiment. In this embodiment, step S102 includes:
s1021, acquiring first voting data of all users, and sequencing all the users according to the number of votes in the first voting data to obtain a voting result; wherein the ordering comprises a high to low order.
In the specific application, first voting data of all users voting through display equipment of the users are obtained, the votes of all the users are sorted according to the size of the votes of all the users summarized by the first voting data, a voting result is obtained, the voting result is that the users with the number equal to the number of the witnesses are obtained as the witnesses in the sorting result according to the required number of the witnesses according to a preset sequence. The sequence includes a sequence from high to low, or other sequences set according to actual situations.
In the present embodiment, after step S1021, the method includes:
s1022, in a first preset time period, acquiring second voting data of all the users, and updating the witnesses; the first preset time comprises preset witness list updating time.
In a specific application, in a first preset time period, second voting data of voting of all users through display equipment of the users are acquired and used for updating witnesses, wherein the first preset time comprises preset updating time of a witness list according to actual conditions. The method can determine that the votes of all users are obtained again in the updating time of the witness list, so that the updating of the witness is realized, and the notarization of the witness authentication is ensured.
Specifically, the acquiring operation in the first preset time period may include acquiring during a time period of the first preset time, acquiring at a time point of the first preset time, or acquiring once every first time period.
The embodiment sorts, selects and determines the witnesses according to the preset sorting of the voting mechanism by acquiring the voting data of the users, updates the witness list at the specified time, improves the enthusiasm of the witness for the authentication work by updating the witness, and ensures the authentication efficiency of the transaction information.
EXAMPLE III
As shown in fig. 3, this embodiment is a further description of the method steps in the first embodiment. In this embodiment, step S104 includes:
s1041, acquiring authentication information of an authentication block of the witness in a second preset time period; the second preset time period comprises preset authentication block generation time.
In a specific application, the authentication information of the authentication block corresponding to the witness is acquired within a second preset time period. The second preset time period comprises preset authentication block generation time and is used for limiting each witness to authenticate the current transaction information at the fixed authentication block generation time so as to ensure that the transaction is smoothly carried out. The acquiring operation in the second preset time period may include acquiring during a time period of the second preset time, acquiring at a time point of the second preset time, or acquiring once every second time period.
S1042, if the authentication information of the authentication block of the witness is not obtained, obtaining the authentication information of the authentication block of the next witness in the next second preset time period.
In the specific application, authentication blocks for authentication by a witness are arranged according to a time sequence, if the current witness is in a first and a second preset time period of the current witness, the authentication module does not acquire authentication information of the witness authentication blocks, namely the current witness does not authenticate transaction information, the authentication blocks are arranged according to the time sequence, then authentication information of the authentication blocks of the second witness in the second preset time period is acquired, and the transaction can be guaranteed not to stop at the authentication operation stage of the first witness, so that the transaction is guaranteed to be smoothly carried out. Similarly, if the second witness still does not authenticate the transaction information within the second preset time period, the authentication information of the authentication block of the third witness within the third second preset time period is continuously acquired. It should be noted that, if one or more witnesses do not authenticate the transaction information within the second preset time period to generate authentication information of the corresponding authentication block, the witness who does not authenticate the transaction information will not obtain authentication salaries, and in the future voting for the witness, the witness who does not authenticate the transaction information may also be voted out by all users and no longer serves as the witness for the transaction information authentication.
In this embodiment, all users can verify the participation rate of the witness in the transaction information authentication through login to detect the health condition of the current blockchain transaction network, so that the users can confirm the transaction information more conveniently and in real time.
According to the embodiment, the authentication information of the witness is acquired within the preset time period, and if the authentication information of the witness acquired within the next preset time period is not acquired, the transaction can be continuously carried out according to the specified time and flow, so that the timeliness of the transaction is ensured.
Example four
As shown in fig. 4, this embodiment is a further description of the method steps in the first embodiment. In this embodiment, after step S101, the method further includes:
s201, acquiring second voting data of all users, and acquiring representative voting results according to the second voting data; wherein the all users include the transaction party, the representative, and the witness.
In a specific application, second voting data of all users voting through display devices of the users are acquired, and representative voting results are acquired according to the number of votes in the second voting data, wherein all the users comprise transaction parties, representatives, witnesses and other users of the current block chain. The specific obtaining operation is the same as the obtaining mode of the witness voting result, and the representative voting result can be obtained through the obtaining mode of the witness voting result.
S202, obtaining the representative quantity determined by the transaction party in a preset proportion, and determining the representatives with the quantity same as the representative quantity according to the voting result and the representative quantity.
In a specific application, the number of representatives required by a transaction party is acquired in a preset proportion, and users with the same number as the representatives in all the users are determined as representatives according to the voting result and the number of the required representatives. The representatives are users with a certain number of representatives determined by a voting mechanism and a transaction party among all users, and are used for setting parameters of relevant rules of the current block chain.
S203, acquiring the parameters set by the representatives; wherein the parameters include transaction amount, block size, block spacing, and authentication payroll.
In a specific application, a parameter representing a setting is obtained, and the parameter is used for setting or updating a parameter of a relevant rule of a current block chain. The parameters include transaction amount, block size, block spacing, authentication payroll, and other parameters related to transaction information or blocks.
And S204, setting relevant rule parameters according to the parameters.
In a specific application, the parameters of the relevant rules are set according to the parameters representing the setting, and the relevant rules include rules set by relevant information related to the current blockchain, such as related transaction information or related blockchain information.
In one embodiment, step S201 includes:
acquiring second voting data of all users, and sequencing all users according to the size of the votes to obtain voting results; wherein the ordering comprises a high to low order.
In a specific application, second voting data of voting by all users through the display devices of all users are obtained, all users are sorted according to the number of votes in the voting data, and a voting result represented by selection is obtained, wherein the sorting comprises a high-to-low sequence. The voting system of the specific representative selection is the same as that of the witness selection, and the representative can be selected according to the voting system of the witness selection.
In one embodiment, step S204 includes:
acquiring third voting data of all users in a third preset time period, and judging whether the parameters are effective or not according to the third voting data; wherein the third preset time period comprises a preset parameter-set review time;
and if the parameters are valid, setting parameters of relevant rules according to the parameters.
In specific application, third voting data of voting by all users through display equipment of the users in a third preset time period are obtained, whether parameter setting is effective or not is judged according to the result of the third voting data, and if the set parameter is determined to be effective through voting, the parameter of the relevant rule is set according to the parameter. Specifically, in a third preset time period, all users can vote on the currently set parameters, whether the currently set parameters are effective or not is judged according to the voting result, the parameters are used for acquiring whether the currently set parameters are supported or negative opinions of the users, and if the currently set parameters are determined to be effective according to the voting result, the parameters of the relevant rules are set according to the currently set parameters. The third preset time period includes the examination time set by the preset parameter, and the obtaining operation in the third preset time period may include obtaining during the time period of the third preset time, obtaining at the time point of the third preset time, or performing the obtaining operation once every third time period.
In the embodiment, representatives are strictly selected by acquiring the voting data of all users, and holding opinions of the users are determined by acquiring parameter votes set by all the users for the representatives, so that uniform parameter setting can be performed according to the opinions of all the users, rules and systems for performing transactions are specified, and the stability of the transactions based on the block chain is improved.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
EXAMPLE five
As shown in fig. 5, the present embodiment provides a blockchain-based transaction system 100 for performing the method steps of the first embodiment. The block chain-based transaction system device 100 provided in this embodiment includes:
the first acquisition module 101 is used for acquiring transaction information created by a transaction party and correspondingly generating a transaction block;
the second obtaining module 102 is configured to obtain first voting data of all users, and obtain a voting result of a witness according to the first voting data; wherein the all users include the transaction party and the witness;
the third obtaining module 103 is configured to obtain the number of witnesses determined by transaction parties in a preset proportion, and determine the number of witnesses the same as the number of the witnesses according to the voting result and the number of the witnesses;
a fourth obtaining module 104, configured to obtain authentication information in an authentication block corresponding to the witness;
and the authentication module 105 is configured to, when it is determined that the transaction information is successfully authenticated according to the authentication information, write the transaction information into the transaction block, so that the transaction information is handed over.
In one embodiment, the authentication module 105 includes:
the judging unit is used for judging whether the transaction information authentication is successful or not according to the authentication information, and writing the transaction information into the transaction block when the transaction information authentication is successful so that the transaction information is handed over; the authentication information comprises signature authentication information, timestamp authentication information, transaction price authentication information and transaction passing information.
In one embodiment, the blockchain-based transaction system 100 further includes:
the generating module is used for acquiring facial image data and voice data sent by display equipment of a user, generating account information of the user and sending the account information to the display equipment of the user; the account information comprises a user name, an operation key, an encryption key and a decryption key, and is used for the user to log in and perform transaction operation.
According to the embodiment, the witnesses are selected to authenticate the transaction information by acquiring the voting data and the number of the witnesses, the authentication information provided by the witnesses is acquired, and the transaction information can be confirmed in time according to the authentication information, so that the accuracy of the transaction information and the success rate of the transaction are improved.
EXAMPLE six
As shown in fig. 6, in this embodiment, the second obtaining module 102 in the fifth embodiment further includes the following structure for executing the method steps in the second embodiment:
a first obtaining unit 1021, configured to obtain first voting data of all users, and sort all the users according to the number of votes in the first voting data to obtain a voting result; wherein the ordering comprises a high to low order.
In this embodiment, the second obtaining module 102 further includes:
an updating unit 1022, configured to acquire second voting data of all the users in a first preset time period, and update the witnesses; the first preset time comprises preset witness list updating time.
The embodiment acquires the voting data of the user, sorts, selects and determines the witnesses according to the preset sorting of the voting mechanism, updates the witness list at the specified time, improves the enthusiasm of the witness for authentication work by updating the witness, and ensures the authentication efficiency of transaction information.
EXAMPLE seven
As shown in fig. 7, in this embodiment, the fourth obtaining module 104 in the fifth embodiment includes the following structure for executing the steps of the method in the third embodiment:
a second obtaining unit 1041, configured to obtain, in a second preset time period, authentication information of the authentication block of the witness; the second preset time period comprises preset authentication block generation time;
a third obtaining unit 1042, configured to obtain, if the authentication information of the authentication block of the witness is not obtained, the authentication information of the authentication block of the next witness in the next second preset time period.
According to the embodiment, the authentication information of the witness is acquired within the preset time period, and if the authentication information of the witness acquired within the next preset time period is not acquired, the transaction can be continuously carried out according to the specified time and flow, so that the timeliness of the transaction is ensured.
Example eight
As shown in fig. 8, in this embodiment, the blockchain-based transaction system 200 provided in this embodiment further includes the following structure for executing the method steps in the fourth embodiment:
a fifth obtaining module 201, configured to obtain second voting data of all users, and obtain a representative voting result according to the second voting data; wherein the all users include the transaction party, the representative, and the witness.
A sixth obtaining module 202, configured to obtain a representative number determined by the transaction parties in a preset proportion, and determine representatives with the same number as the representative number according to the voting result and the representative number.
A seventh obtaining module 203, configured to obtain the parameter representing the setting; wherein the parameters include transaction amount, block size, block spacing, and authentication payroll.
The setting module 204 is configured to set relevant rule parameters according to the parameters.
In one embodiment, the fifth obtaining module 201 includes:
the fourth acquisition unit is used for acquiring second voting data of all users and sequencing all the users according to the size of the votes to obtain voting results; wherein the ordering comprises a high to low order;
in one embodiment, the setting module 204 includes:
a fifth obtaining unit, configured to obtain third voting data of all the users in a third preset time period, and determine whether the parameter is valid according to the third voting data; wherein the third preset time period comprises a preset parameter-set review time;
and the setting unit is used for setting the parameters of the relevant rules according to the parameters if the parameters are valid.
In the embodiment, representatives are strictly selected by acquiring the voting data of all users, and holding opinions of the users are determined by acquiring parameter votes set by all the users for the representatives, so that uniform parameter setting can be performed according to the opinions of all the users, rules and systems for performing transactions are specified, and the stability of the transactions based on the block chain is improved.
Example nine
Fig. 9 is a schematic diagram of a terminal device according to an embodiment of the present invention. As shown in fig. 9, the terminal device 9 of this embodiment includes: a processor 90, a memory 91 and a computer program 92, such as a blockchain based transaction program, stored in said memory 91 and executable on said processor 90. The processor 90, when executing the computer program 92, implements the steps in the various embodiments of the blockchain-based transaction method described above, such as the steps S101 to S105 shown in fig. 1. Alternatively, the processor 90, when executing the computer program 92, implements the functions of the modules/units in the above-described device embodiments, such as the functions of the modules 101 to 105 shown in fig. 5.
Illustratively, the computer program 92 may be partitioned into one or more modules/units that are stored in the memory 91 and executed by the processor 90 to implement the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 92 in the terminal device 9. For example, the computer program 92 may be divided into a first acquisition module, a second acquisition module, a third acquisition module, a fourth acquisition module, and an authentication module, and each module has the following specific functions:
the first acquisition module is used for acquiring transaction information created by a transaction party and correspondingly generating a transaction block;
the second acquisition module is used for acquiring first voting data of all users and acquiring voting results of witnesses according to the first voting data; wherein the all users include the transaction party and the witness;
the third acquisition module is used for acquiring the number of witnesses determined by a transaction party in a preset proportion and determining the number of witnesses the same as the number of the witnesses according to the voting result and the number of the witnesses;
the fourth acquisition module is used for acquiring the authentication information in the authentication block corresponding to the witness;
and the authentication module is used for writing the transaction information into the transaction block when the transaction information is successfully authenticated according to the authentication information so as to deal with the transaction information.
The terminal device 9 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal device may include, but is not limited to, a processor 90, a memory 91. Those skilled in the art will appreciate that fig. 9 is only an example of a terminal device 9, and does not constitute a limitation to the terminal device 9, and may include more or less components than those shown, or combine some components, or different components, for example, the terminal device may also include an input-output device, a network access device, a bus, etc.
The Processor 90 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 91 may be an internal storage unit of the terminal device 9, such as a hard disk or a memory of the terminal device 9. The memory 91 may also be an external storage device of the terminal device 9, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital Card (SD), a Flash memory Card (Flash Card) and the like provided on the terminal device 9. Further, the memory 91 may also include both an internal storage unit and an external storage device of the terminal device 9. The memory 91 is used for storing the computer program and other programs and data required by the terminal device. The memory 91 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (6)

1. A blockchain-based transaction method, comprising:
acquiring transaction information created by a transaction party, and correspondingly generating a transaction block;
acquiring first voting data of all users, and acquiring a voting result of a witness according to the first voting data; wherein the all users include the transaction party and witness and other users in the current blockchain;
obtaining the number of witnesses determined by a transaction party in a preset proportion, and determining the number of witnesses the same as the number of the witnesses according to the voting result and the number of the witnesses;
acquiring authentication information in an authentication block corresponding to the witness;
when the transaction information is successfully authenticated according to the authentication information, writing the transaction information into the transaction block to make the transaction information deal;
the acquiring first voting data of all users and acquiring a voting result of a witness according to the first voting data comprises the following steps:
acquiring first voting data of all users, and sequencing all the users according to the number of votes in the first voting data to obtain a voting result; wherein the ordering comprises a high to low order;
acquiring first voting data of all users, and sorting all the users according to the number of votes in the first voting data to obtain a voting result, wherein the method comprises the following steps:
in a first preset time period, acquiring second voting data of all users, and updating the witnesses; the first preset time comprises preset witness list updating time;
after acquiring transaction information created by a transaction party and correspondingly generating a transaction block, the method comprises the following steps:
acquiring second voting data of all users, and acquiring representative voting results according to the second voting data; wherein the all users include the transaction party, the representative, and the witness;
obtaining the representative quantity determined by transaction parties in a preset proportion, and determining representatives with the same quantity as the representative quantity according to the voting results of the representatives and the representative quantity;
acquiring parameters set by the representatives;
acquiring third voting data of all users in a third preset time period, judging whether the parameters are effective according to the third voting data, and if the parameters are effective, setting parameters of relevant rules according to the parameters; wherein the third preset time period comprises a preset parameter-set review time.
2. The blockchain-based transaction method of claim 1, wherein obtaining the authentication information in the authentication block corresponding to the witness comprises:
acquiring authentication information of an authentication block of the witness in a second preset time period; the second preset time period comprises preset authentication block generation time;
and if the authentication information of the authentication block of the witness is not obtained, obtaining the authentication information of the authentication block of the next witness in the next second preset time period.
3. The blockchain-based transaction method according to claim 1, wherein when it is determined that the transaction information is successfully authenticated according to the authentication information, the transaction information is written into the transaction block to make the transaction information deal with, including:
judging whether the transaction information authentication is successful or not according to the authentication information, and writing the transaction information into the transaction block when the transaction information authentication is successful so that the transaction information is handed over; the authentication information comprises signature authentication information, timestamp authentication information, transaction price authentication information and transaction passing information.
4. A blockchain-based transaction system, comprising:
the first acquisition module is used for acquiring transaction information created by a transaction party and correspondingly generating a transaction block;
the second acquisition module is used for acquiring first voting data of all users and acquiring voting results of witnesses according to the first voting data; wherein the all users include the transaction party and witness and other users in the current blockchain;
the third acquisition module is used for acquiring the number of witnesses determined by a transaction party in a preset proportion and determining the number of witnesses the same as the number of the witnesses according to the voting result and the number of the witnesses;
the fourth acquisition module is used for acquiring the authentication information in the authentication block corresponding to the witness;
the authentication module is used for writing the transaction information into the transaction block when the transaction information is successfully authenticated according to the authentication information, so that the transaction information is handed over;
the fifth acquisition module is used for acquiring second voting data of all users and acquiring representative voting results according to the second voting data; wherein the all users include the transaction party, the representative, and the witness;
the sixth acquisition module is used for acquiring the representative number determined by the transaction party in a preset proportion and determining representatives with the same number as the representative number according to the voting result of the representatives and the representative number;
a seventh obtaining module, configured to obtain the parameter representing the setting;
the setting module is used for acquiring third voting data of all users in a third preset time period, judging whether the parameters are effective according to the third voting data, and if the parameters are effective, setting parameters of a relevant rule according to the parameters; wherein the third preset time period comprises a preset parameter-set review time;
the second acquisition module includes:
the system comprises a first acquisition unit, a second acquisition unit and a voting unit, wherein the first acquisition unit is used for acquiring first voting data of all users and sequencing all the users according to the number of votes in the first voting data to obtain a voting result; wherein the ordering comprises a high to low order;
the updating unit is used for acquiring second voting data of all users in a first preset time period and updating the witnesses; the first preset time comprises preset witness list updating time.
5. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 3 when executing the computer program.
6. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 3.
CN201810380908.8A 2018-04-25 2018-04-25 Transaction method, system and terminal device based on block chain Active CN108596764B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810380908.8A CN108596764B (en) 2018-04-25 2018-04-25 Transaction method, system and terminal device based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810380908.8A CN108596764B (en) 2018-04-25 2018-04-25 Transaction method, system and terminal device based on block chain

Publications (2)

Publication Number Publication Date
CN108596764A CN108596764A (en) 2018-09-28
CN108596764B true CN108596764B (en) 2021-05-18

Family

ID=63609722

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810380908.8A Active CN108596764B (en) 2018-04-25 2018-04-25 Transaction method, system and terminal device based on block chain

Country Status (1)

Country Link
CN (1) CN108596764B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109583903B (en) * 2018-11-28 2020-12-11 杭州复杂美科技有限公司 Block confirmation method, equipment and storage medium
CN109636389B (en) * 2018-12-13 2020-09-22 东软集团股份有限公司 Method, device, equipment and storage medium for determining block chaining-out time
CN111090891B (en) * 2020-03-23 2020-06-19 卓尔智联(武汉)研究院有限公司 Notary selection method and notary selection system based on block chain
CN111985912A (en) * 2020-08-14 2020-11-24 上海云从企业发展有限公司 Payment method, device, system, equipment and machine readable medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017079652A1 (en) * 2015-11-05 2017-05-11 Pulsifer Allen Cryptographic transactions system
CN107231351A (en) * 2017-05-25 2017-10-03 远光软件股份有限公司 The management method and relevant device of electronic certificate
CN107231299A (en) * 2017-06-07 2017-10-03 众安信息技术服务有限公司 A kind of chain route and realized the system that block chain communicates across chain
CN107341660A (en) * 2017-05-27 2017-11-10 唐盛(北京)物联技术有限公司 A kind of block chain bottom common recognition mechanism and the block catenary system based on the common recognition mechanism

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017079652A1 (en) * 2015-11-05 2017-05-11 Pulsifer Allen Cryptographic transactions system
CN107231351A (en) * 2017-05-25 2017-10-03 远光软件股份有限公司 The management method and relevant device of electronic certificate
CN107341660A (en) * 2017-05-27 2017-11-10 唐盛(北京)物联技术有限公司 A kind of block chain bottom common recognition mechanism and the block catenary system based on the common recognition mechanism
CN107231299A (en) * 2017-06-07 2017-10-03 众安信息技术服务有限公司 A kind of chain route and realized the system that block chain communicates across chain

Also Published As

Publication number Publication date
CN108596764A (en) 2018-09-28

Similar Documents

Publication Publication Date Title
CN108596764B (en) Transaction method, system and terminal device based on block chain
CN109815657B (en) Identity authentication method and device based on alliance chain, computer readable storage medium and terminal equipment
CN110245220B (en) Electronic document signing method, electronic document signing device, electronic document server and storage medium
CN108615152B (en) Transaction device based on block chain
CN107547759B (en) Quality inspection method and device for customer service staff call
CN111008863B (en) Lottery drawing method and system based on block chain
CN108875404B (en) Data desensitization method and device based on machine learning and storage medium
CN107358439A (en) Using method of payment, device and terminal device
CN110489466B (en) Method and device for generating invitation code, terminal equipment and storage medium
WO2020073503A1 (en) Contract signing method and apparatus, and computer device
CN107480513B (en) Authentication implementation method and device, computer device and readable storage medium
CN110751543A (en) Bidding method, system and terminal equipment for multi-party comprehensive evaluation
CN107679385A (en) A kind of fingerprint authentication method and device, terminal and readable storage medium storing program for executing
CN111476640A (en) Authentication method, system, storage medium and big data authentication platform
CN110930161A (en) Method for determining operation time of business operation and self-service business operation equipment
CN109584120A (en) A kind of certificate chain enforcement system and its application method
CN106888219B (en) Multi-finger fingerprint-based account login method, device and equipment
CN113255505A (en) Certificate photo generation method, device, equipment and storage medium
CN101247227B (en) Electric endorsement method and device
CN110992139B (en) Bidding price realizing method and related product
CN111786992A (en) Member registration and authentication method, terminal device and readable storage medium
CN109067551A (en) A kind of real name identification method, computer readable storage medium and terminal device
CN109376516A (en) More fingerprint typings and authentication method, device, electronic equipment and storage medium
CN111539641A (en) Abnormity monitoring method and device, computer equipment and storage medium
CN113327002A (en) Method and device for constructing data asset management model

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