CN109741038A - Token processing method, computer readable storage medium and electronic equipment based on block chain account - Google Patents

Token processing method, computer readable storage medium and electronic equipment based on block chain account Download PDF

Info

Publication number
CN109741038A
CN109741038A CN201811518930.0A CN201811518930A CN109741038A CN 109741038 A CN109741038 A CN 109741038A CN 201811518930 A CN201811518930 A CN 201811518930A CN 109741038 A CN109741038 A CN 109741038A
Authority
CN
China
Prior art keywords
token
account
type
contract
user account
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811518930.0A
Other languages
Chinese (zh)
Inventor
李海友
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Onething Technology Co Ltd
Shenzhen Xunlei Network Technology Co Ltd
Original Assignee
Shenzhen Onething 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 Shenzhen Onething Technology Co Ltd filed Critical Shenzhen Onething Technology Co Ltd
Priority to CN201811518930.0A priority Critical patent/CN109741038A/en
Publication of CN109741038A publication Critical patent/CN109741038A/en
Pending legal-status Critical Current

Links

Landscapes

  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention discloses the token processing methods of the system account data model based on block chain, the block chain account includes user account and contract account, the token processing method includes: to obtain token transfer instruction, and the transfer instruction includes the token type and transfer quantity of token to be transferred;According to the token transfer instruction, the token to be transferred of the transfer quantity is shifted between contract account and user account;Wherein, the user account and the contract account all can be used for recording token information;The token information includes the balance information of the token of at least one token type information and respective type.In addition, the present invention also provides a kind of computer readable storage medium and electronic equipments.Token information can be moved in block chain account by the present invention, so that token is quickly searched and modified as primary coin, so that solving token information operates limitation problem in token contract.

Description

