WO2009026819A1 - Procédé et dispositif pour fusionner une facture et sauvegarder l'état de la file d'attente de tampon - Google Patents

Procédé et dispositif pour fusionner une facture et sauvegarder l'état de la file d'attente de tampon Download PDF

Info

Publication number
WO2009026819A1
WO2009026819A1 PCT/CN2008/071967 CN2008071967W WO2009026819A1 WO 2009026819 A1 WO2009026819 A1 WO 2009026819A1 CN 2008071967 W CN2008071967 W CN 2008071967W WO 2009026819 A1 WO2009026819 A1 WO 2009026819A1
Authority
WO
WIPO (PCT)
Prior art keywords
bill
cdr
queue
module
buffer
Prior art date
Application number
PCT/CN2008/071967
Other languages
English (en)
French (fr)
Inventor
Changzhen Li
Qi Wang
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 EP08783960A priority Critical patent/EP2178244A4/en
Publication of WO2009026819A1 publication Critical patent/WO2009026819A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/14Charging, metering or billing arrangements for data wireline or wireless communications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/14Charging, metering or billing arrangements for data wireline or wireless communications
    • H04L12/1403Architecture for metering, charging or billing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/901Buffering arrangements using storage descriptor, e.g. read or write pointers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/9042Separate storage for different parts of the packet, e.g. header and payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M15/00Arrangements for metering, time-control or time indication ; Metering, charging or billing arrangements for voice wireline or wireless communications, e.g. VoIP
    • H04M15/41Billing record details, i.e. parameters, identifiers, structure of call data record [CDR]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M15/00Arrangements for metering, time-control or time indication ; Metering, charging or billing arrangements for voice wireline or wireless communications, e.g. VoIP
    • H04M15/43Billing software details
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M15/00Arrangements for metering, time-control or time indication ; Metering, charging or billing arrangements for voice wireline or wireless communications, e.g. VoIP
    • H04M15/50Arrangements for metering, time-control or time indication ; Metering, charging or billing arrangements for voice wireline or wireless communications, e.g. VoIP for cross-charging network operators
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M15/00Arrangements for metering, time-control or time indication ; Metering, charging or billing arrangements for voice wireline or wireless communications, e.g. VoIP
    • H04M15/70Administration or customization aspects; Counter-checking correct charges
    • H04M15/725Administration or customization aspects; Counter-checking correct charges by the operator
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M15/00Arrangements for metering, time-control or time indication ; Metering, charging or billing arrangements for voice wireline or wireless communications, e.g. VoIP
    • H04M15/70Administration or customization aspects; Counter-checking correct charges
    • H04M15/74Backing up
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M2215/00Metering arrangements; Time controlling arrangements; Time indicating arrangements
    • H04M2215/01Details of billing arrangements
    • H04M2215/0164Billing record, e.g. Call Data Record [CDR], Toll Ticket[TT], Automatic Message Accounting [AMA], Call Line Identifier [CLI], details, i.e. parameters, identifiers, structure
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M2215/00Metering arrangements; Time controlling arrangements; Time indicating arrangements
    • H04M2215/52Interconnection, inter-exchange, reseller billing, billing agreements between different operators, e.g. billing identifier added on the CDR in order to cross charge the other operator, inter-operator accounting, reconciliation, bill directly resellers customers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M2215/00Metering arrangements; Time controlling arrangements; Time indicating arrangements
    • H04M2215/70Administration aspects, modify settings or limits or counter-check correct charges
    • H04M2215/7063Administer via operator
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M2215/00Metering arrangements; Time controlling arrangements; Time indicating arrangements
    • H04M2215/70Administration aspects, modify settings or limits or counter-check correct charges
    • H04M2215/709Backup

