Specific embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to
Convenient for description, part relevant to invention is illustrated only in attached drawing.
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase
Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 is the schematic diagram of a scenario of receiving agent in one embodiment of the invention.Fig. 2 is one that one embodiment of the invention provides
The flow chart of kind receiving agent's method.
As depicted in figs. 1 and 2, in the present embodiment, the present invention provides a kind of receiving agent suitable for block chain node
Method, this method comprises:
S103: when executing money transfer transactions pay the bill to the first account, judge the first account agency's gathering address whether
Including legal address:
It is to then follow the steps S105: is transferred accounts according to the agency of pre-configuration gathering strategy to agency's gathering address.
With the address add that in scene shown in Fig. 1, agency's gathering address configuration of account A is account BB, while account B is not
Configuration Agent is collected money for address:
When user's second initiates a money transfer transactions tx1 to pay the bill account A, the node of the first block chain receives should
Money transfer transactions tx1 is simultaneously packed into block;
In step s 103, when node executes money transfer transactions tx1 by contract of transferring accounts, judge that the agency of account A collects money ground
Whether location includes legal address:
Contract of transferring accounts detects that agency's gathering address of account A is legal address, i.e., the address add of above-mentioned configurationB, execute
Step S105: strategy is collected money to agency's gathering address add according to the agency of pre-configurationBIt transfers accounts.
If contract of transferring accounts detects that the agency of account A collects money address as sky, or is illegal address field etc., then contract of transferring accounts
It can be to the address add of account AAIt transfers accounts.
Specifically, in the present embodiment, when transferring accounts in step S105 to agency's gathering address, contract of transferring accounts equally can
Execute above-mentioned receiving agent's method, that is, judgement agency's gathering address addBWhether wrap agency's gathering address of corresponding account B
Include legal address:
Contract of transferring accounts detects that the agency of account B collects money address as sky, and the money transfer transactions tx1 fund paid is transferred to account
The address add of BB。
If agency's gathering address of account B is also configured with the address add of account CC, then the further judgement of contract of transferring accounts needs
Agency's gathering address addCWhether agency's gathering address of corresponding account C includes legal address, and so on.
In another embodiment, when transferring accounts in step S105 to agency's gathering address, contract of transferring accounts no longer is executed
State receiving agent's method, that is, no matter act on behalf of gathering address addBWhether agency's gathering address of corresponding account B includes legal
The money transfer transactions tx1 fund paid is all transferred to the address add of account B in step S105 by addressB。
Above-described embodiment by for block chain account Configuration Agent collect money address, make to transfer accounts contract when executing money transfer transactions
It can directly transfer accounts to agency's gathering address of authorization, so that realizing can transfer accounts automatically when carrying out block chain and transferring accounts
To specified correspondent account, the user experience of collecting account management of balance is improved, while reducing management of balance cost.
Fig. 3 is a kind of flow chart of preferred embodiment of method shown in Fig. 2.As shown in figure 3, in a preferred embodiment
In, the above method further include:
S101: receiving and executes authorization transaction to collect money ground for the agency that the address configuration of the second account is the first account
Location, and by common recognition record to the first block chain.
Wherein, authorization transaction is generated by the private key signature of the first account, and authorization transaction includes by the address of the second account
Authorization is the first address authorization message of agency's gathering address of the first account.
Equally shown in Fig. 1 for scene, holder user's first of account A wants address weight that the agency of account A collects money
Newly it is configured to the address add of account DDWhen, the private key signature generation that the user terminal of user's first passes through account A includes by addDAuthorization
It trades tx2 for the authorization of the first address authorization message of agency's gathering address of account A, and tx2 is sent to the first block chain
Node;
In step s101, node executes authorization transaction tx2 by corresponding contract, after verifying is signed successfully, by account A
Agency collect money address configuration be addD, and by common recognition record to the first block chain.Account A is carried out when node executes again
When the money transfer transactions tx3 of payment, will through the above steps S103 and S105 to addDIt transfers accounts.
In a preferred embodiment, authorization transaction further includes agency's gathering amount of agency's gathering address, step S105 packet
It includes and agency's gathering address transfer accounts no more than agency's gathering amount.Wherein, agency gathering amount may include with down toward
One item missing: agency's gathering single amount is acted on behalf of total receipts degree, can also be configured according to actual needs other commonly used in the art
Different type amount.
For example, authorization transaction tx2 will act on behalf of the address add that collects moneyDAgency collect money single amount be configured to 100 xxx coin,
Then have, when node, which is executed, pays the money transfer transactions tx4 of 120 xxx coin to account A, in step s105, to agency's gathering ground
Location addDIt transfers accounts 100 xxx coin, while to addAIt transfers accounts 20 xxx coin;87 xxx coin are paid to account A when node executes
When money transfer transactions tx5, in step s105, to agency's gathering address addDIt transfers accounts 87 xxx coin.
In another example authorization transaction tx2 will act on behalf of the address add that collects moneyDTotal receipts degree of acting on behalf of be configured to 1000 xxx
Coin then has, and when node, which is executed, pays the money transfer transactions tx6 of 300 xxx coin to account A, judges addDAct on behalf of total receipts
Whether degree is greater than 300 xxx coin: being, then to addDIt transfers accounts 300 xxx coin, and 700 xxx of total receipts degree is acted on behalf of into new
Coin is recorded on the first block chain, is judged when next record money transfer transactions for executing.
For another example authorization transaction tx2 is configured with agency's gathering address add simultaneouslyDAgency collect money single amount and agency
Total receipts degree, then transferring accounts in step S105 needs while meeting two amounts.
In a preferred embodiment, authorization transaction further includes the secondary generation by the address authorization of several accounts for the first account
Second address authorization message of reason gathering address;Step S105 includes: to collect money rule respectively to agency according to the agency of pre-configuration
Gathering address and several secondary agency's gathering addresses are transferred accounts.
For example, authorization trades while being configured with agency's gathering address add for account AEGathering address add is acted on behalf of with secondaryF,
Agency's gathering rule can be by contract configuration of transferring accounts, can also be by authorization transaction configuration, for example, single transfers accounts and 80% transfers accounts to generation
Reason gathering address addE, 20% transfer accounts to secondary act on behalf of gathering address addF, transfer accounts in 100xxx coin amount or, single is transferred accounts to
Agency's gathering address addE, the part beyond 100xxx coin amount transfer accounts to secondary act on behalf of gathering address addF, etc..
Above-described embodiment is further by configuring multiple agencies gathering address for block chain account, and further satisfaction is more not
Same business demand.
In a preferred embodiment, authorization transaction further includes the validity period information of agency's gathering address, the validity period information
Include at least one of the following: agency's gathering initial time, agency's gathering terminates time, agency's gathering effective period of time;
The judgement of step S103 further include: current according to validity period information judgement agency's gathering address of agency's gathering address
Whether effectively.
Specifically, agency's gathering initial time is configurable to time point, for example, on 2 1st, 2,019 0 point 0 second 0 minute, etc.;
Also it is configurable to block height, such as block height 20000, etc.;It is also configured as sky, i.e. agency's gathering self-configuring agency
Gathering comes into force at once behind address;
Similarly, agency's gathering terminates the time and is also configurable to time point, such as 0 minute and 0 second 0 point of the year two thousand twenty January 1,
Deng;Also it is configurable to block height, such as block height 30000, etc.;It is also configured as sky, i.e. agency's gathering self-configuring
It is behind agency's gathering address and forever effective before being modified or being emptied;
Similarly, agency's gathering effective period of time is configurable to the period, for example, it is daily 9 points 30 30 minutes to 15:,
On every Tuesdays, 1 to 20, etc. of every month;Also it is configurable to block height section, such as block height 20001-22000,
24001-26000,28001-30000, etc..
It is further preferred that transfer accounts contract can also timing according to validity period information judge whether forever agency collects money address
It is expired long, empty agency's gathering address of the permanent expiration automatically if permanent expiration.
Fig. 4 is a kind of flow chart of preferred embodiment of method shown in Fig. 2.As shown in figure 4, in a preferred embodiment
In, the above method further include:
S107: receiving and executes revocation transaction to empty the agency gathering address of the first account and by common recognition record
To the first block chain.
Equally shown in Fig. 1 for scene, holder user's first of account A wants revocation and collects money ground to the agency of account A
When the authorization of location, the user terminal of user's first generates revocation transaction tx7 by the private key signature of account A and is sent to the firstth area
The node of block chain;
In step s 107, node receives and executes revocation transaction tx7, empties agency's gathering address of account A, and
By on common recognition record to the first block chain.It executes the money transfer transactions paid the bill account A again at this time, is in step s 103
It can detect that the agency of account A collects money address for sky, directly to addAIt transfers accounts.
Fig. 5 is the flow chart for another receiving agent's method that one embodiment of the invention provides.Method shown in fig. 5 can match
Method shown in Fig. 3 is closed to execute.
As shown in figure 5, in the present embodiment, receiving agent's method the present invention also provides another kind suitable for user terminal,
Include:
S201: it generates authorization and trades and be sent to the node of the first block chain for executing to match the address of the second account
It is set to agency's gathering address of the first account, and is recorded by common recognition to the first block chain, and, it is executing to the first account
Whether agency's gathering address that the first account is judged when the money transfer transactions of payment includes legal address: being, then according to pre-configuration
Agency's gathering strategy transfers accounts to agency's gathering address.
Wherein, authorization transaction passes through the private key signature of the first account, and authorization transaction includes authorizing the address of the second account
For the first address authorization message of agency's gathering address of the first account.
Preferably, authorization transaction further includes agency's gathering amount of agency's gathering address;The above-mentioned agency according to pre-configuration
Gathering strategy to agency gathering address transfer accounts include: to agency gathering address carry out be no more than agency gathering amount turn
Account.
Preferably, agency's gathering amount includes at least one of the following: agency's gathering single amount, acts on behalf of total receipts degree.
Preferably, authorization transaction further includes secondary agency's gathering address by the address authorization of several accounts for the first account
The second address authorization message;Above-mentioned collected money tactful according to the agency of pre-configuration includes: root to acting on behalf of gathering address and transfer accounts
It transfers accounts respectively to agency gathering address and several secondary gathering addresses of acting on behalf of according to agency's gathering rule of pre-configuration.
Preferably, authorization transaction further includes the validity period information of agency's gathering address, which includes below extremely
One item missing: agency's gathering initial time, agency's gathering terminate time, agency's gathering effective period of time;Above-mentioned the first account of judgement
Agency collect money address whether include legal address further include: according to agency gathering address validity period information judgement agency gathering
Whether address is currently effective.
Receiving agent's principle of method shown in Fig. 5 can refer to method shown in Fig. 3, and details are not described herein again.
Fig. 6 is a kind of flow chart of preferred embodiment of method shown in Fig. 5.Method shown in fig. 6 can cooperate shown in Fig. 4
Method execute.
As shown in fig. 6, in a preferred embodiment, the above method further include:
S203: it generates revocation and trades and be sent to the node of the first block chain for executing to empty the first account
Agency gathering address is simultaneously recorded by common recognition to the first block chain.
Receiving agent's principle of method shown in Fig. 6 can refer to method shown in Fig. 4, and details are not described herein again.
Fig. 7 is a kind of structural schematic diagram for equipment that one embodiment of the invention provides.
As shown in fig. 7, present invention also provides a kind of equipment 700, including one or more centres as on the other hand
Unit (CPU) 701 is managed, can be added according to the program being stored in read-only memory (ROM) 702 or from storage section 708
The program that is downloaded in random access storage device (RAM) 703 and execute various movements appropriate and processing.In RAM703, also deposit
It contains equipment 700 and operates required various programs and data.CPU701, ROM702 and RAM703 pass through the phase each other of bus 704
Even.Input/output (I/O) interface 705 is also connected to bus 704.
I/O interface 705 is connected to lower component: the importation 706 including keyboard, mouse etc.;It is penetrated including such as cathode
The output par, c 707 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 708 including hard disk etc.;
And the communications portion 709 of the network interface card including LAN card, modem etc..Communications portion 709 via such as because
The network of spy's net executes communication process.Driver 710 is also connected to I/O interface 705 as needed.Detachable media 711, such as
Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 710, in order to read from thereon
Computer program be mounted into storage section 708 as needed.
Particularly, in accordance with an embodiment of the present disclosure, receiving agent's method of any of the above-described embodiment description can be implemented
For computer software programs.For example, embodiment of the disclosure includes a kind of computer program product comprising be tangibly embodied in
Computer program on machine readable media, the computer program include the program code for executing receiving agent's method.
In such embodiments, which can be downloaded and installed from network by communications portion 709, and/or from
Detachable media 711 is mounted.
As another aspect, present invention also provides a kind of computer readable storage medium, the computer-readable storage mediums
Matter can be computer readable storage medium included in the device of above-described embodiment;It is also possible to individualism, it is unassembled
Enter the computer readable storage medium in equipment.Computer-readable recording medium storage has one or more than one program, should
Program is used to execute the receiving agent's method for being described in the application by one or more than one processor.
Flow chart and block diagram in attached drawing are illustrated according to the system of various embodiments of the invention, method and computer journey
The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation
A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use
The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box
The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually
It can be basically executed in parallel, they can also be executed in the opposite order sometimes, this is depending on related function.Also it wants
It is noted that the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart, Ke Yitong
The dedicated hardware based system of functions or operations as defined in executing is crossed to realize, or by specialized hardware and can be calculated
The combination of machine instruction is realized.
Being described in the embodiment of the present application involved unit or module can be realized by way of software, can also be with
It is realized by way of hardware.Described unit or module also can be set in the processor, for example, each unit can
To be the software program being arranged in computer or intelligent movable equipment, it is also possible to the hardware device being separately configured.Wherein, this
The title of a little units or module does not constitute the restriction to the unit or module itself under certain conditions.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.Those skilled in the art
Member is it should be appreciated that invention scope involved in the application, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic
Scheme, while should also cover in the case where not departing from the application design, appointed by above-mentioned technical characteristic or its equivalent feature
Other technical solutions of meaning combination and formation.Such as features described above and (but being not limited to) disclosed herein have similar functions
Technical characteristic replaced mutually and the technical solution that is formed.