Token processing method, computer readable storage medium and electricity based on block chain account Sub- equipment
Technical field
The present invention relates to block chain technical field more particularly to it is a kind of by the token processing method of block chain account, based on Calculation machine readable storage medium storing program for executing and electronic equipment.
Background technique
Distributed Application (Decentralized Application, DAPP) in block catenary system is usually associated with newly Token (token) distribution.These token are for certain voucher as DAPP.Due to being issued on block chain, this A little token are often also with the characteristic of block chain, such as can not distort, is safe, open and clear.Token is equivalent to certain of DAPP Kind represents object, and if any the relevant DAPP of a game, token can be with the stage property of game representation;If it is the relevant DAPP of copyright, Token can then represent copyright.
During the block catenary system of mainstream is realized, token is generally issued by intelligent contract, in token contract code Specified issuing amount, inflation etc..Token has the speciality of exchange, the process that token is exchanged among different users toward contact Also (recording the token remaining sum of each user in contract) is carried out all in token contract, can supports flexible DAPP, does not lose It loses and schemes clever completeness.
However, present inventor has found: in the prior art, because the token information of user is all stored in contract account In, the token transaction between Yao Jinhang user, it is necessary to contract be executed by virtual machine and be just able to achieve token transaction, therefore is transactional It can be limited to the performance of the block chain where contract.
Summary of the invention
The main purpose of the present invention is to provide a kind of token processing methods based on block chain account, computer-readable Storage medium and electronic equipment, it is intended to solve token information and operate limited technical problem in token contract.
To achieve the above object, the present invention provides a kind of token processing of system account data model based on block chain Method, the block chain account include user account and contract account, which is characterized in that the token processing method includes:
Token transfer instruction is obtained, the transfer instruction includes the token type and transfer quantity of token to be transferred;
The token to be transferred of the transfer quantity is shifted between contract account and user account;Wherein, user's account Family and the contract account all can be used for recording token information;The token information includes at least one token type information With the balance information of the token of respective type.
Preferably, the token transfer instruction is that token removes instruction, described by the to be transferred of the transfer quantity Token is shifted between contract account and user account
The token remaining sum of token type to be transferred is subtracted into the transfer quantity in contract account, and in user account The middle token remaining sum by token type to be transferred increases the transfer quantity.
Preferably, the method also includes:
The request of the exchange token of the first user account is obtained, the request for exchanging token includes being exchanged Token type and quantity;
Obtained token will be exchanged to be stored in the contract account.
Preferably, the token transfer instruction is token shift-in instruction, described by the to be transferred of the transfer quantity Token is shifted between contract account and user account
The token remaining sum of token type to be transferred is increased into the transfer quantity in the contract account, and described The token remaining sum of token type to be transferred is subtracted into the transfer quantity in user account.
Preferably, the acquisition token transfer instruction includes: to receive the token transfer instruction from user terminal.
Preferably, the method also includes:
The token for obtaining the first user account produces request, and it includes the token class to be produced that the token, which produces request, Type and quantity;
If Sorry, your ticket has not enough value by the token of first user account, request and described first is produced according to the token and is used The token remaining sum of family account generates the token and removes instruction;It includes the token type to be removed that the token, which removes instruction, And quantity, wherein the token type to be removed is identical with the token type to be produced, the token quantity to be removed More than or equal to the token quantity to be produced and the difference between the token remaining sum of first user account;
It is instructed, the token of the respective type of respective numbers is transferred to from the contract account described according to the removal First user account.
Preferably, the method also includes:
The token for obtaining second user account produces request, and it includes the token class to be produced that the token, which produces request, Type and quantity;
Request, which is produced, according to the token generates token removal instruction;It includes being removed that the token, which removes instruction, Token type and quantity to be removed wherein the token type to be removed is identical with the token type to be produced Token quantity is greater than or equal to the token quantity to be produced;
It is instructed, the token of the respective type of respective numbers is transferred to from the contract account described according to the removal Second user account.
Preferably, the method also includes:
If the second user account does not have pending or ongoing token transaction request, and the second user account The token remaining sum at family is not zero, then generates token shift-in instruction;The token shift-in instruction includes the token class to be moved into Type and quantity, wherein the token that token remaining sum is not zero in the token type and the second user account to be moved into Type is identical, and the token quantity of Yao Yijin is less than or equal to the token remaining sum of the second user account;
It is instructed according to the shift-in, the token of the respective type of respective numbers is transferred to from the second user account The contract account.
Preferably, the token information is recorded in the extension mapping of the block chain account.
Preferably, before obtaining token transfer instruction, the method also includes:
The block chain account setup is extended and is mapped, the extension mapping is for recording at least one token type letter The balance information of breath and the token of respective type.
Preferably, the method also includes: if distribution token, corresponding token is stored in the contract account.
Preferably, the token type is to issue the contract address of the contract of the token.
To achieve the above object, the present invention also provides a kind of computer readable storage medium, the computer-readable storages Media storage has executable program, one or more processor of the executable code is realized described above when executing Token processing method.
To achieve the above object, the present invention also provides a kind of electronic equipment, the electronic equipment includes memory and processing Device, the memory are stored with program, and the processor executes described program to realize above-mentioned token processing method.
A kind of token processing method, computer readable storage medium and electricity based on block chain account provided by the invention Sub- equipment can be such that token is shifted between user account and contract account, when token is transferred in user account When may make token transaction without being limited to contract, promote transaction performance;Meanwhile token can also be transferred to contract account Figure spirit completeness is not lost in middle processing.
Detailed description of the invention
Fig. 1 a is a kind of token processing method process signal based on block chain account that first embodiment of the invention provides Figure;
Fig. 1 b is a kind of token processing method process signal based on block chain account that second embodiment of the invention provides Figure;
Fig. 2 is the data structure schematic diagram for the token transaction that first embodiment of the invention provides;
Fig. 3 is a kind of token processing method process signal based on block chain account that third embodiment of the invention provides Figure;
Fig. 4 is the block chain account data structural schematic diagram that first embodiment of the invention provides;
Fig. 5 is a kind of token processing method process signal based on block chain account that fourth embodiment of the invention provides Figure;
Fig. 6 is a kind of token processing method process signal based on block chain account that fifth embodiment of the invention provides Figure;
Fig. 7 is a kind of token processing method based on block chain account that sixth embodiment of the invention provides;
Fig. 8 is a kind of electronic equipment schematic diagram of internal structure that first embodiment of the invention provides.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that described herein, specific examples are only used to explain the present invention, not For limiting the present invention.Based on the embodiments of the present invention, those of ordinary skill in the art are not before making creative work Every other embodiment obtained is put, shall fall within the protection scope of the present invention.
The description and claims of this application and term " first ", " second ", " third ", " in above-mentioned attached drawing The (if present)s such as four " are to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should manage The data that solution uses in this way are interchangeable under appropriate circumstances, so that the embodiments described herein can be in addition to illustrating herein Or the sequence other than the content of description is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that Cover it is non-exclusive include, for example, containing the process, method, system, product or equipment of a series of steps or units need not limit In step or unit those of is clearly listed, but may include be not clearly listed or for these process, methods, produce The other step or units of product or equipment inherently.
It should be noted that the description for being related to " first ", " second " etc. in the present invention is used for description purposes only, and cannot It is interpreted as its relative importance of indication or suggestion or implicitly indicates the quantity of indicated technical characteristic.Define as a result, " the One ", the feature of " second " can explicitly or implicitly include at least one of the features.In addition, the skill between each embodiment Art scheme can be combined with each other, but must be based on can be realized by those of ordinary skill in the art, when technical solution Will be understood that the combination of this technical solution is not present in conjunction with there is conflicting or cannot achieve when, also not the present invention claims Protection scope within.
The present invention provides processing side token (token) of a kind of system account data model based on block chain and contract Token information can be moved into block chain account, so that token is operated as primary coin, be handled by method.
A referring to Fig.1, Fig. 1 a are a kind of token processing based on block chain account that first embodiment of the invention provides Method flow schematic diagram.Wherein, block chain account includes user account (external account) and contract account.Wherein user account is It is controlled by public key and private key, not store code in user account.Contract account is controlled by the code of account storage, is stored There is code (opcode).
The address of user account is to be determined by public key, and contract address is determined when intelligent contract is created (this address is derived by the transaction number that the address and sender of founder send over, this number is usually called “nonce”)。
It should be noted that user account can be used for recording the token information of user itself preservation, the contract account can Token information and at least one user for recording contract itself are stored in the token information in contract account;Certain user The remaining sum of its certain token possessed should be in the token remaining sum and contract account saved in its user account as its preservation The sum of token remaining sum, such as the token of 100 X types is saved in the user account of certain user, it is the use in contract account Family saves the token of 50 X types, then the user amounts to the token for possessing 150 X types.
The token processing method includes:
Step S101, obtain token transfer instruction, the transfer instruction include token to be transferred token type and Shift quantity.
Specifically, please join in conjunction with Fig. 2 is referred to, Fig. 2 is the data structure schematic diagram of transfer instruction.Wherein, in transfer instruction Token field 10 including recording token type and quantity.
Step S103 will shift the token to be transferred of quantity in contract account and user account according to token transfer instruction Between shift;Wherein, the user account and the contract account all can be used for recording token information;Token information includes at least A kind of balance information of token type information and the token of respective type.
Specifically, the token transfer instruction may include that token removes instruction, and step S103 is specifically included: in contract The token remaining sum of token type to be transferred is subtracted into the transfer quantity in account, and will be to be transferred in user account The token remaining sum of token type increases the transfer quantity.
Specifically, step S103 is specifically included: by the token remaining sum of token type to be transferred in the contract account Increase the transfer quantity, and the token remaining sum of token type to be transferred is subtracted into the transfer number in the user account Amount.
Preferably, token type is to issue the contract address of the contract of token.
In the present embodiment, since token information can recorde in contract account and user account, i.e. token information can be with It is recorded in block chain account, so that token is quickly searched and modified as primary coin;Token can be shifted according to token Instruction is shifted in contract account and user account, since the trading activity of the token saved in user account is closed without relying on It about executes, therefore the performance of token transaction is no longer limited by the performance of contract place block chain, and for there is multiple subregions For block chain, the token transaction of different subregions can execute parallel, greatly improve transaction performance.Below to be with sudden peal of thunder chain Example is illustrated: sudden peal of thunder chain initially includes 64 subregions, it is assumed that the contract account for issuing token is located at the 1st subregion, the 2nd subregion User account A and user account B between initiate a token money transfer transactions, initiated between the user C and user D of the 3rd subregion One token transaction, then this two transaction can be executed in the 2nd subregion and the 3rd Paralleled respectively.In addition, in the present embodiment In, it include token type in token transfer process, in transfer instruction, since token type is publication token contract Contract address, the contract address of each publication token contract are uniquely, to avoid the conflict between different token.
It is a kind of based on block chain account to be that second embodiment provided by the invention provides incorporated by reference to reference Fig. 1 b, Fig. 1 b The flow diagram of token processing method.The difference of second embodiment and first embodiment is: above-mentioned token processing method Can also include:
Step S105, obtains the request of the exchange token of the first user account, and the request for exchanging token includes wanting The token type and quantity of exchange;
Step S107 will exchange obtained token and be stored in contract account.
User can use primary coin (for example, being ether coin in ether mill, sudden peal of thunder chain is chain gram);Or it is other types of Token exchanges the token of required type, and after exchanging successfully, the token exchanged is first stored in contract account, certainly User can utilize removal instruction at any time if necessary.
Fig. 3 is please referred to, at a kind of token based on block chain account provided for second embodiment provided by the invention The flow diagram of reason method.The difference of 3rd embodiment and first embodiment is: before step S101, this method is also wrapped It includes:
Step S100 extends mapping (map) to the block chain account setup, and the extension mapping is for recording at least one The balance information of kind token type information and the token of respective type.
It should be noted that the token that contract itself the possesses and token that each user possesses is saved in contract account, Map can be used specifically to record the token that contract possesses and the token that each user possesses.
It should be noted that user will create corresponding contract account when issuing intelligent contract in block chain (account), the code (opcode) of intelligent contract is stored in the code field of contract account, and is configured for the contract account Contract data, i.e. file store (storage), it is preferable that extension mapping map may include in contract data storage.Specifically Ground, incorporated by reference to referring to Fig. 4, Fig. 4 is the data structure of block chain account.Block chain account setup extension mapping 20, to be used for Record token information.Token information can store in the blocks chain account such as contract account and user account, so that The operation of token facilitates as primary coin.
In the present embodiment, due to having carried out extension mapping to block chain with for recording token information, it can be with Token information is recorded in block chain account.
In some possible embodiments, transfer instruction can be inputted by user terminal.User can be according to oneself need It asks and produces required token to user account from contract account.For example, user logs in oneself account, the use of user terminal Corresponding token transfer button is shown in the interface of family, user can be by the input unit of user terminal, for example, mouse, keyboard Etc. operate the transfer button to input corresponding transfer instruction.
Fig. 5 is please referred to, a kind of processing side token based on block chain account provided for four embodiment of the invention Method flow diagram.Fourth embodiment different from the first embodiment is that this method further includes below step.
Step S501, the token for obtaining the first user account produce request, and it includes producing that the token, which produces request, Token type and quantity.
Specifically, it if the first user account carries out producing token transaction to other users account, generates token and produces Request.
Step S503, if Sorry, your ticket has not enough value by the token of first user account, according to the token produce request and The token remaining sum of first user account generates the token and removes instruction;It includes removing that the token, which removes instruction, Token type and quantity to be removed wherein the token type to be removed is identical with the token type to be produced Token quantity be greater than or equal to difference between the token quantity to be produced and the token remaining sum of first user account Value.
For example, as user account A will turn 100 tokenX (X represents token type), but user to user account B The remaining sum of the tokenX of account A only has 70, then at least needs to remove 30 tokenX to user account A from contract account A In.
Step S505 is instructed according to the removal, and the token of the respective type of respective numbers is turned from the contract account Move to first user account.
In above-described embodiment, the above method can be determined the need for according to the remaining sum for producing account from contract account transfer Corresponding token out, to meet transactions demand.
Fig. 6 is please referred to, a kind of token processing method based on block chain account provided for fifth embodiment of the invention Flow diagram.5th embodiment different from the first embodiment is that this method further includes below step.
Step S601, the token for obtaining second user account produce request, and it includes producing that the token, which produces request, Token type and quantity.Specifically, it if second user account is traded to other users account, generates token and produces Request.
Step S603 produces request according to the token and generates token removal instruction;The token removes instruction The token type and quantity to be removed, wherein the token type to be removed is identical with the token type to be produced, The token quantity to be removed is greater than or equal to the token quantity to be produced.Preferably, the token quantity to be removed, which is equal to, to be turned Token quantity out.
Step S605 is instructed according to the removal, and the token of the respective type of respective numbers is turned from the contract account Move to the second user account.
Fig. 7 is please referred to, Fig. 7 is a kind of processing side token based on block chain account that sixth embodiment of the invention provides Method flow diagram.Sixth embodiment different from the first embodiment is that this method further includes below step.
Step S707, if the second user account does not have pending or ongoing token transaction request, and described The token remaining sum of two user accounts is not zero, then generates token shift-in instruction;The token shift-in instruction includes being moved into Token type and quantity, wherein token remaining sum is not zero in the token type and the second user account to be moved into Token type it is identical, the token quantity of Yao Yijin is less than or equal to the token remaining sum of the second user account.
Step S709 is instructed according to the shift-in, by the token of the respective type of respective numbers from the second user account Family is transferred to the contract account.
In the present embodiment, the above method is also used to not trade in user account or when transaction to be processed, will be remaining Token be transferred in contract account, it can be ensured that the integrality of contract account.
In some possible embodiments, the token processing method further include:
If issuing token, corresponding token is stored in the contract account.
Fig. 8 is please referred to, Fig. 8 is 1 schematic diagram of internal structure of a kind of electronic equipment that first embodiment of the invention provides.The electricity Sub- equipment 1 includes memory 11, processor 12 and bus 13.
Wherein, memory 11 includes at least a type of readable storage medium storing program for executing, which includes flash memory, hard Disk, multimedia card, card-type memory (for example, SD or DX memory etc.), magnetic storage, disk, CD etc..Memory 11 exists It can be the internal storage unit of electronic equipment 1, such as the hard disk of the electronic equipment 1 in some embodiments.Memory 11 is another It is also possible to the plug-in type hard disk being equipped on the External memory equipment of electronic equipment 1, such as electronic equipment 1 in some embodiments, Intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) etc..Further, memory 11 can also both include the internal storage unit of electronic equipment 1 or set including external storage It is standby.Memory 11 can be not only used for the application software and Various types of data that storage is installed on electronic equipment 1, such as intelligent contract machine The code etc. of program 01 can be also used for temporarily storing the data that has exported or will export.
Processor 12 can be in some embodiments a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor or other data processing chips, the program for being stored in run memory 11 Code or processing data, such as execute program 01 etc..
The bus 13 can be Peripheral Component Interconnect standard (peripheral component interconnect, abbreviation PCI) bus or expanding the industrial standard structure (extended industry standard architecture, abbreviation EISA) Bus etc..The bus can be divided into address bus, data/address bus, control bus etc..For convenient for indicating, in Fig. 8 only with one slightly Line indicates, it is not intended that an only bus or a type of bus.
Further, electronic equipment 1 can also include network interface 14, and network interface 14 optionally may include wired connects Mouth and/or wireless interface (such as WI-FI interface, blue tooth interface), commonly used in being built between the device 1 and other electronic equipments Vertical communication connection.
Optionally, electronic equipment 1 can also include user interface, and user interface may include display (Display), defeated Enter unit such as keyboard (Keyboard), optional user interface can also include standard wireline interface and wireless interface.It is optional Ground, in some embodiments, display can be light-emitting diode display, liquid crystal display, touch-control liquid crystal display and OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) touches device etc..Wherein, display can also be appropriate Referred to as display screen or display unit, for being shown in the information handled in electronic equipment 21 and for showing visual user Interface.
Fig. 8 illustrates only the electronic equipment 1 with component 11-14 and intelligent contract machine program 01, those skilled in the art Member may include less or more than illustrating it is understood that the structure shown in Fig. 8 does not constitute the restriction to electronic equipment More components perhaps combines certain components or different component layouts.
Memory 11 is for storing executable program.The processor 12 is for executing executable program 1 to realize following side Method.
Token transfer instruction is obtained, the transfer instruction includes the token type and transfer quantity of token to be transferred.
The token to be transferred for shifting quantity is shifted between contract account and user account;Wherein, the user account and The contract account all can be used for recording token information;Token information includes at least one token type information and respective class The balance information of the token of type.
Specifically, the token transfer instruction is that token removes instruction, will shift the token to be transferred of quantity in contract Transfer includes: that the token remaining sum of token type to be transferred is subtracted the transfer in contract account between account and user account Quantity, and the token remaining sum of token type to be transferred is increased into the transfer quantity in user account.
Specifically, the token transfer instruction is token shift-in instruction, the token transfer instruction is token shifting Instruction specifically includes out: the token remaining sum of token type to be transferred is increased into the transfer quantity in the contract account, And the token remaining sum of token type to be transferred is subtracted into the transfer quantity in the user account.
Specifically, token type is to issue the contract address of the contract of token.
In the present embodiment, since token information can recorde in contract account and user account, i.e., in block chain account, So that token is quickly searched and modified as primary coin, and allow across the chain transaction of token, is held without relying on contract Row.In addition, in the present embodiment, since token contract address is uniquely, to avoid the conflict between different token.
In some possible embodiments, this method further include:
The block chain account setup is extended and is mapped, the extension mapping is for recording at least one token type letter The balance information of breath and the token of respective type.
Specifically, extension is mapped as being added to the token field of record token information in block chain account.Such as Fig. 3 institute Show.
It maps due to having carried out extension to block chain to be used to record token information, token information can be remembered It records in block chain account.
In some possible embodiments, transfer instruction can be inputted by user terminal.User can be according to oneself need It asks and produces required token to user account from contract account.
In some feasible implementations, this method further include:
The token for obtaining the first user account produces request, and it includes the token class to be produced that the token, which produces request, Type and quantity;
If Sorry, your ticket has not enough value by the token of first user account, request and described first is produced according to the token and is used The token remaining sum of family account generates the token and removes instruction;It includes the token type to be removed that the token, which removes instruction, And quantity, wherein the token type to be removed is identical with the token type to be produced, the token quantity to be removed More than or equal to the difference between the token remaining sum of the token quantity and first user account to be produced;
It is instructed, the token of the respective type of respective numbers is transferred to from the contract account described according to the removal First user account.
In above-described embodiment, the above method can be determined the need for according to the remaining sum for producing account from contract account transfer Corresponding token out, to meet transactions demand.
In some feasible implementations, this method further includes below step:
The token for obtaining second user account produces request, and it includes the token class to be produced that the token, which produces request, Type and quantity;
Request, which is produced, according to the token generates token removal instruction;It includes being removed that the token, which removes instruction, Token type and quantity to be removed wherein the token type to be removed is identical with the token type to be produced Token quantity is greater than or equal to the token quantity to be produced;
It is instructed, the token of the respective type of respective numbers is transferred to from the contract account described according to the removal Second user account;
If the second user account does not have pending or ongoing token transaction request, and the second user account The token remaining sum at family is not zero, then generates token shift-in instruction;The token shift-in instruction includes the token class to be moved into Type and quantity, wherein the token that token remaining sum is not zero in the token type and the second user account to be moved into Type is identical, and the token quantity of Yao Yijin is less than or equal to the token remaining sum of the second user account;
It is instructed according to the shift-in, the token of the respective type of respective numbers is transferred to from the second user account The contract account.
In the present embodiment, the above method is also used to not trade in user account or when transaction to be processed, will be remaining Token be transferred in contract account.
In some possible embodiments, the token processing method further include:
If issuing token, corresponding token is stored in the contract account.
In the present embodiment, which can be PC (Personal Computer, PC), be also possible to Smart phone, tablet computer, palm PC, portable computer.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or any combination thereof real It is existing.When implemented in software, it can entirely or partly realize in the form of a computer program product.
The computer program product includes one or more computer instructions.Load and execute on computers the computer When program instruction, the process or function being somebody's turn to do according to the embodiment of the present invention are entirely or partly generated.The computer can be general Computer, special purpose computer, computer network or other programmable devices.The computer instruction can store in computer In readable storage medium storing program for executing, or transmit from a computer readable storage medium to another computer readable storage medium, for example, The computer instruction can from a web-site, computer, server or data center by it is wired (such as coaxial cable, Optical fiber, Digital Subscriber Line (DSL)) or wireless (such as infrared, wireless, microwave etc.) mode to another web-site, computer, Server or data center are transmitted.The computer readable storage medium can be any available Jie that computer can store Matter either includes the data storage devices such as one or more usable mediums integrated server, data center.The usable medium It can be magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or semiconductor medium (such as solid-state Hard disk Solid State Disk (SSD)) etc..
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed system, device and method can be with It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit is drawn Point, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components can To combine or be desirably integrated into another system, or some features can be ignored or not executed.Another point, it is shown or beg for The mutual coupling, direct-coupling or communication connection of opinion can be through some interfaces, the INDIRECT COUPLING of device or unit Or communication connection, it can be electrical property, mechanical or other forms.
Unit may or may not be physically separated as illustrated by the separation member for this, show as unit Component may or may not be physical unit, it can it is in one place, or may be distributed over multiple nets On network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and when sold or used as an independent product, It can store in a computer readable storage medium.Based on this understanding, the technical solution of the application substantially or Person says that all or part of the part that contributes to existing technology or the technical solution can body in the form of software products Reveal and, which is stored in a storage medium, including some instructions are with so that a computer is set Standby (can be personal computer, server or the network equipment etc.) execute each embodiment this method of the application whole or Part steps.And storage medium above-mentioned include: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), Random access memory (RAM, Random Access Memory), magnetic or disk etc. be various to can store program code Medium.
It should be noted that the serial number of the above embodiments of the invention is only for description, do not represent the advantages or disadvantages of the embodiments.And The terms "include", "comprise" herein or any other variant thereof is intended to cover non-exclusive inclusion, so that packet Process, device, article or the method for including a series of elements not only include those elements, but also including being not explicitly listed Other element, or further include for this process, device, article or the intrinsic element of method.Do not limiting more In the case where, the element that is limited by sentence "including a ...", it is not excluded that including process, device, the article of the element Or there is also other identical elements in method.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (14)