Definitions

  • the present invention relates to a bill processing technology, and in particular to a method and apparatus for merging and saving buffer queue status in a bill consolidation system.
  • the user may take a long time to talk, or the network resources are occupied by the General Packet Radio Service (GPRS) for a long time, the service system will be separated by a certain period of time.
  • GPRS General Packet Radio Service
  • the user generates a plurality of partial bills, so that a user can generate a multi-part bill in one call or one time.
  • these CDRs need to be merged into one CDR as much as possible and finally displayed to the user.
  • a single call or a single page of the Internet is generated by the same device, and they are in the same format. Therefore, these parts are directly combined and displayed in the form of a bill on the user's bill. On, for users to query.
  • IMS IP Multimedia Subsystem
  • GPRS General Packet Radio Service
  • the third generation mobile communication network system supports IMS.
  • IMS is part of the core network in the 3G system. It establishes end-to-end sessions and obtains the required quality of service through session initiation capabilities provided by the Session Initiation Protocol (SIP).
  • SIP Session Initiation Protocol
  • the IMS provides the bearer of SIP signaling and media data by the core network of the Packet-Switched domain (PS) by separating the control from the bearer.
  • PS Packet-Switched domain
  • the core part of the IMS provides session and service control, so that different access means are adopted. Users accessing the PS can use a variety of voice, data and multimedia services and new application services provided by the carrier through a converged core network.
  • the IMS layered structure generally includes three layers: a control layer, an application layer, and an access layer.
  • the access layer is used to implement access of the IMS terminal.
  • the control layer does not provide services. It only provides the necessary triggering, routing, and accounting functions for the service layer.
  • the call session control function (CSCF, Call Session Control)
  • the Function module performs the call gateway function, the call service trigger function, and the routing function to correctly forward SIP signaling messages to the application server.
  • the application layer supports various application servers and is responsible for providing multimedia services to users. This layer is independent of the access layer and control layer of the network, ensuring the independence of service development and provision.
  • the IMS session management entity e.g., CSCF
  • the IP connection entity e.g., GGSN, etc.
  • the IMS charging identifier (ICID) of the service SIP signaling and the GPRS charging identifier (GCID) of the service IP stream are exchanged and saved by the Go reference point, that is, the GCID is added to the IMS bill,
  • the ICID information is added to the GPRS bill as the associated information, thereby implementing the charging association between the IP stream and the SIP signaling.
  • the CDRs that need to be merged are derived from different devices, and the time for each device to generate the associated CDRs is different, and the time for transmission to the CDR consolidation system is different, in order to avoid the synchronization problem generated when the CDRs are merged.
  • Save the first-arrived bills to the buffer queue of the memory wait for the subsequent bills to be merged, and then merge them.
  • the buffer queue will occupy a large storage space during the waiting process; After the processing of the file of the bill is completed, the buffer queue needs to be saved in real time, that is, the state of the buffer queue is saved to the permanent storage, such as a disk, since the buffer queue is re-executed after each file is processed.
  • the embodiment of the present invention provides a method for saving a buffer queue state, which speeds up the processing speed of the bills.
  • Embodiments of the present invention provide a device for saving a buffer queue state, which speeds up the processing speed of bill consolidation.
  • the embodiment of the invention further provides a method for merging bills, which speeds up the processing speed of bill merging.
  • the embodiment of the invention further provides a device for combining bills, which speeds up the processing speed of bill consolidation.
  • the CDR ID assigned to the CDR is saved in the CDR ID queue.
  • the bill information of the bill newly added to the buffer queue is saved as a temporary bill file, and the bill ID queue is saved as an ID queue file.
  • a method for merging bills comprising:
  • the CDR group corresponding to the CDR that needs to be associated is found in the buffer queue, if the corresponding CDR group is not found, a new CDR group is created for the CDR that needs to be associated, and the CDR group needs to be associated.
  • the CDRs are added to the buffer queue to wait for the CDRs to be associated with the CDRs to be associated with the CDRs, and the CDRs are saved to the CDR ID queue. If the corresponding CDR group can be found, the CDRs are associated.
  • the bills are added to the corresponding bill group, and when the bills of the bill group are complete, the bills of the bill group are merged;
  • the bill information of the bill to be associated is saved as a temporary bill file, and the bill ID queue is saved as an ID queue file.
  • a method for merging bills comprising:
  • the CDR group corresponding to the CDR that needs to be associated is found in the buffer queue, if the corresponding CDR group is not found, a new CDR group is created for the CDR that needs to be associated, and the CDR group needs to be associated.
  • the CDRs are added to the buffer queue to wait for the CDRs to be associated with the CDRs to be associated with the CDRs, and the CDRs are saved to the CDR ID queue. If the corresponding CDR group can be found, the CDRs are associated.
  • the bills are added to the corresponding bill group, and when the bills of the bill group are complete, the bills of the bill group are merged;
  • the bill information of the bill to be associated is saved as a temporary bill file, and the bill ID queue is saved as an ID queue file.
  • a device for combining bills comprising a search module, a creation module, an allocation module, a buffer module, a merge determination module, a merge module and a storage module,
  • the locating module is configured to determine whether the CDR group corresponding to the CDR that needs to be associated is found in the buffer queue. If the CDR group corresponding to the CDR is not found, the triggering information for creating the CDR group is sent to the creating module, and is sent to the allocation module.
  • the trigger information of the CDR ID is allocated; if the corresponding CDR group is found, the trigger information for determining is sent to the merging judgment module; a creating module, configured to: when the trigger information of the created bill group is received, create a bill group corresponding to the bill, and add the bill and the corresponding bill group to the buffer queue of the buffer module And an allocating module, configured to: when receiving the trigger information of the allocated bill ID, assign a bill ID to the bill, and save the bill ID to the bill ID queue of the buffer module;
  • the buffer module is configured to save the buffer queue and the CDR ID queue, and the buffer queue includes the CDRs newly added to the buffer queue, and the CDR ID queue includes the CDR corresponding to the CDR of the buffer queue;
  • the merging judgment module is configured to add the CDR to the corresponding CDR group when the trigger information for the judgment is received, and determine whether the CDR of the CDR group is complete, and if yes, send the CDR to the merging module. Merging trigger information, otherwise sending trigger information for assigning a bill ID to the allocation module, and adding the bill to the buffer queue of the buffer module;
  • a merging module configured to merge the CDRs of the CDR group when receiving the trigger information for combining the CDRs
  • the storage module is configured to save the bill information of the bill that needs to be associated as a temporary bill file, and save the bill ID queue of the buffer module as an ID queue file.
  • the technical solution provided by the embodiment of the present invention when saving the state of the buffer queue to the persistent storage, only needs to save the CDR ID queue corresponding to the CDRs waiting in the buffer queue of the memory, and newly join the buffer queue.
  • the CDRs do not need to completely save the CDRs in the buffer queue after processing one file containing multiple CDRs, thereby saving the time for saving the buffer queue state and speeding up the processing of CDR consolidation. Speed, improved bill processing performance.
  • FIG. 1 is a flowchart of a method for saving a buffer queue state according to an embodiment of the present invention
  • FIG. 2 is a flowchart of a method for combining bills in an embodiment of the present invention
  • Figure 3 is a schematic diagram of buffer queue consistency
  • Figure 4 is a schematic diagram of buffer queue recovery at system startup
  • FIG. 5 is a structural diagram of an apparatus for saving a buffer queue state according to an embodiment of the present invention.
  • FIG. 6 is a structural diagram of a device for merging bills according to an embodiment of the present invention.
  • the method for saving the buffer queue state in the embodiment of the present invention first waits for each in the buffer queue.
  • the bill is assigned a bill ID (ID), and the bill ID of the bill newly added to the buffer queue is saved in the bill ID queue, and the bill information of the bill newly added to the buffer queue is saved as a temporary bill file, and saved.
  • the bill ID queue is an ID queue file. Therefore, when a file containing multiple CDRs needs to save the state of the buffer queue, the CDR ID queue in the buffer queue is permanently stored, and the CDR information of the CDR that is newly added to the buffer queue is saved to In the temporary bill file, it is saved to the permanent storage medium.
  • FIG. 1 is a flowchart of a method for saving a buffer queue state according to an embodiment of the present invention. As shown in Figure 1, the method includes the following steps:
  • Step 100 Assign a bill ID to the bill in the buffer queue newly added to the memory.
  • the CDR group corresponding to the CDR is not found in the buffer queue.
  • the CDR of the new CDR group is added to the buffer queue. Perform this step.
  • Step 101 Add the bill ID of the bill to the bill ID queue of the memory.
  • Step 102 After the processing of the file containing multiple CDRs is completed, the CDR ID queue corresponding to the buffer queue stored in the memory is saved as an ID queue file, and the CDRs newly added to the buffer queue when the file is processed are processed.
  • the single message is saved as a temporary bill file, for example saved to disk.
  • the CDR ID queue saved in the persistent storage is refreshed to the CDR ID queue corresponding to the CDR in the current buffer queue; and the CDR information of the CDR newly added to the buffer queue is saved as a temporary message when the file is processed.
  • the bill information includes: a bill ID, an associated operation information of the bill, a bill format, and a bill content. Therefore, after processing one file at a time, it is only necessary to refresh the CDR ID queue that occupies a small space in the permanent storage, and save the CDR information newly added to the buffer queue in the permanent storage, without each time Save the entire buffer queue with a large capacity, saving time for bill processing.
  • FIG. 2 is a flowchart of a method for merging bills according to an embodiment of the present invention. As shown in FIG. 2, the method includes the following steps:
  • Step 200 Determine whether the bill needs to be associated. If the association is required, go to step 201; otherwise, go to step 202.
  • this step it is determined whether there is associated information GCID in the IMS bill, and whether there is an associated information ICID in the GPRS bill. If there is such associated information, it indicates that the bill is needed. Make an associated bill.
  • step 201 the charging identifier of the associated information is searched for in the buffer queue, and if the corresponding bill group is found, step 203 is performed; otherwise, step 204 is performed.
  • the bills in the bill group have associated billing identifiers, and the keywords in the bill group are the billing identifiers of the bills. Therefore, in this step, searching for the corresponding bill group refers to whether the search is in the keyword.
  • Step 202 Output the bill, and then end the bill consolidation process.
  • Step 203 Add the CDR to the found CDR group, and determine whether the CDR of the CDR group is complete. If yes, go to Step 205; otherwise, go to Step 206.
  • determining whether the CDR of the CDR group is complete means determining whether the CDRs corresponding to the keywords of the CDR group are all aligned.
  • Step 204 Create a new bill group, and join the buffer queue to wait for other bills; then execute step 208.
  • the billing identifier of the bill and the associated billing identifier are added to the keyword of the bill group.
  • Step 205 Combine the associated bills, output the merged bills, and then perform step 207.
  • Step 206 The bill group continues to wait in the buffer queue, and then step 208 is performed.
  • Step 207 Clear the CDRs of the CDR group from the buffer queue, delete the CDRs corresponding to the CDRs of the CDRs from the CDR ID queue, and then end the CDR consolidation process.
  • Step 208 Add the bill to the buffer queue, assign a bill ID to the bill, and set the bill ID. Save to the bill ID queue, and then end the bill consolidation process.
  • the ID queue file in the persistent storage is refreshed to the CDR ID queue corresponding to the CDR of the current buffer queue, and the file is newly added to the buffer when the file is processed.
  • the CDRs of the queue are saved as temporary CDR files.
  • FIG. 3 is a schematic diagram of the buffer queue consistency. As shown in Figure 3, after the file A is processed, the status of the save buffer queue on the disk is recorded as a. The next file to be processed is B. The program exits abnormally before the file A finishes processing until the file B is processed. Then, when the next recovery is resumed, the state after the A file is processed is restored from the disk, that is, the state a.
  • the system continues to process the B file, and there is no case where the bill is lost or the bill is repeated. If you exit during file B processing, the status of the buffer queue on the disk is still a. When the next recovery is started, the recovery from the disk is still the state after the A file is processed, that is, the state a, and because of the program. When the file exits abnormally, the file B has not been processed yet. Therefore, if the B file is reprocessed, there will be no loss of the bill or repeated bills.
  • the system When the system starts, it reads from the disk the ID queue file saved before the last system exit, restores the CDR ID queue corresponding to the buffer queue in the memory before the last system exit; scans all temporary CDR files, for example, from the temporary CDR
  • the CDR information of each CDR is read in the file, including the CDR ID, the associated operation information of the CDR, the CDR format and the CDR content.
  • FIG. 4 is a schematic diagram of the recovery of the buffer queue at system startup. As shown in Figure 4, the CDRs saved in the ID queue file are 11, 22, 23, nl, and n2. When the buffer queue is restored according to the ID queue file, only the ID saved in the temporary CDR file is 11 The CDRs of 22, 23, nl and n2 can be deleted, and the CDRs are deleted from the buffer queue.
  • the embodiment of the present invention may further include performing timing cleaning on the buffer queue, including: periodically scanning the buffer queue, and timeout for each bill group If the CDR group has not timed out, the CDR group continues to wait; if the CDR group has timed out, all the CDRs in the CDR group are output in the original format, and the CDR group is set.
  • the CDR is deleted from the buffer queue, and the CDRs corresponding to all the CDRs in the CDR group are deleted from the CDR ID queue.
  • the method for the timeout judgment of the dialog group is the prior art, and details are not described herein again.
  • the method for saving the state of the buffer queue in the embodiment of the present invention may further include: establishing a temporary file list in the memory, where the temporary file list records the number of the corresponding bills in the buffer queue of each temporary bill file.
  • the temporary file list In the process of processing a file containing multiple bills, when the status of the buffer queue is modified after each bill is processed, if a bill ID is added to the bill ID queue, the temporary file list corresponds to The number of CDRs in the file is increased by 1. If the CDR is deleted from the CDR ID queue, that is, the CDR is deleted from the buffer queue, the number of CDRs corresponding to the file in the temporary file list is decremented by one.
  • the CDR corresponding to the CDR in the CDR ID queue does not exist.
  • the number of CDRs corresponding to the temporary CDR file saved in the temporary file list is also decreased by 1. If the number of CDRs corresponding to the temporary CDR file in the temporary file list is 0, it indicates that the temporary CDR file is no longer available.
  • the CDR is waiting in the buffer queue of the memory, and since the CDR is processed by the CDR consolidation system, it is output to the downstream CDR processing system for processing, and the temporary CDR stored in the CDR consolidation system is saved.
  • the file has no other effect, so the temporary bill file is deleted, thereby avoiding the problem of too many temporary bill files.
  • FIG. 5 is a structural diagram of an apparatus for saving a buffer queue state according to an embodiment of the present invention. As shown in Figure 5, The device includes a distribution module, a buffer module and a storage module, wherein
  • An allocation module configured to allocate a bill ID for each bill that needs to wait in the buffer queue of the buffer module
  • the buffer module is configured to save the buffer queue and the CDR ID queue, and the buffer queue includes the CDRs newly added to the buffer queue, and the CDR ID queue includes the CDR corresponding to the CDR of the buffer queue;
  • the storage module is configured to save the bill information of the bill of the buffer queue newly added to the buffer module as a temporary bill file, and save the buffer module bill ID queue as an ID queue file.
  • the device for saving the status of the buffer queue further includes a cleaning module, configured to clear the CDR that needs to be cleaned from the buffer queue of the buffer module, and the CDR of the CDR that needs to be cleaned is from the buffer module. Cleared in the single ID queue.
  • the buffering queue of the buffering module further saves a temporary file list for saving the number of CDRs remaining in the buffer queue of the temporary CDR file of the storage module; accordingly, the apparatus may further comprise a detecting module, configured to detect When the temporary file list is the number of CDRs corresponding to the temporary CDR file, the temporary CDR file in the storage module is deleted.
  • the device for saving the buffer queue status in the embodiment of the present invention may further include: a read-in module, configured to read the ID queue file of the storage module when the system is restarted, and restore the bill ID queue to the buffer of the buffer module. And a scanning module, configured to scan the temporary CDR file of the storage module, and determine whether the CDR in the temporary CDR file needs to enter the buffer queue according to the CDR ID of the CDR and the CDR in the temporary CDR file. Then the ticket is restored to the buffer queue.
  • a read-in module configured to read the ID queue file of the storage module when the system is restarted, and restore the bill ID queue to the buffer of the buffer module.
  • a scanning module configured to scan the temporary CDR file of the storage module, and determine whether the CDR in the temporary CDR file needs to enter the buffer queue according to the CDR ID of the CDR and the CDR in the temporary CDR file. Then the ticket is restored to the buffer queue.
  • the CDR that is to be waited in the buffer queue of the buffer module is a CDR that is waiting in the CDR group of the buffer queue.
  • the device further includes a judging module, configured to perform the CDR group in each buffer queue. If the timeout period is exceeded, the triggering signal for clearing the CDR group is sent to the cleaning module; correspondingly, when the cleaning module receives the trigger signal, the CDR group is output, and the buffer module is slowed down.
  • the CDRs are cleared in the hop queue, and the CDRs corresponding to the CDRs in the CDR group are cleared from the CDR ID queue of the buffer module.
  • FIG. 6 is a structural diagram of a device for merging bills according to an embodiment of the present invention. As shown in FIG. 6, the device includes a lookup module, a creation module, an allocation module, a buffer module, a merge determination module, a merge module, and a storage module.
  • the search module is configured to determine whether the CDRs that need to be associated are found in the buffer queue. If the corresponding group is not found, the trigger information for creating the bill group is sent to the creating module, and the trigger information for assigning the bill ID is sent to the assigning module. If the query is found, the trigger information for determining is sent to the merge judging module.
  • the module is configured to create a bill group corresponding to the bill when the trigger information for creating the bill group is received, and add the bill and the corresponding bill group to the buffer queue of the buffer module.
  • the allocation module is configured to allocate a bill ID to the bill when the trigger information of the bill ID is received, and save the bill ID to the bill ID queue of the buffer module.
  • the buffer module is configured to save the buffer queue and the bill ID queue.
  • the buffer queue includes the bills newly added to the buffer queue, and the bill ID queue includes the bill ID corresponding to the bill of the buffer queue.
  • the merging judgment module is configured to add the CDR to the corresponding CDR group when the trigger information for the judgment is received, and determine whether the CDR of the CDR group is complete, and then send the trigger information for merging the CDR to the merging module. Otherwise, the trigger information for assigning the bill ID is sent to the distribution module, and the bill is added to the buffer queue of the buffer module.
  • the merging module is configured to merge the CDRs of the CDR group when receiving the trigger information for CDR consolidation.
  • the storage module is configured to save the bill information of the bill newly added to the buffer queue of the buffer module as a temporary bill file, and save the buffer module CDR queue as an ID queue file.
  • the apparatus may further include a cleaning module, configured to clear the CDRs of the merged CDR group from the buffer queue of the buffer module, and clear the CDRs of the CDRs of the merged CDR group from the CDR ID queue of the buffer module.
  • a cleaning module configured to clear the CDRs of the merged CDR group from the buffer queue of the buffer module, and clear the CDRs of the CDRs of the merged CDR group from the CDR ID queue of the buffer module.
  • the technical solution provided by the embodiment of the present invention refreshes the permanently stored ID queue file to wait in the buffer queue after processing one file containing multiple bills each time.
  • a single-in-one CDR queue and saves the CDRs newly added to the buffer queue to the permanent storage instead of re-storing all the CDRs in the entire buffer queue, thereby reducing the state of the save buffer queue.
  • the time has increased the processing speed of the bill.
  • disk writes are greatly reduced, reducing disk and disk input/output interfaces (I/O).
  • the technical solution provided by the embodiment of the present invention recovers the buffer queue in the memory according to the saved bill ID and the temporary bill file when the system fails to restart the recovery buffer queue, so that the bill processing process is performed in the bill processing process. No CDRs and heavy orders will be lost.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Telephonic Communication Services (AREA)

