Call bill charging method and device, equipment and storage medium
Through hash distribution and thread pool calculation methods, the efficiency of call order billing is improved, the problem of low billing efficiency in the existing technology is solved, and the real-time billing needs are met.
Patent Information
- Application Number
- CN202411747565.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-04-15
AI Technical Summary
The existing communication billing system is inefficient when handling a large number of call billing requests and cannot meet the market demand for real-time payment.
By getting the billing request for the call sheet, its hash value is calculated, and distributed to the matching billing instance. The billing instance identifies the billing number, adds the number placement queue, deduplication and adds the queue to be calculated, and uses the thread pool to perform call order calculation.
It improves the efficiency of call order billing and can meet the needs of real-time billing of market conversation orders.
Smart Images

Figure CN119835098A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of communication technology, and in particular to a call billing method, device, equipment and storage medium. Background Art
[0002] The core of the existing communication billing system is to complete the billing authentication / authorization, billing, reserved deduction and other operations of user service use through functional modules such as scheduling preprocessing, batch pricing, and balance management. At present, the technical structure of the existing communication billing system is complex. When the billing demand for call bills is large, the billing time will be long, which cannot meet the market demand for real-time billing. Therefore, how to improve the billing efficiency of call bills is a technical problem that needs to be solved urgently by those skilled in the art. Summary of the invention
[0003] In view of this, the present disclosure proposes a call billing method, apparatus, device and storage medium, which can improve the billing efficiency of call bills.
[0004] According to a first aspect of the present disclosure, a method for billing a call is provided, comprising:
[0005] Obtaining a billing request for a call record and calculating a hash value of the billing request;
[0006] Distribute the billing request to a matching billing instance according to the hash value of the billing request;
[0007] After receiving the billing request, the billing instance identifies the billing number from the billing request and adds the billing number to the number delivery queue corresponding to the billing instance;
[0008] Read a preset number of billing numbers from the number delivery queue, remove duplicate numbers, and add them to the queue of numbers to be calculated corresponding to the billing instance;
[0009] At least two thread pools corresponding to the billing instance are used to pull billing numbers from the queue of numbers to be calculated to perform call bill calculation, and the call bill calculation results are output.
[0010] In a possible implementation, when a billing number is pulled from the queue of numbers to be calculated to calculate a call bill, the process includes:
[0011] Obtain the monthly call bill, package and product information corresponding to the billing number;
[0012] Based on the monthly call bill, the package and the product information, determine the secondary consumption account of the current month corresponding to the billing number, wherein the secondary consumption account of the current month includes at least two preset billing items;
[0013] Based on the secondary consumption account of the current month, a call bill calculation result of the current month for the billing number is generated.
[0014] In a possible implementation, before obtaining the monthly call bill, package, and product information corresponding to the billing number, the method further includes:
[0015] Obtaining basic account information corresponding to the billing number;
[0016] Determining whether the basic account information is valid;
[0017] After determining that the basic information is valid, the operation of obtaining the monthly call bill, package and product information corresponding to the billing number is performed.
[0018] In a possible implementation, after obtaining the monthly call bill, package and product information corresponding to the billing number, the method further includes:
[0019] Based on the monthly call bill, the package and the product information, determining whether the billing number needs to be billed;
[0020] When it is determined that the billing number needs to be billed, an operation of determining the secondary consumption account of the current month corresponding to the billing number is performed based on the call bill of the current month, the package and the product information.
[0021] In a possible implementation, when it is determined that the billing number does not require billing, it is further determined whether the billing number is configured with a special product;
[0022] When it is determined that the billing number is configured with a special product, the secondary consumption account for the current month corresponding to the billing number is determined based on the call bill for the current month, the package, the product information and the billing rules of the special product.
[0023] According to a second aspect of the present disclosure, a device for billing a call is provided, comprising:
[0024] A hash value calculation module, used to obtain a billing request of a call record and calculate a hash value of the billing request;
[0025] A billing request distribution module, used for distributing the billing request to a matching billing instance according to a hash value of the billing request;
[0026] A billing number identification module, used for the billing instance to identify the billing number from the billing request after receiving the billing request, and add the billing number to the number delivery queue corresponding to the billing instance;
[0027] A billing number preprocessing module, used for reading a preset number of billing numbers from the number delivery queue and adding them to the queue of numbers to be calculated corresponding to the billing instance after removing duplicate numbers;
[0028] The result output module is used to use at least two thread pools corresponding to the billing instance to pull the billing number from the queue of numbers to be calculated to perform call bill calculation, and output the call bill calculation result.
[0029] According to a third aspect of the present disclosure, a call billing device is provided, comprising: a processor; and a memory for storing processor executable instructions; wherein the processor is configured to execute the method described in the first aspect of the present disclosure.
[0030] According to a fourth aspect of the present disclosure, a non-volatile computer-readable storage medium is provided, on which computer program instructions are stored, wherein the computer program instructions, when executed by a processor, implement the method described in the first aspect of the present disclosure.
[0031] The present disclosure provides a method, device, equipment and storage medium for billing of a call, the method comprising: obtaining a billing request of a call, and calculating a hash value of the billing request; distributing the billing request to a billing instance matching the billing request according to the hash value of the billing request; after receiving the billing request, the billing instance identifies a billing number from the billing request, and adds the billing number to a number delivery queue corresponding to the billing instance; reading a preset number of billing numbers from the number delivery queue, performing number deduplication, and adding the numbers to be calculated queue corresponding to the billing instance; using at least two thread pools corresponding to the billing instance to pull billing numbers from the number queue to be calculated for billing calculation, and outputting the bill calculation result. The method disclosed in the present disclosure can greatly improve the billing efficiency of the call, thereby meeting the market demand for real-time billing of call.
[0032] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.
[0034] Figure 1 A flow chart showing a method for billing a call according to an embodiment of the present disclosure is shown;
[0035] Figure 2 An example flow chart of a method for billing a call according to an embodiment of the present disclosure is shown;
[0036] Figure 3A schematic block diagram of a telephone bill charging device according to an embodiment of the present disclosure is shown;
[0037] Figure 4 A schematic block diagram of a telephone billing device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0038] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.
[0039] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0040] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.
[0041] <Method Example>
[0042] Figure 1 A flow chart of a method for billing a call according to an embodiment of the present disclosure is shown. Figure 1 As shown, the method includes steps S1100-S1500.
[0043] S1100, obtain the billing request of the call bill and calculate the hash value of the billing request. Specifically, the http service established based on the netty library is used to receive the URL billing request of the call bill. The format of the billing request can be as follows, http: / / XXX:XXX / {billing number}. Among them, the GET request is used to directly calculate the monthly fee of the billing number, and the POST request needs to set the billing number and the specified month in json format, so as to realize the billing of the call bill generated by the billing number in the specified month.
[0044] It should be noted here that the system is configured with multiple billing instances for call billing. In this way, when the system receives a large number of call billing requests, the multiple call billing requests received can be allocated to different billing instances for synchronous call bill billing, thereby improving the billing efficiency of the call bill.
[0045] When allocating the billing request of the call sheet, execute step S1200, and distribute the billing request to the matching billing instance according to the hash value of the billing request. Specifically, first use a hash algorithm to calculate the hash value of the call sheet billing request. Then, the billing requests with the same hash value are allocated to the same billing instance for billing processing. Since the billing number is the same, the corresponding billing request for the billing number is the same. If the billing request is the same, then the hash value calculated based on the billing request is also the same. Therefore, allocating the billing request with the same hash value to the same billing instance is actually allocating the billing request of the same billing number to the same billing instance for processing. In this way, when billing the same billing number, the billing information of the same billing number that has been loaded in the billing instance can be used for billing, thereby avoiding the loading of duplicate information to achieve further improvement in billing efficiency.
[0046] S1300, after receiving the billing request, the billing instance identifies the billing number from the billing request and adds the billing number to the number delivery queue corresponding to the billing instance. Specifically, a number delivery queue is configured for each billing instance in the system, so that after receiving the billing request, each billing instance can parse the billing number in the billing request and store it in the corresponding number delivery queue for further billing processing.
[0047] Furthermore, a queue of numbers to be calculated is configured for each billing instance in the system.
[0048] For each instance, after the billing number identified in the billing request is added to the number delivery queue corresponding to the billing instance, step S1400 is executed to read a preset number of billing numbers from the number delivery queue, deduplicate the numbers, and add them to the queue of numbers to be calculated corresponding to the billing instance. The preset number can be set according to the specific application scenario. For example, the preset number can be set to 500, that is, 500 billing numbers are read from the number delivery queue each time, and the 500 billing numbers are deduplicated and added to the queue of numbers to be calculated corresponding to the billing instance.
[0049] Furthermore, the preset number can be flexibly adjusted according to the scale of the billing instance, the frequency of the number to be processed, and the system computing resources, so that the billing method of the present application can be adapted to different systems and different billing requirements. The preset number is related to the hardware environment. The minimum configuration of the hardware environment is 64G memory and 8-core CPU, and the corresponding preset number is set to 500. The larger the memory, the larger the preset number. Specifically, when the memory increases linearly by n times, the preset number can increase linearly by 2n times.
[0050] Furthermore, at least two thread pools are configured for each billing instance in the system.
[0051] For each instance, after a preset number of billing numbers are read from the number delivery queue and deduplicated and added to the queue of numbers to be calculated corresponding to the billing instance, step S1500 will be executed, and at least two thread pools corresponding to the billing instance will be used to pull the billing numbers from the queue of numbers to be calculated for call record calculation, and output the call record calculation results.
[0052] In a possible implementation, when at least two thread pools corresponding to a billing instance are used to pull billing numbers from a queue of numbers to be calculated, the implementation is based on CountDownLatch. Specifically, for at least two thread pools corresponding to a billing instance, a global reduction counter countdownLatch.countDown() is initialized, each thread pool performs billing operations on the billing numbers that have been pulled, and after the billing of all the pulled billing numbers is completed, the reduction counter -1 is triggered. In this way, after all thread pools corresponding to a billing instance complete the billing of all the pulled billing numbers, the count of the reduction counter will be reduced to 0. At this time, the operation of allowing each thread pool to continue to pull billing numbers from the queue of numbers to be calculated is resumed due to the call to countdownLatch.await().
[0053] That is to say, at least two thread pools corresponding to the billing instance will simultaneously pull a certain number of billing numbers from the queue of numbers to be calculated for billing, and after all thread pools corresponding to the billing instance have completed the billing calculation, new billing numbers will be pulled from the queue of numbers to be calculated for billing, and so on, until all the billing numbers in the queue of numbers to be calculated are processed. This design can solve the synchronization problem between multiple threads, and each batch is executed before the next batch to ensure accuracy, avoiding repeated number calculations.
[0054] In a possible implementation, for each thread pool, when a billing number is pulled from a queue of numbers to be calculated to calculate a call record, the following steps may be included:
[0055] First, obtain the monthly call records, packages, and product information corresponding to the billing number.
[0056] It should be noted here that each billing number is pre-configured with corresponding package and product information, which records the billing information that affects the billing price. In order to improve the subsequent billing efficiency, the package and product information corresponding to the billing number can be pre-loaded into the computing memory. In this way, when the call bill is subsequently billed, the package and product information corresponding to the billing number can be directly obtained from the memory without having to obtain it through database query every time, thereby improving the efficiency of obtaining the package and product information corresponding to the billing number, and further improving the billing efficiency of the entire call bill.
[0057] Second, based on the acquired monthly call bill, package and product information, determine the secondary consumption account corresponding to the billing number for the current month. The secondary consumption account for the current month includes at least two preset billing items. In this way, when the monthly call bill, package and product information corresponding to the billing number is acquired, the billing items in the secondary consumption account can be classified and recorded to improve the calculation efficiency of the secondary consumption account for the current month.
[0058] In one possible implementation, each billing item in the secondary account of the current month is provided with a corresponding digital identifier. Thus, when querying each billing item in the secondary account of the current month to calculate the monthly consumption amount, corresponding data query can be performed based on the digital identifier corresponding to the billing item, thereby improving the efficiency of billing item query and further improving the billing efficiency of the call record.
[0059] In a possible implementation, the secondary account of the month includes at least two of the following billing items and corresponding digital identifiers: 200001 voice consumption, 200003 data consumption, 200005 SMS consumption, 200007 MMS consumption, 200010 voice call forwarding consumption, 200020 caller ID, 200030 international SMS sending, 200040 IP phone, 10193 phone, 200100 monthly rent, 200200 minimum consumption, 200201 refund for exceeding the monthly fee cap, 200301 shutdown number protection fee, 200302 power leakage reminder, 200303 new version of power leakage reminder, 200304 voice VPN and 200305 one-time deduction.
[0060] Third, based on the secondary consumption account of the month, generate the call bill calculation result of the billing number of the month.
[0061] In a possible implementation, when generating the monthly call bill calculation result of the billing number based on the secondary consumption account of the month, the following steps may be included:
[0062] First, based on the secondary consumption account of the month, the initial consumption amount of the billing number of the month is calculated. Specifically, each billing item in the secondary consumption account of the month is read, and the initial consumption amount of the billing number of the month is calculated according to the consumption amount corresponding to each billing item.
[0063] Second, based on the initial consumption amount at the beginning of the month, determine whether the minimum consumption or maximum consumption standard is met for the current month. When determining that the minimum consumption or maximum consumption standard is met for the current month, adjust the initial consumption amount for the current month based on the corresponding billing rules for the minimum consumption or maximum consumption to obtain the consumption amount for the current month.
[0064] Third, based on the monthly consumption amount, combined with at least one of the balance at the beginning of the month, the total recharge, and the total gift value corresponding to the billing number, the monthly call bill calculation result of the billing number is generated.
[0065] It should be noted that when calculating the current month's consumption, it is also necessary to determine whether the current time is the billing date. If the current time is determined to be the billing date, it is also necessary to determine whether the previous month's account has been paid. If the previous month's account has been paid, the balance in the previous month's account is used as the beginning balance of the current month. If it is determined that the previous month's account has not been paid, the previous month's call bill will also be calculated, and the balance in the previous month's call bill is used as the beginning balance of the current month.
[0066] In this embodiment, each time the call bill is billed, the call bill for the current month is billed again. In this way, when the user changes the package or product, the billing can be adjusted in time according to the adjusted package or product, so that the billing adjustment of the call bill is more real-time and accurate.
[0067] In a possible implementation, before obtaining the monthly call bill, package and product information corresponding to the billing number, the following steps are further included: obtaining the basic account information corresponding to the billing number; determining whether the basic account information is valid; and if the basic information is determined to be valid, obtaining the monthly call bill, package and product information corresponding to the billing number. By setting this up, the validity of the call billing can be increased.
[0068] Furthermore, when the thread pool starts billing for a call, the basic account information corresponding to the billing number will first be loaded into the memory to complete the judgment of whether the basic account is valid in the memory, thereby further improving the billing efficiency of the call.
[0069] It should be noted here that billing processing is not required for some special cases, such as dialing a 400 number or being called, etc. Therefore, in a possible implementation, after obtaining the monthly call bill, package and product information corresponding to the billing number, the following steps are also included:
[0070] First, based on the monthly call bill, package and product information, determine whether the billing number needs to be charged.
[0071] Second, when it is determined that the billing number needs to be billed, an operation is performed to determine the secondary consumption account of the current month corresponding to the billing number based on the call bill, package and product information of the current month.
[0072] In one possible implementation, when it is determined that the billing number does not need to be billed, it is necessary to further determine whether the billing number is configured with a special product (for example, number preservation after suspension). When it is determined that the billing number is configured with a special product, the secondary consumption account for the current month corresponding to the billing number is determined based on the call record, package, product information of the current month and the billing rules of the special product.
[0073] The present disclosure provides a method for billing a call, including: obtaining a billing request of a call, and calculating a hash value of the billing request; distributing the billing request to a billing instance matching the billing request according to the hash value of the billing request; after receiving the billing request, the billing instance identifies a billing number from the billing request, and adds the billing number to a number delivery queue corresponding to the billing instance; reading a preset number of billing numbers from the number delivery queue, performing number deduplication, and adding the numbers to be calculated queue corresponding to the billing instance; using at least two thread pools corresponding to the billing instance to pull billing numbers from the number queue to be calculated to calculate the call, and outputting the bill calculation result. The method disclosed in the present disclosure can greatly improve the billing efficiency of the call, thereby meeting the market demand for real-time billing of call.
[0074] <Method Example>
[0075] Figure 2 An example flow chart of a method for billing a call according to an embodiment of the present disclosure is shown. Figure 2 As shown, the method includes steps S2010-S2021.
[0076] S2010, placing a billing number through a billing request. The format of the billing request may be http: / / XXX:XXX / {billing number}.
[0077] S2011, Nginx distributes the billing request. Specifically, first calculate the hash value of the billing request, and then distribute the billing requests with the same hash value to the same billing instance for billing processing.
[0078] S2012: The billing instance receives a billing request.
[0079] S2013, the billing instance extracts the billing number from the received billing request, and sends the billing number to the number delivery queue corresponding to the billing instance.
[0080] S2014, read 500 billing numbers from the billing number delivery queue corresponding to the billing instance.
[0081] S2015, after removing duplicates from the 500 billing numbers read, a non-repetitive billing number sequence is formed.
[0082] S2016, adding the deduplicated billing number sequence to the queue of numbers to be calculated corresponding to the billing instance.
[0083] S2017, using at least two thread pools corresponding to the billing instance to pull the billing number from the queue of numbers to be calculated corresponding to the billing instance.
[0084] S2018, when the thread pool performs call billing for the pulled billing number, it first determines whether the current time is a billing day (for example, the 1st of each month). If the current time is not a billing day, execute step S2019; if the current time is a billing day, execute step S2021.
[0085] Step S2019, calculate the billing result of the billing number for the current month.
[0086] Step S2020, determining whether the accounts for the previous month have been issued. If it is determined that the accounts for the previous month have not been issued, executing step S2021.
[0087] Step S2021, calculate the billing result of the billing number in the previous month, and use the balance of the billing result of the previous month as the balance at the beginning of the current month, and then calculate the billing result of the billing number in the current month by combining the balance at the beginning of the current month.
[0088] <Device Example>
[0089] Figure 3 FIG. 1 is a schematic block diagram of a telephone billing device according to an embodiment of the present disclosure. Figure 3 As shown, the device 100 includes:
[0090] The hash value calculation module 110 is used to obtain the billing request of the call record and calculate the hash value of the billing request;
[0091] The billing request distribution module 120 is used to distribute the billing request to the billing instance matching it according to the hash value of the billing request;
[0092] The billing number identification module 130 is used for the billing instance to identify the billing number from the billing request after receiving the billing request, and add the billing number to the number delivery queue corresponding to the billing instance;
[0093] The billing number preprocessing module 140 is used to read a preset number of billing numbers from the number delivery queue and add them to the queue of numbers to be calculated corresponding to the billing instance after removing the duplicate numbers;
[0094] The result output module 150 is used to use at least two thread pools corresponding to the billing instance to pull the billing number from the queue of numbers to be calculated to perform call bill calculation, and output the call bill calculation result.
[0095] In a possible implementation, when the result output module pulls the billing number from the queue of numbers to be calculated to calculate the call bill, it is specifically used to:
[0096] Get the monthly call bill, package and product information corresponding to the billing number;
[0097] Based on the monthly call bill, package and product information, determine the secondary consumption account of the current month corresponding to the billing number, wherein the secondary consumption account of the current month includes at least two preset billing items;
[0098] Generate the monthly call bill calculation result of the billing number based on the secondary consumption account of the month.
[0099] In a possible implementation, the result output module, before obtaining the monthly call bill, package and product information corresponding to the billing number, is further used to:
[0100] Get the basic account information corresponding to the billing number;
[0101] Determine whether the basic account information is valid;
[0102] After determining that the basic information is valid, the operation of obtaining the monthly call bill, package and product information corresponding to the billing number is performed.
[0103] <Equipment Embodiment>
[0104] Figure 3 FIG. 1 is a schematic block diagram of a billing device according to an embodiment of the present disclosure. Figure 3 As shown, the billing device 200 includes: a processor 210 and a memory 220 for storing executable instructions of the processor 210. The processor 210 is configured to implement any of the above-mentioned billing methods when executing the executable instructions.
[0105] Here, it should be noted that the number of processors 210 may be one or more. Meanwhile, in the billing device 200 of the embodiment of the present disclosure, an input device 230 and an output device 240 may also be included. The processor 210, the memory 220, the input device 230 and the output device 240 may be connected via a bus or in other ways, which are not specifically limited here.
[0106] The memory 220 is a computer-readable storage medium that can be used to store software programs, computer executable programs, and various modules, such as the program or module corresponding to the billing method of the embodiment of the present disclosure. The processor 210 executes various functional applications and data processing of the billing device 200 by running the software programs or modules stored in the memory 220.
[0107] The input device 230 may be used to receive input numbers or signals. The signals may be key signals related to user settings and function control of the device / terminal / server. The output device 240 may include display devices such as display screens.
[0108] <Storage Medium Embodiment>
[0109] According to a fourth aspect of the present disclosure, a non-volatile computer-readable storage medium is also provided, on which computer program instructions are stored. When the computer program instructions are executed by the processor 210, any of the above-mentioned call billing methods is implemented.
[0110] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A call billing method, characterized in that: include: Obtaining a billing request for a call record and calculating a hash value of the billing request; Distribute the billing request to a matching billing instance according to the hash value of the billing request; After receiving the billing request, the billing instance identifies the billing number from the billing request and adds the billing number to the number delivery queue corresponding to the billing instance; Read a preset number of billing numbers from the number delivery queue, remove duplicate numbers, and add them to the queue of numbers to be calculated corresponding to the billing instance; At least two thread pools corresponding to the billing instance are used to pull billing numbers from the queue of numbers to be calculated to perform call bill calculation, and the call bill calculation results are output.
2. The method according to claim 1, characterized in that When a billing number is pulled from the queue of numbers to be calculated to calculate a call bill, the method includes: Obtain the monthly call bill, package and product information corresponding to the billing number; Based on the monthly call bill, the package and the product information, determine the secondary consumption account of the current month corresponding to the billing number, wherein the secondary consumption account of the current month includes at least two preset billing items; Based on the secondary consumption account of the current month, a call bill calculation result of the current month for the billing number is generated.
3. The method according to claim 2, characterized in that Before obtaining the monthly call bill, package and product information corresponding to the billing number, it also includes: Obtaining basic account information corresponding to the billing number; Determining whether the basic account information is valid; After determining that the basic information is valid, the operation of obtaining the monthly call bill, package and product information corresponding to the billing number is performed.
4. The method according to claim 2, characterized in that: After obtaining the monthly call bill, package and product information corresponding to the billing number, it also includes: Based on the monthly call bill, the package and the product information, determining whether the billing number needs to be billed; When it is determined that the billing number needs to be billed, an operation of determining the secondary consumption account of the current month corresponding to the billing number is performed based on the call bill of the current month, the package and the product information.
5. The method according to claim 4, characterized in that In the case where it is determined that the billing number does not need to be billed, further determining whether the billing number is configured with a special product; When it is determined that the billing number is configured with a special product, the secondary consumption account for the current month corresponding to the billing number is determined based on the call bill for the current month, the package, the product information and the billing rules of the special product.
6. A telephone billing device, characterized in that: include: A hash value calculation module, used to obtain a billing request of a call record and calculate a hash value of the billing request; A billing request distribution module, used for distributing the billing request to a matching billing instance according to a hash value of the billing request; A billing number identification module, used for the billing instance to identify the billing number from the billing request after receiving the billing request, and add the billing number to the number delivery queue corresponding to the billing instance; A billing number preprocessing module, used for reading a preset number of billing numbers from the number delivery queue and adding them to the queue of numbers to be calculated corresponding to the billing instance after removing duplicate numbers; The result output module is used to use at least two thread pools corresponding to the billing instance to pull the billing number from the queue of numbers to be calculated to perform call bill calculation, and output the call bill calculation result.
7. The device according to claim 6, characterized in that When the result output module extracts the billing number from the queue of numbers to be calculated to calculate the call bill, it is specifically used to: Obtain the monthly call bill, package and product information corresponding to the billing number; Based on the monthly call bill, the package and the product information, determine the secondary consumption account of the current month corresponding to the billing number, wherein the secondary consumption account of the current month includes at least two preset billing items; Based on the secondary consumption account of the current month, a call bill calculation result of the current month for the billing number is generated.
8. The device according to claim 7, characterized in that The result output module, before obtaining the monthly call bill, package and product information corresponding to the billing number, is further used to: Obtaining basic account information corresponding to the billing number; Determining whether the basic account information is valid; After determining that the basic information is valid, the operation of obtaining the monthly call bill, package and product information corresponding to the billing number is performed.
9. A telephone billing device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to implement the method described in any one of claims 1 to 5 when executing the executable instructions.
10. A non-volatile computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 5 is implemented.