A kind of method and relevant apparatus of consumption processing

文档序号:1772877 发布日期:2019-12-03 浏览:13次 中文

阅读说明:本技术 一种消费处理的方法以及相关装置 (A kind of method and relevant apparatus of consumption processing ) 是由 王星雅 于 2019-08-30 设计创作,主要内容包括:本申请实施例提供一种消费处理的方法以及相关装置,该方法通过区块链的智能合约规定账户的消费权限,从而用户在区块链转账消费时,需符合智能合约的消费权限,才能实现转账消费。用户根据本申请实施例,通过智能合约对资金用途进行规划安排,安全可靠,解决了通过备忘录进行规划安排的不可靠且备忘录容易丢失的问题。(The embodiment of the present application provides the method and relevant apparatus of a kind of consumption processing, this method provides the consumption rights of account by the intelligent contract of block chain, to which user is when block chain is transferred accounts and consumed, the consumption rights of intelligent contract need to be met, be just able to achieve consumption of transferring accounts.User carries out planning arrangement to use of funds according to the embodiment of the present application, by intelligent contract, securely and reliably, solves the problems, such as that the unreliable and memorandum that planning arrangement is carried out by memorandum is easily lost.)

1. a kind of method of consumption processing characterized by comprising

Account transfer request is obtained, the account transfer request includes account identification, and the account transfer request further includes consumption At least one of type, the corresponding spending amount of the consumption type and location information;

It is requested according to the account transfer, consumption rights, the consumption rights and the account identification is determined by intelligent contract With corresponding relationship;

If the account transfer request meets the consumption rights, the account transfer is synchronized by block chain and is requested.

2. method according to claim 1, which is characterized in that it is described to be requested according to the account transfer, pass through intelligent contract After determining consumption rights, the method also includes:

According to the corresponding spending amount of consumption type described in the account transfer request;

If the corresponding spending amount of the consumption type is less than or equal to the corresponding Spending Limit of the consumption type, it is determined that institute It states account transfer request and meets the consumption rights, wherein the corresponding Spending Limit of the consumption type is to pass through the intelligence What contract determined;

If the corresponding spending amount of the consumption type is greater than the corresponding Spending Limit of the consumption type, it is determined that the account Transfer request meets the consumption rights.

3. method according to claim 1, which is characterized in that it is described to be requested according to the account transfer, pass through intelligent contract After determining consumption rights, the method also includes:

According to consumption type described in the account transfer request;

If the consumption type meets the corresponding consumption type restrictive condition of the account identification, it is determined that the account transfer is asked It asks and meets the consumption rights, wherein the corresponding consumption type restrictive condition of the account identification is to pass through the intelligent contract Determining;

If the consumption type does not meet the corresponding consumption type restrictive condition of the account identification, it is determined that the account transfer Request does not meet the consumption rights.

4. method according to claim 1, which is characterized in that it is described to be requested according to the account transfer, pass through intelligent contract After determining consumption rights, the method also includes:

According to location information described in the account transfer request;

If the location information meets the corresponding location information restrictive condition of the account identification, it is determined that the account transfer is asked It asks and meets the consumption rights, wherein the corresponding location information restrictive condition of the account identification is to pass through the intelligent contract Determining;

If the location information does not meet the corresponding location information restrictive condition of the account identification, it is determined that the account transfer Request does not meet the consumption rights.

5. the method according to claim 1, wherein the method is also before acquisition account transfer request Include:

Credit request is obtained, the credit request includes the account identification, the consumption type and deposit amount;

According to the account identification, the consumption type and the deposit amount determine the intelligent contract;

The credit request and the intelligent contract are synchronized to block chain.

6. according to the method described in claim 5, it is characterized in that, described synchronize the credit request and described to block chain Intelligent contract includes:

The credit request is synchronized to block chain;

The intelligent contract is synchronized to block chain;

Wherein, described to synchronize the intelligent contract to block chain and include:

By intelligence contract described in private key encryption, the encrypted intelligent contract is obtained;

To the intelligent contract after block chain synchronous crypto-operation.

7. according to the method described in claim 2, it is characterized in that, it is described according to the account transfer request, pass through intelligent conjunction After about determining consumption rights, the method also includes:

If the spending amount is greater than the Spending Limit, prompting message is generated, the prompting message is for prompting mistake of transferring accounts It loses.

8. according to the method described in claim 2, it is characterized in that, described synchronize the account transfer by block chain and request it Afterwards, the method also includes:

The updated Spending Limit is determined according to the Spending Limit and the spending amount.

9. according to the method described in claim 2, it is characterized in that, the method also includes:

Reminder message is generated according to the Spending Limit in the intelligent contract, the reminder message is for showing the consumption Limit.

10. passing through intelligent conjunction the method according to claim 1, wherein described request according to the account transfer About determine that consumption rights include:

History consumer record, the history consumer record and institute are obtained according to the account identification in account transfer request Account identification is stated with incidence relation;

According to the account identification, the consumption type and the history consumer record in account transfer request, lead to It crosses the intelligent contract and determines the corresponding Spending Limit of the consumption type.

11. a kind of device of consumption processing characterized by comprising

Acquiring unit, for obtaining account transfer request, the account transfer request includes account identification, and the account transfer is asked Ask further includes at least one of consumption type, the corresponding spending amount of the consumption type and location information;

Processing unit determines consumption rights by intelligent contract for requesting according to the account transfer, the consumption rights with The account identification has corresponding relationship;

The processing unit passes through the synchronous institute of block chain if being also used to the account transfer request meets the consumption rights State account transfer request.

12. a kind of node device characterized by comprising memory, transceiver, processor and bus system;

Wherein, the memory is for storing program;

The processor is used to execute the program in the memory, includes the following steps:

Account transfer request is obtained, the account transfer request includes account identification, and the account transfer request further includes consumption At least one of type, the corresponding spending amount of the consumption type and location information;

It is requested according to the account transfer, consumption rights, the consumption rights and the account identification is determined by intelligent contract With corresponding relationship;

If the account transfer request meets the consumption rights, the account transfer is synchronized by block chain and is requested;It is described Bus system is for connecting the memory and the processor, so that the memory and the processor are led to Letter.

13. a kind of computer readable storage medium, which is characterized in that including instruction, when run on a computer, make to succeed in one's scheme Calculation machine executes the method as described in any one of claims 1 to 10.

Technical field

This application involves Internet technical field more particularly to a kind of methods and relevant apparatus of consumption processing.

Background technique

With the development of internet technology, e-payment (electronic payment) is applied in people's daily life Extensively.Consumer is certainly with can be convenient by way of e-payment according to associated bank card or Third-party payment account Oneself it is favorite service or article payment amount.

In current purchase and consumption, if user A likes the article that user B is sold, user A can be by by oneself account Fund in family is transferred accounts into the account of user B, and the article is commercially available from user B.If user A expectation management oneself account The usage of middle fund, then user A can record the surplus capital in account and the use of funds of plan by memorandum.

The inventor of the present application discovered that the prior art at least has the following disadvantages: that user is managed certainly by the way of memorandum Oneself use of funds is easy to forget to check memorandum in purchase and consumption, to forget the fund planning of setting.Meanwhile it using When entity memorandum, user is easily lost the memorandum.

As the above analysis, in the prior art, there are unreliable for managed fund purposes by the way of memorandum by user And the problem of being easily lost.

Summary of the invention

The embodiment of the present application provides the method and relevant apparatus of a kind of consumption processing, provides for limiting from process of exchange The consumption rights of gold, solve the problems, such as that memorandum mode is unreliable and memorandum is easily lost.

In view of this, the embodiment of the present application first aspect provides a kind of method of consumption processing, comprising:

Account transfer request is obtained, the account transfer request includes account identification, and the account transfer request further includes At least one of consumption type, the corresponding spending amount of the consumption type and location information;

It is requested according to the account transfer, consumption rights, the consumption rights and the account is determined by intelligent contract Mark has corresponding relationship;

If the account transfer request meets consumption rights, the account transfer is synchronized by block chain and is requested.

The embodiment of the present application second aspect provides a kind of device of consumption processing, comprising:

Acquiring unit, for obtaining account transfer request, the account transfer request includes account identification, and the account turns Account request further includes at least one of consumption type, the corresponding spending amount of the consumption type and location information;

Processing unit determines consumption rights, the Consumer right by intelligent contract for requesting according to the account transfer Limit has corresponding relationship with the account identification;

Processing unit synchronizes the account by block chain if being also used to the account transfer request meets consumption rights Family transfer request.

In a kind of possible design, in a kind of implementation of the embodiment of the present application second aspect, the processing is single Member is also used to:

According to the corresponding spending amount of consumption type described in the account transfer request;