Description

一种话单合并及保存緩冲队列状态的方法及装置
本申请要求于 2007 年 8 月 23 日提交中国专利局、 申请号为 200710146145.2, 发明名称为 "一种话单合并及保存緩冲队列状态的方法及装 置"的中国专利申请的优先权, 其全部内容通过引用结合在本申请中。
技术领域
本发明涉及话单处理技术,具体涉及一种话单合并系统中话单合并及保存 緩冲队列状态的方法及装置。
背景技术
在第二代移动通信网络中,用户一次通话可能需要较长时间,或者通过通 用分组无线业务( GPRS , General Packet Radio Service )长时间占用网络资源, 则服务系统会以一定的时间段为间隔为用户生成多张部分话单 , 因此,用户一 次通话或一次上网会产生多 部分话单。为了使用户得到清楚的话单,这些话 单需要尽可能地合并为一张话单,并最终显示给用户。一次通话或一次上网的 多张部 ^舌单是由相同的设备产生的, 它们格式相同, 因此, 将这些部^舌单 直接进行合并后, 以一张话单的形式显示在用户的帐单上, 以供用户查询。
而来源于不同设备的多张部分话单,它们的格式不同, 因此不能直接进行 话单合并处理。以下以第三代移动通信网络系统中的因特网协议多媒体子系统
( IMS, IP Multimedia Subsystem )话单和通用分组无线业务(GPRS, General Packet Radio Service )话单的合并为例进行祥细说明。
第三代移动通信网络系统支持 IMS。IMS是 3G系统中的核心网的一部分, 它通过由会话初始化协议 ( SIP, Session Initiation Protocol )提供的会话发起能 力, 建立端到端的会话, 并获得所需要的服务质量。 IMS通过将控制和承载分 离 , 由分组交换域( PS, Packet-Switched domain )核心网提供 SIP信令和媒体 数据的承载, 由 IMS的核心部分提供会话和业务的控制, 使得采用不同接入 手段接入到 PS的用户能够通过一张融合的核心网络, 来使用运营商提供的各 类语音、 数据和多媒体业务以及新的应用业务。
IMS的分层结构一般包括三层: 控制层、应用层及接入层。 其中接入层用 于实现 IMS终端的接入。 控制层不提供业务, 它只提供业务层必要的触发、 路由、 计费等功能, 其中呼叫会话控制功能 (CSCF, Call Session Control Function )模块完成呼叫网关功能、呼叫业务触发功能和路由选择功能,将 SIP 信令消息正确地转发到应用服务器。应用层支持各类应用服务器, 负责为用户 提供多媒体业务, 该层独立于网络的接入层、控制层存在, 保证业务开发和提 供的独立性。 由于 IMS的分层设计, IMS会话管理实体(例如 CSCF )并不知 道 IMS会话在应用层的业务流量, 而 IP连接实体(例如 GGSN等)也不了解 IMS控制层信令的状态。从运营商的角度来看,希望能够将应用层和控制层的 计费信息关联起来进行统一计费。
在 IMS体系中, 通过 Go参考点交换并保存业务 SIP信令的 IMS计费标 识符( ICID )和该业务 IP流的 GPRS计费标识符( GCID ), 即在 IMS话单中 加入 GCID, 在 GPRS话单中加入 ICID信息, 作为关联信息, 从而实现 IP流 和 SIP信令的计费关联。
现有技术中需要进行合并的话单来源于不同的设备,各设备产生相关联的 话单的时间不同,传输到话单合并系统进行合并的时间也就不同, 为了避免话 单合并时产生的同步问题,将先到达的话单保存到内存的緩冲队列中, 以等待 后续话单到齐后再进行合并, 在等待过程中緩冲队列会占用较大的存储空间; 并且,在对每个包含多条话单的文件处理结束后,需要对緩冲队列进行实时保 存, 即将緩冲队列的状态保存到永久性存储中去, 例如磁盘, 由于每处理完毕 一个文件之后,都会重新对緩冲队列进行完全保存,这样在緩冲队列包含很多 话单, 其容量非常大, 通常会达到几十 M至几百 M时, 每次都需要保存几十 M至几百 M的话单数据, 从而减慢了话单处理的速度, 影响了处理性能; 且 频繁的对磁盘进行存储操作, P条低了磁盘的使用寿命。
发明内容
有鉴于此,本发明实施例提供一种保存緩冲队列状态的方法,加快话单合 并的处理速度。
本发明实施例提供一种保存緩冲队列状态的装置,加快话单合并的处理速 度。
本发明实施例还提供一种话单合并的方法, 加快话单合并的处理速度。 本发明实施例还提供一种话单合并的装置, 加快话单合并的处理速度。 为达到上述目的, 本发明实施例的技术方案是这样实现的: 一种保存緩冲队列状态的方法, 该方法包括:
当有新加入到緩冲队列的话单时, 将预先为所述话单分配的话单标识 ID 保存到话单 ID队列中;
将所述新加入緩冲队列的话单的话单信息保存为临时话单文件,将所述话 单 ID队列保存为 ID队列文件。
一种话单合并的方法, 该方法包括:
判断是否在緩冲队列中查找到需要关联的话单对应的话单组,如果查找不 到对应的话单组,则为所述需要关联的话单创建新的话单组 ,将所述话单组及 需要关联的话单加入到緩冲队列中等待,为所述需要关联的话单分配一个话单 标识 ID, 将该话单 ID保存到话单 ID队列; 如果能够查找到对应的话单组, 将所述需要关联的话单加入对应的话单组, 当所述话单组的话单齐全时,合并 所述话单组的话单;
将所述需要关联的话单的话单信息保存为临时话单文件, 将所述话单 ID 队列保存为 ID队列文件。
一种话单合并的方法, 该方法包括:
判断是否在緩冲队列中查找到需要关联的话单对应的话单组,如果查找不 到对应的话单组,则为所述需要关联的话单创建新的话单组,将所述话单组及 需要关联的话单加入到緩冲队列中等待,为所述需要关联的话单分配一个话单 标识 ID, 将该话单 ID保存到话单 ID队列; 如果能够查找到对应的话单组, 将所述需要关联的话单加入对应的话单组, 当所述话单组的话单齐全时,合并 所述话单组的话单;
将所述需要关联的话单的话单信息保存为临时话单文件, 将所述话单 ID 队列保存为 ID队列文件。
一种话单合并的装置, 该装置包括查找模块、 创建模块、 分配模块、 緩冲 模块、 合并判断模块、 合并模块及存储模块,
查找模块,用于判断是否在緩冲队列中查找到需要关联的话单对应的话单 组, 如果查找不到对应的话单组, 则向创建模块发送创建话单组的触发信息, 并向分配模块发送分配话单标识 ID的触发信息; 如果查找到对应的话单组, 则向合并判断模块发送进行判断的触发信息; 创建模块, 用于在接收到所述创建话单组的触发信息时,创建与所述话单 对应的话单组, 并将所述话单及对应的话单组加入到緩冲模块的緩冲队列; 分配模块, 用于在接收到所述分配话单 ID的触发信息时, 为所述话单分 配话单 ID, 并将该话单 ID保存到緩冲模块的话单 ID队列;
緩冲模块, 用于保存緩冲队列和话单 ID队列, 緩冲队列包括新加入到緩 冲队列的话单, 话单 ID队列包括缓冲队列的话单对应的话单 ID;
合并判断模块, 用于在接收到进行判断的触发信息时, 将所述话单加入对 应的话单组,判断所述话单组的话单是否齐全,如果齐全则向所述合并模块发 送进行话单合并的触发信息, 否则向所述分配模块发送分配话单 ID的触发信 息, 并将所述话单加入所述緩冲模块的緩冲队列;
合并模块, 用于在接收到进行话单合并的触发信息时,合并所述话单组的 话单;
存储模块, 用于将所述需要关联的话单的话单信息保存为临时话单文件, 将緩冲模块的话单 ID队列保存为 ID队列文件。
本发明实施例所提供的技术方案,在将緩冲队列的状态保存到永久性存储 中时, 只需要保存在内存的緩沖队列中等待的话单对应的话单 ID队列, 以及 新加入到緩冲队列的话单, 而不需要每次处理完包含多条话单的一个文件之 后,都对緩冲队列中的话单进行完全保存,从而节省了保存緩冲队列状态的时 间, 加快了话单合并的处理速度, 提高了话单处理性能。
附图说明
图 1为本发明实施例中的保存緩冲队列状态的方法流程图;
图 2为本发明实施例中话单合并的方法流程图;
图 3为緩冲队列一致性原理图;
图 4为系统启动时緩冲队列恢复的原理图;
图 5为本发明实施例中的保存緩冲队列状态的装置结构图;
图 6为本发明实施例中话单合并的装置结构图。
具体实施方式
下面结合附图及具体实施例对本发明进行详细说明。
本发明实施例中保存緩冲队列状态的方法首先为每个在緩冲队列中等待 的话单分配一个话单标识( ID ),将新加入到缓冲队列的话单的话单 ID保存到 话单 ID队列中,保存该新加入到緩冲队列的话单的话单信息为临时话单文件, 保存该话单 ID队列为 ID队列文件。从而, 当包含多条话单的一个文件处理结 束需要保存緩冲队列的状态时, 永久化存储緩冲队列中的话单 ID队列, 并将 该新加入到緩冲队列的话单的话单信息保存到临时话单文件中,从而保存到永 久化存储介质中去。
图 1为本发明实施例中的保存緩冲队列状态的方法流程图。 如图 1所示, 该方法包括以下步骤:
步驟 100: 为新加入到内存的緩冲队列中的话单分配一个话单 ID。
当处理一个新的需要关联的话单时,在緩冲队列中没有查找到与该话单对 应的话单组, 需要创建新话单组时, 把新话单组的话单加入到緩冲队列之后, 执行本步驟。
或者当在緩冲队列中查找到与该需要关联的话单对应的话单组,向该话单 组中增加该话单, 并且该话单组需要继续等待时, 执行本步骤。
步骤 101 : 将该话单的话单 ID增加到内存的话单 ID队列中。
步骤 102: 当包含多条话单的文件处理结束后, 将保存在内存中的緩冲队 列对应的话单 ID队列保存为 ID队列文件,并将处理该文件时新加入到緩冲队 列的话单的话单信息保存为临时话单文件, 例如保存到磁盘上。
当包含多条话单的一个文件处理完毕后, 执行本步骤。
本步骤中, 将永久性存储中保存的话单 ID队列刷新为当前緩冲队列中的 话单对应的话单 ID队列; 并将处理该文件时新加入到緩冲队列的话单的话单 信息保存为临时话单文件, 该话单信息包括: 话单 ID、 话单的关联操作信息、 话单格式以及话单内容。 因此, 在每次处理完一个文件后, 只需要刷新永久性 存储中占用空间很小的话单 ID队列, 并在永久性存储中保存新加入到緩冲队 列中的话单信息, 而不需要每次保存容量较大的整个緩冲队列,从而节省了话 单处理的时间。
当某个话单组关联完毕,需要从内存的缓冲队列中删除时,将该话单组在 緩冲队列中的话单进行清理之后,从緩冲队列删除已经合并过的所有话单,并 从话单 ID队列中删除这些话单的话单 ID,在处理完包含多条话单的一个文件 后,将永久性存储中的 ID队列文件刷新为当前緩冲队列的话单对应的话单 ID 队列, 并将处理该文件时新增加到緩冲队列的话单保存为临时话单文件。
以下详细说明将本发明实施例提供的保存缓冲队列的方法应用于话单合 并中的过程。 图 2为本发明实施例中话单合并的方法流程图, 如图 2所示, 该 方法包括以下步骤:
步骤 200: 判断话单是否需要关联, 如果需要关联, 则执行步骤 201; 否 则执行步驟 202。
以 GPRS和 IMS话单的关联为例, 本步骤中, 判断 IMS话单中是否有关 联信息 GCID, GPRS话单中是否有关联信息 ICID, 如果有这样的关联信息, 则说明该话单是需要进行关联的话单。
步骤 201 : #居作为关联信息的计费标识符在緩冲队列查找对应的话单 组, 如果查找到对应的话单组, 则执行步骤 203; 否则执行步骤 204。
话单组内的话单具有相关联的计费标识符,话单组的关键字是这些话单的 计费标识符, 因此, 本步骤中, 查找对应的话单组是指查找在关键字中是否包 含有该话单计费标识符的话单组。
步骤 202: 将该话单输出, 然后结束话单合并流程。
步骤 203: 将该话单加入查找到的话单组中, 并判断该话单组的话单是否 齐全, 是则执行步骤 205; 否则执行步骤 206。
本步骤中,判断该话单组的话单是否齐全是指判断该话单组的关键字对应 的话单是否都齐了。
步骤 204: 创建新的话单组, 并加入到緩冲队列等待其它话单; 然后执行 步骤 208。
本步骤中,在创建话单组后,将该话单的计费标识符及关联的计费标识符 都加入到话单组的关键字中。
步骤 205: 合并相互关联的话单, 输出合并后的话单, 然后执行步骤 207。 步骤 206: 该话单组在緩冲队列中继续等待, 然后执行步骤 208。
步骤 207: 从緩冲队列中清除话单组的话单, 从话单 ID队列中删除话单 组的话单对应的话单 ID, 然后结束话单合并流程。
步骤 208: 将该话单加入緩冲队列, 为该话单分配话单 ID, 将该话单 ID 保存到话单 ID队列, 然后结束话单合并流程。
当按照上述流程处理完包含多个话单的一个文件后, 将永久性存储中的 ID队列文件刷新为当前緩冲队列的话单对应的话单 ID队列,并将处理该文件 时新增加到緩冲队列的话单保存为临时话单文件。
由于本发明实施例将增加到緩冲队列等待的话单进行了保存,并同时保存 了内存中緩冲队列的话单对应的话单 ID队列, 从而使得在话单处理过程中话 单合并系统发生故障导致系统重新启动时, 能够安全恢复緩冲队列的状态, 即 满足緩冲队列一致性原理。 图 3为緩冲队列一致性原理图。 如图 3所示, 文件 A处理结束后, 磁盘上保存緩冲队列的状态记为 a。 下一个处理的文件是 B, 在文件 A处理结束到文件 B处理前, 程序异常退出, 那么下次启动恢复时, 从磁盘上恢复的是 A文件处理后的状态, 即状态 a。 系统继续处理 B文件, 不 会产生话单丢失或者重复话单的情况。 如果在文件 B处理过程中退出, 这时 磁盘上緩冲队列的状态仍然为 a, 在下次启动恢复时, 从磁盘上恢复的仍是 A 文件处理后的状态, 即状态 a, 而由于在程序异常退出时, 文件 B还没有处理 完毕, 因此重新处理 B文件, 不会产生话单丢失或者重复话单的情况。
以下详细说明系统启动时恢复緩冲队列的过程。
系统在启动时, 从磁盘读入上次系统退出前保存的 ID队列文件, 恢复上 次系统退出前内存中緩冲队列对应的话单 ID队列;扫描所有的临时话单文件, 例如从临时话单文件中读入每条话单的话单信息, 包括话单 ID, 话单的关联 操作信息、 话单格式和话单内容; 然后, 根据该话单 ID队列以及临时话单文 件中的话单 ID, 判断临时话单文件中的话单是否需要进入緩冲队列。 如果一 条话单的话单 ID在话单 ID队列中存在,则该话单在系统故障之前还在緩冲队 列中等待, 判定该话单需要进入緩冲队列, 然后把该话单恢复到緩冲队列中; 如果该话单的话单 ID没有在话单 ID队列中存在,则判定该话单已经处理完毕, 不需要进入緩冲队列。
由于在一条话单处理结束,从内存的緩冲队列删除该话单时,也同时从话 单 ID队列中删除该话单的话单 ID,在处理一个文件结束,将内存中的话单 ID 队列保存为 ID队列文件, 因此, 在 ID队列文件中保存的话单 ID所对应的话 单是还在緩冲队列中等待的话单。 图 4为系统启动时缓冲队列的恢复原理图。 如图 4所示, ID队列文件中 保存的话单 ID为 11、 22、 23、 nl和 n2等, 根据该 ID队列文件恢复緩冲队列 时, 只恢复在临时话单文件中保存的 ID为 11、 22、 23、 nl和 n2的话单即可, 已经被处理完毕, 从緩冲队列中删除的话单。
在话单处理过程中, 如果某个设备上的话单产生异常, 例如 IMS中产生 话单的设备发生故障,则会导致与该设备相关的合并未完成的话单组不能正常 合并, 如果不进行清理, 这样的话单组就会在緩冲队列中一直等待下去, 因此 本发明实施例还可以进一步包括对緩冲队列进行定时清理 , 包括: 周期性扫描 緩冲队列, 对每个话单组进行超时判断, 如果该话单组没有超时, 则在緩冲队 列中继续等待;如果该话单组已经超时,则将该话单组内的所有话单按原来的 格式输出,并将该话单组从緩冲队列中删除,并将该话单组内所有话单对应的 话单 ID从话单 ID队列中删除。其中,对话单组进行超时判断的方法为现有技 术, 在此不再赘述。
本发明实施例中保存緩冲队列状态的方法还可以进一步包括:在内存中建 立一个临时文件列表,临时文件列表记录的是每个临时话单文件在緩冲队列中 对应的话单数目。在处理包含多条话单的一个文件过程中,每处理完一条话单 后修改緩冲队列的状态时, 如果向话单 ID队列中增加了话单 ID, 则将该临时 文件列表中对应于该文件的话单数目加 1 , 如果是从话单 ID队列中删除话单 ID,即从緩冲队列中删除了话单,则将该临时文件列表中对应于该文件的话单 数目减 1。 在处理以后接收到的文件时, 如果处理该文件后, 保存的临时话单 文件中的某一条话单被清除了,则话单 ID队列中该话单对应的话单 ID也不存 在了,此时,临时文件列表中保存的该临时话单文件对应的话单数目也会减 1, 如果检测到临时文件列表中与临时话单文件对应的话单数目为 0, 则表明该临 时话单文件已经没有话单在内存的緩冲队列中等待了 ,同时由于该话单在该话 单合并系统经过处理后, 已经输出到下游的话单处理系统进行处理,保存在该 话单合并系统中的临时话单文件也已经没有其他作用,因此删掉该临时话单文 件, 从而避免了临时话单文件过多的问题。
图 5为本发明实施例中的保存緩冲队列状态的装置结构图。 如图 5所示, 该装置包括分配模块、 緩冲模块及存储模块, 其中,
分配模块,用于为每个需要在緩冲模块的緩冲队列中等待的话单分配一个 话单 ID;
緩冲模块, 用于保存緩冲队列和话单 ID队列, 緩冲队列包括新加入到緩 冲队列的话单, 话单 ID队列包括緩冲队列的话单对应的话单 ID;
存储模块,用于将新加入到緩冲模块中的緩冲队列的话单的话单信息保存 为临时话单文件, 将緩冲模块话单 ID队列保存为 ID队列文件。
本发明实施例提供的保存緩冲队列状态的装置还包括清理模块,用于将需 要清理的话单从緩冲模块的緩冲队列中清除, 将该需要清理的话单的话单 ID 从緩冲模块的话单 ID队列中清除。
进一步地,缓冲模块的緩冲队列进一步保存临时文件列表,用于保存存储 模块的临时话单文件在緩冲队列中剩余的话单数目;相应地,该装置还可包括 检测模块, 用于当检测到临时文件列表是临时话单文件对应的话单数目为 0 时, 删除存储模块中的该临时话单文件。
本发明实施例中保存緩冲队列状态的装置还可包括:读入模块,用于在系 统重新启动时,读取存储模块的 ID队列文件,将话单 ID队列恢复到緩冲模块 的緩冲队列中; 以及扫描模块, 用于扫描存储模块的临时话单文件,根据话单 ID队列以及临时话单文件中话单 ID, 判断临时话单文件中的话单是否需要进 入緩冲队列, 如果是则将该话单恢复到緩冲队列。
其中需要在緩冲模块的緩冲队列中等待的话单为在緩冲队列的话单组中 等待的话单, 进一步地, 该装置还包括判断模块, 用于对每个緩冲队列中的话 单组进行超时判断,如果该话单组超时,则向清理模块发送清理该话单组的触 发信号; 相应地, 当清理模块接收到该触发信号后, 输出该话单组, 并从緩冲 模块的緩冲队列中清除该话单组, 从緩冲模块的话单 ID队列中清除该话单组 中的话单对应的话单 ID。
图 6为本发明实施例中话单合并的装置结构图。 如图 6所示, 该装置 包括查找模块、创建模块、 分配模块、緩冲模块、合并判断模块、合并模块及 存储模块。
其中, 查找模块, 用于判断是否能够在緩冲队列中查找到需要关联的话单 对应的话单组,查找不到则向创建模块发送创建话单组的触发信息, 向分配模 块发送分配话单标识 ID的触发信息; 能够查找到, 则向合并判断模块发送进 行判断的触发信息。
创建模块, 用于在接收到创建话单组的触发信息时,创建与该话单对应的 话单组, 并将该话单及对应的话单组加入到緩冲模块的緩冲队列。
分配模块, 用于在接收到分配话单 ID的触发信息时, 为该话单分配话单 ID, 并将该话单 ID保存到緩冲模块的话单 ID队列。
緩冲模块, 用于保存緩冲队列和话单 ID队列, 緩冲队列包括新加入到緩 冲队列的话单, 话单 ID队列包括緩冲队列的话单对应的话单 ID。
合并判断模块, 用于在接收到进行判断的触发信息时, 将该话单加入对应 的话单组,判断该话单组的话单是否齐全,是则向合并模块发送进行话单合并 的触发信息, 否则向分配模块发送分配话单 ID的触发信息, 并将该话单加入 緩冲模块的緩冲队列。
合并模块, 用于在接收到进行话单合并的触发信息时,合并该话单组的话 单。
存储模块,用于将新加入到緩冲模块的緩冲队列中的话单的话单信息保存 为临时话单文件, 将緩冲模块的话单 Π)队列保存为 ID队列文件。
该装置可进一步包括清理模块,用于将合并的话单组的话单从緩冲模块的 緩冲队列中清除,将合并的话单组的话单的话单 ID从緩冲模块的话单 ID队列 中清除。
以上所述可以看出,本发明实施例所提供的技术方案,在每次处理完包含 多条话单的一个文件之后 , 将永久性存储的 ID队列文件刷新为当前在緩冲队 列中等待的话单对应的话单 ID队列, 并将新加入到緩冲队列的话单保存到永 久性存储中去, 而不是将整个緩冲队列中的所有话单重新存储一次,从而减小 了保存緩冲队列状态的时间,提高了话单处理速度。 同时, 大大减少了磁盘的 写操作, 减少了对磁盘及磁盘输入 /输出接口 (I/O )的损坏。
另夕卜,本发明实施例提供的技术方案,在系统故障排除重新启动恢复緩冲 队列时, 根据保存的话单 ID和临时话单文件, 恢复内存中的緩冲队列, 从而 在话单处理过程中不会丢失话单和产生重单。 以上所述仅为本发明的较佳实施例而已, 并非用于限定本发明的保护范 围。 凡在本发明的精神和原则之内, 所作的任何修改、 等同替换、 改进等, 均 应包含在本发明的保护范围之内。

