A distributed billing gateway method, system and storage medium
By introducing management machines to allocate work roles and resources in the CCF cluster, the problems of low resource utilization and low reliability in traditional architectures are solved, and efficient resource utilization and system stability are achieved.
Patent Information
- Application Number
- CN201911252632.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-12-09
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2039-12-09
AI Technical Summary
The architecture that implements CCF function in related technologies has the problem of low resource utilization and low reliability.
By introducing a management machine into the CCF cluster for billing acquisition, the work roles and resources of each host are allocated according to the host information, including input machines and business machines. The management machine is elected by the host in the CCF cluster and is responsible for sending the call sheet file to the billing center.
It realizes the full utilization of host resources of the CCF cluster, improves the scalability, elasticity, resource utilization and reliability of the system, and can automatically adjust when the host is abnormal to ensure the stability of the system.
Smart Images

Figure CN113038403B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to, but are not limited to, the field of communications, and specifically, relate to, but are not limited to, a distributed charging gateway method, system, and storage medium. Background Art
[0002] In the telecommunications network described by the Third Generation Partnership Project (3GPP), the billing system is one of its important functional components and an important guarantee for operators to achieve revenue. Its main functions are as follows:
[0003] Figure 1 The diagram illustrates the composition of charging function entities in the 3GPP network and their relationships: the charging trigger function (CTF) is embedded in the 3GPP core network element. Its main function is to collect charging information based on the usage of the monitored network resources and send it to the charging data function (CDF) through the Rf interface (Offline Charging Reference Point); the main function of the CDF is to receive the charging request message (Accounting Request, ACR) sent by the CTF, construct it into charging call detail records (Call Detail Records, CDR), and send it to the charging gateway function (CGF) through the Ga interface; the main function of the CGF is to store and manage the CDR received from the CDF, and send the CDR file to the billing domain (BD) through the Bx interface. The above CDF and CGF functions are collectively called the charging collection function (CCF).
[0004] The traditional solution to implement CCF functions is generally a dual-machine architecture with active and standby functions to ensure a certain degree of disaster recovery. However, the defects of the dual-machine architecture are also quite obvious: the business runs on a single machine, the processing capacity has bottlenecks, and the scalability is poor; it cannot support the elastic scaling function of virtualization. Therefore, the traditional dual-machine architecture is increasingly unsuitable for the trend of increasing performance requirements for a single CCF and virtualization becoming the mainstream. There are roughly two solutions in related technologies:
[0005] 1. If Figure 2 As shown in the figure, multiple sets of CCF are configured, and each set of CCF has a dual-machine architecture. This solution is simple to network and has high reliability, but it wastes resources seriously, and half of the standby hosts / virtual machines are idle.
[0006] 2. If Figure 3As shown in the figure, CCF includes two clusters: interface processing and business processing. Each cluster contains several hosts / virtual machines, and the clusters work in N+M mode (i.e., N hosts are working and M hosts are standby). The interface processing is responsible for receiving billing information from CTF and distributing it to the business processing cluster, and the business processing cluster is responsible for the main call record processing. This solution has good scalability and elasticity, but if all hosts in a cluster are abnormal, the entire CCF will not work; if more than M hosts are abnormal, it will affect the processing performance, even if another cluster has idle standby hosts.
[0007] From the above, it can be seen that the architecture for implementing the CCF function in the related art has the problems of low resource utilization and low reliability. Summary of the invention
[0008] The embodiments of the present invention provide a distributed charging gateway method, system and storage medium, which mainly solve the technical problem that the architecture for implementing CCF function in the related technology has the problem of low resource utilization and low reliability.
[0009] To solve the above technical problems, an embodiment of the present invention provides a distributed charging gateway method, including:
[0010] The management machine allocates the working roles and resources of each host according to the host information in the billing collection function CCF cluster. The management machine is elected by the hosts in the CCF cluster. The working roles include input machine and business machine.
[0011] The input machine sends the billing information received from the network element to the service machine;
[0012] The business machine generates a call bill code stream according to the billing information and outputs it to a call bill file;
[0013] The management machine sends the call record file to the billing center.
[0014] The embodiment of the present invention also provides a distributed billing gateway system, including a management machine, an input machine and a service machine;
[0015] The management machine is used to allocate working roles and resources to each host according to the host information of each host, and the working roles include input machine and business machine; the management machine is elected by each host;
[0016] The input machine is used to send the billing information received from the network element to the service machine;
[0017] The business machine is used to generate a call bill code stream according to the billing information and output it to a call bill file;
[0018] The management machine is also used to send the call record file to the billing center.
[0019] An embodiment of the present invention further provides a storage medium, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the distributed billing gateway method as described above.
[0020] The beneficial effects of the present invention are:
[0021] According to the distributed billing gateway method, system and storage medium provided by the embodiments of the present invention, the distributed billing gateway method includes a management machine that allocates work roles and resources to each host according to the host information in the billing collection function CCF cluster, and the management machine is elected by the hosts in the CCF cluster; the work roles include an input machine and a business machine; the input machine sends the billing information received from the network element to the business machine; the business machine generates a call bill code stream according to the billing information and outputs it to a call bill file; the management machine sends the call bill file to the billing center. In some embodiments, the CCF cluster includes several hosts, all of which are in working state, the host can assume any role, the management machine can run on any host, the host has high availability, the CCF cluster is decentralized, and billing is achieved through the collaboration of hosts with different roles, so that the host resources of the CCF cluster are fully utilized;
[0022] Furthermore, when a host is abnormal or shut down, other hosts can take over its work; when a host recovers or joins the cluster, it can share the work of other hosts; thus, the system has high scalability, elasticity, resource utilization and reliability.
[0023] Other features and corresponding beneficial effects of the present invention are described in the latter part of the specification, and it should be understood that at least part of the beneficial effects become obvious from the description in the specification of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 This is a structural diagram of the charging function defined by 3GPP in the related technology;
[0025] Figure 2 It is a schematic diagram of a dual-machine CCF cluster in the related art;
[0026] Figure 3 A schematic diagram of a distributed CCF cluster in the related art;
[0027] Figure 4 A schematic diagram of a distributed charging gateway method according to an embodiment of the present invention;
[0028] Figure 5 A schematic diagram of a distributed CCF cluster network according to an embodiment of the present invention;
[0029] Figure 6 A schematic diagram of a distributed CCF workflow according to an embodiment of the present invention;
[0030] Figure 7 A schematic diagram of a distributed CCF capacity expansion process according to an embodiment of the present invention;
[0031] Figure 8 A schematic diagram of a distributed CCF capacity reduction process according to an embodiment of the present invention;
[0032] Fig. 9 A schematic diagram of a distributed CCF non-management machine disaster recovery process according to an embodiment of the present invention;
[0033] Fig.10 A schematic diagram of a distributed CCF management machine disaster recovery process according to an embodiment of the present invention;
[0034] Fig.11 A schematic diagram of the structure of a distributed billing gateway system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0035] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the following is a further detailed description of the embodiments of the present invention through specific implementation methods combined with the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0036] Embodiment 1:
[0037] In order to solve the problems of low resource utilization, no support for automatic scaling or low reliability in the architecture of implementing CCF function in the related art, the embodiment of the present invention provides a distributed charging gateway method, such as Figure 4 As shown, the distributed billing gateway method includes:
[0038] S401. The management machine allocates work roles and resources to each host according to the host information in the billing collection function CCF cluster.
[0039] like Figure 5 As shown, CCF is a cluster, which contains several hosts, which can be physical machines or virtual machines, and all hosts are in working state; it can be understood that the embodiment of the present invention is illustrated by this networking form, taking the virtualization of 4 hosts as an example, and the specific implementation method is not limited to this networking form and the number of hosts. Each host has full-function capabilities and can assume various work roles, including management machines, input machines and business machines, among which the management machine is elected by the hosts in the CCF cluster, and the specific work role of each host is assigned by the elected management machine.
[0040] In an embodiment of the present invention, for ease of management, each host has a unique number, and each host elects a management machine through a certain election mechanism. In an embodiment of the present invention, the election mechanism includes but is not limited to: using the host with the smallest or largest number as the management machine; randomly using a host as the management machine; the shared storage device of the CCF cluster supports common access by multiple hosts, and host 1 determines whether the shared storage device is occupied. When it is not occupied, a placeholder file is created in a specific directory of the shared storage device, and after a certain period of time, it is detected whether there are placeholder files created by other hosts under the specific target, and host 1 is used as the management machine; when the shared storage device of the CCF cluster supports exclusive access by a single host, the access time of host 1 to the first partition of the shared storage device is determined, and the first partition is mounted when the access time arrives, and when it is determined that there is no placeholder file in the first partition, host 1 is used as the management machine.
[0041] The management machine is mainly responsible for assigning work roles and resources to each host. Specifically, the management machine assigns work roles and resources to each host based on the host information in the CCF cluster; the resources include but are not limited to each host's floating IP, storage devices, applications, etc.; the host information includes but is not limited to the host number, host CPU, etc. For example, based on the host number and CPU performance from small to large, host 1 is selected from hosts 1 to 4 as the management machine, hosts 1 and 2 are assigned as input machines, and hosts 3 and 4 are assigned as business machines. The management machine can also assign work roles to itself, such as assigning host 1 as an input machine.
[0042] It is worth noting that the management machine allocates the working role and resources of each host specifically including: the management machine generates a host information table according to the host information, distributes the host information table to each host, the host information table includes the working role and resources of each host, specifically, the host information table includes the corresponding relationship between the host number-input machine number-input machine IP; through the host number and the input machine number, each host can determine its own working role as the input machine, through the host number and the input machine IP, each host can determine its own IP resources, and the input machine IP is used to receive billing information; the host information table also includes the corresponding relationship between the host number-business machine number-session index value, through the host number and the business machine number to determine its own working role as the business machine, the session index value is used by the input machine to determine which business machine to send the billing information to, in some embodiments, the host information table also includes the corresponding relationship between the host number and the management machine. As shown in Table 1, Table 1 is a host information table provided by an embodiment of the present invention, and the host information table can be flexibly adjusted according to actual needs.
[0043] Table 1
[0044]
[0045] As shown in Table 1, the management machine assigns input machine roles to hosts 1 and 2, and business machine roles to hosts 3 and 4. At the same time, the management machine assigns an input machine IP to the input machine and a session index value to the business machine.
[0046] S402. The input machine sends the billing information received from the network element to the service machine.
[0047] In the embodiment of the present invention, after each host receives the host information table, it activates the corresponding software module according to its corresponding role information, loads its corresponding resources, and the host enters the working state. The input machine establishes a connection with the core network element, receives the billing information sent by the network element, and sends the billing information to the corresponding service machine, wherein the connection established between the input machine and the network element at least supports the Rf, Ga and Nchf interfaces currently defined by 3GPP, but is not limited thereto; since there are multiple service machines, the input machine determines to which service machine the billing information is sent according to certain distribution rules; specifically, the input machine calculates the session index in the billing information to obtain the session index value, and sends the billing information to the service machine corresponding to the session index value according to the host information table. The session index is different according to different billing information. For example, in the case of IMS billing information, the session index can be ICID, and in the case of PS billing information, the session index can be CID. In an embodiment of the present invention, the input machine calculates the session index to obtain the session index value, which may be any calculation method that can achieve uniform hashing of the session ID, such as using a hash operation. In this case, the session index value is a session index hash value. Optionally, the session index hash value is evenly distributed to the business machines; that is, a hash operation is performed according to the session index in the billing information to obtain a hash value, and then the billing information is distributed to the business machine corresponding to the hash value according to the information in the host information table; assuming that A in Table 1 is a session index hash value 0-63, and B is a session index hash value 64-127, and then the input machine calculates the session ID to obtain a session index hash value of 75, then the input machine sends the billing information to business machine 2.
[0048] S403. The service machine generates a call bill code stream according to the billing information and outputs it to a call bill file.
[0049] In the embodiment of the present invention, the service machine receives the billing information, processes the call record, generates a call record code stream and writes it into the call record file; the call record processing includes but is not limited to call record filtering, sorting, association merging (such as merging the same session of multiple network elements), recoding, etc. It can be understood that the service machine can store the call record file in a shared storage device, and then the management machine can obtain the call record file corresponding to each service machine from the shared storage device.
[0050] S404: The management machine sends the call record file to the billing center.
[0051] In the embodiment of the present invention, the management machine transmits the call record file to the billing center through the Bx interface.
[0052] It should be noted that, in the embodiment of the present invention, the management machine can also implement load balancing control according to the load of each host; for example, when the CCF cluster load is high, the management machine looks for hosts with idle resources, adjusts the roles of the hosts and reallocates resources. Specifically, the management machine obtains the resource usage information of each host, and when it is determined that the resource usage information of the host exceeds the preset load threshold, it requests the Virtual Network Function Manager (VNFM) to expand the capacity and create a new host, and the management machine reallocates the work roles and resources of each host.
[0053] Each host periodically monitors its own CPU, memory and other resource usage information, and sends the resource usage information to the management machine. The resource usage information includes but is not limited to the CPU and memory of the host; the management machine determines whether the resource usage information of each host exceeds the preset load threshold. In an embodiment of the present invention, when a host exceeds the preset load threshold, the management machine can perform elastic expansion and start a new host to join the cluster to share the load of other hosts; or when the total resource usage information of all hosts exceeds the preset load threshold, elastic expansion is performed; of course, the preset load threshold can be flexibly adjusted according to actual conditions. When VNFM receives the expansion request, VNFM creates and starts a new host (the host is a virtual machine). After the new host is successfully started, it sends a message to the management machine to register and join the CCF cluster. Then the management machine can manage the new host and reallocate the work roles and resources of each host so that the new host can share the load of other hosts.
[0054] It can be understood that the management machine reallocates the work roles and resources of each host, which means that the management machine adjusts the host information table and then distributes the updated host information table to all hosts; wherein the management machine adjusts the host information table according to the load conditions of each host, as shown in Table 2, for example.
[0055] Table 2
[0056]
[0057] For example, if the load of host 3 and host 4 is too high (host CPU and memory are above a certain threshold), the management machine will assign the newly added host 5 to the role of business machine 3, and adjust the session index value. At this time, the session index hash value of business machine 1 is 0-42; the session index hash value of business machine 2 is 43-85; the session index hash value of business machine 3 is 86-127. After receiving the updated host information table, each host saves the host information table in the buffer. If the role or resources of the local machine change, the role migration or resource change is performed according to the new role resource allocation (such as unloading resources no longer allocated to itself and loading new resources allocated to itself); each host establishes a link with the network element and distributes billing information according to the new host information table.
[0058] In some embodiments, when the resource usage information of a host exceeds a preset load threshold, the management machine can also determine whether there are hosts with idle resources in the CCF cluster before requesting VNFM to expand capacity and create a new host, that is, determine whether the resources used by other hosts are surplus and can share part of the load. If there are other hosts that can share the load, the management machine will reallocate the host's work roles and resources based on the number of existing hosts, update the host information table and distribute it to each host. For example, as shown in Table 3;
[0059] Table 3
[0060]
[0061]
[0062] If the load of host 3 is too high, the load of host 2 is too low (the resource usage of host 2 is below the threshold), and host 2 has surplus resources, the work role of host 2 is reallocated to business machine 3, and the session index hash value of business machine 1 is 0-42; the session index hash value of business machine 2 is 43-85; the session index hash value of business machine 3 is 86-127; the IP of host 1 is reallocated to input machine IP1, 2, so that host 1 takes over the original work of host 2. When there are no other hosts with idle resources, the management machine requests capacity expansion from VNFM to create a new host; optionally, when there are hosts with idle resources, but the management machine cannot reduce the load of all hosts to below the preset threshold by adjusting the load of each host, the management machine requests capacity expansion.
[0063] It should be noted that when the CCF cluster load is low, the management machine can perform elastic capacity reduction, shut down some hosts, and reallocate work roles and resources to maintain the CCF cluster load within a reasonable range. Specifically, the management machine obtains the resource usage information of each host; when it is determined that the resource usage information of the host is lower than the preset load threshold, the work roles and resources of each host are reallocated, and the host whose resource usage information is lower than the preset load threshold is considered an inoperative host; the management machine requests VNFM to reduce capacity and shut down the inoperative host.
[0064] Each host periodically monitors its own CPU, memory and other resource usage information, and sends the resource usage information to the management machine. The resource usage information includes but is not limited to the host's CPU and memory; the management machine determines whether the resource usage information of each host is lower than the preset load threshold. In an embodiment of the present invention, when a host is lower than the preset load threshold, the management machine can perform elastic scaling, adjust the host information table, assign the low-load host as a non-working host, and distribute the updated host information table to all hosts; or when the total resource usage information of all hosts is lower than the preset load threshold, elastic scaling is performed; of course, the preset load threshold can be flexibly adjusted according to actual conditions. When the VNFM receives the scaling-down request, the VNFM shuts down and destroys the specified virtual machine, and the management machine can specify the host to be shut down in the scaling-down request. For example, as shown in Table 4;
[0065] Table 4
[0066]
[0067]
[0068] If the load of host 4 is too low and the loads of hosts 1, 2, and 3 are medium, the management machine assigns the working role of host 4 to a non-working host and adjusts the session index hash value of host 3 to 0-127; the management machine requests VNFM to reduce the capacity and shut down host 4.
[0069] It should be noted that the distributed charging gateway method in the embodiment of the present invention can also realize that when a host is abnormal or shut down, other hosts can take over its work. There are two situations: the host (non-management host) is abnormal or shut down; the management host is abnormal or shut down.
[0070] Case 1: The host is abnormal or shut down. The management machine detects that the heartbeat keep-alive timeout with the host has occurred and determines that the host is abnormal. The work roles and resources of each surviving host are reallocated, and the abnormal host is a non-working host. The management machine and each host periodically send messages for heartbeat detection to keep alive. When a host sends an abnormality (such as program exit, system hang, network interruption, etc.), the management machine detects that the host keep-alive timeout has occurred and determines that the host is abnormal. The management machine adjusts the host information table and distributes the updated host information table to all surviving hosts, as shown in Table 5.
[0071] Table 5
[0072]
[0073] The management machine determines that host 2 is abnormal and the loads of other hosts are normal, and allocates host 2 as a non-working host, and reallocates the IP of host 1 to input machine IPs 1 and 2, so that host 1 takes over the original work of host 2. In some embodiments, when host 2 is abnormal, and by adjusting the host information table so that the total resource usage information of each host is lower than the preset threshold, the management machine can also request VNFM to reduce capacity and shut down host 2; of course, when host 2 is abnormal and the loads of other hosts are high, the management machine can request VNFM to expand capacity and create a new host, and the new host will take over the original work of host 2.
[0074] Case 2: The management machine is abnormal or shut down. The host detects that the heartbeat keep-alive timeout of the management machine has occurred, and determines that the management machine is abnormal; the hosts in the CCF cluster re-elect a new management machine; the new management machine reallocates the work roles and resources of each surviving host. The management machine and each host periodically send messages for heartbeat detection to keep the management machine alive. If an abnormality occurs on the host where the management machine is located (such as program exit, system hang, network interruption, etc.), other hosts detect that the management machine has timed out, determine that the management machine is abnormal, re-elect, select a new management machine, and the new management machine adjusts the host information table and distributes the updated host information table to all surviving hosts, as shown in Table 6.
[0075] Table 6
[0076]
[0077] Each host 2-4 determines that the management machine is abnormal (host 1), and the hosts 2-4 re-elect and use host 2 as the new management machine. The new management machine assigns host 1 as a non-working host and assigns itself as input machine 1, with input machine IPs 1 and 2, and takes over the work of the original host 1. In some embodiments, when host 1 is abnormal, and by adjusting the host information table so that the total resource usage information of each host is lower than the preset threshold, the new management machine can also request VNFM to reduce capacity and shut down the host 1; of course, when host 1 is abnormal and the loads of other hosts are high, the new management machine can request VNFM to expand capacity and create a new host, and the new host will take over the original work of host 1.
[0078] The embodiment of the present invention provides a distributed billing gateway method, wherein a CCF cluster includes several hosts, each host elects a management machine through a certain election mechanism; the management machine determines the working role (such as input machine, business machine) and resources (such as floating IPs of each plane, storage devices, and application programs) of each host according to the host information in the CCF cluster. Each host has full functional capabilities and can assume various roles, and the specific functional roles are assigned by the elected management machine.
[0079] The management machine is elected by the cluster host, and is mainly responsible for the work roles and resource allocation of each host, and distributes the host information table; the input machine is responsible for establishing a connection with the core network element, receiving the billing information, and then the host information table distributes the billing information to the business machine; the business machine receives the billing information, processes the call record (such as call record filtering, sorting, association merging, and recoding), and generates a call record code stream and outputs it to the call record file. Through this solution, load balancing control can be achieved, and at the same time, the billing information that needs to be associated (such as the call record of the same session) can be sent to a business machine for subsequent association merging processing (such as merging the call records of the same session of multiple network elements).
[0080] Furthermore, when the CCF cluster load reaches a bottleneck (for example, the CPU and memory of a host are higher than a certain threshold), the management machine searches for a host with idle resources, adjusts the role of the host (for example, input machine->business machine, business machine->input machine) and reallocates resources (for example, reallocates the IP of the input machine, adjusts the link connecting the input machine to the network element; reallocates the distribution table to reduce the processing load of the high-load business machine) to achieve the effect of reducing the load of the high-load host. If there is no host with idle resources, the management machine can perform elastic expansion and start a new host to join the cluster through VNFM to share the load of other hosts.
[0081] Furthermore, when the CCF cluster load is low (for example, the host CPU and memory are below a certain threshold), the management machine can elastically scale down according to preset rules, shut down some hosts, readjust roles and allocate resources, and maintain the system load within a reasonable range; by reducing the number of hosts, the effect of saving resources and energy saving and emission reduction can be achieved.
[0082] Furthermore, when a host fails, the management machine can assign other hosts to take over its work. For example, if an input machine fails, other input machines can be assigned to take over its IP and connect to the original network element; if a business machine fails, the distribution table can be readjusted and its corresponding hash value can be assigned to other business machines; the host role can also be changed so that the normal hosts in the system can continue to work and achieve a new load balance as much as possible. If the management machine fails, other hosts will elect a new management machine to take over its work.
[0083] Through the distributed billing gateway method provided by this implementation, the cluster has the characteristics of decentralization (the management machine can run on any host) and full host functionality (all hosts can assume any role), thus having high scalability, elasticity, resource utilization and reliability.
[0084] Embodiment 2:
[0085] For ease of understanding, the embodiment of the present invention provides a distributed CCF normal startup and workflow, where all hosts in the CCF cluster are working hosts, such as Figure 6 As shown, the workflow includes:
[0086] S601: In the host cluster of CCF, the programs running on each host elect a management host through a certain election mechanism.
[0087] In the embodiment of the present invention, the host VM1 is selected as the management machine.
[0088] S602: The management machine allocates work roles and resources to each host according to the host information and resource information in the cluster.
[0089] In the embodiment of the present invention, the management machine can assign work roles and resources to each host in sequence according to the host number; for example, assign input machine roles to hosts 1 and 2, assign business machine roles to hosts 3 and 4, assign input machine IP1 for receiving billing information to host 1, assign input machine IP2 to host 2, and evenly distribute hash values 0-127 to the two business machines. The assigned host information table, as shown in Table 1, is distributed to all hosts in the cluster.
[0090] S603: Each host receives the host information table, activates the corresponding software module according to its corresponding role information, loads its corresponding resources, and enters the working state.
[0091] S604: The input machine is responsible for establishing a connection with the core network element and receiving billing information.
[0092] The connection established between the input machine and the network element at least supports the Rf, Ga and Nchf interfaces currently defined by 3GPP.
[0093] S605: Perform a hash operation according to the session index in the billing information to obtain a hash value, and then distribute the billing information to the corresponding service machine according to the information in the host information table.
[0094] The session index is determined according to different billing information, for example, IMS billing information may be ICID, and PS billing information may be CID. The hash operation in the embodiment of the present invention may be any known or self-developed hash algorithm, as long as the purpose of evenly hashing the session ID can be achieved.
[0095] S606: The service machine receives the billing information, performs call record processing (such as call record filtering, sorting, association merging, and re-encoding), generates a call record code stream, and writes it into the call record file.
[0096] S607: The management machine transmits the call record file to the billing center through the Bx interface.
[0097] In the embodiment of the present invention, the Bx interface supports two modes: PULL and PUSH. In the PULL mode, the billing center actively connects to the management machine to obtain the call record file; in the PUSH mode, the management machine starts the program to actively transfer the call record file to the specified billing center directory.
[0098] Embodiment three:
[0099] For ease of understanding, the embodiment of the present invention provides a distributed CCF capacity expansion process based on the second embodiment, such as Figure 7 As shown in the figure, the expansion process includes:
[0100] S701: Each host regularly monitors its own CPU, memory and other resource usage information, and sends this information to the management machine;
[0101] S702: The management machine readjusts the host information table according to preset rules and resource usage of each host.
[0102] Determine whether the resource usage of each host is below a certain threshold; when a host exceeds the threshold, determine whether other hosts can share part of the load (for example, determine whether its resource usage is below a certain threshold); if there are other hosts that can share the load, the management machine adjusts the work role and resources in the host information table and distributes the updated host information table to all hosts;
[0103] For example, if the load on the business machine is too high and the load on the input machine is low, the management machine will run both input machines 1 and 2 on VM1, change VM2 to the business machine, and adjust the session index hash value at the same time, as shown in Table 2.
[0104] S703: The host receives the updated host information table and saves the information in the cache. Each host establishes a link with the network element and distributes the billing information according to the new host information table.
[0105] If the local role or resources change, the role migration or resource change will be performed according to the new role resource allocation (such as unloading resources that are no longer allocated to itself and loading newly allocated resources).
[0106] S704: If the load of all hosts cannot be reduced to below the preset threshold by adjusting the load of each host, the management machine may perform manual or automatic capacity expansion.
[0107] The management machine sends the expansion process to the VNFM, and the VNFM creates and starts a new virtual machine. The process of creating a virtual machine in a virtualized environment includes signaling interactions of multiple network elements, which is a prior art and will not be described here. If it is a physical ATCA (Advanced Telecom Computing Architecture) environment, the management machine can send a start blade command to the blade server CMM, and the CMM will power on the specified blade.
[0108] In some embodiments, if a host exceeds a predetermined load threshold, the capacity expansion step S704 may be performed directly.
[0109] S705: After the new host / virtual machine is successfully started, it sends a message to the management machine to register and join the CCF cluster;
[0110] S706: The management machine adjusts the host information table and distributes the updated host information table to all hosts.
[0111] The management machine adjusts the work roles and resources of each host. For example, if the business machine load is too high and the input machine load is medium, the management machine assigns the newly added VM5 as the business machine role and the session index hash value, as shown in Table 3.
[0112] S707: The host receives the updated host information table and saves the information in the cache; each host establishes a link with the network element and distributes the billing information according to the new host information table.
[0113] Embodiment 4:
[0114] For ease of understanding, the embodiment of the present invention provides a distributed CCF capacity reduction process based on the first embodiment, such as Figure 8 As shown in FIG. 1 , the reduction process includes:
[0115] S801: Each host regularly monitors its own CPU, memory and other resource usage information, and sends this information to the management machine;
[0116] S802: The management machine readjusts the host information table according to preset rules and resource usage of each host.
[0117] Determine whether the resource usage of each host is below a certain threshold; if a host is below the threshold, the management machine adjusts the work role and resources in the host information table and allocates the low-load host as a non-working host; distributes the updated host information table to all hosts.
[0118] For example, if the load of the business machine is too low, the management machine allocates business machine 2 as a non-working host and adjusts the session index hash value at the same time, as shown in Table 4.
[0119] S803: The host receives the updated host information table and saves the information in the cache. Each host establishes a link with the network element and distributes the billing information according to the new host information table.
[0120] If the local role or resources change, the role migration or resource change will be performed according to the new role resource allocation (such as unloading resources no longer allocated to itself and loading newly allocated resources). The inactive host will shut down all resources and programs, and reply to the management machine's role migration and resource change results.
[0121] S804: The management machine sends a reduction request message to the VNFM.
[0122] The process of destroying a virtual machine in a virtualized environment includes signaling interactions of multiple network elements, which is a prior art and will not be described in detail here. If it is a physical ATCA environment, the management machine can send a start blade command to the CMM, and the CMM will power off the specified blade.
[0123] S805: The virtualization platform closes and destroys the specified virtual machine.
[0124] Embodiment five:
[0125] For ease of understanding, the embodiment of the present invention provides a distributed CCF non-management machine disaster recovery process based on the first embodiment, such as Fig. 9 As shown in the figure, the non-management server scaling-down process includes:
[0126] S901: The management machine and each host send messages periodically to keep the host alive.
[0127] S902: A host VM2 has an abnormality (such as program exit, system hang, network interruption, etc.), and the management machine detects that VM2 keep alive timeout and determines that VM2 is abnormal.
[0128] S903: The management machine adjusts the host information table according to the preset policy, and distributes the updated host information table to all surviving hosts.
[0129] The management machine adjusts the working roles and resources in the host information table. If VM2 is abnormal, the management machine assigns VM2 as a non-working host and adjusts the session index hash value, as shown in Table 5. It can be understood that when host 2 is abnormal, multiple hosts may actually be abnormal. As long as there is a normal host, the management machine can perform role and resource allocation.
[0130] S904: The host receives the updated host information table and saves the information in the cache. Each host establishes a link with the network element and distributes the billing information according to the new host information table.
[0131] If the local role or resources change, the role migration or resource change will be performed according to the new role resource allocation (such as unloading resources that are no longer allocated to itself and loading newly allocated resources).
[0132] In some embodiments, when VM2 is assigned as a non-working host, and by adjusting the host information table so that the total resource usage information of each host is lower than a preset threshold, the management machine can also request VNFM to reduce capacity and shut down host 2; of course, when host 2 is abnormal and the loads of other hosts are high, and the total resource usage information of each host exceeds the preset threshold, the management machine can request VNFM to expand capacity and create a new host, and the new host will take over the original work of host 2.
[0133] like Fig.10 As shown, the embodiment of the present invention provides a distributed CCF management machine disaster recovery process based on the first embodiment, and the management machine disaster recovery process includes:
[0134] S1001: The management machine and each host send messages periodically to keep the host alive.
[0135] S1002: An exception occurs on the host VM1 where the management machine is located, and a new election is performed to select a new management machine.
[0136] When the host VM1 program exits, the system hangs, the network is disconnected, etc., other hosts detect that the management machine has timed out, determine that the management machine is abnormal, and select the apparent management machine, such as host VM2, according to the election mechanism. It is understandable that when the management machine is abnormal, multiple hosts may actually be abnormal. As long as there is a normal host, a new management machine can be elected.
[0137] S1003: The management machine VM2 updates the host information table according to a preset policy, and distributes the updated host information table to all surviving hosts.
[0138] The management machine VM2 adjusts the working roles and resources in the host information table. If VM1 is abnormal, the management machine assigns VM1 as a non-working host and adjusts the session index hash value at the same time, as shown in Table 6.
[0139] S1004: Each host receives the updated host information table and stores the information in a cache. Each host establishes a link with a network element and distributes billing information according to the new host information table.
[0140] If the local role or resources change, the role migration or resource change will be performed according to the new role resource allocation (such as unloading resources that are no longer allocated to itself and loading newly allocated resources).
[0141] In some embodiments, when the host VM1 is abnormal and the total resource usage information of each host is lower than a preset threshold by adjusting the host information table, the new management machine VM2 can also request VNFM to reduce the capacity and shut down VM1; of course, when VM1 is abnormal and the loads of other hosts are high, the new management machine can request VNFM to expand the capacity and create a new host, and the new host will take over the original work of VM1.
[0142] Embodiment six:
[0143] The embodiment of the present invention provides a distributed billing gateway system, which can implement the above embodiments; Fig.11 As shown, the distributed billing gateway system includes a management machine 1101, an input machine 1102, and a business machine 1103;
[0144] The management machine 1101 is used to allocate work roles and resources to each host according to the host information of each host. The work roles include input machine 1102 and business machine 1103. The management machine 1101 is elected by each host.
[0145] The input machine 1102 is used to send the billing information received from the network element to the service machine 1103;
[0146] The business machine 1103 is used to generate a call bill code stream according to the billing information and output it to a call bill file;
[0147] The management machine 1101 is also used to send the call record file to the billing center.
[0148] It is worth noting that in the embodiments of the present invention, the working roles of the management machine 1101, the input machine 1102 and the business machine 1103 can be implemented on one host or multiple hosts. For example, when the distributed billing gateway system includes one host, the host serves as both a management machine and an input machine and a business machine; for example, when the distributed billing gateway system includes two hosts, the two hosts select one management machine, and then one host serves as both a management machine and an input machine, and the other host serves as a business machine; similarly, when the distributed billing gateway system includes multiple hosts, one host can serve as a management machine, one host can serve as an input machine, and the other host can serve as a business machine; or one host can simultaneously include two or three working roles.
[0149] It can be understood that the distributed billing gateway system also includes a shared storage device (not shown in the figure) that supports access by each host. The distributed billing gateway system can implement the distributed billing gateway method in the above-mentioned embodiments, which will not be described one by one here.
[0150] By adopting the billing gateway system of the present invention, the host cluster of the billing gateway has true decentralization and full host functionality, flexible scalability and elasticity, and high resource utilization; at the same time, the system availability is very high, and the ability to not interrupt business as long as the host survives can be achieved.
[0151] The embodiment of the present invention also provides a storage medium, which includes volatile or non-volatile, removable or non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, computer program modules or other data). Computer-readable storage media include but are not limited to RAM (Random Access Memory), ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable read only memory), flash memory or other memory technology, CD-ROM (Compact Disc Read-Only Memory), digital versatile disk (DVD) or other optical disk storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage device, or any other medium that can be used to store desired information and can be accessed by a computer.
[0152] The storage medium in the embodiment of the present invention can be used to store one or more computer programs, and the one or more programs can be executed by one or more processors to implement at least one step of the distributed billing gateway method in the above embodiments, which will not be repeated here.
[0153] It can be seen that those skilled in the art should understand that all or some of the steps, systems, and functional modules / units in the above disclosed methods can be implemented as software (which can be implemented with computer program code executable by a computing device), firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component can have multiple functions, or a function or step can be performed by several physical components in cooperation. Some or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit.
[0154] In addition, it is well known to those skilled in the art that communication media generally contain computer readable instructions, data structures, computer program modules or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery media. Therefore, the present invention is not limited to any specific hardware and software combination.
[0155] The above contents are further detailed descriptions of the embodiments of the present invention in combination with specific implementation methods, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.
Claims
1. A distributed billing gateway method, comprising: The management machine allocates the working roles and resources of each host according to the host information in the billing collection function CCF cluster. The management machine is elected by the hosts in the CCF cluster. The working roles include input machine and business machine. The input machine sends the billing information received from the network element to the service machine; The business machine generates a call bill code stream according to the billing information and outputs it to a call bill file; The management machine sends the call record file to the billing center.
2. The distributed billing gateway method according to claim 1, characterized in that: The allocation of work roles and resources to each host includes: The management machine generates a host information table and distributes it to each host. The host information table includes the corresponding relationship between host number-input machine number-input machine IP; and the corresponding relationship between host number-business machine number-session index value.
3. The distributed charging gateway method according to claim 2, characterized in that: The input machine sends the billing information received from the network element to the service machine, including: The input machine calculates the session index in the billing information to obtain a session index value; The charging information is sent to the service machine corresponding to the session index value according to the host information table.
4. The distributed charging gateway method according to any one of claims 1 to 3, characterized in that: The method further comprises: The management machine obtains resource usage information of each host, and when it is determined that the resource usage information of the host exceeds a preset load threshold, requests the virtual network function module manager VNFM to expand the capacity and create a new host; The management machine starts the new host and adds it to the CCF cluster; The management machine reallocates the work roles and resources of each host.
5. The distributed charging gateway method according to claim 4, characterized in that: Before requesting the VNFM to expand the capacity and create a new host, the following steps are included: Determine whether the resources of other hosts are sufficient; If so, the management machine reallocates the work roles and resources of each host; If not, request capacity expansion from VNFM to create a new host.
6. The distributed charging gateway method according to any one of claims 1 to 3, characterized in that: The method further comprises: The management machine obtains resource usage information of each host; When it is determined that the resource usage information of the host is lower than the preset load threshold, the working roles and resources of each host are reallocated, and the host whose resource usage information is lower than the preset load threshold is regarded as an inoperative host; The management machine requests the VNFM to reduce capacity and shut down the inoperative host.
7. The distributed charging gateway method according to any one of claims 1 to 3, characterized in that: The method further comprises: The management machine detects that the heartbeat keep-alive timeout with the host machine occurs, and determines that the host machine is abnormal; Reassign the working roles and resources of each surviving host, and the abnormal host is a non-working host.
8. The distributed charging gateway method according to any one of claims 1 to 3, characterized in that: The method further comprises: The host detects that the heartbeat keep-alive of the management machine has timed out, and determines that the management machine is abnormal; The hosts in the CCF cluster re-elect a new management host; The new management machine reallocates the work roles and resources of each surviving host.
9. A distributed billing gateway system, characterized in that: Including management machine, input machine and business machine; The management machine is used to allocate working roles and resources to each host according to the host information of each host, and the working roles include input machine and business machine; the management machine is elected by each host; The input machine is used to send the billing information received from the network element to the service machine; The business machine is used to generate a call bill code stream according to the billing information and output it to a call bill file; The management machine is also used to send the call record file to the billing center.
10. A storage medium, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the distributed charging gateway method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Billing method and device
CN106304008A
Method, apparatus and system for supporting distributed IMS charging
US20100248685A1