Network service charging method and system
By recording only the necessary billing point data during the business request processing and depositing it into the billing data table, the decoupling of the billing logic and the business logic is achieved, and flexible billing is performed through flexible billing strategies, the serious coupling of billing logic and business logic in the existing technology is solved, and business processing efficiency and billing flexibility are improved.
Patent Information
- Application Number
- CN202411994512.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-12-31
AI Technical Summary
In the prior art, the billing logic and business logic are severely coupled, resulting in reduced business processing efficiency, abnormal billing logic affects normal business response, and it is difficult to adapt to complex and diverse billing needs.
By recording only the necessary billing point data and depositing it into the billing data table during the business request processing process, the billing logic and the business logic are decoupled, and flexible billing is carried out according to the corresponding billing logic through a flexible billing strategy.
It realizes the decoupling of billing logic and business logic, improves business processing efficiency, is widely compatible with the billing needs of various network services, and quickly adapts to changes in business needs.
Smart Images

Figure CN119788534A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a network service charging method and system. Background Art
[0002] With the rapid development of the Internet industry, it has not only achieved varying degrees of integration with various traditional industries, but has also gradually formed a large-scale and systematic industrial system. Network service providers serving different industries have emerged. There are huge differences in the sales forms and specifications of different network services, which has brought unprecedented challenges to the management of the billing system.
[0003] The existing billing service has a serious problem of coupling between billing logic and business logic. When users request to use services, they must not only perform authentication verification and parameter verification on the request from a business perspective, but also verify the account balance from a billing perspective. In addition, the billing logic must be processed synchronously after the business logic is processed to complete the deduction. This not only reduces the efficiency of business processing, but also may cause billing logic anomalies to affect normal business responses. In addition, the current billing system is difficult to adapt to complex and diverse billing needs. Due to the rapid development and rapid update and iteration of Internet products, and the wide variety of products involved in various industries, the billing requirements and billing specifications are different. Most of the current billing systems develop specific billing logic for specific billing needs. When the product logic is updated and iterated, the billing logic must also be adjusted synchronously. In addition, when adding unified functions to the billing logic (such as adding support for discounts), all billing logic needs to be readjusted, which is not only time-consuming and labor-intensive, but also increases the probability of errors. Summary of the invention
[0004] In view of the above defects or deficiencies in the prior art, the present invention provides a network service billing method and system, which realizes the decoupling of billing logic and business logic, and realizes unified billing for diversified products through flexible billing strategies.
[0005] In a first aspect, an embodiment of the present invention provides a network service billing method, including: In response to the activation of the billing service, the billing tracking data is recorded and stored in the billing data table through a scheduled task. The billing order is created using the billing policy corresponding to the current billing service and added to the billing queue. Scan the billing queue through a scheduled task, obtain a billing order whose billing time matches the current time, read the billing order and its basic information, perform billing according to the billing policy corresponding to the billing order in the basic information, and generate a billing bill using the billing logic corresponding to the billing policy; In response to the closing of the billing service, the billing order status is modified to being settled, the billing order is removed from the billing queue and added to the settlement queue, settlement is performed through a scheduled task, and the billing order status is modified to closed.
[0006] Furthermore, it also includes planning one or more billing services in advance according to the business requirements and billing methods of the billing products; adding one or more billing strategies under the billing service, and adding one or more billing units under the billing strategy according to different specifications of the billing products.
[0007] Furthermore, the billing service includes some billing service information, and the billing service information includes: a unique billing service identifier, a billing service name, a corresponding billing product, and a billing service status, and the billing service status includes valid, locked, and invalid status.
[0008] Further, the billing policy includes several billing policy information, and the billing policy information includes: a unique billing policy identifier, a billing policy name, a billing service, a billing cycle, a billing time, a prepaid or postpaid type, a billing type, and a billing policy status; The billing types include subscription billing, pay-per-use billing, pay-per-time billing and resource package billing.
[0009] Furthermore, it also includes generating billing bills according to different billing types using corresponding billing logic: When the billing type is subscription billing, the unit price in the billing unit is obtained, the bill amount is calculated based on the unit price and quantity, and the bill amount is written into the billing bill; When the billing type is pay-as-you-go, the data in the billing data table are matched according to the configuration information of the billing service and the billing unit to obtain the billing amount of the billing period, calculate the billing quantity according to the billing amount, obtain the unit price in the billing unit, calculate the bill amount according to the unit price and the billing quantity, and write it into the billing bill; When the billing type is pay-per-use, the billing amount is input externally, and the bill amount is calculated based on the billing amount and the number of times and written into the billing bill; When the billing type is resource package billing, no billing bill is generated, and the balance of the resource package is directly deducted.
[0010] Furthermore, the billing unit includes several billing unit information, and the billing unit information includes: the billing unit unique identifier, the billing unit name, the billing service, the billing policy, the currency, the unit price, the price unit, the configuration information and the billing unit status, and the billing unit status includes valid, locked and invalid status.
[0011] Furthermore, the billing order includes several billing order information, and the billing order information includes: a unique order number, user information, a billing service, a billing policy, one or more billing units, a billing order status, a start date and an end date. The billing order status includes created, billing, settling and closed status.
[0012] Furthermore, the billing invoice includes billing order information, currency, bill amount and bill period.
[0013] On the other hand, an embodiment of the present invention further provides a network service billing system, including: An order creation module is configured to respond to the activation of the billing service, record the billing tracking data and store it in the billing data table through a scheduled task, create a billing order using the billing policy corresponding to the current billing service and add it to the billing queue; The billing module is configured to scan the billing queue through a scheduled task, obtain a billing order whose billing time matches the current time, read the billing order and its basic information, perform billing according to the billing policy corresponding to the billing order in the basic information, and generate a billing bill using the billing logic corresponding to the billing policy; The settlement module is configured to modify the billing order status to being settled in response to the closing of the billing service, remove the billing order from the billing queue and add it to the settlement queue, perform settlement through a scheduled task and modify the billing order status to be closed.
[0014] Furthermore, it also includes a pre-processing module configured to plan one or more billing services according to the business requirements and billing methods of the billing products; add one or more billing strategies under the billing services, and add different one or more billing units under the billing strategies according to different specifications of the billing products; A billing service module, wherein the billing service module includes some billing service information, wherein the billing service information includes: a unique identification of the billing service, a name of the billing service, a billing product to which the billing service belongs, and a billing service status, wherein the billing service status includes valid, locked, and invalid status; A charging policy module, wherein the charging policy module includes several charging policy information, wherein the charging policy information includes: a unique identification of the charging policy, a name of the charging policy, a charging service to which it belongs, a charging cycle, a charging time, a prepaid or postpaid type, a charging type, and a charging policy status; the charging types include subscription charging, pay-per-use charging, pay-per-use charging, and resource package charging; The billing bill generation module is configured to generate a billing bill according to the corresponding billing logic according to different billing types: when the billing type is subscription billing, the unit price in the billing unit is obtained, and the bill amount is calculated according to the unit price and the billing quantity and written into the billing bill; when the billing type is pay-as-you-go billing, the configuration information of the billing service and the billing unit is matched with the data in the billing data table to obtain the billing amount of the billing cycle, calculate the billing quantity according to the billing amount, and then obtain the unit price in the billing unit, calculate the bill amount according to the unit price and the billing quantity and write into the billing bill; when the billing type is pay-as-you-go billing, the billing amount is passed in externally, and the bill amount is calculated according to the billing amount and the number of times and written into the billing bill; when the billing type is resource package billing, no billing bill is generated, and the balance of the resource package is directly deducted.
[0015] The present invention provides a network service billing method and system, which realizes the decoupling of billing logic and business logic by only recording necessary billing point data and storing it in a billing data table as the data source of the billing process during the business request processing, and can flexibly perform billing according to the corresponding billing logic through the set billing cycle, billing time, prepaid and postpaid type and billing type of billing strategy, which can be widely compatible with various network service billing requirements and quickly adapt to changes in business requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings: Figure 1 It is a flowchart of a network service method provided by an embodiment of the present application; Figure 2 It is a billing order sequence diagram of a network service method provided by an embodiment of the present application; Figure 3 It is a structural diagram of a network service system provided by an embodiment of the present application; Figure 4 It is a structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0017] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0018] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0019] It should be understood that although the terms first, second, third, etc. may be used to describe the acquisition modules in the embodiments of the present invention, the acquisition modules should not be limited to these terms. These terms are only used to distinguish the acquisition modules from each other.
[0020] The word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.
[0021] It should be noted that the directional words such as "upper", "lower", "left", and "right" described in the embodiments of the present invention are described at the angles shown in the drawings and should not be understood as limiting the embodiments of the present invention. In addition, in the context, it should also be understood that when it is mentioned that an element is formed "on" or "under" another element, it can not only be formed directly "on" or "under" another element, but also be formed "on" or "under" another element indirectly through an intermediate element.
[0022] See also Figure 1 , 2 , an embodiment of the present invention provides a network service billing method, comprising: Step S101, in response to the activation of the billing service, the billing tracking point data is recorded and stored in the billing data table through a scheduled task, and a billing order is created using the billing policy corresponding to the current billing service and added to the billing queue; Specifically, one or more billing services are planned in advance according to the business requirements and billing methods of the billing products, one or more billing strategies are added under the billing services, and one or more different billing units are added under the billing strategies according to different specifications of the billing products; Users use the product to activate services and billing services, record the billing data during the service request processing, and store it in the billing data table in the specified format through a scheduled task. During the billing service process, the information in the billing data table is obtained as the data source for executing billing; a billing order is created using the billing policy corresponding to the enabled billing service. When multiple billing policies are used at the same time, a different billing order is created for each billing policy. In addition, there can only be one long-term valid billing order for each billing policy, or there can be multiple billing orders but the time periods between each billing order do not overlap. After the billing order is created, it is automatically added to the billing queue.
[0023] Among them, the billing service includes a number of billing service information, and the billing service information includes: the billing service unique identifier, the billing service name, the billing product to which it belongs, the billing service status and other information. The billing service status includes valid, locked and invalid status. When the billing service status is locked, the billing service cannot be used to add new billing policies, billing units and billing orders. The created billing orders can continue to be billed and generate billing bills. Before the billing service expires, ensure that all billing policies, billing units and billing orders associated with the billing service are invalid or closed. After the billing service expires, new data cannot be added based on the billing service.
[0024] The billing policy is used to determine the billing details of the billing service. A billing service can add multiple different types of billing policies, and one or more of the multiple billing policies can be used at the same time; the billing policy includes several billing policy information, and the billing policy information includes: the billing policy unique identifier, the billing policy name, the billing service to which it belongs, the billing cycle, the billing time, the prepaid or postpaid type, the billing type and the billing policy status.
[0025] The billing cycle refers to the time span unit for each billing, such as daily, monthly, and annually. If the actual usage time is less than one billing cycle, it is necessary to determine whether to charge according to the time proportion according to the actual billing needs. If so, it is based on: , calculate the final fee for this billing cycle; The billing time refers to the time for executing the billing timer task. For example, it is set to the starting time of the billing cycle, such as midnight of each day, midnight of the 1st of each month, and midnight of January 1st of each year. This embodiment also supports dynamic configuration of the billing time to meet the situation when billing needs to be executed after the dependent data task is completed. For example, a certain pay-as-you-go billing service completes the statistics of the previous day's usage data at 2 a.m. every day, and the billing time is configured to be after 2 a.m.; Prepaid and postpaid types include prepaid type and postpaid type. Prepaid type means that the fees of the current billing cycle are billed at the beginning of each billing cycle, which is only applicable to subscription billing; postpaid type means that the fees of the previous billing cycle are billed at the beginning of each billing cycle, which is applicable to all billing types; Billing types include subscription billing, pay-as-you-go billing, pay-per-use billing, and resource package billing. Subscription billing is billing by time, with a fixed fee for each time period, which is usually consistent with the billing period. If it is inconsistent, it is calculated based on the actual time unit; pay-as-you-go billing is billing based on actual usage data within a billing period; pay-per-use billing is a one-time billing, which is unrelated to the billing period and prepaid or postpaid type; resource package billing is pre-purchased balance, and deductions are made in each billing period based on actual usage. When the balance is insufficient, an alert is sent, and the service is stopped when the balance is exhausted; The billing policy status includes valid, locked and invalid. When the billing policy status is locked, new billing units and billing orders cannot be added using the billing policy, and the created billing orders can continue to be billed and generate billing bills; before the billing policy expires, ensure that all billing units and billing orders associated with the billing policy have expired or been closed. After the billing policy expires, new data cannot be added based on the billing policy.
[0026] The billing unit refers to the basic unit of the billing product price. The billing unit includes several billing unit information, including: the billing unit unique identifier, the billing unit name, the billing service to which it belongs, the billing policy to which it belongs, the currency, the unit price, the price unit, the configuration information and the billing unit status. A billing strategy can add multiple different billing units according to the specifications of the billing product. For example, the billing of a billing product CDN (content distribution network) is usually divided into bandwidth billing and transcoding billing. According to different bandwidths, different transcoding methods or different transcoding resolutions, the billing products can be divided into different specifications, and different specification codes are defined and written into the configuration information of the corresponding billing units. For example, the codes "CDN:transcode:h264:1080" and "CDN:transcode:h264:2k" are used to represent the specifications of CDN transcoding with different resolutions, where the first digit represents the product CDN, the second digit represents transcoding or bandwidth, the third digit represents the transcoding method, and the fourth digit represents the transcoding resolution; a billing strategy can use one or more billing units at the same time. When using multiple billing units at the same time, the billing unit unique identifiers of all the billing units used need to be included in the billing order created by the billing strategy; the unit price is the price of each price unit. For example, the price unit is per day and the billing cycle is per month, then the total cost of the billing cycle is When the billing type is subscription billing and pay-per-use billing, the billing strategy to which it belongs can only add or use one billing unit. When the billing type is pay-as-you-go and multiple billing units are used at a time, the specifications are indicated in the billing unit configuration information as needed. When obtaining the billing amount from the billing data table, the billing unit is grouped according to the specifications to determine the quantity under each specification, and then matched with the specifications in the billing unit configuration information. For example, the configuration specification in the configuration information of a billing unit is "CDN:transcode:h264:1080". Filter all data with code "CDN:transcode:h264:1080" in the table, and then filter by time to obtain the billing amount of the billing cycle to further determine the final fee; the billing unit status includes valid, locked and invalid status. When the billing unit status is locked, the billing unit cannot be used to add new billing orders. The created billing orders can continue to generate billing bills. Before the billing unit expires, it is necessary to ensure that all billing orders associated with the billing unit are closed. After the billing unit expires, new data cannot be added based on this billing unit.
[0027] A billing order is the only proof of billing. All billing invoices are generated based on billing orders. Billing orders are executed once in each billing cycle until they are manually closed or automatically closed upon expiration. Billing orders include several billing order information, including: unique order number, user information, billing service, billing policy, one or more billing units included, billing order status, start date and end date; billing order status includes created, billing, settling and closed.
[0028] Step S102, scanning the billing queue through a scheduled task, obtaining a billing order whose billing time matches the current time, reading the billing order and its basic information, performing billing according to the billing policy corresponding to the billing order in the basic information, and generating a billing bill using the billing logic corresponding to the billing policy; The specific logic of scanning the billing queue through a scheduled task is as follows: A 14-digit string is used to represent a scheduled task expression. Usually, a simple task expression only involves elements such as year, month, day, hour, minute, and second. In this embodiment, each element is represented by a digital string and connected together to obtain a 14-digit simple scheduled task expression. Taking Java syntax as an example, the format is: yyyyMMddhhmmss. For example, 20241212020000 means that the task will be executed at 2:00:00 am on December 12, 2024.
[0029] Usually, billing tasks need to be repeatedly executed according to the billing cycle, such as once a day, once a month, etc. A special numeric string is required to indicate that the wildcard on each element can be executed at any time. This embodiment uses the number 9 as the wildcard number for all elements. For example, 9999999999999 means that the task will be executed once every year, every month, every day, every hour, every minute, and every second, that is, once every second.
[0030] The above task expressions make it easier to assign task expressions to each billing policy. You can also see the billing time more intuitively through the task expressions on the billing policy. In the actual execution process, there is often more than one task expression corresponding to each time point (every second). For example, the two task expressions 20241224102000 and 999999999999999 will both execute tasks at 10:20:00 on December 24, 2024. In addition, the two task expressions are split into six elements according to year, month, day, hour, minute, and second. The position of each element in the two task expressions is fixed, and the new task expression formed by arbitrarily exchanging the elements in the same position can represent the execution of the task at this time. For example, 99991224109900 can still represent the execution of the task at 10:20:00 on December 24, 2024. Therefore, there are 64 task expressions that can represent each specific execution time accurate to the second, which is 2 to the power of 6. This requires using the current time to build 64 task expressions each time a scheduled task is executed, and then using range query in the billing queue to obtain the billing order that matches the current time task expression to execute billing.
[0031] Specifically, after a billing order is created, the billing queue is continuously scanned through a scheduled task to obtain billing orders that match the current time. If the billing order start date, i.e., the billing time, matches the current time, billing will be executed in each billing cycle. If the billing order start date is a future date, no billing will be performed until the time reaches the future date. Optionally, a manual billing interface is also included. After a billing order is created, the corresponding billing order can be filtered through the manual billing order related information to execute billing. For example, the user ID can be passed in to bill all the user's orders being executed according to the natural billing cycle. The specific order number can also be passed in to execute billing for only a certain order. The billing service and billing strategy can also be passed in. When billing starts, the basic information of the billing order and its billing services, billing policies, etc. is read. One or more billing services of the billing product are stored in the billing data table, which contains the unique ID of the billing service. When there are multiple billing services, the scope is first narrowed by reading the billing services to which the billing order belongs, and then the corresponding billing logic is used to generate the billing bill according to the billing type in the billing policy, including: When the billing type is subscription billing, obtain the unit price in the billing unit, calculate the bill amount based on the unit price and billing quantity, and write it into the billing bill; the billing quantity is based on the price unit in the billing unit. For example, if the subscription billing price unit is monthly and the billing cycle is monthly, the billing quantity of subscription billing is 1. In special cases, if the billing cycle is monthly but the price unit in the billing unit is daily, the number of days in the month is used as the billing quantity; When the billing type is pay-as-you-go, the configuration information of the billing service and the billing unit is matched with the data in the billing data table to obtain the billing amount of the billing period, calculate the billing quantity according to the billing amount, obtain the unit price in the billing unit, calculate the bill amount according to the unit price and the billing quantity, and write it into the billing bill; for example, the unit price of the file storage service is 10 yuan / GB, and less than 1GB is calculated as 1GB, the price unit is per GB, the billing amount is 1025MB, and the billing amount of 1025MB is converted into a billing quantity of 2, and the bill amount is 10×2=20 yuan; When the billing type is pay-per-use, the predetermined billing amount is input externally, and the bill amount is calculated based on the billing amount and the number of times and written into the billing bill; When the billing type is resource package billing, no billing invoice is generated, and the balance of the resource package is directly deducted.
[0032] The billing invoice is the accounting information after billing is executed for each billing cycle, including billing order information, currency, bill amount and billing period.
[0033] Step S103, in response to the closing of the billing service, the billing order status is modified to being settled, the billing order is removed from the billing queue and added to the settlement queue, settlement is performed through a scheduled task and the billing order status is modified to closed.
[0034] When the user closes the billing service or the billing service expires and automatically closes, the order status is changed to being settled, the billing order is removed from the billing queue and added to the settlement queue, the settlement deadline and settlement execution date are specified, and the settlement queue is continuously scanned by a scheduled task. After settlement on the settlement execution date, the order status is changed to closed and the settlement queue is removed. For example, in the case of postpaid pay-as-you-go billing, when the billing service is closed, the billing volume data of the billing service from the start to the closing stage cannot be immediately obtained, and the billing order cannot be closed immediately. The billing order is added to the settlement queue, the settlement deadline is set to the billing service closing date, and the settlement execution date is set to after the settlement deadline. The settlement queue is scanned by a scheduled task, and the deduction is performed on the settlement execution date and the billing order is closed, and the closed billing order is removed from the settlement queue.
[0035] A network service billing method provided by an embodiment of the present invention realizes the decoupling of billing logic and business logic by only recording necessary billing point data and storing it in a billing data table as the data source for the billing process during the business request processing, and can flexibly perform billing according to the corresponding billing logic through the set billing cycle, billing time, prepaid and postpaid type and billing type of billing strategy, which can be widely compatible with various network service billing requirements and quickly adapt to changes in business requirements.
[0036] See also Figure 3 Another embodiment of the present invention provides a network service billing system 200, including: The order creation module 201 is configured to respond to the activation of the billing service, record the billing tracking data and store it in the billing data table through a scheduled task, create a billing order using the billing policy corresponding to the current billing service and add it to the billing queue; The billing module 202 is configured to scan the billing queue through a scheduled task, obtain a billing order whose billing time matches the current time, read the billing order and its basic information, perform billing according to the billing policy corresponding to the billing order in the basic information, and generate a billing bill using the billing logic corresponding to the billing policy; The settlement module 203 is configured to, in response to the closing of the billing service, modify the billing order status to being settled, remove the billing order from the billing queue and add it to the settlement queue, perform settlement through a scheduled task and modify the billing order status to be closed.
[0037] Furthermore, it also includes a pre-processing module configured to plan one or more billing services in advance according to the business requirements and billing methods of the billing products; add one or more billing strategies under the billing services, and add one or more billing units under the billing strategies according to different specifications of the billing products; A billing service module, wherein the billing service module includes some billing service information, wherein the billing service information includes: a unique identification of the billing service, a name of the billing service, a billing product to which the billing service belongs, and a billing service status, wherein the billing service status includes valid, locked, and invalid status; A charging policy module, wherein the charging policy module includes several charging policy information, wherein the charging policy information includes: a unique identification of the charging policy, a name of the charging policy, a charging service to which it belongs, a charging cycle, a charging time, a prepaid or postpaid type, a charging type, and a charging policy status; the charging types include subscription charging, pay-per-use charging, pay-per-use charging, and resource package charging; The billing bill generation module is configured to generate a billing bill according to the corresponding billing logic according to different billing types: when the billing type is subscription billing, the unit price in the billing unit is obtained, and the bill amount is calculated according to the unit price and the billing quantity and written into the billing bill; when the billing type is pay-as-you-go billing, the configuration information of the billing service and the billing unit is matched with the data in the billing data table to obtain the billing amount of the billing cycle, calculate the billing quantity according to the billing amount, and then obtain the unit price in the billing unit, calculate the bill amount according to the unit price and the billing quantity and write into the billing bill; when the billing type is pay-as-you-go billing, the billing amount is passed in externally, and the bill amount is calculated according to the billing amount and the number of times and written into the billing bill; when the billing type is resource package billing, no billing bill is generated, and the balance of the resource package is directly deducted.
[0038] It should be noted that the network service billing system 200 provided in this embodiment corresponds to a technical solution that can be used to execute various method embodiments, and its implementation principle and technical effects are similar to the methods, which will not be repeated here.
[0039] See also Figure 4 Another embodiment of the present invention further provides an electronic device 300 for implementing the above-mentioned network service billing method. The electronic device 300 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 to a random access memory (RAM) 303 to implement the method of each embodiment described in the present invention. In the RAM 303, various programs and data required for the operation of the electronic device 300 are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0040] Typically, the following devices may be connected to the I / O interface 305: an input device 306 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 308 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 309. The communication device 309 may allow the electronic device 300 to communicate with other devices wirelessly or by wire to exchange data. Figure 4 The electronic device 300 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0041] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart, thereby implementing the method described above. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 309, or installed from the storage device 308, or installed from the ROM 302. When the computer program is executed by the processing device 301, the above-mentioned functions defined in the method of the embodiment of the present invention are executed.
[0042] Another embodiment of the present invention further provides a computer-readable storage medium, which may be included in the above electronic device or may exist independently without being installed in the electronic device. The computer program can be implemented when executed by a processor.
[0043] The above description is only a preferred embodiment of the present invention. Those skilled in the art should understand that the scope of disclosure involved in the present invention is not limited to the technical solution formed by a specific combination of the above technical features, but also should cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present invention (but not limited to) to form a technical solution.
Claims
1. A network service billing method, characterized in that: include: In response to the activation of the billing service, the billing tracking data is recorded and stored in the billing data table through a scheduled task. The billing order is created using the billing policy corresponding to the current billing service and added to the billing queue. Scan the billing queue through a scheduled task, obtain a billing order whose billing time matches the current time, read the billing order and its basic information, perform billing according to the billing policy corresponding to the billing order in the basic information, and generate a billing bill using the billing logic corresponding to the billing policy; In response to the closing of the billing service, the billing order status is modified to being settled, the billing order is removed from the billing queue and added to the settlement queue, settlement is performed through a scheduled task, and the billing order status is modified to closed.
2. A network service billing method according to claim 1, characterized in that: Also includes: Plan one or more billing services in advance based on the business requirements and billing methods of the billing products; Add one or more billing strategies under the billing service, and add one or more billing units under the billing strategy according to different specifications of the billing product.
3. A network service billing method according to claim 2, characterized in that: The billing service includes some billing service information, and the billing service information includes: a unique billing service identifier, a billing service name, a billing product, and a billing service status. The billing service status includes valid, locked, and invalid status.
4. A network service billing method according to claim 2, characterized in that: The charging policy includes several charging policy information, including: a unique identification of the charging policy, a name of the charging policy, a charging service, a charging cycle, a charging time, a prepaid or postpaid type, a charging type and a charging policy status; The billing types include subscription billing, pay-per-use billing, pay-per-time billing and resource package billing.
5. A network service billing method according to claim 4, characterized in that: It also includes generating billing bills based on different billing types using corresponding billing logic: When the billing type is subscription billing, the unit price in the billing unit is obtained, the bill amount is calculated based on the unit price and the billing quantity, and the bill amount is written into the billing bill; When the billing type is pay-as-you-go, the data in the billing data table are matched according to the configuration information of the billing service and the billing unit to obtain the billing amount of the billing period, calculate the billing quantity according to the billing amount, obtain the unit price in the billing unit, calculate the bill amount according to the unit price and the billing quantity, and write it into the billing bill; When the billing type is pay-per-use, the billing amount is input externally, and the bill amount is calculated based on the billing amount and the number of times and written into the billing bill; When the billing type is resource package billing, no billing bill is generated, and the balance of the resource package is directly deducted.
6. A network service billing method according to claim 5, characterized in that: The billing unit includes a unique billing unit identifier, a billing unit name, a billing service, a billing policy, a currency, a unit price, a price unit, configuration information and a billing unit status, wherein the billing unit status includes valid, locked and invalid status.
7. A network service billing method according to claim 1, characterized in that: The billing order includes a unique order number, user information, a billing service, a billing policy, one or more billing units, a billing order status, a start date, and an end date. The billing order status includes created, billing, settling, and closed.
8. A network service billing method according to claim 1, characterized in that: The billing invoice includes billing order information, currency, bill amount and bill period.
9. A network service billing system, characterized in that: include: An order creation module is configured to respond to the activation of the billing service, record the billing tracking data and store it in the billing data table through a scheduled task, create a billing order using the billing policy corresponding to the current billing service and add it to the billing queue; The billing module is configured to scan the billing queue through a scheduled task, obtain a billing order whose billing time matches the current time, read the billing order and its basic information, perform billing according to the billing policy corresponding to the billing order in the basic information, and generate a billing bill using the billing logic corresponding to the billing policy; The settlement module is configured to modify the billing order status to being settled in response to the closing of the billing service, remove the billing order from the billing queue and add it to the settlement queue, perform settlement through a scheduled task and modify the billing order status to be closed.
10. A network service billing system according to claim 9, characterized in that: Also includes: A pre-processing module configured to plan one or more billing services according to the business requirements and billing methods of the billing products; Add one or more billing policies under the billing service, and add one or more different billing units under the billing policy according to different specifications of the billing service; A billing service module, wherein the billing service module includes some billing service information, wherein the billing service information includes: a unique identification of the billing service, a name of the billing service, a billing product to which the billing service belongs, and a billing service status, wherein the billing service status includes valid, locked, and invalid status; A charging policy module, wherein the charging policy module includes several charging policy information, wherein the charging policy information includes: a unique identification of the charging policy, a name of the charging policy, a charging service to which it belongs, a charging cycle, a charging time, a prepaid or postpaid type, a charging type, and a charging policy status; the charging types include subscription charging, pay-per-use charging, pay-per-use charging, and resource package charging; The billing bill generation module is configured to generate a billing bill according to the corresponding billing logic according to different billing types: when the billing type is subscription billing, the unit price in the billing unit is obtained, and the bill amount is calculated according to the unit price and quantity and written into the billing bill; when the billing type is pay-as-you-go billing, the configuration information of the billing service and the billing unit is matched with the data in the billing data table to obtain the billing amount of the billing cycle, calculate the billing quantity according to the billing amount, and then obtain the unit price in the billing unit, calculate the bill amount according to the unit price and the billing quantity and write into the billing bill; when the billing type is pay-as-you-go billing, the billing amount is passed in externally, and the bill amount is calculated according to the billing amount and the number of times and written into the billing bill; when the billing type is resource package billing, no billing bill is generated, and the balance of the resource package is directly deducted.
Citation Information
Patent Citations
Parking charging management system
CN109215142A
Online charging method and device, computer equipment and storage medium
CN109787781A
Charging management system, method and equipment of cloud computing product and readable storage medium
CN114331404A
Automatic fee bill settlement method and device, computer equipment and storage medium
CN117196595A
Consumer-to-consumer settlement apparatus and program
JP2005182665A
Cited By
Method, system and equipment for determining bill period fee deduction amount of brand store
CN121146748A