1. a kind of token processing method based on block chain account, the block chain account includes user account and contract account, It is characterized in that, the token processing method includes:
Token transfer instruction is obtained, the transfer instruction includes the token type and transfer quantity of token to be transferred;
According to the token transfer instruction, the token to be transferred of the transfer quantity is turned between contract account and user account It moves;Wherein, the user account can be used for recording the token information of user account itself preservation, and the contract account can be used for The token information and at least one user account for recording contract itself are stored in the token information in contract account;It is described Token information includes the balance information of the token of at least one token type information and respective type.
2. token processing method as described in claim 1, which is characterized in that the token transfer instruction is token removal Instruction, the token to be transferred by the transfer quantity is shifted between contract account and user account includes:
The token remaining sum of token type to be transferred is subtracted into the transfer quantity in contract account, and will in user account The token remaining sum of token type to be transferred increases the transfer quantity.
3. token processing method as claimed in claim 2, which is characterized in that the token transfer instruction is token shift-in Instruction, the token to be transferred by the transfer quantity is shifted between contract account and user account includes:
The token remaining sum of token type to be transferred is increased into the transfer quantity in the contract account, and in the user The token remaining sum of token type to be transferred is subtracted into the transfer quantity in account.
4. token processing method as claimed in claim 2 or claim 3, it is characterised in that the acquisition token transfer instruction includes: Receive the token transfer instruction from user terminal.
5. token processing method as claimed in claim 2 or claim 3, which is characterized in that the method also includes:
The token for obtaining the first user account produces request, the token produce request include the token type to be produced and Quantity;
If Sorry, your ticket has not enough value by the token of first user account, request and the first user account are produced according to the token The token remaining sum at family generates the token and removes instruction;It includes the token type sum number to be removed that the token, which removes instruction, Amount, wherein the token type to be removed is identical with the token type to be produced, the token quantity to be removed is greater than Or equal to the token quantity to be produced and the difference between the token remaining sum of first user account;
It is instructed according to the removal, the token of the respective type of respective numbers is transferred to described first from the contract account User account.
6. token processing method according to claim 2 or 3, which is characterized in that the method also includes:
The token for obtaining second user account produces request, the token produce request include the token type to be produced with Quantity;
Request, which is produced, according to the token generates token removal instruction;It includes the token to be removed that the token, which removes instruction, Type and quantity, wherein the token type to be removed is identical with the token type to be produced, the token to be removed Quantity is greater than or equal to the token quantity to be produced;
It is instructed according to the removal, the token of the respective type of respective numbers is transferred to described second from the contract account User account.
7. according to the method described in claim 6, it is characterized in that, the method also includes:
If the second user account does not have a pending or ongoing token transaction request, and the second user account Token remaining sum is not zero, then generates token shift-in instruction;Token shift-in instruction include the token type to be moved into and Quantity, wherein the token type that token remaining sum is not zero in the token type and the second user account to be moved into Identical, the token quantity of Yao Yijin is less than or equal to the token remaining sum of the second user account;
It is instructed, the token of the respective type of respective numbers is transferred to from the second user account described according to the shift-in Contract account.
8. token processing method as described in claim 1, which is characterized in that the token information is recorded in the block chain In the extension mapping of account.
9. according to the method described in claim 8, it is characterized in that, the method is also wrapped before obtaining token transfer instruction It includes:
The block chain account setup is extended and is mapped, extension mapping for record at least one token type information with The balance information of the token of respective type.
10. token processing method as described in claim 1, which is characterized in that the method also includes:
If issuing token, corresponding token is stored in the contract account.
11. token processing method as described in claim 1, which is characterized in that the token type is to issue the token Contract contract address.
12. token processing method according to claim 1, which is characterized in that the method also includes:
The request of the exchange token of the first user account is obtained, the request for exchanging token includes the token class to be exchanged Type and quantity;
Obtained token will be exchanged to be stored in the contract account.
13. a kind of computer readable storage medium, the computer-readable recording medium storage has executable program, and feature exists In realization is as described in any one of claim 1~12 when one or more processor of the executable code executes Token processing method.
14. a kind of electronic equipment, which is characterized in that the electronic equipment includes memory and processor, the memory storage There is program, the processor executes described program to realize such as the described in any item token processing methods of claim 1~12.
CN201811518930.0A 2018-12-12 2018-12-12 Token processing method, computer readable storage medium and electronic equipment based on block chain account Pending CN109741038A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811518930.0A CN109741038A (en) 2018-12-12 2018-12-12 Token processing method, computer readable storage medium and electronic equipment based on block chain account

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811518930.0A CN109741038A (en) 2018-12-12 2018-12-12 Token processing method, computer readable storage medium and electronic equipment based on block chain account

