A call bill deletion method, device, equipment and medium
By identifying the time difference of call detail records (CDRs) and adopting appropriate deduplication methods, the problem of low CDR deletion efficiency in existing technologies has been solved, achieving efficient and accurate processing of duplicate CDRs and improving system performance and customer experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-30
- Publication Date
- 2026-04-07
AI Technical Summary
Existing technologies cannot efficiently identify and delete duplicate call records when processing massive amounts of data, leading to abnormal billing results and impacting system performance and customer experience.
By obtaining the time difference between the start time and the current time of the call detail record (CDR), delayed CDRs are identified and deleted. A method based on a bitmap model and index array is used to identify and delete duplicate CDRs. Combining memory and file system processing methods, an appropriate deduplication method is selected based on the CDR generation time.
It improved the efficiency and accuracy of call detail record (CDR) deletion, reduced system resource requirements, lowered operation and maintenance costs, and ensured the stability of the billing system and customer satisfaction.
Smart Images

Figure CN115942269B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, and in particular to a method, apparatus, electronic device, and computer-readable storage medium for deduplication of call detail records (CDRs). Background Technology
[0002] In existing technologies, when deduplicating call records for billing, no exceptions are made for late call records, leading to abnormal billing results. Furthermore, existing deduplication schemes struggle with massive amounts of call record information, especially after the launch of 5G services, which increases communication speeds and dramatically increases the number of call records per unit time. Finding and deleting duplicate call records requires a significant amount of system resources, and sometimes even with a long processing time, it cannot meet business needs, directly impacting the processing efficiency of the entire billing system. Summary of the Invention
[0003] In view of the above problems, embodiments of the present invention are proposed to provide a call detail record (CDR) deduplication method and a corresponding CDR deduplication apparatus, electronic device, and computer-readable storage medium to overcome or at least partially solve the above problems.
[0004] To address the aforementioned problems, this invention discloses a method for deduplication of call detail records (CDRs), applied to a server connected to a network element. The method includes:
[0005] Obtain call detail records (CDRs) stored in the network element; the CDRs include the start times of multiple CDRs.
[0006] Based on the start time of each call detail record (CDR), determine the time difference between the start time of each CDR and the current time;
[0007] If the time difference of a target call detail record (CDR) is greater than the first threshold, the target CDR is determined to be a delayed CDR and the delayed CDR is deleted.
[0008] For the multiple call detail records (CDRs) with a time difference less than a first threshold, a deduplication method matching the CDR is determined based on the time difference, and the deduplication method is used to remove duplicates.
[0009] Optionally, determining the deduplication method matching the call detail record (CDR) based on the time difference, and using the deduplication method to remove duplicates, includes:
[0010] If the time difference is less than or equal to the second threshold, the coordinate values of each speech unit in the two-dimensional coordinate system are calculated based on the bitmap model; the second threshold is less than the first threshold.
[0011] If two call detail records (CDRs) have the same coordinate values, then the two CDRs are determined to be duplicate CDRs, and either of the two CDRs is deleted.
[0012] Optionally, the call detail record (CDR) information further includes: the end time of multiple CDRs, CDR number, and the calculation of the coordinates of each call unit in a two-dimensional coordinate system based on the bitmap model includes:
[0013] Divide the start time, end time, and call detail record number of the call detail record by a preset value to obtain the corresponding remainder value.
[0014] The start time, end time, and call detail record number of the call detail record are used as the x-axis, and the remainder is used as the y-axis to form the coordinate values of each call unit in a two-dimensional coordinate system.
[0015] Optionally, determining the deduplication method matching the call detail record (CDR) based on the time difference, and using the deduplication method to remove duplicates, includes:
[0016] If the time difference is greater than the second threshold and less than the first threshold, based on the call detail record information, query the key value in the index array and the index value in the linked list respectively;
[0017] If a key value is found to be identical to the index value, the call detail record (CDR) is determined to be a duplicate and is deleted.
[0018] Optionally, the method further includes:
[0019] Determine whether the cost of the delayed call detail record needs to be recalculated.
[0020] If it is necessary to recalculate the cost of the delayed call records, save the delayed call records to a preset table, and recalculate the cost of the delayed call records in the preset table.
[0021] Optionally, obtaining the call detail record (CDR) information stored in the network element includes:
[0022] Collect call detail records (CDRs) stored in the network element; the CDR file includes multiple CDRs.
[0023] Extract the key billing elements from the multiple call detail records;
[0024] The billing key elements in the multiple call detail records are filtered to obtain the call detail record information.
[0025] Optionally, the filtering of key billing elements in the plurality of call detail records includes:
[0026] Remove garbled information from the billing key element information, find elements related to the billing key element information, and add them to the billing key element information.
[0027] This invention also discloses a device for deduplication of call detail records (CDRs), applied to a server, the server being connected to a network element, the device comprising:
[0028] The acquisition module is used to acquire call detail records (CDRs) stored in the network element; the CDRs include the start times of multiple CDRs.
[0029] The determination module is used to determine the time difference between the start time of each call detail record and the current time based on the start time of each call detail record.
[0030] The deletion module is used to determine that the target call detail record (CDR) is a delayed CDR and delete the delayed CDR if the time difference of the target CDR is greater than a first threshold.
[0031] The deduplication module is used to determine the deduplication method matching the call detail records (CDRs) among the plurality of CDRs whose time difference is less than a first threshold, and to use the deduplication method to remove duplicates.
[0032] Optionally, the deduplication module includes:
[0033] The calculation submodule is used to calculate the coordinate values of each speech unit in a two-dimensional coordinate system based on the bitmap model if the time difference is less than or equal to a second threshold; the second threshold is less than the first threshold.
[0034] The deletion submodule is used to determine that if two call detail records (CDRs) have the same coordinate values, the two CDRs are duplicate CDRs and either one of the two CDRs is deleted.
[0035] Optionally, the call detail record (CDR) information further includes: the end time of multiple CDRs and the CDR number; the calculation submodule includes:
[0036] The remainder value determination unit is used to divide the values corresponding to the start time, end time, and call detail record number of the call detail record by a preset value to obtain the corresponding remainder value.
[0037] The start time, end time, and call detail record number of the call detail record are used as the x-axis, and the remainder is used as the y-axis to form the coordinate values of each call unit in a two-dimensional coordinate system.
[0038] Optionally, the deduplication module includes:
[0039] The query submodule is used to query the key value in the index array and the index value in the linked list based on the call detail record information if the time difference is greater than the second threshold and less than the first threshold.
[0040] The determination submodule is used to determine that the call detail record (CDR) is a duplicate and delete it if there is a key value that is the same as the index value.
[0041] Optionally, the device further includes:
[0042] The judgment module is used to determine whether the cost generated by the delayed call detail record needs to be recalculated;
[0043] The billing module is used to save the delayed call records to a preset table and recalculate the costs of the delayed call records in the preset table if it is necessary to recalculate the costs.
[0044] Optionally, the acquisition module includes:
[0045] The acquisition submodule is used to acquire call detail records (CDRs) stored in the network element; the CDR file includes multiple CDRs.
[0046] The extraction submodule is used to extract key billing elements from the multiple call detail records.
[0047] The filtering submodule is used to filter the billing key elements information from the multiple call detail records (CDRs) to obtain CDR information.
[0048] Optionally, the filtering submodule includes:
[0049] The lookup unit is used to remove garbled information from the billing key element information, find elements related to the billing key element information, and add them to the billing key element information.
[0050] This invention also discloses an electronic device, including: a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, it implements the steps of the call detail record (CDR) deduplication method described above.
[0051] This invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the call detail record (CDR) deduplication method described above.
[0052] The embodiments of the present invention have the following advantages:
[0053] This invention can determine whether a call detail record (CDR) is delayed based on call detail record (CDR) information. If a CDR is identified as delayed, it can be deleted, avoiding any impact on CDR billing. This invention can also employ different deduplication methods based on the CDR's creation time, resulting in higher efficiency, shorter processing time, and better guarantee of the deduplication results compared to a traditional single deduplication procedure. Furthermore, the new CDR deduplication method and architecture eliminate the need for expansion of memory, disk space, CPU, and other capabilities, improving system resource utilization and saving on maintenance costs. Attached Figure Description
[0054] Figure 1 This is a flowchart of the steps of a call detail record (CDR) deduplication method provided in an embodiment of the present invention;
[0055] Figure 2 This is a schematic diagram of a server provided in an embodiment of the present invention;
[0056] Figure 3 This is a flowchart of another call detail record (CDR) deduplication method provided in an embodiment of the present invention;
[0057] Figure 4 This is a schematic diagram of an index file provided in an embodiment of the present invention;
[0058] Figure 5 This is a flowchart illustrating the steps of call detail record (CDR) pricing processing according to an embodiment of the present invention.
[0059] Figure 6 This is a structural block diagram of a call detail record (CDR) deduplication device provided in an embodiment of the present invention. Detailed Implementation
[0060] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0061] In the billing systems of the telecommunications industry, due to limitations of switches, differences in network transmission between network elements and the billing system, network jitter, delays in service processing, and changes in service rules, duplicate call detail records (CDRs) are often received by the billing system. These duplicate CDRs are difficult to avoid during production. If these duplicate CDRs are not deleted, duplicate billing will occur, leading to poor customer experience and user complaints. Furthermore, existing solutions for deduplicating CDRs for billing do not consider handling late-arriving CDRs, resulting in abnormal billing results.
[0062] To delete duplicate call records, it is necessary to identify duplicate call records with billing characteristics within a specific service or time range, delete the duplicate records, and retain the unique records. This process of retaining unique call records is called deduplication.
[0063] Call detail records (CDRs) are the original records of communications. Information includes traffic-based CDRs, recording user transaction numbers, phone numbers, switch information, start and end times, caller ID, base station information, traffic data, IP address, frequency, product information, pricing information, and entry time, etc. Specific details vary depending on the service, and the amount of information is substantial. Especially with the launch of 5G services, the increased communication speed has led to a dramatic increase in CDR volume per unit time. For example, 5 million users could generate 120 million 5G messages per day, or 3.6 billion CDRs per month. Finding and deleting duplicate CDRs from such a massive amount of information requires significant system resources, including disk storage, I / O, CPU, and memory. Sometimes, it can also take a long time to process, failing to meet business demands and becoming a system bottleneck. Therefore, the efficiency of deduplication technology directly affects the processing efficiency of the entire billing system. Currently, the mainstream deduplication technologies and methods include the following:
[0064] (1) Deduplication based on database unique index: After the original call detail records are converted from file to message and preprocessed and formatted, they are batch-priced and stored in the database. A unique index is established on the list in the detailed record database. The uniqueness of the call detail records is guaranteed by the unique index constraint, and the deduplication of the call detail records is realized. This method relies heavily on database performance. The overhead of updating the unique index when the call detail records are stored is very large. When the number of stored call detail records reaches a certain level, the database efficiency will drop exponentially. Especially in the case of hundreds of millions of call detail records in 5G services, the consumption of database disk space is also very large, and maintenance and management are very difficult.
[0065] (2) Memory-based call detail record (CDR) deduplication: After the original CDRs are converted from files to messages, they are loaded into memory. By extracting key field information, the memory data with the closest start and end times is locked and duplicate CDRs are deleted. Because memory processing is fast, it can meet high-performance requirements. However, due to the limited system memory and the huge number of CDRs, it is impossible to load all CDRs into memory for processing. Therefore, it is not possible to delete all duplicate CDRs in memory at once, but only duplicate CDRs within a small time frame can be removed.
[0066] (3) File-based call detail record (CDR) deduplication: The original CDRs are preprocessed into files and stored in the file system. Duplicate CDRs are deduplicated by comparing the files with the file index. The file system can store a certain number of CDR files, but the storage space consumed by creating the index file is large. The overhead is also very large when dealing with files of hundreds of millions of CDRs, and the performance cannot meet the deduplication requirements.
[0067] Based on this, the present invention creatively proposes a call detail record (CDR) deduplication method. By acquiring the CDR information stored in the network element, it determines whether the CDR is a duplicate based on the CDR information. If it is determined to be a duplicate CDR, it is deleted, thus avoiding the impact of duplicate CDRs on CDR billing. Different deduplication methods can be used according to the generation time of the CDR. Compared with the traditional deduplication procedure, it is more efficient, has a shorter processing time, and better guarantees the results of CDR deduplication.
[0068] Reference Figure 1 The diagram illustrates a flowchart of a call detail record (CDR) deduplication method according to an embodiment of the present invention. The method is applied to a server connected to a network element, and specifically includes the following steps:
[0069] Step 101: Obtain the call detail records (CDRs) stored in the network element; the CDRs include the start time of multiple CDRs.
[0070] In this embodiment of the invention, a server is a type of computer that runs faster, handles higher loads, and is more expensive than a regular computer. Servers provide computing or application services to other client machines (such as PCs, smartphones, ATMs, and even large equipment like train systems) on a network. Servers possess high-speed CPU processing power, long-term reliable operation, powerful I / O external data throughput capabilities, and better scalability. Based on their architecture, servers can be divided into two main categories: IA architecture servers and RISC architecture servers. Based on their scale, servers can be categorized as workgroup servers, departmental servers, and enterprise servers.
[0071] A network element consists of one or more chassis or cabinets and can independently perform certain transmission functions. It can transmit call detail records (CDRs) of various data such as fixed-line phones, mobile phones, data access, data content services, and intelligent networks to the server. A network element can include any one of the following: a switch, a data platform, or an intelligent network platform. For the LTE architecture, the base station is also a network element, in addition to MME, SGW, PDN, etc.
[0072] Reference Figure 2 The diagram illustrates the connection between the server and network elements. The server connects to various network elements to collect call detail records (CDRs) of various data sources, including fixed-line phones, mobile phones, data access, data content services, and intelligent networks. Each collection link carries specific configurable link parameters (such as network element ID, collection point ID, service type, IP address, FTP user and password, remote directory, local directory, etc.), and the links are independent of each other.
[0073] In some application scenarios, the server includes a billing system. The billing system can collect call detail records (CDRs) stored in the network element in real time and determine the start time of multiple CDRs based on the CDR information.
[0074] Step 102: Determine the time difference between the start time of each call detail record (CDR) and the current time based on the start time of each CDR.
[0075] In this embodiment of the invention, after determining the start time of each call detail record (CDR), the time difference between the CDR and the current time can be determined based on the start time of each CDR. For example, if the start time of CDR A is 2022.10.20.12:20 and the current time of the system is 2022.10.20.17:20, then the current time of the system is subtracted from the start time of CDR A to obtain a time difference of 5 hours.
[0076] Step 103: If the time difference of the target call detail record (CDR) is greater than the first threshold, the target CDR is determined to be a delayed CDR and the delayed CDR is deleted.
[0077] In this embodiment of the invention, delayed call detail records (CDRs) refer to CDRs that are later than the business settlement time. Generally, if a CDR is sent more than a month later, it can be considered an abnormal CDR and can be left unprocessed. In this case, the first threshold can be set to 30*24h. The first threshold is set according to the requirements and is not limited here.
[0078] Step 104: For multiple call detail records (CDRs) with a time difference less than the first threshold, determine the deduplication method that matches the CDR based on the time difference, and use the deduplication method to remove duplicates.
[0079] In this embodiment of the invention, when the time difference between multiple call detail records (CDRs) is less than a first threshold, the CDRs can be determined to be normal. Based on the calculated time difference, a corresponding deduplication method can be matched. In one example, if the time difference is less than 8 hours, deduplication is performed based on memory-based CDRs; if the time difference is greater than 8 hours but less than 30*24 hours, deduplication is performed based on file-based CDRs. Then, the corresponding deduplication method is used. This invention can distribute CDRs across different host capabilities for processing, avoiding the long-term concentration of high-volume services on a single node while low-volume services remain idle. It also combines the advantages of memory and a small file system, improving deduplication efficiency. Without affecting system performance, it prevents duplicate pricing of CDRs, leading to abnormal customer complaints and thus improving customer experience.
[0080] This invention can determine whether a call detail record (CDR) is delayed based on call detail record (CDR) information. If a CDR is identified as delayed, it can be deleted, avoiding any impact on CDR billing. This invention can also employ different deduplication methods based on the CDR's creation time, resulting in higher efficiency, shorter processing time, and better guarantee of the deduplication results compared to a traditional single deduplication procedure. Furthermore, the new CDR deduplication method and architecture eliminate the need for expansion of memory, disk space, CPU, and other capabilities, improving system resource utilization and saving on maintenance costs.
[0081] Reference Figure 3 The diagram illustrates a flowchart of another call detail record (CDR) deduplication method provided by an embodiment of the present invention, applied to a server connected to a network element. The method may include the following steps:
[0082] Step 201: Collect call detail records (CDRs) stored in the network element; the CDR file includes multiple CDRs.
[0083] In this embodiment of the invention, call detail records (CDRs) stored in network elements can be collected to obtain multiple CDRs, such as...
[0084] Table 1 shows a call detail record (CDR) file provided in an embodiment of the present invention.
[0085] Number Start time End time 18976891001 2022-3-20 1:21:00 2022-3-20 1:21:40 18974291457 2022-3-20 5:11:20 2022-3-20 5:12:51
[0086] Table 1
[0087] In one embodiment of the present invention, the call detail record (CDR) file may include any one of 5G messages, 5G abnormal offline CDR files, and 5G outgoing abnormal CDR files.
[0088] In this embodiment of the invention, when the call detail record (CDR) file includes 5G messages, the 5G messages sent by the 5G network element can be received in real time through the Nchf interface, the messages can be parsed, formatted, and written into a distributed message queue for interaction with the backend.
[0089] When the call detail record (CDR) file includes 5G abnormal offline CDR files, the 5G abnormal offline CDR files provided by the 5G network element can be collected in real time. First, the encoding conversion is performed, the CDR format is converted and split, a standardized CDR file is generated, uploaded to the distributed file system, and written to the task table. The task table is then used to interact with the backend.
[0090] When the call detail record (CDR) file includes a 5G outgoing abnormal CDR file, it can collect the 5G outgoing abnormal CDR file issued by the group in real time, convert and split the CDR format, generate a standardized CDR file, upload it to the distributed file system, write it to the task table, and interact with the backend through the task table.
[0091] Step 202: Extract key billing information from multiple call detail records.
[0092] In this embodiment of the invention, when the call detail record (CDR) file is a 5G message, the message can be directly obtained from the distributed message queue, and then the billing key element information from multiple CDRs can be extracted.
[0093] When the call detail record (CDR) file is a 5G abnormal offline CDR file or a 5G overflow abnormal CDR file, it is necessary to first read the task table to obtain the CDR file to be processed, then download the CDR file from the distributed file system, finally convert the CDR records into messages, and then extract the billing key element information from multiple CDRs.
[0094] Key billing information refers to billing-related information such as call detail record (CDR) number, CDR start time, CDR end time, and CDR service details. After obtaining multiple CDRs, the message headers and CDR structure can be parsed to obtain basic information such as the CDR number, peer number, service time, and service usage required for billing.
[0095] Step 203: Filter the key billing elements from multiple call detail records (CDRs) to obtain the CDR information.
[0096] In this embodiment of the invention, the billing key element information may contain some information unrelated to call detail record (CDR) billing. The billing key element information can also be supplemented to make the billing key element information more accurate and the resulting charges more precise.
[0097] In one embodiment of the present invention, the step of filtering the billing key element information in the plurality of call detail records includes: removing garbled information from the billing key element information, finding elements related to the billing key element information and adding them to the billing key element information.
[0098] In this embodiment of the invention, some garbled information in the billing key element information can be removed, and elements related to the billing key element can be added to the billing key element information. In one example, the billing key element information includes the billing number, multiple garbled information, and the billing start time. Multiple garbled information can be removed, and then the element matching the billing number can be searched. If the billing end time is found, the billing end time can be added to the billing key element information.
[0099] Step 204: Determine the time difference between the start time of each call detail record (CDR) and the current time based on the start time of each CDR.
[0100] Step 205: If the time difference of the target call detail record (CDR) is greater than the first threshold, the target CDR is determined to be a delayed CDR and the delayed CDR is deleted.
[0101] Step 206: For multiple call detail records (CDRs) with a time difference less than the first threshold, if the time difference is less than or equal to the second threshold, calculate the coordinate values of each CDR unit in the two-dimensional coordinate system based on the bitmap model; the second threshold is less than the first threshold.
[0102] In this embodiment of the invention, when multiple call detail records (CDRs) are determined to be normal, i.e., the time difference is less than a first threshold, and if the time difference is less than or equal to a second threshold, the first method of deduplication is adopted. Based on the bitmap model, multiple CDRs are deduplicated. In one example, the first threshold is 8h. When the time difference is 5h, i.e., the CDRs are within 8h, the coordinate values of each call detail record in the two-dimensional coordinate system are calculated based on the CDR information.
[0103] In one embodiment of the present invention, the call detail record (CDR) information further includes: the end time and CDR number of multiple CDRs. The step of calculating the coordinate value of each call unit in a two-dimensional coordinate system based on the bitmap model includes: dividing the values corresponding to the start time, end time, and CDR number of the CDR by a preset value to obtain the corresponding remainder value; using the values corresponding to the start time, end time, and CDR number of the CDR as the horizontal axis and the remainder value as the vertical axis to form the coordinate value of each call unit in a two-dimensional coordinate system.
[0104] For example, when the preset value is 32, the values corresponding to the start time M, end time N, and call detail record number Q of the call detail record can be divided by 32 to obtain the corresponding remainder values m, n, and q, and then three coordinates (M, m), (N, n), and (Q, q) can be formed.
[0105] Step 207: If two call detail records (CDRs) have the same coordinate values, then the two CDRs are determined to be duplicate CDRs, and either of the two CDRs is deleted.
[0106] In this embodiment of the invention, if the coordinate values (M, m), (N, n), and (Q, q) of call detail records A and B are all the same, then they are determined to be duplicate call detail records and are deleted; if they are not the same, then they are determined not to be duplicate call detail records.
[0107] In one embodiment of the present invention, determining a deduplication method matching the call detail record (CDR) based on the time difference, and then using the deduplication method to remove duplicates, includes:
[0108] If the time difference is greater than the second threshold but less than the first threshold, based on the call detail record (CDR) information, query the key value in the index array and the index value in the linked list respectively; if there is a key value that is the same as the index value, then the CDR is determined to be a duplicate CDR and deleted.
[0109] In this embodiment of the invention, if the time difference is greater than a second threshold but less than a first threshold, deduplication is performed using a second method. For example, the corresponding index file can be loaded into a distributed file system, since the index file includes an index array and a linked list; Figure 4 The illustration shows a schematic diagram of an index file provided by an embodiment of the present invention. An index file is a key-value file based on an index array and a linked list. The index is an array containing a fixed length of N, where each element is converted into an integer value from 0 to N-1 through a certain operation. Each value points to the head pointer of a singly linked list. The call detail record (CDR) information in the billing call detail record (CDR) is converted into an integer value, also called a key value, through a hash function and stored in the linked list. This deduplication key is matched one-to-one with the index value. If there is a key value that is the same as the index value, the CDR is determined to be a duplicate CDR and deleted.
[0110] To prevent the index data in memory from growing uncontrollably and causing uncontrolled resource consumption, the index files in memory are controlled according to time and size. The default memory size limit is 100MB and the time limit is 8 hours. During each deduplication check, when the memory size reaches the limit, the index files in memory that exceed the time limit will be cleaned up.
[0111] In one embodiment of the present invention, the method further includes:
[0112] Determine whether the cost of delayed call records needs to be recalculated; if it needs to be recalculated, save the delayed call records to a preset table and recalculate the cost of the delayed call records in the preset table.
[0113] In this embodiment of the invention, some delayed call detail records (CDRs) may be caused by system errors, so the cost needs to be recalculated. In this case, the delayed CDRs should be saved in a table, and then the cost should be recalculated for the delayed CDRs in the table. Alternatively, when organizing the CDR information, some filter flags can be added. The filter flags are used to indicate that the corresponding CDRs do not need to be filtered. For example, if the filter flag is 13227377456, when it is determined that the CDR with the CDR number 13227377456 is a delayed CDR, no filtering is required, and the deduplication operation can be performed directly.
[0114] In one embodiment of the present invention, the call detail records (CDRs) of delayed calls and duplicate calls can be saved sequentially to an abnormal CDR table and then provided to the user for viewing. This allows the user to know which CDRs are delayed or duplicate, making the process traceable and providing convenience for the user.
[0115] like Figure 5 This document illustrates a flowchart of call detail record (CDR) pricing processing steps provided by an embodiment of the present invention. After the server collects CDR files from network elements, it first obtains the key billing elements information for each CDR. Then, it filters the key billing elements information to obtain CDR information. Based on the CDR information, it determines whether the CDR is older than M hours. If it is older than M hours, it is identified as a delayed CDR. If it is not older than M hours, it determines whether it is older than N hours. If it is older than N hours, the second method is used for deduplication. If it is not older than N hours, the first method is used for deduplication. After deduplication, the remaining CDRs are processed for pricing and then written into the billing list. Because the present invention adopts a new CDR deduplication method and architecture, it does not require expansion of capabilities such as memory, disk space, and CPU, thereby improving system resource utilization and saving operation and maintenance costs.
[0116] This invention can determine whether a call detail record (CDR) is delayed based on call detail record (CDR) information. If a CDR is identified as delayed, it can be deleted, avoiding any impact on CDR billing. This invention can employ different deduplication methods based on the CDR's creation time, resulting in higher efficiency, shorter processing time, and better guarantee of the deduplication results compared to traditional single-stage deduplication procedures. It adopts a new CDR deduplication method and architecture, eliminating the need for expansion of memory, disk space, CPU, and other capabilities, thus improving system resource utilization and saving on maintenance costs. This invention innovatively introduces a deduplication and filtering switch function, which can be enabled or disabled according to different business needs and processing capabilities, enriching the system's functionality.
[0117] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.
[0118] Reference Figure 6 The diagram shows a structural block diagram of a call detail record (CDR) deduplication device provided in an embodiment of the present invention, which may specifically include the following modules:
[0119] The acquisition module 301 is used to acquire call detail records (CDRs) stored in the network element; the CDRs include the start times of multiple CDRs.
[0120] The determining module 302 is used to determine the time difference between the start time of each call detail record and the current time based on the start time of each call detail record.
[0121] The deletion module 303 is used to determine that the target call detail record is a delayed call detail record and delete the delayed call detail record if the time difference of the target call detail record is greater than a first threshold.
[0122] The deduplication module 304 is used to determine a deduplication method that matches the call detail records (CDRs) among the plurality of CDRs whose time difference is less than a first threshold, based on the time difference, and to use the deduplication method to remove duplicates.
[0123] In one embodiment of the present invention, the deduplication module 304 includes:
[0124] The calculation submodule is used to calculate the coordinate values of each speech unit in a two-dimensional coordinate system based on the bitmap model if the time difference is less than or equal to a second threshold; the second threshold is less than the first threshold.
[0125] The deletion submodule is used to determine that if two call detail records (CDRs) have the same coordinate values, the two CDRs are duplicate CDRs and either one of the two CDRs is deleted.
[0126] In one embodiment of the present invention, the call detail record (CDR) information further includes: the end time of multiple CDRs and the CDR number; the calculation submodule includes:
[0127] The remainder value determination unit is used to divide the values corresponding to the start time, end time, and call detail record number of the call detail record by a preset value to obtain the corresponding remainder value.
[0128] The start time, end time, and call detail record number of the call detail record are used as the x-axis, and the remainder is used as the y-axis to form the coordinate values of each call unit in a two-dimensional coordinate system.
[0129] In one embodiment of the present invention, the deduplication module 304 may include:
[0130] The query submodule is used to query the key value in the index array and the index value in the linked list based on the call detail record information if the time difference is greater than the second threshold and less than the first threshold.
[0131] The determination submodule is used to determine that the call detail record (CDR) is a duplicate and delete it if there is a key value that is the same as the index value.
[0132] In one embodiment of the present invention, the apparatus further includes:
[0133] The judgment module is used to determine whether the cost generated by the delayed call detail record needs to be recalculated;
[0134] The billing module is used to save the delayed call records to a preset table and recalculate the costs of the delayed call records in the preset table if it is necessary to recalculate the costs.
[0135] In one embodiment of the present invention, the module for obtaining 301 includes:
[0136] The acquisition submodule is used to acquire call detail records (CDRs) stored in the network element; the CDR file includes multiple CDRs.
[0137] The extraction submodule is used to extract key billing elements from the multiple call detail records.
[0138] The filtering submodule is used to filter the billing key elements information from the multiple call detail records (CDRs) to obtain CDR information.
[0139] In one embodiment of the present invention, the filtering submodule includes:
[0140] The lookup unit is used to remove garbled information from the billing key element information, find elements related to the billing key element information, and add them to the billing key element information.
[0141] In one embodiment of the present invention, the call detail record (CDR) file includes any one of 5G messages, 5G abnormal offline CDR files, and 5G outgoing abnormal CDR files.
[0142] This invention discloses a call detail record (CDR) deduplication device. This invention can determine whether a CDR is a delayed CDR based on CDR information. If a CDR is determined to be delayed, it can be deleted, avoiding the impact of delayed CDRs on CDR billing. This invention can employ different deduplication methods based on the CDR's creation time, resulting in higher efficiency, shorter processing time, and better guarantee of the deduplication results compared to traditional single-stage deduplication procedures. It adopts a new CDR deduplication method and architecture, eliminating the need for expansion of memory, disk space, CPU, and other capabilities, thus improving system resource utilization and saving maintenance costs. This invention innovatively proposes a deduplication and filtering switch function, which can be enabled or disabled according to different service needs and processing capabilities, enriching the system's functionality.
[0143] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0144] This invention also provides an electronic device, comprising:
[0145] It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, it implements the various processes of the above-described call detail record (CDR) deduplication method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0146] This invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described call detail record (CDR) deduplication method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0147] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0148] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0149] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0150] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0151] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0152] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the present invention.
[0153] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0154] The above provides a detailed description of the call detail record (CDR) deduplication method, apparatus, electronic device, and computer-readable storage medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for deduplicating call detail records (CDRs), characterized in that, Applied to a server connected to a network element, the method includes: Obtain call detail records (CDRs) stored in the network element; the CDRs include the start time of multiple CDRs, the end time of multiple CDRs, and the CDR number; Based on the start time of each call detail record (CDR), determine the time difference between the start time of each CDR and the current time; If the time difference of a target call detail record (CDR) is greater than the first threshold, the target CDR is determined to be a delayed CDR and the delayed CDR is deleted. For the multiple call detail records (CDRs) with a time difference less than a first threshold, a deduplication method matching the CDR is determined based on the time difference, and the deduplication method is used to remove duplicates. The step of determining the deduplication method matching the call detail record (CDR) based on the time difference, and then using the deduplication method to remove duplicates, includes: If the time difference is less than or equal to the second threshold, the coordinate values of each speech unit in the two-dimensional coordinate system are calculated based on the bitmap model; the second threshold is less than the first threshold. If two call detail records (CDRs) have the same coordinate values, then the two CDRs are determined to be duplicate CDRs, and either of the two CDRs is deleted. The calculation of the coordinate values of each unit in the two-dimensional coordinate system based on the bitmap model includes: Divide the start time, end time, and call detail record number of the call detail record by a preset value to obtain the corresponding remainder value. The start time, end time, and call detail record number of the call detail record are used as the x-axis, and the remainder is used as the y-axis to form the coordinate values of each call unit in a two-dimensional coordinate system.
2. The method according to claim 1, characterized in that, The step of determining the deduplication method matching the call detail record (CDR) based on the time difference, and using the deduplication method to remove duplicates, includes: If the time difference is greater than the second threshold and less than the first threshold, based on the call detail record information, query the key value in the index array and the index value in the linked list respectively; If a key value is found to be identical to the index value, the call detail record (CDR) is determined to be a duplicate and is deleted.
3. The method according to claim 1, characterized in that, The method further includes: Determine whether the cost of the delayed call detail record needs to be recalculated. If it is necessary to recalculate the cost of the delayed call records, save the delayed call records to a preset table, and recalculate the cost of the delayed call records in the preset table.
4. The method according to claim 1, characterized in that, The step of obtaining the call detail records (CDRs) stored in the network element includes: Collect call detail records (CDRs) stored in the network element; the CDR file includes multiple CDRs. Extract the key billing elements from the multiple call detail records; The billing key elements in the multiple call detail records are filtered to obtain the call detail record information.
5. The method according to claim 4, characterized in that, The filtering of key billing elements from the multiple call detail records includes: Remove garbled information from the billing key element information, find elements related to the billing key element information, and add them to the billing key element information.
6. A device for deduplicating call detail records, characterized in that, Applied to a server, the server being connected to a network element, the device includes: The acquisition module is used to acquire call detail records (CDRs) stored in the network element; the CDR information includes the start time of multiple CDRs, the end time of multiple CDRs, and the CDR number; The determination module is used to determine the time difference between the start time of each call detail record and the current time based on the start time of each call detail record. The deletion module is used to determine that the target call detail record (CDR) is a delayed CDR and delete the delayed CDR if the time difference of the target CDR is greater than a first threshold. The deduplication module is used to determine the deduplication method matching the call records based on the time difference among the multiple call records, and to use the deduplication method to remove duplicates. The deduplication module includes: The calculation submodule is used to calculate the coordinate values of each speech unit in a two-dimensional coordinate system based on the bitmap model if the time difference is less than or equal to a second threshold; the second threshold is less than the first threshold. The deletion submodule is used to determine that if two call detail records (CDRs) have the same coordinate values, the two CDRs are duplicate CDRs and either one of the two CDRs is deleted. The computing submodule includes: The remainder value determination unit is used to divide the values corresponding to the start time, end time, and call detail record number of the call detail record by a preset value to obtain the corresponding remainder value. The start time, end time, and call detail record number of the call detail record are used as the x-axis, and the remainder is used as the y-axis to form the coordinate values of each call unit in a two-dimensional coordinate system.
7. An electronic device, characterized in that, include: A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of the call detail record (CDR) deduplication method as described in any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, it implements the steps of the call detail record (CDR) deduplication method as described in any one of claims 1-5.
Citation Information
Patent Citations
Method and apparatus for removing repeat of telecom charging based on index and hash
CN101350869A
Method for realizing repetitive phone bill document picking on FTP server
CN101557295A