[go: up one dir, main page]

CN1225863C - Telephone bill combining process method - Google Patents

Telephone bill combining process method Download PDF

Info

Publication number
CN1225863C
CN1225863C CNB021299633A CN02129963A CN1225863C CN 1225863 C CN1225863 C CN 1225863C CN B021299633 A CNB021299633 A CN B021299633A CN 02129963 A CN02129963 A CN 02129963A CN 1225863 C CN1225863 C CN 1225863C
Authority
CN
China
Prior art keywords
ticket
bill
merging
current
bills
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CNB021299633A
Other languages
Chinese (zh)
Other versions
CN1479485A (en
Inventor
李发君
宋军
王奇
张天虎
杨杰
关国峰
廖炳才
邱意平
颜文远
王峰
张玉新
谢代斌
周拥辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CNB021299633A priority Critical patent/CN1225863C/en
Priority to PCT/CN2003/000411 priority patent/WO2004021674A1/en
Priority to AU2003234898A priority patent/AU2003234898A1/en
Publication of CN1479485A publication Critical patent/CN1479485A/en
Application granted granted Critical
Publication of CN1225863C publication Critical patent/CN1225863C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

一种涉及电通信技术的话单合并处理方法,通过对话单等待的时间或话单等待的数量进行控制,使得合并过程更易于控制且更平滑,减少了网络中主机在合并过程中的数据拥塞的可能性,本发明引入了黑话单概念并对合并过程有规律地实时检测,对于长时间占用网络资源的话单强行中断合并,并且使用缓存机制,使合并过程更加顺畅,对于话单在合并过程中由于异常或掉电,通过保存中间状态信息,可根据状态信息从原始话单数据中有效地恢复有关的等待队列Qw列表等,从原理上保征了数据的完全恢复,本发明提供了一种性能可靠的话单合并处理方法,可完成GPRS、WCDMA网络中主机生成的部分话单合并,并解决了话单合并过程中的丢话单和重话单问题。

Figure 02129963

A bill merging method involving telecommunication technology, which controls the waiting time or number of bills to make the merging process easier to control and smoother, and reduces the risk of data congestion of hosts in the network during the merging process Possibility, the present invention introduces the concept of black bills and regularly detects the merging process in real time, forcibly interrupts the merging of bills that occupy network resources for a long time, and uses a cache mechanism to make the merging process smoother. Due to abnormality or power failure, by saving the intermediate state information, the relevant waiting queue Qw list, etc. can be effectively recovered from the original bill data according to the state information, and the complete recovery of the data is guaranteed in principle. The present invention provides a Reliable bill merging processing method can complete part of bill merging generated by hosts in GPRS and WCDMA networks, and solve the problems of lost and repeated bills in the process of bill merging.

Figure 02129963

Description

话单合并处理方法Bill merge processing method

技术领域technical field

本发明涉及电通信技术,尤其涉及一种话单合并处理方法。The invention relates to telecommunication technology, in particular to a method for merging bills.

背景技术Background technique

在GPRS、WCDMA网络上长时间占用网络资源的用户,主机会为用户生成多张部分话单,其中又分为首张部分话单、中间部分话单和末张部分话单,主机生成的部分话单在送计费中心之前,需要CG把话单尽可能地合并,变成一张话单或者几张较大的部分话单送计费中心进行计费处理。For users who occupy network resources for a long time on GPRS and WCDMA networks, the host will generate multiple partial bills for the user, which are divided into the first partial bill, the middle part of the bill and the last partial bill. The partial bills generated by the host Before the bills are sent to the billing center, the CG needs to combine the bills as much as possible to form one bill or several larger partial bills and send them to the billing center for billing processing.

现有技术的缺点是,在话单合并过程中若CG因为异常而导致合并过程中断,会产生丢话单或者重话单的问题。因为合并过程中需要大量话单在内存中等待,若CG出现异常而终止,在内存中等待的话单将会丢失。因为等待的话单很多而无法进行保存,若合并过程中保存到磁盘会严重影响合并的性能,可能无法满足性能要求,所以当CG系统重新恢复的时候必须要把这些在内存中等待的话单找回来。The disadvantage of the prior art is that if the merging process is interrupted due to an abnormality of the CG during the bill merging process, the bills will be lost or repeated. Because a large number of bills need to wait in the memory during the merging process, if the CG terminates abnormally, the bills waiting in the memory will be lost. Because there are a lot of waiting bills, they cannot be saved. If they are saved to disk during the merging process, the performance of the merge will be seriously affected, and the performance requirements may not be met. Therefore, when the CG system is restored, these waiting bills must be retrieved from the memory. Come.

根据中国移动总局对CGF的基本要求,CG的计费处理的差错率必须小于0.001%,现有的技术不能精确的找回CG异常之前,在内存中等待的话单,或者造成话单丢失,或者造成重复话单。According to the basic requirements of China Mobile General Administration for CGF, the error rate of CG billing processing must be less than 0.001%. The existing technology cannot accurately retrieve the call bills waiting in the memory before the CG abnormality, or cause the call bills to be lost, or Duplicate bills are caused.

发明内容Contents of the invention

本发明的目的在于提供一种性能可靠的话单合并处理方法。The purpose of the present invention is to provide a method for merging bills with reliable performance.

本发明所采用的方法为:这种话单合并处理方法,其特征在于:它采用如下步骤:The method that the present invention adopts is: this bill merge processing method, it is characterized in that: it adopts the following steps:

主机生成话单,包括部分话单和非部分话单,其中部分话单需要与其它话单合并,非部分话单不需要与其它话单合并,称A类话单;计费网关包装话单,将主机送来的当前话单包装在数据包中,送合并流程进行合并;然后,计费网关合并话单:若当前话单为A类话单,则直接送到合并完成的话单存放队列;若当前话单为部分话单与有关等待话单进行合并至不需要继续等待合并时,把合并结果送到合并完成的话单存放队列;The host generates bills, including partial bills and non-partial bills, some of which need to be merged with other bills, and non-partial bills do not need to be merged with other bills, which are called Class A bills; billing gateways package bills , pack the current bill sent by the host into a data packet, and send it to the merging process for merging; then, the billing gateway merges the bill: if the current bill is a type A bill, it will be directly sent to the merged bill storage queue ; If the current bill is a part of the bill and the relevant waiting bill is merged to no longer need to wait for the merge, send the merged result to the merged bill storage queue;

所述部分话单可分为B类话单和C类话单,其中B类话单在合并后需要继续与其他话单合并,C类话单合并后不需要继续等待,计费网关合并话单时,The part of the bills can be divided into B-type bills and C-type bills, where the B-type bills need to continue to be merged with other bills after being merged, and the C-type bills do not need to continue to wait after being merged, and the billing gateway merges the bills. single time,

A)若当前话单为B类话单,首先在等待队列查找属于同一个分组数据协议的等待话单;A) If the current bill is a Class B bill, first look for waiting bills belonging to the same packet data protocol in the waiting queue;

i.若找到等待话单,则先判断两张话单是否允许合并;i. If the waiting bill is found, first judge whether the two bills are allowed to be merged;

1)若允许合并,先把当前话单与等待话单合并,合并结果保留在等待队列中,其包号与原先等待话单的包号相同,然后判断话单所属的分组数据协议是否已经结束;1) If merging is allowed, first merge the current bill with the waiting bill, the merged result is kept in the waiting queue, and its packet number is the same as that of the original waiting bill, and then judge whether the packet data protocol to which the bill belongs has ended ;

i)若已经结束,再判断合并结果是否需要继续等待所属分组数据协议的其他未到达的部分话单;i) If it has ended, then judge whether the combined result needs to continue to wait for other unarrived partial bills of the packet data protocol to which it belongs;

a)若不需要继续等待,则把合并结果送合并完成的话单存放队列,当前话单的合并过程结束;a) If there is no need to continue to wait, then send the merging result to the merged bill storage queue, and the merging process of the current bill ends;

b)若需要继续等待,则让合并结果保留在等待队列中,直到所属分组数据协议的所有部分话单到达后当前话单的合并过程结束;b) If it is necessary to continue to wait, the merged result is kept in the waiting queue until the merge process of the current bill is completed after all part bills of the packet data protocol to which it belongs;

ii)若话单所属分组数据协议未结束,则合并结果继续等待话单所属分组数据协议的后续部分话单,当前话单的合并过程结束;ii) If the packet data protocol to which the bill belongs has not ended, the merged result continues to wait for the subsequent partial bill of the packet data protocol to which the bill belongs, and the merge process of the current bill ends;

2)若不允许合并则把等待话单送合并完成的话单存放队列,用当前话单替换等待话单在等待队列中的位置,继续等待后续话单,话单的包号为原先等待话单的包号,当前话单的合并过程结束;2) If merging is not allowed, send the waiting bill to the merged bill storage queue, replace the position of the waiting bill in the waiting queue with the current bill, and continue to wait for the subsequent bill. The package number of the bill is the original waiting bill package number, the merging process of the current bill ends;

ii.若无正在等待的话单,则直接把当前话单送等待队列,并根据当前话单是否所属分组数据协议的首张部分话单,按照如下方式处理当前话单的包号;ii. If there is no waiting bill, the current bill is directly sent to the waiting queue, and according to whether the current bill belongs to the first partial bill of the packet data protocol, the packet number of the current bill is processed as follows;

1)若当前话单是所属分组数据协议的首张部分话单,则当前话单的包号不变,当前话单的合并过程结束;1) If the current bill is the first partial bill of the packet data protocol to which it belongs, the packet number of the current bill remains unchanged, and the merging process of the current bill ends;

2)若当前话单不是所属分组数据协议的首张部分话单,则调整话单包号,当前话单的合并过程结束;2) If the current bill is not the first partial bill of the packet data protocol to which it belongs, then adjust the bill package number, and the merging process of the current bill ends;

B)若当前话单为C类话单,首先在等待队列中查找正在等待当前话单的话单;B) If the current bill is a Class C bill, first look for the bill that is waiting for the current bill in the waiting queue;

i.若找到等待话单,则先判断两张话单是否允许合并;i. If the waiting bill is found, first judge whether the two bills are allowed to be merged;