Publications (1)

Publication Number Publication Date
CN109741038A true CN109741038A (en) 2019-05-10

Family

ID=66358834

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811518930.0A Pending CN109741038A (en) 2018-12-12 2018-12-12 Token processing method, computer readable storage medium and electronic equipment based on block chain account

Country Status (1)

Country Link
CN (1) CN109741038A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110473104A (en) * 2019-08-20 2019-11-19 深圳市网心科技有限公司 A kind of transaction processing method and relevant device
CN110909342A (en) * 2019-11-28 2020-03-24 北京海益同展信息科技有限公司 Method and device for changing pass certificates and computer readable storage medium
CN111476570A (en) * 2020-04-02 2020-07-31 致信互链(北京)科技有限公司 Method, device and equipment for migrating general certificates and storage medium
CN114357080A (en) * 2021-12-31 2022-04-15 支付宝(杭州)信息技术有限公司 Account data reading and writing method and device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110087592A1 (en) * 2009-10-13 2011-04-14 Van Der Veen Larry Systems and methods for facilitating transactions
US20130311368A1 (en) * 2012-05-18 2013-11-21 MoviePass, Inc. Automatic authentication and funding method
CN106779704A (en) * 2016-12-06 2017-05-31 杭州趣链科技有限公司 A kind of block chain anonymous deal method based on ring signatures
CN107077675A (en) * 2016-12-30 2017-08-18 深圳前海达闼云端智能科技有限公司 Block chain based currency management method and system
CN108428120A (en) * 2018-03-16 2018-08-21 中链科技有限公司 A kind of digital asset interoperability methods and computer readable storage medium
CN108694575A (en) * 2018-06-13 2018-10-23 深圳前海微众银行股份有限公司 Verification method of transferring accounts, device and storage medium based on block chain
CN108876337A (en) * 2018-05-24 2018-11-23 深圳前海益链网络科技有限公司 A kind of block chain network method for supporting different Token exchange money transfer transactions verifyings

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110087592A1 (en) * 2009-10-13 2011-04-14 Van Der Veen Larry Systems and methods for facilitating transactions
US20130311368A1 (en) * 2012-05-18 2013-11-21 MoviePass, Inc. Automatic authentication and funding method
CN106779704A (en) * 2016-12-06 2017-05-31 杭州趣链科技有限公司 A kind of block chain anonymous deal method based on ring signatures
CN107077675A (en) * 2016-12-30 2017-08-18 深圳前海达闼云端智能科技有限公司 Block chain based currency management method and system
CN108428120A (en) * 2018-03-16 2018-08-21 中链科技有限公司 A kind of digital asset interoperability methods and computer readable storage medium
CN108876337A (en) * 2018-05-24 2018-11-23 深圳前海益链网络科技有限公司 A kind of block chain network method for supporting different Token exchange money transfer transactions verifyings
CN108694575A (en) * 2018-06-13 2018-10-23 深圳前海微众银行股份有限公司 Verification method of transferring accounts, device and storage medium based on block chain

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110473104A (en) * 2019-08-20 2019-11-19 深圳市网心科技有限公司 A kind of transaction processing method and relevant device
CN110473104B (en) * 2019-08-20 2023-11-17 深圳市迅雷网络技术有限公司 Transaction processing method and related equipment
CN110909342A (en) * 2019-11-28 2020-03-24 北京海益同展信息科技有限公司 Method and device for changing pass certificates and computer readable storage medium
CN111476570A (en) * 2020-04-02 2020-07-31 致信互链(北京)科技有限公司 Method, device and equipment for migrating general certificates and storage medium
CN111476570B (en) * 2020-04-02 2024-01-26 致信互链(北京)科技有限公司 Method, device, equipment and storage medium for migrating pass
CN114357080A (en) * 2021-12-31 2022-04-15 支付宝(杭州)信息技术有限公司 Account data reading and writing method and device

Similar Documents

Publication Publication Date Title
CN109741038A (en) Token processing method, computer readable storage medium and electronic equipment based on block chain account
CN104699423B (en) The method and apparatus that drive is bound in linux system
CN104572243B (en) Method and system for sharing Java Virtual Machine
CN108776648A (en) Data transmission method, system and FPGA isomeries accelerator card and storage medium
CN110517138A (en) Intelligent contract processing method, device, computer equipment and storage medium
CN107368272A (en) A kind of double screen is different to touch different aobvious method, apparatus and computer-readable recording medium
CN106372008B (en) A kind of data cache method and device
CN110750530B (en) Service system and data checking method thereof
CN108804175A (en) Multilingual adaptation method, mobile terminal and computer readable storage medium
CN109413207A (en) A kind of file uploading method, system, device and computer readable storage medium
CN109783283A (en) A kind of processing method, device and the terminal device of hardware detection information
CN105765548B (en) The support that IOAPIC in equipment based on AMBA is interrupted
CN107506494B (en) Document handling method, mobile terminal and computer readable storage medium
CN108255989A (en) Picture storage method, device, terminal device and computer storage media
CN110244963A (en) Data-updating method, device and terminal device
CN109857579A (en) A kind of data processing method and relevant apparatus
CN107679222A (en) Image processing method, mobile terminal and computer-readable recording medium
CN108400929A (en) Data processing method, device, computing device and medium
CN108733487A (en) The more application management methods of Java card and Java card
CN107911541A (en) A kind of multi-cam switching application method and device based on android system
CN109741053A (en) Token processing method, computer readable storage medium and electronic equipment based on block chain account
CN107609119A (en) Document handling method, mobile terminal and computer-readable recording medium
CN109164987A (en) A kind of control method of magnetic disc array card, device and electronic equipment
CN107731154A (en) LED display data backup device, method and terminal device
CN109146495A (en) Fast and safely start the method, apparatus and terminal device of payment

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
TA01 Transfer of patent application right

Effective date of registration: 20210924

Address after: 518000 21 / f-23 / F, block B, building 12, Shenzhen Bay science and technology ecological park, No. 18, South Keji Road, high tech community, Yuehai street, Nanshan District, Shenzhen City, Guangdong Province

Applicant after: Xunlei Networking Technologies, Ltd.

Applicant after: SHENZHEN ONETHING TECHNOLOGIES Co.,Ltd.

Address before: 518000 5th floor, building 5, Weixin Software Park, No.9, Gaoxin South 9th Road, Nanshan District, Shenzhen City, Guangdong Province

Applicant before: SHENZHEN ONETHING TECHNOLOGIES Co.,Ltd.

TA01 Transfer of patent application right
RJ01 Rejection of invention patent application after publication

Application publication date: 20190510

RJ01 Rejection of invention patent application after publication