A charging method, device, electronic terminal and storage medium
By receiving and handling events of change in the value attribute quota in the account under different roles on the user side, the problem of single functions of the existing billing method is solved, the billing needs of the multi-role user side is realized, and the function of querying consumption and income information of the value attribute quota is provided.
Patent Information
- Application Number
- CN202211434307.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-16
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2042-11-16
AI Technical Summary
The existing billing method has a single function and is difficult to meet the platform's billing needs for multi-role users.
It provides a billing method, by receiving changes in the value attribute quota in the account under the preset role of the user, storing relevant log information, and processing log information at the preset time, updating the processing results in the database, so that the user can query the consumption and income information of the value attribute quota.
It realizes diversified billing functions, meets the platform's billing needs for multi-role users, and provides the ability to query consumption and income information of value attribute quotas.
Smart Images

Figure CN116132205B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to Internet technology, and in particular to a charging method, device, electronic terminal and storage medium. Background Art
[0002] In the existing open platform, the platform can publish the service interface (Application Program Interface, API) to the platform for the user who logs in to the platform. When the user calls the fee API, the value attribute quota in the local account will be consumed. The existing billing method can record the consumption log of the value attribute quota in the user's account for the user to perform operations such as query. The existing billing method has a relatively single function and it is difficult to meet the platform's billing needs for multi-role users. Summary of the invention
[0003] In view of this, the embodiments of the present invention provide a billing method, device, electronic terminal and storage medium, which can provide diversified billing functions and meet the billing requirements of the platform for multi-role users.
[0004] In a first aspect, an embodiment of the present invention provides a charging method, including:
[0005] Receive a change event of a value attribute amount in an account of a user terminal under a preset role; the preset role includes an interface subscriber role and / or an interface publisher role;
[0006] In response to the change event being successfully executed, the log information related to the change event is stored in the log collection server, so that the log processing server reads and processes the log information from the log collection server at a preset time, and stores the processing result in the first preset database;
[0007] The processing result in the first preset database is used by the user terminal to query the value attribute amount.
[0008] In a second aspect, an embodiment of the present invention further provides a charging device, including:
[0009] A change event receiving module, used to receive a change event of a value attribute amount in an account of a user terminal under a preset role; the preset role includes an interface subscriber role and / or an interface publisher role;
[0010] A log storage module, configured to store log information related to the change event to a log collection server in response to the change event being successfully executed, so that a log processing server reads and processes the log information from the log collection server at a preset time, and stores the processing result to a first preset database;
[0011] The processing result in the first preset database is used by the user terminal to query the value attribute amount.
[0012] In a third aspect, an embodiment of the present invention further provides an electronic terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a billing method as provided in any embodiment of the present application is implemented.
[0013] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored, characterized in that when the program is executed by a processor, a billing method provided in any embodiment of the present application is implemented.
[0014] An embodiment of the present invention provides a billing method, device, electronic terminal and storage medium, the billing method comprising: receiving a change event of a value attribute amount in an account of a user terminal under a preset role; the preset role comprises an interface subscriber role and / or an interface publisher role; in response to the successful execution of the change event, storing log information related to the change event to a log collection server, so that a log processing server reads and processes the log information from the log collection server at preset time intervals, and stores the processing results to a first preset database; wherein the processing results in the first preset database are used by the user terminal to query the value attribute amount.
[0015] In the embodiment of the present invention, the user terminal can be an interface subscriber role and / or an interface publisher role on the open platform, and can trigger a change event of the value attribute amount in the corresponding account under different roles. By storing the corresponding log information when the change event is successfully executed, it is convenient to process the log information offline to determine the change of the value attribute amount in the account of the user terminal under different roles, so that the user terminal can not only query the consumption information of the value attribute amount, but also query the income information of the value attribute amount, that is, it provides a variety of billing functions to meet the billing needs of the platform for multi-role users. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 It is a flowchart of a charging method provided in the first embodiment of the present invention;
[0017] Figure 2 This is a schematic diagram of an interface of a user terminal in the role of an interface subscriber in a billing method provided in Embodiment 2 of the present invention;
[0018] Figure 3 It is a schematic diagram of the framework of an open platform in a charging method provided in Embodiment 2 of the present invention;
[0019] Figure 4This is a schematic diagram of an interface of a user terminal in the role of an interface publisher in a charging method provided in Embodiment 3 of the present invention;
[0020] Figure 5 It is a schematic diagram of the framework of an open platform in a charging method provided in Embodiment 3 of the present invention;
[0021] Figure 6 This is a schematic diagram of an interface of a user terminal in the role of an interface subscriber in a billing method provided in a fourth embodiment of the present invention;
[0022] Figure 7 It is a schematic diagram of the framework of an open platform in a charging method provided in Embodiment 4 of the present invention;
[0023] Figure 8 It is a structural diagram of a charging device provided in Embodiment 5 of the present invention;
[0024] Fig. 9 It is a structural schematic diagram of an electronic terminal provided in Embodiment 6 of the present invention. DETAILED DESCRIPTION
[0025] The present invention is further described in detail below in conjunction with the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in the art without making creative work are within the scope of protection of the present invention. In the following embodiments, each embodiment provides optional features and examples at the same time, and the various features recorded in the embodiments can be combined to form multiple optional schemes, and each numbered embodiment should not be regarded as only one technical solution.
[0026] Embodiment 1
[0027] Figure 1 It is a flowchart of a billing method provided in the first embodiment of the present invention. This embodiment is applicable to the case where the user terminal checks the consumption information and / or income information of the value attribute amount in the account under the interface subscriber role and / or interface publisher role. The method can be executed by the billing device provided in the embodiment of the present invention, which can be implemented in software and / or hardware, and can be configured in an electronic terminal, for example, it can be integrated in the billing center module, and configured in the server of the open platform along with the billing center module.
[0028] See also Figure 1 The billing method provided in this embodiment may include:
[0029] S110, receiving a change event of a value attribute amount in an account of a user terminal under a preset role; the preset role includes an interface subscriber role and / or an interface publisher role.
[0030] In the embodiment of the present invention, the open platform may provide each user terminal with at least one preset role identity, such as an interface subscriber role and / or an interface publisher role identity.
[0031] After the user client logs in to the open platform, the preset role can be switched through the identity switching control. When the user client switches to the interface subscriber role, it can subscribe to each service interface (Application ProgramInterface, API) in the open platform; when it switches to the interface publisher role, it can publish the API on the open platform for other user clients to subscribe. It can be considered that the API subscribed by a user client under the interface subscriber role may include the API published by the platform, and / or the API published by other user clients except the user client under the interface publisher role. In addition, when the user client calls the subscribed paid API, it needs to pay the corresponding value of the service, and when the paid API published by the user client is called, it can benefit from the corresponding value of the service.
[0032] In this embodiment, the value attribute amount in the account can be understood as a numerical value that can represent the value size, such as an amount of money, or the number of virtual props, etc. The open platform can set different types of value attribute amounts in the account for different preset roles. For example, for the role of interface caller, since there is a spending demand under this role, the value attribute amount in the account of the expenditure type can be set for the user end; for the role of interface publisher, since there is a revenue demand under this role, the value attribute amount in the account of the revenue type can be set for the user end.
[0033] The value attribute amount set for each preset role may include at least one item. The change event of the value attribute amount in the user's account under the preset role may include: an event that causes at least one value attribute amount under the preset role of the user to increase, decrease, update, etc.
[0034] The billing device capable of executing the billing method provided in the embodiment of the present invention can be integrated in the billing center module. The billing center module can be deployed separately on the above-mentioned open platform and can provide services in the form of HyperText Transfer Protocol (HTTP). The billing device can receive the change event of the value attribute amount in the account of each user terminal under the preset role, so that the billing center module performs the change operation on the value attribute amount in the account of each user terminal under the preset role.
[0035] S120. In response to the successful execution of the change event, the log information related to the change event is stored in the log collection server, so that the log processing server reads and processes the log information from the log collection server at a preset time, and stores the processing results in the first preset database; wherein the processing results in the first preset database can be used by the user end to query the value attribute amount.
[0036] Among them, the log information related to the change event may include but is not limited to: the type of change event (such as recharge, withdrawal, API call, etc.), the timestamp of the change event, the subject (such as user terminal) and object (such as API) corresponding to the change event, the target value attribute amount corresponding to the change event and the change value of the target value attribute amount, etc.
[0037] After receiving the change event, the billing device can determine whether the change event is executed successfully according to the execution feedback of the change event (such as the execution status code). If the change event is executed successfully, the billing device can also obtain the log information related to the change event and store it in the log collection server. For example, the billing device can push the log information related to the change event to the log collection server through the Transmission Control Protocol (TCP).
[0038] Accordingly, the log processing server can read the unread log information from the log collection server at preset time intervals; wherein the preset time can be set according to the specific application scenario, for example, it can be 10 minutes, 30 minutes or 1 hour, etc. Afterwards, the log server can process the read log information offline, for example, it can classify and count the log information according to at least one factor of the type of change event, the subject and object corresponding to the change event, etc., and store the processing results in the first preset database. wherein, the first preset database can be, for example, a MySQL database, or it can be other databases that can store log information, which are not exhaustively listed here.
[0039] When the user terminal switches to the interface subscriber role, the processing results in the first preset database can be used by the user terminal to view the value attribute amount in the account of the expenditure type; when the user terminal switches to the interface publisher role, the processing results in the first preset database can be used by the user terminal to view the value attribute amount in the account of the income type. This provides a variety of billing functions and meets the billing needs of the platform for multi-role users.
[0040] In addition, for the in-account value attribute amount of some expenditure types, the user end can use prepayment or postpayment to perform actual expenditure operations. It can be considered that whether or not the actual payment operation is performed does not affect the in-account value attribute amount of the expenditure type when the user end views it.
[0041] The embodiment of the present invention provides a billing method, in which the user terminal can be an interface subscriber role and / or an interface publisher role on an open platform, and can trigger a change event of the value attribute amount in the corresponding account under different roles. By storing the corresponding log information when the change event is successfully executed, it is convenient to process the log information offline to determine the change of the value attribute amount in the account of the user terminal under different roles, so that the user terminal can not only query the consumption information of the value attribute amount, but also query the income information of the value attribute amount, that is, it provides a variety of billing functions and meets the billing requirements of the platform for multi-role users.
[0042] Embodiment 2
[0043] The billing method provided in this embodiment can be combined with the various optional schemes in the billing method provided in the above embodiments. The billing method provided in this embodiment provides a detailed description of the value attribute amount and its change events in the user's account when the preset role is the interface subscriber role. By recording the log information corresponding to the call of the charging interface and the log information corresponding to the recharge, it is possible to update at least one of the remaining amount, amount recharge details, total consumption amount, amount consumption details and the amount of consumption in the first unit time. The amount of the value attribute in the account can be updated, thereby providing the user with billing functions such as querying the consumption information of the value attribute amount in the account under the interface subscriber role, realizing the diversification of billing functions.
[0044] Figure 2 This is a schematic diagram of the interface of the user end in the role of interface subscriber in a billing method provided in the second embodiment of the present invention. After the user end logs in to the open platform, he can click the entry control of "Billing Center-Subscriber" to enter Figure 2 The interface shown.
[0045] See also Figure 2 In the interface, when the preset role is the interface subscriber role, the value attribute amount in the account may include at least one of the following: the remaining amount ( Figure 2 The "balance" control 210 is used to display the balance), the amount recharge details (click Figure 2 The total consumption amount ( Figure 2 The total consumption control 220 is used to display the quota consumption details (click Figure 2 The "Consumption Details" control 221 in the "Total Consumption" control 220 can be displayed) and the consumption amount in the first unit time ( Figure 2 ) using the “Daily Consumption” control 230. Figure 2The first unit time shown in is daily. In addition, other unit times can be set according to application scenarios, such as hourly, weekly, monthly, etc.
[0046] In some optional implementations, when the preset role is an interface subscriber role, the change event of the value attribute amount in the account may include at least one of the following: a call event to the charging interface; the charging interface includes interfaces published by other user terminals except the user terminal; a recharge event for the remaining amount.
[0047] Among them, the charging interface includes not only interfaces published by other user terminals, but also interfaces published by the platform. When the user terminal switches to the interface subscriber role, the charging interface can be called to trigger a call event. The call event can reduce the remaining credit limit under the interface subscriber role, increase the total consumption credit limit, update the credit consumption details, and increase the consumption credit limit in the first unit time, that is, it can change at least one value attribute credit limit in the account under the interface subscriber role.
[0048] In addition, when the user terminal switches to the interface subscriber role, it can also recharge the remaining amount to trigger a recharge event. The recharge event may include at least one recharge operation, for example, Figure 2 In the example, the user clicks the "recharge" control 212 in the "balance" control 210, wherein the recharge interface may be presented in response to the click operation; accordingly, the recharge event may also include a recharge operation on the recharge control in the recharge interface, etc. The recharge event may increase the remaining amount under the interface subscriber role and update the amount recharge details, that is, it may also change the amount of at least one value attribute in the account under the interface subscriber role.
[0049] In these optional implementations, by receiving the call event and / or recharge event of the user terminal under the interface subscriber role, the relevant log information can be stored when the call event and / or recharge event is successfully executed. Thus, the processed log information can be used to characterize the changes in the value attribute amount in the user terminal's account under the interface subscriber role, so that the user terminal can query it.
[0050] For example, Figure 3 Schematic diagram of the framework of an open platform in a charging method provided in Embodiment 2 of the present invention. Figure 3 The open platform may be deployed with a portal module 310 , a background management module 320 , an application service module 330 and a billing center module 340 .
[0051] Among them, the portal module 310 can be used to render the user-side interface; the background management module 320 can be used to provide management services such as recharge and withdrawal; the application service module 330 can provide interface services based on the API released by the platform and / or the API released by the user side; the billing center module 340 can integrate the billing device provided by an embodiment of the present invention, which can be used to execute the billing method provided by the present invention.
[0052] When the user terminal triggers a call event for a charging interface, the application service module 330 can provide corresponding interface services and can feedback the execution status code to the billing center module 340. The billing center module 340 can determine whether the call event is executed successfully according to the execution status code, and in response to the successful execution of the call event, the application service module 330 and the log information generated by the gateway during the call process can be stored in the log collection server.
[0053] When the user terminal triggers a recharge event for the remaining amount, the background management module 320 can review the recharge operation and feedback the execution status code to the billing center module 340. The billing center module 340 can determine whether the recharge event is executed successfully according to the execution status code, and in response to the recharge event being executed successfully, store the log information generated by the background management module 330 to the log collection server.
[0054] Afterwards, the log processing server can read the unread log information from the log collection server at a preset time, process the read log information offline, and store the processing result in a first preset database (eg Figure 3 MySQL database shown in the figure).
[0055] After the user terminal logs in to the open platform, it can enter the interface under the interface subscriber role rendered by the portal module 310. The portal module 310 can directly query the relevant log information of the user terminal under the interface subscriber role from the MySQL database, and can present at least one of the remaining credit, credit recharge details, total consumption credit, credit consumption details and consumption credit within the first unit time in the interface according to the log information.
[0056] In some optional implementations, the processing results in the first preset database are also used to generate at least one of the following data: a consumption overview graph and consumption ranking data; wherein the consumption overview graph and consumption ranking data are used for user-side query.
[0057] See again Figure 2 The horizontal axis of the consumption overview graph 240 represents the second unit time, and the vertical axis represents the consumption amount in each second unit time. The consumption ranking data 250 includes the ranking data of the consumption amount corresponding to calling each charging interface within the third unit time (for example, Figure 2In addition, the consumption ranking data 250 may also include specific consumption amounts (e.g. Figure 2 The consumption amount in the table), consumption ratio, and consumption quota corresponding interface (for example Figure 2 The charging interface A) and other information are not listed here exhaustively. Figure 2 The second unit time shown in is every three hours, and the third unit time shown in is every seven days. In addition, other unit times may be set according to application scenarios, such as daily, monthly, etc.
[0058] Correspondingly, when the user terminal enters the interface under the interface subscriber role rendered by the portal module 310, the portal module 310 can also directly read the generated consumption overview chart and / or consumption ranking data, and present the consumption overview chart and / or consumption ranking data in the interface, so that the user can more clearly understand the changes in the value attribute amount in the account under the interface subscriber role, enrich the interface presentation method, and improve the user experience.
[0059] In these optional implementations, by generating a consumption overview diagram and / or consumption ranking data based on the processing results in the first preset database, the interface presentation method can be enriched and the user query experience can be improved.
[0060] The billing method provided in the embodiment of the present invention describes in detail the value attribute amount and its change events in the user's account when the preset role is the interface subscriber role. By recording the log information corresponding to the call of the charging interface and the log information corresponding to the recharge, it is possible to update at least one of the value attribute amount in the account, including the remaining amount, amount recharge details, total consumption amount, amount consumption details, and consumption amount in the first unit time, thereby providing the user with billing functions such as querying consumption information of the value attribute amount in the account under the interface subscriber role, thereby realizing the diversification of billing functions. In addition, the billing method provided in this embodiment and the billing method provided in the above embodiment belong to the same technical concept. The technical details not described in detail in this embodiment can be referred to the above embodiment, and the same technical features have the same beneficial effects in this embodiment and the above embodiment.
[0061] Embodiment 3
[0062] The billing method provided in this embodiment can be combined with the various optional schemes in the billing method provided in the above embodiments. The billing method provided in this embodiment provides a detailed description of the value attribute amount and its change events in the user's account when the preset role is the interface publisher role. By recording the log information corresponding to the event that the charging interface is called, it is possible to update the income amount, the amount income details, and at least one of the value attribute amounts in the account in the income amount within the fourth unit time, thereby providing the user with billing functions such as querying the income information of the value attribute amount in the account under the interface publisher role, realizing the diversification of billing functions.
[0063] Figure 4 This is a schematic diagram of the interface of the user end in the role of interface publisher in a billing method provided in the third embodiment of the present invention. After the user end logs in to the open platform, he can click the entry control of "Billing Center-Publisher" to enter Figure 4 The interface shown.
[0064] See also Figure 4 In the interface, when the preset role is the interface publisher role, the value attribute amount in the account can include at least one of the following: income amount ( Figure 4 The total income control 410 is used to display the amount of income details (click Figure 4 The "income details" control 411 in the "total income" control 410 can be displayed) and the income amount in the fourth unit time ( Figure 4 420). Figure 4 The fourth unit time shown in is daily. In addition, other unit times may be set according to application scenarios, such as hourly, weekly, monthly, etc.
[0065] In some optional implementations, when the preset role is the interface publisher role, the change event of the value attribute amount in the account may include: a call event of the charging interface published by the user end.
[0066] When the user client switches to the role of interface publisher, if the paid interface it publishes is called by other user clients, a called event of the paid interface will occur. This called event can increase the income quota under the role of interface publisher, update the quota income details, and increase the income quota in the fourth unit event, which can change the value attribute quota of at least one account under the role of interface publisher.
[0067] For example, Figure 5 Schematic diagram of the framework of an open platform in a charging method provided in Embodiment 3 of the present invention. Figure 5 The open platform can be deployed with a portal module 510, an application service module 520 and a billing center module 530. The technical features of the three modules not described in detail can be found in Figure 3 Modules with the same name in .
[0068] In addition, in this embodiment, when a call event of a charging interface issued by the user terminal occurs, the application service module 520 can provide corresponding interface services and can feedback the execution status code to the billing center module 530. The billing center module 530 can determine whether the called event is executed successfully according to the execution status code, and in response to the successful execution of the called event, the application service module 520 and the log information generated by the gateway during the calling process can be stored in the log collection server.
[0069] Afterwards, the log processing server may also read the unread log information from the log collection server at a preset time, perform offline processing on the read log information, and store the processing result in a first preset database (eg Figure 5 MySQL database shown in the figure).
[0070] After the user terminal logs in to the open platform, it can enter the interface under the role of the interface publisher rendered by the portal module 510. The portal module 510 can directly query the relevant log information of the user terminal under the role of the interface publisher from the MySQL database, and can present at least one of the income quota, quota income details and the income quota within the fourth unit time in the interface according to the log information.
[0071] The billing method provided in the embodiment of the present invention describes in detail the value attribute amount and its change event in the user's account when the preset role is the interface publisher role. By recording the log information corresponding to the event of the charging interface being called, it is possible to update the income amount, the amount income details and at least one value attribute amount in the account in the income amount within the fourth unit time, thereby providing the user with billing functions such as querying the income information of the value attribute amount in the account under the publisher role, realizing the diversification of billing functions. In addition, the billing method provided in this embodiment and the billing method provided in the above embodiment belong to the same technical concept. The technical details not described in detail in this embodiment can be referred to the above embodiment, and the same technical features have the same beneficial effects in this embodiment and the above embodiment.
[0072] Embodiment 4
[0073] The billing method provided in this embodiment can be combined with the various optional schemes in the billing method provided in the above embodiments. The billing method provided in this embodiment describes in detail the budget quota within the fifth unit time that can be set in the value attribute quota in the account when the preset role is the interface subscriber role. By setting the budget quota within the fifth unit time, the call event of the charging interface under the interface subscriber role can be verified to limit the consumption of the value attribute in the account, thereby realizing the diversification of billing functions.
[0074] Figure 6 Schematic diagram of the interface of the user terminal in the role of interface subscriber in a billing method provided by the fourth embodiment of the present invention. Figure 6 In the interface, when the preset role is the interface subscriber role, the value attribute amount in the account can include Figure 2 In addition to the value attribute amount in the account that can be presented by each control in the middle interface, it can also include the budget amount within the fifth unit of time ( Figure 6 ) using the “Daily Budget” control 610. Figure 6 The fifth unit time shown in is daily. In addition, other unit times can be set according to application scenarios, such as hourly, weekly, monthly, etc.
[0075] Accordingly, the billing method may further include: receiving a setting event of a budget amount in the fifth unit time by the user end under the interface subscriber role. The setting event may include at least one setting operation, for example, a click operation on the "API budget setting" control 611 in the "daily budget" control 610, wherein a setting interface may be presented in response to the click operation; accordingly, the setting event may also include a setting operation on the setting control in the setting interface, etc.
[0076] Afterwards, in response to the successful execution of the setting event, the budget amount within the fifth unit time related to the setting event can be stored in the second preset database. The budget amount within the fifth unit time related to the setting event can be considered as the budget amount within the fifth unit time set based on the above setting operation. The second preset database can be, for example, a redis database, or other databases that can store numerical values, which are not exhaustive here.
[0077] Among them, in addition to storing the budget amount within the fifth unit time, the second preset database can also store other data, such as specific data such as consumption, income, recharge, and withdrawal contained in the log information in the first database. The data stored in the second preset database can filter out information other than numbers, occupying less space and having a simpler format. Therefore, the second preset database can be configured in the memory of the open platform to facilitate the billing center module to quickly obtain demand data and perform corresponding operations (such as recharge, deduction operations, etc.).
[0078] For example, Figure 7 Schematic diagram of the framework of an open platform in a charging method provided in Embodiment 4 of the present invention. Figure 7 The open platform can be deployed with a portal module 710, a backend management module 720 and a billing center module 730. The technical features of the three modules not described in detail can be found in Figure 3 Modules with the same name in .
[0079] In addition, in this embodiment, when the user terminal triggers a setting event for the budget amount within the fifth unit time, the background management module 720 can review the setting operation and feedback the execution status code to the billing center module 730. The billing center module 730 can determine whether the setting event is executed successfully according to the execution status code, and in response to the setting event being executed successfully, store the budget amount within the fifth unit time related to the setting event into the second preset database (e.g. Figure 7 in the redis database).
[0080] Correspondingly, when the user enters the interface under the interface subscriber role rendered by the portal module 710, the portal module 710 can read the budget amount within the fifth unit time from the redis database through the billing center module 730 and present it in the middle Figure 6 In the “Daily Budget” control 610 shown, that is, the budget amount within the fifth unit time in the second preset database can be viewed by the user terminal.
[0081] In addition, the budget amount within the fifth unit time in the second preset database can also be used to verify whether the calling event is executed normally when the change event is a calling event for the charging interface.
[0082] Among them, when the user end triggers a call event to the charging interface, the gateway in the calling process can also be used to: obtain the budget amount within the fifth unit time through the billing center module 730; determine the currently available remaining amount based on the budget amount within the fifth unit time; determine whether the currently available remaining budget amount supports this call; if this call is supported, then verify that the call event can be executed normally, and the application service module in the development platform can provide corresponding interface services; if this call is not supported, then verify that the call event cannot be executed normally, and the application service module can stop providing corresponding interface services.
[0083] By setting the budget limit within the fifth unit of time, the calling event of the charging interface under the subscriber role can be verified. When the currently available remaining budget limit is sufficient, the interface call can be made to limit the consumption of the value attributes in the account, thereby realizing the diversification of billing functions.
[0084] The billing method provided in the embodiment of the present invention describes in detail the budget amount within the fifth unit time that can be set in the value attribute amount within the account when the preset role is the interface subscriber role. By setting the budget amount within the fifth unit time, the call event of the charging interface under the subscriber role can be verified to limit the consumption of the value attribute in the account, thereby realizing the diversification of billing functions. In addition, the billing method provided in this embodiment and the billing method provided in the above embodiment belong to the same technical concept. The technical details not described in detail in this embodiment can be referred to the above embodiment, and the same technical features have the same beneficial effects in this embodiment and the above embodiment.
[0085] Embodiment 5
[0086] Figure 8 This is a schematic diagram of the structure of a charging device provided by Embodiment 5 of the present invention. This embodiment is applicable to the case where the user terminal, in the role of interface subscriber and / or interface publisher, checks the consumption information and / or income information of the value attribute amount in the account.
[0087] See also Figure 8 The charging device provided by the present invention may include:
[0088] The change event receiving module 810 is used to receive the change event of the value attribute amount in the account of the user terminal under the preset role; the preset role includes the interface subscriber role and / or the interface publisher role;
[0089] The log storage module 820 is used to store the log information related to the change event to the log collection server in response to the change event being successfully executed, so that the log processing server reads and processes the log information from the log collection server at a preset time, and stores the processing result to the first preset database;
[0090] Among them, the processing results in the first preset database are used by the user end to query the value attribute amount.
[0091] In some optional implementations, when the preset role is an interface subscriber role, the value attribute amount in the account includes at least one of the following:
[0092] Remaining balance, balance recharge details, total consumption balance, balance consumption details and consumption balance in the first unit of time.
[0093] In some optional implementations, when the preset role is an interface subscriber role, the change event of the value attribute amount in the account includes at least one of the following:
[0094] Call events for charging interfaces; charging interfaces include interfaces published by other user terminals except the user terminal;
[0095] Recharge event for the remaining balance.
[0096] In some optional implementations, the processing results in the first preset database are also used to generate at least one of the following data: a consumption overview graph and consumption ranking data;
[0097] The interval between each point in the horizontal axis of the consumption overview graph is the second unit time, and the vertical axis is the consumption amount in each second unit time; the consumption ranking data includes the ranking data of the consumption amount corresponding to calling each charging interface in the third unit time;
[0098] Among them, the consumption overview chart and consumption ranking data are used for user-side queries.
[0099] In some optional implementations, when the preset role is the interface publisher role, the value attribute amount in the account includes at least one of the following:
[0100] The amount of income, the details of the amount of income and the amount of income within the fourth unit of time.
[0101] In some optional implementations, when the preset role is the interface publisher role, the change event of the value attribute amount in the account includes:
[0102] The charging interface call event published by the user end.
[0103] In some optional implementations, when the preset role is an interface subscriber role, the value attribute amount in the account includes a budget amount within the fifth unit of time;
[0104] Correspondingly, the charging device further includes:
[0105] An event receiving module is set to receive a setting event of a budget quota within a fifth unit of time by a user terminal under the interface subscriber role;
[0106] A budget storage module, configured to store the budget amount within the fifth unit time related to the setting event into a second preset database in response to the setting event being successfully executed;
[0107] The budget amount within the fifth unit time in the second preset database is used to verify whether the calling event is executed normally when the change event is a calling event for the charging interface.
[0108] The charging device provided in the embodiment of the present invention can execute the charging method provided in the embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method. For technical details not described in detail, please refer to the charging method provided in the embodiment of the present invention.
[0109] Embodiment 6
[0110] Fig. 9Schematic diagram of the structure of an electronic terminal provided by Embodiment 6 of the present invention. Fig. 9 As shown, the terminal may include a processor 910, a memory 920, an input device 930, and an output device 940; the number of processors 910 in the terminal may be one or more. Fig. 9 A processor 910 is taken as an example; the processor 910, memory 920, input device 930 and output device 940 in the terminal / may be connected via a bus or other means. Fig. 9 The example of connecting through bus is taken in the following.
[0111] The memory 920, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the billing method in the embodiment of the present invention. The processor 910 executes various functional applications and data processing of the device / terminal / server by running the software programs, instructions and modules stored in the memory 920, that is, implementing the above-mentioned billing method.
[0112] The memory 920 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 920 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 920 may further include a memory remotely arranged relative to the processor 910, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0113] The input device 930 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the terminal. The output device 940 may include a display device such as a display screen.
[0114] Embodiment 7
[0115] Embodiment 7 of the present invention further provides a storage medium including computer executable instructions, wherein the computer executable instructions are used to execute a charging method when executed by a computer processor, the method comprising:
[0116] Receive a change event of the value attribute amount in the account of the user end under a preset role; the preset role includes an interface subscriber role and / or an interface publisher role; in response to the successful execution of the change event, store the log information related to the change event to the log collection server, so that the log processing server reads and processes the log information from the log collection server at a preset time, and stores the processing result to a first preset database; wherein the processing result in the first preset database is used by the user end to query the value attribute amount.
[0117] Of course, the storage medium containing computer executable instructions provided in an embodiment of the present invention is not limited to the above method operations, and the computer executable instructions can also execute related operations in the billing method provided in any embodiment of the present invention.
[0118] Through the above description of the implementation mode, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation mode. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of various embodiments of the present invention.
[0119] It is worth noting that in the embodiment of the above-mentioned search device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0120] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A charging method, characterized in that: include: Receive changes in the value attribute amount in the user's account under the preset role; The preset roles include an interface subscriber role and an interface publisher role, and the user terminal selects a login platform from the preset roles; After receiving the change event, the method further includes: Determining an execution result of the change event according to the execution feedback of the change event; In response to the change event being successfully executed, the log information related to the change event is stored in the log collection server, so that the log processing server reads and processes the log information from the log collection server at a preset time, and stores the processing result in the first preset database; The processing result in the first preset database is used by the user terminal to query the value attribute amount.
2. The method according to claim 1, characterized in that When the preset role is the interface subscriber role, the value attribute amount in the account includes at least one of the following: Remaining balance, balance recharge details, total consumption balance, balance consumption details and consumption balance in the first unit of time.
3. The method according to claim 2, characterized in that When the preset role is the interface subscriber role, the change event of the value attribute amount in the account includes at least one of the following: A calling event of a charging interface; the charging interface includes interfaces published by other user terminals except the user terminal; A recharge event for the remaining balance.
4. The method according to claim 3, characterized in that The processing result in the first preset database is also used to generate at least one of the following data: a consumption overview graph and consumption ranking data; The interval between each point in the horizontal axis of the consumption overview graph is the second unit time, and the vertical axis is the consumption amount in the second unit time; the consumption ranking data includes the ranking data of the consumption amount corresponding to calling each charging interface in the third unit time; The consumption overview graph and the consumption ranking data are used for query by the user end.
5. The method according to claim 1, characterized in that When the preset role is the interface publisher role, the value attribute amount in the account includes at least one of the following: The amount of income, the details of the amount of income and the amount of income within the fourth unit of time.
6. The method according to claim 1, characterized in that When the preset role is the interface publisher role, the change event of the value attribute amount in the account includes: The charging interface call event published by the user end.
7. The method according to any one of claims 1 to 5, characterized in that: When the preset role is the interface subscriber role, the value attribute amount in the account includes the budget amount within the fifth unit time; Accordingly, the method further includes: receiving a setting event of a budget quota within a fifth unit of time by the user terminal under the interface subscriber role; In response to the setting event being successfully executed, storing the budget amount within the fifth unit time related to the setting event in a second preset database; The budget amount within the fifth unit time in the second preset database is used to verify whether the calling event is executed normally when the change event is a calling event of a charging interface.
8. A charging device, characterized in that: include: A change event receiving module is used to receive a change event of the value attribute amount in the account of the user under the preset role; The preset roles include an interface subscriber role and an interface publisher role, and the user terminal selects a login platform from the preset roles; A change event execution determination module, used to determine the execution result of the change event according to the execution feedback of the change event; A log storage module, configured to store log information related to the change event to a log collection server in response to the change event being successfully executed, so that a log processing server reads and processes the log information from the log collection server at a preset time, and stores the processing result to a first preset database; The processing result in the first preset database is used by the user terminal to query the value attribute amount.
9. An electronic terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the charging method as described in any one of claims 1-7 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the charging method as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Account management method and device, storage medium and computer equipment
CN111402046A