1)若允许合并则把当前话单与等待话单合并,合并的结果保留在等待队列中,其包号与原先等待话单的包号相同,合并结果中的数据已经包含前话单和等待话单;两张话单合并完成后,再判断合并结果是否需要继续等待所属分组数据协议的其他未到达的部分话单;1) If merging is allowed, the current bill and the waiting bill are merged, and the merged result is kept in the waiting queue, and its packet number is the same as that of the original waiting bill, and the data in the merged result already includes the previous bill and the waiting bill. Bills; after the two bills are merged, it is judged whether the merger result needs to continue to wait for other partial bills of the packet data protocol that have not arrived;

01.若不需要继续等待,则将合并结果从等待队列中取出并送合并完成的话单存放队列,当前话单的合并过程结束;01. If there is no need to continue waiting, the merged result is taken out from the waiting queue and sent to the merged bill storage queue, and the merge process of the current bill is completed;

02.若需要继续等待,则让合并结果在等待队列中再逗留一段时间,直到所属分组数据协议的所有部分话单到达,当前话单的合并过程结束;02. If it is necessary to continue waiting, let the merged result stay in the waiting queue for a period of time until all part of the bills of the packet data protocol to which they belong arrive, and the merge process of the current bills ends;

2)若不允许合并,则把等待话单和当前话单分别送合并完成的话单存放队列,当前话单的合并过程结束;2) If merging is not allowed, the waiting bill and the current bill are sent to the merged bill storage queue respectively, and the merging process of the current bill ends;

ii.若没有找到等待话单,则直接将当前话单送合并完成的话单存放队列,当前话单的合并过程结束;ii. If the waiting bill is not found, the current bill is directly sent to the merged bill storage queue, and the merge process of the current bill is completed;

所述的计费网关收到主机送来的话单后数量达到一个预定的值,或者在达到预定数量之前超过了时间限制,送合并流程进行合并;After the billing gateway receives the bills sent by the host, the number reaches a predetermined value, or exceeds the time limit before reaching the predetermined number, and sends the bills to the merging process for merging;

其他未在话单等待队列中等待超时的话单为黑话单,计费网关强行中断该话单的合并,并将其送到合并完成的话单存放队列;Other bills that have not waited in the bill waiting queue for timeout are black bills, and the billing gateway forcibly interrupts the merging of the bills and sends them to the merged bill storage queue;

所述的话单等待队列中的话单被定期检测,当等待时间超过规定时长或者包号与合并模块收到的当前包号差值大于预定值m时,视为等待超时,当合并模块收到的话单的包号,假设为X时,满足下面的条件时,生成黑话单:X%m=0,该式中%符号代表整除后的余数,这些满足条件的点为超时的检查点;The bills in the bill waiting queue are regularly detected. When the waiting time exceeds the specified duration or the difference between the packet number and the current packet number received by the merging module is greater than the predetermined value m, it is regarded as waiting for overtime. When the merging module receives When the package number of the bill is assumed to be X, when the following conditions are met, a black bill is generated: X%m=0, where the % symbol represents the remainder after divisibility, and these points that meet the conditions are overtime checkpoints;

所述的黑话单生成时,使用如下的缓存机制:在检查点上生成的黑话单送到一个临时队列中,临时队列中的话单将在生成该临时队列的检查点后面紧邻的一个(i.m,(i+1).m)区间中被均匀地送入合并完成的话单存放队列中;如果在检查点上生成的临时队列中话单数为L,则(i.m,(i+1).m)区间中每一个话单包应该从临时队列中带走的话单数为:When described black bill generation, use following caching mechanism: the black bill that generates on the checkpoint is sent in a temporary queue, and the bill in the temporary queue will generate an adjacent (i.m. (i+1).m) interval is evenly sent to the merged bill storage queue; if the number of bills in the temporary queue generated on the checkpoint is L, then (i.m, (i+1).m) The number of bills that should be taken away from the temporary queue for each bill packet in the interval is:

[L/(m-1)]+1,式中“[]”表示取整数部分;[L/(m-1)]+1, where “[]” represents the integer part;