Claims

权 利 要 求
1、 一种保存緩冲队列状态的方法, 其特征在于, 该方法包括:
当有新加入到緩冲队列的话单时, 将预先为所述话单分配的话单标识 ID 保存到话单 ID队列中;
将所述新加入緩冲队列的话单的话单信息保存为临时话单文件,将所述话 单 ID队列保存为 ID队列文件。
2、 如权利要求 1所述的方法, 其特征在于, 该方法进一步包括: 从所述緩冲队列中清除话单;
从所述话单 ID队列中删除所述话单的话单 ID。
3、 如权利要求 2所述的方法, 其特征在于, 所述话单信息包括话单 ID, 该方法进一步包括:
当处理所述话单的系统重新启动时, 通过读入所述 ID队列文件恢复所述 话单 ID队列;
扫描保存的临时话单文件, 当根据所述话单 ID队列以及所述临时话单文 件中的话单 ID判断所述临时话单文件中的话单需要进入緩冲队列时, 将所述 话单恢复到緩冲队列。
4、 如权利要求 2所述的方法, 其特征在于, 所述从緩冲队列中清除话单 之前, 该方法进一步包括:
通过扫描緩冲队列对所述緩冲队列中的每个话单组进行超时判断,当所述 话单组超时时, 将该话单组内的所有话单输出;
所述从緩冲队列中清除话单具体为:从緩冲队列中清除所述话单组内所有 输出的话单。
5、 如权利要求 1所述的方法, 其特征在于, 该方法进一步包括: 建立临时文件列表,所述临时文件列表用于保存临时话单文件在緩冲队列 中剩余的话单数目;
当检测到所述临时文件列表中临时话单文件对应的剩余的话单数目为 0 时, 删除该临时话单文件。
6、 如权利要求 1所述的方法, 其特征在于, 所述话单信息包括话单 ID、 话单关联操作信息、 话单格式及话单内容。
7、 一种话单合并的方法, 其特征在于, 该方法包括:
判断是否在緩冲队列中查找到需要关联的话单对应的话单组,如果查找不 到对应的话单组,则为所述需要关联的话单创建新的话单组 ,将所述话单组及 需要关联的话单加入到緩冲队列中等待,为所述需要关联的话单分配一个话单 标识 ID, 将该话单 ID保存到话单 ID队列; 如果能够查找到对应的话单组, 将所述需要关联的话单加入对应的话单组, 当所述话单组的话单齐全时,合并 所述话单组的话单;
将所述需要关联的话单的话单信息保存为临时话单文件, 将所述话单 ID 队列保存为 ID队列文件。
8、 如权利要求 7所述的方法, 其特征在于, 该方法进一步包括: 从所述緩冲队列中清除已经合并的话单组的话单, 从所述话单 ID队列中 删除所述话单组中话单的话单 ID。
9、 如权利要求 8所述的方法, 其特征在于, 所述话单信息包括话单 ID, 该方法进一步包括:
当处理所述话单的系统重新启动时, 通过读入所述 ID队列文件恢复所述 话单 ID队列;
扫描保存的临时话单文件, 当根据所述话单 ID队列以及所述临时话单文 件中的话单 ID判断所述临时话单文件中的话单需要进入緩冲队列时, 将所述 话单恢复到緩冲队列。
10、 一种保存緩冲队列状态的装置, 其特征在于, 该装置包括分配模块、 緩冲模块和存储模块,
所述分配模块,用于预先为每个需要在緩冲模块的缓冲队列中等待的话单 分配一个话单标识 ID;
所述緩冲模块, 用于保存緩冲队列和话单 ID队列, 緩冲队列包括新加入 到緩冲队列的话单, 话单 ID队列包括緩冲队列的话单对应的话单 ID;
所述存储模块,用于将新加入到緩冲模块的緩冲队列中的话单的话单信息 保存为临时话单文件 , 将緩冲模块的话单 ID队列保存为 ID队列文件。
11、 如权利要求 10所述的装置, 其特征在于, 该装置进一步包括清理模 块, 用于将话单从所述緩冲模块的緩冲队列中清除, 并将所述话单的话单 ID 从所述緩冲模块的话单 ID队列中清除。
12、 如权利要求 11所述的装置, 其特征在于, 该装置进一步包括: 读入模块, 用于当处理所述话单的系统重新启动时, 通过读取存储模块的
ID队列文件将话单 ID队列恢复到緩冲队列中;
以及扫描模块, 用于扫描存储模块的临时话单文件, 当根据所述话单 ID 队列以及所述临时话单文件中的话单 ID判断所述临时话单文件中的话单需要 进入緩冲队列时, 将该话单恢复到緩冲队列。
13、 如权利要求 11所述的装置, 其特征在于, 该装置进一步包括超时判 断模块,用于通过扫描每个緩冲队列对所述緩冲队列中的每个话单组进行超时 判断, 当所述话单组超时时, 则向清理模块发送清理该话单组的触发信号; 所述清理模块进一步用于,在接收到清理话单组的触发信号后,输出所述 话单组中的所有话单, 并从所述緩冲模块的緩冲队列中清除所述所有话单, 以 及从所述緩冲模块的话单 ID队列中清除所述所有话单对应的话单 ID。
14、如权利要求 10所述的装置, 其特征在于, 所述緩冲模块进一步用于, 保存预先建立的临时文件列表,所述临时文件列表用于保存所述临时话单文件 在所述緩冲队列中剩余的话单数目;
该装置进一步包括检测模块 ,用于当检测到所述临时文件列表中临时话单 文件对应的剩余的话单数目为 0时, 删除所述存储模块中的该临时话单文件。
15、一种话单合并的装置,其特征在于,该装置包括查找模块、创建模块、 分配模块、 緩冲模块、 合并判断模块、 合并模块及存储模块,
查找模块,用于判断是否在緩冲队列中查找到需要关联的话单对应的话单 组, 如果查找不到对应的话单组, 则向创建模块发送创建话单组的触发信息, 并向分配模块发送分配话单标识 ID的触发信息; 如果查找到对应的话单组, 则向合并判断模块发送进行判断的触发信息;
创建模块, 用于在接收到所述创建话单组的触发信息时,创建与所述话单 对应的话单组, 并将所述话单及对应的话单组加入到緩冲模块的緩冲队列; 分配模块, 用于在接收到所述分配话单 ID的触发信息时, 为所述话单分 配话单 ID, 并将该话单 ID保存到緩冲模块的话单 ID队列;
緩冲模块, 用于保存緩冲队列和话单 ID队列, 緩冲队列包括新加入到緩 冲队列的话单, 话单 ID队列包括缓冲队列的话单对应的话单 ID; 合并判断模块,用于在接收到进行判断的触发信息时, 将所述话单加入对 应的话单组,判断所述话单组的话单是否齐全,如果齐全则向所述合并模块发 送进行话单合并的触发信息, 否则向所述分配模块发送分配话单 ID的触发信 息, 并将所述话单加入所述緩冲模块的緩冲队列;
合并模块, 用于在接收到进行话单合并的触发信息时,合并所述话单组的 话单;
存储模块, 用于将所述需要关联的话单的话单信息保存为临时话单文件, 将緩冲模块的话单 ID队列保存为 ID队列文件。
16、 如权利要求 15所述的装置, 其特征在于, 该装置进一步包括清理模 块,用于将所述合并的话单组的话单从所述缓冲模块的緩冲队列中清除,将所 述合并的话单组中话单的话单 ID从所述緩冲模块的话单 ID队列中清除。
17、 如权利要求 16所述的装置, 其特征在于, 该装置进一步包括: 读入模块, 用于当处理所述话单的系统重新启动时, 通过读取存储模块的 ID队列文件将话单 ID队列恢复到緩冲队列中;
扫描模块, 用于扫描存储模块的临时话单文件, 当根据所述话单 ID队列 以及所述临时话单文件中的话单 ID判断所述临时话单文件中的话单需要进入 緩冲队列时, 将所述话单恢复到緩冲队列。
PCT/CN2008/071967 2007-08-23 2008-08-13 Procédé et dispositif pour fusionner une facture et sauvegarder l'état de la file d'attente de tampon WO2009026819A1 (fr)

