CN111597246A - Bill generation method and device, storage medium and electronic equipment - Google Patents

Bill generation method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN111597246A
CN111597246A CN202010467999.6A CN202010467999A CN111597246A CN 111597246 A CN111597246 A CN 111597246A CN 202010467999 A CN202010467999 A CN 202010467999A CN 111597246 A CN111597246 A CN 111597246A
Authority
CN
China
Prior art keywords
user
interface
order
called
requested
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.)
Granted
Application number
CN202010467999.6A
Other languages
Chinese (zh)
Other versions
CN111597246B (en
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.)
Beijing Jindi Technology Co Ltd
Original Assignee
Beijing Jindi 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 Beijing Jindi Technology Co Ltd filed Critical Beijing Jindi Technology Co Ltd
Priority to CN202010467999.6A priority Critical patent/CN111597246B/en
Publication of CN111597246A publication Critical patent/CN111597246A/en
Application granted granted Critical
Publication of CN111597246B publication Critical patent/CN111597246B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2457Query processing with adaptation to user needs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/604Tools and structures for managing or administering access control systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0283Price estimation or determination
    • G06Q30/0284Time or distance, e.g. usage of parking meters or taximeters
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2141Access rights, e.g. capability lists, access control lists, access tables, access matrices

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Data Mining & Analysis (AREA)
  • Strategic Management (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Computer Hardware Design (AREA)
  • Automation & Control Theory (AREA)
  • Software Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Computer Security & Cryptography (AREA)
  • Game Theory and Decision Science (AREA)
  • Computational Linguistics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • Computer And Data Communications (AREA)
  • Storage Device Security (AREA)

Abstract

The embodiment of the disclosure discloses a bill generation method and device, a storage medium and an electronic device, wherein the method comprises the following steps: receiving an interface calling request of at least one user, and determining whether the at least one user has the calling authority of the interface which is requested to be called; responding to the calling authority of the interface which is requested to be called of at least one user, calling the interface which is requested to be called of at least one user, generating an order key word corresponding to the interface which is requested to be called of at least one user, and determining key value information of the order key word; and generating a bill of at least one user based on the key value information of the order key words corresponding to the interface called by the request of the at least one user. The method and the device for processing the interface information mark utilize the order keywords to mark the interface information called by a large number of users, determine the bill of the users based on the key value information of the keywords, solve the problems that platform avalanche and the like are easy to cause when the number and the frequency of calling the interface information by the platform users are increased sharply, and effectively improve the speed of processing the interface information on line.

Description

Bill generation method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of computers, and in particular, to a method and an apparatus for generating a bill, a storage medium, and an electronic device.
Background
The client side of the Internet platform has a large number of interfaces with different dimension information, tens of thousands of users call the required dimension information through the interfaces every day, and the Internet platform can generate corresponding bills aiming at the interfaces called by the users the previous day the next day.
In carrying out the present disclosure, the inventors found that: in the prior art, when the number and frequency of calling dimension information by a platform user sharply increase, platform avalanche is easily caused, and irreparable loss is caused to the platform.
Disclosure of Invention
The present disclosure is proposed to solve the above technical problems. The embodiment of the disclosure provides a bill generation method and device, a storage medium and an electronic device.
According to an aspect of an embodiment of the present disclosure, there is provided a bill generation method including:
receiving an interface calling request of at least one user, and determining whether the at least one user has the calling authority of the interface which is requested to be called;
responding to the calling authority of the interface which is requested to be called of the at least one user, calling the interface which is requested to be called of the at least one user, generating an order keyword corresponding to the interface which is requested to be called of the at least one user, and determining key value information of the order keyword;
and generating a bill of the at least one user based on the key value information of the order key words corresponding to the interface called by the at least one user request.
Optionally, the receiving an interface invocation request of at least one user, and determining whether the at least one user has an invocation authority of the interface invocation request includes:
receiving an interface calling request of at least one user, and generating an interface calling request parameter of the at least one user;
and determining whether the at least one user has the calling authority of the interface requested to be called based on the interface calling request parameter of the at least one user.
Optionally, the determining whether the at least one user has the invocation authority of the interface requested to be invoked based on the interface invocation request parameter of the at least one user includes:
determining whether the interface calling request parameters of the at least one user comprise one or more of order parameters, network address parameters and interface parameters based on the interface calling request parameters of the at least one user;
and in response to the interface call request parameters of the at least one user including one or more of order parameters, network address parameters and interface parameters, determining whether the at least one user has call authority of the interface requested to be called.
Optionally, the determining whether the at least one user has a call authority of the interface requested to be called in response to the interface call request parameter of the at least one user including an order parameter, a network address parameter, and an interface parameter includes:
determining whether the order parameters of the at least one user are matched with the order information of the at least one user pre-stored in the database;
in response to the at least one user's order parameters matching the at least one user's order information pre-stored in the database, determining whether the at least one user's network address parameters match the at least one user's network address information pre-stored in the database;
in response to the fact that the network address parameter of the at least one user is matched with the network address information of the at least one user pre-stored in the database, determining whether the interface parameter called by the at least one user is matched with an interface identifier corresponding to the order information of the at least one user pre-stored in the database;
responding to the matching of the interface parameters called by the at least one user and the interface identification corresponding to the at least one user's order information prestored in the database, and determining the interface residual query quantity of the at least one user;
if the interface residual query quantity of the at least one user is larger than a preset value, the at least one user has an interface calling authority; otherwise, the at least one user does not have the invocation authority of the interface requesting the invocation.
Optionally, if the remaining query quantity of the interface of the at least one user is greater than a preset value, the at least one user has a call permission of the interface requested to be called; otherwise, the at least one user does not have the calling authority of the interface requesting to be called, and the method comprises the following steps:
determining the interface residual query quantity of the at least one user based on the at least one user's order information prestored in the database;
if the interface residual query quantity of the at least one user is larger than a preset value, the keywords corresponding to the order parameters of the at least one user are order keywords, and the at least one user has the calling authority of the interface requested to be called;
if the remaining query quantity of the interface of the at least one user is less than or equal to a preset value, the keyword corresponding to the order parameter of the at least one user is a limiting keyword, and the at least one user does not have the calling authority of the interface requested to be called.
Optionally, the pre-stored order information of at least one user includes any one or more of the following items: user identification, order identification, allowed call interface start-stop time, order billing type, and interface maximum calls per minute.
Optionally, the order billing type includes any one or more of the following: individual per day charging, overall per day charging, individual per year charging, overall per year charging, and per time charging.
Optionally, if the order type of the at least one user is pay-per-time, pay-per-day-individual-charge or pay-per-year-individual-charge;
the responding to the at least one user having the calling authority of the interface requested to be called, calling the interface requested to be called by the at least one user, generating an order keyword corresponding to the interface requested to be called by the at least one user, and determining key value information of the order keyword, includes:
generating order keywords corresponding to the interface requested to be called by the at least one user based on order parameters in the interface calling request parameters of the at least one user;
and determining the key value information of the order keywords corresponding to the interface requested to be called by the at least one user based on the interface parameters in the interface calling request parameters of the at least one user.
Optionally, if the order type of the at least one user is the integral charging per day or the integral charging per year;
the responding to the at least one user having the calling authority of the interface requested to be called, calling the interface requested to be called by the at least one user, generating an order keyword corresponding to the interface requested to be called by the at least one user, and determining key value information of the order keyword, includes:
generating order keywords corresponding to the interface requested to be called by the at least one user based on order parameters in the interface calling request parameters of the at least one user;
obtaining pre-stored order information of the at least one user in the database, and generating preset keywords of the at least one user;
and matching at least one current-day keyword of the at least one user based on the preset keyword of the at least one user, and determining key value information of the at least one order keyword.
Optionally, the generating a bill of the at least one user based on key value information of an order keyword corresponding to the interface called by the at least one user request includes:
determining the number of the interfaces effectively called by the at least one user on the current day and the price of the interfaces effectively called on the basis of key value information of order keywords corresponding to the interfaces requested to be called by the at least one user;
and generating a bill of the at least one user at a preset time point of the next day based on the number of the interfaces effectively called by the at least one user on the current day and the price of the interfaces effectively called.
Optionally, after generating the bill of the at least one user based on the key value information of the order keyword corresponding to the interface called by the at least one user request, the method further includes:
after the bill of the at least one user is generated, storing the times of effectively calling the interface and the generated cost of the interface of the at least one user on the current day into the database;
and calculating the account balance of each user according to the charging type, and storing the account balance of each user into the database.
Optionally, after generating the bill of the at least one user based on the key value information of the order keyword corresponding to the interface called by the at least one user request, the method further includes: and after the bill of the at least one user is generated at the preset time point of the next day, deleting the order key words of the at least one user and the key value information of the order key words.
Optionally, the method further comprises: and if the interface calling times per minute of the at least one user is greater than the maximum calling times per minute of the order interface, pausing the interface calling request of the at least one user and sending prompt information to the at least one user.
Optionally, the method further comprises: the method further includes, between the generating of the order keyword corresponding to the interface requested to be called by the at least one user, and determining key value information of the order keyword and key value information of the order keyword corresponding to the interface requested to be called based on the at least one user, and generating a bill of the at least one user: and caching the order keywords corresponding to the interface requested to be called by the at least one user and the key value information of the order keywords by using message middleware so as to realize asynchronous processing of the interface calling request parameters of the at least one user.
According to an aspect of an embodiment of the present disclosure, there is provided a bill generation apparatus including:
the device comprises a first determination module, a second determination module and a third determination module, wherein the first determination module is used for receiving an interface calling request of at least one user and determining whether the at least one user has the calling authority of the interface which is requested to be called;
the second determining module is used for responding to the calling authority of the interface which is requested to be called by the at least one user, calling the interface which is requested to be called by the at least one user, generating an order keyword corresponding to the interface which is requested to be called by the at least one user, and determining key value information of the order keyword;
and the generating module is used for generating a bill of the at least one user based on the key value information of the order key words corresponding to the interface called by the at least one user request.
Optionally, the first determining module includes:
the first generation submodule is used for receiving an interface calling request of at least one user and generating an interface calling request parameter of the at least one user;
and the first determining submodule is used for determining whether the at least one user has the calling authority of the interface requested to be called or not based on the interface calling request parameter of the at least one user.
Optionally, the first determining sub-module includes:
the first determining unit is used for determining whether the interface calling request parameters of the at least one user comprise one or more of order parameters, network address parameters and interface parameters based on the interface calling request parameters of the at least one user;
and the second determining unit is used for responding to the interface calling request parameter of the at least one user, wherein the interface calling request parameter comprises one or more of an order parameter, a network address parameter and an interface parameter, and determining whether the at least one user has the calling authority of the interface requested to be called.
Optionally, the second determining unit is specifically configured to:
determining whether the order parameters of the at least one user are matched with the order information of the at least one user pre-stored in the database;
in response to the at least one user's order parameters matching the at least one user's order information pre-stored in the database, determining whether the at least one user's network address parameters match the at least one user's network address information pre-stored in the database; and/or
In response to the fact that the network address parameter of the at least one user is matched with the network address information of the at least one user pre-stored in the database, determining whether the interface parameter called by the at least one user is matched with an interface identifier corresponding to the order information of the at least one user pre-stored in the database; and/or
Responding to the matching of the interface parameters called by the at least one user and the interface identification corresponding to the at least one user's order information prestored in the database, and determining the interface residual query quantity of the at least one user;
if the interface residual query quantity of the at least one user is larger than a preset value, the at least one user has an interface calling authority; otherwise, the at least one user does not have the invocation authority of the interface requesting the invocation.
Optionally, the pre-stored order information of at least one user includes any one or more of the following items: user identification, order identification, allowed call interface start-stop time, order billing type, and interface maximum calls per minute.
Optionally, the order billing type includes any one or more of the following: individual per day charging, overall per day charging, individual per year charging, overall per year charging, and per time charging.
Optionally, if the order type of the at least one user is pay-per-time, pay-per-day-individual-charge or pay-per-year-individual-charge;
the second determining module includes:
the second generation submodule is used for generating order keywords corresponding to the interface which is requested to be called by the at least one user based on the order parameters in the interface calling request parameters of the at least one user;
and the second determining submodule is used for determining the key value information of the order keyword corresponding to the interface requested to be called by the at least one user based on the interface parameter in the interface calling request parameters of the at least one user.
Optionally, if the order type of the at least one user is the integral charging per day or the integral charging per year;
the second determining module includes:
a third generation submodule, configured to generate an order keyword corresponding to the interface requested to be called by the at least one user based on an order parameter in the interface calling request parameter of the at least one user;
the fourth generation submodule is used for acquiring pre-stored order information of the at least one user in the database and generating preset keywords of the at least one user;
and the third determining submodule is used for matching at least one current-day keyword of the at least one user based on the preset keyword of the at least one user and determining the key value information of the at least one order keyword.
Optionally, the generating module includes:
the fourth determining submodule is used for determining the number of the interfaces effectively called by the at least one user on the day and the price of the effectively called interfaces based on the key value information of the order keywords corresponding to the interfaces requested to be called by the at least one user;
and the fifth generation submodule is used for generating the bill of the at least one user at the preset time point of the next day based on the number of the interfaces effectively called by the at least one user on the current day and the price of the effectively called interfaces.
Optionally, after the generating module, the method further includes:
the first storage module is used for storing the times of effectively calling the interface and the generated cost of the at least one user in the current day into the database after the bill of the at least one user is generated;
and the second storage module is used for calculating the account balance of each user according to the charging type and storing the account balance of each user into the database.
Optionally, after the generating module, the method further includes: and the deleting module is used for deleting the order key words of the at least one user and the key value information of the order key words after the bill of the at least one user is generated at the preset time point of the next day.
Optionally, the method further comprises: and the pause module is used for pausing the interface calling request of the at least one user and sending prompt information to the at least one user if the interface calling times per minute of the at least one user is greater than the maximum calling times per minute of the order interface.
Optionally, between the second determining module and the generating module, further comprising: and the cache module is used for caching the order keywords corresponding to the interface requested to be called by the at least one user and the key value information of the order keywords by using message middleware so as to realize asynchronous processing of the interface calling request parameters of the at least one user.
According to still another aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium storing a computer program for executing the bill generation method according to any of the embodiments.
According to still another aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including:
a processor;
a memory for storing the processor-executable instructions;
the processor is configured to read the executable instructions from the memory and execute the instructions to implement the bill generation method according to any of the above embodiments.
Based on the bill generation method and device, the storage medium and the electronic device provided by the above embodiments of the present disclosure, an interface call request of at least one user is received, and whether the at least one user has a call authority of the interface requested to be called is determined; responding to the calling authority of the interface which is requested to be called of at least one user, calling the interface which is requested to be called of at least one user, generating an order key word corresponding to the interface which is requested to be called of at least one user, and determining key value information of the order key word; and generating a bill of at least one user based on the key value information of the order key words corresponding to the interface called by the request of the at least one user. The method and the device for processing the interface information mark utilize the order keywords to mark the interface information called by a large number of users, determine the bill of the users based on the key value information of the keywords, solve the problems that platform avalanche and the like are easy to cause when the number and the frequency of calling the interface information by the platform users are increased sharply, and effectively improve the speed of processing the interface information on line.
The technical solution of the present disclosure is further described in detail by the accompanying drawings and examples.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent by describing in more detail embodiments of the present disclosure with reference to the attached drawings. The accompanying drawings are included to provide a further understanding of the embodiments of the disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the principles of the disclosure and not to limit the disclosure. In the drawings, like reference numbers generally represent like parts or steps.
Fig. 1 is a schematic flow chart of a bill generation method according to an exemplary embodiment of the present disclosure.
Fig. 2 is a flowchart illustrating a bill generation method according to another exemplary embodiment of the present disclosure.
Fig. 3 is a flowchart illustrating a bill generation method according to another exemplary embodiment of the present disclosure.
Fig. 4 is a flowchart illustrating a bill generation method according to still another exemplary embodiment of the present disclosure.
Fig. 5 is a flowchart illustrating a bill generation method according to another exemplary embodiment of the present disclosure.
Fig. 6 is a flowchart illustrating a bill generation method according to still another exemplary embodiment of the present disclosure.
Fig. 7 is a schematic structural diagram of a bill generation apparatus according to an exemplary embodiment of the present disclosure.
Fig. 8 is a block diagram of an electronic device provided in an exemplary embodiment of the present disclosure.
Detailed Description
Hereinafter, example embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. It is to be understood that the described embodiments are merely a subset of the embodiments of the present disclosure and not all embodiments of the present disclosure, with the understanding that the present disclosure is not limited to the example embodiments described herein.
It should be noted that: the relative arrangement of the components and steps, the numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.
It will be understood by those of skill in the art that the terms "first," "second," and the like in the embodiments of the present disclosure are used merely to distinguish one element from another, and are not intended to imply any particular technical meaning, nor is the necessary logical order between them.
It is also understood that in embodiments of the present disclosure, "a plurality" may refer to two or more and "at least one" may refer to one, two or more.
It is also to be understood that any reference to any component, data, or structure in the embodiments of the disclosure, may be generally understood as one or more, unless explicitly defined otherwise or stated otherwise.
In addition, the term "and/or" in the present disclosure is only one kind of association relationship describing an associated object, and means that three kinds of relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" in the present disclosure generally indicates that the former and latter associated objects are in an "or" relationship.
It should also be understood that the description of the various embodiments of the present disclosure emphasizes the differences between the various embodiments, and the same or similar parts may be referred to each other, so that the descriptions thereof are omitted for brevity.
Meanwhile, it should be understood that the sizes of the respective portions shown in the drawings are not drawn in an actual proportional relationship for the convenience of description.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
The disclosed embodiments may be applied to electronic devices such as terminal devices, computer systems, servers, etc., which are operational with numerous other general purpose or special purpose computing system environments or configurations. Examples of well known terminal devices, computing systems, environments, and/or configurations that may be suitable for use with electronic devices, such as terminal devices, computer systems, servers, and the like, include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, hand-held or laptop devices, microprocessor-based systems, set top boxes, programmable consumer electronics, network pcs, minicomputer systems, mainframe computer systems, distributed cloud computing environments that include any of the above systems, and the like.
Electronic devices such as terminal devices, computer systems, servers, etc. may be described in the general context of computer system-executable instructions, such as program modules, being executed by a computer system. Generally, program modules may include routines, programs, objects, components, logic, data structures, etc. that perform particular tasks or implement particular abstract data types. The computer system/server may be practiced in distributed cloud computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed cloud computing environment, program modules may be located in both local and remote computer system storage media including memory storage devices.
Fig. 1 is a schematic flow chart of a bill generation method according to an exemplary embodiment of the present disclosure. The embodiment can be applied to an electronic device, as shown in fig. 1, and includes the following steps:
s102, receiving an interface calling request of at least one user, and determining whether the at least one user has the calling authority of the interface requested to be called.
Wherein, the interface call request is used for representing the dimension information of the main body which the user wants to inquire through the interface, such as: profile information for a querying listed company a entered by a user in a listed company profile interface is received.
S104, responding to the calling authority of the interface which is requested to be called of at least one user, calling the interface which is requested to be called of at least one user, generating order keywords corresponding to the interface which is requested to be called of at least one user, and determining key value information of the order keywords.
The order key words can be expressed as key order: + currTimeStr + ":" + authModel. getOrgId (), wherein order: order represents the order generated by the user calling interface, currTimeStr represents the order date, and authModel. getOrgId () represents the user identification in the user order information in the database. The key value information value may include: the order identification authId, the total cost, the interface identification fId, the interface price fPrice, the user identification orgId and the effective calling interface number pageCount.
And S106, generating a bill of at least one user based on the key value information of the order key words corresponding to the interface called by the request of the at least one user.
In a specific embodiment, a request of a user 1 for calling shareholder information interfaces of companies A and B is received, when the user 1 is determined to have the calling right of the request for calling the shareholder information interface, the interface of the shareholder information requested to be called by the user 1 is called, an order key1 generated by the user 1 for calling the shareholder information interface of the company A and key value information 1 of the order key are obtained, and the order key2 generated by the user 1 for calling the shareholder information interface of the company B is obtained, and the key value information 2 of the order key is determined; and generating the bill of the user 1 based on the key value information values 1 and 2 of the order key words corresponding to the stockholder information interface requested to be called by the user 1.
Based on the bill generation method provided by the above embodiment of the present disclosure, an interface call request of at least one user is received, and whether the at least one user has a call authority of the interface requested to be called is determined; responding to the calling authority of the interface which is requested to be called of at least one user, calling the interface which is requested to be called of at least one user, generating an order key word corresponding to the interface which is requested to be called of at least one user, and determining key value information of the order key word; and generating a bill of at least one user based on the key value information of the order key words corresponding to the interface called by the request of the at least one user. The method and the device for processing the interface information mark utilize the order keywords to mark the interface information called by a large number of users, determine the bill of the users based on the key value information of the keywords, solve the problems that platform avalanche and the like are easy to cause when the number and the frequency of calling the interface information by the platform users are increased sharply, and effectively improve the speed of processing the interface information on line.
As shown in fig. 2, based on the embodiment shown in fig. 1, step S102 may specifically include the following steps:
s201, receiving an interface calling request of at least one user, and generating an interface calling request parameter of the at least one user.
The interface call request parameter may include any one or more of: an interface parameter URL, an order parameter AUTHID, and an IP network address parameter.
S202, determining whether at least one user has the calling authority of the interface requested to be called based on the interface calling request parameter of at least one user.
When receiving an interface calling request of a user, the disclosed embodiment triggers a user permission verification function in the system, can quickly verify the interface permission of the user according to the generated interface calling request parameter, and obviously accelerates the corresponding speed when the system calls the interface.
As shown in fig. 3, based on the embodiment shown in fig. 2, the step S202 may specifically include the following steps:
s301, determining whether the interface calling request parameters of the at least one user comprise one or more of order parameters, network address parameters and interface parameters based on the interface calling request parameters of the at least one user.
In which the user may request the wrong interface or the interface that has been iteratively disabled, resulting in the failure to generate the interface parameter URL, when the system fails to generate the complete interface call request parameter, an error code miss _ PARAM ("300008", "lack of necessary parameter") is returned.
S302, in response to the interface call request parameter of at least one user including one or more of an order parameter, a network address parameter and an interface parameter, determining whether the at least one user has a call authority of the interface requested to be called.
The embodiment of the disclosure may determine whether at least one user has the call authority of the interface requested to be called only according to the order parameter, or may determine whether at least one user has the call authority of the interface requested to be called according to the order parameter, the network address parameter, and the interface parameter.
For example, when the interface call request parameters of the user include the order parameter AUTHID, the network address parameter IP, and the interface parameter URL, it is continuously determined whether these 3 parameters generated by the user match the information in the order contract of the user stored in the database (e.g., MySQL), respectively, that is, whether the user has the call authority of the interface requested to be called.
As shown in fig. 4, based on the embodiment shown in fig. 3, the step S302 may specifically include the following steps:
s401, determining whether the order parameters of at least one user are matched with the order information of at least one user pre-stored in the database.
The at least one user's order information pre-stored in the database may include any one or more of the following items: the interface calling method comprises the following steps of user identification, order identification, starting and stopping time of allowed calling of an interface, order charging type, maximum calling times per minute of the interface, maximum calling times of the interface, interface identification and maximum calling times of the interface every day. The order charging type may include any one or more of the following items: individual per day charging, overall per day charging, individual per year charging, overall per year charging, and per time charging.
For example, the ORDER time in the ORDER parameter generated by the user 1 calling the interface a is 2019, 5 months and 5 days, but the start-stop time of the allowed calling interface in the ORDER information which is prestored in the query database and can be called by the user 1 is 2019, 1 months and 1 days to 2019, 3 months and 1 days, so that the user 1 does not have the authority of calling the interface a, the system returns ORDER _ ERROR ("300009", "account information is wrong"), and displays the information of the ORDER charging type, the charge by times, the start-stop time of the calling interface, the ORDER charging type, the charge by times, the charge by the calling interface, and the like of the user 1, which are prestored in the database, about the interface a, from 2019, 1 months and 1 days to 2019, 3 months and 1 days, when data is not returned, and when the same main body information is repeatedly called within 3 hours.
S402, responding to the fact that the order parameters of the at least one user are matched with the order information of the at least one user pre-stored in the database, and determining whether the network address parameters of the at least one user are matched with the network address information of the at least one user pre-stored in the database.
Wherein one user can bind a plurality of network address parameters IP.
For example, when the order parameter of user 1 matches the order information of user 1 pre-stored in the database, it is continuously determined whether the currently used network address parameter IP of user 1 matches each network address information of user 1 binding pre-stored in the database, and if not, the forbid ("300005", "no right access to this api") is returned.
And S403, in response to the fact that the network address parameter of the at least one user is matched with the network address information of the at least one user pre-stored in the database, determining whether the interface parameter called by the at least one user is matched with the interface identifier corresponding to the order information of the at least one user pre-stored in the database.
For example, when the network address parameter of the user 1 matches with the network address information of the user 1 pre-stored in the database, the interface parameter URL called by the user 1 is continuously determined: interface identification corresponding to shareholder information and order information of the user 1 prestored in the database: if the business information does NOT match, the URL _ NOT _ FOUND ("300010", "URL does NOT exist") is returned.
S404, in response to the fact that the interface parameters called by the at least one user are matched with the interface identifiers corresponding to the at least one user 'S order information and pre-stored in the database, determining the residual query quantity of the at least one user' S interface.
S405, if the interface residual query quantity of at least one user is larger than a preset value, at least one user has an interface calling authority; otherwise, at least one user does not have the invocation authority of the interface requesting the invocation.
The preset value can be any integer, such as 0, 1, -1, etc.
In a specific example, when the interface parameter X called by the user 1 is matched with an interface parameter allowed to be called in interface order information of the user 1 pre-stored in a database, the current remaining query number of the interface of the user 1, that is, the number of times of allowing the interface parameter X to be called is continuously determined, and if the remaining query number of the interface of the user 1 is not 0, the user 1 has a calling authority for calling the interface parameter X; otherwise, the user 1 does not have the calling authority to call the interface parameter X.
As shown in fig. 5, based on the embodiment shown in fig. 4, step S405 may specifically include the following steps:
s501, determining the residual query quantity of the interface of at least one user based on at least one user' S order information prestored in the database.
S502, if the residual query quantity of the interface of at least one user is larger than a preset value, the keyword corresponding to the order parameter of at least one user is an order keyword, and at least one user has the calling authority of the interface requested to be called.
S503, if the residual query quantity of the interface of the at least one user is less than or equal to the preset value, the keyword corresponding to the order parameter of the at least one user is a limiting keyword, and the at least one user does not have the calling authority of the interface requested to be called.
Wherein the restriction keyword is used to indicate that the number of queries prompting the user has been the maximum.
For example, if the charging type of the user is per-time charging, check whether the keyword key corresponding to the user order parameter is a limiting keyword: "money: limit:" + authmodel. getOrgId () + ": bycount", if yes, the balance of the user is insufficient and does not have the calling authority of the interface requesting calling.
Further, if the user's billing type is individual yearly billing, its individual yearly restriction keyword may be expressed as: key (num: limit: "+ authId +": "+ fId +": byday: single). If the charging type of the user is individual charging by day, the individual restriction key word by day can be expressed as: key (num: limit: "+ authId +": "+ fId +": byyear: single). If the charging type of the user is the annual whole charging, the annual whole limiting keyword can be expressed as: key (num: limit: "+ authId +": byday: entity). If the charging type of the user is the integral charging by day, the integral limiting key word by day can be expressed as: key (num: limit: "+ authId +": byyear: entity).
In an exemplary embodiment, the order billing type of the order information 001 pre-stored in the database of the user 2 is the daily total billing, the maximum query number LIMIT of the interface A, B, C which allows call and corresponds to the order information 001 is 10 times, the user 2 is completely used, that is, the remaining query number is 0, when the user 2 sends the request for calling the interface a again, the system detects that the keyword corresponding to the order parameter 001 of the user 2 in the middleware is the LIMIT keyword, and sends the user 2 error code ORG _ COUNT _ LIMIT ("300007", "remaining number is insufficient"). The specific limiting keyword corresponding to the order information 2 may be represented as: key (num: limit: "+ authId +": byyear: entity). Therefore, the embodiment of the disclosure can determine whether the interface requested to be called by the user reaches the limit by using the limit keyword, so that whether the user has the authority to call the interface can be quickly determined, and the problems that the interface parameters cannot be subjected to fuzzy matching when the interface information is cached and the like can be solved.
In some optional embodiments, if the order type of the at least one user is pay-per-time, pay-per-day-individual-charge, or pay-per-year-individual-charge, step S104 may specifically include the following steps:
s1041, generating order keywords corresponding to the interface requested to be called by the at least one user based on the order parameters in the interface calling request parameters of the at least one user.
And S1042, determining the key value information of the order keyword corresponding to the interface requested to be called by the at least one user based on the interface parameter in the interface calling request parameter of the at least one user.
In an exemplary embodiment, if the order charging type of user 1 in the database is pay-per-view, based on the order parameter 001 generated when user 1 calls interface a, the order keyword Key1 corresponding to the order parameter 001 of user 1 is generated: and if the user 1 continues to call the interface B, generating an order keyword Key2 corresponding to the order parameter 002 of the user 1, and determining Key value information value1, value2 and value3 of each keyword.
In addition, the system can also determine how much money cost each spends according to each interface parameter of the user 1, after accumulating the total cost of a plurality of interfaces, inquire how much the current balance is in the database, after subtracting the current balance and the total cost, if the difference is negative, generate a restriction keyword, and make the restriction keyword: "money: LIMIT:" + authmodel. getOrgId () + ": bycount" is cached (e.g., may be cached in a remote dictionary service, redis) and returned to the system ORG _ BALANCE _ LIMIT ("300006", "insufficient BALANCE") to notify the user that the account BALANCE is insufficient.
In some optional embodiments, if the order type of the at least one user is a daily or annual total charge. Step S104 may specifically include the following steps:
and S1043, generating order keywords corresponding to the interface requested to be called by the at least one user based on the order parameters in the interface calling request parameters of the at least one user.
S1044, obtaining the pre-stored order information of at least one user in the database, and generating the preset keywords of the at least one user.
S1045, matching at least one keyword of the current day of at least one user based on the preset keyword of the at least one user, and determining the key value information of the at least one order keyword.
Specifically, an interface which is allowed to be called by each client is obtained from all user sets of the database, a preset keyword key of each user is generated and matched with the order keyword key of each user, and key value information of the order keyword of each user is determined.
In a specific example, if the order charging type of user 2 in the database is the daily total charging, i.e. user 2 can call the interface A, B, C on the same day with the maximum limit of 20 query times, the order parameter 01 generated when user 2 calls the interface a, and generate the order keyword Key1 corresponding to the order parameter 01 of user 2,
based on the order keyword Key1, the system queries a database about preset keywords corresponding to all pre-stored order information of the user 2, and when the order information allowing the user 2 to call the interface a is matched, generates Key value information value1 corresponding to the order keyword Key 1.
As shown in fig. 6, on the basis of the embodiment shown in fig. 1, the step S106 may specifically include the following steps:
s601, determining the number of the interfaces effectively called by at least one user on the current day and the price of the interfaces effectively called on the current day based on the key value information of the order keywords corresponding to the interfaces requested to be called by at least one user.
For example, when the user 1 calls the business information dimension interface a twice within a certain hour to query the business information of company H, the number of the effective calling interfaces is 1.
S602, generating a bill of at least one user at a preset time point of the next day based on the number of the interfaces effectively called by the at least one user on the current day and the price of the interfaces effectively called.
In an exemplary embodiment, since the system presets time for generating an order in the morning of the next day in a half-and-a-half manner, the system does not clear the order keywords cached on the next day 00:00:00-01:30:00, and thus, based on all the order keywords key1, key2 of the user 1 on the current day and the order keywords key3 generated on the next working day 00:00: 00:00-01:30:00, the key value information value1, value2, and value3 of each keyword can be determined. And calculating the total cost of the user 1 based on the effective calling number, pagecount and each interface price, fprice, and generating the bill of the user 1.
In some optional embodiments, step S106 may be further followed by: after the bill of at least one user is generated, storing the times of effectively calling the interface and the generated cost of the interface of the at least one user on the day into the database; and calculating the account balance of each user according to the charging type, and storing the account balance of each user into a database.
In some optional embodiments, step S106 may be further followed by: and after the bill of at least one user is generated at a preset time point, deleting the order keywords of the at least one user and the key value information of the order keywords so as to improve the running speed of the system.
In some optional implementations, embodiments of the present disclosure may further include: if the interface invocation times per minute of the at least one user is greater than the maximum invocation times per minute of the order interface, the interface invocation request of the at least one user is suspended and a prompt message is sent to the at least one user, such as a return user FREQUENCY _ LIMIT ("300004", "access FREQUENCY too fast").
In some optional embodiments, between step S104 and step S106, there may be further included: and caching the order keywords corresponding to the interface requested to be called by the at least one user and the key value information of the order keywords by using message middleware (such as Kafka) so as to realize asynchronous processing of the interface calling request parameters of the at least one user.
Any of the bill generation methods provided by embodiments of the present disclosure may be performed by any suitable device having data processing capabilities, including but not limited to: terminal equipment, a server and the like. Alternatively, any of the bill generation methods provided by the embodiments of the present disclosure may be executed by a processor, for example, the processor may execute any of the bill generation methods mentioned by the embodiments of the present disclosure by calling a corresponding instruction stored in a memory. And will not be described in detail below.
Fig. 7 is a schematic structural diagram of a bill generation apparatus according to an exemplary embodiment of the present disclosure. The device can be arranged in electronic equipment such as terminal equipment and a server and executes the bill generation method of any embodiment of the disclosure. As shown in fig. 7, the apparatus includes:
a first determining module 71, configured to receive an interface invocation request of at least one user, and determine whether the at least one user has an invocation authority of an interface requested to be invoked;
a second determining module 72, configured to respond to that the at least one user has a call permission of the interface requested to be called, call the interface requested to be called by the at least one user, generate an order keyword corresponding to the interface requested to be called by the at least one user, and determine key value information of the order keyword;
and the generating module 73 is configured to generate a bill of the at least one user based on key value information of the order keyword corresponding to the interface requested to be called by the at least one user.
The bill generation device provided by the above embodiment of the present disclosure receives an interface call request of at least one user, and determines whether the at least one user has a call authority of the interface requested to be called; responding to the calling authority of the interface which is requested to be called of at least one user, calling the interface which is requested to be called of at least one user, generating an order key word corresponding to the interface which is requested to be called of at least one user, and determining key value information of the order key word; and generating a bill of at least one user based on the key value information of the order key words corresponding to the interface called by the request of the at least one user. The method and the device for processing the interface information mark utilize the order keywords to mark the interface information called by a large number of users, determine the bill of the users based on the key value information of the keywords, solve the problems that platform avalanche and the like are easy to cause when the number and the frequency of calling the interface information by the platform users are increased sharply, and effectively improve the speed of processing the interface information on line.
Optionally, the first determining module 71 includes:
the first generation submodule is used for receiving an interface calling request of at least one user and generating an interface calling request parameter of the at least one user;
and the first determining submodule is used for determining whether the at least one user has the calling authority of the interface requested to be called or not based on the interface calling request parameter of the at least one user.
Optionally, the first determining submodule 71 includes:
the first determining unit is used for determining whether the interface calling request parameters of the at least one user comprise one or more of order parameters, network address parameters and interface parameters based on the interface calling request parameters of the at least one user;
and the second determining unit is used for responding to the interface calling request parameter of the at least one user, wherein the interface calling request parameter comprises one or more of an order parameter, a network address parameter and an interface parameter, and determining whether the at least one user has the calling authority of the interface requested to be called.
Optionally, the second determining unit is specifically configured to:
determining whether the order parameters of the at least one user are matched with the order information of the at least one user pre-stored in the database;
in response to the at least one user's order parameters matching the at least one user's order information pre-stored in the database, determining whether the at least one user's network address parameters match the at least one user's network address information pre-stored in the database; and/or
In response to the fact that the network address parameter of the at least one user is matched with the network address information of the at least one user pre-stored in the database, determining whether the interface parameter called by the at least one user is matched with an interface identifier corresponding to the order information of the at least one user pre-stored in the database; and/or
Responding to the matching of the interface parameters called by the at least one user and the interface identification corresponding to the at least one user's order information prestored in the database, and determining the interface residual query quantity of the at least one user;
if the interface residual query quantity of the at least one user is larger than a preset value, the at least one user has an interface calling authority; otherwise, the at least one user does not have the invocation authority of the interface requesting the invocation.
In some embodiments, the pre-stored order information of at least one user includes any one or more of the following: user identification, order identification, allowed call interface start-stop time, order billing type, and interface maximum calls per minute.
In some embodiments, the order billing type includes any one or more of the following: individual per day charging, overall per day charging, individual per year charging, overall per year charging, and per time charging.
In some embodiments, if the order type of the at least one user is pay-per-use, pay-per-day-individual, or pay-per-year-individual;
the second determining module includes:
the second generation submodule is used for generating order keywords corresponding to the interface which is requested to be called by the at least one user based on the order parameters in the interface calling request parameters of the at least one user;
and the second determining submodule is used for determining the key value information of the order keyword corresponding to the interface requested to be called by the at least one user based on the interface parameter in the interface calling request parameters of the at least one user.
In some embodiments, if the order type of the at least one user is a daily or annual total charge;
the second determining module 72 includes:
a third generation submodule, configured to generate an order keyword corresponding to the interface requested to be called by the at least one user based on an order parameter in the interface calling request parameter of the at least one user;
the fourth generation submodule is used for acquiring pre-stored order information of the at least one user in the database and generating preset keywords of the at least one user;
and the third determining submodule is used for matching at least one current-day keyword of the at least one user based on the preset keyword of the at least one user and determining the key value information of the at least one order keyword.
In some embodiments, the generating module 73 includes:
the fourth determining submodule is used for determining the number of the interfaces effectively called by the at least one user on the day and the price of the effectively called interfaces based on the key value information of the order keywords corresponding to the interfaces requested to be called by the at least one user;
and the fifth generation submodule is used for generating the bill of the at least one user at the preset time point of the next day based on the number of the interfaces effectively called by the at least one user on the current day and the price of the effectively called interfaces.
In some embodiments, after the generating module 73, the method further includes:
the first storage module is used for storing the times of effectively calling the interface and the generated cost of the at least one user in the current day into the database after the bill of the at least one user is generated;
and the second storage module is used for calculating the account balance of each user according to the charging type and storing the account balance of each user into the database.
In some embodiments, after the generating module 73, the method further includes: and the deleting module is used for deleting the order key words of the at least one user and the key value information of the order key words after the bill of the at least one user is generated at the preset time point of the next day.
In some embodiments, the method further comprises: and the pause module is used for pausing the interface calling request of the at least one user and sending prompt information to the at least one user if the interface calling times per minute of the at least one user is greater than the maximum calling times per minute of the order interface.
In some embodiments, between the second determining module 72 and the generating module 73, further comprising: and the cache module is used for caching the order keywords corresponding to the interface requested to be called by the at least one user and the key value information of the order keywords by using message middleware so as to realize asynchronous processing of the interface calling request parameters of the at least one user.
Exemplary electronic device
Next, an electronic apparatus according to an embodiment of the present disclosure is described with reference to fig. 8. The electronic device may be either or both of the first device 100 and the second device 200, or a stand-alone device separate from them that may communicate with the first device and the second device to receive the collected input signals therefrom.
FIG. 8 illustrates a block diagram of an electronic device in accordance with an embodiment of the disclosure.
As shown in fig. 8, the electronic device 80 includes one or more processors 81 and memory 82.
The processor 81 may be a Central Processing Unit (CPU) or other form of processing unit having data processing capabilities and/or instruction execution capabilities, and may control other components in the electronic device 80 to perform desired functions.
Memory 82 may include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include, for example, Random Access Memory (RAM), cache memory (cache), and/or the like. The non-volatile memory may include, for example, Read Only Memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium and executed by the processor 81 to implement the bill generation methods of the various embodiments of the present disclosure described above and/or other desired functions. Various contents such as an input signal, a signal component, a noise component, etc. may also be stored in the computer-readable storage medium.
In one example, the electronic device 80 may further include: an input device 83 and an output device 84, which are interconnected by a bus system and/or other form of connection mechanism (not shown).
For example, when the electronic device is the first device 100 or the second device 200, the input device 83 may be a microphone or a microphone array as described above for capturing an input signal of a sound source. When the electronic device is a stand-alone device, the input means 83 may be a communication network connector for receiving the acquired input signals from the first device 100 and the second device 200.
The input device 83 may also include, for example, a keyboard, a mouse, and the like.
The output device 84 may output various information including the determined distance information, direction information, and the like to the outside. The output devices 84 may include, for example, a display, speakers, a printer, and a communication network and remote output devices connected thereto, among others.
Of course, for simplicity, only some of the components of the electronic device 80 relevant to the present disclosure are shown in fig. 8, omitting components such as buses, input/output interfaces, and the like. In addition, the electronic device 80 may include any other suitable components depending on the particular application.
In addition to the above-described methods and apparatus, embodiments of the present disclosure may also be a computer program product comprising computer program instructions that, when executed by a processor, cause the processor to perform the steps in the bill generation method according to various embodiments of the present disclosure described in the "exemplary methods" section above of this specification.
The computer program product may write program code for carrying out operations for embodiments of the present disclosure in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server.
Furthermore, embodiments of the present disclosure may also be a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, cause the processor to perform the steps in the bill generation method according to various embodiments of the present disclosure described in the "exemplary methods" section above of this specification.
The computer-readable storage medium may take any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may include, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing describes the general principles of the present disclosure in conjunction with specific embodiments, however, it is noted that the advantages, effects, etc. mentioned in the present disclosure are merely examples and are not limiting, and they should not be considered essential to the various embodiments of the present disclosure. Furthermore, the foregoing disclosure of specific details is for the purpose of illustration and description and is not intended to be limiting, since the disclosure is not intended to be limited to the specific details so described.
In the present specification, the embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts in the embodiments are referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The block diagrams of devices, apparatuses, systems referred to in this disclosure are only given as illustrative examples and are not intended to require or imply that the connections, arrangements, configurations, etc. must be made in the manner shown in the block diagrams. These devices, apparatuses, devices, systems may be connected, arranged, configured in any manner, as will be appreciated by those skilled in the art. Words such as "including," "comprising," "having," and the like are open-ended words that mean "including, but not limited to," and are used interchangeably therewith. The words "or" and "as used herein mean, and are used interchangeably with, the word" and/or, "unless the context clearly dictates otherwise. The word "such as" is used herein to mean, and is used interchangeably with, the phrase "such as but not limited to".
The methods and apparatus of the present disclosure may be implemented in a number of ways. For example, the methods and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order for the steps of the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above unless specifically stated otherwise. Further, in some embodiments, the present disclosure may also be embodied as programs recorded in a recording medium, the programs including machine-readable instructions for implementing the methods according to the present disclosure. Thus, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.
It is also noted that in the devices, apparatuses, and methods of the present disclosure, each component or step can be decomposed and/or recombined. These decompositions and/or recombinations are to be considered equivalents of the present disclosure.
The previous description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects without departing from the scope of the disclosure. Thus, the present disclosure is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing description has been presented for purposes of illustration and description. Furthermore, this description is not intended to limit embodiments of the disclosure to the form disclosed herein. While a number of example aspects and embodiments have been discussed above, those of skill in the art will recognize certain variations, modifications, alterations, additions and sub-combinations thereof.

Claims (25)

1. A bill generation method, comprising:
receiving an interface calling request of at least one user, and determining whether the at least one user has the calling authority of the interface which is requested to be called;
responding to the calling authority of the interface which is requested to be called of the at least one user, calling the interface which is requested to be called of the at least one user, generating an order keyword corresponding to the interface which is requested to be called of the at least one user, and determining key value information of the order keyword;
and generating a bill of the at least one user based on the key value information of the order key words corresponding to the interface called by the at least one user request.
2. The method of claim 1, wherein receiving an interface invocation request from at least one user, determining whether the at least one user has invocation authority for the interface invocation request, comprises:
receiving an interface calling request of at least one user, and generating an interface calling request parameter of the at least one user;
and determining whether the at least one user has the calling authority of the interface requested to be called based on the interface calling request parameter of the at least one user.
3. The method of claim 2, wherein the determining whether the at least one user has invocation authority for the interface requested to be invoked based on the interface invocation request parameter of the at least one user comprises:
determining whether the interface calling request parameters of the at least one user comprise one or more of order parameters, network address parameters and interface parameters based on the interface calling request parameters of the at least one user;
and in response to the interface call request parameters of the at least one user including one or more of order parameters, network address parameters and interface parameters, determining whether the at least one user has call authority of the interface requested to be called.
4. The method of claim 3, wherein the determining whether the at least one user has invocation authority for the interface requested to be invoked in response to the interface invocation request parameter of the at least one user including one or more of an order parameter, a network address parameter, and an interface parameter comprises:
determining whether the order parameters of the at least one user are matched with the order information of the at least one user pre-stored in the database;
in response to the at least one user's order parameters matching the at least one user's order information pre-stored in the database, determining whether the at least one user's network address parameters match the at least one user's network address information pre-stored in the database; and/or
In response to the fact that the network address parameter of the at least one user is matched with the network address information of the at least one user pre-stored in the database, determining whether the interface parameter called by the at least one user is matched with an interface identifier corresponding to the order information of the at least one user pre-stored in the database; and/or
Responding to the matching of the interface parameters called by the at least one user and the interface identification corresponding to the at least one user's order information prestored in the database, and determining the interface residual query quantity of the at least one user;
if the interface residual query quantity of the at least one user is larger than a preset value, the at least one user has an interface calling authority; otherwise, the at least one user does not have the invocation authority of the interface requesting the invocation.
5. The method according to claim 4, wherein if the number of remaining queries of the interface of the at least one user is greater than a preset value, the at least one user has a call authority of the interface requested to be called; otherwise, the at least one user does not have the calling authority of the interface requesting to be called, and the method comprises the following steps:
determining the interface residual query quantity of the at least one user based on the at least one user's order information prestored in the database;
if the interface residual query quantity of the at least one user is larger than a preset value, the keywords corresponding to the order parameters of the at least one user are order keywords, and the at least one user has the calling authority of the interface requested to be called;
if the remaining query quantity of the interface of the at least one user is less than or equal to a preset value, the keyword corresponding to the order parameter of the at least one user is a limiting keyword, and the at least one user does not have the calling authority of the interface requested to be called.
6. The method according to any one of claims 1 to 5, wherein the responding to that the at least one user has a call authority for requesting the called interface, calling the called interface requested by the at least one user, generating an order keyword corresponding to the called interface requested by the at least one user, and determining key value information of the order keyword includes:
generating order keywords corresponding to the interface requested to be called by the at least one user based on order parameters in the interface calling request parameters of the at least one user;
and determining the key value information of the order keywords corresponding to the interface requested to be called by the at least one user based on the interface parameters in the interface calling request parameters of the at least one user.
7. The method according to any one of claims 1 to 5, wherein the responding to that the at least one user has a call authority for requesting the called interface, calling the called interface requested by the at least one user, generating an order keyword corresponding to the called interface requested by the at least one user, and determining key value information of the order keyword includes:
generating order keywords corresponding to the interface requested to be called by the at least one user based on order parameters in the interface calling request parameters of the at least one user;
obtaining pre-stored order information of the at least one user in the database, and generating preset keywords of the at least one user;
and matching at least one current-day keyword of the at least one user based on the preset keyword of the at least one user, and determining key value information of the at least one order keyword.
8. The method according to claim 6 or 7, wherein the generating of the bill of the at least one user based on the key value information of the order keyword corresponding to the interface called by the at least one user request comprises:
determining the number of the interfaces effectively called by the at least one user on the current day and the price of the interfaces effectively called on the basis of key value information of order keywords corresponding to the interfaces requested to be called by the at least one user;
and generating a bill of the at least one user at a preset time point of the next day based on the number of the interfaces effectively called by the at least one user on the current day and the price of the interfaces effectively called.
9. The method according to any one of claims 1 to 8, wherein after generating the bill of the at least one user based on the key value information of the order keyword corresponding to the interface called by the at least one user request, the method further comprises:
after the bill of the at least one user is generated, storing the times of effectively calling the interface and the generated cost of the interface of the at least one user on the current day into the database;
and calculating the account balance of each user according to the charging type, and storing the account balance of each user into the database.
10. The method according to any one of claims 1 to 9, wherein after generating the bill of the at least one user based on the key value information of the order keyword corresponding to the interface called by the at least one user request, the method further comprises: and after the bill of the at least one user is generated at the preset time point of the next day, deleting the order key words of the at least one user and the key value information of the order key words.
11. The method of any of claims 1-10, further comprising: and if the interface calling times per minute of the at least one user is greater than the maximum calling times per minute of the order interface, pausing the interface calling request of the at least one user and sending prompt information to the at least one user.
12. The method of any of claims 1-11, further comprising: the method further includes, between the generating of the order keyword corresponding to the interface requested to be called by the at least one user, and determining key value information of the order keyword and key value information of the order keyword corresponding to the interface requested to be called based on the at least one user, and generating a bill of the at least one user: and caching the order keywords corresponding to the interface requested to be called by the at least one user and the key value information of the order keywords by using message middleware so as to realize asynchronous processing of the interface calling request parameters of the at least one user.
13. A bill generation apparatus, comprising:
the device comprises a first determination module, a second determination module and a third determination module, wherein the first determination module is used for receiving an interface calling request of at least one user and determining whether the at least one user has the calling authority of the interface which is requested to be called;
the second determining module is used for responding to the calling authority of the interface which is requested to be called by the at least one user, calling the interface which is requested to be called by the at least one user, generating an order keyword corresponding to the interface which is requested to be called by the at least one user, and determining key value information of the order keyword;
and the generating module is used for generating a bill of the at least one user based on the key value information of the order key words corresponding to the interface called by the at least one user request.
14. The apparatus of claim 13, wherein the first determining module comprises:
the first generation submodule is used for receiving an interface calling request of at least one user and generating an interface calling request parameter of the at least one user;
and the first determining submodule is used for determining whether the at least one user has the calling authority of the interface requested to be called or not based on the interface calling request parameter of the at least one user.
15. The apparatus of claim 14, wherein the first determining submodule comprises:
the first determining unit is used for determining whether the interface calling request parameters of the at least one user comprise one or more of order parameters, network address parameters and interface parameters based on the interface calling request parameters of the at least one user;
and the second determining unit is used for responding to the interface calling request parameter of the at least one user, wherein the interface calling request parameter comprises one or more of an order parameter, a network address parameter and an interface parameter, and determining whether the at least one user has the calling authority of the interface requested to be called.
16. The apparatus according to claim 15, wherein the second determining unit is specifically configured to:
determining whether the order parameters of the at least one user are matched with the order information of the at least one user pre-stored in the database;
in response to the at least one user's order parameters matching the at least one user's order information pre-stored in the database, determining whether the at least one user's network address parameters match the at least one user's network address information pre-stored in the database; and/or
In response to the fact that the network address parameter of the at least one user is matched with the network address information of the at least one user pre-stored in the database, determining whether the interface parameter called by the at least one user is matched with an interface identifier corresponding to the order information of the at least one user pre-stored in the database; and/or
Responding to the matching of the interface parameters called by the at least one user and the interface identification corresponding to the at least one user's order information prestored in the database, and determining the interface residual query quantity of the at least one user;
if the interface residual query of the at least one user is larger than a preset value, the at least one user has an interface calling authority; otherwise, the at least one user does not have the invocation authority of the interface requesting the invocation.
17. The apparatus according to any of claims 13-16, wherein if the at least one user's order type is pay-per-use, pay-per-day-individual-charge or pay-per-year-individual-charge;
the second determining module includes:
the second generation submodule is used for generating order keywords corresponding to the interface which is requested to be called by the at least one user based on the order parameters in the interface calling request parameters of the at least one user;
and the second determining submodule is used for determining the key value information of the order keyword corresponding to the interface requested to be called by the at least one user based on the interface parameter in the interface calling request parameters of the at least one user.
18. The apparatus according to any one of claims 13 to 16,
the second determining module includes:
a third generation submodule, configured to generate an order keyword corresponding to the interface requested to be called by the at least one user based on an order parameter in the interface calling request parameter of the at least one user;
the fourth generation submodule is used for acquiring pre-stored order information of the at least one user in the database and generating preset keywords of the at least one user;
and the third determining submodule is used for matching at least one current-day keyword of the at least one user based on the preset keyword of the at least one user and determining the key value information of the at least one order keyword.
19. The apparatus of claim 17 or 18, wherein the generating module comprises:
the fourth determining submodule is used for determining the number of the interfaces effectively called by the at least one user on the day and the price of the effectively called interfaces based on the key value information of the order keywords corresponding to the interfaces requested to be called by the at least one user;
and the fifth generation submodule is used for generating the bill of the at least one user at the preset time point of the next day based on the number of the interfaces effectively called by the at least one user on the current day and the price of the effectively called interfaces.
20. The apparatus according to any of claims 13-19, wherein the generating module further comprises, after:
the first storage module is used for storing the times of effectively calling the interface and the generated cost of the at least one user in the current day into the database after the bill of the at least one user is generated;
and the second storage module is used for calculating the account balance of each user according to the charging type and storing the account balance of each user into the database.
21. The apparatus according to any of claims 13-20, wherein the generating module further comprises: and the deleting module is used for deleting the order key words of the at least one user and the key value information of the order key words after the bill of the at least one user is generated at the preset time point of the next day.
22. The apparatus of any of claims 13-21, further comprising: and the pause module is used for pausing the interface calling request of the at least one user and sending prompt information to the at least one user if the interface calling times per minute of the at least one user is greater than the maximum calling times per minute of the order interface.
23. The apparatus according to any of claims 13-22, further comprising, between the second determining module and the generating module: and the cache module is used for caching the order keywords corresponding to the interface requested to be called by the at least one user and the key value information of the order keywords by using message middleware so as to realize asynchronous processing of the interface calling request parameters of the at least one user.
24. A computer-readable storage medium, wherein the storage medium stores a computer program for executing the bill generation method according to any one of claims 1 to 12.
25. An electronic device, characterized in that the electronic device comprises:
a processor;
a memory for storing the processor-executable instructions;
the processor is used for reading the executable instructions from the memory and executing the instructions to realize the bill generation method of any one of the claims 1 to 12.
CN202010467999.6A 2020-05-28 2020-05-28 Bill generation method and device, storage medium and electronic equipment Active CN111597246B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010467999.6A CN111597246B (en) 2020-05-28 2020-05-28 Bill generation method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010467999.6A CN111597246B (en) 2020-05-28 2020-05-28 Bill generation method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN111597246A true CN111597246A (en) 2020-08-28
CN111597246B CN111597246B (en) 2024-02-20

Family

ID=72190801

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010467999.6A Active CN111597246B (en) 2020-05-28 2020-05-28 Bill generation method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111597246B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112131020A (en) * 2020-09-22 2020-12-25 杭州城市大数据运营有限公司 API interface generating method, calling method, device, equipment and medium
CN113282590A (en) * 2021-06-25 2021-08-20 中国银行股份有限公司 Interface joint debugging method and device based on 5G message
CN113724009A (en) * 2021-09-01 2021-11-30 拉扎斯网络科技(上海)有限公司 Transportation capacity pricing method and device, electronic equipment and machine-readable storage medium
CN113762949A (en) * 2021-02-23 2021-12-07 西安京迅递供应链科技有限公司 Data processing method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160196542A1 (en) * 2015-01-06 2016-07-07 Bank Of America Corporation Providing Enhanced Online Bill Pay User Interfaces
CN107657039A (en) * 2017-09-28 2018-02-02 努比亚技术有限公司 Bill recording method, mobile terminal and computer-readable recording medium
CN109711801A (en) * 2018-12-13 2019-05-03 平安普惠企业管理有限公司 A kind of Internetbank account checking method and device
CN110704521A (en) * 2019-08-30 2020-01-17 深圳壹账通智能科技有限公司 Interface data access method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160196542A1 (en) * 2015-01-06 2016-07-07 Bank Of America Corporation Providing Enhanced Online Bill Pay User Interfaces
CN107657039A (en) * 2017-09-28 2018-02-02 努比亚技术有限公司 Bill recording method, mobile terminal and computer-readable recording medium
CN109711801A (en) * 2018-12-13 2019-05-03 平安普惠企业管理有限公司 A kind of Internetbank account checking method and device
CN110704521A (en) * 2019-08-30 2020-01-17 深圳壹账通智能科技有限公司 Interface data access method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
涂心琪;郑剑;: "基于数据整合的记账手册小程序设计与实现" *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112131020A (en) * 2020-09-22 2020-12-25 杭州城市大数据运营有限公司 API interface generating method, calling method, device, equipment and medium
CN113762949A (en) * 2021-02-23 2021-12-07 西安京迅递供应链科技有限公司 Data processing method and device
CN113282590A (en) * 2021-06-25 2021-08-20 中国银行股份有限公司 Interface joint debugging method and device based on 5G message
CN113724009A (en) * 2021-09-01 2021-11-30 拉扎斯网络科技(上海)有限公司 Transportation capacity pricing method and device, electronic equipment and machine-readable storage medium

Also Published As

Publication number Publication date
CN111597246B (en) 2024-02-20

Similar Documents

Publication Publication Date Title
CN111597246A (en) Bill generation method and device, storage medium and electronic equipment
CN110494876B (en) System and method for issuing and tracking digital tokens within distributed network nodes
US9069984B2 (en) On-demand authorization management
US20090241118A1 (en) System and method for processing interface requests in batch
CN110023901A (en) System and method for updating multilayer application stack based on cloud
CN111104652B (en) Authority management method and device, computer readable storage medium and electronic equipment
US11928531B1 (en) Retrieval interface for content, such as compliance-related content
CN111104556A (en) Service processing method and device
CN115374426A (en) Access control method, device, equipment and storage medium
CN111611283A (en) Data caching method and device, computer readable storage medium and electronic equipment
CN113673978A (en) Transaction method, system, computer device and storage medium based on SWIFT system
CN114648012A (en) Bill processing method and device, electronic equipment and computer readable medium
CN113297153A (en) Data export method, device, equipment and storage medium
CN112990991B (en) Method and device for combined invoicing
US20180020075A1 (en) Apparatus and method for providing data based on cloud service
CN115545639B (en) Financial business processing method, device, electronic equipment and storage medium
CN115757490A (en) Implementation method and device for avoiding repeated invoicing of internet
CN109471849B (en) Model processing method and device, storage medium and electronic equipment
CN110753316B (en) Information sending method and device, computer readable storage medium and electronic equipment
CN111581213A (en) Information recording method, device and equipment
CN113900895B (en) Information processing method, information processing apparatus, storage medium, and electronic device
EP4411562A1 (en) Data processing method and apparatus, electronic device, computer storage medium and computer program product
JP2020061103A (en) Billing information generation assisting method, billing information generation assisting program, and billing information generation assisting device
US12034612B1 (en) Techniques for transformative and derivative metering
US8931050B2 (en) Mobile application access control

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
GR01 Patent grant
GR01 Patent grant