所述的检查点上分组数据协议的话单被送临时队列时,如果合并模块正在合并一张话单,话单的包号为Y,Y∈[(k.m,(k+1).m),并且在等待队列中没有相应的等待话单,先判断当前话单是否所属分组数据协议的首张部分话单;若当前话单是所属分组数据协议的首张部分话单,则把当前话单作为新的节点送等待队列,并且把话单的包号设置为Y,即话单的当前包号;若当前话单不是所属分组数据协议的首张部分话单,则把当前话单作为新的节点送等待队列中,并且把话单的包号调整为k.m,即与Y紧邻的前面一个检查点;When the bill of the packet data protocol on the checkpoint is sent to the temporary queue, if the merging module is merging a bill, the packet number of the bill is Y, Y∈[(k.m, (k+1).m), And there is no corresponding waiting bill in the waiting queue, first judge whether the current bill belongs to the first partial bill of the packet data protocol; if the current bill is the first partial bill of the packet data protocol to which it belongs, then put the current bill Send it to the waiting queue as a new node, and set the packet number of the bill to Y, that is, the current packet number of the bill; if the current bill is not the first partial bill of the packet data protocol to which it belongs, take the current bill as the new Send the node in the waiting queue, and adjust the packet number of the bill to k.m, which is the previous checkpoint immediately adjacent to Y;

所述的话单新到达,在等待队列中没有对应的等待话单,且话单是分组数据协议的首张部分话单,则把话单增加到等待队列队列的头部,并且把话单的包号设置为话单当前的包号;若该话单在等待队列没有对应的等待话单,且话单不是分组数据协议的首张部分话单,则把话单增加到等待队列队列的尾部,并调整话单的包号为当前临近的前一个超时检查点包号;The bill newly arrives, there is no corresponding waiting bill in the waiting queue, and the bill is the first partial bill of the packet data protocol, then the bill is added to the head of the waiting queue, and the The packet number is set to the current packet number of the bill; if the bill does not have a corresponding waiting bill in the waiting queue, and the bill is not the first partial bill of the packet data protocol, then add the bill to the tail of the waiting queue , and adjust the packet number of the bill to the packet number of the previous timeout checkpoint that is currently approaching;

所述的检查点若在k.m上生成临时队列时,从等待队列的尾部向头部方向检查话单的包号,若话单的包号小于或者等于前一个超时检查点的包号(k-1).m,则把话单移动到临时队列的头部;若发现一张话单的包号大于前一个超时检查点的包号(k-1).m,则生成临时队列的过程结束;从临时队列中取出话单时从尾部开始,向头部方向顺序取话单,每次取一定数量的话单,假设初始生成的临时队列中话单数为L,则每次从临时队列中取话单数量为:[L/(m-1)]+1,式中“[]”表示取整数部分,m为话单在内存中等待的最大包号差预定值;If said checkpoint generates a temporary queue on k.m, check the packet number of the bill from the tail of the waiting queue to the head direction, if the packet number of the bill is less than or equal to the packet number of the previous overtime checkpoint (k- 1).m, then move the bill to the head of the temporary queue; if the packet number of a bill is found to be greater than the packet number (k-1).m of the previous timeout checkpoint, the process of generating the temporary queue ends ; When taking out the bills from the temporary queue, start from the tail, and take the bills sequentially towards the head, and take a certain number of bills each time. Assuming that the number of bills in the temporary queue generated initially is L, then take each time from the temporary queue The number of bills is: [L/(m-1)]+1, where “[]” represents the integer part, and m is the predetermined value of the maximum packet number difference that the bill is waiting in the memory;

所述的话单在合并过程中由于异常或掉电,内存中的等待队列列表将全部丢失,通过保存中间状态信息,在启动时根据状态信息从原始话单数据中恢复内存中的等待队列列表;Due to abnormality or power failure during the merging process of the bills, the waiting queue list in the memory will be completely lost, and by saving the intermediate state information, the waiting queue list in the memory will be restored from the original bill data according to the state information when starting;

所述的话单在合并时,在等待队列的基础上建立一个索引表,搜索的时候在索引表中进行;When the bills are merged, an index table is established on the basis of the waiting queue, and the search is performed in the index table;

所述的索引表采用杂凑表,每当队列中进入新的话单时,就在索引表中增加新的索引节点,而当从中删除一个节点时,就删除索引表中的相应节点。The index table adopts a hash table, and whenever a new bill is entered in the queue, a new index node is added to the index table, and when a node is deleted, the corresponding node in the index table is deleted.

本发明的有益效果为:本发明中,通过对话单等待的时间或话单等待的数量进行控制,使得合并过程更易于控制且更平滑,减少了网络中主机在合并过程中的数据拥塞的可能性,本发明引入了黑话单概念并对合并过程有规律地实时检测,对于长时间占用网络资源的话单强行中断合并,有效地提高了本发明的工作可靠性,并且使用缓存机制,使合并过程更加顺畅,对于话单在合并过程中由于异常或掉电,通过保存中间状态信息,可根据状态信息从原始话单数据中有效地恢复有关的等待队列Qw列表等,从原理上保征了数据的完全恢复,因此,本发明提供了一种性能可靠的话单合并处理方法,可完成GPRS、WCDMA网络中主机生成的部分话单合并,并解决了话单合并过程中的丢话单和重话单问题。The beneficial effects of the present invention are: in the present invention, the waiting time of the dialogue list or the quantity of the waiting list is controlled, so that the merging process is easier to control and smoother, and reduces the possibility of data congestion of the host in the network during the merging process The present invention introduces the concept of black bills and regularly detects the merging process in real time, and forcibly interrupts the merging of bills that occupy network resources for a long time, which effectively improves the working reliability of the present invention, and uses a cache mechanism to make the merging process Smoother, for bills due to abnormality or power failure during the merging process, by saving the intermediate state information, the relevant waiting queue Qw list can be effectively restored from the original bill data according to the state information, and the data is preserved in principle Therefore, the present invention provides a reliable bill merging processing method, which can complete the merging of part of the bills generated by the host in the GPRS and WCDMA networks, and solve the lost bills and repeated calls in the bill merging process. single question.

附图说明Description of drawings

图1为本发明合并流程示意图;Fig. 1 is a schematic diagram of the merging process of the present invention;

图2为检查点示意图;Figure 2 is a schematic diagram of a checkpoint;

图3为话单合并示意图;Fig. 3 is a schematic diagram of bill merging;

图4为故障点恢复示意图;Fig. 4 is a schematic diagram of failure point recovery;

图5为等待队列Qw恢复示意图;Fig. 5 is the recovery schematic diagram of waiting queue Qw;

图6为等待队列Qw恢复示意图;Fig. 6 is the recovery schematic diagram of waiting queue Qw;

图7为临时队列Qt恢复示意图。FIG. 7 is a schematic diagram of recovery of the temporary queue Qt.

具体实施方式Detailed ways

下面根据附图和实施例对本发明作进一步详细说明:Below according to accompanying drawing and embodiment the present invention will be described in further detail:

有关概念解释:Explanation of related concepts:

CG:计费网关,Charging Gateway;CG: Charging Gateway, Charging Gateway;

分组数据协议PDP:分组数据协议,Packet Data Protocol;Packet Data Protocol PDP: Packet Data Protocol, Packet Data Protocol;

每一个用户在主机中可能对应多个分组数据协议PDP,主机为每一个分组数据协议PDP都生成话单,本算法限制每一个分组数据协议PDP在CG系统中最多有一张话单在等待。Each user may correspond to multiple packet data protocol PDPs in the host, and the host generates bills for each packet data protocol PDP. This algorithm limits each packet data protocol PDP to have at most one bill waiting in the CG system.

GGSN:网关GPRS支持节点,Gateway GPRS Support Node;GGSN: Gateway GPRS Support Node, Gateway GPRS Support Node;

SGSN:服务GPRS支持节点,Serving GPRS Support Node;SGSN: Serving GPRS Support Node, Serving GPRS Support Node;

CDR:详细话单,Call Detail Record;CDR: Detailed call list, Call Detail Record;

G-CDR:网关GPRS支持节点产生的详细话单,Gateway GPRS SupportNode Call Detail Record;G-CDR: the detailed call list generated by the gateway GPRS support node, Gateway GPRS SupportNode Call Detail Record;

M-CDR:移动管理详细话单,Mobility Management-Call DetailRecord;M-CDR: Mobility Management-Call DetailRecord;

S-CDR:服务GPRS支持节点产生的详细话单,Serving GPRS SupportNode Call Detail Record;S-CDR: Serving GPRS SupportNode Call Detail Record generated by the serving GPRS support node;

S-SMO-CDR:短信息移动始发话单,SGSN delivered Short MessageMobile Originated Call Detail Record;S-SMO-CDR: Short Message Mobile Originated Call List, SGSN delivered Short MessageMobile Originated Call Detail Record;

S-SMT-CDR:短信息移动终结话单,SGSN delivered Short messageMobile Terminated Call Detail Record;S-SMT-CDR: Short message mobile terminated call list, SGSN delivered Short messageMobile Terminated Call Detail Record;

BP:话单包,Bill Package;BP: bill package, Bill Package;

交换机或者称为主机生成的话单是实时送往CG的(通过GTP’协议),每次送一些话单,得到CG的确认之后再送后续话单。CG收到主机送来的话单后,当收到的话单数量达到一个预定的值,或者在达到预定数量之前超过了时间限制,就把收到的话单包装在一个数据包中,然后才送合并流程进行合并,这个数据包称为话单包。每一个话单包都由CG赋予一个唯一递增的序列号,称为话单包的包号(不考虑包号回绕)。The bills generated by the switch or the host are sent to the CG in real time (through the GTP’ protocol), and some bills are sent each time, and the follow-up bills are sent after the confirmation of the CG. After CG receives the bills sent by the host, when the number of received bills reaches a predetermined value, or exceeds the time limit before reaching the predetermined number, it will pack the received bills in a data packet, and then send them for merging The process is merged, and this data package is called a bill package. Each bill packet is endowed by the CG with a unique incremental sequence number, which is called the packet number of the bill packet (without considering wrapping of the packet number).

一个话单包可以包含多张话单,也可以不包含话单,称为空话单包。A bill package can contain multiple bills, or no bills, which is called an empty bill package.

同一个话单包中的话单具有相同的包号。Bills in the same bill package have the same package number.

Qw:等待队列,Queue waitingQw: waiting queue, Queue waiting

一个分组数据协议PDP的多张部分话单合并的原理是:让先到达的话单在内存中等待,后续到达的部分话单与等待话单合并,当分组数据协议PDP的所有部分话单都到达CG并完成合并之后,使合并的结果进入后续处理流程。The principle of merging multiple partial bills of a packet data protocol PDP is: let the bills that arrive first wait in the memory, and the partial bills that arrive later are merged with the waiting bills. When all partial bills of the packet data protocol PDP arrive After the CG completes the merge, the merged result enters the subsequent processing flow.

每一个分组数据协议PDP在CG系统的内存中最多有一张话单在等待,所有这些分组数据协议PDP的等待话单构成一个队列,称为等待队列Qw。Each packet data protocol PDP has at most one bill waiting in the memory of the CG system, and all these waiting bills of the packet data protocol PDP form a queue, which is called the waiting queue Qw.

合并完成的话单存放队列Qok:合并完成的话单存放队列,Queue0K:Queue for bill storage after merging is completed Qok: queue for bill storage after merging is completed, Queue0K:

CG把合并完成的话单或者不需要合并的话单(比如单张话单,不需要合并)临时存放在一个缓冲区中,这些话单形成的队列称为合并完成的话单存放队列Qok。The CG temporarily stores the merged bills or the bills that do not need to be merged (for example, a single bill that does not need to be merged) in a buffer, and the queue formed by these bills is called the merged bill storage queue Qok.

根据图1、图2、图3、图4、图5、图6和图7所示,According to Fig. 1, Fig. 2, Fig. 3, Fig. 4, Fig. 5, Fig. 6 and Fig. 7,

主机生成话单,包括部分话单和非部分话单,其中部分话单需要与其它话单合并,非部分话单不需要与其它话单合并,称A类话单,主机仅为一个分组数据协议PDP生成一张话单;计费网关CG包装话单,将主机送来的当前话单包装在数据包中,送合并流程进行合并;然后,计费网关CG合并话单:若当前话单为A类话单,则直接送到合并完成的话单存放队列Qok;若当前话单为部分话单与有关等待话单进行合并至不需要继续等待合并时,把合并结果送到合并完成的话单存放队列Qok。The host generates bills, including partial bills and non-partial bills. Partial bills need to be merged with other bills, and non-partial bills do not need to be merged with other bills. It is called A-type bills, and the host is only a packet data The protocol PDP generates a bill; the billing gateway CG packs the bill, packs the current bill sent by the host into a data packet, and sends it to the merging process for merging; then, the billing gateway CG merges the bills: if the current bill If it is a class A bill, it will be directly sent to the merged bill storage queue Qok; if the current bill is a partial bill and the relevant waiting bills are merged until there is no need to continue waiting for the merge, the merged result will be sent to the merged bill Storage queue Qok.

其中,主机生成的部分话单有首张部分话单、中间部分话单、和末张部分话单等。Wherein, the partial bills generated by the host include the first partial bill, the middle partial bill, and the last partial bill.

首张部分话单:主机为一个分组数据协议PDP生成了多张话单,其中最先生成的一张称为首张部分话单。First partial CDR: The host generates multiple CDRs for a packet data protocol PDP, and the first generated one is called the first partial CDR.

末张部分话单:主机为一个分组数据协议PDP生成了多张话单,其中最后生成的一张称为末张部分话单。Last partial CDR: The host generates multiple CDRs for a packet data protocol PDP, and the last generated one is called the last partial CDR.

中间部分话单:主机为一个分组数据协议PDP生成了多张话单,除了最先和最后生成的话单,其他话单都称为中间部分话单。Intermediate part of the bill: the host generates multiple bills for a packet data protocol PDP, except for the first and last generated bills, other bills are called the middle part of the bill.

部分话单可分为B类话单和C类话单,其中B类话单在合并后需要继续与其他话单合并,C类话单合并后不需要继续等待。Some bills can be divided into type B bills and type C bills, where type B bills need to be merged with other bills after being merged, and type C bills do not need to wait after being merged.

这样,话单按类型分为三种:In this way, the bills are divided into three types according to the type:

A类话单:不需要合并的话单;比如WCDMA和GPRS主机生成的S-CDR、G-CDR、M-CDR的单张话单和S-SMO-CDR、S-SMT-CDR(主机不会为短信息话单生成部分话单)。Class A bills: No need to combine bills; for example, single bills of S-CDR, G-CDR, M-CDR generated by WCDMA and GPRS hosts and S-SMO-CDR, S-SMT-CDR (the host will not Generate partial bills for SMS bills).

B类话单:需要等待后续部分话单的合并,同时可能需要与已有的部分话单进行合并,包括首张部分话单和中间部分话单;比如WCDMA和GPRS主机生成的S-CDR、G-CDR、M-CDR的中间部分话单和首张部分话单。Type B bills: It is necessary to wait for the merging of the subsequent part of the bills, and may need to merge with the existing part of the bills, including the first part of the bills and the middle part of the bills; such as the S-CDR generated by the WCDMA and GPRS host, The middle part of the bill and the first part of the bill of G-CDR and M-CDR.

C类话单:需要与以前的部分话单合并,但不需要等待继续合并的话单;比如WCDMA和GPRS主机生成的S-CDR、G-CDR、M-CDR的末张部分话单。Type C bills: It needs to be merged with the previous partial bills, but does not need to wait for the merged bills; such as the last partial bills of S-CDR, G-CDR, and M-CDR generated by WCDMA and GPRS hosts.

计费网关CG收到主机送来的话单后数量达到一个预定的值,或者在达到预定数量之前超过了时间限制,就把收到的话单包装在一个数据包中,送合并流程进行合并;After the billing gateway CG receives the bills sent by the host, the number reaches a predetermined value, or exceeds the time limit before reaching the predetermined number, it packs the received bills in a data packet and sends them to the merge process for merging;

下面的叙述按照这样的规则进行排版:具有相同缩进的段落,叙述的是并列的操作;在本段缩进的基础上,紧接在后面缩进的段落,是本段叙述的后续操作,计费网关CG合并话单时,如图1所示:The following descriptions are formatted according to the following rules: Paragraphs with the same indentation describe parallel operations; on the basis of the indentation of this paragraph, the next indented paragraph is the follow-up operation of the description in this paragraph. When billing gateway CG merges bills, as shown in Figure 1:

A)对于A类话单,直接送合并完成的话单存放队列Qok;A) For the A-type bills, directly send the merged bills to the storage queue Qok;