Priority Applications (1)

Application Number Priority Date Filing Date Title
EP08783960A EP2178244A4 (en) 2007-08-23 2008-08-13 METHOD AND DEVICE FOR MERGING INVOICE AND SAVING STATE OF BUFFER QUEUE

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200710146145.2 2007-08-23
CN2007101461452A CN101114915B (zh) 2007-08-23 2007-08-23 一种话单合并及保存缓冲队列状态的方法及装置

Publications (1)

Publication Number Publication Date
WO2009026819A1 true WO2009026819A1 (fr) 2009-03-05

Family

ID=39023054

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2008/071967 WO2009026819A1 (fr) 2007-08-23 2008-08-13 Procédé et dispositif pour fusionner une facture et sauvegarder l'état de la file d'attente de tampon

Country Status (3)

Country Link
EP (1) EP2178244A4 (zh)
CN (1) CN101114915B (zh)
WO (1) WO2009026819A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113505178A (zh) * 2021-07-15 2021-10-15 福建博思软件股份有限公司 一种基于数据双写的票据同步方法及终端
CN114245330A (zh) * 2021-11-17 2022-03-25 中国联合网络通信集团有限公司 话单合并方法、装置、设备、计算机可读存储介质及产品
CN114331576A (zh) * 2021-12-30 2022-04-12 福建博思软件股份有限公司 基于高并发场景下的电子票号快速取票方法及存储介质

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101114915B (zh) * 2007-08-23 2010-08-25 华为技术有限公司 一种话单合并及保存缓冲队列状态的方法及装置
CN101674560B (zh) * 2008-09-09 2013-01-16 中兴通讯股份有限公司 计费信息的处理方法和装置
CN101778367B (zh) * 2009-12-29 2012-09-05 北京首信科技股份有限公司 一种计费网关重启恢复工作的方法
CN101854388B (zh) * 2010-05-17 2014-06-04 浪潮(北京)电子信息产业有限公司 一种集群存储中并行访问大量小文件的方法及系统
CN102572159B (zh) * 2010-12-31 2014-02-26 中国移动通信集团安徽有限公司 分话单处理方法、装置及系统
CN104601358B (zh) * 2013-11-01 2019-01-04 中兴通讯股份有限公司 一种实现采集系统与分析系统间的匹配方法及装置
CN105871563B (zh) * 2015-01-21 2019-11-12 中国移动通信集团安徽有限公司 一种话单采集方法及电子设备
CN106156202B (zh) * 2015-04-22 2019-11-19 中国移动通信集团广东有限公司 一种数据库故障的处理方法及装置
CN109428732B (zh) * 2017-08-28 2020-09-04 华为技术有限公司 一种话单处理方法及设备
CN108052296B (zh) * 2017-12-30 2021-02-19 惠龙易通国际物流股份有限公司 一种数据读取方法、设备及计算机存储介质
CN111274209B (zh) * 2020-01-08 2023-05-30 中国联合网络通信集团有限公司 话单文件处理方法及装置
CN116261110B (zh) * 2022-12-06 2024-04-12 中国联合网络通信集团有限公司 Sdr数据的确定方法、装置以及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11232220A (ja) * 1998-02-13 1999-08-27 Sanyo Electric Co Ltd 事象データ振り分け方法
CN1479485A (zh) * 2002-08-27 2004-03-03 华为技术有限公司 话单合并处理方法
CN1547350A (zh) * 2003-12-15 2004-11-17 中兴通讯股份有限公司 一种话单数据的存储方法
CN101114915A (zh) * 2007-08-23 2008-01-30 华为技术有限公司 一种话单合并及保存缓冲队列状态的方法及装置

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05334362A (ja) * 1992-05-29 1993-12-17 Fujitsu Ltd メッセージを管理する処理装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11232220A (ja) * 1998-02-13 1999-08-27 Sanyo Electric Co Ltd 事象データ振り分け方法
CN1479485A (zh) * 2002-08-27 2004-03-03 华为技术有限公司 话单合并处理方法
CN1547350A (zh) * 2003-12-15 2004-11-17 中兴通讯股份有限公司 一种话单数据的存储方法
CN101114915A (zh) * 2007-08-23 2008-01-30 华为技术有限公司 一种话单合并及保存缓冲队列状态的方法及装置

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113505178A (zh) * 2021-07-15 2021-10-15 福建博思软件股份有限公司 一种基于数据双写的票据同步方法及终端
CN113505178B (zh) * 2021-07-15 2023-01-03 福建博思软件股份有限公司 一种基于数据双写的票据同步方法及终端
CN114245330A (zh) * 2021-11-17 2022-03-25 中国联合网络通信集团有限公司 话单合并方法、装置、设备、计算机可读存储介质及产品
CN114245330B (zh) * 2021-11-17 2024-04-02 中国联合网络通信集团有限公司 话单合并方法、装置、设备、计算机可读存储介质及产品
CN114331576A (zh) * 2021-12-30 2022-04-12 福建博思软件股份有限公司 基于高并发场景下的电子票号快速取票方法及存储介质

Also Published As

Publication number Publication date
EP2178244A4 (en) 2011-02-23
CN101114915A (zh) 2008-01-30
CN101114915B (zh) 2010-08-25
EP2178244A1 (en) 2010-04-21

Similar Documents

Publication Publication Date Title
WO2009026819A1 (fr) Procédé et dispositif pour fusionner une facture et sauvegarder l'état de la file d'attente de tampon
EP3767895B1 (en) Method and system for audio and video interaction between plurality of groups
WO2021184551A1 (zh) 基于多个网络的通信方法、装置、电子设备及存储介质
WO2012037873A1 (zh) 一种分布式数据存储系统和方法
WO2012155440A1 (zh) 一种基于超文本传输协议的业务请求处理方法及装置
WO2011160462A1 (zh) 一种处理在线业务日志的计费服务器及方法
WO2021000379A1 (zh) 一种网络数据调度方法及边缘节点
WO2009000214A1 (fr) Procédé et dispositif pour configurer des données de configuration du réseau d'accès utilisateur
CN101136875A (zh) 即时通信软件中多媒体文件同步回放的方法
CN110149365B (zh) 服务适配方法、设备、系统以及计算机可读介质
WO2023082764A1 (zh) 内容录制方法、播放方法、cdn系统、存储介质
CN109743585B (zh) 一种监控视频收藏以及收藏夹克隆的方法和装置
WO2009092302A1 (zh) 一种录制业务的实现方法和设备
JP5519079B2 (ja) クラウドベースのメディア適合化および変換サービスのための方法およびシステム
CN101499917A (zh) 一种实现预定会议的方法、系统及装置
CN110691214B (zh) 一种业务对象的数据处理方法和装置
CN101193271A (zh) 视频录制实时回放方法
CN100401730C (zh) 使用媒体网关控制协议实现用户自定义录音的方法
CN109450794B (zh) 一种基于sdn网络的通信方法及设备
US9420583B2 (en) Combined voice and data communications in a distributed hybrid allocation and reservation multiple access mobile wireless network
CN113904845A (zh) 一种攻击流量统计方法及装置
WO2008003250A1 (fr) Procédé, appareil et système de positionnement d'une panne dans un réseau de nouvelle génération
JP4430951B2 (ja) コンテンツ配信管理方法、コンテンツ配信装置、コンテンツ配信システム、プログラムおよび記録媒体
CN103139084A (zh) 分布式通信设备中主控卡获取组播流量方法和装置
US11658903B2 (en) Network device route programming

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 08783960

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2008783960

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE