CN118803623A - Call record processing method, device, equipment and storage medium - Google Patents
Call record processing method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN118803623A CN118803623A CN202311234144.9A CN202311234144A CN118803623A CN 118803623 A CN118803623 A CN 118803623A CN 202311234144 A CN202311234144 A CN 202311234144A CN 118803623 A CN118803623 A CN 118803623A
- Authority
- CN
- China
- Prior art keywords
- call
- billing
- information
- target
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/24—Accounting or billing
Landscapes
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Meter Arrangements (AREA)
Abstract
本申请涉及通信技术领域,提供一种话单处理方法、装置、设备及存储介质。所述方法包括:获取待处理的话单数据,并从预设计费数据库中查询对应的包括计费规则和资源信息的计费信息;将计费信息缓存到预设的缓存资源池中,并基于缓存的计费信息对话单数据中的话单逐一进行计费处理,得到各话单的资费信息并缓存到缓存资源池中;在对话单数据中的话单计费处理完毕后,将缓存的资费信息提交至计费数据库中对计费数据库进行更新。通过缓存资源池对计费信息和资费信息的缓存,实现对话单数据的批量计费处理,减少了与计费数据库的交互次数,降低了系统负载,减少了对话单数据批价的交互时间,从而提高了对话单数据的处理效率。
The present application relates to the field of communication technology, and provides a method, device, equipment and storage medium for processing call bills. The method comprises: obtaining call bill data to be processed, and querying corresponding billing information including billing rules and resource information from a pre-designed billing database; caching the billing information into a preset cache resource pool, and performing billing processing on the call bills in the call bill data one by one based on the cached billing information, obtaining the tariff information of each call bill and caching it into the cache resource pool; after the billing processing of the call bills in the call bill data is completed, submitting the cached tariff information to the billing database to update the billing database. By caching the billing information and tariff information in the cache resource pool, batch billing processing of call bill data is realized, the number of interactions with the billing database is reduced, the system load is reduced, and the interaction time of batch pricing of call bill data is reduced, thereby improving the processing efficiency of call bill data.
Description
技术领域Technical Field
本申请涉及通信技术领域,具体涉及一种话单处理方法、装置、设备及存储介质。The present application relates to the field of communication technology, and in particular to a call record processing method, device, equipment and storage medium.
背景技术Background Art
随着通信业务的不断发展,话单数据海量增长,用户在某一段时间内使用多个业务的情况也越来越普遍,例如,用户在某段时间内,在玩游戏,看视频,听音乐等多个应用场景中反复切换,每个业务场景对应不同的业务代码,网络侧生成用户的单条话单记录中,可能存在包含多个业务代码的情况。计费系统需要按照不同的业务场景设置不同的计费规则,现有的技术方案需要针对单条话单的每个业务代码连接计费库进行计费。With the continuous development of communication services, call bill data has grown massively, and it is becoming more and more common for users to use multiple services within a certain period of time. For example, users repeatedly switch between multiple application scenarios such as playing games, watching videos, and listening to music within a certain period of time. Each business scenario corresponds to a different business code. A single call bill record generated by the network side may contain multiple business codes. The billing system needs to set different billing rules according to different business scenarios. The existing technical solution needs to connect to the billing library for billing for each business code of a single call bill.
具体地,针对将多业务封装在一条话单记录中的情况,计费时需按照不同的业务代码,将一条数据流量话单拆分成多条。其中,除了业务代码字段和上、下行流量字段及时间字段值不一样外,其它字段都按原输入话单字段进行复制。拆分后的多条话单记录中,每条话单记录只有一个业务代码,针对每个话单均需要连接计费系统的计费数据库(MemoryData Base)进行计费,从而实现针对单个的业务代码进行免费资源及费用的计算,并且更新到计费数据库MDB中。Specifically, in the case of encapsulating multiple services in one call record, a data traffic call record needs to be split into multiple records according to different service codes during billing. Among them, except for the service code field and the upstream and downstream traffic fields and time field values, other fields are copied according to the original input call record fields. Among the multiple call record records after splitting, each call record has only one service code. For each call record, it is necessary to connect to the billing database (MemoryData Base) of the billing system for billing, so as to realize the calculation of free resources and fees for a single service code, and update it to the billing database MDB.
随着网络快速发展而随之产生的海量话单数据,使得计费系统常态化的话单处理及时性面临严峻的挑战。现有的话单处理方式,计费系统与数据库交互频繁,导致系统负载较高,例如,对于一条包含两个RG业务的话单数据,在进行批价计算时,需要与内存数据进行8次交互,而根据交互过程的统计数据,与数据库的交互过程是占据批价处理整体耗时最大的过程,占比在50%以上,对于通过业务拆分得到的多条单业务代码的话单记录,计算进程每次查询锁定、更新和解锁数据库都需要消耗较长时间,导致对话单的处理效率极低。With the rapid development of the network, the massive amount of call data generated has brought severe challenges to the timeliness of the billing system's normalized call processing. In the existing call processing method, the billing system interacts frequently with the database, resulting in a high system load. For example, for a call data containing two RG services, it is necessary to interact with the memory data 8 times when calculating the batch price. According to the statistical data of the interaction process, the interaction process with the database is the most time-consuming process in the overall batch price processing, accounting for more than 50%. For multiple call records with a single business code obtained through business splitting, the calculation process takes a long time to query, lock, update and unlock the database each time, resulting in extremely low efficiency in the processing of call records.
发明内容Summary of the invention
本申请实施例提供一种话单处理方法、装置、设备及存储介质,用以解决现有的话单处理方式与数据库交互频繁、系统负载高,且对话单的处理效率低的技术问题。The embodiments of the present application provide a call record processing method, device, equipment and storage medium to solve the technical problems of the existing call record processing method, such as frequent interaction with the database, high system load and low call record processing efficiency.
第一方面,本申请实施例提供一种话单处理方法,包括:In a first aspect, an embodiment of the present application provides a method for processing a call record, including:
获取待处理的话单数据,并从预设计费数据库中查询所述话单数据对应的计费信息;所述计费信息包括计费规则和资源信息;Acquire the call data to be processed, and query the billing information corresponding to the call data from the pre-designed billing database; the billing information includes billing rules and resource information;
将所述计费信息缓存到预设的缓存资源池中,并基于缓存的计费信息对所述话单数据中的话单逐一进行计费处理,得到所述话单数据中各话单的资费信息并缓存到所述缓存资源池中;The billing information is cached in a preset cache resource pool, and billing is performed on each of the bills in the bill data based on the cached billing information, so as to obtain the billing information of each bill in the bill data and cache it in the cache resource pool;
在对所述话单数据中的话单计费处理完毕后,将缓存的所述资费信息提交至所述计费数据库中,对所述计费数据库进行更新。After the billing process for the bill data is completed, the cached tariff information is submitted to the billing database, and the billing database is updated.
在一个实施例中,所述基于缓存的计费信息对所述话单数据的话单逐一进行计费处理,得到所述话单数据中各话单的资费信息并缓存到所述缓存资源池中,包括:In one embodiment, the billing process is performed on each of the bill data based on the cached billing information, and the billing information of each bill in the bill data is obtained and cached in the cache resource pool, including:
基于所述话单数据中各话单的业务标识,将所述话单数据转化为话单列表;Based on the service identifier of each call record in the call record data, converting the call record data into a call record list;
从所述话单列表中获取目标话单,从缓存的计费信息中获取所述目标话单对应的目标计费信息;Obtain a target call record from the call record list, and obtain target billing information corresponding to the target call record from the cached billing information;
根据所述目标计费信息对所述目标话单进行计费处理,得到所述目标话单的资费信息,将所述目标话单的资费信息缓存到所述缓存资源池中;Performing charging processing on the target call list according to the target charging information to obtain the charging information of the target call list, and caching the charging information of the target call list into the cache resource pool;
若所述目标话单不是所述话单列表中的尾话单,则返回并执行所述从所述话单列表中获取目标话单的步骤,直到所述目标话单是所述话单列表中的尾话单为止。If the target call record is not the last call record in the call record list, return to and execute the step of obtaining the target call record from the call record list until the target call record is the last call record in the call record list.
在一个实施例中,所述目标话单包括多个业务标识时,所述目标计费信息包括各所述业务标识对应的计费子信息;所述根据所述目标计费信息对所述目标话单进行计费处理,得到所述目标话单的资费信息,将所述目标话单的资费信息缓存到所述缓存资源池中,包括:In one embodiment, when the target call sheet includes multiple service identifiers, the target billing information includes billing sub-information corresponding to each of the service identifiers; performing billing processing on the target call sheet according to the target billing information to obtain the tariff information of the target call sheet, and caching the tariff information of the target call sheet into the cache resource pool includes:
基于所述目标话单中的各业务标识,获取所述目标话单对应的话单子列表;Based on each service identifier in the target call record, obtaining a call record sub-list corresponding to the target call record;
获取所述话单子列表中的目标业务标识,以及从所述目标计费信息中获取所述目标业务标识对应的计费子信息;所述目标业务标识为所述话单子列表中的任意一个;Obtaining a target service identifier in the call bill sublist, and obtaining the billing sub-information corresponding to the target service identifier from the target billing information; the target service identifier is any one in the call bill sublist;
根据所述计费子信息对所述目标话单中所述目标业务标识对应的目标业务进行计费处理,得到所述目标业务标识对应的资费信息,将所述目标业务标识对应的资费信息缓存到所述缓存资源池中;Performing charging processing on the target service corresponding to the target service identifier in the target call record according to the charging sub-information, obtaining the charging information corresponding to the target service identifier, and caching the charging information corresponding to the target service identifier into the cache resource pool;
返回并执行所述获取所述话单子列表中的目标业务标识的步骤,直到所述目标业务标识为所述话单子列表中的最后一个为止。Return and execute the step of obtaining the target service identifier in the call bill sub-list until the target service identifier is the last one in the call bill sub-list.
在一个实施例中,所述从预设计费数据库中查询所述话单数据对应的计费信息,包括:In one embodiment, querying the billing information corresponding to the call record data from the pre-designed billing database includes:
提取所述话单数据中的用户信息;所述用户信息包括用户标识和业务标识;Extracting user information from the call list data; the user information includes a user ID and a service ID;
根据所述用户信息从预设的计费数据库中查询所述话单数据对应的计费信息。The billing information corresponding to the call list data is queried from a preset billing database according to the user information.
在一个实施例中,所述根据所述用户信息从预设的计费数据库中查询所述话单数据对应的计费信息,包括:In one embodiment, querying the billing information corresponding to the call record data from a preset billing database according to the user information includes:
根据所述用户信息对所述话单数据中,同一用户对应的话单数据进行合并,以对所述用户信息进行去重;Merging the call record data corresponding to the same user in the call record data according to the user information to deduplicate the user information;
基于去重后的用户信息,从预设的计费数据库中查询所述话单数据对应计费信息。Based on the deduplicated user information, the billing information corresponding to the call list data is queried from a preset billing database.
在一个实施例中,所述将缓存的所述资费信息提交至所述计费数据库中,对所述计费数据库进行更新,包括:In one embodiment, submitting the cached tariff information to the billing database and updating the billing database includes:
将缓存的所述资费信息提交至所述计费数据库中,根据所述用户信息中的用户标识,对所述资费信息进行划分;Submitting the cached tariff information to the billing database, and dividing the tariff information according to the user identifier in the user information;
基于划分后的同一用户的资费信息,根据所述用户信息中的业务标识对所述计费数据库进行更新。Based on the divided tariff information of the same user, the billing database is updated according to the service identifier in the user information.
在一个实施例中,所述将缓存的所述资费信息提交至所述计费数据库中,对所述计费数据库进行更新之后,还包括:In one embodiment, the step of submitting the cached tariff information to the billing database and updating the billing database further includes:
对所述资费信息和所述计费信息进行清除,以释放所述资费信息和所述计费信息在所述缓存资源池中占用的内存空间。The tariff information and the billing information are cleared to release the memory space occupied by the tariff information and the billing information in the cache resource pool.
第二方面,本申请实施例提供一种话单处理装置,包括:In a second aspect, an embodiment of the present application provides a call record processing device, including:
查询模块,用于获取待处理的话单数据,并从预设计费数据库中查询所述话单数据对应的计费信息;所述计费信息包括计费规则和资源信息;A query module, used to obtain the call data to be processed, and query the billing information corresponding to the call data from the pre-designed billing database; the billing information includes billing rules and resource information;
缓存模块,用于将所述计费信息缓存到预设的缓存资源池中,并基于缓存的计费信息对所述话单数据中的话单逐一进行计费处理,得到所述话单数据中各话单的资费信息并缓存到所述缓存资源池中;A cache module, used to cache the billing information into a preset cache resource pool, and perform billing processing on the bills in the bill data one by one based on the cached billing information, obtain the billing information of each bill in the bill data and cache it into the cache resource pool;
更新模块,用于在对所述话单数据中的话单计费处理完毕后,将缓存的所述资费信息提交至所述计费数据库中,对所述计费数据库进行更新。The updating module is used to submit the cached charging information to the charging database after the billing processing in the bill data is completed, so as to update the charging database.
第三方面,本申请实施例提供一种电子设备,包括处理器和存储有计算机程序的存储器,所述处理器执行所述程序时实现第一方面所述的话单处理方法的步骤。In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory storing a computer program, wherein the processor implements the steps of the call record processing method described in the first aspect when executing the program.
第四方面,本申请实施例提供一种非暂态的计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现第一方面所述的话单处理方法的步骤。In a fourth aspect, an embodiment of the present application provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the call record processing method described in the first aspect are implemented.
第五方面,本申请实施例提供一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现第一方面所述的话单处理方法的步骤。In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the call record processing method described in the first aspect.
本申请实施例提供的话单处理方法、装置、设备及存储介质,通过获取待处理的话单数据,并从预设计费数据库中查询所述话单数据对应的计费信息缓存到预设的缓存资源池中,基于缓存的计费信息对话单数据中的话单逐一进行计费处理,得到各话单的资费信息并缓存到缓存资源池中;在对话单数据中的话单计费处理完毕后,将缓存的资费信息提交至计费数据库中,对计费数据库进行更新。通过缓存资源池对计费信息和资费信息的缓存,实现对话单数据的批量计费处理,减少了与计费数据库的交互次数,降低了系统负载,减少了对话单数据批价的交互时间,从而提高了对话单数据的处理效率。The call bill processing method, device, equipment and storage medium provided in the embodiment of the present application obtain the call bill data to be processed, query the billing information corresponding to the call bill data from the pre-designed billing database and cache it in the preset cache resource pool, perform billing processing on the call bills in the call bill data one by one based on the cached billing information, obtain the tariff information of each call bill and cache it in the cache resource pool; after the billing processing of the call bills in the call bill data is completed, submit the cached tariff information to the billing database, and update the billing database. By caching the billing information and tariff information in the cache resource pool, batch billing processing of the call bill data is realized, the number of interactions with the billing database is reduced, the system load is reduced, and the interaction time of batch pricing of the call bill data is reduced, thereby improving the processing efficiency of the call bill data.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本申请或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the present application or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
图1是本申请实施例提供的话单处理方法的流程示意图之一;FIG1 is a flow chart of a method for processing a call record according to an embodiment of the present application;
图2是本申请实施例提供的缓存资源池的架构示意图;FIG2 is a schematic diagram of the architecture of a cache resource pool provided in an embodiment of the present application;
图3是本申请实施例提供的话单处理方法的流程示意图之二;FIG3 is a second flow chart of a method for processing a call list provided in an embodiment of the present application;
图4是本申请实施例提供的话单处理流程的交互过程示意图;FIG4 is a schematic diagram of the interactive process of the call record processing flow provided in an embodiment of the present application;
图5是本申请实施例提供的话单处理装置的结构示意图;FIG5 is a schematic diagram of the structure of a call bill processing device provided in an embodiment of the present application;
图6是本申请实施例提供的电子设备的结构示意图。FIG. 6 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
具体实施方式DETAILED DESCRIPTION
为使本申请的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
图1为本申请实施例提供的话单处理方法的流程示意图。参照图1,本申请实施例提供的话单处理方法,可以应用于计费系统,计费系统对应有一计费数据库MDB,也可以称为计费数据库。该方法可以包括:FIG1 is a flow chart of a method for processing a call bill provided in an embodiment of the present application. Referring to FIG1 , the method for processing a call bill provided in an embodiment of the present application can be applied to a billing system, and the billing system corresponds to a billing database MDB, which can also be called a billing database. The method may include:
步骤100,获取待处理的话单数据,并从预设计费数据库中查询所述话单数据对应的计费信息;所述计费信息包括计费规则和资源信息;Step 100, obtaining the call data to be processed, and querying the billing information corresponding to the call data from the pre-designed billing database; the billing information includes billing rules and resource information;
首先,获取待处理的话单数据,该话单数据包括一个或多个话单,即一条或多条话单记录。从预设的计费数据库MDB中查询话单数据对应的计费信息,该计费信息为对话单数据进行计费所需的信息,包括计费规则和资源信息等,资源信息包括话单数据中各话单对应的用户的可用资源量、资源总量和剩余资源量等。对话单数据对应的计费信息的查询,是针对话单数据中各话单的计费信息的批量查询,可以减少不同话单分别与数据库交互进行查询的交互次数。First, obtain the call data to be processed, which includes one or more call records, that is, one or more call records. Query the billing information corresponding to the call data from the preset billing database MDB. The billing information is the information required for billing the call data, including billing rules and resource information, etc. The resource information includes the available resources, total resources and remaining resources of the user corresponding to each call in the call data. The query of the billing information corresponding to the call data is a batch query of the billing information of each call in the call data, which can reduce the number of interactions between different call records and the database for query.
需要说明的是,同一个用户可以有一个或多个话单,同一个话单中可以包含一个或多个业务标识,不同的业务标识对应不同的业务场景,不同的业务场景可能对应不同的计费规则,因此,获取的计费信息包括话单数据中每个话单的计费信息,针对包含多个业务标识的话单,该话单的计费信息包括每个业务标识对应的计费信息。It should be noted that the same user can have one or more call bills, and the same call bill can contain one or more service identifiers. Different service identifiers correspond to different service scenarios, and different business scenarios may correspond to different billing rules. Therefore, the billing information obtained includes the billing information of each call bill in the call bill data. For call bills containing multiple service identifiers, the billing information of the call bill includes the billing information corresponding to each service identifier.
步骤200,将所述计费信息缓存到预设的缓存资源池中,并基于缓存的计费信息对所述话单数据中的话单逐一进行计费处理,得到所述话单数据中各话单的资费信息并缓存到所述缓存资源池中;Step 200, cache the billing information into a preset cache resource pool, and perform billing processing on the bills in the bill data one by one based on the cached billing information, obtain the billing information of each bill in the bill data and cache it into the cache resource pool;
在获取到待处理的话单数据对应的计费信息后,将获取的计费信息缓存到预设的缓存资源池中,基于缓存的计费信息,对话单数据中的各话单逐一进行计费处理,得到话单数据中各话单的资费信息并缓存到缓存资源池中。After obtaining the billing information corresponding to the call record data to be processed, the obtained billing information is cached in a preset cache resource pool. Based on the cached billing information, billing processing is performed one by one on each call record in the call record data to obtain the billing information of each call record in the call record data and cache it in the cache resource pool.
在现有的话单处理方式中,需要对包含多个业务标识的话单进行拆分,克隆出多个包含单个业务标识的话单,并分别对每个话单进行计费,在计费时每个话单均需要与数据库进行交互。而在本实施例中,通过缓存资源池对计费信息的缓存,针对不同的话单,通过批量查询并缓存的计费信息,在对话单进行计费处理时,只需要查询缓存资源池中缓存的计费信息即可,而无需与数据库交互,可以减少与数据库的交互,提高对话单的处理效率。In the existing call sheet processing method, it is necessary to split the call sheet containing multiple service identifiers, clone multiple call sheets containing a single service identifier, and charge each call sheet separately. Each call sheet needs to interact with the database during the billing. In this embodiment, the billing information is cached by the cache resource pool. For different call sheets, the billing information is batch queried and cached. When the call sheet is charged, it is only necessary to query the cached billing information in the cache resource pool without interacting with the database. This can reduce the interaction with the database and improve the processing efficiency of the call sheet.
进一步地,通过对话单数据进行计费处理得到的资费信息进行缓存,有利于对话单数据的批量计费处理。对话单数据中各话单的批量批价,可以是并行处理的,也可以是按照优先级顺序串行处理的,串行处理时,相应的优先级顺序可以是根据话单的生成时间确定的,生成时间在前的话单,其优先级顺序高于生成时间在后的话单,也即,遵循先生成先处理原则。在本实施例中,对于包含多个业务标识的话单,在批价时,可以按照串行处理的方式,分别针对每个标识查询缓存的计费信息进行批价,得到对应的资费信息进行缓存,在此过程中,可以将话单拆分成多个单业务标识的话单,也可以不对话单进行拆分,在此不做具体限定。Furthermore, the charging information obtained by billing the call sheet data is cached, which is beneficial to the batch billing processing of the call sheet data. The batch pricing of each call sheet in the call sheet data can be processed in parallel or serially in order of priority. When processing serially, the corresponding priority order can be determined according to the generation time of the call sheet. The priority order of the call sheet with an earlier generation time is higher than that of the call sheet with a later generation time, that is, the principle of first generation first processing is followed. In this embodiment, for call sheets containing multiple service identifiers, when pricing, the billing information cached can be queried for each identifier in a serial processing manner, and the corresponding charging information can be cached. In this process, the call sheet can be split into multiple call sheets with a single service identifier, or the call sheet can be not split, which is not specifically limited here.
步骤300,在对所述话单数据中的话单计费处理完毕后,将缓存的所述资费信息提交至所述计费数据库中,对所述计费数据库进行更新。Step 300: After the billing process for the bill data is completed, the cached rate information is submitted to the billing database to update the billing database.
在对话单数据中的各话单计费处理完毕后,将缓存的各话单的资费信息提交至计费数据库MDB中,对计费数据库进行更新,完成对话单数据的批价。现有的对话单数据的处理方式中,针对每个话单数据,对计费信息的查询以及对计费处理后得到的资费信息的提交,都需要与数据库交互,通过缓存资源池对计费信息和资费信息的缓存,可以实现对话单数据的批量批价,并在对话单数据中各话单批价完成后,统一提交到数据库,对多个话单的批价处理,只需要与数据库进行两次交互,即计费信息的查询和资费信息的提交,减少了与数据库的交互次数,从而可以降低系统负载,提高对话单的处理效率。After the billing process of each call sheet in the conversation sheet data is completed, the cached tariff information of each call sheet is submitted to the billing database MDB, the billing database is updated, and the batch pricing of the conversation sheet data is completed. In the existing processing method of conversation sheet data, for each call sheet data, the query of billing information and the submission of tariff information obtained after billing processing need to interact with the database. By caching the billing information and tariff information in the cache resource pool, batch pricing of conversation sheet data can be realized, and after the batch pricing of each call sheet in the conversation sheet data is completed, it is uniformly submitted to the database. For the batch pricing processing of multiple call sheets, only two interactions with the database are required, namely the query of billing information and the submission of tariff information, which reduces the number of interactions with the database, thereby reducing the system load and improving the processing efficiency of conversation sheets.
可选地,参照图2所示的缓存资源池的架构示意图,在图2中,缓存资源池包括接口应用层、业务接口层、计费数据库MDB层和数据存储层。其中,接口应用层用于实现业务应用之间的IPC通讯、TCP通讯和业务处理;业务接口层用于提供各业务应用的访问接口;计费数据库MDB层用于提供守护线程、并发管理、恢复处理、双机集群HA机制、事务管理和数据管理等能力,以及进行Redo和ACK消息应答;数据存储层用于持久化保存Redo日志文件和内存数据映象文件等数据;系统管理层用于提供鉴权管理、系统监控、访问管理和文件管理等能力。基于图2所示的系统架构,缓存资源池具有相对独立的系统功能,且可以与其他业务应用进行交互,从而满足计费系统对话单数据的批价需求。Optionally, referring to the schematic diagram of the architecture of the cache resource pool shown in FIG2, in FIG2, the cache resource pool includes an interface application layer, a business interface layer, a billing database MDB layer and a data storage layer. Among them, the interface application layer is used to implement IPC communication, TCP communication and business processing between business applications; the business interface layer is used to provide access interfaces for various business applications; the billing database MDB layer is used to provide capabilities such as daemon threads, concurrency management, recovery processing, dual-machine cluster HA mechanism, transaction management and data management, as well as Redo and ACK message responses; the data storage layer is used to persist data such as Redo log files and memory data image files; the system management layer is used to provide authentication management, system monitoring, access management and file management capabilities. Based on the system architecture shown in FIG2, the cache resource pool has relatively independent system functions and can interact with other business applications to meet the batch pricing requirements of the billing system for dialog data.
在本实施例中,通过获取待处理的话单数据,并从预设计费数据库中查询所述话单数据对应的计费信息缓存到预设的缓存资源池中,基于缓存的计费信息对话单数据中的话单逐一进行计费处理,得到各话单的资费信息并缓存到缓存资源池中;在对话单数据中的话单计费处理完毕后,将缓存的资费信息提交至计费数据库中,对计费数据库进行更新。通过缓存资源池对计费信息和资费信息的缓存,实现对话单数据的批量计费处理,减少了与计费数据库的交互次数,降低了系统负载,减少了对话单数据批价的交互时间,从而提高了对话单数据的处理效率。In this embodiment, by obtaining the call data to be processed, and querying the billing information corresponding to the call data from the pre-designed billing database and caching it in the preset cache resource pool, the call data in the call data are billed one by one based on the cached billing information, and the tariff information of each call data is obtained and cached in the cache resource pool; after the billing processing of the call data in the call data is completed, the cached tariff information is submitted to the billing database to update the billing database. By caching the billing information and tariff information in the cache resource pool, batch billing processing of call data is realized, the number of interactions with the billing database is reduced, the system load is reduced, and the interaction time of batch pricing of call data is reduced, thereby improving the processing efficiency of call data.
优选地,对话单数据的批价处理,是基于列表进行的,具体地,步骤200中,基于缓存的计费信息,对话单数据中的各话单逐一进行计费处理,得到各话单的资费信息并缓存到缓存资源池中,还可以包括:Preferably, the batch pricing processing of the call sheet data is performed based on the list. Specifically, in step 200, based on the cached billing information, each call sheet in the call sheet data is billed one by one, and the tariff information of each call sheet is obtained and cached in the cache resource pool. The process may also include:
步骤201,基于所述话单数据中各话单的业务标识,将所述话单数据转化为话单列表;Step 201, based on the service identifier of each call record in the call record data, convert the call record data into a call record list;
步骤202,从所述话单列表中获取目标话单,从缓存的计费信息中获取所述目标话单对应的目标计费信息;Step 202, obtaining a target call record from the call record list, and obtaining target billing information corresponding to the target call record from the cached billing information;
步骤203,根据所述目标计费信息对所述目标话单进行计费处理,得到所述目标话单的资费信息,将所述目标话单的资费信息缓存到所述缓存资源池中;Step 203, performing billing processing on the target call record according to the target billing information, obtaining the tariff information of the target call record, and caching the tariff information of the target call record in the cache resource pool;
步骤204,若所述目标话单不是所述话单列表中的尾话单,则返回并执行所述从所述话单列表中获取目标话单的步骤,直到所述目标话单是所述话单列表中的尾话单为止。Step 204: if the target call record is not the last call record in the call record list, return to and execute the step of obtaining the target call record from the call record list until the target call record is the last call record in the call record list.
基于话单数据中各话单的业务标识,将话单数据转化为话单列表,并从该话单列表中获取目标话单,从缓存的计费信息中获取该目标话单的目标计费信息,根据该目标计费信息,对目标话单进行计费处理,得到目标话单对应的资费信息,并将目标话单的资费信息缓存到缓存资源池中。若该目标话单不是话单列表中的最后一个,即目标话单不是话单列表中的尾话单,从话单列表中重新获取一个话单作为目标话单,重复上述步骤,直到获取的目标话单是话单列表中的尾话单为止,完成对话单列表中各话单的计费出力,得到话单数据中各话单缓存的资费信息。Based on the service identifier of each call sheet in the call sheet data, the call sheet data is converted into a call sheet list, and the target call sheet is obtained from the call sheet list, and the target billing information of the target call sheet is obtained from the cached billing information. According to the target billing information, the target call sheet is billed to obtain the tariff information corresponding to the target call sheet, and the tariff information of the target call sheet is cached in the cache resource pool. If the target call sheet is not the last one in the call sheet list, that is, the target call sheet is not the last call sheet in the call sheet list, a new call sheet is obtained from the call sheet list as the target call sheet, and the above steps are repeated until the target call sheet obtained is the last call sheet in the call sheet list, and the billing output of each call sheet in the call sheet list is completed, and the tariff information cached for each call sheet in the call sheet data is obtained.
进一步地,一个话单可以包括一个或多个业务标识,当获取的目标话单包括多个业务标识时,生成的话单列表中,包括该目标话单的各业务标识对应的话单子列表。不同的业务标识计费规则可能不同,因此,目标话单的目标计费信息包括各业务标识对应的计费子信息。基于此,步骤203中,根据目标计费信息对目标话单进行计费处理,得到目标话单的资费信息,将目标话单的资费信息缓存到缓存资源池中,具体包括:Furthermore, a call sheet may include one or more service identifiers. When the target call sheet obtained includes multiple service identifiers, the generated call sheet list includes a call sheet sub-list corresponding to each service identifier of the target call sheet. Different service identifiers may have different billing rules. Therefore, the target billing information of the target call sheet includes the billing sub-information corresponding to each service identifier. Based on this, in step 203, the target call sheet is billed according to the target billing information to obtain the tariff information of the target call sheet, and the tariff information of the target call sheet is cached in the cache resource pool, which specifically includes:
步骤2031,基于所述目标话单中的各业务标识,获取所述目标话单对应的话单子列表;Step 2031, based on each service identifier in the target call record, obtaining a call record sub-list corresponding to the target call record;
步骤2032,获取所述话单子列表中的目标业务标识,以及从所述目标计费信息中获取所述目标业务标识对应的计费子信息;所述目标业务标识为所述话单子列表中的任意一个;Step 2032, obtaining a target service identifier in the call bill sublist, and obtaining the billing sub-information corresponding to the target service identifier from the target billing information; the target service identifier is any one in the call bill sublist;
步骤2033,根据所述计费子信息对所述目标话单中所述目标业务标识对应的目标业务进行计费处理,得到所述目标业务标识对应的资费信息,将所述目标业务标识对应的资费信息缓存到所述缓存资源池中;Step 2033, performing charging processing on the target service corresponding to the target service identifier in the target call record according to the charging sub-information, obtaining the charging information corresponding to the target service identifier, and caching the charging information corresponding to the target service identifier into the cache resource pool;
步骤2034,返回并执行所述获取所述话单子列表中的目标业务标识的步骤,直到所述目标业务标识为所述话单子列表中的最后一个为止。Step 2034, return and execute the step of obtaining the target service identifier in the call bill sub-list until the target service identifier is the last one in the call bill sub-list.
首先,基于目标话单中的各业务标识,获取目标话单对应的话单子列表,该话单子列表可以是基于目标话单生成的,也可以是从话单列表中提取的,在此不做具体限定。获取话单子列表中的目标业务标识,以及从目标计费信息中获取目标业务标识对应的计费子信息,其中,目标业务标识为目标话单中的各业务标识中的任意一个,也即,话单子列表中的各业务标识中的任意一个。根据获取的计费子信息,对目标话单中该目标业务标识对应的目标业务进行计费处理,得到目标业务标识对应的资费信息,并将目标业务标识对应的资费信息缓存到缓存资源池中。First, based on each service identifier in the target call bill, obtain the call bill sub-list corresponding to the target call bill. The call bill sub-list can be generated based on the target call bill or extracted from the call bill list, which is not specifically limited here. Obtain the target service identifier in the call bill sub-list, and obtain the billing sub-information corresponding to the target service identifier from the target billing information, wherein the target service identifier is any one of the service identifiers in the target call bill, that is, any one of the service identifiers in the call bill sub-list. Based on the obtained billing sub-information, perform billing processing on the target service corresponding to the target service identifier in the target call bill to obtain the tariff information corresponding to the target service identifier, and cache the tariff information corresponding to the target service identifier in the cache resource pool.
判断目标业务标识是否为话单子列表中的最后一个,若不是,则从话单子列表中重新获取一个业务标识作为目标业务标识,重复上述对目标业务标识的处理步骤,直到获取的目标业务标识为话单子列表中的最后一个为止。Determine whether the target service identifier is the last one in the call list sublist. If not, re-obtain a service identifier from the call list sublist as the target service identifier, and repeat the above processing steps for the target service identifier until the obtained target service identifier is the last one in the call list sublist.
优选地,参照图3所示的话单处理流程示意图,在从计费数据库中查询话单数据对应的计费信息时,可以是基于话单数据中的首话单进行的,当检测到话单数据中的首话单时,触发对话单数据对应的计费信息的查询。Preferably, referring to the call bill processing flow chart shown in Figure 3, when querying the billing information corresponding to the call bill data from the billing database, it can be based on the first call bill in the call bill data. When the first call bill in the call bill data is detected, the query of the billing information corresponding to the call bill data is triggered.
具体地,如图3所示,基于话单数据生成的话单列表XDRLIST,获取一个话单进行处理,对于获取的每个话单,在处理时,首先判断其是否为首话单,若是首话单,查询计费数据库,获取话单数据对应的计费信息并缓存;若不是首话单,查询缓存的计费信息进行标准的批价处理,并将得到的资费信息件缓存,以更新缓存信息;然后判断该话单是否为尾话单,若是尾话单,则说明已完成对话单数据中所有话单的批价,将缓存的资费信息提交至计费数据库中,对计费数据库进行更新,完成对话单数据的批价;若不是尾话单,则从话单列表XDRLIST中重新获取一个话单进行处理。Specifically, as shown in Figure 3, based on the call list XDRLIST generated based on the call record data, a call record is obtained for processing. For each call record obtained, when processing, it is first determined whether it is the first call record. If it is the first call record, the billing database is queried to obtain the billing information corresponding to the call record data and cache it; if it is not the first call record, the cached billing information is queried for standard batch pricing processing, and the obtained billing information is cached to update the cached information; then it is determined whether the call record is the last call record. If it is the last call record, it means that the batch pricing of all call records in the call record data has been completed, the cached billing information is submitted to the billing database, the billing database is updated, and the batch pricing of the call record data is completed; if it is not the last call record, a new call record is obtained from the call list XDRLIST for processing.
可以理解的是,图3所示的话单处理流程,适用于包括多个话单的话单数据,同样适用于包括多个业务标识的一个话单的话单数据,当用于包含多个业务标识的一个话单时,话单列表XDRLIST是基于话单中的各业务标识生成的列表。It can be understood that the call record processing flow shown in Figure 3 is applicable to call record data including multiple call records, and is also applicable to call record data including multiple service identifiers. When used for a call record containing multiple service identifiers, the call record list XDRLIST is a list generated based on the service identifiers in the call record.
优选地,在处理一条包含多业务标识的话单记录时,不再进行话单拆分,做话单克隆,而是以列表的形式执行。首先,根据话单中的业务标识顺序,在计算服务进程中形成列表XDRLIST,处理话单的首个业务标识时,查询计费数据库MDB获取计费信息,将返回的包含用户免费资源量、总流量和计费规则等计费信息,缓存在进程的缓存资源池MDB-CACHE中,并且在进程中计算的资源量及费用(标准批价)缓存更新到MDB-CACHE中。根据列表XDRLIST中的业务标识循环处理,在MDB-CACHE中更新对应的业务标识的计算结果;直到将最后一个业务标识的计算结果更新到MDB-CACHE中后,将以上所有业务标识的计算结果统一提交至计费数据库MDB中。Preferably, when processing a call record containing multiple service identifiers, the call record is no longer split or cloned, but is executed in the form of a list. First, a list XDRLIST is formed in the computing service process according to the order of the service identifiers in the call record. When processing the first service identifier of the call record, the billing database MDB is queried to obtain the billing information. The returned billing information including the user's free resource volume, total traffic volume, and billing rules is cached in the process's cache resource pool MDB-CACHE, and the resource volume and fee (standard batch price) calculated in the process are cached and updated to MDB-CACHE. According to the service identifiers in the list XDRLIST, the calculation results of the corresponding service identifiers are updated in MDB-CACHE; until the calculation result of the last service identifier is updated in MDB-CACHE, the calculation results of all the above service identifiers are uniformly submitted to the billing database MDB.
进一步地,参照图4所示的话单数据处理过程的交互示意图,对于一个包含2个RG业务的话单,在本申请实施例提供的话单处理方法中,只需要与计费数据库交互两次,即首话单时的计费信息查询以及在批价处理完成时,对资费信息的提交,将对批价过程中与计费数据库MDB的交互转化为对缓存信息的查询与更新。而在现有的话单处理方式中,图4中对缓存资源池的查询与更新,均是需要与计费数据库进行交互的过程,因此,基于对计费信息与资费信息的缓存,针对一个包含两个RG业务的话单,可以减少六次与计费数据库MDB的交互。也即,在批价和计费数据库MDB之间增加了一个缓存资源池MDB-Cache,在同样的话单处理场景下,只需要在第1个鉴权包RG1 UT查询时,以及最后一个包RG2 UU更新时,与计费数据库MDB进行交互,中间的6个包都是与缓存资源池MDB-Cache进行的交互,减少了6/8与计费数据库MDB的交互。Further, referring to the interactive diagram of the call data processing process shown in FIG4, for a call containing two RG services, in the call processing method provided in the embodiment of the present application, only two interactions with the billing database are required, namely, the query of billing information at the time of the first call and the submission of tariff information when the batch price processing is completed, and the interaction with the billing database MDB during the batch price process is converted into the query and update of cache information. In the existing call processing method, the query and update of the cache resource pool in FIG4 are both processes that require interaction with the billing database. Therefore, based on the cache of billing information and tariff information, for a call containing two RG services, six interactions with the billing database MDB can be reduced. That is, a cache resource pool MDB-Cache is added between the batch price and the billing database MDB. In the same call record processing scenario, it is only necessary to interact with the billing database MDB when the first authentication package RG1 UT is queried and the last package RG2 UU is updated. The six packages in between are all interactions with the cache resource pool MDB-Cache, reducing the interaction with the billing database MDB by 6/8.
优选地,步骤100中,从预设计费数据库MDB中查询话单数据对应的计费信息,具体包括:Preferably, in step 100, querying the billing information corresponding to the call list data from the pre-designed billing database MDB specifically includes:
步骤101,提取所述话单数据中的用户信息;所述用户信息包括用户标识和业务标识;Step 101, extracting user information from the call bill data; the user information includes a user ID and a service ID;
步骤102,根据所述用户信息从预设的计费数据库中查询所述话单数据对应的计费信息。Step 102: query the billing information corresponding to the call record data from a preset billing database according to the user information.
从话单数据中提取各话单的用户信息,该用户信息包括用户标识和业务标识,根据用户信息从预设的计费数据库MDB中查询话单数据对应的计费信息,即查询各用户标识和业务标识对应的计费信息。The user information of each call sheet is extracted from the call sheet data, and the user information includes a user ID and a service ID. The billing information corresponding to the call sheet data is queried from the preset billing database MDB according to the user information, that is, the billing information corresponding to each user ID and service ID is queried.
进一步地,步骤102中,在根据提取的用户信息从预设计费数据库MDB中查询话单数据对应的计费信息时,还可以包括:Furthermore, in step 102, when querying the billing information corresponding to the call list data from the pre-designed billing database MDB according to the extracted user information, the following may also be included:
步骤1021,根据所述用户信息对所述话单数据中,同一用户对应的话单数据进行合并,以对所述用户信息进行去重;Step 1021, merging the call record data corresponding to the same user in the call record data according to the user information to deduplicate the user information;
步骤1022,基于去重后的用户信息,从预设的计费数据库中查询所述话单数据对应计费信息。Step 1022: Based on the deduplicated user information, query the billing information corresponding to the call record data from a preset billing database.
可知地,同一个用户可以对应一个或多个话单,同一个话单中也可以包含一个或多个业务标识。对于包含多个业务标识的同一个话单,在其被拆分克隆为多个包含单个业务标识的话单时,拆分得到的话单在批价时所需的资料数据、资费数据和资产数据等计费信息,均是相同的。同理地,对于同一用户的不同话单,在批价时所需的计费信息也是相同的。基于此,在查询计费信息时,对于同一个用户对应的多个话单,在进行批价处理时,需要查询的计费信息都是相同的,包含了该用户在不同业务场景下的计费信息。It can be known that the same user may correspond to one or more call bills, and the same call bill may also contain one or more service identifiers. For the same call bill containing multiple service identifiers, when it is split and cloned into multiple call bills containing a single service identifier, the billing information such as data data, tariff data, and asset data required for batch pricing are all the same. Similarly, for different call bills of the same user, the billing information required for batch pricing is also the same. Based on this, when querying the billing information, for multiple call bills corresponding to the same user, the billing information that needs to be queried during batch pricing is the same, including the billing information of the user in different business scenarios.
对于获取的话单数据中,包含同一用户的多个话单的情况下,在查询计费信息时,首先根据提取的用户信息,对话单数据中,同一用户对应的话单数据进行合并,从而对用户信息进行用户去重。基于去重后的用户信息,从预设的计费数据库MDB中查询话单数据中各用户对应的计费信息。在本实施例中,由于同一用户的话单在进行批价时,所需的计费信息相同,因此,对同一用户的话单进行合并进行用户去重,避免在计费数据库MDB中,对同一用户的计费信息重复查询,从而进一步减少数据查询时间,从而减少查询阶段的交互时长。When the acquired call bill data contains multiple call bills of the same user, when querying the billing information, the call bill data corresponding to the same user in the call bill data is first merged based on the extracted user information, thereby deduplicating the user information. Based on the deduplicated user information, the billing information corresponding to each user in the call bill data is queried from the preset billing database MDB. In this embodiment, since the billing information required for the same user's call bills is the same when batch pricing is performed, the call bills of the same user are merged to deduplicate the user, thereby avoiding repeated queries of the billing information of the same user in the billing database MDB, thereby further reducing the data query time and thus reducing the interaction time of the query stage.
进一步地,针对同一个用户的多条话单需要计费批价时,仅对内存数据库发起一次查询请求,交互结果保存在计费业务批价的本地缓存副本中;对每一条话单进行批价产生的需要更新的计费资源和信息,都直接在本地缓存副本中更新缓存;在一次批价结束后,把本地缓存副本中的批价得到的资费信息进行一次同步,统一提交到服务端内存数据库,同时释放本地缓存副本的存储空间。Furthermore, when multiple call records of the same user need to be billed in batches, only one query request is initiated to the in-memory database, and the interaction result is saved in the local cache copy of the billing service batch price; the billing resources and information that need to be updated for each call record batch price are directly updated in the local cache copy; after a batch price is completed, the tariff information obtained by the batch price in the local cache copy is synchronized and submitted to the server-side in-memory database, while releasing the storage space of the local cache copy.
进一步地,步骤300中,将缓存的资费信息提交至计费数据库中,对计费数据库进行更新,还包括:Furthermore, in step 300, the cached tariff information is submitted to the billing database, and the billing database is updated, which also includes:
步骤301,将缓存的所述资费信息提交至所述计费数据库中,根据所述用户信息中的用户标识,对所述资费信息进行划分;Step 301, submitting the cached tariff information to the billing database, and dividing the tariff information according to the user identifier in the user information;
步骤302,基于划分后的同一用户的资费信息,根据所述用户信息中的业务标识对所述计费数据库进行更新。Step 302: Based on the divided tariff information of the same user, the billing database is updated according to the service identifier in the user information.
在将缓存的资费信息提交到计费数据库MDB中,对计费数据库MDB进行更新时,首先根据用户标识对资费信息进行划分,按照不同的用户标识,对不同用户的资费信息进行区分,基于划分后的同一用户的资费信息,根据业务标识进行提交,从而将同一用户在不同业务场景下的资费信息进行更新。When submitting the cached tariff information to the billing database MDB and updating the billing database MDB, the tariff information is first divided according to the user ID, and the tariff information of different users is distinguished according to different user IDs. The tariff information of the same user after the division is submitted according to the business ID, so that the tariff information of the same user in different business scenarios is updated.
可知地,还可以根据业务标识对不同业务场景下的资费信息进行划分,基于划分后的同一业务场景下的资费信息,根据用户标识对该业务场景下不同用户的资费信息进行更新。It can be known that the tariff information in different service scenarios can be divided according to the service identifier, and based on the divided tariff information in the same service scenario, the tariff information of different users in the service scenario can be updated according to the user identifier.
进一步地,步骤300中,将缓存的资费信息提交至计费数据库中,对计费数据库进行更新之后,还可以包括:Furthermore, in step 300, the cached tariff information is submitted to the billing database. After the billing database is updated, the following may also be included:
步骤400,对所述资费信息和所述计费信息进行清除,以释放所述资费信息和所述计费信息在所述缓存资源池中占用的内存空间。Step 400: Clear the tariff information and the billing information to release the memory space occupied by the tariff information and the billing information in the cache resource pool.
对缓存的资费信息和计费信息进行清除,对资费信息和计费信息在缓存资源池中占用的内存空间进行释放。The cached tariff information and billing information are cleared, and the memory space occupied by the tariff information and billing information in the cache resource pool is released.
在本实施例中,基于缓存池,将计费数据库MDB服务端的数据一次查询后缓存在进程中,根据列表中的业务标识、流量、时间等进行计费,达到对话单内容聚合加速处理的效果,该缓存处理方式实现了计费系统快速处理话单、减少与服务端的交互次数。In this embodiment, based on the cache pool, the data of the billing database MDB server is queried once and cached in the process, and billing is performed according to the service identifier, traffic, time, etc. in the list, so as to achieve the effect of aggregating the content of the call sheet and accelerating the processing. This cache processing method enables the billing system to quickly process call sheets and reduce the number of interactions with the server.
进一步地,对于包含多个业务标识的话单,不需要进行话单克隆,而是将计费MDB查询结果和更新记录先保存在缓存资源池中,在对话单数据处理完成后再统一的一次性更新计费数据库MDB,减少话单克隆时对存储读写的消耗,同时,减少读写数据库的次数,降低系统资源的开销,降低主机资源使用。基于缓存策略,可以大大提高对资源的利用率,降低硬件成本,保证在现有的硬件资源条件下,可以满足对日益增加的话单数据的处理需求,实现对话单处理的提质增效。Furthermore, for call sheets containing multiple service identifiers, there is no need to clone the call sheets. Instead, the billing MDB query results and update records are first saved in the cache resource pool. After the call sheet data processing is completed, the billing database MDB is updated uniformly at one time, reducing the consumption of storage reading and writing when cloning the call sheets. At the same time, it reduces the number of database reading and writing, reduces the system resource overhead, and reduces the use of host resources. Based on the cache strategy, the utilization of resources can be greatly improved, the hardware cost can be reduced, and it can be ensured that under the existing hardware resource conditions, the processing requirements for the increasing call sheet data can be met, and the quality and efficiency of call sheet processing can be improved.
下面对本申请实施例提供的话单处理装置进行描述,下文描述的话单处理装置与上文描述的话单处理方法可相互对应参照。The following is a description of a call bill processing device provided in an embodiment of the present application. The call bill processing device described below and the call bill processing method described above can be referenced to each other.
参照图5,本申请实施例提供的话单处理装置,包括:5, the call record processing device provided in the embodiment of the present application includes:
查询模块10,用于获取待处理的话单数据,并从预设计费数据库中查询所述话单数据对应的计费信息;所述计费信息包括计费规则和资源信息;The query module 10 is used to obtain the call data to be processed and query the billing information corresponding to the call data from the pre-designed billing database; the billing information includes billing rules and resource information;
缓存模块20,用于将所述计费信息缓存到预设的缓存资源池中,并基于缓存的计费信息对所述话单数据中的话单逐一进行计费处理,得到所述话单数据中各话单的资费信息并缓存到所述缓存资源池中;A cache module 20, configured to cache the billing information into a preset cache resource pool, and perform billing processing on each of the bills in the bill data based on the cached billing information, obtain the billing information of each bill in the bill data and cache it into the cache resource pool;
更新模块30,用于在对所述话单数据中的话单计费处理完毕后,将缓存的所述资费信息提交至所述计费数据库中,对所述计费数据库进行更新。The updating module 30 is used to submit the cached charging information to the charging database after the billing processing in the bill data is completed, so as to update the charging database.
在一个实施例中,所述缓存模块20,还用于:In one embodiment, the cache module 20 is further used for:
基于所述话单数据中各话单的业务标识,将所述话单数据转化为话单列表;Based on the service identifier of each call record in the call record data, converting the call record data into a call record list;
从所述话单列表中获取目标话单,从缓存的计费信息中获取所述目标话单对应的目标计费信息;Obtain a target call record from the call record list, and obtain target billing information corresponding to the target call record from the cached billing information;
根据所述目标计费信息对所述目标话单进行计费处理,得到所述目标话单的资费信息,将所述目标话单的资费信息缓存到所述缓存资源池中;Performing charging processing on the target call list according to the target charging information to obtain the charging information of the target call list, and caching the charging information of the target call list into the cache resource pool;
若所述目标话单不是所述话单列表中的尾话单,则返回并执行所述从所述话单列表中获取目标话单的步骤,直到所述目标话单是所述话单列表中的尾话单为止。If the target call record is not the last call record in the call record list, return to and execute the step of obtaining the target call record from the call record list until the target call record is the last call record in the call record list.
在一个实施例中,所述目标话单包括多个业务标识时,所述目标计费信息包括各所述业务标识对应的计费子信息;所述缓存模块20,还用于:In one embodiment, when the target call record includes multiple service identifiers, the target billing information includes billing sub-information corresponding to each of the service identifiers; the cache module 20 is further used to:
基于所述目标话单中的各业务标识,获取所述目标话单对应的话单子列表;Based on each service identifier in the target call record, obtaining a call record sub-list corresponding to the target call record;
获取所述话单子列表中的目标业务标识,以及从所述目标计费信息中获取所述目标业务标识对应的计费子信息;所述目标业务标识为所述话单子列表中的任意一个;Obtaining a target service identifier in the call bill sublist, and obtaining the billing sub-information corresponding to the target service identifier from the target billing information; the target service identifier is any one in the call bill sublist;
根据所述计费子信息对所述目标话单中所述目标业务标识对应的目标业务进行计费处理,得到所述目标业务标识对应的资费信息,将所述目标业务标识对应的资费信息缓存到所述缓存资源池中;Performing charging processing on the target service corresponding to the target service identifier in the target call record according to the charging sub-information, obtaining the charging information corresponding to the target service identifier, and caching the charging information corresponding to the target service identifier into the cache resource pool;
返回并执行所述获取所述话单子列表中的目标业务标识的步骤,直到所述目标业务标识为所述话单子列表中的最后一个为止。Return and execute the step of obtaining the target service identifier in the call bill sub-list until the target service identifier is the last one in the call bill sub-list.
在一个实施例中,所述查询模块10,还用于:In one embodiment, the query module 10 is further used to:
提取所述话单数据中的用户信息;所述用户信息包括用户标识和业务标识;Extracting user information from the call list data; the user information includes a user ID and a service ID;
根据所述用户信息从预设的计费数据库中查询所述话单数据对应的计费信息。The billing information corresponding to the call list data is queried from a preset billing database according to the user information.
在一个实施例中,所述查询模块10,还用于:In one embodiment, the query module 10 is further used to:
根据所述用户信息对所述话单数据中,同一用户对应的话单数据进行合并,以对所述用户信息进行去重;Merging the call record data corresponding to the same user in the call record data according to the user information to deduplicate the user information;
基于去重后的用户信息,从预设的计费数据库中查询所述话单数据对应计费信息。Based on the deduplicated user information, the billing information corresponding to the call list data is queried from a preset billing database.
在一个实施例中,所述更新模块30,还用于:In one embodiment, the updating module 30 is further used to:
将缓存的所述资费信息提交至所述计费数据库中,根据所述用户信息中的用户标识,对所述资费信息进行划分;Submitting the cached tariff information to the billing database, and dividing the tariff information according to the user identifier in the user information;
基于划分后的同一用户的资费信息,根据所述用户信息中的业务标识对所述计费数据库进行更新。Based on the divided tariff information of the same user, the billing database is updated according to the service identifier in the user information.
在一个实施例中,所述话单处理装置还包括缓存清理模块,用于:In one embodiment, the call record processing device further includes a cache cleaning module, which is used to:
对所述资费信息和所述计费信息进行清除,以释放所述资费信息和所述计费信息在所述缓存资源池中占用的内存空间。The tariff information and the billing information are cleared to release the memory space occupied by the tariff information and the billing information in the cache resource pool.
图6示例了一种电子设备的实体结构示意图,如图6所示,该电子设备可以包括:处理器(processor)610、通信接口(Communication Interface)620、存储器(memory)630和通信总线640,其中,处理器610,通信接口620,存储器630通过通信总线640完成相互间的通信。处理器610可以调用存储器630中的计算机程序,以执行话单处理方法的步骤,例如包括:FIG6 illustrates a schematic diagram of the physical structure of an electronic device. As shown in FIG6 , the electronic device may include: a processor 610, a communication interface 620, a memory 630, and a communication bus 640, wherein the processor 610, the communication interface 620, and the memory 630 communicate with each other through the communication bus 640. The processor 610 may call a computer program in the memory 630 to execute the steps of the call record processing method, for example, including:
获取待处理的话单数据,并从预设计费数据库中查询所述话单数据对应的计费信息;所述计费信息包括计费规则和资源信息;Acquire the call data to be processed, and query the billing information corresponding to the call data from the pre-designed billing database; the billing information includes billing rules and resource information;
将所述计费信息缓存到预设的缓存资源池中,并基于缓存的计费信息对所述话单数据中的话单逐一进行计费处理,得到所述话单数据中各话单的资费信息并缓存到所述缓存资源池中;The billing information is cached in a preset cache resource pool, and billing is performed on each of the bills in the bill data based on the cached billing information, so as to obtain the billing information of each bill in the bill data and cache it in the cache resource pool;
在对所述话单数据中的话单计费处理完毕后,将缓存的所述资费信息提交至所述计费数据库中,对所述计费数据库进行更新。After the billing process for the bill data is completed, the cached tariff information is submitted to the billing database, and the billing database is updated.
此外,上述的存储器630中的逻辑指令可以通过软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.
另一方面,本申请实施例还提供一种计算机程序产品,所述计算机程序产品包括计算机程序,所述计算机程序可存储在非暂态计算机可读存储介质上,所述计算机程序被处理器执行时,计算机能够执行上述各实施例所提供的话单处理方法的步骤,例如包括:On the other hand, an embodiment of the present application further provides a computer program product, the computer program product including a computer program, the computer program may be stored on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the computer can perform the steps of the call record processing method provided in the above embodiments, for example, including:
获取待处理的话单数据,并从预设计费数据库中查询所述话单数据对应的计费信息;所述计费信息包括计费规则和资源信息;Acquire the call data to be processed, and query the billing information corresponding to the call data from the pre-designed billing database; the billing information includes billing rules and resource information;
将所述计费信息缓存到预设的缓存资源池中,并基于缓存的计费信息对所述话单数据中的话单逐一进行计费处理,得到所述话单数据中各话单的资费信息并缓存到所述缓存资源池中;The billing information is cached in a preset cache resource pool, and billing is performed on each of the bills in the bill data based on the cached billing information, so as to obtain the billing information of each bill in the bill data and cache it in the cache resource pool;
在对所述话单数据中的话单计费处理完毕后,将缓存的所述资费信息提交至所述计费数据库中,对所述计费数据库进行更新。After the billing process for the bill data is completed, the cached tariff information is submitted to the billing database, and the billing database is updated.
另一方面,本申请实施例还提供一种处理器可读存储介质,所述处理器可读存储介质存储有计算机程序,所述计算机程序用于使处理器执行上述各实施例提供的话单处理方法的步骤,例如包括:On the other hand, an embodiment of the present application further provides a processor-readable storage medium, wherein the processor-readable storage medium stores a computer program, wherein the computer program is used to enable the processor to execute the steps of the call record processing method provided in the above embodiments, for example, including:
获取待处理的话单数据,并从预设计费数据库中查询所述话单数据对应的计费信息;所述计费信息包括计费规则和资源信息;Acquire the call data to be processed, and query the billing information corresponding to the call data from the pre-designed billing database; the billing information includes billing rules and resource information;
将所述计费信息缓存到预设的缓存资源池中,并基于缓存的计费信息对所述话单数据中的话单逐一进行计费处理,得到所述话单数据中各话单的资费信息并缓存到所述缓存资源池中;The billing information is cached in a preset cache resource pool, and billing is performed on each of the bills in the bill data based on the cached billing information, so as to obtain the billing information of each bill in the bill data and cache it in the cache resource pool;
在对所述话单数据中的话单计费处理完毕后,将缓存的所述资费信息提交至所述计费数据库中,对所述计费数据库进行更新。After the billing process for the bill data is completed, the cached tariff information is submitted to the billing database, and the billing database is updated.
所述处理器可读存储介质可以是处理器能够存取的任何可用介质或数据存储设备,包括但不限于磁性存储器(例如软盘、硬盘、磁带、磁光盘(MO)等)、光学存储器(例如CD、DVD、BD、HVD等)、以及半导体存储器(例如ROM、EPROM、EEPROM、非易失性存储器(NANDFLASH)、固态硬盘(SSD))等。The processor-readable storage medium can be any available medium or data storage device that can be accessed by the processor, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid-state drive (SSD)), etc.
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM/RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202311234144.9A CN118803623A (en) | 2023-09-22 | 2023-09-22 | Call record processing method, device, equipment and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202311234144.9A CN118803623A (en) | 2023-09-22 | 2023-09-22 | Call record processing method, device, equipment and storage medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN118803623A true CN118803623A (en) | 2024-10-18 |
Family
ID=93028627
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202311234144.9A Pending CN118803623A (en) | 2023-09-22 | 2023-09-22 | Call record processing method, device, equipment and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN118803623A (en) |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20040044601A1 (en) * | 2002-08-01 | 2004-03-04 | Ktfreetel Co., Ltd. | Batch type billing method and system by using dispersed processing |
| CN102143468A (en) * | 2010-09-25 | 2011-08-03 | 华为软件技术有限公司 | Method and system for charging, tariff update and service provision |
| US20110238641A1 (en) * | 2010-03-24 | 2011-09-29 | Matrixx Software, Inc. | System with multiple conditional commit databases |
| CN110662188A (en) * | 2018-06-28 | 2020-01-07 | 中国电信股份有限公司 | Charging method and system |
| WO2021018021A1 (en) * | 2019-07-31 | 2021-02-04 | 华为技术有限公司 | Charging method, charging system, and communication device |
| CN112995934A (en) * | 2019-12-16 | 2021-06-18 | 中国移动通信集团湖南有限公司 | Call bill generating method and device and call bill charging result verifying method and device |
| CN116056018A (en) * | 2021-10-28 | 2023-05-02 | 中国移动通信集团湖南有限公司 | Short message service charging method and device and electronic equipment |
-
2023
- 2023-09-22 CN CN202311234144.9A patent/CN118803623A/en active Pending
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20040044601A1 (en) * | 2002-08-01 | 2004-03-04 | Ktfreetel Co., Ltd. | Batch type billing method and system by using dispersed processing |
| US20110238641A1 (en) * | 2010-03-24 | 2011-09-29 | Matrixx Software, Inc. | System with multiple conditional commit databases |
| CN102143468A (en) * | 2010-09-25 | 2011-08-03 | 华为软件技术有限公司 | Method and system for charging, tariff update and service provision |
| CN110662188A (en) * | 2018-06-28 | 2020-01-07 | 中国电信股份有限公司 | Charging method and system |
| WO2021018021A1 (en) * | 2019-07-31 | 2021-02-04 | 华为技术有限公司 | Charging method, charging system, and communication device |
| CN112995934A (en) * | 2019-12-16 | 2021-06-18 | 中国移动通信集团湖南有限公司 | Call bill generating method and device and call bill charging result verifying method and device |
| CN116056018A (en) * | 2021-10-28 | 2023-05-02 | 中国移动通信集团湖南有限公司 | Short message service charging method and device and electronic equipment |
Non-Patent Citations (2)
| Title |
|---|
| 张灯银, 张小英, 茅苏: "移动电话网联机计费管理系统设计", 南京邮电学院学报(自然科学版), no. 03, 30 September 1997 (1997-09-30) * |
| 文英;成勇;刘晓峰;叶军;: "GPRS按时长计费模块的优化与应用", 电信工程技术与标准化, no. 04, 15 April 2013 (2013-04-15) * |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| TWI694390B (en) | Blockchain-based transaction processing method and device, and electronic equipment | |
| CN108846659B (en) | Block chain-based transfer method and device and storage medium | |
| WO2020207090A1 (en) | Blockchain-based data processing system and method, computing device and storage medium | |
| CN107464151B (en) | Order data processing method and device for high-concurrency service | |
| CN111752944B (en) | Data allocation method, device, computer equipment and storage medium | |
| CN112099934A (en) | Batch processing method, system, computer equipment and storage medium | |
| CN108270581A (en) | Shared resource charge processing method and device | |
| CN111385294B (en) | Data processing method, system, computer device and storage medium | |
| CN112749167A (en) | Method and device for determining broken link data and nonvolatile storage medium | |
| CN113055401A (en) | Enterprise business authorization processing method and device | |
| CN109614263B (en) | Disaster tolerance data processing method, device and system | |
| CN118708584A (en) | A report processing method and device | |
| CN118803623A (en) | Call record processing method, device, equipment and storage medium | |
| CN111754346A (en) | Resource transfer information processing method, device, server and storage medium | |
| CN118586662A (en) | Business processing method, device, storage medium and electronic device | |
| CN109428732B (en) | Method and device for processing bills | |
| CN110321461B (en) | Bill processing method, system, computer device and storage medium | |
| CN116128658A (en) | Blockchain-based data storage insurance method, device, equipment and storage medium | |
| CN118733310A (en) | Abnormal data management method, device, equipment and storage medium for application program | |
| CN115473968B (en) | Call record processing method and device | |
| CN114186267A (en) | A virtual asset data processing method, device and computer-readable storage medium | |
| CN113496386A (en) | Method and device for combined charging | |
| CN114598559B (en) | Data processing method, device, electronic device and computer readable storage medium | |
| CN114625729B (en) | Service data storage method and device, electronic equipment and storage medium | |
| CN118427191A (en) | Database horizontal splitting method, device, equipment, storage medium and product |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |