Summary of the invention
In view of the above-mentioned problems, the invention proposes a kind of methods for disposing intelligent contract, comprising: create the account of specified classification
The intelligent contract of family group and specified quantity;The intelligent contract of respective numbers is disposed according to the classification of the account group created;And
In response to apply account request, the quantity of classification and required account based on applied account, to applied account
Account and corresponding intelligent contract in the account group of the classification the same category at family are allocated.
In a kind of embodiment, if in the allocated account group the quantity of not used account and the first reference number ratio
Value is less than first threshold, then New Account identical with its classification is created in the allocated account group, so that being not used
The quantity of account and the ratio of the first reference number reach first threshold, and create corresponding in the New Account quantity
Intelligent contract corresponding in the New Account quantity is simultaneously deployed to the New Account by intelligent contract.
In a kind of embodiment, in a manner of identical or different thread in the allocated account group creation and its
The identical New Account of classification.
In a kind of embodiment, if created in the allocated account group New Account identical with its classification it
The total quantity of not used intelligent contract of the account group of all categories and the ratio of the second reference number are lower than second threshold afterwards, then
New intelligent contract identical with the allocated intelligent contract is created, so that the not used intelligence of the account group of all categories is closed
The ratio of total quantity and the second reference number about reaches the second threshold.
In a kind of embodiment, created in a manner of identical or different thread identical with the allocated intelligent contract new
Intelligent contract.
Another aspect of the present invention additionally provides a kind of system for disposing intelligent contract, comprising: preloaded components are configured as
The account group of specified classification and the intelligent contract of specified quantity are created, and is disposed accordingly according to the classification of the account group created
The intelligent contract of quantity;And distribution module, it is configured to respond to the request of application account, the classification based on applied account
With the quantity of required account, to in the account group of the classification the same category of applied account account and it is corresponding intelligence
Contract is allocated.
In a kind of embodiment, if the distribution module is also configured to not used account in the allocated account group
The ratio of the quantity at family and the first reference number is less than first threshold, then creation and its classification phase in the allocated account group
With New Account so that the ratio of the quantity of not used account and the first reference number reaches first threshold, and create with
Corresponding intelligence contract and intelligent contract corresponding in the New Account quantity is deployed in the New Account quantity
The New Account.
In a kind of embodiment, the distribution module is also configured in a manner of identical or different thread described
New Account identical with its classification is created in the allocated account group.
In a kind of embodiment, if the distribution module is also configured to create in the allocated account group
The total quantity and the second reference number of the not used intelligent contract of the account group of all categories after New Account identical with its classification
Ratio be lower than second threshold, then new intelligence contract identical with the allocated intelligent contract is created, so that all categories
The total quantity of not used intelligent contract and the ratio of the second reference number of account group reach the second threshold.
In a kind of embodiment, the distribution module be also configured to create in a manner of identical or different thread with
The identical new intelligent contract of the allocated intelligent contract.
Another aspect of the present invention additionally provides a kind of device for disposing intelligent contract, comprising: memory is used for storage and refers to
It enables;And processor, it is coupled to the memory, described instruction executes described device when being executed by the processor
Method described in any one of above method.
Another aspect of the present invention additionally provides a kind of computer readable storage medium, and the storage medium includes instruction, institute
It states instruction to be performed, so that the processor of the computer executes method described in any one of above method.
The present invention creates the intelligent contract of a certain number of accounts and deployment respective numbers by preloading, and is then based on wound
The threshold value built the quantity of account and dispose the quantity combination setting of intelligent contract carrys out dynamic creation account and disposes intelligent contract, examines
Consider directly creation account and to dispose intelligent contract the time it takes too long, to system creation account and dispose intelligent contract into
Mobile state processing reduces the time for creating account in system operation and disposing intelligent contract, improves user and uses product
Divide the experience of equal digital asset systems
Specific embodiment
Below with reference to each exemplary embodiment of the attached drawing detailed description disclosure.Flow chart and block diagram in attached drawing are shown
The architecture, function and operation in the cards of method and system according to various embodiments of the present disclosure.It should be noted that
Each box in flowchart or block diagram can represent a part of a module, program segment or code, the module, program
Section or a part of code may include one or more holding for realizing the logic function of defined in each embodiment
Row instruction.It should also be noted that in some alternative implementations, function marked in the box can also be attached according to being different from
The sequence marked in figure occurs.For example, two boxes succeedingly indicated can actually be basically executed in parallel or it
Can also execute in a reverse order sometimes, this depend on related function.It should also be noted that flow chart
And/or the combination of each box in block diagram and the box in flowchart and or block diagram, function as defined in execution can be used
Can or the dedicated hardware based system of operation realize, or specialized hardware can be used and the combination of computer instruction comes
It realizes.
Term as used herein "include", "comprise" and similar terms are understood to open term, i.e.,
" including/including but not limited to ", expression can also include other content.Term "based" is " being based at least partially on ".Term
" one embodiment " expression " at least one embodiment ";Term " another embodiment " expression " at least one other embodiment ",
Etc..
Technology, method and apparatus known to person of ordinary skill in the relevant may be not discussed in detail, but suitable
In the case of, the technology, method and apparatus should be considered as part of specification.For between each unit in attached drawing
Line, it is only for convenient for explanation, indicate that the unit at least line both ends is in communication with each other, it is not intended that limitation does not connect
It can not be communicated between the unit of line.
Below in conjunction with attached drawing, the present invention will be described in detail
Fig. 1 is the flow chart of the method 100 of the intelligent contract of deployment of embodiment according to the present invention
Step S101: the account group of specified classification and the intelligent contract of specified quantity are created, wherein every class account group includes
One or more accounts, each account include the public key that block chain generates and private key, name on account etc., the state packet of each account
It includes and is not used and has used, original state is unused, and each account corresponds to one or more intelligent contracts, works as account
Falling rear account state by user's application becomes having used.The quantity of the intelligent contract of quantity and creation created an account is by system
Hardware resource (it should be understood that hardware resource herein includes but is not limited to that CPU usage, memory usage, disk storage are empty
Between utilization rate etc.) size limitation, for example, in one embodiment, creating an account the disk storage space of occupancy no more than total
The 30% of disk storage space.In one embodiment, the summation with disk storage space shared by intelligent contract is created an account
No more than the 70% of total disk storage space.In one embodiment, account group is divided into 5 classifications.It should be understood that account
The classification of group and the quantity of intelligent contract can according to need and is adjusted.
Step S102: the intelligent contract of respective numbers is disposed according to the classification of the account group created, wherein each intelligence
The state of contract include be not used and used, original state be it is unused, when deployment intelligent contract with account by with
After the application of family, the state of the intelligence contract becomes having used.
Step S103: when personal user or enterprise customer individually apply or batch applies for account, according to application account
The quantity of classification and required account distributes account in identical with the classification of applied account account group and its corresponding
Intelligent contract.It should be understood that user can only once apply for a kind of account of classification.
Step S104: if the quantity of not used account and the ratio of the first reference number are less than in the allocated account group
First threshold, wherein the first reference number is the total quantity of the allocated account group possessed account when being created for the first time, then
Step S105 is executed, process is otherwise terminated.In one embodiment, first threshold is set to 70%.It should be understood that the
One threshold value, which can according to need, to be adjusted and can be set in any suitable manner.It will also be appreciated that first
Reference number is also possible to specified numerical value or other any suitable numerical value.
Step S105: New Account identical with its classification is created, in the allocated account group to increase not used account
The quantity at family will create simultaneously so that the ratio of the quantity of not used account and the first reference number reaches first threshold
The intelligence contract is simultaneously deployed to New Account by intelligence contract corresponding in New Account quantity.In one embodiment, with
The mode of identical or different thread creates New Account identical with its classification in the allocated account group.In a kind of embodiment
In, intelligent contract corresponding in New Account quantity is created in a manner of identical or different thread.
Step S106: if having created all categories after New Account identical with its classification in the allocated account group
Account group the total quantity of not used intelligent contract and the ratio of the second reference number be lower than second threshold, wherein the second ginseng
Number is examined as the total quantity of the intelligent contract of account groups all when creating an account for the first time group, S107 is thened follow the steps, otherwise terminated
Journey.In one embodiment, second threshold is set to 70%.It should be understood that second threshold can according to need progress
It adjusts and can be set in any suitable manner.It will also be appreciated that the second reference number is also possible to specified number
Value or other any suitable numerical value.
Step S107: creation new intelligent contract identical with the allocated intelligent contract is closed with increasing not used intelligence
About quantity, so that the ratio of the second reference number of total quantity of not used intelligence contract reaches second threshold.It should be understood that
It is that the new intelligent contract of creation gives the account of existing classification to use for subsequent deployment, can also backs up as subsequent newly-built class
Other account uses.In one embodiment, it is created in a manner of identical or different thread and the allocated intelligent contract
Identical new intelligent contract.
Method in order to which above-mentioned deployment intelligence contract is better described, provides example below.
Example 1:
Create A class and B class account group, wherein A class account group there are 10 A class accounts and each account there are 3 intelligence
Contract, and B class account group has 10 B class accounts and each account has 4 intelligent contracts, 4 A class accounts of user's first application
Family also remains not used 6 accounts, the quantity of not used account and the first reference number in A class account group after the first sub-distribution
The ratio of (i.e. the total quantity of the initial account of A class account group) is 60%, less than 70% (first threshold), is then needed through dividing
1 new A class account is created in the A class account group matched to reach first threshold for use when next user application A class account
This 3 intelligent contracts are simultaneously deployed to newly-built A class account by the 3 intelligent contracts corresponding with the new A class account of creation simultaneously
Family, at this point, sharing 7 not used accounts in A class account group and accordingly having 21 intelligent contracts, total not used intelligence
Energy contract number is 61 (not used intelligence contract number is plus intelligent contract numbers not used in B class in A class), is referred to second
Several ratio is 87.1%, is greater than 70% (second threshold), then terminates process.When second of application, apply for 5 A class accounts,
After second sub-distribution, A class account also remains 2 not used accounts, the ratio of the quantity of not used account and the first reference number
It is 20%, less than 70% (first threshold), creates 5 new A class accounts in the allocated A class account group then to reach the
One threshold value creates 15 corresponding with 5 new A class accounts so that user applies using when A class account next time again
Intelligent contract, at this point, sharing 7 not used accounts in A class account accordingly has 21 intelligent contracts, total not used intelligence
Can be contract number 61, the ratio with the second reference number is 87.1%, is greater than 70% (second threshold), terminate process, if this
When second threshold be set as 90%, come then needing to create 2 new intelligent contracts so that total not used intelligent contract number reaches
To 63, so that the ratio of total not used intelligent contract number and the second parameter reaches 90%.
Example 2:
The exemplary background when applying for the second time, is applied as example 1, and when first application as example 1
5 B class accounts, after the second sub-distribution, B class account also remains 5 accounts, the quantity of the not used account of B class account and the first ginseng
Several ratio is 50%, and less than 70% (first threshold), 2 new B class accounts are then created in the allocated B class account group
Come reach first threshold for next user apply B class account when use, while create it is corresponding with this 2 new B class accounts
8 intelligent contracts and this 8 intelligent contracts are deployed to 2 newly-built B class accounts, at this point, total not used intelligence is closed
About quantity (not used intelligence contract number is 49 plus intelligent contract number not used in B class in A class) and the second reference number
The ratio of (70) is 70%, is equal to second threshold, terminates process, if same second threshold is set as 80%, then also needing 7
A intelligence contract comes so that total not used intelligent contract number reaches 56, thus total not used intelligent contract number and the
The ratio of two parameters reaches second threshold.
It should be understood that above only list two examples to show explanation, the application of multiple classifications can be related in practical use
Scene is similar to the above process.
The present invention creates the intelligent contract of a certain number of accounts and deployment respective numbers by preloading, and is then based on wound
The threshold value built the quantity of account and dispose the quantity combination setting of intelligent contract carrys out dynamic creation account and disposes intelligent contract, subtracts
System operation time is lacked, the user experience is improved.
The block diagram of the system 200 of the intelligent contract of the deployment of Fig. 2 embodiment according to the present invention.
System 200 includes preloaded components 201 and distribution module 202.
Preloaded components 201 are configured as creating the intelligent contract of the account group of specified classification and specified quantity, and root
According to the intelligent contract of the classification deployment respective numbers of the account group created.
Distribution module 202 is configured to respond to the request of application account, classification based on applied account and required
Account quantity, to in the account group of the classification the same category of applied account account and corresponding intelligent contract into
Row distribution.
In one embodiment, if distribution module 202 is also configured to not used account in the allocated account group
The ratio of the quantity at family and the first reference number is less than first threshold, then creates in the allocated account group identical with its classification
New Account so that the ratio of the quantity of not used account and the first reference number reaches first threshold, and creates and new account
Corresponding intelligence contract and intelligent contract corresponding in New Account quantity is deployed to New Account in amount amount.
In another embodiment, distribution module 202 is also configured to passing through in a manner of identical or different thread
New Account identical with its classification is created in the account group of distribution.
In another embodiment, if distribution module 202 be also configured in the allocated account group creation with
The total quantity and the second reference number of the not used intelligent contract of the account group of all categories after the identical New Account of its classification
Ratio is lower than second threshold, then new intelligent contract identical with the allocated intelligent contract is created, so that the account of all categories
The total quantity of not used intelligent contract and the ratio of the second reference number of family group reach second threshold.
In another embodiment, distribution module be also configured to create in a manner of identical or different thread with
The identical new intelligent contract of the allocated intelligent contract.
Fig. 3 shows the schematic diagram of the device 300 of the intelligent contract of deployment of embodiment according to the present invention.
Device 300 may include: memory 301 and the processor 302 for being coupled to memory 301.Memory 301 is for depositing
Storage instruction, processor 302 are configured as the instruction stored based on memory 301 to realize the step of method as described in Figure 1
One or more of any step in rapid.
As shown in figure 3, device 300 can also include communication interface 303, for carrying out information exchange with other equipment.This
Outside, device 300 can also include bus 304, and memory 301, processor 302 and communication interface 303 are by bus 304 come each other
It is communicated.
Memory 301 may include volatile memory, also may include nonvolatile memory.Processor 302 can be with
It is central processing unit (CPU), microcontroller, specific integrated circuit (ASIC), digital signal processor (DSP), field-programmable
Gate array (FPGA) or other programmable logic device or the one or more collection for being configured as realization the embodiment of the present invention
At circuit.
Alternatively, the method for above-mentioned deployment intelligence contract can be by computer program product, i.e., tangible computer can
Storage medium is read to embody.Computer program product may include computer readable storage medium, containing for executing sheet
The computer-readable program instructions of disclosed various aspects.Computer readable storage medium, which can be, can keep and store by referring to
Enable the tangible device for executing the instruction that equipment uses.Computer readable storage medium can for example be but not limited to electricity storage and set
Standby, magnetic storage apparatus, light storage device, electric magnetic storage apparatus, semiconductor memory apparatus or above-mentioned any appropriate combination.
The more specific example (non exhaustive list) of computer readable storage medium includes: portable computer diskette, hard disk, deposits at random
Access to memory (RAM), read-only memory (ROM), erasable programmable read only memory (EPROM or flash memory), static random are deposited
Access to memory (SRAM), Portable compressed disk read-only memory (CD-ROM), digital versatile disc (DVD), memory stick, floppy disk,
Mechanical coding equipment, the punch card for being for example stored thereon with instruction or groove internal projection structure and above-mentioned any appropriate
Combination.Computer readable storage medium used herein above is not interpreted instantaneous signal itself, such as radio wave or its
The electromagnetic wave of its Free propagation, the electromagnetic wave propagated by waveguide or other transmission mediums are (for example, pass through the light arteries and veins of fiber optic cables
Punching) or pass through electric wire transmit electric signal.
It should be noted that the above list is only specific embodiments of the present invention, it is clear that the present invention is not limited to above real
Example is applied, there are many similar variations therewith.If those skilled in the art directly exported from present disclosure or
All deformations associated, are within the scope of protection of the invention.