If the corresponding spending amount of the consumption type is less than or equal to the corresponding Spending Limit of the consumption type, really The fixed account transfer request meets the consumption rights, wherein the corresponding Spending Limit of the consumption type is by described What intelligent contract determined;

If the corresponding spending amount of the consumption type is greater than the corresponding Spending Limit of the consumption type, it is determined that described Account transfer request does not meet the consumption rights.

In a kind of possible design, in a kind of implementation of the embodiment of the present application second aspect, the processing is single Member is also used to:

According to consumption type described in the account transfer request;

If the consumption type meets the corresponding consumption type restrictive condition of the account identification, it is determined that the account turns Account request meets the consumption rights, wherein the corresponding consumption type restrictive condition of the account identification is to pass through the intelligence What contract determined;

If the consumption type does not meet the corresponding consumption type restrictive condition of the account identification, it is determined that the account Transfer request does not meet the consumption rights.

In a kind of possible design, in a kind of implementation of the embodiment of the present application second aspect, the processing is single Member is also used to:

According to location information described in the account transfer request;

If the location information meets the corresponding location information restrictive condition of the account identification, it is determined that the account turns Account request meets the consumption rights, wherein the corresponding location information restrictive condition of the account identification is to pass through the intelligence What contract determined;

If the location information does not meet the corresponding location information restrictive condition of the account identification, it is determined that the account Transfer request does not meet the consumption rights.

It further include deposit in a kind of implementation of the embodiment of the present application second aspect in a kind of possible design Unit, the deposit unit are used for:

Credit request is obtained, the credit request includes the account identification, the consumption type and deposit amount;

According to the account identification, the consumption type and the deposit amount determine the intelligent contract;

The credit request and the intelligent contract are synchronized to block chain.

In a kind of possible design, in a kind of implementation of the embodiment of the present application second aspect, the certificate of deposits Member is also used to:

The credit request is synchronized to block chain;

The intelligent contract is synchronized to block chain;

Wherein, described to synchronize the intelligent contract to block chain and include:

By intelligence contract described in private key encryption, the encrypted intelligent contract is obtained;

To the intelligent contract after block chain synchronous crypto-operation.

In a kind of possible design, in a kind of implementation of the embodiment of the present application second aspect, the processing is single Member is also used to:

If the spending amount is greater than the Spending Limit, prompting message is generated, the prompting message turns for prompting Account failure.

In a kind of possible design, in a kind of implementation of the embodiment of the present application second aspect, the processing is single Member is also used to:

The updated Spending Limit is determined according to the Spending Limit and the spending amount.

In a kind of possible design, in a kind of implementation of the embodiment of the present application second aspect, the processing is single Member is also used to:

Reminder message is generated according to the Spending Limit in the intelligent contract, the reminder message is described for showing Spending Limit.

In a kind of possible design, in a kind of implementation of the embodiment of the present application second aspect, the processing is single Member is also used to:

History consumer record, the history consumer record are obtained according to the account identification in account transfer request There is incidence relation with the account identification;

According to the account identification, the consumption type and the history consumption note in account transfer request Record determines the corresponding Spending Limit of the consumption type by the intelligent contract.

The embodiment of the present application third aspect provides a kind of node device, which can be terminal device or service Device, comprising: memory, transceiver, processor and bus system;

Wherein, the memory is for storing program;

The processor is used to execute the program in the memory, includes the following steps:

Account transfer request is obtained, the account transfer request includes account identification, and the account transfer request further includes At least one of consumption type, the corresponding spending amount of the consumption type and location information;

It is requested according to the account transfer, consumption rights, the consumption rights and the account is determined by intelligent contract Mark has corresponding relationship;

If the account transfer request meets consumption rights, the account transfer is synchronized by block chain and is requested;It is described Bus system is for connecting the memory and the processor, so that the memory and the processor are led to Letter.

In a kind of possible design, in a kind of implementation of the embodiment of the present application third aspect, the processor Further include following steps for executing the program in the memory:

According to the corresponding spending amount of consumption type described in the account transfer request;

If the corresponding spending amount of the consumption type is less than or equal to the corresponding Spending Limit of the consumption type, really The fixed account transfer request meets the consumption rights, wherein the corresponding Spending Limit of the consumption type is by described What intelligent contract determined;

If the corresponding spending amount of the consumption type is greater than the corresponding Spending Limit of the consumption type, it is determined that described Account transfer request does not meet the consumption rights.

In a kind of possible design, in a kind of implementation of the embodiment of the present application third aspect, the processor Further include following steps for executing the program in the memory:

According to consumption type described in the account transfer request;

If the consumption type meets the corresponding consumption type restrictive condition of the account identification, it is determined that the account turns Account request meets the consumption rights, wherein the corresponding consumption type restrictive condition of the account identification is to pass through the intelligence What contract determined;

If the consumption type does not meet the corresponding consumption type restrictive condition of the account identification, it is determined that the account Transfer request does not meet the consumption rights.

In a kind of possible design, in a kind of implementation of the embodiment of the present application third aspect, the processor Further include following steps for executing the program in the memory:

According to location information described in the account transfer request;

If the location information meets the corresponding location information restrictive condition of the account identification, it is determined that the account turns Account request meets the consumption rights, wherein the corresponding location information restrictive condition of the account identification is to pass through the intelligence What contract determined;

If the location information does not meet the corresponding location information restrictive condition of the account identification, it is determined that the account Transfer request does not meet the consumption rights.

In a kind of possible design, in a kind of implementation of the embodiment of the present application third aspect, the processor Further include following steps for executing the program in the memory:

Credit request is obtained, the credit request includes the account identification, the consumption type and deposit amount;

According to the account identification, the consumption type and the deposit amount determine the intelligent contract;

The credit request and the intelligent contract are synchronized to block chain.

In a kind of possible design, in a kind of implementation of the embodiment of the present application third aspect, the processor Further include following steps for executing the program in the memory:

The credit request is synchronized to block chain;

The intelligent contract is synchronized to block chain;

Wherein, described to synchronize the intelligent contract to block chain and include:

By intelligence contract described in private key encryption, the encrypted intelligent contract is obtained;

To the intelligent contract after block chain synchronous crypto-operation.

In a kind of possible design, in a kind of implementation of the embodiment of the present application third aspect, the processor Further include following steps for executing the program in the memory:

If the spending amount is greater than the Spending Limit, prompting message is generated, the prompting message turns for prompting Account failure.

In a kind of possible design, in a kind of implementation of the embodiment of the present application third aspect, the processor Further include following steps for executing the program in the memory:

The updated Spending Limit is determined according to the Spending Limit and the spending amount.

In a kind of possible design, in a kind of implementation of the embodiment of the present application third aspect, the processor Further include following steps for executing the program in the memory:

Reminder message is generated according to the Spending Limit in the intelligent contract, the reminder message is described for showing Spending Limit.

In a kind of possible design, in a kind of implementation of the embodiment of the present application third aspect, the processor Further include following steps for executing the program in the memory:

History consumer record, the history consumer record are obtained according to the account identification in account transfer request There is incidence relation with the account identification;

According to the account identification, the consumption type and the history consumption note in account transfer request Record determines the corresponding Spending Limit of the consumption type by the intelligent contract.

The application fourth aspect provides a kind of computer readable storage medium, including instruction, when it runs on computers When, so that computer executes the method such as first aspect.

As can be seen from the above technical solutions, the embodiment of the present application has the advantage that

The embodiment of the present application provides the method and relevant apparatus of a kind of consumption processing, and this method passes through the intelligence of block chain Contract provides the consumption rights of account, so that user need to meet the consumption rights of intelligent contract when block chain is transferred accounts and consumed, It is able to achieve consumption of transferring accounts.User carries out planning arrangement to use of funds according to the embodiment of the present application, by intelligent contract, safely may be used It leans on, solves the problems, such as that the unreliable and memorandum for carrying out planning arrangement by memorandum is easily lost.

Detailed description of the invention

Fig. 1 is the system architecture diagram of the embodiment of the present application;

Fig. 2 is a kind of flow chart of the method for consumption processing provided by the embodiments of the present application;

Fig. 3 is the schematic diagram of account transfer request in the embodiment of the present application;

Fig. 4 is the surface chart that the embodiment of the present application user is transferred accounts by scanning the two dimensional code of businessman to businessman;

Fig. 5 is the boundary that the embodiment of the present application businessman scans user client when the bar code in the client of user is transferred accounts Face figure;

Fig. 6 is the interface schematic diagram that user is directly paid to Merchant Account in the embodiment of the present application;

Fig. 7 is the schematic diagram of intelligent contract in the embodiment of the present application;

Fig. 8 is a network topological diagram of distributed block chain account book in the embodiment of the present application;

Fig. 9 is the schematic diagram of user, businessman and block chain in the embodiment of the present application;

Figure 10 is the schematic diagram of the embodiment of the present application block chain account book;

Figure 11 is the consumer record schematic diagram of account identification 1 in the embodiment of the present application;

Figure 12 is the interface schematic diagram of user's deposit in the embodiment of the present application;

Figure 13 be the embodiment of the present application in schematic diagram from parent to children's fund account;

Figure 14 is that terminal device prompt is transferred accounts the schematic diagram of failure in the embodiment of the present application;

Figure 15 is the updated intelligent contract schematic diagram of the embodiment of the present application;

Figure 16 is the surface chart that terminal device shows consumption plan in the embodiment of the present application;

Figure 17 is a kind of flow chart of the method for consumption processing provided by the embodiments of the present application;

Figure 18 is the schematic diagram of terminal device payment interface in the embodiment of the present application;

Figure 19 is the application examples schematic diagram of a kind of method of consumption processing;

Figure 20 is a kind of schematic diagram of the device of consumption processing provided by the embodiments of the present application;

Figure 21 is a kind of another schematic diagram of the device of consumption processing provided by the embodiments of the present application;

Figure 22 is the block diagram of the part-structure of mobile phone relevant to terminal provided by the embodiments of the present application

Figure 23 is a kind of server architecture schematic diagram provided by the embodiments of the present application.

Specific embodiment

The embodiment of the present application provides the method and relevant apparatus of a kind of consumption processing, provides for limiting from process of exchange The consumption rights of gold, solve the problems, such as that memorandum mode is unreliable and memorandum is easily lost.

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 as to embodiments herein described herein can in addition to Here the sequence other than those of diagram or description is implemented.In addition, term " includes " and " corresponding to " and their any change Shape, it is intended that cover it is non-exclusive include, for example, containing the process, method of a series of steps or units, system, product Or equipment those of is not necessarily limited to be clearly listed step or unit, but may include be not clearly listed or for these The intrinsic other step or units of process, method, product or equipment.

It should be understood that e-payment is widely used in people's daily life, people's lives are substantially improved.People pass through Terminal device such as mobile phone or computer, can be completed transfer of payment process.However, the easy punching of consumer that some self-controls are poor Dynamic consumption, for example, certain consumer plan monthly uses 900 yuan as board expenses, however in face of the temptation of cuisines, the consumer is last It has used 2000 yuan to have a meal and has bought snacks, completely outstripped the plan of the consumer, the consumer is allowed to suffer untold misery.This Outside, many parents open up e-payment account exclusively for its children, facilitate its children to live, such as go to dining room to get food, buy text E-payment can be used by having, taking public transport etc., these children can suffer from incessantly luring, the meal that will be used to have a meal originally Money is used to buy toy.Therefore, it is necessary to the use of funds to its e-payment account to be managed by consumer.

Current consumer is generally by writing on the fund planning of oneself on memorandum, then before carrying out e-payment The fund planning in the memorandum of oneself is checked, so that it is determined that whether oneself should carry out the e-payment.However, many consumption Person, which often forgets about, checks memorandum, leads to the fund planning for having forgotten oneself and mistakenly pays money.In addition, consumer is also May lost mobile phone, it is this kind of so that the electronic memorandum or consumer that are lost in mobile phone use papery memorandum Memorandum is more easier to lose.

To solve the above-mentioned problems, the embodiment of the present application provides the method and relevant apparatus of a kind of consumption processing, energy Enough to limit from the process of e-payment e-payment, when meeting the rule of setting, consumer is just able to achieve electronics branch Pay consumption.

Fig. 1 is the system architecture diagram of the embodiment of the present application.As it can be seen that user carries out friendship of transferring accounts by terminal device and businessman Easily, terminal equipment type used in user is identical as terminal equipment type used in businessman, these terminal devices may include but It is not limited to mobile phone, desktop computer, tablet computer, laptop and palm PC.These terminal devices pass through on network Server is connected with each other, to complete the electronic transaction between user and businessman.User can transfer accounts with businessman, to purchase from businessman Required article or service are bought, for example, user 1 transfers accounts with businessman 1, user 1 transfers accounts with businessman 2.It can also be carried out between user It transfers accounts, for example, user 1 transfers accounts with user 2, user 1 transfers accounts with user 3.

It is understood that being generally fitted with the client for e-payment, these clients on terminal device in Fig. 1 End can be computer software, cell phone software, small routine etc., and computer software can be computer plug-in unit, browser, stock exchange software Deng cell phone software can be shopping application program (Application, APP), bank APP, Third-party payment software APP etc., small Program can be built-in the function program in cell phone software.In practical applications, it can also be that other can be realized electronics branch The client paid, specifically herein without limitation.

Based on framework as shown in Figure 1, the embodiment of the present application provides a kind of method of consumption processing, as shown in Fig. 2, Fig. 2 For a kind of flow chart of the method for consumption processing provided by the embodiments of the present application, this method is suitable for carrying out to be faced in user and businessman The scene of face transaction, this method comprises:

201, account transfer request is obtained, account transfer request includes account identification, and account transfer request further includes consumption At least one of the corresponding spending amount of type, consumption type and location information;

In the embodiment of the present application, account identification can be account identity number (identity document, ID), it is also possible to the pet name of account, in practical applications, can also be other situations, be specifically not specifically limited herein.Account Family mark is specifically account identification of the user for consumption of transferring accounts.Consumption type can be board expenses, traffic consumption, shop consumption Deng, can be set by the user or the manager of system of account setting or other users setting.Location information can be based on movement Location-based service (location based service, LBS) information, is the radio communication network by telecommunications mobile operator (such as global system for mobile communications net, code division multiple address communication system net) or external positioning method (such as global positioning system) obtain and move The location information (geographical coordinate or geodetic coordinates) of dynamic terminal user.

In some embodiments, client or server are obtained requests including account identification, the account transfer of consumption type, It is as described herein below:

Fig. 3 is the schematic diagram of account transfer request in the embodiment of the present application, it is seen then that account transfer request includes account mark Know, consumption type and spending amount corresponding with consumption type, the spending amount have with the account identification in this time consumption Incidence relation, and there is incidence relation with the consumption type of the secondary consumption.For example, account A this time transfer accounts consumption in consumption Type is board expenses, and spending amount is 10 yuan.

In the embodiment of the present application, user reaches in the shop of businessman, takes a fancy to certain commodity and determines to buy, user can lead to The mode for crossing e-payment is transferred accounts to businessman, to buy the commodity.Either, user comes in the restaurant of businessman, dining It consumes and transfers accounts to businessman.User can be transferred accounts by scanning the two dimensional code of businessman to businessman when transferring accounts to businessman, can also be with It is that the bar code that businessman is scanned in the client of user is transferred accounts, can also be that user directly pays to Merchant Account, with Under these three scenes will be described in detail:

Fig. 4 is the surface chart that the embodiment of the present application user is transferred accounts by scanning the two dimensional code of businessman to businessman.User passes through After the two dimensional code of client scan businessman, client can obtain merchant identification, businessman's pet name, consumption type etc. from two dimensional code Information, then client shows businessman's pet name on the interface of client, for example, display is " to quotient on the interface of client Family (XXX) transfers accounts ", also, consumption type is automatically filled in corresponding input area by client.User can check that consumption type is No correct, if incorrect, user can click the input area and then be modified by dummy keyboard.Then, user goes back It can insert transfer amounts, the information such as payment cipher, meanwhile, client can also carry out the account identification that user transfers accounts It has been shown that, for example, showing " account of payment: xxx " on the interface of client.After user's confirmation message is errorless, click " really It is fixed " virtual push button, so that client gets account transfer request, it may include what user transferred accounts in account transfer request Account identification, the consumption type being shown on client end interface, spending amount generally further include merchant identification, payment cipher etc..

In a kind of possible embodiment, client does not obtain consumption type from two dimensional code, but according to merchant identification, The corresponding consumption type of merchant identification is got by the merchant identification that stores in server and the incidence relation of consumption type, so Consumption type is automatically filled in corresponding region afterwards.User can check whether consumption type is correct, if incorrect, user can be with It clicks the input area and then is modified by dummy keyboard.

Table 1 shows the incidence relation of merchant identification and consumption type.As it can be seen that client can be inquired by merchant identification To corresponding consumption type.Consumption type can include but is not limited to board expenses, shop consumption etc., can also be traffic consumption, Assets dealing etc., specifically herein without limitation.Consumption type can be by user's sets itself, can also be by the pipe of system of account Then reason person's setting is uploaded to server and selects for user.

Table 1

In a kind of possible embodiment, client does not obtain consumption type from two dimensional code, does not also obtain from server Consumption type is obtained, but as shown in figure 4, user oneself is allowed to insert consumption type.User clicks the corresponding input area of consumption type When domain, consumption type can be inputted by dummy keyboard.

In the embodiment of the present application, input area can be underscore upper area as shown in Figure 4, be also possible to pass through Block diagram surrounds input area, can also be other modes, specifically herein without limitation.

Fig. 5 is the boundary that the embodiment of the present application businessman scans user client when the bar code in the client of user is transferred accounts Face figure.As it can be seen that showing the account of bar code or two dimensional code and payment: xxx in user client.User can pass through click " account of payment: xxx ", thus other account selection interfaces of client pop-up user, for selection by the user.Businessman passes through Behind terminal device scans interface as shown in Figure 3, can be got from the client of user payment account identification and Other information.Then the terminal device of businessman generates account transfer request, may include that user turns in account transfer request Account identification, consumption type, spending amount of account etc. and merchant identification.It is understood that the terminal device of businessman generates Account transfer can be requested to be sent in the client of user after account transfer request to show its content.

In a kind of possible embodiment, account identification that the terminal device of businessman only transfers accounts user, consumption gold Volume and merchant identification etc. are uploaded to server, and then server is marked according to merchant identification by the businessman stored in server Know and get the corresponding consumption type of merchant identification with the incidence relation of consumption type, last server generation account transfer is asked It asks, including in account transfer request may include account identification, consumption type, spending amount etc. that user transfers accounts, and Merchant identification.It is understood that server can request account transfer to be sent to user's after generating account transfer request Its content is shown in client.

In a kind of possible embodiment, account identification that the terminal device of businessman transfers accounts user, consumption type, Spending amount and merchant identification etc. are sent to the client of user by server, wait user to input payment cipher and confirm Afterwards, the client of user gets account transfer request.It may include the account mark that user transfers accounts in account transfer request Knowledge, consumption type, spending amount, payment cipher etc. and merchant identification.

Fig. 6 is the interface schematic diagram that user is directly paid to Merchant Account in the embodiment of the present application.Businessman only provides The account identification of businessman oneself is to user, and businessman does not have two dimensional code, the terminal device also not scanned, then user needs to visitor Family end voluntarily inputs account and consumption type, spending amount, payment cipher of businessman etc..User clicks " determination " and virtually presses After button, client get account transfer request, account transfer request may include user transfer accounts account identification, disappear Take type, spending amount, payment cipher etc. and Merchant Account mark.

In practical applications, client can also get account transfer request by other means, specifically herein no longer It repeats.

In further embodiments, client or server are available to including account identification, the account of consumption type Transfer request, similar with previous embodiment, details are not described herein again.

In further embodiments, client or server are available to including account identification, the account of location information Transfer request, wherein the acquisition modes and previous embodiment type of account identification, details are not described herein again.

In the embodiment of the present application, client or server can be according to radio communication network (such as global mobile communications System network, CDMA digital cellular system network) or external positioning method (such as global positioning system) get location information, In, global system for mobile communications (global system for mobile communications, GSM) can be described as the second generation (2G) mobile telephone system, CDMA (code division multiple access, CDMA) communication system net are a kind of Mobile telephone system, global positioning system (global positioning system, GPS) are to provide one kind of positioning service System.In practical applications, client or server can also get the location information of client by other means, herein It is not specifically limited.

202, it is requested according to account transfer, determines that consumption rights, consumption rights have with account identification by intelligent contract Corresponding relationship;

In the embodiment of the present application, consumption rights include but is not limited to the corresponding Spending Limit of consumption type, account identification At least one of corresponding consumption type restrictive condition and the corresponding location information restrictive condition of account identification;

In some embodiments, client or server determine the corresponding Spending Limit of consumption type by intelligent contract, It is described below:

In the embodiment of the present application, intelligent contract is that user sets in block chain in advance, as shown in fig. 7, intelligence is closed Account identification, consumption type and Spending Limit are generally comprised in about.Fig. 7 is the signal of intelligent contract in the embodiment of the present application Figure, it is seen then that intelligent contract may include multiple consumption types, such as consumption type 1 and consumption type 2, they correspond to different Spending Limit.Such as can be the Spending Limit of the board expenses in account A is 100, the Spending Limit of the traffic consumption in account A It is 200.

After terminal device gets account transfer request, it can be requested to find correspondence from intelligent contract according to account transfer Spending Limit then can be with for example, the account identification in account transfer request is account A and consumption type is traffic consumption It is 200 according to the Spending Limit that account identification and consumption type are consumed from the traffic found in account A in intelligent contract.

In further embodiments, client or server determine the corresponding consumption type of account identification by intelligent contract Restrictive condition, described below:

In the embodiment of the present application, intelligent contract is that user sets in block chain in advance, be can wrap in intelligent contract Include the corresponding consumption type restrictive condition of account identification.In some embodiments, parent can set its son in intelligent contract The corresponding consumption type restrictive condition of woman's account is that the consumption type allowed includes board expenses, study article or snacks.Then when When children are consumed using its account, the account corresponding consumption type restrictive condition can be determined by intelligent contract, and It is compared with the consumption type of current consumption, if current consumption type meets consumption type restrictive condition, can complete to consume.Example Such as, account current consumption type is board expenses, client or server judge board expenses belong to consumption type restrictive condition (including One of board expenses, study article or snacks), then it can complete the consumption.In another example account current consumption type is live streaming Beat reward, client or server judge that board expenses are not belonging to consumption type restrictive condition (including board expenses, study article or zero One of food), then the consumption is not completed.In further embodiments, parent can set its children's in intelligent contract The corresponding consumption type restrictive condition of account is that the consumption type forbidden includes viewing sex film, is broadcast live and beats reward etc..Then group When female is consumed using its account, if account current consumption type is board expenses, it is not belonging to forbidding for consumption type restrictive condition Consumption type can then complete the consumption, if account current consumption type is that reward is beaten in live streaming, belong to consumption type restrictive condition The consumption type forbidden does not complete the consumption then.In further embodiments, consumption type restrictive condition had both included disappearing for permission Take type, also includes the consumption type forbidden, process of consumption is similar with previous embodiment, and details are not described herein again.

In further embodiments, client or server determine the corresponding location information of account identification by intelligent contract Restrictive condition, described below:

In the embodiment of the present application, intelligent contract is that user sets in block chain in advance, be can wrap in intelligent contract Include the corresponding location information restrictive condition of account identification.In some embodiments, user setting position information restrictive condition includes The location information of permission, illustratively, the location information of permission can include but is not limited to department stores, restaurant etc..Work as user When being consumed, the current location information of user and the location information of permission can be compared, if current location information belongs to The location information of permission can then be consumed, for example, current location information is restaurant, and wrap in the location information allowed Restaurant is included, then can be consumed.In further embodiments, user setting position information restrictive condition includes the position forbidden Information, illustratively, the location information forbidden can include but is not limited to gambling house region, erotic place region etc..When user into When row consumption, the current location information of user and the location information forbidden can be compared, if current location information belongs to taboo Location information only cannot then be consumed, for example, current location information is gambling house region, and the location information forbidden In include gambling house region, then cannot be consumed.In further embodiments, user setting position information restrictive condition both wrapped The location information for including permission also includes the location information forbidden, and process of consumption is similar with previous embodiment, and details are not described herein again. If 203, account transfer request meets consumption rights, pass through the synchronous account transfer request of block chain.

In the embodiment of the present application, account transfer request, which meets consumption rights, can include but is not limited to consumption type correspondence Spending amount be less than or equal to the corresponding Spending Limit of consumption type, consumption type meets the corresponding consumption type of account identification Restrictive condition, location information meet the corresponding location information restrictive condition of account identification.It in practical applications, can also include it His Rule of judgment, is not specifically limited herein.

In some embodiments, after terminal device determines Spending Limit, account transfer can be requested in spending amount It is compared with Spending Limit, if spending amount is less than or equal to Spending Limit, by block chain, the synchronization account transfer is asked It asks.

Block chain (blockchain) is that Distributed Storage, point-to-point transmission, common recognition mechanism, Encryption Algorithm etc. calculate The new application mode of machine technology.With the development of block chain technology, block chain technology has obtained answering extensively in every field With for example, being led in financial field, information security, computing resource sharing, amusement game, social activity, supply chain management or medical treatment etc. Domain.

In block chain, each tissue safeguards a block chain account book jointly, for the ease of introducing, referring to Fig. 8, Fig. 8 is A network topological diagram of distributed block chain account book in the embodiment of the present application, as shown in figure 8, distributed account book (distributed ledger) is a kind of shared between network members, duplication and synchronous database.Distributed account book note The transaction between network participants, such as the exchange of assets or data are recorded, this shared account book is reduced because reconciling different account books Generated time and spending cost.In this application related network members include but be not limited only to the producer, consumer, Supplier, affiliate, market manipulation person, pusher and sundry item shareholder, the assets of transaction can be tangible physical asset (such as automobile, house or strawberry) is also possible to invisible fictitious assets (such as contract, patent and security).Assets own Power and transfer can create value in business network, this process, which is referred to as, trades (transaction).

Distributed account book is the database independently held and updated by each participant in catenet.Distribution is only one Without two, record is not communicated to each node device by central office, is independently constructed and is saved by each node device. That is, each node device on network handles each transaction, the conclusion of oneself is obtained, then to these conclusions It votes, all agrees to these conclusions with the most of node devices of determination.Once reaching common understanding, distributed block chain account book is It updates, and all node devices all safeguard the identical copies of oneself account book.It is i.e. as shown in Figure 2, node device 1 and other sections The sheet of point device (such as node device 2, node device 3, node device 4, node device 5 and node device 6) shared node equipment 1 Ground account book, node device 2 and other node device (such as node device 1, node device 3, node device 4, node device 5 and sections Point device 6) shared node equipment 2 local account book, node device 3 other node devices (such as node device 1, node device 2, Node device 4, node device 5 and node device 6) shared node equipment 3 local account book, node device 4 sets with other nodes The local account of standby (such as node device 1, node device 2, node device 3, node device 5 and node device 6) shared node equipment 4 This, (such as node device 1, node device 2, node device 3, node device 4 and node are set node device 5 with other node devices The local account book of standby 6) shared node equipment 5, node device 6 and other node device (such as node device 1, node device 2, sections Point device 3, node device 4 and node device 5) shared node equipment 6 local account book.So far, node device 1, node device 2, node device 3, node device 4, node device 5 and node device 6 safeguard the same block chain account book, the block chain account book Data including all node devices record.

Based on distributed block chain account book as shown in Figure 8, the embodiment of the present application user and businessman can pass through such as Fig. 8 institute The distributed block chain account book shown is traded, and user and businessman have the account of oneself, and user and businessman can be by oneself Account and account in the amount of money write on block chain account book.

Fig. 9 is the schematic diagram of user, businessman and block chain in the embodiment of the present application.As it can be seen that user 1, user 2, businessman 1, Businessman 2, businessman 3, businessman 4 have connected block chain, they can request account transfer synchronous to block chain.For example, user 1 It transfers accounts with businessman 1, the content of account transfer request is that user 1 transfers accounts 10 yuan of board expenses to businessman 1, then user 1 and businessman 1 Account transfer request is uploaded to block chain by client, after block chain is reached common understanding by common recognition mechanism, will be turned the account On account request write-in block chain account book, i.e., user 1 is write on block chain account book to the 10 yuan of board expenses of transferring accounts of businessman 1, then it can be with The account for obtaining user 1 reduces 10 yuan, and 10 yuan of result is increased in the account of businessman 1.

After terminal device is by the synchronous account transfer request of block chain, account transfer request is increased on block chain account book Corresponding account transfer record, as shown in Figure 10.Figure 10 is the schematic diagram of the embodiment of the present application block chain account book, block chain account book In include the corresponding record of several account identifications, Figure 10 illustrates only a portion parameter, from fig. 10 it can be seen that user It is deposited to account identification 1, deposit amount 100, corresponding consumption type is board expenses, indicates that this 100 yuan deposits are used for Board expenses, account identification 1 have been transferred accounts 100 yuan to merchant identification 1 in the consumption type of board expenses, and account identification 1 is marked to businessman Know 2 to have transferred accounts in the consumption type of traffic trip 5 yuan, then terminal device can read similar aforementioned from block chain account book Block chain account book record, the consumer record that account identification 1 transfers accounts outward is then counted on according to these block chain account books record. Figure 11 is the consumer record schematic diagram of account identification 1 in the embodiment of the present application, it is seen then that terminal device is obtained according to block chain account book 100 yuan are consumed in the consumption type of board expenses to account identification 1, account identification 1 disappears in the consumption type of traffic trip 5 yuan are taken, similarly, terminal device can also count on other situations of account according to block chain account book, specifically no longer superfluous herein It states.Optionally, the embodiment of the present application Fig. 2 it is corresponding it is a kind of consumption processing method an alternative embodiment in, obtain account Before the transfer request of family, method further include: obtain credit request, credit request includes account identification, consumption type and deposit The amount of money;According to account identification, consumption type and deposit amount determine intelligence contract;To the synchronous credit request of block chain and Intelligent contract.

In the embodiment of the present application, terminal device is deposited into account first, then is consumed.The mode of deposit can be User inputs credit request, and as shown in figure 12, Figure 12 is the interface schematic diagram of user's deposit in the embodiment of the present application, and user is at end Account identification, deposit amount are filled on the interface of end equipment, can also fill in consumption type, for limiting the use of the deposit amount On the way, for example, the consumption type filled in is board expenses, deposit amount is 100 yuan, then can limit 100 deposited in this time deposit Member is specified for board expenses.Then, user selectes the bank card and input bank password of payment, clicks " determination " and virtually presses Button produces credit request.After terminal device gets credit request, it can be consumed according to the account identification in credit request Type and deposit amount determine intelligent contract, wherein deposit amount and Spending Limit have incidence relation, for example, deposit is asked The deposit amount for seeking middle account identification 1 is 100 yuan, and specified consumption type is board expenses, then adds account mark in intelligent contract The Spending Limit for knowing 1 board expenses increases by 100 yuan.

In a kind of possible embodiment, user can not have to bank card deposit, and with Third-party payment software into Row deposit, way of deposit is similar, and specific details are not described herein again.

In a kind of possible embodiment, user can be with A account toward B fund account, for example, the account of parent's their own Family is deposited to the account of children, to limit the consumption type and Spending Limit of children's account.Figure 13 is the embodiment of the present application Schematic diagram of the middle parent to children's fund account, it is seen then that parent first inserts the account identification of children in account identification, then fills out Enter consumption type and deposit amount, finally selectes the account of oneself for paying, and input payment cipher, it is virtual to click " determination " Button, then terminal device is available arrives corresponding credit request.It, can be according to deposit after terminal device gets credit request Account identification in request, consumption type and deposit amount determine intelligent contract.

After terminal device obtains credit request and intelligent contract, to the synchronous credit request of block chain and intelligent contract, together Step mode is similar with account transfer synchronous in the application other embodiments request, and details are not described herein again.

Optionally, the embodiment of the present application Fig. 2 it is corresponding it is a kind of consumption processing method an alternative embodiment in, to The synchronous credit request of block chain and intelligent contract include: credit request synchronous to block chain;To block chain synchronous intelligent contract; It wherein, include: that encrypted intelligent contract is obtained by private key encryption intelligence contract to block chain synchronous intelligent contract;To area Intelligent contract after block chain synchronous crypto-operation.

In the embodiment of the present application, terminal device first encrypts intelligent contract with private key, then by encrypted intelligent contract It is synchronous to block chain.It is understood that safer by encrypted intelligent contract, it is not easy to be stolen.When terminal is set It is standby when needing using intelligent contract in block chain, it can be decrypted by private key or public key, specifically herein without limitation.

Optionally, the embodiment of the present application Fig. 2 it is corresponding it is a kind of consumption processing method an alternative embodiment in, root According to account transfer request in account identification and consumption type, after determining Spending Limit by intelligent contract, method is also wrapped It includes:

If spending amount is greater than Spending Limit, prompting message is generated, prompting message is transferred accounts unsuccessfully for prompting.

In the embodiment of the present application, it when customer consumption, if exceeding limit, cannot transfer accounts, and terminal device can prompt It transfers accounts unsuccessfully.Figure 14 is that terminal device prompt is transferred accounts the schematic diagram of failure in the embodiment of the present application.As it can be seen that user is to terminal device It inputs account transfer information and corresponding Spending Limit is determined by intelligent contract after terminal device obtains account transfer request, when When terminal device detects that spending amount is greater than the Spending Limit, then prompting message is generated, so that terminal device is shown on interface Show " transferring accounts unsuccessfully ", 200 yuan of the amount of money for example, user prepares to transfer accounts to dining room, corresponding consumption type is board expenses, and intelligence In contract, Spending Limit of the account under board expenses only has 100 yuan, then spending amount is greater than Spending Limit, so that terminal is set Standby be unable to complete is transferred accounts, and prompts to transfer accounts unsuccessfully.User can click the closing of " determination " virtual push button on terminal device interface should Prompting message.

Optionally, the embodiment of the present application Fig. 2 it is corresponding it is a kind of consumption processing method an alternative embodiment in, to After the synchronous account transfer request of block chain, method further include:

Updated Spending Limit is determined according to Spending Limit and spending amount.

In the embodiment of the present application, user transfer accounts after consumption, and the terminal device consumption that can be transferred accounts according to this updates Spending Limit in intelligent contract.It specifically can be, Spending Limit subtracted into spending amount and obtains updated Spending Limit.Such as Shown in Fig. 7 and Figure 15, Figure 15 is the updated intelligent contract schematic diagram of the embodiment of the present application, it is seen then that script account is consumer The Spending Limit of type 1 is X.After user has consumed Y member in consumption type 1, terminal device is according to Spending Limit and consumption gold Volume determines that the Spending Limit of updated consumption type 1 is X-Y.When user constantly consumes in the consumption type, consumption limit Volume is constantly reduced, until Spending Limit is finished or user deposits again.For example, user is that oneself account is deposited every other month Money is used for board expenses, then when user has a meal daily, Spending Limit in intelligent contract is had a meal the amount of money of consumption according to user daily It reduces.

Similarly, when user is oneself deposit, if there are also Spending Limit in corresponding consumption type, terminal device disappears at this Defined amount of money when taking on the basis of limit plus deposit.For example, script account is X in the Spending Limit of consumption type 1.User Y member is deposited into account, and specifying the corresponding consumption type of the amount of money is consumption type 1, then terminal device is limited according to consumption Volume and spending amount determine that the Spending Limit of updated consumption type 1 is X+Y.

Optionally, the embodiment of the present application Fig. 2 it is corresponding it is a kind of consumption processing method an alternative embodiment in, side Method further include:

Reminder message is generated according to the Spending Limit in intelligent contract, reminder message is for showing Spending Limit.

It in the embodiment of the present application, can be with if user needs to check the Spending Limit for oneself being designed for certain consumption type Terminal device is allowed to show consumption type and Spending Limit.Figure 16 is that terminal device shows consumption plan in the embodiment of the present application Surface chart.As it can be seen that terminal device can show the account identification and consumption type of user, and show that consumption type is corresponding Spending Limit, user can be visually seen the consumption plan of oneself, for example, user's plan monthly uses 1000 yuan of board expenses, then It can be checked by the interface of such as Figure 16.

Optionally, the embodiment of the present application Fig. 2 it is corresponding it is a kind of consumption processing method an alternative embodiment in, root According to account transfer request in account identification and consumption type, determine that Spending Limit includes: by intelligent contract

According to account transfer request in account identification obtain history consumer record, history consumer record and account identification have It is relevant;

According to account transfer request in account identification, consumption type and history consumer record, it is true by intelligent contract Determine Spending Limit.

In the embodiment of the present application, terminal device can obtain and account mark first during determining intelligent contract Know corresponding history consumer record, then can be requested according to account transfer in account identification, consumption type and terminal device The history consumer record of acquisition determines Spending Limit by intelligent contract.For example, all history consumer records in account identification 1 It is deposited for user to account identification 1, deposit amount 100, corresponding consumption type is board expenses, indicates that this 100 yuan are deposited Money is used for board expenses, and account identification 1 transferred accounts 20 yuan to merchant identification 1 in the consumption type of board expenses, and account identification 1 is to quotient Family's mark 2 has been transferred accounts 30 yuan in the consumption type of board expenses, then terminal device can be determined according to these history consumer records Account mark 1 has deposited 100 yuan first, has then consumed 20 yuan, and consumed 30 in this consumption type of board expenses Member can then determine that account identification 1 there remains 100-20-30=50 in the Spending Limit in this consumption type of board expenses Member.

Based on framework as shown in Figure 1, the embodiment of the present application also provides a kind of method of consumption processing, as shown in figure 17, Figure 17 is a kind of flow chart of the method for consumption processing provided by the embodiments of the present application, and this method is suitable for carrying out to be purchased on user network The scene of object, this method comprises:

1701, account transfer request is obtained, account transfer request includes account identification, consumption type and and consumption type Corresponding spending amount;

It in the embodiment of the present application,, can be into if preparing the commodity in purchase shopping cart when user carries out shopping online Enter corresponding payment interface, as shown in figure 18, Figure 18 is the schematic diagram of terminal device payment interface in the embodiment of the present application.It can See, shown on terminal device commodity 1 consumption type and corresponding spending amount, the spending amount i.e. price of the commodity 1/ How much price after discounting buy the commodity 1 in this time consumption for indicating, if there are also other commodity, examples in shopping cart with Such as commodity 2, commodity 3, shown in payment interface one by one.After user selects payment account and input payment cipher, " determination " virtual push button can be clicked, so that terminal device gets account transfer request.In a kind of possible embodiment, use Commodity can not be put into shopping cart by family, but directly be bought, and into payment interface, then only display of commodity 1 disappears payment interface Take type and spending amount.

In a kind of possible embodiment, user does not need the consumption type for being manually entered commodity, but terminal device is certainly It is dynamic that the corresponding consumption type of the commodity is found according to the commodity sign of commodity, specifically according to the consumption type of commodity and commodity mark The incidence relation of knowledge finds the corresponding consumption type of the commodity, and table 2 is commodity sign and consumption type in the embodiment of the present application Incidence relation table, as shown in table 2, the corresponding consumption type of cake are board expenses, and the corresponding consumption type of toothbrush is common for day Product consumption, in practical applications, can also set several incidence relations, these incidence relations can be preset, and be stored In the server of terminal device or electric business platform.

Table 2

Commodity sign Consumption type
Cake Board expenses
Toothbrush Articles for daily use consumption

In the embodiment of the present application, the terminal device for carrying out shopping online can be mobile phone or computer, in practical applications, It can also be the equipment such as plate, specifically herein without limitation.

1702, according to account transfer request in account identification and consumption type, pass through intelligent contract determine consumption limit Volume, Spending Limit and account identification have incidence relation, and Spending Limit and consumption type have incidence relation;

In the embodiment of the present application, step 202 is similar in step 1702 each embodiment corresponding with earlier figures 2, herein It repeats no more.

If 1703, spending amount is less than or equal to Spending Limit, pass through the synchronous account transfer request of block chain.

In the embodiment of the present application, account transfer request includes transferring accounts for multiple commodity, wherein the consumption of multiple commodity Type may be identical, for example, the consumption type of commodity 1 is identical with the consumption type of commodity 2, then terminal device disappearing commodity 1 Take the amount of money and is added spending amount as the consumption type with the spending amount of commodity 2.For example, user has purchased cake and snow Cake, the two commodity belong to this consumption type of board expenses, then terminal device can be corresponding by consumption type according to commodity The spending amount that spending amount is determined as cake adds the spending amount of ice cream.Then, terminal device is by the consumption type after statistics Corresponding spending amount is compared with Spending Limit, if spending amount is less than or equal to Spending Limit, terminal device passes through block The synchronous account transfer request of chain.

Details each embodiment corresponding with earlier figures 2 that terminal device passes through the synchronous account transfer request of block chain Middle step 203 is similar, and details are not described herein again.

Optionally, the embodiment of the present application Figure 17 it is corresponding it is a kind of consumption processing method an alternative embodiment in, Before obtaining account transfer request, method further include: obtain credit request, credit request includes account identification, consumption type with And deposit amount;According to account identification, consumption type and deposit amount determine intelligence contract;It is asked to the synchronous deposit of block chain It asks and intelligent contract.

Optionally, the embodiment of the present application Figure 17 it is corresponding it is a kind of consumption processing method an alternative embodiment in, It include: credit request synchronous to block chain to the synchronous credit request of block chain and intelligent contract;It is closed to block chain synchronous intelligent About;It wherein, include: that encrypted intelligent contract is obtained by private key encryption intelligence contract to block chain synchronous intelligent contract;To Intelligent contract after block chain synchronous crypto-operation.

In the embodiment of the present application, it is corresponding with earlier figures 2 each to carry out the step of deposit and private key encryption for terminal device A embodiment is similar, and details are not described herein again.

Optionally, the embodiment of the present application Figure 17 it is corresponding it is a kind of consumption processing method an alternative embodiment in, According to account transfer request in account identification and consumption type, after determining Spending Limit by intelligent contract, method is also Include:

If spending amount is greater than Spending Limit, prompting message is generated, prompting message is transferred accounts unsuccessfully for prompting.

In the embodiment of the present application, terminal device prompt transfer accounts failure the case where corresponding with earlier figures 2 each embodiment Similar, details are not described herein again.

Optionally, the embodiment of the present application Figure 17 it is corresponding it is a kind of consumption processing method an alternative embodiment in, To after the synchronous account transfer request of block chain, method further include:

Updated Spending Limit is determined according to Spending Limit and spending amount.

In the embodiment of the present application, terminal device updates the case where Spending Limit each embodiment corresponding with earlier figures 2 Similar, details are not described herein again.

Optionally, the embodiment of the present application Figure 17 it is corresponding it is a kind of consumption processing method an alternative embodiment in, Method further include:

Reminder message is generated according to the Spending Limit in intelligent contract, reminder message is for showing Spending Limit.

In the embodiment of the present application, terminal device shows the case where Spending Limit each embodiment corresponding with earlier figures 2 Similar, details are not described herein again.

Optionally, the embodiment of the present application Fig. 2 it is corresponding it is a kind of consumption processing method an alternative embodiment in, root According to account transfer request in account identification and consumption type, determine that Spending Limit includes: by intelligent contract

According to account transfer request in account identification obtain history consumer record, history consumer record and account identification have It is relevant;

According to account transfer request in account identification, consumption type and history consumer record, it is true by intelligent contract Determine Spending Limit.

In the embodiment of the present application, terminal device determines the case where Spending Limit each embodiment corresponding with earlier figures 2 Similar, details are not described herein again.

In a kind of possible embodiment, user connects server by terminal device, and terminal device generates account transfer Account transfer request is sent to server after request, server executes such as Fig. 2 or Figure 17 pairs after receiving account transfer request The method for each embodiment answered.The terminal device of user only needs to generate and send account transfer request, alleviates the end of user End equipment burden, and server can manage the account transfer situation of each terminal device.

Figure 19 is the application examples schematic diagram of a kind of method of consumption processing, it is seen then that in the application examples, terminal device is signed in advance Intelligent contract is ordered, the description corresponding with Fig. 7 of intelligent contract is similar, and details are not described herein again.It, will after terminal device signs intelligent contract Intelligent contract is synchronized to block chain.

User needs to consume, and generates consumer consumption behavior, terminal device generates account transfer request, and obtains from network The intelligent contract and history consumption of the account, then terminal device is determined according to intelligent contract and history consumption Spending Limit, further determines that whether current payment behavior meets intelligent contract, i.e. whether account transfer request meets intelligent conjunction About, if so, paying successfully and data being synchronized to block chain, if it is not, then paying failure, terminal device can above mention at interface Show the information of payment failure, as shown in figure 14.

Figure 20 is a kind of schematic diagram of the device of consumption processing provided by the embodiments of the present application, it is seen then that the embodiment of the present application There is provided a kind of consumption processing device 2000 include:

Acquiring unit 2001, for obtaining account transfer request, account transfer request includes account identification, and account transfer is asked Ask further includes at least one of consumption type, the corresponding spending amount of consumption type and location information;

Processing unit 2002 determines consumption rights by intelligent contract for requesting according to account transfer, consumption rights with Account identification has corresponding relationship;

If processing unit 2002 is also used to account transfer, request meets consumption rights, passes through the synchronous account transfer of block chain Request.

Optionally, the embodiment of the present application Figure 20 it is corresponding it is a kind of consumption processing device an alternative embodiment in, It further include deposit unit 2003, as shown in figure 21, Figure 21 is a kind of the another of the device of consumption processing provided by the embodiments of the present application One schematic diagram, deposit unit 2003 are used for:

Credit request is obtained, credit request includes account identification, consumption type and deposit amount;

According to account identification, consumption type and deposit amount determine intelligence contract;

To the synchronous credit request of block chain and intelligent contract.

Optionally, the embodiment of the present application Figure 21 it is corresponding it is a kind of consumption processing device an alternative embodiment in, Deposit unit 2003 is also used to:

To the synchronous credit request of block chain;

To block chain synchronous intelligent contract;

Wherein, include: to block chain synchronous intelligent contract

By private key encryption intelligence contract, encrypted intelligent contract is obtained;

Intelligent contract to after block chain synchronous crypto-operation.

Optionally, the embodiment of the present application Figure 20 it is corresponding it is a kind of consumption processing device an alternative embodiment in, Processing unit 2002 is also used to:

If spending amount is greater than Spending Limit, prompting message is generated, prompting message is transferred accounts unsuccessfully for prompting.

Optionally, the embodiment of the present application Figure 20 it is corresponding it is a kind of consumption processing device an alternative embodiment in, Processing unit 2002 is also used to:

Updated Spending Limit is determined according to Spending Limit and spending amount.

Optionally, the embodiment of the present application Figure 20 it is corresponding it is a kind of consumption processing device an alternative embodiment in, Processing unit 2002 is also used to:

Reminder message is generated according to the Spending Limit in intelligent contract, reminder message is for showing Spending Limit.

Optionally, the embodiment of the present application Figure 20 it is corresponding it is a kind of consumption processing device an alternative embodiment in, Processing unit 2002 is also used to:

According to account transfer request in account identification obtain history consumer record, history consumer record and account identification have It is relevant;

According to account transfer request in account identification, consumption type and history consumer record, it is true by intelligent contract Determine Spending Limit.

The embodiment of the present application also provides a kind of node device, which can be terminal device or server, below The case where node device is terminal device, will be described in detail:

The embodiment of the present application also provides the devices of another consumption processing for ease of description, only to show as shown in figure 22 Go out part relevant to the embodiment of the present application, it is disclosed by specific technical details, please refer to the embodiment of the present application method part. The terminal can be include mobile phone, tablet computer, personal digital assistant (personal digital assistant, PDA), pin Any terminal devices such as terminal (point of sales, POS), vehicle-mounted computer are sold, taking the terminal as an example:

Figure 22 shows the block diagram of the part-structure of mobile phone relevant to terminal provided by the embodiments of the present application.With reference to figure 22, mobile phone includes: radio frequency (radio frequency, RF) circuit 2210, memory 2220, input unit 2230, display unit 2240, sensor 2250, voicefrequency circuit 2260, Wireless Fidelity (wireless fidelity, WiFi) module 2270, processor The components such as 2280 and power supply 2290.It will be understood by those skilled in the art that handset structure shown in Figure 22 is not constituted pair The restriction of mobile phone may include perhaps combining certain components or different component cloth than illustrating more or fewer components It sets.

It is specifically introduced below with reference to each component parts of the Figure 22 to mobile phone:

RF circuit 2210 can be used for receiving and sending messages or communication process in, signal sends and receivees, particularly, by base station After downlink information receives, handled to processor 2280;In addition, the data for designing uplink are sent to base station.In general, RF circuit 2210 include but is not limited to antenna, at least one amplifier, transceiver, coupler, low-noise amplifier (low noise Amplifier, LNA), duplexer etc..In addition, RF circuit 2210 can also be logical with network and other equipment by wireless communication Letter.Any communication standard or agreement, including but not limited to global system for mobile communications (global can be used in above-mentioned wireless communication System of mobile communication, GSM), general packet radio service (general packet radio Service, GPRS), CDMA (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), long term evolution (long term evolution, LTE), Email, short message service (short messaging service, SMS) etc..

Memory 2220 can be used for storing software program and module, and processor 2280 is stored in memory by operation 2220 software program and module, thereby executing the various function application and data processing of mobile phone.Memory 2220 can be led It to include storing program area and storage data area, wherein storing program area can be needed for storage program area, at least one function Application program (such as sound-playing function, image player function etc.) etc.;Storage data area, which can be stored, uses institute according to mobile phone Data (such as audio data, phone directory etc.) of creation etc..In addition, memory 2220 may include high random access storage Device, can also include nonvolatile memory, and a for example, at least disk memory, flush memory device or other volatibility are solid State memory device.

Input unit 2230 can be used for receiving the number or character information of input, and generate with the user setting of mobile phone with And the related key signals input of function control.Specifically, input unit 2230 may include touch panel 2231 and other inputs Equipment 2232.Touch panel 2231, also referred to as touch screen collect touch operation (such as the user of user on it or nearby Use the behaviour of any suitable object or attachment such as finger, stylus on touch panel 2231 or near touch panel 2231 Make), and corresponding attachment device is driven according to preset formula.Optionally, touch panel 2231 may include touch detection Two parts of device and touch controller.Wherein, the touch orientation of touch detecting apparatus detection user, and detect touch operation band The signal come, transmits a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and by it It is converted into contact coordinate, then gives processor 2280, and order that processor 2280 is sent can be received and executed.In addition, Touch panel 2231 can be realized using multiple types such as resistance-type, condenser type, infrared ray and surface acoustic waves.In addition to touch surface Plate 2231, input unit 2230 can also include other input equipments 2232.Specifically, other input equipments 2232 may include But in being not limited to physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, operating stick etc. It is one or more.

Display unit 2240 can be used for showing information input by user or be supplied to user information and mobile phone it is each Kind menu.Display unit 2240 may include display panel 2241, optionally, can use liquid crystal display (liquid Crystal display, LCD), the forms such as Organic Light Emitting Diode (organic light-emitting diode, OLED) To configure display panel 2241.Further, touch panel 2231 can cover display panel 2241, when touch panel 2231 detects After arriving touch operation on it or nearby, processor 2280 is sent to determine the type of touch event, is followed by subsequent processing device 2280 provide corresponding visual output according to the type of touch event on display panel 2241.Although in Figure 22, touch surface Plate 2231 and display panel 2241 are the input and input function for realizing mobile phone as two independent components, but certain In embodiment, can be integrated by touch panel 2231 and display panel 2241 and that realizes mobile phone output and input function.

Mobile phone may also include at least one sensor 2250, such as optical sensor, motion sensor and other sensors. Specifically, optical sensor may include ambient light sensor and proximity sensor, wherein ambient light sensor can be according to ambient light Light and shade adjust the brightness of display panel 2241, proximity sensor can close display panel when mobile phone is moved in one's ear 2241 and/or backlight.As a kind of motion sensor, accelerometer sensor can detect in all directions (generally three axis) and add The size of speed can detect that size and the direction of gravity when static, can be used to identify application (such as the horizontal/vertical screen of mobile phone posture Switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap) etc.;Also as mobile phone The other sensors such as configurable gyroscope, barometer, hygrometer, thermometer, infrared sensor, details are not described herein.

Voicefrequency circuit 2260, loudspeaker 2261, microphone 2262 can provide the audio interface between user and mobile phone.Audio Electric signal after the audio data received conversion can be transferred to loudspeaker 2261, be converted by loudspeaker 2261 by circuit 2260 For voice signal output;On the other hand, the voice signal of collection is converted to electric signal by microphone 2262, by voicefrequency circuit 2260 Audio data is converted to after reception, then by after the processing of audio data output processor 2280, through RF circuit 2210 to be sent to ratio Such as another mobile phone, or audio data is exported to memory 2220 to be further processed.

WiFi belongs to short range wireless transmission technology, and mobile phone can help user's transceiver electronics postal by WiFi module 2270 Part, browsing webpage and access streaming video etc., it provides wireless broadband internet access for user.Although Figure 22 is shown WiFi module 2270, but it is understood that, and it is not belonging to must be configured into for mobile phone, it can according to need do not changing completely Become in the range of the essence of invention and omits.

Processor 2280 is the control centre of mobile phone, using the various pieces of various interfaces and connection whole mobile phone, By running or execute the software program and/or module that are stored in memory 2220, and calls and be stored in memory 2220 Interior data execute the various functions and processing data of mobile phone, to carry out integral monitoring to mobile phone.Optionally, processor 2280 may include one or more processing units;Optionally, processor 2280 can integrate application processor and modulation /demodulation processing Device, wherein the main processing operation system of application processor, user interface and application program etc., modem processor is mainly located Reason wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor 2280.

Mobile phone further includes the power supply 2290 (such as battery) powered to all parts, and optionally, power supply can pass through power supply Management system and processor 2280 are logically contiguous, to realize management charging, electric discharge and power consumption pipe by power-supply management system The functions such as reason.

Although being not shown, mobile phone can also include camera, bluetooth module etc., and details are not described herein.

In the embodiment of the present application, processor 2280 included by the terminal is also with the following functions:

Obtain account transfer request, account transfer request include account identification, account transfer request further include consumption type, At least one of the corresponding spending amount of consumption type and location information;

It is requested according to account transfer, determines that consumption rights, consumption rights have corresponding with account identification by intelligent contract Relationship;

If account transfer request meets consumption rights, pass through the synchronous account transfer request of block chain;

In the embodiment of the present application, processor 2280 included by the terminal is also with the following functions:

Credit request is obtained, credit request includes account identification, consumption type and deposit amount;

According to account identification, consumption type and deposit amount determine intelligence contract;

To the synchronous credit request of block chain and intelligent contract.

In the embodiment of the present application, processor 2280 included by the terminal is also with the following functions:

To the synchronous credit request of block chain;

To block chain synchronous intelligent contract;

Wherein, include: to block chain synchronous intelligent contract

By private key encryption intelligence contract, encrypted intelligent contract is obtained;

Intelligent contract to after block chain synchronous crypto-operation.

In the embodiment of the present application, processor 2280 included by the terminal is also with the following functions:

If spending amount is greater than Spending Limit, prompting message is generated, prompting message is transferred accounts unsuccessfully for prompting.

In the embodiment of the present application, processor 2280 included by the terminal is also with the following functions:

Updated Spending Limit is determined according to Spending Limit and spending amount.

In the embodiment of the present application, processor 2280 included by the terminal is also with the following functions:

Reminder message is generated according to the Spending Limit in intelligent contract, reminder message is for showing Spending Limit.

In the embodiment of the present application, processor 2280 included by the terminal is also with the following functions:

According to account transfer request in account identification obtain history consumer record, history consumer record and account identification have It is relevant;

According to account transfer request in account identification, consumption type and history consumer record, it is true by intelligent contract Determine Spending Limit.

The case where node device is server, will be described in detail below:

Figure 23 is a kind of server architecture schematic diagram provided by the embodiments of the present application, which can be because of configuration or property Energy is different and generates bigger difference, may include one or more central processing units (central processing Units, CPU) 2322 (for example, one or more processors) and memory 2332, one or more storage applications The storage medium 2330 (such as one or more mass memory units) of program 2342 or data 2344.Wherein, memory 2332 and storage medium 2330 can be of short duration storage or persistent storage.The program for being stored in storage medium 2330 may include one A or more than one module (diagram does not mark), each module may include to the series of instructions operation in server.More into One step, central processing unit 2322 can be set to communicate with storage medium 2330, execute storage medium on server 2300 Series of instructions operation in 2330.

Server 2300 can also include one or more power supplys 2326, one or more wired or wireless nets Network interface 2350, one or more input/output interfaces 2358, and/or, one or more operating systems 2341, example Such as Windows ServerTM, Mac OS XTM, UnixTM,LinuxTM, FreeBSDTMEtc..

The step as performed by server can be based on server architecture shown in the Figure 23 in above-described embodiment.

In the embodiment of the present application, following steps can also be performed in central processing unit 2322:

Obtain account transfer request, account transfer request include account identification, account transfer request further include consumption type, At least one of the corresponding spending amount of consumption type and location information;

It is requested according to account transfer, determines that consumption rights, consumption rights have corresponding with account identification by intelligent contract Relationship;

If account transfer request meets consumption rights, pass through the synchronous account transfer request of block chain;

In the embodiment of the present application, following steps can also be performed in central processing unit 2322:

Credit request is obtained, credit request includes account identification, consumption type and deposit amount;

According to account identification, consumption type and deposit amount determine intelligence contract;

To the synchronous credit request of block chain and intelligent contract.

In the embodiment of the present application, following steps can also be performed in central processing unit 2322:

To the synchronous credit request of block chain;

To block chain synchronous intelligent contract;

Wherein, include: to block chain synchronous intelligent contract

By private key encryption intelligence contract, encrypted intelligent contract is obtained;

Intelligent contract to after block chain synchronous crypto-operation.

In the embodiment of the present application, following steps can also be performed in central processing unit 2322:

If spending amount is greater than Spending Limit, prompting message is generated, prompting message is transferred accounts unsuccessfully for prompting.

In the embodiment of the present application, following steps can also be performed in central processing unit 2322:

Updated Spending Limit is determined according to Spending Limit and spending amount.

In the embodiment of the present application, following steps can also be performed in central processing unit 2322:

Reminder message is generated according to the Spending Limit in intelligent contract, reminder message is for showing Spending Limit.

In the embodiment of the present application, following steps can also be performed in central processing unit 2322:

According to account transfer request in account identification obtain history consumer record, history consumer record and account identification have It is relevant;

According to account transfer request in account identification, consumption type and history consumer record, it is true by intelligent contract Determine Spending Limit.

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 It divides, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or The mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, the indirect coupling of device or unit It closes or communicates to connect, can be electrical property, mechanical or other forms.

The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In 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 sells or use as independent product When, it can store in a computer readable storage medium.Based on this understanding, the technical solution of the application is substantially The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words It embodies, which is stored in a storage medium, including some instructions are used so that a computer Equipment (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment the method for the application Portion or part steps.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can store journey The medium of sequence code.

40页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:基于商业银行中介的红包支付方法及系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!