CN107707368A - The fee deduction treatment method and server of a kind of API service - Google Patents

The fee deduction treatment method and server of a kind of API service Download PDF

Info

Publication number
CN107707368A
CN107707368A CN201710816755.2A CN201710816755A CN107707368A CN 107707368 A CN107707368 A CN 107707368A CN 201710816755 A CN201710816755 A CN 201710816755A CN 107707368 A CN107707368 A CN 107707368A
Authority
CN
China
Prior art keywords
user
mark
service
api service
money
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710816755.2A
Other languages
Chinese (zh)
Inventor
蔡小伟
陈明灿
张智
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiamen Micro Technology Co Ltd
Original Assignee
Xiamen Micro Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xiamen Micro Technology Co Ltd filed Critical Xiamen Micro Technology Co Ltd
Priority to CN201710816755.2A priority Critical patent/CN107707368A/en
Publication of CN107707368A publication Critical patent/CN107707368A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/14Charging, metering or billing arrangements for data wireline or wireless communications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/14Charging, metering or billing arrangements for data wireline or wireless communications
    • H04L12/141Indication of costs

Abstract

The present invention discloses the fee deduction treatment method and server of a kind of API service.Wherein, methods described includes:API service call request is received, the API service call request includes user's mark and service identifiers;Identified according to the service identifiers and the user and generate the withholding fee amount of money corresponding with user mark;If judgement knows that service result meets requirement of deducting fees, mark of deducting fees is generated;Wherein, the service result is in response to the API service call request and carries out what is returned after API service calling, and the mark of deducting fees is corresponding with user mark;Identified according to the mark of deducting fees, the withholding fee amount of money and the user and carry out fee deduction treatment.The server is used to perform the above method.The fee deduction treatment method and server of API service provided by the invention, improve the charging efficiency of API service.

Description

The fee deduction treatment method and server of a kind of API service
Technical field
The present invention relates to technical field of data processing, and in particular to the fee deduction treatment method and server of a kind of API service.
Background technology
Application programming interface (Application Programming Interface, API) service has coincidence The characteristics of high, and as the development of network technology, the application of API service are also more and more extensive.
At present, the charging of API service is adjusted often through extra server or device in face of increasing API service It is increasingly heavier with request, the burden of above-mentioned server or device, it is impossible to the charging of carry out API service promptly and accurately.
Therefore, a kind of method how is proposed, it is possible to increase the charging efficiency of API service turns into urgently to be resolved hurrily important of industry Problem.
The content of the invention
For in the prior art the defects of, the present invention provides a kind of the fee deduction treatment method and server of API service.
On the one hand, the present invention proposes a kind of fee deduction treatment method of API service, including:
API service call request is received, the API service call request includes user's mark and service identifiers;
Identified according to the service identifiers and the user and generate the withholding fee amount of money corresponding with user mark;
If judgement knows that service result meets requirement of deducting fees, mark of deducting fees is generated;Wherein, the service result is in response to Returned after the API service call request progress API service calling, the mark of deducting fees is corresponding with user mark;
Identified according to the mark of deducting fees, the withholding fee amount of money and the user and carry out fee deduction treatment.
On the other hand, the present invention provides a kind of server, including:
Receiving unit is serviced, for receiving API service call request, the API service call request identifies including user And service identifiers;
Deduct fees computing unit, it is corresponding with user mark for identifying generation according to the service identifiers and the user The withholding fee amount of money;
Deduct fees confirmation unit, if for judging to know that service result meets requirements of deducting fees, generate mark of deducting fees;Wherein, The service result is in response to the API service call request and carries out what is returned after API service calling, mark and the institute of deducting fees It is corresponding to state user's mark;
Fee deduction treatment unit, detained for mark of being deducted fees according to, the withholding fee amount of money and user mark Take processing.
Another further aspect, the present invention provide a kind of electronic equipment, including:Processor, memory and communication bus, wherein:
The processor and the memory complete mutual communication by the communication bus;
The memory storage has and by the programmed instruction of the computing device, the processor described program can be called to refer to Order is able to carry out the fee deduction treatment method of the API service that each embodiment provides as described above.
Another aspect, the present invention provide a kind of non-transient computer readable storage medium storing program for executing, and the non-transient computer is readable Storage medium stores computer instruction, and the computer instruction makes the computer perform the API that each embodiment provides as described above The fee deduction treatment method of service.
The fee deduction treatment method and server of API service provided by the invention, please due to that can receive API service calling Asking, the service identifiers included according to API service call request and user identify and generate the withholding fee amount of money corresponding with user's mark, Judging to know that service result meets to deduct fees after requirement, generation is deducted fees mark, and according to deduct fees identify, the withholding fee amount of money and The user that API service call request includes, which identifies, carries out fee deduction treatment, improves the charging efficiency of API service.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are this hairs Some bright embodiments, for those of ordinary skill in the art, on the premise of not paying creative work, can be with root Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is the schematic flow sheet of the fee deduction treatment method of one embodiment of the invention API service;
Fig. 2 is the schematic flow sheet of the fee deduction treatment method of another embodiment of the present invention API service;
Fig. 3 is the structural representation of one embodiment of the invention server;
Fig. 4 is the structural representation of another embodiment of the present invention server;
Fig. 5 is the structural representation of further embodiment of this invention server;
Fig. 6 is the structural representation of further embodiment of this invention server;
Fig. 7 is one embodiment of the invention electronic equipment entity structure schematic diagram.
Embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached in the embodiment of the present invention Figure, the technical scheme in the embodiment of the present invention is explicitly described, it is clear that described embodiment is a part of the invention Embodiment, rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art are not making wound The every other embodiment obtained under the premise of the property made work, belongs to the scope of protection of the invention.
In the present invention, based on Web technologies, the fee deduction treatment method of API service provided by the invention is deployed in Web and held In device, especially deploy the API service for needing to pay and provide a user in the Web container of API service calling.The Web Container can use the Web container run in JAVA virtual machine.User can be by client such as mobile phone or computer, with carrying For being communicated between the server of the API service, the API service is called.The API service can include identity real name Authentication service, mobile telephone real-name authentication service etc..Because the fee deduction treatment method of API service provided by the invention is based on Web technologies, Can with above-mentioned API service one is logical is deployed in the Web container, it is possible to increase the accuracy of charging and ageing, further Ground, due to independent of special accounting server and device, there is portable and reusability, API service can be reduced and carried For the cost of business.
Fig. 1 is the schematic flow sheet of the fee deduction treatment method of one embodiment of the invention API service, as shown in figure 1, of the invention The fee deduction treatment method of the API service of offer, including:
S101, API service call request is received, the API service call request includes user's mark and service identifiers;
Specifically, the user end to server sends API service call request, and the server can receive the calling Request, the call request include user's mark and service identifiers;Wherein, API service call request is used to call corresponding API Service;User's mark is corresponded with user account, and the user account can be inquired by user mark;Institute State service identifiers to be used to distinguish various API services, every kind of API service there are unique corresponding service identifiers.It is intelligible It is that the server can receive the API service call request of multiple clients simultaneously.
S102, generation withholding fee gold corresponding with user mark is identified according to the service identifiers and the user Volume;
Specifically, the server determines that this API takes after the call request is received according to the service identifiers The expense of business, i.e. the withholding fee amount of money, and the withholding fee amount of money is corresponding with user mark.Because the server can It is to handle multiple API service call requests simultaneously, the withholding fee amount of money is corresponding with user's mark, ensure data of deducting fees Accuracy.It will be appreciated that every kind of API service has corresponding expense, the expense can pass through the service identifiers Inquiry obtains.
If S103, judgement know that service result meets requirement of deducting fees, mark of deducting fees is generated;Wherein, the service result It is in response to the API service call request and carries out what is returned after API service calling, mark and the user mark phase of deducting fees It is corresponding;
Specifically, the server calls corresponding API service and run, in institute according to the API service call request After the completion of stating API service operation, corresponding service result can be returned to, the service knot that the service result is deducted fees with needs Fruit compares, if the service result is consistent with the service result for needing to be deducted fees, then the service result meets button Expense requires that the server can generate button corresponding with user mark, it is necessary to be charged to the calling of the API service Take mark.
For example, it is necessary to which the service result paid is in identity real name authentication service:Successful inquiring, name and body Part results card is consistent;Successful inquiring, name and ID card verification are inconsistent;The service result that need not be paid is:Inquiry failure. If the user is identified as 65c55123 user after the identity real name authentication service is carried out, the service result is to look into Ask successfully, name and ID card verification are inconsistent, then need to be paid, and the server generation is corresponding with 65c55123 to detain Take mark.
S104, deducted fees according to mark, the withholding fee amount of money and user mark progress fee deduction treatment.
Specifically, the server can obtain institute corresponding with the mark of deducting fees after mark of being deducted fees described in acquisition State user mark, by the user identify inquiry obtain with the corresponding user account of user mark, i.e., confirmation need into The user account that row is deducted fees, according to the withholding fee amount of money corresponding to user mark, you can confirm that the user account needs The expense for this time API service to be deducted, the server deduct the withholding fee amount of money from the user account, and The data syn-chronization of the user account after deducting fees is into customer data base, so as to complete fee deduction treatment.It will be appreciated that institute State customer data base to pre-establish, the data of the user account can be included, the server can pass through the use Family identifier lookup user account corresponding to.
The fee deduction treatment method of API service provided by the invention, due to API service call request can be received, according to API The service identifiers and user that service invocation request includes, which identify, generates the withholding fee amount of money corresponding with user's mark, is judging to know Service result satisfaction is deducted fees after requirement, generates mark of deducting fees, and call according to deduct fees mark, the withholding fee amount of money and API service The user for asking to include, which identifies, carries out fee deduction treatment, improves the charging efficiency of API service.
Fig. 2 is the schematic flow sheet of the fee deduction treatment method of another embodiment of the present invention API service, as shown in Fig. 2 upper On the basis of stating embodiment, further, mark of being deducted fees described in the basis, the withholding fee amount of money and the user identify into Row fee deduction treatment includes:
S1041, the user account that mark determines to be deducted fees of being deducted fees according to;Wherein, the user account with it is described User, which identifies, to be corresponded;
Specifically, the server can obtain institute corresponding with the mark of deducting fees after mark of being deducted fees described in acquisition User's mark is stated, identify inquiry acquisition by the user identifies one-to-one user account with the user, you can it is determined that Need the user account deducted fees.
S1042, the withholding fee amount of money is deducted from the user account.
Specifically, the server identifies after the user account for needing to be deducted fees is obtained according to the user The withholding fee amount of money corresponding with user mark can be obtained, the withholding fee is then deducted from the user account The amount of money.It will be appreciated that the server will can deduct fees after the user account data syn-chronization into customer data base, To ensure to upgrade to the user account data in time.
On the basis of the various embodiments described above, further, generation is being identified according to the service identifiers and the user After the withholding fee amount of money corresponding with user mark, in addition to:Caching is described corresponding described pre- with user mark Deduct fees the amount of money.
Specifically, because the server can receive the API service call request of multiple clients simultaneously, right , it is necessary to certain stand-by period when the API service call request is handled, the server can by described in generation with The withholding fee amount of money corresponding to user's mark is cached, and is detained again after waiting corresponding mark of deducting fees to be obtained Take processing, the treatment effeciency to the API service call request can be improved.
On the basis of the various embodiments described above, further, identified described according to the service identifiers and the user After the generation withholding fee amount of money corresponding with user mark, in addition to:
If judge to know the type of user account corresponding to user's mark as prepaid account, according to the user The remaining sum of mark inquiry user account;
If judgement knows that the remaining sum is less than the withholding fee data, the API service is interrupted.
Specifically, the type of the user account includes prepaid account, and the user of the prepaid account type is entering The row API service needs to confirm the expense for having the enough amount of money to pay this API service in the user account before calling.Institute Stating server can inquire and the corresponding user of user mark according to user mark in the customer data base The type of account, if the type of the user account is prepaid account, then can be inquired about and obtained according to user mark Obtain the remaining sum of the user account corresponding with user mark;The server by the user identify corresponding to withholding fee The amount of money and the remaining sum are contrasted, if the remaining sum is less than the withholding fee data, illustrate the user account without foot The enough amount of money pays the expense of this API service, and the server interrupts the calling of the API service.The server can be with While the API service is interrupted, the account prompt message that Sorry, your ticket has not enough value is returned to the client, to remind the use Family is supplemented with money by its user account.If it will be appreciated that the remaining sum is more than or equal to the withholding fee data, the service Device continues the API service.
Fig. 3 is the structural representation of one embodiment of the invention server, as shown in figure 3, server bag provided by the invention Service receiving unit 301, computing unit 302 of deducting fees, deduct fees confirmation unit 303 and fee deduction treatment unit 304 are included, wherein:
Service receiving unit 301 is used to receive API service call request, and the API service call request is marked including user Knowledge and service identifiers;Computing unit 302 of deducting fees is used to identify generation and the user according to the service identifiers and the user The withholding fee amount of money corresponding to mark;If confirmation unit 303 of deducting fees is used to judge to know that service result meets requirement of deducting fees, generate Deduct fees mark;Wherein, the service result is in response to the API service call request and carries out what is returned after API service calling, institute It is corresponding with user mark to state mark of deducting fees;Fee deduction treatment unit 304 is used for deducted fees according to mark, the withholding fee The amount of money and the user, which identify, carries out fee deduction treatment.
Specifically, the user end to server sends API service call request, and service receiving unit 301 can receive institute Call request is stated, the call request includes user's mark and service identifiers;Wherein, API service call request is used to call phase The API service answered;User's mark is corresponded with user account, and the user can be inquired by user mark Account;The service identifiers are used to distinguish various API services, and every kind of API service has unique corresponding service identifiers.Can Understand, service receiving unit 301 can receive the API service call request of multiple clients simultaneously.
After the call request is received, computing unit 302 of deducting fees determines this API service according to the service identifiers Expense, i.e. the withholding fee amount of money, and the withholding fee amount of money is corresponding with user mark.Because the server can be with Multiple API service call requests are handled simultaneously, the withholding fee amount of money is corresponding with user's mark, and guarantee is deducted fees the standards of data True property.It will be appreciated that every kind of API service has corresponding expense, the expense can be looked into by the service identifiers Ask and obtain.
The server calls corresponding API service and run, taken in the API according to the API service call request After the completion of business operation, corresponding service result can be returned to, confirmation unit 303 of deducting fees is deducted fees the service result with needs Service result compare, if the service result is consistent with needing the service result deducted fees, then the service knot Fruit meets to deduct fees requirement, it is necessary to be charged to the calling of the API service, and confirmation unit 303 of deducting fees can generate and the use Deducted fees mark corresponding to the mark of family.
Fee deduction treatment unit 304 can obtain corresponding with the mark of deducting fees described after mark of being deducted fees described in acquisition User identifies, and identify inquiry by the user and obtain needs to carry out with the corresponding user account of user mark, i.e. confirmation The user account deducted fees, according to the withholding fee amount of money corresponding to user mark, you can confirm the user account needs The expense of this time API service deducted, fee deduction treatment unit 304 deduct the withholding fee gold from the user account Volume, and the data syn-chronization of the user account after deducting fees is into customer data base, so as to complete fee deduction treatment.It is intelligible It is that the customer data base pre-establishes, the data of the user account can be included, the server can passes through institute State user's identifier lookup user account corresponding to.
Server provided by the invention, due to API service call request can be received, according to API service call request bag The service identifiers included and user, which identify, generates the withholding fee amount of money corresponding with user's mark, is judging to know that service result meets button After taking requirement, mark of deducting fees, and the user included according to deduct fees mark, the withholding fee amount of money and API service call request are generated Mark carries out fee deduction treatment, improves the charging efficiency of API service.
Fig. 4 is the structural representation of another embodiment of the present invention server, as shown in figure 4, fee deduction treatment unit 304 includes Subelement 3041 and subelement 3042 of deducting fees are obtained, wherein:
Obtain subelement 3041 and be used for the user account that mark determines to be deducted fees of being deducted fees according to;Wherein, the use Family account is identified with the user and corresponded;Subelement 3042 of deducting fees is used to deduct the withholding fee from the user account The amount of money.
Specifically, subelement 3041 is obtained after mark of being deducted fees described in acquisition, can be obtained corresponding with the mark of deducting fees User mark, pass through the user and identify inquiry and obtain and identify one-to-one user account with the user, you can It is determined that need the user account deducted fees.
Subelement 3042 deduct fees after obtaining and needing the user account deducted fees, can be with according to user mark The withholding fee amount of money corresponding with user mark is obtained, the withholding fee gold is then deducted from the user account Volume.It will be appreciated that subelement 3042 of deducting fees will can deduct fees after the user account data syn-chronization to customer data base In, to ensure to upgrade to the user account data in time.
Fig. 5 is the structural representation of further embodiment of this invention server, as shown in figure 5, server provided by the invention Also include:
Buffer unit 305 is used to cache the withholding fee amount of money corresponding with user mark.
Specifically, because the server can receive the API service call request of multiple clients simultaneously, right , it is necessary to which certain stand-by period, buffer unit 305 can be by described in generations when the API service call request is handled The withholding fee amount of money corresponding with user mark is cached, after the corresponding mark of deducting fees to be obtained such as described server Fee deduction treatment is carried out again, can improve the treatment effeciency to the API service call request.
Fig. 6 is the structural representation of further embodiment of this invention server, as shown in fig. 6, server provided by the invention Also include the first judging unit 306 and the second judging unit 307, wherein:
If the first judging unit 306 be used to judging to know the user identify corresponding to user account type as pre-payment Account, then obtain the remaining sum of the user account;If the second judging unit 307 is used to judge to know that if the remaining sum is known in judgement Less than the withholding fee amount of money, then the API service is interrupted.
Specifically, the type of the user account includes prepaid account, and the user of the prepaid account type is entering The row API service needs to confirm the expense for having the enough amount of money to pay this API service in the user account before calling.The One judging unit 306 can inquire corresponding with user mark according to user mark in the customer data base The type of user account, if the type of the user account is prepaid account, then can be looked into according to user mark Ask the remaining sum for obtaining the user account corresponding with user mark;
Second judging unit 307 is contrasted the withholding fee amount of money and the remaining sum corresponding to user mark, if The remaining sum is less than the withholding fee data, illustrates the expense that the user account does not have the enough amount of money to pay this API service With the second judging unit 307 interrupts the calling of the API service.Second judging unit 307 can interrupt the API service While, the account prompt message that Sorry, your ticket has not enough value is returned to the client, to remind the user to enter its user account Row is supplemented with money.If it will be appreciated that the remaining sum is more than or equal to the withholding fee data, the server continues described API service.
The embodiment of server provided by the invention specifically can be used for the handling process for performing above-mentioned each method embodiment, Its function will not be repeated here, and be referred to the detailed description of above method embodiment.
Fig. 7 is one embodiment of the invention electronic equipment entity structure schematic diagram, as shown in fig. 7, the electronic equipment includes Processor (processor) 701, memory (memory) 702 and communication bus 703;
Wherein, processor 701, memory 702 complete mutual communication by communication bus 703;
Processor 701 is used to call programmed instruction in memory 702, is provided with to perform above-mentioned each method embodiment Method, such as including:API service call request is received, the API service call request includes user's mark and service identifiers; Identified according to the service identifiers and the user and generate the withholding fee amount of money corresponding with user mark;If clothes are known in judgement Business result meets requirement of deducting fees, then generates mark of deducting fees;Wherein, the service result is in response to the API service call request Returned after progress API service calling, the mark of deducting fees is corresponding with user mark;According to the mark of deducting fees, institute State the withholding fee amount of money and the user identifies and carries out fee deduction treatment.
The present embodiment discloses a kind of computer program product, and the computer program product includes being stored in non-transient calculating Computer program on machine readable storage medium storing program for executing, the computer program include programmed instruction, when described program instruction is calculated When machine performs, computer is able to carry out the method that above-mentioned each method embodiment is provided, such as including:API service is received to call Request, the API service call request include user's mark and service identifiers;Identified according to the service identifiers and the user The generation withholding fee amount of money corresponding with user mark;If judgement knows that service result meets requirement of deducting fees, generation is deducted fees Mark;Wherein, the service result is in response to the API service call request and carries out what is returned after API service calling, the button It is corresponding with user mark to take mark;Identified and carried out according to the mark of deducting fees, the withholding fee amount of money and the user Fee deduction treatment.
The present embodiment provides a kind of non-transient computer readable storage medium storing program for executing, the non-transient computer readable storage medium storing program for executing Computer instruction is stored, the computer instruction makes the computer perform the method that above-mentioned each method embodiment is provided, example Such as include:API service call request is received, the API service call request includes user's mark and service identifiers;According to described Service identifiers and the user, which identify, generates the withholding fee amount of money corresponding with user mark;If judgement knows that service result expires Foot is deducted fees requirements, then generates mark of deducting fees;Wherein, the service result is in response to the API service call request and carries out API clothes What business returned after calling, the mark of deducting fees is corresponding with user mark;According to the mark of deducting fees, withholding fee gold Volume and the user, which identify, carries out fee deduction treatment.
In addition, the logical order in above-mentioned memory can be realized by the form of SFU software functional unit and is used as independent Production marketing or in use, can be stored in a computer read/write memory medium.Based on such understanding, the present invention The part that is substantially contributed in other words to prior art of technical scheme or the part of the technical scheme can be with software The form of product is embodied, and the computer software product is stored in a storage medium, including some instructions are causing One computer equipment (can be personal computer, device, or network equipment etc.) is performed described in each embodiment of the present invention The all or part of step of method.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (ROM, Read- Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can be with The medium of store program codes.
Device embodiment described above is only schematical, wherein the unit illustrated as separating component can To be or may not be physically separate, it can be as the part that unit is shown or may not be physics list Member, you can with positioned at a place, or can also be distributed on multiple NEs.It can be selected according to the actual needs In some or all of module realize the purpose of this embodiment scheme.Those of ordinary skill in the art are not paying creativeness Work in the case of, you can to understand and implement.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can Realized by the mode of software plus required general hardware platform, naturally it is also possible to pass through hardware.Based on such understanding, on The part that technical scheme substantially in other words contributes to prior art is stated to embody in the form of software product, should Computer software product can store in a computer-readable storage medium, such as ROM/RAM, magnetic disc, CD, including some fingers Make to cause a computer equipment (can be personal computer, server, or network equipment etc.) to perform each implementation Method described in some parts of example or embodiment.
Finally it should be noted that:The above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although The present invention is described in detail with reference to the foregoing embodiments, it will be understood by those within the art that:It still may be used To be modified to the technical scheme described in foregoing embodiments, or equivalent substitution is carried out to which part technical characteristic; And these modification or replace, do not make appropriate technical solution essence depart from various embodiments of the present invention technical scheme spirit and Scope.

Claims (10)

1. a kind of fee deduction treatment method of API service, it is characterised in that including:
API service call request is received, the API service call request includes user's mark and service identifiers;
Identified according to the service identifiers and the user and generate the withholding fee amount of money corresponding with user mark;
If judgement knows that service result meets requirement of deducting fees, mark of deducting fees is generated;Wherein, the service result is in response to described Returned after API service call request progress API service calling, the mark of deducting fees is corresponding with user mark;
Identified according to the mark of deducting fees, the withholding fee amount of money and the user and carry out fee deduction treatment.
2. according to the method for claim 1, it is characterised in that mark of being deducted fees described in the basis, the withholding fee amount of money Identifying progress fee deduction treatment with the user includes:
The user account for determining to be deducted fees according to the mark of deducting fees;Wherein, the user account and user mark one One correspondence;
The withholding fee amount of money is deducted from the user account.
3. according to the method for claim 1, it is characterised in that identifying generation according to the service identifiers and the user After the withholding fee amount of money corresponding with user mark, in addition to:Caching is described corresponding described pre- with user mark Deduct fees the amount of money.
4. according to the method for claim 1, it is characterised in that identified described according to the service identifiers and the user After the generation withholding fee amount of money corresponding with user mark, in addition to:
If judging to know, the type of user account corresponding to user's mark as prepaid account, obtains the user account Remaining sum;
If judgement knows that the remaining sum is less than the withholding fee amount of money, the API service is interrupted.
A kind of 5. server, it is characterised in that including:
Receiving unit is serviced, for receiving API service call request, the API service call request includes user and identifies kimonos Business mark;
Deduct fees computing unit, it is corresponding with user mark in advance for identifying generation according to the service identifiers and the user Deduct fees the amount of money;
Deduct fees confirmation unit, if for judging to know that service result meets requirements of deducting fees, generate mark of deducting fees;Wherein, it is described Service result is in response to the API service call request and carries out what is returned after API service calling, mark and the use of deducting fees Family mark is corresponding;
Fee deduction treatment unit, the place that deducts fees is carried out for mark of being deducted fees according to, the withholding fee amount of money and user mark Reason.
6. server according to claim 5, it is characterised in that the fee deduction treatment unit includes:
Subelement is obtained, the user account for determining to be deducted fees for mark of deducting fees according to;Wherein, the user account with The user, which identifies, to be corresponded;
Deduct fees subelement, for deducting the withholding fee amount of money from the user account.
7. server according to claim 5, it is characterised in that also include:
Buffer unit, for caching the withholding fee amount of money corresponding with user mark.
8. server according to claim 5, it is characterised in that also include:
First judging unit, if for judging to know the type of user account corresponding to user's mark as prepaid account, Then obtain the remaining sum of the user account;
Second judging unit, if if for judging to know that judgement knows that the remaining sum is less than the withholding fee amount of money, interrupt institute State API service.
9. a kind of electronic equipment, it is characterised in that including:Processor, memory and communication bus, wherein:
The processor and the memory complete mutual communication by the communication bus;
The memory storage has can be by the programmed instruction of the computing device, and the processor calls described program instruction energy Enough perform the method as described in any one of Claims 1-4.
10. a kind of non-transient computer readable storage medium storing program for executing, it is characterised in that the non-transient computer readable storage medium storing program for executing is deposited Computer instruction is stored up, the computer instruction makes the computer perform the method as described in any one of Claims 1-4.
CN201710816755.2A 2017-09-12 2017-09-12 The fee deduction treatment method and server of a kind of API service Pending CN107707368A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710816755.2A CN107707368A (en) 2017-09-12 2017-09-12 The fee deduction treatment method and server of a kind of API service

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710816755.2A CN107707368A (en) 2017-09-12 2017-09-12 The fee deduction treatment method and server of a kind of API service

Publications (1)

Publication Number Publication Date
CN107707368A true CN107707368A (en) 2018-02-16

Family

ID=61171428

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710816755.2A Pending CN107707368A (en) 2017-09-12 2017-09-12 The fee deduction treatment method and server of a kind of API service

Country Status (1)

Country Link
CN (1) CN107707368A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109582655A (en) * 2018-11-08 2019-04-05 深圳市云智融科技有限公司 Localization method and device, the computer readable storage medium of system log
EP3839846A1 (en) * 2019-12-20 2021-06-23 Fujitsu Limited Service cost calculation device, method, and program
CN113191817A (en) * 2021-05-18 2021-07-30 支付宝(杭州)信息技术有限公司 Service charge calculation method and device
CN113242303A (en) * 2021-05-12 2021-08-10 北京京东拓先科技有限公司 Session processing method, device, electronic equipment, system and storage medium
CN113762949A (en) * 2021-02-23 2021-12-07 西安京迅递供应链科技有限公司 Data processing method and device
CN114581069A (en) * 2022-03-03 2022-06-03 百融至信(北京)征信有限公司 Minimum bill amount charging method and system based on API call amount
CN116629864A (en) * 2023-04-27 2023-08-22 北京熠智科技有限公司 API service charging method, platform and storage medium under privacy computing scene

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102065057A (en) * 2009-11-18 2011-05-18 华为技术有限公司 Method and server applied to agency service of Widget
CN107046482A (en) * 2017-04-25 2017-08-15 厦门集微科技有限公司 The management method and device of a kind of API service

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102065057A (en) * 2009-11-18 2011-05-18 华为技术有限公司 Method and server applied to agency service of Widget
CN107046482A (en) * 2017-04-25 2017-08-15 厦门集微科技有限公司 The management method and device of a kind of API service

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109582655A (en) * 2018-11-08 2019-04-05 深圳市云智融科技有限公司 Localization method and device, the computer readable storage medium of system log
EP3839846A1 (en) * 2019-12-20 2021-06-23 Fujitsu Limited Service cost calculation device, method, and program
US11646904B2 (en) 2019-12-20 2023-05-09 Fujitsu Limited Information processing apparatus and service cost calculation method
CN113762949A (en) * 2021-02-23 2021-12-07 西安京迅递供应链科技有限公司 Data processing method and device
CN113242303A (en) * 2021-05-12 2021-08-10 北京京东拓先科技有限公司 Session processing method, device, electronic equipment, system and storage medium
CN113242303B (en) * 2021-05-12 2023-04-18 北京京东拓先科技有限公司 Session processing method, device, electronic equipment, system and storage medium
CN113191817A (en) * 2021-05-18 2021-07-30 支付宝(杭州)信息技术有限公司 Service charge calculation method and device
CN114581069A (en) * 2022-03-03 2022-06-03 百融至信(北京)征信有限公司 Minimum bill amount charging method and system based on API call amount
CN116629864A (en) * 2023-04-27 2023-08-22 北京熠智科技有限公司 API service charging method, platform and storage medium under privacy computing scene
CN116629864B (en) * 2023-04-27 2024-04-16 北京熠智科技有限公司 API service charging method, platform and storage medium under privacy computing scene

Similar Documents

Publication Publication Date Title
CN107707368A (en) The fee deduction treatment method and server of a kind of API service
US20200112641A1 (en) System and method for monitoring account usage on a platform
EP3079326B1 (en) Network payment method, apparatus and system
US10742582B2 (en) Launching a client application based on a message
EP2876594A1 (en) Payment method and device
CN105933883B (en) Traffic monitoring processing method and relevant apparatus and system
CN109615384B (en) Method, device and server for generating timeliness check rule
CN111510908A (en) Card opening method, device, equipment and medium
CN111415146A (en) Resource data processing method, device and equipment
CN107493176A (en) A kind of charging method and system
EP2472775B1 (en) A method, device and computer program product for controlling use of electronic communication services
CN109120808A (en) A kind of shutdown fee payment method and device
CA2846707A1 (en) Bridging suspension of accounts
CN110413421B (en) Service data processing method and device, and transaction data processing method and device
CN112819508B (en) Electronic resource allocation method and device
CN107679842A (en) Fiduciary virtual resource concocting method
CN108156206B (en) Data transfer method, server, client and system
CN106933655A (en) Event execution method and device
CN110324153A (en) Charging method and system
CN107483217A (en) A kind of online charging method and system
CN111080285A (en) Mobile communication application payment platform and payment method thereof
CN108809666B (en) Method, device and equipment for online charging of flow
CN107220818A (en) online payment method and device
CN111583030A (en) Payment routing method and device
TWM583975U (en) Automatic mobile payment service system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20180216

RJ01 Rejection of invention patent application after publication