B)对于B类话单,首先根据当前话单的关键域在等待队列Qw中查找正在等待当前话单的话单,即查找属于同一个分组数据协议PDP的话单;B) for B class bill, at first according to the key field of current bill, search and wait for the bill of current bill in waiting queue Qw, promptly search the bill that belongs to same packet data protocol PDP;

i.若找到等待话单,先判断两张话单是否允许合并;i. If the waiting bill is found, first judge whether the two bills are allowed to be merged;

1)若允许合并则把当前话单与等待话单合并,合并的结果保留在等待队列Qw中,其包号与原先等待话单的包号相同,合并结果中的数据已经包含当前话单和等待话单,两张话单合并完成后,再判断话单所属的分组数据协议PDP是否已经结束;1) If merging is allowed, the current bill and the waiting bill are merged, and the merged result is kept in the waiting queue Qw, and its packet number is the same as that of the original waiting bill, and the data in the merged result already includes the current bill and Wait for the bill, after the two bills are merged, then judge whether the packet data protocol PDP to which the bill belongs has ended;

i)若话单所属分组数据协议PDP已经结束,再判断合并结果是否需要继续等待所属分组数据协议PDP的其他未到达的部分话单;i) If the packet data protocol PDP to which the bill belongs has ended, then judge whether the merging result needs to continue to wait for other unreached partial bills of the packet data protocol PDP to which the bill belongs;

a)若不需要继续等待,则把合并结果送合并完成的话单存放队列Qok,当前话单的合并过程结束;a) If there is no need to continue to wait, then the merged result is sent to the merged bill storage queue Qok, and the merge process of the current bill is completed;

b)若需要继续等待,则让合并结果在等待队列Qw中再逗留一段时间,直到话单所属分组数据协议PDP的所有部分话单到达,当前话单的合并过程结束;b) If it is necessary to continue to wait, then allow the merging result to stay in the waiting queue Qw for a period of time until all part of the bills of the packet data protocol PDP to which the bills belong arrive, and the merging process of the current bills ends;

ii)若话单所属分组数据协议PDP未结束,则合并结果继续等待话单所属分组数据协议PDP的后续部分话单,当前话单的合并过程结束;ii) If the packet data protocol PDP to which the bill belongs is not over, the merging result continues to wait for the subsequent part of the bill of the packet data protocol PDP to which the bill belongs, and the merging process of the current bill ends;

2)若不允许合并则把等待话单送合并完成的话单存放队列Qok,用当前话单替换等待话单在等待队列Qw中的位置,继续等待后续话单,话单的包号为原先等待话单的包号,当前话单的合并过程结束;2) If merging is not allowed, the waiting bills are sent to the merged bill storage queue Qok, and the current bills are used to replace the position of the waiting bills in the waiting queue Qw, and continue to wait for the follow-up bills. The package number of the bills is the original waiting The package number of the bill, the merging process of the current bill is over;

ii.若无正在等待的话单,则直接把当前话单送等待队列Qw,并根据当前话单是否所属分组数据协议PDP的首张部分话单,按照如下方式处理当前话单的包号;ii. If there is no waiting bill, then directly send the current bill to the waiting queue Qw, and process the packet number of the current bill in the following manner according to whether the current bill belongs to the first partial bill of the packet data protocol PDP;

1)若当前话单是所属分组数据协议PDP的首张部分话单,则当前话单的包号不变,当前话单的合并过程结束;1) If the current bill is the first partial bill of the packet data protocol PDP to which it belongs, the packet number of the current bill remains unchanged, and the merging process of the current bill ends;

2)若当前话单不是所属分组数据协议PDP的首张部分话单,则按照规则调整话单包号,当前话单的合并过程结束;2) If the current bill is not the first partial bill of the packet data protocol PDP to which it belongs, then adjust the bill package number according to the rules, and the merging process of the current bill ends;

C)对C类话单,首先在等待队列Qw中查找正在等待当前话单的话单;C) to the C class bill, at first in the waiting queue Qw, look for the bill that is waiting for the current bill;

i.若找到等待话单,则先判断两张话单是否允许合并;i. If the waiting bill is found, first judge whether the two bills are allowed to be merged;

1)若允许合并则把当前话单与等待话单合并,合并的结果保留在等待队列Qw中,其包号与原先等待话单的包号相同,合并结果中的数据已经包含前话单和等待话单;两张话单合并完成后,再判断合并结果是否需要继续等待所属分组数据协议PDP的其他未到达的部分话单。1) If merging is allowed, the current bill and the waiting bill are merged, and the merged result is kept in the waiting queue Qw, and its packet number is the same as that of the original waiting bill, and the data in the merged result already includes the previous bill and Waiting for the bills; after the two bills are merged, it is judged whether the merger result needs to continue to wait for other partial bills of the packet data protocol PDP that have not arrived.

01.不需要继续等待,则将合并结果从等待队列Qw中取出并送合并完成的话单存放队列Qok,当前话单的合并过程结束;01. No need to continue to wait, then take out the merging result from the waiting queue Qw and send it to the bill storage queue Qok when the merging is completed, and the merging process of the current bill ends;

02.若需要继续等待,则让合并结果在等待队列Qw中再逗留一段时间,直到所属分组数据协议PDP的所有部分话单到达,当前话单的合并过程结束;02. If it is necessary to continue to wait, then let the merged result stay in the waiting queue Qw for a period of time until all part of the bills of the packet data protocol PDP to which they belong arrive, and the merge process of the current bills ends;

2)若不允许合并,则把等待话单和当前话单分别送合并完成的话单存放队列Qok,当前话单的合并过程结束。2) If merging is not allowed, the waiting bills and the current bills are sent to the merged bill storage queue Qok respectively, and the merging process of the current bills ends.

ii.若没有找到等待话单,则直接将当前话单送合并完成的话单存放队列Qok,当前话单的合并过程结束。ii. If the waiting bill is not found, the current bill is directly sent to the merged bill storage queue Qok, and the merge process of the current bill is completed.

以上为话单合并的基本流程,基本流程中允许附加额外的合并规则,包括移动总局的《GPRS计费网关技术规范》V1.2.0版本,以及设备供应商根据自己的特点需要附加的合并规则。The above is the basic flow of bill merging, in which additional merging rules are allowed, including version V1.2.0 of "GPRS Charging Gateway Technical Specifications" issued by the General Office of Mobile, and additional merging rules required by equipment suppliers according to their own characteristics.

计费网关CG预处理生成话单包,并赋予唯一递增的序列号,然后发送给合并流程进行合并。所以合并流程收到的是序列号递增的话单包。The billing gateway CG pre-processes to generate a bill package, and assigns a unique incremental sequence number, and then sends it to the merging process for merging. Therefore, what the merging process receives is the bill packet with the sequence number incremented.

合并流程每次合并一个话单包中的话单,合并完一个话单包之后再合并下一个话单包(包号增加1),不能够交错合并包号不连续的话单包。The merging process merges the bills in one bill package each time, and then merges the next bill pack after merging one bill pack (the package number is increased by 1).

在上述处理过程中,其他未在话单等待队列中等待超时的话单为黑话单,计费网关强行中断该话单的合并,并将其送到合并完成的话单存放队列。In the above process, other bills that have not waited for timeout in the bill waiting queue are black bills, and the billing gateway forcibly interrupts the merging of the bills, and sends them to the merged bill storage queue.

即当判断合并结果是否需要继续等待所属分组数据协议PDP的其他未到达的部分话单时,在需要继续等待时,如果话单在等待队列Qw中,等待时长超过一规定时长或合并模块接收到的话单包号超过等待队列Qw中话单包号一预定值时,为了减少等待队列Qw队列中话单的数据量,限制话单在内存中等待的时长,把话单强行中断合并,并把话单送合并完成的话单存放队列Qok中,这些被强行送走的话单为黑话单。That is, when judging whether the merging result needs to continue to wait for other unarrived partial bills of the packet data protocol PDP to which it belongs, when it is necessary to continue waiting, if the bill is in the waiting queue Qw, the waiting time exceeds a specified duration or the merging module receives When the bill packet number exceeds the predetermined value of the bill packet number in the waiting queue Qw, in order to reduce the data volume of the bill in the waiting queue Qw queue and limit the waiting time of the bill in the memory, the bills are forcibly interrupted and merged, and the The bills sent and merged are stored in the queue Qok, and those bills that are forcibly sent away are black bills.

等待队列Qw中话单的包号与合并模块收到的当前包号差值大于预定值m时,作为话单等待超时,合并模块定期检测等待队列Qw中等待超时的话单,当合并模块收到的话单的包号,假设为X时,满足下面的条件时,生成黑话单:X%m=0,该式中%符号代表整除后的余数,这些满足条件的点为超时的检查点,如图2所示,小圆点代表满足条件的点,在这些点上合并模块检查等待队列Qw中是否有等待超时的话单,所有超时话单都是必须中断合并的黑话单;When the difference between the packet number of the bill in the waiting queue Qw and the current packet number received by the merging module is greater than the predetermined value m, it is regarded as the bill waiting for overtime, and the merging module periodically detects the bill waiting for the timeout in the waiting queue Qw. When the merging module receives If the packet number of the bill is assumed to be X, a black bill will be generated when the following conditions are met: X%m=0, where the % sign represents the remainder after divisibility, and these points that meet the conditions are overtime checkpoints, such as As shown in Figure 2, the dots represent the points that meet the conditions. At these points, the merging module checks whether there is a waiting timeout bill in the waiting queue Qw, and all overtime bills are black bills that must be interrupted and merged;

例如,到达合并模块的话单包的包号从1开始,当包号达到m时,合并模块在合并该话单包之前,检查等待队列Qw中是否有话单等待超时,此时没有话单等待超时,不会生成黑话单;For example, the package number of the bill packet arriving at the merging module starts from 1, and when the packet number reaches m, the merging module checks whether there is a bill waiting in the waiting queue Qw for overtime before merging the bill packet, and there is no bill waiting at this moment Timeout, no black call list will be generated;

当包号到达2m时,合并模块检查等待队列Qw中是否有话单等待超时,此时所有从m以前开始的分组数据协议PDP在等待队列Qw中等待的话单都被认为等待超时,是指在m之前开始,并且当到达2m时分组数据协议PDP仍然没有结束,从而等待队列Qw中还有分组数据协议PDP的话单。对于到达2m之前已经结束的分组数据协议PDP,到达2m时等待队列Qw中没有这些分组数据协议PDP的话单,这些超时的话单被强行中断合并,作为黑话单送合并完成的话单存放队列Qok。开始于区间(m,2m)之间的分组数据协议PDP的话单将在3m话单包到达时等待超时,若包号到达3m时分组数据协议PDP还没有结束的话;When the packet number reaches 2m, the merging module checks whether there is a bill in the waiting queue Qw and waits for timeout. At this time, all packet data protocol PDPs that start before m are waiting for the bills in the waiting queue Qw to be considered as waiting for timeout. It starts before m, and when it reaches 2m, the packet data protocol PDP is still not finished, so there is still a packet data protocol PDP bill in the waiting queue Qw. For the packet data protocol PDP that has ended before reaching 2m, there are no these packet data protocol PDP bills in the waiting queue Qw when reaching 2m, these overtime bills are forcibly interrupted and merged, and sent as black bills to the merged bill storage queue Qok. The packet data protocol PDP bill starting from the interval (m, 2m) will wait for timeout when the 3m bill packet arrives, if the packet data protocol PDP has not ended when the packet number reaches 3m;

当包号到达3m时,合并模块检查等待队列Qw中是否有话单等待超时,此时所有从2m以前开始的分组数据协议PDP在等待队列Qw中等待的话单都被认为等待超时,这些超时的话单被强行中断合并,作为黑话单送合并完成的话单存放队列Qok;When the packet number reaches 3m, the merging module checks whether there is a bill in the waiting queue Qw and waits for timeout. At this time, all packet data protocol PDPs that start before 2m wait for the bills in the waiting queue Qw are considered to be waiting for timeout. If these timeouts The bill is forcibly interrupted and merged, and sent as a black bill to the bill storage queue Qok after the merge is completed;

如图3所示,对于3m以后的话单包是相同的过程;当包号到达i.m时,合并模块把所有从(i-1).m之前(包括(i-1).m)开始的分组数据协议PDP的话单作为黑话单送合并完成的话单存放队列Qok;在每一个检查点上生成的黑话单,都是跨越了至少一个[i.m,(i+1).m]区间的分组数据协议PDP的话单;As shown in Figure 3, it is the same process for the single package after 3m; when the package number reaches i.m, the merge module will group all the groups starting from (i-1).m before (including (i-1).m) Data protocol PDP bills are sent as black bills to merged bill storage queue Qok; the black bills generated at each checkpoint are packet data protocols spanning at least one [i.m, (i+1).m] interval PDP bill;

若不考虑附加的规则,分组数据协议PDP散落在区间[Y,(i+2).m]的话单都与该分组数据协议PDP在话单包Y中的首张部分话单合并,并且当包号到达(i+2).m时,合并的结果被作为黑话单送合并完成的话单存放队列Qok中,这里所说的附加规则可能导致分组数据协议PDP的话单被提前中断合并,比如话单不按顺序到达,或者最大合并话单数的限制等,根据基本流程,尽管话单可能被提前中断合并,但是在生成黑话单之前话单的包号不会改变;If the additional rules are not considered, the bills of the packet data protocol PDP scattered in the interval [Y, (i+2).m] are merged with the first part of the bills of the packet data protocol PDP in the bill packet Y, and when When the packet number reaches (i+2).m, the combined result is sent as a black bill to the bill storage queue Qok after the merge is completed. The additional rules mentioned here may cause the packet data protocol PDP bill to be interrupted and merged in advance, such as Bills arrive out of order, or there is a limit on the maximum number of merged bills, etc. According to the basic process, although the bills may be interrupted and merged in advance, the package number of the bill will not change before the black bill is generated;

分组数据协议PDP散落在区间[(i+2).m,(i+3).m]的话单都与该分组数据协议PDP在话单包(i+2).m中的首张部分话单合并,并且当包号到达(i+3).m时,合并的结果被作为黑话单送合并完成的话单存放队列Qok中;The packet data protocol PDP is scattered in the interval [(i+2).m, (i+3).m], and the bills are all related to the first part of the packet data protocol PDP in the bill packet (i+2).m. Bills are merged, and when the packet number reaches (i+3).m, the merged result is sent as a black bill to the bill storage queue Qok when the merge is completed;

如此类推,对话单进行合并。By analogy, the dialog sheets are merged.

若在“检查点”上生成黑话单时,超长的分组数据协议PDP很多的话,就会导致合并完成的话单存放队列Qok中产生过多的话单,称这种情况为“数据爆发”。为了消除这种爆发的情况,使话单尽可能平缓的送合并完成的话单存放队列Qok,使用了下面的缓存机制:在检查点上生成的黑话单不直接送合并完成的话单存放队列Qok,而是送到一个临时队列Qt中,临时队列Qt中的话单将在生成该临时队列Qt的检查点后面紧邻的一个(i.m,(i+1).m)区间中被均匀地送入合并完成的话单存放队列Qok中;如果在检查点上生成的临时队列Qt中话单数为L,则(i.m,(i+1).m)区间中每一个话单包应该从临时队列Qt中带走的话单数为:[L/(m-1)]+1,式中“[]”表示取整数部分;例如图2中,在2.m点生成的临时队列Qt中的话单将在区间(2.m,3.m)中被均匀送走。If there are a lot of ultra-long packet data protocol PDPs when generating black bills on the "checkpoint", it will cause too many bills to be generated in the merged bill storage queue Qok, which is called "data explosion". In order to eliminate this outburst situation and make the bills be sent to the merged bill storage queue Qok as smoothly as possible, the following caching mechanism is used: the black bills generated on the checkpoint are not directly sent to the merged bill storage queue Qok, Instead, it is sent to a temporary queue Qt, and the bills in the temporary queue Qt will be evenly sent into the merged area in a (i.m, (i+1).m) interval immediately after the checkpoint that generates the temporary queue Qt. The bill is stored in the queue Qok; if the number of bills in the temporary queue Qt generated on the checkpoint is L, each bill packet in the interval (i.m, (i+1).m) should be taken away from the temporary queue Qt The number of bills is: [L/(m-1)]+1, where "[]" represents the integer part; for example, in Figure 2, the bills in the temporary queue Qt generated at point 2.m will be in the interval (2 .m, 3.m) are evenly sent away.

考虑分组数据协议PDP的话单和网络模块生成的话单包相比稀疏的多,就是说在分组数据协议PDP跨越的包号区间中,并非每一个话单包都会有分组数据协议PDP的话单。Considering that the packet data protocol PDP bills are much sparser than the bill packets generated by the network module, that is to say, in the packet number range spanned by the packet data protocol PDP, not every bill packet will have a packet data protocol PDP bill.

如图3所示,一个分组数据协议PDP开始于Y,并终止于(i+4).m之后,设在话单包(i+2).m中没有该分组数据协议PDP的话单,考察一下生成黑话单的过程:As shown in Figure 3, a packet data protocol PDP starts at Y and terminates after (i+4).m, if there is no bill of the packet data protocol PDP in the bill packet (i+2).m, investigate Let’s take a look at the process of generating a black call list:

A)当包号到达(i+2).m时,因为该分组数据协议PDP的话单的包号在(i+1).m之前(包号为Y),所以认为话单等待超时,从而被作为黑话单送临时队列Qt中。A) When the packet number reaches (i+2).m, because the packet number of the packet data protocol PDP bill is before (i+1).m (the packet number is Y), it is considered that the bill waits for overtime, thereby It is sent to the temporary queue Qt as a black call ticket.

B)因为在话单包(i+2).m中没有该分组数据协议PDP的话单,当包号(i+3).m时,分组数据协议PDP的话单的包号并没有在(i+2).m之前,所以不会认为话单等待超时。然而这是一个跨越了区间[(i+2).m,(i+3).m]的超长分组数据协议PDP的话单,应该被作为黑话单送临时队列Qt。B) Because there is no PDP bill in the bill packet (i+2).m, when the packet number (i+3).m, the packet number of the packet data protocol PDP bill is not in (i +2).m, so it will not be considered that the bill waiting timed out. However, this is an ultra-long packet data protocol PDP bill that spans the interval [(i+2).m, (i+3).m] and should be sent to the temporary queue Qt as a black bill.

为了保证在(i+3).m检查点上分组数据协议PDP的话单被送临时队列Qt,设置如下规则:In order to ensure that the packet data protocol PDP bills are sent to the temporary queue Qt at the (i+3).m checkpoint, the following rules are set:

