CN110009343B - Method for pre-locking Token by adopting intelligent contract - Google Patents

Method for pre-locking Token by adopting intelligent contract Download PDF

Info

Publication number
CN110009343B
CN110009343B CN201910146812.XA CN201910146812A CN110009343B CN 110009343 B CN110009343 B CN 110009343B CN 201910146812 A CN201910146812 A CN 201910146812A CN 110009343 B CN110009343 B CN 110009343B
Authority
CN
China
Prior art keywords
user
signature data
token
locking
intelligent contract
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
CN201910146812.XA
Other languages
Chinese (zh)
Other versions
CN110009343A (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.)
Shanghai Qiyin Information Technology Co ltd
Original Assignee
Shanghai Qiyin 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 Shanghai Qiyin Information Technology Co ltd filed Critical Shanghai Qiyin Information Technology Co ltd
Priority to CN201910146812.XA priority Critical patent/CN110009343B/en
Publication of CN110009343A publication Critical patent/CN110009343A/en
Application granted granted Critical
Publication of CN110009343B publication Critical patent/CN110009343B/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
    • 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/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3825Use of electronic signatures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • Accounting & Taxation (AREA)
  • Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • Finance (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a method for pre-locking Token by adopting an intelligent contract, which comprises the following steps: acquiring user signature data generated by signing the Token locking number by a user; performing secondary signature on the user signature data by using a server address, and generating server signature data; and calling an intelligent contract to verify the user signature data and the server side signature data, and if the verification is passed, pre-locking the number of tokens to be locked by the user in the server side address by using the intelligent contract, so that the sum of the number of tokens used by the user in the server side address does not need to interact with the block chain in a locking range. The invention effectively solves the problem of token state competition, and can reduce the time cost and the execution cost of transactions caused by frequent interaction with a block chain.

Description

Method for pre-locking Token by adopting intelligent contract
Technical Field
The invention relates to the technical field of computers, in particular to a method for pre-locking Token by adopting an intelligent contract.
Background
When the user operates the Token in the address, the user needs to directly call the intelligent contractor to operate the Token. However, this causes the following problems:
1. there is a problem of Token state competition. The malicious user can send a payment request to the server and send a transaction with higher commission to the intelligent contract at the same time, so that the payment request received by the server is behind a second transaction with higher commission, and the transaction cannot be successfully executed normally;
2. each time the intelligent contract is called, the transaction (transaction) needs to be confirmed by a block chain, the waiting time depends on the congestion degree of the transaction on the chain and the set handling fee, and the transaction cannot be accurately evaluated;
3. gas is consumed for calling the intelligent contract every time, and frequent calling is high in cost.
To this end, the applicant has sought, through useful research and research, a solution to the above-mentioned problems, in the context of which the technical solutions to be described below have been made.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: aiming at the defects of the prior art, a method for pre-locking Token by adopting an intelligent contract is provided to solve the problem of state competition in the Token using process and reduce the time cost and the execution cost of transaction caused by frequent interaction with a block chain.
The technical problem to be solved by the invention can be realized by adopting the following technical scheme:
a method for pre-locking a Token with an intelligent contract, comprising the steps of:
acquiring user signature data generated by signing the Token locking number by a user;
performing secondary signature on the user signature data by using a server address, and generating server signature data;
and calling an intelligent contract to verify the user signature data and the server side signature data, and if the verification is passed, pre-locking the number of tokens to be locked by the user in the server side address by using the intelligent contract, so that the sum of the number of tokens used by the user in the server side address does not need to interact with the block chain in a locking range.
In a preferred embodiment of the present invention, after the user signature data is acquired, the acquired user signature data is verified to confirm whether the Token number in the account corresponding to the user allows performing the pre-locking operation.
In a preferred embodiment of the present invention, the user signature data is generated by a user signing the Token lock number and a random number, and when the user signature data is verified by invoking an intelligent contract, it is required to confirm whether the random number in the user signature data already exists; if so, the pre-lock operation is not allowed to prevent replay attacks.
Due to the adoption of the technical scheme, the invention has the beneficial effects that: the invention signs through the Token locking quantity and entrusts the server to call the intelligent contract, after the transaction is successfully executed, the sum of the Token quantity used by the user at the server no longer needs to interact with the block chain in the locking range, and no additional commission charge is generated. Therefore, the token state competition problem is effectively solved, and the time cost and the execution cost of transaction caused by frequent interaction with the block chain can be reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of the present invention.
Detailed Description
In order to make the technical means, the creation characteristics, the achievement purposes and the effects of the invention easy to understand, the invention is further explained below by combining the specific drawings.
Referring to fig. 1, a method for pre-locking a Token with an intelligent contract is shown, comprising the steps of:
step S10, user signature data is acquired, and the user signature data is generated by signing the Token lock number and a random number by the user.
Step S20, carrying out secondary signature on the user signature data by using the server address, and generating server signature data;
step S30, calling an intelligent contract to verify the user signature data and the server signature data, on one hand, confirming whether a verification transaction sender is the server address, on the other hand, confirming whether the user signature and the number of tokens to be operated correspond to each other and whether the random number exists, if the verification transaction sender is the server address, and the user signature and the number of tokens to be operated correspond to each other and the random number does not exist, pre-locking the number of tokens to be locked by the user in the server address by using the intelligent contract, so that the sum of the number of tokens used by the user in the server address does not need to interact with a block chain in a locking range, and no additional handling charge is generated. When the user selects unlocking, settlement is carried out according to the using quantity, and the rest part of the intelligent contract is unlocked by calling, so that the problem of token state competition is effectively solved, and meanwhile, the time cost and the execution cost of transaction caused by frequent interaction with the block chain can be reduced.
In step S10, after acquiring the user signature data, verifying the acquired user signature data to determine whether the number of tokens in the account corresponding to the user allows execution of the pre-locking operation; if execution of the preliminary lock operation is permitted, the process proceeds to step S20.
The foregoing shows and describes the general principles and broad features of the present invention and advantages thereof. It will be understood by those skilled in the art that the present invention is not limited to the embodiments described above, which are described in the specification and illustrated only to illustrate the principle of the present invention, but that various changes and modifications may be made therein without departing from the spirit and scope of the present invention, which fall within the scope of the invention as claimed. The scope of the invention is defined by the appended claims and equivalents thereof.

Claims (3)

1. A method for pre-locking a Token with an intelligent contract, comprising the steps of:
acquiring user signature data, wherein the user signature data is generated by signing the Token locking number and a random number by a user;
performing secondary signature on the user signature data by using a server address, and generating server signature data;
and calling an intelligent contract to verify the user signature data and the server signature data, on one hand, confirming whether a transaction sender is the server address, on the other hand, confirming whether the user signature and the number of Token locks to be operated correspond to each other and whether a random number in the user signature data already exists, and if the transaction sender is the server address, the user signature and the number of Token locks to be operated correspond to each other and the random number does not exist, pre-locking the number of Token to be locked by the user in the server address by utilizing the intelligent contract, so that the sum of the number of Token used by the user in the server address does not need to interact with the block chain in a locking range.
2. The method for prelock tokens using smart contracts according to claim 1, wherein after acquiring the user signature data, the acquired user signature data is verified to confirm whether the Token data in an account corresponding to the user allows for prelock operations.
3. A method for prelock tokens using intelligent contracts according to claim 1, wherein when an intelligent contract is invoked to verify the user signature data, it is determined whether a random number in the user signature data already exists; if so, the pre-lock operation is not allowed to prevent replay attacks.
CN201910146812.XA 2019-02-27 2019-02-27 Method for pre-locking Token by adopting intelligent contract Active CN110009343B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910146812.XA CN110009343B (en) 2019-02-27 2019-02-27 Method for pre-locking Token by adopting intelligent contract

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910146812.XA CN110009343B (en) 2019-02-27 2019-02-27 Method for pre-locking Token by adopting intelligent contract

Publications (2)

Publication Number Publication Date
CN110009343A CN110009343A (en) 2019-07-12
CN110009343B true CN110009343B (en) 2023-04-18

Family

ID=67166119

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910146812.XA Active CN110009343B (en) 2019-02-27 2019-02-27 Method for pre-locking Token by adopting intelligent contract

Country Status (1)

Country Link
CN (1) CN110009343B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110599143B (en) * 2019-07-31 2021-05-28 腾讯科技(深圳)有限公司 Data processing method, related device and medium
CN114024687B (en) * 2021-11-11 2022-10-28 上海证章信息科技有限公司 Method for realizing NFT detachable and interchangeable through locking reissue

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109064169A (en) * 2018-07-13 2018-12-21 杭州复杂美科技有限公司 Method of commerce, equipment and storage medium
CN109087080A (en) * 2018-07-13 2018-12-25 杭州复杂美科技有限公司 Across chain method of commerce, equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109064169A (en) * 2018-07-13 2018-12-21 杭州复杂美科技有限公司 Method of commerce, equipment and storage medium
CN109087080A (en) * 2018-07-13 2018-12-25 杭州复杂美科技有限公司 Across chain method of commerce, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
区块链能做什么、不能做什么?;徐忠等;《金融研究》;20181125;全文 *

Also Published As

Publication number Publication date
CN110009343A (en) 2019-07-12

Similar Documents

Publication Publication Date Title
US11233656B2 (en) Method for mining a block in a decentralized blockchain consensus network
US20190354518A1 (en) Chain mesh network for decentralized transaction systems
KR20210128455A (en) Computer-implemented systems and methods for implementing transfers via blockchain networks.
EP2122552A2 (en) Secure money transfer systems and methods using biometric keys associated therewith
CN110009343B (en) Method for pre-locking Token by adopting intelligent contract
CN111383114A (en) Asset information management method and device based on block chain
EP3852040B1 (en) Blockchain transfer processing method and apparatus, device, and medium
WO2020220740A1 (en) Blockchain-based invoice creation method, apparatus and electronic device
CN110232094A (en) Device, method and storage medium across chain transaction
CN111402033A (en) Asset information management method and device based on block chain
CN112215709A (en) Block chain based bill extraction digital circulation method and device and electronic equipment
CN111161071A (en) Data processing method, device, equipment and storage medium based on block chain
CN112287311A (en) Service implementation method and device based on block chain
CN106998315B (en) Method, device and system for registration authentication
CN114723449B (en) Block chain piece payment method and electronic equipment
CN110322346B (en) Settable payment method and system supporting utxo model
CN111797420A (en) Data authorization and evidence storage method and system based on block chain
CN115526722A (en) Method and device for processing transaction of making positive
CN111369246B (en) Calling authentication method and device of intelligent contract, electronic equipment and storage medium
CN113989045A (en) Block chain-based remittance routing management method and device
Lu et al. Atomicity and Abstraction for Cross-Blockchain Interactions
CN112769878B (en) Service implementation system and method based on block chain
EP1703455B1 (en) Electronic value exchange method and third-party device
CN117911112A (en) Query service settlement method and system for optimizing intelligent contract Gas expenditure
CN111861441A (en) Transfer method, apparatus and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant