Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent all embodiments consistent with this specification one or more embodiment.Phase
Instead, they are only some aspects phases with the one or more embodiments of as detailed in the attached claim, this specification
The example of consistent device and method.
It should be understood that the sequence that might not show and describe according to this specification in other embodiments executes
The step of correlation method.In some other embodiments, step included by method can than described in this specification more
It is more or less.In addition, single step described in this specification, may be broken down into other embodiments multiple steps into
Row description;And multiple steps described in this specification, it may also be merged into single step progress in other embodiments
Description.
Fig. 1 is a kind of flow chart for object select method that an exemplary embodiment provides.As shown in Figure 1, this method is answered
For block chain node, may comprise steps of:
Step 102, determine that the identification information of alternative objects is released to block chain.
In one embodiment, by creating transaction (transfer) in the client of block chain, the transaction can be passed through
The identification information of alternative objects is distributed on block chain, a data in the distributed data base of block chain are become.
It is noted that the transaction in block chain, there are points of the transaction of narrow sense and the transaction of broad sense.The friendship of narrow sense
Easily refer to the value Transfer that user issues to block chain;For example, in traditional bit coin block chain network, transaction can be with
It is that initiate in block chain one of user transfers accounts.And the transaction of broad sense refers to that one that user issues to block chain has business
The business datum of intention;For example, operator can build alliance's chain based on actual business demand, chain portion of alliance is relied on
Affix one's name to it is some it is unrelated with value Transfer it is other types of in line service (for example, object select business, business of renting a house, vehicle scheduling
Business, settlement of insurance claim business, credit services, medical services etc.), and in this kind of alliance's chain, transaction can be user in alliance
The service message or service request that there is one issued in chain business to be intended to.Transaction in this specification should be tended to
It is interpreted as sensu lato transaction.
In one embodiment, since block chain uses distributed data base, so that being distributed to the alternative objects on block chain
Identification information can not be tampered, it can be ensured that prediction result is true, reliable.
In one embodiment, the identification information of alternative objects can be issued from above-mentioned block chain node to block chain.Another
In one embodiment, the identification informations of alternative objects can be from being different from other block chain nodes of above-mentioned block chain node to block chain
Publication, and above-mentioned block chain node can know information relevant to the identification information of the alternative objects, it can also be alternative by this
The identification information (or cryptographic Hash of the identification information of the alternative objects) of object is recorded in the local number of the block chain node maintenance
According in library (i.e. block chain account book).
In one embodiment, the quantity of alternative objects is multiple, and above-mentioned " identification informations of alternative objects " should be understood as
One identification information set, the identification information set contain the corresponding all identification informations of all alternative objects.
In one embodiment, alternative objects may include any type of object, this depends on applied scene, this theory
Bright book is limited not to this.For example, alternative objects can be taxi license when distributing chauffeur task to taxi
Number, for being randomly assigned a taxi for each chauffeur task;For another example the equipment system constituted in configuration multiple electronic equipment
When system, alternative objects can be device id, for choosing the electronic equipment of specified quantity using as main equipment.
Step 104, the intelligent contract for choosing object is called, the intelligence contract is for reading the alternative objects
Identification information, and random alignment is carried out to the identification information of the alternative objects, so that meeting the alternative of predetermined order rule
Object is chosen for target object.
In one embodiment, the processing logic that random alignment is carried out to identification information can be previously written in intelligent contract,
The identification information of the alternative objects of the intelligence contract based on reading is allowed to realize random alignment automatically.Wherein, due to intelligence
Processing logic on contract is disclosure, and entire treatment process is automatically performed by intelligent contract, manual intervention is not present,
Rank results to the identification information of alternative objects are ensured objective, just.
In one embodiment, predetermined order rule can be previously written in intelligent contract, so that the intelligence contract can be with base
In the automatic selection realized to target object of predetermined order rule.Wherein, since the predetermined order rule on intelligent contract is
Disclosure, and entire treatment process is automatically performed by intelligent contract, there is no manual interventions, so that the choosing to target object
Take result that can ensure objective, just.
In one embodiment, transaction can be issued, into the block chain to be called to the intelligent contract;Its
In, comprising the predetermined order rule in the transaction, so that the intelligence contract chooses institute according to the predetermined order rule
State target object.In other words, by including predetermined order rule in transaction, the sequence rule that intelligent contract uses be can control
Then, the ordering requirements under different application scenarios can be adapted to, required target object is chosen.
In one embodiment, the predetermined order rule of default can be previously written in intelligent contract;When not including in transaction
When predetermined order rule, intelligent contract can choose target object based on the predetermined order rule of the default;And it is wrapped when in transaction
When containing a certain predetermined order rule, intelligent contract can choose target object according to the predetermined order rule for including in transaction.
In one embodiment, the intelligent contract is also used to issue the rank results of the identification information of the alternative objects
On to the block chain, so that the ranking results are in open state, convenient for receiving checking and examining for each side.
In one embodiment, the alternative objects for meeting predetermined order rule may include: the first present count of arrangement
The alternative objects of amount;For example when the preset quantity be 100 when, predetermined order rule be equivalent to choose it is randomly ordered after preceding 100
A alternative objects, when the preset quantity be 3 when, predetermined order rule be equivalent to choose it is randomly ordered after preceding 3 alternative objects,
The preset quantity of any other numerical value can also be set certainly, and this specification is limited not to this.It is easily understood that
What " alternative objects for meeting predetermined order rule " actually referred to the identification information of the alternative objects puts in order that meet this pre-
If ordering rule, for example when predetermined order rule is " choose randomly ordered after preceding 100 alternative objects ", if alternative objects
Putting in order as the putting in order for identification information 2 of 50, alternative objects 2 for 1 identification information 1 is 123, then 1 meeting of alternative objects
It is chosen for target object, alternative objects 2 will not be selected.In other embodiments, can also be arranged any form of default
Ordering rule, for example choose it is randomly ordered after put in order for 20~30 alternative objects, then for example choose it is randomly ordered after
Put in order as the alternative objects of prime number, and for example choose it is randomly ordered after put in order to preset the alternative of the solution of formula
Object etc., this specification is limited not to this.
In one embodiment, the intelligent contract also sends a notification message to chain external system, and the notification message includes institute
The information of target object is stated, to indicate that the chain external system assigns default access to the target object, so that the target object
Relevant operation can be implemented, and other unselected alternative objects for target object do not have the default access, Wu Fashi then
Apply relevant operation.
For example, the chain external system may include vehicle license management system for the area for needing to control vehicle fleet size,
And the default access includes the selection permission to vehicle license, alternative objects are the user for wishing to choose vehicle license;So,
Target object can choose vehicle license, and the unselected alternative objects for target object can not then choose vehicle license, from
And realize the control to vehicle fleet size.In another example the chain external system includes real estate pipe for the area for needing the number of shaking to buy house
Reason system, the default access include choosing permission to praedial, and alternative objects are the real estate for wishing to choose a certain building
User;So, it when the quantity of alternative objects exceeds the real estate sum of the building, can be chosen based on the real estate sum
Target object allows the target object to choose the real estate of the building, and the unselected alternative objects for target object
The real estate of the building can not then be chosen.
In order to make it easy to understand, below by taking the number of shaking process when choosing real estate as an example, to the object select side of this specification
Case is described.Fig. 2 is that one kind number of shaking that an exemplary embodiment provides chooses praedial schematic diagram;As shown in Figure 2, it is assumed that
User A wishes the number of shaking for participating in being directed to a certain building, which can input the number of shaking institute by being equipped with the mobile phone 21 of client
The material, such as proof of identification material, certification of deposit material etc. needed, this depends on the requirement of building developer.Similarly, if
User B wishes the participation number of shaking, and can pass through material needed for being equipped with the input number of shaking of mobile phone 22 of client, the feelings of other users
Condition no longer repeats one by one herein.
Equipment 23 is configured as the server-side of the number of shaking system, the mobile phone 21- that 23 one side of equipment and user A-B etc. use
22 etc. interact, and on the other hand interact with equipment 24.Equipment 24 is configured as a block chain node in block chain,
Based on information provided by equipment 23, equipment 24 can be by calling intelligent contract to realize the number of shaking operation.Below with reference to Fig. 3 to setting
The number of the shaking process that standby 23-24 is implemented is described;Wherein, Fig. 3 is that one kind that an exemplary embodiment provides is based on intelligent contract
The number of shaking process schematic diagram;As shown in figure 3, the process may comprise steps of:
Step 302, equipment 23 receives registration request.
In one embodiment, user A can upload registration request to equipment 23 by mobile phone 21, include in registration request
Material needed for the above-mentioned number of shaking;User B can upload registration request to equipment 23 by mobile phone 22, include in registration request
Material needed for the above-mentioned number of shaking.Similarly, other users can be uploaded respectively to equipment 23 by corresponding electronic equipment and be reported
Name request.
Step 304, equipment 23 determines whether the user for reporting registration to request has passed through veritification.
In one embodiment, need to user upload the number of shaking needed for material veritify, including material it is whether complete,
Whether material content meets the requirements.
In one embodiment, the veritification operation for material can be implemented in equipment 23.In another embodiment, equipment 23 can
It is sent to veritification side with material needed for the number of shaking that uploads user, implements to operate for the veritification of material by veritification side, and connect
Receive the veritification result that veritification side returns.
Step 306, when being identified through veritification, equipment 23 is that corresponding user generates Customs Assigned Number.
In one embodiment, by the way that Customs Assigned Number is generated for user, the user is allowed to be based on corresponding Customs Assigned Number
It participates in during the subsequent number of shaking.For example, equipment 23 can be corresponding user generation according to the sequence for receiving registration request
Perhaps equipment 23 can distribute the random Customs Assigned Number or equipment different from other users to Customs Assigned Number to each user
23 can generate Customs Assigned Number by other means, and this specification is limited not to this.
Step 308A, equipment 24 obtain Customs Assigned Number set, the number of shaking rule.
Step 310A, equipment 24 issue Customs Assigned Number set, the number of shaking rule.
In one embodiment, equipment 24 can receive the Customs Assigned Number set and the number of shaking rule of the upload of equipment 23.User compiles
Number set comprising institute it is in need participation this number of shaking Customs Assigned Number.The number of shaking rule is used to indicate the selecting party to Customs Assigned Number
Formula, for example, at least should the quantity based on the room that can sell house and set and need the number of users chosen.Equipment 24 can be in block chain
In know together to Customs Assigned Number set and the number of shaking rule so that the Customs Assigned Number set and the number of shaking the rule quilt after through common recognition
It is distributed to block chain, to record into the distributed data base of block chain, i.e., " cochain ".This specification does not limit being total to for use
Know the type of algorithm;For example, the equipment 24 can be based on such as when the block chain locating for the equipment 24 is alliance's chain or publicly-owned chain
PBFT (Practical Byzantine Fault Tolerance, practical Byzantine failure tolerance) algorithm is to other block chain nodes
Common recognition is initiated, and the Customs Assigned Number set and the number of shaking rule are distributed to block chain after through common recognition, is recorded it to area
In the distributed data base of block chain;For another example the equipment 22 can be with other when the block chain locating for the equipment 24 is publicly-owned chain
Block chain node is based on POW (Proof of Work, proof of work) algorithm, POS (Proof of Stake, equity prove)
Algorithm or other algorithms competition book keeping operation power, and the block chain node from obtaining book keeping operation power charges to transaction data into respective block,
And when being credited to comprising above-mentioned Customs Assigned Number set and the regular transaction of the number of shaking, the Customs Assigned Number set and the number of shaking rule can be with
It is recorded into the distributed data base of block chain.
Step 308B, equipment 24 obtain user's material.
Step 310B, equipment 24 are being locally stored user's material, and by the cryptographic Hash cochain of user's material.
In one embodiment, for the Customs Assigned Number set of acquisition, equipment 24 can further obtain the Customs Assigned Number collection
The corresponding user's material of contained Customs Assigned Number in conjunction, and generate the cryptographic Hash of user's material of each user.Then, by that will use
The cryptographic Hash cochain of family material, that is, be distributed in block chain, convenient in the follow-up process by supervision department etc. to user's material into
Row verifies, the problems such as avoiding user's material from practising fraud, and can to avoid by the direct cochain of user's material, prevent user
Privacy information be disclosed.
In one embodiment, step 308B-310B can be saved.
Step 312, intelligent contract carries out Customs Assigned Number randomly ordered.
In one embodiment, Customs Assigned Number set is recorded in a certain transaction on block chain, which can be marked
It is denoted as related to the number of shaking, allows intelligent contract to find the transaction from block chain accordingly, and obtain Customs Assigned Number set.
For example, intelligent contract can be can be obtained by scanning the transaction record of particular address or the transaction record of specific serial number
The Customs Assigned Number set.
In one embodiment, it has been pre-defined in intelligent contract and has carried out randomly ordered function logic to Customs Assigned Number, made
Obtaining intelligent contract can be randomly ordered based on Customs Assigned Number progress of the function logic to acquisition.Since intelligent contract is published on
On block chain, so that function logic defined in intelligent contract is public data, so that it is guaranteed that for the sequence knot of Customs Assigned Number
Situations such as fruit is objective, fair, avoids black-box operation caused by human intervention.
Step 314, intelligent contract selection meets the regular Customs Assigned Number of the number of shaking.
In one embodiment, the number of shaking rule and Customs Assigned Number set are located in same transaction, and intelligent contract is finding packet
Containing the Customs Assigned Number intersection of sets it is easy after, the number of shaking rule can be extracted from the transaction.In another embodiment, the number of shaking rule with
Customs Assigned Number set is located in different transaction, and intelligent contract can be found by being similar to comprising the Customs Assigned Number collection
The mode of the transaction of conjunction finds the transaction regular comprising the number of shaking, with randomly ordered for carrying out to Customs Assigned Number.
In other embodiments, intelligent contract can be built-in with the preset number of shaking rule, can be advised based on the number of shaking
It is then randomly ordered to Customs Assigned Number progress, individually the number of shaking rule is obtained and published without equipment 24.
In one embodiment, when the number of shaking rule is to choose to be arranged in front 100 Customs Assigned Numbers, after randomly ordered
Customs Assigned Number, intelligent contract can be chosen automatically according to each putting in order for Customs Assigned Number is arranged in front 100 use
Family number.
Step 316, intelligent contract returns to the number of shaking result.
In one embodiment, the number of shaking result can be back to equipment 24 by intelligent contract, and equipment 24 can be by the number of shaking
As a result mobile phone 21-22 etc. is further gone back to, in order to which user A-B etc. is checked.
In one embodiment, intelligent contract can by the randomly ordered result of Customs Assigned Number, choose meet the number of shaking rule
Customs Assigned Number etc. be distributed on block chain, in order to test, verify for the number of shaking result.
Fig. 4 is a kind of schematic configuration diagram for equipment that an exemplary embodiment provides.Referring to FIG. 4, in hardware view, it should
Equipment includes processor 402, internal bus 404, network interface 406, memory 408 and nonvolatile memory 410, is gone back certainly
It may include hardware required for other business.Processor 402 reads corresponding computer journey from nonvolatile memory 410
Then sequence is run into memory 408, object select device is formed on logic level.Certainly, other than software realization mode,
Other implementations, such as the mode of logical device or software and hardware combining is not precluded in this specification one or more embodiment
Etc., that is to say, that the executing subject of following process flow is not limited to each logic unit, is also possible to hardware or logic
Device.
Referring to FIG. 5, the object select device is applied to block chain node in Software Implementation;The device can be with
Include:
Determination unit 51 determines that the identification information of alternative objects is released to block chain;
Call unit 52, calls the intelligent contract for choosing object, and the intelligence contract is described alternative right for reading
The identification information of elephant, and random alignment is carried out to the identification information of the alternative objects, so that meeting predetermined order rule
Alternative objects are chosen for target object.
Optionally, the call unit 52 is specifically used for:
Transaction is issued, into the block chain to be called to the intelligent contract;
Wherein, comprising the predetermined order rule in the transaction, so that the intelligence contract is according to the predetermined order
Rule chooses the target object.
Optionally, the intelligent contract is also used to for the rank results of the identification information of the alternative objects being distributed to described
On block chain.
Optionally, the alternative objects for meeting predetermined order rule include: the alternative right of the first preset quantity of arrangement
As.
Optionally, the intelligent contract also sends a notification message to chain external system, and the notification message includes the target
The information of object, to indicate that the chain external system assigns default access to the target object.
Optionally,
The chain external system includes vehicle license management system, and the default access includes the selection power to vehicle license
Limit;
Alternatively, the chain external system includes real estate management system, the default access includes to praedial option
Limit.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity,
Or it is realized by the product with certain function.A kind of typically to realize that equipment is computer, the concrete form of computer can
To be personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play
In device, navigation equipment, E-mail receiver/send equipment, game console, tablet computer, wearable device or these equipment
The combination of any several equipment.
In a typical configuration, computer includes one or more processors (CPU), input/output interface, network
Interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium
Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),
Digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, based on graphene
Storage medium or other magnetic storage devices or any other non-transmission medium, can be used for storing can be accessed by a computing device
Information.As defined in this article, computer-readable medium does not include temporary computer readable media (transitory media),
Such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability
It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap
Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including described want
There is also other identical elements in the process, method of element, commodity or equipment.
It is above-mentioned that this specification specific embodiment is described.Other embodiments are in the scope of the appended claims
It is interior.In some cases, the movement recorded in detail in the claims or step can be come according to the sequence being different from embodiment
It executes and desired result still may be implemented.In addition, process depicted in the drawing not necessarily require show it is specific suitable
Sequence or consecutive order are just able to achieve desired result.In some embodiments, multitasking and parallel processing be also can
With or may be advantageous.
The term that this specification one or more embodiment uses be only merely for for the purpose of describing particular embodiments, and
It is not intended to be limiting this specification one or more embodiment.In this specification one or more embodiment and the appended claims
Used in the "an" of singular, " described " and "the" be also intended to including most forms, unless context understands earth's surface
Show other meanings.It is also understood that term "and/or" used herein refers to and includes one or more associated list
Any or all of project may combine.
It will be appreciated that though this specification one or more embodiment may using term first, second, third, etc. come
Various information are described, but these information should not necessarily be limited by these terms.These terms are only used to same type of information area each other
It separates.For example, the first information can also be referred to as in the case where not departing from this specification one or more scope of embodiments
Two information, similarly, the second information can also be referred to as the first information.Depending on context, word as used in this is " such as
Fruit " can be construed to " ... when " or " when ... " or " in response to determination ".
The foregoing is merely the preferred embodiments of this specification one or more embodiment, not to limit this theory
Bright book one or more embodiment, all within the spirit and principle of this specification one or more embodiment, that is done is any
Modification, equivalent replacement, improvement etc. should be included within the scope of the protection of this specification one or more embodiment.