检查点上分组数据协议PDP的话单被送临时队列Qt时,如果合并模块正在合并一张话单,话单的包号为Y,Y∈[(k.m,(k+1).m),并且在等待队列Qw中没有相应的等待话单,先判断当前话单是否所属分组数据协议PDP的首张部分话单;若当前话单是所属分组数据协议PDP的首张部分话单,则把当前话单作为新的节点送等待队列Qw,并且把话单的包号设置为Y,即话单的当前包号;若当前话单不是所属分组数据协议PDP的首张部分话单,则把当前话单作为新的节点送Qw中,并且把话单的包号调整为k.m,即与Y紧邻的前面一个检查点;根据上面的规则,如图3所示,当分组数据协议PDP散落在区间[(i+2).m,(i+3).m]的首张部分话单出现时,其包号被调整为(i+2).m,从而保证在(i+3).m检查点上分组数据协议PDP的话单被送临时队列Qt。When the packet data protocol PDP bill on the checkpoint is sent to the temporary queue Qt, if the merging module is merging a bill, the packet number of the bill is Y, Y∈[(k.m, (k+1).m), and If there is no corresponding waiting bill in the waiting queue Qw, first judge whether the current bill belongs to the first partial bill of the packet data protocol PDP; if the current bill is the first partial bill of the packet data protocol PDP to which it belongs, then the The bill is sent to the waiting queue Qw as a new node, and the packet number of the bill is set to Y, that is, the current packet number of the bill; if the current bill is not the first partial bill of the packet data protocol PDP to which it belongs, then the current The bill is sent to Qw as a new node, and the packet number of the bill is adjusted to k.m, which is the previous checkpoint immediately adjacent to Y; according to the above rules, as shown in Figure 3, when the packet data protocol PDP is scattered in the interval When the first partial bill of [(i+2).m, (i+3).m] appears, its packet number is adjusted to (i+2).m, so as to ensure that it is in (i+3).m The PDP bill on the checkpoint is sent to the temporary queue Qt.

检查点若在k.m上生成临时队列Qt时,从等待队列Qw的尾部向头部方向检查话单的包号,若话单的包号小于或者等于前一个超时检查点的包号(k-1).m,则把话单移动到临时队列Qt的头部;若发现一张话单的包号大于前一个超时检查点的包号(k-1).m,则生成临时队列Qt的过程结束;从临时队列Qt中取出话单时从尾部开始,向头部方向顺序取话单,每次取一定数量的话单,假设初始生成的临时队列Qt中话单数为L,则每次从临时队列Qt中取话单数量为:[L/(m-1)]+1,式中“[]”表示取整数部分,m为话单在内存中等待的最大包号差预定值。If the checkpoint generates a temporary queue Qt on k.m, check the packet number of the bill from the tail of the waiting queue Qw to the head direction, if the packet number of the bill is less than or equal to the packet number of the previous timeout checkpoint (k-1 ).m, the bill is moved to the head of the temporary queue Qt; if the packet number of a bill is found to be greater than the packet number (k-1).m of the previous timeout checkpoint, the process of generating the temporary queue Qt End; when taking out the bills from the temporary queue Qt, start from the tail, and take the bills sequentially toward the head, each time a certain number of bills are taken, assuming that the number of bills in the initially generated temporary queue Qt is L, then each time from the temporary The number of bills to be fetched in the queue Qt is: [L/(m-1)]+1, where “[]” represents the integer part, and m is the maximum packet number difference predetermined value of the bills waiting in the memory.

若CG在合并过程中异常或掉电,内存中的等待队列Qw列表将全部丢失。因为该列表可能非常庞大,在磁盘上保存该列表效率很低甚至是不可能的。可行的办法是保存某些状态,在启动时根据状态信息从原始话单数据中恢复。If the CG is abnormal or powered off during the merging process, all the waiting queue Qw lists in the memory will be lost. Because the list can be very large, it is inefficient or even impossible to save the list on disk. A feasible way is to save some state and restore it from the original bill data according to the state information at startup.

设合并模块在运行的某个时刻失败,失败之前由存盘模块最后保存的话单包为n,如图4所示,合并模块在合并完成第n包话单之后,合并得出的结果放在合并完成的话单存放队列Qok中以及话单包号n都已经被存盘模块成功保存,当系统恢复时需要恢复n处的等待队列Qw队列和临时队列Qt队列;Assume that the merging module fails at a certain moment of operation. Before the failure, the record package saved by the storage module is n, as shown in Figure 4. After the merging module completes the merging of the nth package of bills, the merged result is placed in the merging The finished bill storage queue Qok and the bill packet number n have been successfully saved by the storage module. When the system recovers, it is necessary to restore the waiting queue Qw queue and temporary queue Qt queue at n;

下面来考察来恢复n处的等待队列Qw和临时队列Qt队列的过程:从n-(n%m)-2.m处开始往后,重新合并所有话单包,并且在重新合并到达n之前(包括n),把所有的合并结果(放在合并完成的话单存放队列Qok中的话单)丢弃,当超过了n之后才保存合并结果。Let's examine the process of recovering the waiting queue Qw and the temporary queue Qt queue at n places: from n-(n%m)-2.m, re-merge all bill packets, and re-merge before reaching n (including n), all merged results (the bills placed in the merged bill storage queue Qok) are discarded, and the merged results are saved after exceeding n.

下面就各种情况讨论等待队列Qw和临时队列Qt的恢复结果。The recovery results of the waiting queue Qw and the temporary queue Qt are discussed below for various situations.

1.Qw的恢复1. Recovery of Qw

要求失败之前的等待队列Qw和恢复生成的等待队列Qw中包含的话单必须相同,两个Qw中的话单具有一一对应关系。It is required that the bills contained in the waiting queue Qw before the failure and the waiting queue Qw generated by recovery must be the same, and the bills in the two Qws have a one-to-one correspondence.

下面单独考察一个分组数据协议PDP,若对于等待队列Qw中的每一个分组数据协议PDP都能保证失败之前的话单和恢复生成的话单是相同的,就保证了两种情况下的Qw是相同的,恢复过程不能在Qw中引入新的分组数据协议PDP或者丢失了应该出现在等待队列Qw中的分组数据协议PDP,新到达的话单在等待队列Qw中没有对应的等待话单,且话单是分组数据协议PDP的首张部分话单,则把话单增加到等待队列Qw队列的头部,并且把话单的包号设置为话单当前的包号;若该话单在等待队列Qw没有对应的等待话单,且话单不是分组数据协议PDP的首张部分话单,则把话单增加到等待队列Qw队列的尾部,并调整话单的包号为当前临近的前一个超时检查点包号。Let’s examine a packet data protocol PDP separately. If each packet data protocol PDP in the waiting queue Qw can guarantee that the bills before the failure and the bills generated by recovery are the same, it is guaranteed that the Qw in the two cases is the same. , the recovery process cannot introduce a new packet data protocol PDP into Qw or lose the packet data protocol PDP that should appear in the waiting queue Qw, and the newly arrived bill has no corresponding waiting bill in the waiting queue Qw, and the bill is For the first partial bill of the packet data protocol PDP, the bill is added to the head of the waiting queue Qw queue, and the packet number of the bill is set as the current packet number of the bill; if the bill is in the waiting queue Qw there is no The corresponding waiting bill, and the bill is not the first partial bill of the packet data protocol PDP, then add the bill to the tail of the waiting queue Qw queue, and adjust the packet number of the bill to be the current adjacent previous timeout checkpoint package number.

首先考察在一个区间[k.m,(k+1).m]中可能出现的分组数据协议PDP的类型,如图5所示,终止于区间内的分组数据协议PDP(两种情况)在到达(k+1).m之前已经终止,话单被送合并完成的话单存放队列Qok。First examine the types of the packet data protocol PDP that may appear in an interval [k.m, (k+1).m]. As shown in Figure 5, the packet data protocol PDP (two cases) terminated in the interval arrives at ( k+1).m has been terminated before, and the bills are sent to the merged bill storage queue Qok.

这样,跨越了区间的分组数据协议PDP,在到达(k+1).m时被强行中断合并,话单被送临时队列Qt中。散落在(k+1).m之后的话单被作为新的节点加入到Qw中,话单包号被调整;开始于区间内的分组数据协议PDP,跨越(k+1).m时分组数据协议PDP的话单仍然在Qw中等待后续话单,因为还没有超时。In this way, the packet data protocol PDP that crosses the interval is forcibly interrupted and merged when it reaches (k+1).m, and the bill is sent to the temporary queue Qt. The bill scattered after (k+1).m is added to Qw as a new node, and the bill packet number is adjusted; it starts from the packet data protocol PDP in the interval, and the packet data spans (k+1).m The protocol PDP bill is still waiting for the follow-up bill in Qw, because it has not timed out yet.

根据图5和图6所示,故障点在n恢复点在i.m:在到达n之前就已经结束的分组数据协议PDP,因为其自然结束所以不用考虑,图中未标出,因为在正常合并过程中,这些分组数据协议PDP的话单已经被保存,恢复过程中被丢弃;As shown in Figure 5 and Figure 6, the failure point is at n and the recovery point is at i.m: the packet data protocol PDP that has ended before reaching n, because it ends naturally, so it is not considered, and it is not marked in the figure, because it is in the normal merge process In , these packet data protocol PDP bills have been saved and discarded during the recovery process;

开始于区间(i.m,n)并终止于n之后的分组数据协议PDP,正常合并过程和恢复过程是相同的,所以这部分分组数据协议PDP在等待队列Qw中的话单一定相同,即图6中恢复点之后的话单。For the packet data protocol PDP that starts from the interval (i.m, n) and ends after n, the normal merging process and recovery process are the same, so the bills of this part of the packet data protocol PDP in the waiting queue Qw must be the same, that is, in Figure 6 Call sheet after recovery point.

开始于i.m之前并终止于n之后的分组数据协议PDP,因为至少在到达(i+1).m时被强行中断合并,分组数据协议PDP散落在区间[(i+1).m,n]的话单的合并过程在正常情况下和恢复时的过程也是相同的,所以这部分分组数据协议PDP在等待队列Qw中的话单一定相同。PDPs that start before i.m and end after n, because they are forcibly interrupted at least when they reach (i+1).m, are scattered in the interval [(i+1).m,n] The merging process of bills is also the same under normal conditions and during recovery, so the bills of this part of the packet data protocol PDP in the waiting queue Qw must be the same.

因为分组数据协议PDP的话单在话单包中散落的位置是固定的,所以不管是正常合并过程,还是恢复过程,当到达(i+2).m点时所有分组数据协议PDP的话单在等待队列Qw中的相对位置是相同的;同样当到达n时所有分组数据协议PDP的话单在等待队列Qw中的相对位置也是相同的;在等待队列Qw中存在这样一个点:该点之前的所有话单都是包号经过调整的话单,该点之后的话单包号都有序(从小到大)。Because the scattered positions of the packet data protocol PDP bills in the bill packet are fixed, so whether it is a normal merge process or a recovery process, when the point (i+2).m is reached, all packet data protocol PDP bills are waiting The relative positions in the queue Qw are the same; similarly when n is reached, the relative positions of all packet data protocol PDP bills in the waiting queue Qw are also the same; there is such a point in the waiting queue Qw: all the words before this point The bills are bills with adjusted package numbers, and after this point, the bills and package numbers are in order (from small to large).

综上所述,经过恢复过程等待队列Qw被正确恢复。To sum up, after the recovery process, the waiting queue Qw is correctly recovered.

2.临时队列Qt的恢复2. Recovery of temporary queue Qt

如图5所示,在i.m、(i+1).m、(i+2).m、(i+3).m点都会生成一个临时队列Qt。i.m点生成的临时队列Qt中的话单在区间(i.m,(i+1).m)中被均匀送合并完成的话单存放队列Qok;(i+1).m点生成的临时队列Qt中的话单在区间((i+1).m,(i+2).m)中被均匀送合并完成的话单存放队列Qok;(i+2).m点生成的临时队列Qt中的话单在将区间((i+2).m,(i+3).m)中被均匀送合并完成的话单存放队列Qok,当到达n时临时队列Qt中的话单仅有部分被送合并完成的话单存放队列Qok,存留的部分是恢复时需要恢复的。As shown in Figure 5, a temporary queue Qt will be generated at points i.m, (i+1).m, (i+2).m, and (i+3).m. The bills in the temporary queue Qt generated by point i.m are evenly sent to the merged bill storage queue Qok in the interval (i.m, (i+1).m); the bills in the temporary queue Qt generated by point (i+1).m The bills in the interval ((i+1).m, (i+2).m) are evenly sent to the merged bill storage queue Qok; the bills in the temporary queue Qt generated at (i+2).m point will be In the interval ((i+2).m, (i+3).m), the merged bills are evenly sent to the storage queue Qok, and when n is reached, only part of the bills in the temporary queue Qt are sent to the merged bills and stored Queue Qok, the remaining part needs to be restored when it is restored.

如图7所示,在(i+2).m点生成了临时队列Qt,到达n时被送合并完成的话单存放队列Qok的是网格部分,条形部分是需要恢复的。As shown in Figure 7, a temporary queue Qt is generated at point (i+2).m, and when it reaches n, it is the grid part that is sent to the merged bill storage queue Qok, and the bar part needs to be restored.

考虑对临时队列Qt按照这样的规则操作:在超时检查点k.m上生成临时队列Qt时,从等待队列Qw的尾部向头部方向检查话单的包号。若话单的包号小于(或者等于)前一个超时检查点的包号(k-1).m,则把话单移动到临时队列Qt的头部。若发现一张话单的包号大于前一个超时检查点的包号(k-1).m,则生成临时队列Qt的过程结束;从临时队列Qt中取出话单时从尾部开始,向头部方向顺序取话单,每次取一定数量的话单(设初始生成的临时队列Qt中话单数为L,则每次从临时队列Qt中取话单数量为:[L/(m-1)]+1,“[]”表示取整数部分,m为话单在内存中等待的最大包号差)。Consider operating the temporary queue Qt according to the following rules: when generating the temporary queue Qt at the timeout checkpoint k.m, check the packet number of the bill from the tail of the waiting queue Qw to the head. If the packet number of the bill is less than (or equal to) the packet number (k-1).m of the previous timeout checkpoint, the bill is moved to the head of the temporary queue Qt. If find that the packet number of a bill is greater than the packet number (k-1).m of the previous overtime checkpoint, then the process of generating the temporary queue Qt ends; when taking out the bill from the temporary queue Qt, start from the tail and move forward Take the bills sequentially in the department direction, each time a certain number of bills are taken (assuming that the number of bills in the temporary queue Qt initially generated is L, then the number of bills taken from the temporary queue Qt each time is: [L/(m-1) ]+1, "[]" means to take the integer part, m is the difference between the maximum packet number waiting for the bill in the memory).

因为不管是正常合并过程,还是恢复过程,当到达(i+2).m时等待队列Qw中所有分组数据协议PDP的话单的相对位置是相同的,所以按照上面的规则,在(i+2).m点从Qw中生成的临时队列Qt中话单的相对位置也是相同的(在(i+1).m点也生成了一个临时队列Qt,但是到达(i+2).m之前其中的话单已经全部被送合并完成的话单存放队列Qok。当到达n时,临时队列Qt中话单的相对位置和话单的数量也一定相同,并且每一张话单的数据也是相同的。Because no matter it is a normal merging process or a recovery process, the relative positions of all packet data protocol PDP bills in the waiting queue Qw are the same when (i+2). ). The relative position of the bill in the temporary queue Qt generated from Qw at point m is also the same (a temporary queue Qt is also generated at point (i+1).m, but before reaching (i+2).m The bills have all been sent to the merged bill storage queue Qok. When n is reached, the relative position of the bills in the temporary queue Qt and the number of bills must be the same, and the data of each bill is also the same.

从以上讨论可以看出,在(i+2).m,包括该点直到n往后,任意一个点的等待队列Qw和临时队列Qt在正常合并过程和恢复过程中是完全相同的。It can be seen from the above discussion that at (i+2).m, including this point until n, the waiting queue Qw and temporary queue Qt at any point are exactly the same in the normal merge process and recovery process.

综上所述,恢复过程中临时队列Qt被正确恢复。To sum up, the temporary queue Qt is correctly restored during recovery.

CG在进行话单合并时,内存中会有大量话单在等待,从大量的话单中搜索出符合条件话单的速度,极大的影响CG处理话单的速度,为了提高搜索的速度,在Qw的基础上建立一个索引表,搜索的时候就在索引表中进行,索引表采用杂凑表,或者称为HASH表、哈希表实现,每当Qw队列中进入新的话单时,就在索引表中增加新的索引节点,而当从Qw中删除一个节点时,就删除索引表中的相应节点。When CG is merging bills, there will be a large number of bills waiting in the memory, and the speed of searching out qualified bills from a large number of bills will greatly affect the speed of CG processing bills. In order to improve the search speed, in An index table is established on the basis of Qw, and the search is performed in the index table. The index table is implemented by a hash table, or called a HASH table, or a hash table. A new index node is added to the table, and when a node is deleted from Qw, the corresponding node in the index table is deleted.

本发明对实时联机话单合并和脱机合并都有效,其原理和控制过程与上述一致,此处不再赘述。The present invention is effective for both real-time online call list merging and offline merging, and its principle and control process are consistent with the above, which will not be repeated here.

Claims (11)

1. telephone bill combining process method, it is characterized in that: it adopts following steps:
Main frame generates ticket, comprises partial CDR and non-partial CDR, and wherein partial CDR need merge with other ticket, and non-partial CDR does not need to merge with other ticket, claims the category-A ticket; Charging gateway packing ticket, the current ticket that main frame is sent here is packaged in the packet, send the merging flow process to merge; Then, charging gateway Consolidate CDR:, then directly deliver to and merge the ticket of finishing and deposit formation if current ticket is the category-A ticket; Be incorporated into when not needing continuation etc. to be combined with relevant wait ticket if current ticket is a partial CDR, amalgamation result delivered to the ticket that merging finishes deposit formation;
Described partial CDR can be divided into category-B ticket and C class ticket, and wherein the category-B ticket needs to continue after merging to merge with other tickets, after merging, C class ticket do not need to continue to wait for, and during the charging gateway Consolidate CDR,
A) if current ticket is the category-B ticket, at first search the wait ticket that belongs to same packet data protocol at waiting list;
I. if find the wait ticket, judge earlier whether two tickets allow to merge;
1) if allow to merge, earlier current ticket is merged with waiting for ticket, amalgamation result is retained in the waiting list, and its Bale No. waits for that with original the Bale No. of ticket is identical, judges then whether the packet data protocol under the ticket finishes;
I) if finish, judge again amalgamation result whether need to continue to wait under the partial CDR of other no shows of packet data protocol;
A) if do not need to continue to wait for that then the ticket that send merging to finish is deposited formation to amalgamation result, the merging process of current ticket finishes;
B) if need continue to wait for, then allow amalgamation result be retained in the waiting list, arrive the merging process end of the current tickets in back up to all partial CDRs of affiliated packet data protocol;
Ii) if packet data protocol does not finish under the ticket, then amalgamation result continues to wait for the further part ticket of the affiliated packet data protocol of ticket, and the merging process of current ticket finishes;
2) do not deposit formation if do not allow to merge the ticket that then send merging to finish to the wait ticket, replace the position of wait ticket in waiting list with current ticket, continue to wait for follow-up ticket, the Bale No. of ticket is original Bale No. of waiting for ticket, and the merging process of current ticket finishes;
Ii. if there is not the ticket waiting for, then directly send waiting list current ticket, and according to current ticket whether under first partial CDR of packet data protocol, handle the Bale No. of current ticket in the following manner:
1) if current ticket is a first partial CDR of affiliated packet data protocol, then the Bale No. of current ticket is constant, and the merging process of current ticket finishes;
2) if current ticket is not a first partial CDR of affiliated packet data protocol, then adjust the ticket Bale No., the merging process of current ticket finishes;
B) if current ticket is a C class ticket, at first in waiting list, search the ticket of waiting for current ticket;
I. if find the wait ticket, judge earlier then whether two tickets allow to merge;
1) if allowing to merge then merges current ticket and wait ticket, the result of merging is retained in the waiting list, and its Bale No. waits for that with original the Bale No. of ticket is identical, and the data in the amalgamation result have comprised preceding ticket and waited for ticket; Two tickets merge finish after, judge again amalgamation result whether need to continue to wait under the partial CDR of other no shows of packet data protocol;
01., then amalgamation result is taken out from waiting list and send and merge the ticket of finishing and deposit formation, the merging process end of current ticket if do not need continue to wait for;
02. if need to continue to wait for, then allow amalgamation result stay a period of time in waiting list, up to all partial CDRs arrival of affiliated packet data protocol, the merging process of current ticket finishes again;
2) if do not allow to merge, then merge the ticket of finishing and deposit formation waiting for that ticket and current ticket send respectively, the merging process of current ticket finishes;
Ii. if do not find the wait ticket, then the ticket that directly send merging to finish current ticket is deposited formation, and the merging process of current ticket finishes.
2. telephone bill combining process method according to claim 1, it is characterized in that: quantity reached a predetermined value after described charging gateway was received the ticket that main frame sends here, perhaps before reaching predetermined quantity, surpass time restriction, sent the merging flow process to merge.
3. telephone bill combining process method according to claim 1 is characterized in that: other not in the ticket waiting list ticket of wait timeout be the argot list, charging gateway interrupts the merging of this ticket by force, and is sent to and merges the ticket finish and deposit formation.
4. telephone bill combining process method according to claim 3, it is characterized in that: the ticket in the described ticket waiting list is regularly detected, when the stand-by period surpasses current Bale No. difference that regulation duration or Bale No. and merging module receive greater than predetermined value m, be considered as wait timeout, when the Bale No. that merges the ticket that module receives, when being assumed to be X, when satisfying following conditions, generate argot list: X%m=0, remainder after the % symbology is divided exactly in this formula, these points that satisfy condition are overtime checkpoint.
5. telephone bill combining process method according to claim 4 is characterized in that: when described argot list generates, use following caching mechanism:
The argot list that generates on the checkpoint is delivered in the interim formation, is sent into equably in (i.m, (i+1) .m) interval that the ticket in the interim formation will be close to later in the checkpoint that generates this interim formation to merge the ticket of finishing and deposit in the formation;
If the ticket number is L in the interim formation that generates on the checkpoint, then the ticket number that each ticket bag should be taken away from interim formation in (i.m, (i+1) .m) interval is: [L/ (m-1)]+1, " [] " expression round numbers part in the formula.
6. telephone bill combining process method according to claim 5, it is characterized in that: when the ticket of packet data protocol is sent interim formation on the described checkpoint, merging a ticket if merge module, the Bale No. of ticket is Y, Y ∈ [(k.m, (k+1) .m), and in waiting list the not corresponding ticket of waiting for, judge earlier whether first partial CDR of affiliated packet data protocol of current ticket;
If current ticket is first partial CDR of affiliated packet data protocol, then send waiting list current ticket as new node, and the Bale No. of ticket is set to Y, i.e. the current Bale No. of ticket;
If current ticket is not first partial CDR of affiliated packet data protocol, then current ticket sent in the waiting list as new node, and the Bale No. of ticket is adjusted into k.m, be i.e. the checkpoint, front that is close to Y.
7. telephone bill combining process method according to claim 4, it is characterized in that: described ticket newly arrives, in waiting list, there is not corresponding wait ticket, and ticket is a first partial CDR of packet data protocol, then ticket is increased to the head of waiting list, and the Bale No. of ticket is set to the current Bale No. of ticket; If this ticket does not have corresponding wait ticket at waiting list, and ticket is not a first partial CDR of packet data protocol (PDP), then ticket is increased to the waiting list rear of queue, and the Bale No. of adjustment ticket is the current previous time-out check point Bale No. that closes on.
8. according to claim 5 or 6 described telephone bill combining process methods, it is characterized in that: described checkpoint is if when generating interim formation on k.m, check the Bale No. of ticket to cephalad direction from the afterbody of waiting list, if the Bale No. of ticket is less than or equal to Bale No. (k-1) .m of previous time-out check point, then ticket is moved to the head of interim formation; If find Bale No. (k-1) .m of the Bale No. of a ticket greater than previous time-out check point, the process that then generates interim formation finishes;
When from interim formation, taking out ticket from afterbody, get ticket to the cephalad direction order, get the ticket of some at every turn, suppose that the ticket number is L in the initial interim formation that generates, then get ticket quantity from interim formation is at every turn: [L/ (m-1)]+1, " [] " expression round numbers part in the formula, m is the maximum Bale No. difference predetermined value that ticket is waited in internal memory.
9. according to claim 4 or 5 or 6 described telephone bill combining process methods; it is characterized in that: described ticket in merging process because unusual or power down; waiting list tabulation in the internal memory will all be lost; by preserving intermediateness information, the waiting list that recovers from the Original CDR data in the internal memory according to state information when starting is tabulated.
10. according to claim 4 or 5 or 6 described telephone bill combining process methods, it is characterized in that: described ticket is set up a concordance list on the basis of waiting list when merging, carry out in concordance list in the time of search.
11. telephone bill combining process method according to claim 10, it is characterized in that: described concordance list adopts hash table, when in the waiting list formation, entering new ticket, just in concordance list, increase new index node, and when node of deletion from waiting list, just delete the respective nodes in the concordance list.
CNB021299633A 2002-08-27 2002-08-27 Telephone bill combining process method Expired - Fee Related CN1225863C (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CNB021299633A CN1225863C (en) 2002-08-27 2002-08-27 Telephone bill combining process method
PCT/CN2003/000411 WO2004021674A1 (en) 2002-08-27 2003-05-29 A bill amalgamation process method
AU2003234898A AU2003234898A1 (en) 2002-08-27 2003-05-29 A bill amalgamation process method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB021299633A CN1225863C (en) 2002-08-27 2002-08-27 Telephone bill combining process method

Publications (2)

Publication Number Publication Date
CN1479485A CN1479485A (en) 2004-03-03
CN1225863C true CN1225863C (en) 2005-11-02

Family

ID=31954571

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB021299633A Expired - Fee Related CN1225863C (en) 2002-08-27 2002-08-27 Telephone bill combining process method

Country Status (3)

Country Link
CN (1) CN1225863C (en)
AU (1) AU2003234898A1 (en)
WO (1) WO2004021674A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106547643A (en) * 2015-09-21 2017-03-29 阿里巴巴集团控股有限公司 The restoration methods and device of abnormal data

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1870708A (en) * 2005-12-14 2006-11-29 华为技术有限公司 Ticket conveying method, ticket conveying system and exchange equipment
CN100454814C (en) * 2006-02-18 2009-01-21 华为技术有限公司 A method for associating and distinguishing billing bills in a fork scenario
CN1933512B (en) * 2006-09-30 2011-01-05 华为技术有限公司 A bill processing device and method
CN101114915B (en) * 2007-08-23 2010-08-25 华为技术有限公司 Method and device for merging bills and saving buffer queue status
CN101217385B (en) * 2008-01-15 2013-01-16 中兴通讯股份有限公司 A method and system for the temporary storage and treatment of charging bill
CN102137369B (en) * 2010-01-25 2014-12-24 中国移动通信集团广西有限公司 Method, device, relevant system and equipment for processing charging ticket
CN102761851B (en) * 2011-04-25 2014-12-31 中国移动通信集团设计院有限公司 Charging method and device based on divided detail records
CN107515886B (en) * 2016-06-17 2020-11-24 阿里巴巴集团控股有限公司 Data table identification method, device and system
CN107769977B (en) * 2017-10-31 2020-12-29 广东电网有限责任公司电力调度控制中心 Power communication network resource allocation method based on soft switch
CN109089257B (en) * 2018-09-11 2021-10-01 北京中创腾锐技术有限公司 Wireless network call ticket backtracking association method and system
CN110532294A (en) * 2019-09-03 2019-12-03 中国联合网络通信集团有限公司 Ticket merging method, device, equipment and computer readable storage medium
CN113645050B (en) * 2020-05-11 2024-02-23 中国移动通信集团湖北有限公司 Large-traffic user ticket gradient merging method and device and computing equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2662880B1 (en) * 1990-05-30 1993-05-07 Cit Alcatel METHOD FOR ACCESSING A USER TO THE DATA OF A WIRELESS TELEPHONY SUBSCRIPTION.
FI108828B (en) * 2000-03-14 2002-03-28 Sonera Oyj Providing billing in a telecommunications system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106547643A (en) * 2015-09-21 2017-03-29 阿里巴巴集团控股有限公司 The restoration methods and device of abnormal data
CN106547643B (en) * 2015-09-21 2020-05-22 阿里巴巴集团控股有限公司 Recovery method and device of abnormal data

Also Published As

Publication number Publication date
CN1479485A (en) 2004-03-03
WO2004021674A1 (en) 2004-03-11
AU2003234898A1 (en) 2004-03-19

Similar Documents

Publication Publication Date Title
CN1225863C (en) Telephone bill combining process method
CN1509094A (en) Downlink data packet scheduling system and method in mobile communication system
CN1515100A (en) Device and method for controlling packet data transmission between BSC and BTS
CN101035067A (en) Flow control implementation method and device based on the output queue
CN101047714A (en) Apparatus and method for processing network data
CN101068376A (en) Short message system, flow control configurating method and flow controlling method
CN1301626C (en) A method for performing system load control on mobile switch center
CN1794637A (en) Charge network and charge agency device and charge method
CN101075886A (en) Method and device for distributed charging content
CN101060559A (en) A man-machine command queue management system and method
CN1731870A (en) A method for billing information processing
CN1921534A (en) Method and device for realizing overdraft in pre-payment service
CN1744559A (en) Method for realizing routing via business attribute or according to business charging type
CN101075885A (en) Method and device for processing signaling flow in content charge
CN1753354A (en) Base station TCP agency confirmation method based on ARQ information and its system
CN1617523A (en) Transmission method for conversation data in group broad cast / broadcast service
CN1842022A (en) Log processing system and method
CN1681252A (en) Method of supporting node monitoring mobile user state by service universal packet wireless service
HK1061325B (en) A record combination processing method
HK1061325A1 (en) A record combination processing method
CN1561052A (en) A method and device for transmitting user data message
CN1652506A (en) Managing method of service universal packet wireless service supporting node to charging gateway
CN1894889A (en) Communications system
CN1154270C (en) Charging gateway multiple reorientation implementing method in mobile communication system and its equipment
CN1567821A (en) Call ticket repetition removing method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 1061325

Country of ref document: HK

C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20051102

Termination date: 20120827