A card flow query system for interfacing with multiple operators
Patent Information
- Application Number
- CN202311102657.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-29
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2043-08-29
AI Technical Summary
[0004]随着转接系统接入的运营商流量查询服务器数量增加,我们发现这种常规方案存在一个很大的问题:因为转接系统只做简单的数据转发,所以核心系统不但要处理后台的电信卡流量管理业务流程,还要处理对应各家运营商流量查询服务器的数据解析工作、卡流量查询工作和卡流量统计工作;随着转接系统接入的运营商流量查询服务器数量增加,后端核心系统的处理压力会成倍增加,这不但降低了核心系统的运行效率,还对核心系统的稳定性造成不良影响
[0014]本发明实施例提供了一种用于对接多运营商的卡流量查询系统,该系统包括:任务调度模块、流量采集模块、流量统计模块、流量数据库、风险控制模块、查询处理模块和查询请求网关;该系统通过查询请求网关与任一类流量查询应用(前文的核心系统也是一类流量查询应用)连接,并通过流量采集模块与任一运营商的运营商流量查询服务器连接;该系统将原来由核心系统处理的运营商数据解析、卡流量查询和卡流量统计等工作移植到了前端的流量采集模块和流量统计模块中并通过任务调度模块对二者进行任务配置,另外还通过查询处理模块给出了一套统一的卡流量查询指令处理流程,并通过风险控制模块对流量数据库的数据准确度进行监控。本发明系统可以简化流量查询应用侧的查询操作流程,降低流量查询应用侧的处理压力并提高流量查询应用的运行效率和运行稳定性。若将核心系统作为流量查询应用与本发明系统对接,就能有效地降低核心系统的处理压力,并能明显地提高核心系统的运行效率和运行稳定性;另外,本发明系统还能通过自带的风险控制模块对流量数据库的数据准确度进行监控。
Smart Images

Figure CN117149848B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a card traffic query system for connecting to multiple operators. Background Technology
[0002] In IoT applications, service providers deploy a large number of IoT devices at the front end, each pre-installed with a SIM card. These IoT devices use this SIM card to register with the network and establish a connection with the backend application platform via the telecom operator's mobile communication network. Each telecom operator provides its own traffic query server to service providers to handle traffic query requests for the various SIM cards.
[0003] IoT application service providers typically deploy SIM cards from multiple telecom operators. To effectively manage all these SIM cards, they establish a SIM card management system that interfaces with each operator's traffic query server. This system mainly consists of two parts: a front-end that interfaces with each telecom operator's switching system, and a back-end core system that handles SIM card traffic management. Currently, most service providers' switching systems use a simple direct connection solution. In this solution, the switching system only forwards data between each operator's traffic query server and the core system.
[0004] As the number of operator traffic query servers connected to the switching system increases, we have discovered a significant problem with this conventional approach: because the switching system only performs simple data forwarding, the core system not only has to handle the backend telecom card traffic management business processes, but also the data parsing, card traffic querying, and card traffic statistics work for the traffic query servers of various operators. As the number of operator traffic query servers connected to the switching system increases, the processing pressure on the backend core system will increase exponentially. This not only reduces the operating efficiency of the core system, but also adversely affects its stability. Summary of the Invention
[0005] The purpose of this invention is to address the shortcomings of existing technologies by providing a SIM card traffic query system for interfacing with multiple operators. This system includes: a task scheduling module, a traffic acquisition module, a traffic statistics module, a traffic database, a risk control module, a query processing module, and a query request gateway. The system connects to any type of traffic query application (the core system mentioned earlier is also a type of traffic query application) through the query request gateway and to the traffic query server of any operator through the traffic acquisition module. This system migrates the operator data parsing, SIM card traffic query, and SIM card traffic statistics tasks originally handled by the core system to the front-end traffic acquisition and traffic statistics modules, and configures these tasks through the task scheduling module. Furthermore, the query processing module provides a unified SIM card traffic query command processing flow, and the risk control module monitors the accuracy of the traffic database. This invention simplifies the query operation process on the traffic query application side, reduces the processing pressure on the traffic query application side, and improves the operating efficiency and stability of the traffic query application. If the core system is used as a traffic query application and interfacing with this invention, the processing pressure on the core system can be reduced, and the operating efficiency and stability of the core system can be improved.
[0006] To achieve the above objectives, embodiments of the present invention provide a card traffic query system for connecting to multiple operators. The system includes: a task scheduling module, a traffic collection module, a traffic statistics module, a traffic database, a risk control module, a query processing module, and a query request gateway. The task scheduling module is connected to the traffic acquisition module and the traffic statistics module respectively; the task scheduling module is used to plan and generate the corresponding first acquisition task and first statistics task according to the preset acquisition task configuration list at the start time of each natural day; and push the first acquisition task to the traffic acquisition module and the first statistics task to the traffic statistics module. The traffic acquisition module is connected to the traffic statistics module and also to the traffic query server of any external operator. The traffic acquisition module is used to pre-configure traffic query interfaces corresponding to each operator's traffic query server locally. The traffic acquisition module is also used to initiate a task reception wait for the task scheduling module at the start of each natural day, and to stop the task reception wait upon receiving the first acquisition task sent by the task scheduling module. The first acquisition task is stored locally as the latest acquisition task for the day, and operator card traffic data is collected according to the daily acquisition task, and the collected data is sent to the traffic statistics module. The traffic acquisition module is also used to stop data collection at the end of each natural day. The traffic statistics module is connected to the traffic database. The traffic statistics module is used to initiate a statistical task reception wait for the task scheduling module at the start of each natural day, and to stop the statistical task reception wait when it receives the first statistical task sent by the task scheduling module. It also stores the first statistical task locally as the latest statistical task for the day, performs operator card traffic data statistics based on the daily statistical task and the data collected by the traffic acquisition module, and updates the traffic database based on the statistical results. The traffic statistics module is also used to stop data statistics at the end of each natural day. The risk control module is connected to the traffic database; the risk control module is used to periodically check the traffic database for abnormal traffic records and issue early warnings based on the check results. The query request gateway is connected to the query processing module and also to any external traffic query application. The query request gateway is used to receive a first query request sent by the traffic query application; perform compliance verification on the first query request to generate a corresponding first verification result; and when the first verification result is successful, extract the corresponding first keyword record combination from the first query request and send it to the query processing module; and send the first query result sent back by the query processing module back to the traffic query application. The query processing module is connected to the traffic database; the query processing module is used to perform a query operation on the traffic database according to the first keyword record combination to obtain the corresponding first query result and send it back to the query request gateway.
[0007] Preferably, the data collection task configuration list includes multiple first data collection task configuration records; each first data collection task configuration record includes a first data collection object configuration field, a first data collection frequency configuration field, a first data collection flow unit configuration field, a first statistical flow unit configuration field, a first task type configuration field, a first task date configuration field, and a first task status configuration field. The first data collection object configuration field includes multiple first operator data; the first operator data includes a first operator identifier, a first operator processing interface, a first interface type, and a first operator traffic unit; the first interface type includes at least API type, FTP / SFTP type, and Callback type; the first operator traffic unit includes Byte, KB, and MB; the first data collection traffic unit configuration field is a pre-specified one of the three traffic units: Byte, KB, and MB; the first statistical traffic unit configuration field is a pre-specified one of the three traffic units: Byte, KB, and MB; the first task type configuration field includes daily recurring tasks and specified date tasks; the first task type... When the configuration field is a daily recurring task, the corresponding first task date configuration field is empty; when the first task type configuration field is a specified date task, the corresponding first task date configuration field is a preset task execution date; the first task status configuration field includes active and inactive states; the number of first collection task configuration records in the collection task configuration list where the first task type configuration field is a daily recurring task and the first task status configuration field is active is unique; all first collection task configuration records in the collection task configuration list where the first task type configuration field is a specified date task and the first task status configuration field is active have different first task date configuration fields; The first data collection task includes multiple first task records; the first task record includes a first operator identifier field, a first data collection frequency field, a first data collection interface field, a first data collection interface type field, a first operator traffic unit field, a first data collection traffic unit field, and a first traffic conversion factor field; The first collection interface type field includes at least API type, FTP / SFTP type and Callback type; the first operator traffic unit field includes Byte, KB and MB; the first collection traffic unit field is a pre-specified one of the three traffic units of Byte, KB and MB; all the first collection traffic unit fields in the first collection task are the same; the first traffic conversion factor field is the unit conversion ratio from the traffic unit corresponding to the first operator traffic unit field to the traffic unit corresponding to the first collection traffic unit field; The first statistical task includes multiple second task records; the second task record includes a second operator identifier field, a second data collection unit field, a first statistical data collection unit field, and a second data conversion factor field; The second data collection unit field is a pre-specified one of three data collection units: Byte, KB, and MB; all second data collection unit fields in the first statistical task are the same and consistent with the first data collection unit field in the first data collection task; the first statistical data collection unit field is a pre-specified one of three data collection units: Byte, KB, and MB; all first statistical data collection unit fields in the first statistical task are the same; the second data conversion factor field is the unit conversion ratio from the data collection unit field to the data collection unit field. The traffic database is used to store multiple traffic records for first telecom cards; each first telecom card traffic record includes a third operator identifier field, a first year / month field, a first year / month / day field, a first telecom card MSISDN field, a first telecom card ICCID field, a first telecom card daily cumulative traffic field, a first telecom card monthly cumulative traffic field, a first update time field, and a first creation time field; the data format of the first year / month field is YYYYMM, the data format of the first year / month / day field is YYYYMMDD, and the data formats of the first update time field and the first creation time field are YYYYMMDD. hh:mm:ss, YYYY represents the year information expressed by 4 natural numbers with a value range of 0000-9999, MM represents the month information expressed by 2 natural numbers with a value range of 01-12, DD represents the day information expressed by 2 natural numbers with a value range of 01-30 / 31, hh represents the hour information expressed by 2 natural numbers with a value range of 01-24, mm represents the minute information expressed by 2 natural numbers with a value range of 00-59 or 01-60, and ss represents the second information expressed by 2 natural numbers with a value range of 00-59 or 01-60. The first query request includes a first requester IP, a first timestamp, a first version number, and a combination of the first keyword records; the first keyword record combination includes multiple first keyword records; the first keyword record includes a first keyword type field and a first keyword value field; the first keyword type field includes instruction type, MSISDN type, year-month-day type, and year-month type; when the first keyword type field is an instruction type, the corresponding first keyword value field includes daily cumulative traffic query instruction, monthly cumulative traffic query instruction, and daily / monthly cumulative traffic query instruction.
[0008] Preferably, the task scheduling module is specifically used to generate the corresponding first collection task and first statistical task when planning the collection task and statistical task for the day according to the preset collection task configuration list at the start time of each natural day, and to use the date of the current natural day as the corresponding first date; The first collection task configuration record in the collection task configuration list where the first task status configuration field is active, the first task type configuration field is a specified date task, and the first task date configuration field matches the first date is taken as the corresponding first matching record; if the first matching record is empty, the first collection task configuration record in the collection task configuration list where the first task status configuration field is active and the first task type configuration field is a single-day cycle task is taken as the corresponding first matching record. And the first collection frequency configuration field, the first collection flow unit configuration field, and the first statistical flow unit configuration field of the first matching record are used as the corresponding current collection frequency, current collection flow unit, and current statistical flow unit; The system iterates through each of the first operator data in the configuration field of the first collection object of the first matching record; during the iteration, the currently iterated first operator data is taken as the corresponding current operator data, and the first operator identifier, first operator processing interface, first interface type, and first operator traffic unit of the current operator data are taken as the corresponding current operator identifier, current operator processing interface, current interface type, and current operator traffic unit; the system calculates the unit conversion ratio from the current operator traffic unit to the current collection traffic unit to generate the corresponding current operator-collection traffic unit conversion ratio; the system calculates the unit conversion ratio from the current collection traffic unit to the current statistical traffic unit to generate the corresponding current collection-statistical traffic unit conversion ratio; and the system uses the current operator identifier, the current collection frequency, the current operator processing interface, the current interface type, and the current operator traffic unit as the corresponding current operator identifier, current operator processing interface, current interface type, and current operator traffic unit conversion ratio. The first task record is composed of the following: the business traffic unit, the current collected traffic unit, and the current operator-collected traffic unit conversion ratio, which are used as the corresponding first operator identifier field, first collection frequency field, first collection interface field, first collection interface type field, first operator traffic unit field, first collected traffic unit field, and first traffic conversion factor field. Similarly, the second task record is composed of the following: the current operator identifier, the current collected traffic unit, the current statistical traffic unit, and the current collected-statistical traffic unit conversion ratio, which are used as the corresponding second operator identifier field, second collected traffic unit field, first statistical traffic unit field, and second traffic conversion factor field. At the end of the traversal, all the obtained first task records form the corresponding first collection task, and all the obtained second task records form the corresponding first statistical task.
[0009] Preferably, the traffic collection module is specifically used to collect operator card traffic data according to the daily collection task and send the collected data to the traffic statistics module, and to use the locally preset business operation and maintenance provider identifiers as the corresponding first operation and maintenance provider identifiers, and to form a corresponding first operation and maintenance provider identifier set by all the obtained first operation and maintenance provider identifiers. The operator corresponding to the first operator identifier field of each first task record in the daily collection task is recorded as the corresponding first operator, and the first collection frequency field, first collection interface field, and first traffic conversion factor field corresponding to each first operator are extracted as the corresponding first frequency, first interface, and first traffic conversion factor; and the traffic query interface corresponding to the first interface in the local preset is recorded as the corresponding first traffic query interface. For each of the first operators, the system periodically queries the daily data traffic information of all telecom cards purchased by the first operator from the current operator through the corresponding first traffic query interface at the corresponding first frequency to obtain the corresponding first operator query list; and converts the data traffic unit of the first operator query list according to the corresponding first traffic conversion factor to obtain the corresponding first operator collection list; and sends the first operator collection list to the traffic statistics module. The first operator query list includes multiple first operator card query records; the first operator card query record includes a first query operator identifier field, a first query deadline field, a first query card MSISDN field, a first query card ICCID field, and a first query card daily traffic field; all first query deadline fields in the first operator query list are the same; The first operator collection list includes multiple first operator card collection records; the first operator card collection record includes a first operator identifier field, a first collection deadline field, a first collection card MSISDN field, a first collection card ICCID field, and a first collection card daily traffic field; all first collection deadline fields in the first operator collection list are the same; The first operator card collection record corresponds one-to-one with the first operator card query record; the first collection operator identifier field, the first collection deadline field, the first collection card MSISDN field, and the first collection card ICCID field in the first operator card collection record are the same as the corresponding first query operator identifier field, the first query deadline field, the first query card MSISDN field, and the first query card ICCID field in the corresponding first operator card query record; the first collection card daily traffic field in the first operator card collection record is the product of the first query card daily traffic field in the corresponding first operator card query record and the corresponding first traffic conversion factor.
[0010] Preferably, the traffic statistics module is specifically used to, when performing operator card traffic data statistics based on the daily statistics task and the data collected by the traffic collection module, and updating the traffic database based on the statistics results, record the operator corresponding to the second operator identifier field of each second task record in the daily statistics task as the corresponding second operator, extract the second traffic conversion factor field corresponding to each second operator as the corresponding second traffic conversion factor, and initialize a corresponding daily collection list queue for each second operator as the corresponding first operator list queue; And each time the first operator collection list is received from the traffic collection module, it is added to the corresponding first operator list queue; Following the first-in-first-out principle, the earliest first operator collection list in each first operator list queue is taken as the corresponding second operator collection list. The system iterates through the first operator card collection records in each of the second operator collection lists; during the iteration, the currently iterated first operator card collection record is taken as the corresponding current collection record, and the first collection operator identifier field, the first collection deadline field, the first collection card MSISDN field, the first collection card ICCID field, and the first collection card daily traffic field of the current collection record are extracted as the corresponding current operator identifier, current update time, current MSISDN, current ICCID, and current daily cumulative traffic. The product of the current day's cumulative traffic and the second traffic conversion factor is taken as the new current day's cumulative traffic; the year and month information corresponding to the current day is taken as the corresponding current year and month, the year, month and day information corresponding to the current day is taken as the corresponding current year, month and day, and the day before the current year, month and day is taken as the corresponding previous year, month and day; The traffic database is queried, and the traffic records of the first telecom card that match the third operator identifier field with the current operator identifier, the first year and month field with the current year and month, the first year, month and day field with the current year, month and day, the first telecom card MSISDN field with the current MSISDN, and the first telecom card ICCID field with the current ICCID are taken as the corresponding current matching records. And it identifies whether the currently matched record is empty; If the current matching record is empty, then the first telecom card traffic record in the traffic database that matches the third operator identifier field with the current operator identifier, the first year and month field with the current year and month, the first year, month, and day field with the previous year, month, and day, the first telecom card MSISDN field with the current MSISDN, and the first telecom card ICCID field with the current ICCID is taken as the corresponding previous day matching record. The system then checks whether the previous day matching record is empty. If it is, the corresponding current month's cumulative traffic is set to the corresponding current day's cumulative traffic; otherwise, the corresponding current month's cumulative traffic is set to the first telecom card's current month's cumulative traffic field and the current day's cumulative traffic field in the previous day's matching record. The traffic is summed, and the corresponding current creation time is set to the corresponding current update time. The current operator identifier, the current year and month, the current year, month and day, the current MSISDN, the current ICCID, the current daily cumulative traffic, the current monthly cumulative traffic, the current update time, and the current creation time are used as the corresponding third operator identifier field, the first year and month field, the first year, month and day field, the first telecom card MSISDN field, the first telecom card ICCID field, the first telecom card daily cumulative traffic field, the first telecom card monthly cumulative traffic field, the first update time field, and the first creation time field to form a corresponding first telecom card traffic record and add it to the traffic database. If the current matching record is not empty, then the daily cumulative traffic field and the monthly cumulative traffic field of the first telecom card in the current matching record are extracted as the corresponding previous daily cumulative traffic and previous monthly cumulative traffic. The difference between the current daily cumulative traffic and the previous daily cumulative traffic is taken as the corresponding current new traffic. The sum of the previous monthly cumulative traffic and the current new traffic is taken as the corresponding current monthly cumulative traffic. The daily cumulative traffic field, the monthly cumulative traffic field and the first update time field of the current matching record are updated to the corresponding current daily cumulative traffic, current monthly cumulative traffic and current update time. And when the traversal ends, the second operator's collection list that is currently being traversed is removed from the corresponding first operator's list queue.
[0011] Preferably, the risk control module is specifically used to periodically generate a corresponding first telecommunications card information list by statistically analyzing all telecommunications card information stored in the traffic database when periodically checking abnormal traffic records in the traffic database and issuing warnings based on the check results; the first telecommunications card information list includes multiple first telecommunications card information records; the first telecommunications card information record includes a first MSISDN information field, a first ICCCID information field, and a first operator identification information field; The system iterates through the first telecom card information records in the first telecom card information list. During the iteration, the currently iterated first telecom card information record is taken as the corresponding current information record, and the first MSISDN information field, the first ICCCID information field, and the first operator identifier information field of the current information record are extracted as the corresponding current MSISDN, current ICCCID, and current operator identifier. All first telecom card traffic records in the traffic database that match the third operator identifier field with the current operator identifier, the first telecom card MSISDN field with the current MSISDN, and the first telecom card ICCID field with the current ICCCID are extracted to form a corresponding first record set. The first telecom card monthly cumulative traffic field of each first telecom card traffic record in the first record set is extracted as the corresponding first daily monthly cumulative traffic. All the obtained first daily monthly cumulative traffic are sorted according to the time order of the corresponding first update time field to form a corresponding first traffic sequence. The first traffic sequence is then divided into multiple first monthly traffic sequences in monthly units. The system sequentially polls the cumulative daily traffic of the first single day from the second to the second to last in each first monthly traffic sequence. During polling, the current cumulative daily traffic is taken as the current traffic, the preceding and following cumulative daily traffic are taken as the preceding and following traffic, the difference between the current traffic and the preceding traffic is taken as the preceding traffic difference, and the difference between the following traffic and the current traffic is taken as the following traffic difference. When the preceding traffic difference is less than 0 or the following traffic difference is less than 0, the cumulative daily traffic of the current traffic is marked as abnormal traffic. At the end of the polling, the first telecom card traffic records corresponding to all the abnormal traffic are combined to form a corresponding abnormal traffic record set. When the abnormal traffic record set is not empty, the current information record and the abnormal traffic record set are combined to form a corresponding first telecom card abnormal traffic record report. At the end of the traversal, the corresponding first check result is composed of all the abnormal traffic record reports of the first telecom card obtained; And when the first check result is not empty, the first check result is processed by sending a warning report through the local preset warning report sending interface.
[0012] Preferably, the query request gateway is specifically used to extract the corresponding first requester IP, first timestamp, and first version number from the first query request when performing compliance verification on the first query request to generate the corresponding first verification result; It also checks whether there is an authorized access IP address matching the IP of the first requester in the locally preset IP whitelist. If it is confirmed that there is an authorized access IP address, the corresponding first check result is set to "check passed"; if it is confirmed that there is no authorized access IP address, the corresponding first check result is set to "check failed". The IP whitelist includes multiple authorized access IP addresses. When the first check result is "check passed", the system identifies whether the time difference between the current time and the first timestamp exceeds a preset time difference threshold. If it does not exceed the threshold, the corresponding second check result is set to "check passed"; if it exceeds the threshold, the corresponding second check result is set to "check failed". When the second check result is "check passed", it is confirmed whether there is an available version number in the local preset list of available version numbers that matches the first version number. If it is confirmed that there is, the corresponding third check result is set to "check passed"; if it is confirmed that there is no, the corresponding third check result is set to "check failed". The list of available version numbers includes multiple available version numbers. The system identifies whether the third inspection result is a successful inspection. If it is, the corresponding first inspection result is set to successful inspection; otherwise, the corresponding first inspection result is set to failed inspection.
[0013] Preferably, the query processing module is specifically used to extract the first keyword value field of the first keyword record in the first keyword record combination whose first keyword type field is MSISDN as the corresponding current MSISDN when the first query result is obtained by querying the traffic database according to the first keyword record combination and sending it back to the query request gateway; and to extract the first keyword value field of the first keyword record in the first keyword record combination whose first keyword type field is instruction type as the corresponding current query instruction. When the current query instruction is a daily cumulative traffic query instruction, the first keyword value field of the first keyword record in the first keyword record combination with the first keyword type field of year, month and day is extracted as the corresponding current year, month and day. The first cumulative traffic field of the first telecom card in the traffic database that matches the current year, month and day field and the first telecom card MSISDN field matches the current MSISDN is extracted as the corresponding first query result and sent back to the query request gateway. When the current query instruction is a monthly cumulative traffic query instruction, the first keyword value field of the first keyword record in the first keyword record combination with the first keyword type field of year and month is extracted as the corresponding current year and month. The first cumulative traffic field of the first telecom card in the current month of the first telecom card traffic record in the traffic database that matches the current year and month, matches the current telecom card MSISDN field, and has the first update time field closest to the current time is extracted as the corresponding first query result and sent back to the query request gateway. When the current query instruction is a daily / monthly cumulative traffic query instruction, the first keyword value field of the first keyword record in the first keyword record combination with the first keyword type field of year, month, and day is extracted as the corresponding current year, month, and day. The first cumulative traffic field of the first telecom card and the first cumulative traffic field of the first telecom card in the traffic database that match the current year, month, and day and the first telecom card MSISDN field match the current MSISDN are extracted to form the corresponding first query result and sent back to the query request gateway.
[0014] This invention provides a SIM card traffic query system for interfacing with multiple operators. The system includes a task scheduling module, a traffic acquisition module, a traffic statistics module, a traffic database, a risk control module, a query processing module, and a query request gateway. The system connects to any type of traffic query application (the core system described above is also a traffic query application) through the query request gateway and to any operator's traffic query server through the traffic acquisition module. The system migrates the operator data parsing, SIM card traffic query, and SIM card traffic statistics tasks originally handled by the core system to the front-end traffic acquisition and traffic statistics modules, configuring tasks for both through the task scheduling module. Furthermore, the query processing module provides a unified SIM card traffic query instruction processing flow, and the risk control module monitors the data accuracy of the traffic database. This invention simplifies the query operation process on the traffic query application side, reduces the processing pressure on the traffic query application side, and improves the operating efficiency and stability of the traffic query application. If the core system is used as a traffic query application and interfacing with this invention, the processing pressure on the core system can be effectively reduced, and the operating efficiency and stability of the core system can be significantly improved. In addition, this invention can also monitor the data accuracy of the traffic database through its built-in risk control module. Attached Figure Description
[0015] Figure 1This is a schematic diagram of a card traffic query system for connecting to multiple operators, provided as an embodiment of the present invention. Detailed Implementation
[0016] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0017] Figure 1 This is a schematic diagram of a SIM card traffic query system for interfacing with multiple carriers, provided by an embodiment of the present invention. Figure 1 As shown, the card service processing system 1 includes: a task scheduling module 11, a traffic acquisition module 12, a traffic statistics module 13, a traffic database 14, a risk control module 15, a query processing module 16, and a query request gateway 17.
[0018] The task scheduling module 11 is connected to the traffic acquisition module 12 and the traffic statistics module 13 respectively; the traffic acquisition module 12 is connected to the traffic statistics module 13 and also to the traffic query server 2 of any external operator; the traffic statistics module 13 is connected to the traffic database 14; the risk control module 15 is connected to the traffic database 14; the query request gateway 17 is connected to the query processing module 16 and also to any external traffic query application 3; the query processing module 16 is connected to the traffic database 14.
[0019] Here, each module within the system can be a local / remote microservice port, server, system, or cloud platform; the operator traffic query server 2 can be a remote microservice port, server, system, or cloud platform; the traffic query application 3 can be a remote microservice port, server, system, or cloud platform, and the core system mentioned above is a type of traffic query application 3. In this embodiment of the invention, the system and any type of traffic query application 3 transmit data using a pre-agreed unified data format.
[0020] (a) Task scheduling module 11 The task scheduling module 11 is used to plan and generate the corresponding first collection task and first statistics task according to the preset collection task configuration list at the start time of each natural day; and push the first collection task to the traffic collection module 12 and the first statistics task to the traffic statistics module 13.
[0021] Here, the task scheduling module 11 of this embodiment of the invention is the task scheduler of the traffic acquisition module 12 and the traffic statistics module 13. At the start time of each natural day (default is 00:00 every day), it will plan the tasks of the two modules based on the acquisition task configuration list stored locally by the administrator in the task scheduling module 11 and push the planned tasks, namely the first acquisition task and the first statistics task, to the two modules.
[0022] The following section describes the data content of the data collection task configuration list.
[0023] The data collection task configuration list includes multiple first data collection task configuration records; each first data collection task configuration record includes a first data collection object configuration field, a first data collection frequency configuration field, a first data collection flow unit configuration field, a first statistical flow unit configuration field, a first task type configuration field, a first task date configuration field, and a first task status configuration field. The first data collection object configuration field includes multiple first operator data; the first operator data includes the first operator identifier, the first operator processing interface, the first interface type, and the first operator traffic unit; each first operator data corresponds to one telecom operator; the first operator identifier is the unique identifier code of the corresponding operator; the first operator processing interface is the processing interface corresponding to the operator traffic query server 2 opened by the corresponding operator; because the query access methods provided by each operator's traffic query server 2 are different, the common ones are API type, FTP / SFTP type, and Callback type, so the first interface type corresponding to the first operator processing interface must also at least include API type, FTP / SFTP type, and Callback type; the first operator traffic unit is the traffic unit of the query results given by the corresponding operator, commonly bytes (Byte) and kilobytes (Kilobyte). The three traffic units are Byte (KB), KB (Mbyte), and MB (MB). Therefore, the first operator traffic unit includes Byte, KB, and MB. The first collection traffic unit configuration field is the unit of the traffic data output by the traffic collection module 12. The first collection traffic unit configuration field is one of the three traffic units of Byte, KB, and MB, and is normally set to KB by default. The first statistical traffic unit configuration field is the unit of the traffic data output by the traffic statistics module 13. The first statistical traffic unit configuration field is one of the three traffic units of Byte, KB, and MB, and is normally set to KB by default. The first task type configuration field includes daily recurring tasks and specified date tasks; when the first task type configuration field is a daily recurring task, the corresponding first task date configuration field is empty; when the first task type configuration field is a specified date task, the corresponding first task date configuration field is a preset task execution date; the first task status configuration field includes active status and inactive status. It should be noted that the number of first collection task configuration records in the collection task configuration list that have the first task type configuration field set to "single-day recurring task" and the first task status configuration field set to "active" is unique; and the first task date configuration fields of all first collection task configuration records in the collection task configuration list that have the first task type configuration field set to "specified date task" and the first task status configuration field set to "active" are different.
[0024] In one specific implementation of this invention, the task scheduling module 11 is specifically used to generate the corresponding first collection task and first statistical task according to the preset collection task configuration list at the start time of each natural day: Step A1: Use the current calendar day as the corresponding first date; Step A2, and take the first collection task configuration record in the collection task configuration list where the first task status configuration field is active, the first task type configuration field is specified date task, and the first task date configuration field matches the first date as the corresponding first matching record; if the first matching record is empty, take the first collection task configuration record in the collection task configuration list where the first task status configuration field is active and the first task type configuration field is single-day cycle task as the corresponding first matching record; Step A3, and use the first collection frequency configuration field, the first collection flow unit configuration field, and the first statistical flow unit configuration field of the first matching record as the corresponding current collection frequency, current collection flow unit, and current statistical flow unit; Step A4 involves iterating through the first operator data in the configuration field of the first collection object of the first matching record; during iteration, the currently iterated first operator data is used as the corresponding current operator data, and the first operator identifier, first operator processing interface, first interface type, and first operator traffic unit of the current operator data are used as the corresponding current operator identifier, current operator processing interface, current interface type, and current operator traffic unit; the unit conversion ratio from the current operator traffic unit to the current collection traffic unit is calculated to generate the corresponding current operator-collection traffic unit conversion ratio; the unit conversion ratio from the current collection traffic unit to the current statistical traffic unit is calculated to generate the corresponding current collection-statistical traffic unit conversion ratio; and the current operator identifier, current collection frequency, current operator processing interface, and current interface type are used as the unit conversion ratio. The interface type, current operator traffic unit, current collected traffic unit, and current operator-collected traffic unit conversion ratio are used as the corresponding first operator identifier field, first collection frequency field, first collection interface field, first collection interface type field, first operator traffic unit field, first collected traffic unit field, and first traffic conversion factor field to form a corresponding first task record; and the current operator identifier, current collected traffic unit, current statistical traffic unit, and current collected-statistical traffic unit conversion ratio are used as the corresponding second operator identifier field, second collected traffic unit field, first statistical traffic unit field, and second traffic conversion factor field to form a corresponding second task record; and at the end of the traversal, all the obtained first task records form the corresponding first collection task, and all the obtained second task records form the corresponding first statistical task.
[0025] From the planning and processing procedures of the first data collection task and the first statistical task described above, we can see that: The first data collection task includes multiple first task records; the first task record includes a first operator identifier field, a first data collection frequency field, a first data collection interface field, a first data collection interface type field, a first operator traffic unit field, a first data collection traffic unit field, and a first traffic conversion factor field; The first collection interface type field includes at least API type, FTP / SFTP type and Callback type; the first operator traffic unit field includes Byte, KB and MB; the first collection traffic unit field is a pre-specified one of the three traffic units of Byte, KB and MB; all first collection traffic unit fields in the first collection task are the same; the first traffic conversion factor field is the unit conversion ratio from the traffic unit corresponding to the first operator traffic unit field to the traffic unit corresponding to the first collection traffic unit field; The first statistical task includes multiple second task records; the second task record includes a second operator identifier field, a second collected traffic unit field, a first statistical traffic unit field, and a second traffic conversion factor field. The second data collection unit field is a pre-specified one of the three data collection units: Byte, KB, and MB. All second data collection unit fields in the first statistical task are the same and consistent with the first data collection unit field of the first data collection task. The first statistical data collection unit field is a pre-specified one of the three data collection units: Byte, KB, and MB. All first statistical data collection unit fields in the first statistical task are the same. The second data conversion factor field is the unit conversion ratio from the data collection unit field to the data collection unit field.
[0026] (ii) Traffic Acquisition Module 12 The traffic acquisition module 12 is used to pre-configure traffic query interfaces for each operator's traffic query server 2 locally.
[0027] Here, the traffic acquisition module 12 has pre-set traffic query interfaces that are used to interact with the corresponding operator traffic query server 2 and process the corresponding operator data parsing and card traffic query work.
[0028] The traffic acquisition module 12 is also used to start waiting for the acquisition task to be received by the task scheduling module 11 at the beginning of each natural day, and stop waiting for the acquisition task to be received when the first acquisition task sent by the task scheduling module 11 is received. The first acquisition task is stored locally as the latest acquisition task of the day, and the operator card traffic data is collected according to the acquisition task of the day and the collected data is sent to the traffic statistics module 13.
[0029] In another specific implementation of this invention, the traffic acquisition module 12 is specifically used to collect operator card traffic data according to the daily collection task and send the collected data to the traffic statistics module 13: Step B1: Use the local pre-set service operator identifiers as the corresponding first operator identifiers, and form a set of first operator identifiers from all the obtained first operator identifiers. Step B2, and record the operator corresponding to the first operator identifier field of each first task record in the daily collection task as the corresponding first operator, and extract the first collection frequency field, first collection interface field, and first traffic conversion factor field corresponding to each first operator as the corresponding first frequency, first interface, and first traffic conversion factor; and record the local preset traffic query interface corresponding to the first interface as the corresponding first traffic query interface; Step B3 involves periodically querying the daily data traffic information of all telecom cards purchased by the first operator at the current operator through the corresponding first traffic query interface at the corresponding first frequency to obtain the corresponding first operator query list; converting the data traffic unit of the first operator query list according to the corresponding first traffic conversion factor to obtain the corresponding first operator collection list; and sending the first operator collection list to the traffic statistics module 13. The first operator query list includes multiple first operator card query records; the first operator card query record includes the first query operator identifier field, the first query deadline field, the first query card MSISDN field, the first query card ICCID field, and the first query card daily traffic field; all first query deadline fields in the first operator query list are the same; Here, MSISDN (Mobile Station International Subscriber Directory Number) is the international mobile number, commonly known as a mobile phone number; ICCID (Integrated circuit card identity) is the integrated circuit card identification code, and each telecom card has a corresponding unique ICCID. The first operator's data collection list includes multiple data collection records for first operator SIM cards; each first operator SIM card data collection record includes a first operator identifier field, a first data collection deadline field, a first data collection SIM card MSISDN field, a first data collection SIM card ICCID field, and a first data collection SIM card daily data usage field; all first data collection deadline fields in the first operator's data collection list are identical; The first operator card collection record and the first operator card query record correspond one-to-one; the first collecting operator identifier field, the first collecting deadline field, the first collecting card MSISDN field, and the first collecting card ICCID field in the first operator card collection record are the same as the corresponding first query operator identifier field, the first query deadline field, the first query card MSISDN field, and the first query card ICCID field in the corresponding first operator card query record; the first collecting card daily traffic field in the first operator card collection record is the product of the first query card daily traffic field in the corresponding first operator card query record and the corresponding first traffic conversion factor.
[0030] The traffic acquisition module 12 is also used to stop data acquisition at the end of each natural day.
[0031] Here, the end time of each natural day is set to 23:59:59 by default.
[0032] (III) Traffic Statistics Module 13 The traffic statistics module 13 is used to start waiting for the statistical task to be received by the task scheduling module 11 at the beginning of each natural day, and to stop waiting for the statistical task to be received when the first statistical task sent by the task scheduling module 11 is received. The first statistical task is stored locally as the latest statistical task of the day, and the operator card traffic data is statistically analyzed according to the statistical task of the day and the data collected by the traffic acquisition module 12, and the traffic database 14 is updated according to the statistical results.
[0033] In another specific implementation of this invention, the traffic statistics module 13 is specifically used to perform operator card traffic data statistics based on the daily statistics task and the data collected by the traffic collection module 12, and to update the traffic database 14 based on the statistics results: Step C1: Record the operator corresponding to the second operator identifier field of each second task record in the daily statistics task as the corresponding second operator, extract the second traffic conversion factor field corresponding to each second operator as the corresponding second traffic conversion factor, and initialize a corresponding daily collection list queue for each second operator as the corresponding first operator list queue. Step C2, and each time a first operator collection list is received from a traffic collection module 12, it is added to the corresponding first operator list queue; Step C3, and according to the first-in-first-out principle, take the earliest first operator collection list in each first operator list queue as the corresponding second operator collection list; Step C4, and iterate through the first operator card collection records of each second operator collection list; During the traversal, the first operator card collection record currently being traversed is taken as the corresponding current collection record. The first operator identifier field, first collection deadline field, first collection card MSISDN field, first collection card ICCID field, and first collection card daily traffic field of the current collection record are extracted and used as the corresponding current operator identifier, current update time, current MSISDN, current ICCID, and current daily cumulative traffic. The product of the current daily cumulative traffic and the second traffic conversion factor is taken as the new current daily cumulative traffic. The corresponding year and month information for the current day is used as the corresponding current year and month. The date information is used as the corresponding current year, month, and day, and the day before the current year, month, and day is used as the corresponding previous year, month, and day; the traffic database 14 is queried, and the traffic records of the first telecom card that match the current operator identifier field, the current year and month field, the current year, month, and day field, the current telecom card MSISDN field, and the current telecom card ICCID field in the traffic database 14 are used as the corresponding current matching records; and the system identifies whether the current matching record is empty; 1) If the current matching record is empty, then the traffic records of the third operator identifier field in the traffic database 14 are used as the corresponding current matching records. The first telecom card traffic record that matches the current operator identifier, the current year and month, the previous year, month, and day, the current MSISDN, and the current ICCID fields of the first telecom card are used as the corresponding previous day's matching record. The system checks if the previous day's matching record is empty; if so, it sets the corresponding current month's cumulative traffic to the corresponding current day's cumulative traffic; otherwise, it sets the corresponding current month's cumulative traffic to the sum of the previous day's cumulative traffic and the current day's cumulative traffic in the first telecom card's current month's cumulative traffic field of the previous day's matching record. Set the corresponding current creation time to the corresponding current update time, and use the current operator identifier, current year and month, current year and month and day, current MSISDN, current ICCID, current daily cumulative traffic, current monthly cumulative traffic, current update time and current creation time as the corresponding third operator identifier field, first year and month field, first year and month and day field, first telecom card MSISDN field, first telecom card ICCID field, first telecom card daily cumulative traffic field, first telecom card monthly cumulative traffic field, first update time field and first creation time field to form a corresponding first telecom card traffic record and add it to the traffic database 14;2) If the current matching record is not empty, extract the first telecom card's daily cumulative traffic field and the first telecom card's monthly cumulative traffic field from the current matching record as the corresponding previous day's cumulative traffic and previous month's cumulative traffic. Subtract the previous day's cumulative traffic from the current day's cumulative traffic as the corresponding current new traffic. Add the previous month's cumulative traffic and the current new traffic as the corresponding current month's cumulative traffic. Update the first telecom card's daily cumulative traffic field, the first telecom card's monthly cumulative traffic field, and the first update time field of the current matching record to the corresponding current day's cumulative traffic, current month's cumulative traffic, and current update time. And at the end of the traversal, the collection list of the second operator that is currently being traversed is removed from the corresponding queue of the first operator list.
[0034] The traffic statistics module 13 is also used to stop data statistics at the end of each natural day.
[0035] (iv) Traffic Database 14 Traffic database 14 is used to store multiple traffic records of the first telecom card; The first telecom card traffic record includes the third operator identifier field, the first year and month field, the first year, month and day field, the first telecom card MSISDN field, the first telecom card ICCID field, the first telecom card daily cumulative traffic field, the first telecom card monthly cumulative traffic field, the first update time field, and the first creation time field. The data format for the first year / month field is YYYYMM, the data format for the first year / month / day field is YYYYMMDD, and the data format for the first update time field and the first creation time field is YYYYMMDD hh:mm:ss. YYYY represents the year information expressed by four natural numbers, ranging from 0000 to 9999. MM represents the month information expressed by two natural numbers, ranging from 01 to 12. DD represents the day information expressed by two natural numbers, ranging from 01 to 30 / 31. hh represents the hour information expressed by two natural numbers, ranging from 01 to 24. mm represents the minute information expressed by two natural numbers, ranging from 00 to 59 or 01 to 60. ss represents the second information expressed by two natural numbers, ranging from 00 to 59 or 01 to 60.
[0036] (v) Risk Control Module 15 The risk control module 15 is used to periodically check the traffic database 14 for abnormal traffic records and issue early warnings based on the check results.
[0037] Here, the system of this embodiment of the invention provides a processing flow for monitoring the accuracy of data in the traffic database 14 through the risk control module 15.
[0038] In another specific implementation of this invention, the risk control module 15 is specifically used to periodically check the traffic database 14 for abnormal traffic records and issue warnings based on the check results: Step D1: Periodically collect statistics on all telecom card information stored in traffic database 14 to generate the corresponding first telecom card information list; The first telecommunications card information list includes multiple first telecommunications card information records; the first telecommunications card information record includes a first MSISDN information field, a first ICCCID information field, and a first operator identification information field; Step D2, and iterate through the first telecommunications card information records in the first telecommunications card information list; During the traversal, the first telecom card information record currently being traversed is taken as the corresponding current information record, and the first MSISDN information field, first ICCCID information field, and first operator identification field of the current information record are extracted as the corresponding current MSISDN, current ICCCID, and current operator identification. All first telecom card traffic records in the traffic database 14 that match the current operator identification field, the current telecom card MSISDN field, and the current telecom card ICCID field are extracted to form the corresponding first record set. The first telecom card monthly cumulative traffic field of each first telecom card traffic record in the first record set is extracted as the corresponding first single-day / monthly cumulative traffic. All the obtained first single-day / monthly cumulative traffic are sorted according to the time order of the corresponding first update time field to form the corresponding first traffic sequence. The first traffic sequence is then divided into multiple first monthly traffic sequences by month. The system sequentially polls the cumulative monthly traffic of the second to second-to-last single day in each monthly traffic sequence. During polling, the current cumulative monthly traffic of the single day is used as the current traffic, the previous and next cumulative monthly traffic of the single day are used as the previous and next traffic, the difference between the current traffic and the previous traffic is used as the previous traffic difference, and the difference between the next traffic and the current traffic is used as the next traffic difference. If the previous traffic difference is less than 0 or the next traffic difference is less than 0, the cumulative monthly traffic of the single day corresponding to the current traffic is marked as abnormal traffic. At the end of the polling, the first telecom card traffic records corresponding to all abnormal traffic are combined to form a corresponding abnormal traffic record set. If the abnormal traffic record set is not empty, the current information record and the abnormal traffic record set are combined to form a corresponding first telecom card abnormal traffic record report. At the end of the traversal, the corresponding first check result is composed of all the abnormal traffic record reports of the first telecom card obtained; Step D3, and when the first check result is not empty, send the warning report to the first check result through the local preset warning report sending interface.
[0039] (vi) Query request gateway 17 The query request gateway 17 is used to receive the first query request sent by the traffic query application 3; and to perform compliance verification on the first query request to generate the corresponding first verification result; and when the first verification result is successful, to extract the corresponding first keyword record combination from the first query request and send it to the query processing module 16; and to send the first query result sent back by the query processing module 16 back to the traffic query application 3. The first query request includes a combination of the first requester's IP, the first timestamp, the first version number, and the first keyword record; the first keyword record combination includes multiple first keyword records; the first keyword record includes a first keyword type field and a first keyword value field; the first keyword type field includes instruction type, MSISDN type, year-month-day type, and year-month type; when the first keyword type field is an instruction type, the corresponding first keyword value field includes daily cumulative traffic query instruction, monthly cumulative traffic query instruction, and daily / monthly cumulative traffic query instruction.
[0040] In another specific implementation of this invention, the query request gateway 17 is specifically used to generate a corresponding first verification result when performing compliance verification on the first query request: Step E1: Extract the corresponding first requester IP, first timestamp, and first version number from the first query request; Step E2, and confirm whether there is an authorized access IP address matching the IP of the first requester in the local preset IP whitelist. If it is confirmed that there is an authorized access IP address, set the corresponding first check result to check passed; if it is confirmed that there is no authorized access IP address, set the corresponding first check result to check failed. The IP whitelist includes multiple authorized access IP addresses; Step E3: When the first check result is "check passed", identify whether the time difference between the current time and the first timestamp exceeds the preset time difference threshold. If it does not exceed the threshold, set the corresponding second check result as "check passed"; if it exceeds the threshold, set the corresponding second check result as "check failed". Here, the time difference threshold is a preset time difference parameter, for example, the time difference threshold is preset to 3 seconds; Step E4: When the second check result is "check passed", check whether there is an available version number that matches the first version number in the local preset list of available version numbers. If it is confirmed that there is, set the corresponding third check result to "check passed"; if it is confirmed that there is no, set the corresponding third check result to "check failed". The list of available version numbers includes multiple available version numbers; Step E5 involves identifying whether the third check result is "check passed". If it is, the corresponding first check result is set to "check successful"; otherwise, the corresponding first check result is set to "check failed".
[0041] (vii) Query Processing Module 16 The query processing module 16 is used to perform a query operation on the traffic database 14 based on the first key record combination, obtain the corresponding first query result, and send it back to the query request gateway 17.
[0042] Here, the system of this embodiment of the invention provides a unified card traffic query instruction processing flow through the query processing module 16.
[0043] In another specific implementation of this invention, the query processing module 16 is specifically used to send back the corresponding first query result to the query request gateway 17 when performing a query operation on the traffic database 14 based on the first keyword record combination: Step F1: Extract the first key value field of the first key record in the first key record combination whose first key type field is MSISDN as the corresponding current MSISDN; and extract the first key value field of the first key record in the first key record combination whose first key type field is instruction type as the corresponding current query instruction. Step F2, and when the current query instruction is a daily cumulative traffic query instruction, extract the first keyword value field of the first keyword record with the first keyword type field of year-month-day in the first keyword record combination as the corresponding current year-month-day, and extract the first telecom card daily cumulative traffic field of the first telecom card traffic record in the traffic database 14 that matches the current year-month-day and the first telecom card MSISDN field that matches the current MSISDN as the corresponding first query result and send it back to the query request gateway 17; Step F3, when the current query instruction is a monthly cumulative traffic query instruction, extract the first key value field of the first key record in the first key record combination whose first key type field is year and month type as the corresponding current year and month, and extract the first telecom card monthly cumulative traffic field of the first telecom card traffic record in the traffic database 14 whose first year and month field matches the current year and month, whose first telecom card MSISDN field matches the current MSISDN, and whose first update time field is closest to the current time as the corresponding first query result and send it back to the query request gateway 17; Step F4: When the current query instruction is a daily / monthly cumulative traffic query instruction, extract the first keyword value field of the first keyword record with the first keyword type field of year, month, and day in the first keyword record combination as the corresponding current year, month, and day. Extract the first telecom card daily cumulative traffic field and the first telecom card monthly cumulative traffic field of the first telecom card traffic record in the traffic database 14 that match the current year, month, and day field and match the current telecom card MSISDN field with the current MSISDN to form the corresponding first query result and send it back to the query request gateway 17.
[0044] This invention provides a SIM card traffic query system for interfacing with multiple operators. The system includes a task scheduling module, a traffic acquisition module, a traffic statistics module, a traffic database, a risk control module, a query processing module, and a query request gateway. The system connects to any type of traffic query application (the core system described above is also a traffic query application) through the query request gateway and to any operator's traffic query server through the traffic acquisition module. The system migrates the operator data parsing, SIM card traffic query, and SIM card traffic statistics tasks originally handled by the core system to the front-end traffic acquisition and traffic statistics modules, configuring tasks for both through the task scheduling module. Furthermore, the query processing module provides a unified SIM card traffic query instruction processing flow, and the risk control module monitors the data accuracy of the traffic database. This invention simplifies the query operation process on the traffic query application side, reduces the processing pressure on the traffic query application side, and improves the operating efficiency and stability of the traffic query application. If the core system is used as a traffic query application and interfacing with this invention, the processing pressure on the core system can be effectively reduced, and the operating efficiency and stability of the core system can be significantly improved. In addition, this invention can also monitor the data accuracy of the traffic database through its built-in risk control module.
[0045] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0046] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented in hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0047] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A SIM card data usage query system for connecting to multiple carriers, characterized in that, The system includes: a task scheduling module, a traffic acquisition module, a traffic statistics module, a traffic database, a risk control module, a query processing module, and a query request gateway; The task scheduling module is connected to the traffic acquisition module and the traffic statistics module respectively; the task scheduling module is used to plan and generate the corresponding first acquisition task and first statistics task according to the preset acquisition task configuration list at the start time of each natural day; and push the first acquisition task to the traffic acquisition module and the first statistics task to the traffic statistics module. The traffic acquisition module is connected to the traffic statistics module and also to the traffic query server of any external operator. The traffic acquisition module is used to pre-configure traffic query interfaces corresponding to each operator's traffic query server locally. The traffic acquisition module is also used to initiate a task reception wait for the task scheduling module at the start of each natural day, and to stop the task reception wait upon receiving the first acquisition task sent by the task scheduling module. The first acquisition task is stored locally as the latest acquisition task for the day, and operator card traffic data is collected according to the daily acquisition task, and the collected data is sent to the traffic statistics module. The traffic acquisition module is also used to stop data collection at the end of each natural day. The traffic statistics module is connected to the traffic database. The traffic statistics module is used to initiate a statistical task reception wait for the task scheduling module at the start of each natural day, and to stop the statistical task reception wait when it receives the first statistical task sent by the task scheduling module. It also stores the first statistical task locally as the latest statistical task for the day, performs operator card traffic data statistics based on the daily statistical task and the data collected by the traffic acquisition module, and updates the traffic database based on the statistical results. The traffic statistics module is also used to stop data statistics at the end of each natural day. The risk control module is connected to the traffic database; the risk control module is used to periodically check the traffic database for abnormal traffic records and issue early warnings based on the check results. The query request gateway is connected to the query processing module and also to any external traffic query application. The query request gateway is used to receive a first query request sent by the traffic query application; perform compliance verification on the first query request to generate a corresponding first verification result; and when the first verification result is successful, extract the corresponding first keyword record combination from the first query request and send it to the query processing module; and send the first query result sent back by the query processing module back to the traffic query application. The query processing module is connected to the traffic database; the query processing module is used to perform a query operation on the traffic database according to the first keyword record combination to obtain the corresponding first query result and send it back to the query request gateway.
2. The card traffic query system for connecting to multiple operators as described in claim 1, characterized in that, The data collection task configuration list includes multiple first data collection task configuration records; each first data collection task configuration record includes a first data collection object configuration field, a first data collection frequency configuration field, a first data collection flow unit configuration field, a first statistical flow unit configuration field, a first task type configuration field, a first task date configuration field, and a first task status configuration field. The configuration fields of the first collection object include multiple first operator data; the first operator data includes a first operator identifier, a first operator processing interface, a first interface type, and a first operator traffic unit; the first interface type includes at least API type, FTP / SFTP type, and Callback type; the first operator traffic unit includes Byte, KB, and MB; The first data collection unit configuration field is a pre-specified one of three data collection units: Byte, KB, and MB; the first statistical data collection unit configuration field is a pre-specified one of three data collection units: Byte, KB, and MB; the first task type configuration field includes daily recurring tasks and specified date tasks; when the first task type configuration field is a daily recurring task, the corresponding first task date configuration field is empty; when the first task type configuration field is a specified date task, the corresponding first task date configuration field is a preset task execution date; the first task status configuration field includes active status and inactive status; the number of first data collection task configuration records in the data collection task configuration list where the first task type configuration field is a daily recurring task and the first task status configuration field is active is unique; In the data collection task configuration list, all first data collection task configuration records with the first task type configuration field being a specified date task and the first task status configuration field being active have different first task date configuration fields. The first data collection task includes multiple first task records; the first task record includes a first operator identifier field, a first data collection frequency field, a first data collection interface field, a first data collection interface type field, a first operator traffic unit field, a first data collection traffic unit field, and a first traffic conversion factor field; The first data collection interface type field includes at least API type, FTP / SFTP type, and Callback type; the first operator traffic unit field includes Byte, KB, and MB; The first data collection unit field is a pre-specified one of three data units: Byte, KB, and MB; all data collection units in the first data collection task are the same; the first data conversion factor field is a unit conversion ratio from the data unit corresponding to the first operator data unit field to the data unit corresponding to the first data collection unit field. The first statistical task includes multiple records of the second task; The second task record includes a second operator identifier field, a second data collection unit field, a first statistical data collection unit field, and a second data conversion factor field; The second data collection unit field is a pre-specified one of three data collection units: Byte, KB, and MB; all second data collection unit fields in the first statistical task are the same and consistent with the first data collection unit field in the first data collection task; the first statistical data collection unit field is a pre-specified one of three data collection units: Byte, KB, and MB; all first statistical data collection unit fields in the first statistical task are the same; the second data conversion factor field is the unit conversion ratio from the data collection unit field to the data collection unit field. The traffic database is used to store multiple traffic records of the first telecom card; The first telecom card traffic record includes a third operator identifier field, a first year / month field, a first year / month / day field, a first telecom card MSISDN field, a first telecom card ICCID field, a first telecom card daily cumulative traffic field, a first telecom card monthly cumulative traffic field, a first update time field, and a first creation time field; the data format of the first year / month field is YYYYMM, the data format of the first year / month / day field is YYYYMMDD, and the data formats of the first update time field and the first creation time field are YYYYMMDD. hh:mm:ss, YYYY represents the year information expressed by 4 natural numbers with a value range of 0000-9999, MM represents the month information expressed by 2 natural numbers with a value range of 01-12, DD represents the day information expressed by 2 natural numbers with a value range of 01-30 / 31, hh represents the hour information expressed by 2 natural numbers with a value range of 01-24, mm represents the minute information expressed by 2 natural numbers with a value range of 00-59 or 01-60, and ss represents the second information expressed by 2 natural numbers with a value range of 00-59 or 01-60. The first query request includes a first requester IP, a first timestamp, a first version number, and a combination of the first keyword records; the first keyword record combination includes multiple first keyword records; the first keyword record includes a first keyword type field and a first keyword value field; the first keyword type field includes instruction type, MSISDN type, year-month-day type, and year-month type; when the first keyword type field is an instruction type, the corresponding first keyword value field includes daily cumulative traffic query instruction, monthly cumulative traffic query instruction, and daily / monthly cumulative traffic query instruction.
3. The card data usage query system for connecting to multiple operators as described in claim 2, characterized in that, The task scheduling module is specifically used to generate the corresponding first collection task and first statistical task when planning the collection task and statistical task for the day according to the preset collection task configuration list at the start time of each natural day, and to use the date of the current natural day as the corresponding first date. The first collection task configuration record in the collection task configuration list where the first task status configuration field is active, the first task type configuration field is a specified date task, and the first task date configuration field matches the first date is taken as the corresponding first matching record; if the first matching record is empty, the first collection task configuration record in the collection task configuration list where the first task status configuration field is active and the first task type configuration field is a single-day cycle task is taken as the corresponding first matching record. And the first collection frequency configuration field, the first collection flow unit configuration field, and the first statistical flow unit configuration field of the first matching record are used as the corresponding current collection frequency, current collection flow unit, and current statistical flow unit; The system iterates through each of the first operator data in the configuration field of the first collection object of the first matching record; and during the iteration, the first operator data currently being iterated is taken as the corresponding current operator data, and the first operator identifier, first operator processing interface, first interface type and first operator traffic unit of the current operator data are taken as the corresponding current operator identifier, current operator processing interface, current interface type and current operator traffic unit. The corresponding current operator-collected traffic unit conversion ratio is generated by calculating the unit conversion ratio from the current operator traffic unit to the current collected traffic unit. The corresponding current collection-statistical flow unit conversion ratio is generated by calculating the unit conversion ratio from the current collection flow unit to the current statistical flow unit. The first task record is composed of the current operator identifier, the current collection frequency, the current operator processing interface, the current interface type, the current operator traffic unit, the current collection traffic unit, and the current operator-collection traffic unit conversion ratio as the corresponding first operator identifier field, first collection frequency field, first collection interface field, first collection interface type field, first operator traffic unit field, first collection traffic unit field, and first traffic conversion factor field. The current operator identifier, the current data collection unit, the current data collection unit, and the current data collection-data collection unit conversion ratio are used as the corresponding second operator identifier field, second data collection unit field, first data collection unit field, and second data conversion factor field to form a corresponding second task record; At the end of the traversal, all the first task records obtained are combined to form the corresponding first collection task, and all the second task records obtained are combined to form the corresponding first statistical task.
4. The card traffic query system for connecting to multiple operators as described in claim 2, characterized in that, The traffic acquisition module is specifically used to collect operator card traffic data according to the daily collection task and send the collected data to the traffic statistics module, and to use the locally preset business operation and maintenance provider identifiers as the corresponding first operation and maintenance provider identifiers, and to form a corresponding first operation and maintenance provider identifier set by all the obtained first operation and maintenance provider identifiers. And the operator corresponding to the first operator identifier field of each first task record in the daily collection task is recorded as the corresponding first operator, and the first collection frequency field, first collection interface field, and first traffic conversion factor field corresponding to each first operator are extracted as the corresponding first frequency, first interface and first traffic conversion factor. And the local preset traffic query interface corresponding to the first interface is recorded as the corresponding first traffic query interface; And for each of the first operators, at the corresponding first frequency, the daily card traffic information of all telecom cards purchased by the first operator's identification set on the current operator is queried periodically through the corresponding first traffic query interface to obtain the corresponding first operator query list; The traffic units in the first operator query list are converted according to the corresponding first traffic conversion factor to obtain the corresponding first operator collection list. And send the first operator's collection list to the traffic statistics module; The first operator query list includes multiple first operator card query records; the first operator card query record includes a first query operator identifier field, a first query deadline field, a first query card MSISDN field, a first query card ICCID field, and a first query card daily traffic field; all first query deadline fields in the first operator query list are the same; The first operator collection list includes multiple first operator card collection records; the first operator card collection record includes a first operator identifier field, a first collection deadline field, a first collection card MSISDN field, a first collection card ICCID field, and a first collection card daily traffic field; all first collection deadline fields in the first operator collection list are the same; The first operator card collection record corresponds one-to-one with the first operator card query record; the first collection operator identifier field, the first collection deadline field, the first collection card MSISDN field, and the first collection card ICCID field in the first operator card collection record are the same as the corresponding first query operator identifier field, the first query deadline field, the first query card MSISDN field, and the first query card ICCID field in the corresponding first operator card query record; the first collection card daily traffic field in the first operator card collection record is the product of the first query card daily traffic field in the corresponding first operator card query record and the corresponding first traffic conversion factor.
5. The card traffic query system for connecting to multiple operators according to claim 4, characterized in that, The traffic statistics module is specifically used to record the operator card traffic data statistics based on the daily statistics task and the data collected by the traffic collection module, and update the traffic database based on the statistics results, by recording the operator corresponding to the second operator identifier field of each second task record in the daily statistics task as the corresponding second operator, and extracting the second traffic conversion factor field corresponding to each second operator as the corresponding second traffic conversion factor. And initialize a corresponding daily collection list queue for each of the second operators as the corresponding first operator list queue; And each time a first operator collection list is received from the traffic collection module, it is added to the corresponding first operator list queue; Following the first-in, first-out principle, the earliest first operator collection list in each first operator list queue is taken as the corresponding second operator collection list. The system iterates through the first operator card collection records in each of the second operator collection lists; during the iteration, the currently iterated first operator card collection record is taken as the corresponding current collection record, and the first collection operator identifier field, the first collection deadline field, the first collection card MSISDN field, the first collection card ICCID field, and the first collection card daily traffic field of the current collection record are extracted as the corresponding current operator identifier, current update time, current MSISDN, current ICCID, and current daily cumulative traffic. The product of the current daily cumulative flow and the second flow conversion factor is taken as the new current daily cumulative flow. The year and month information corresponding to the current day is taken as the current year and month, the year, month and day information corresponding to the current day is taken as the current year, month and day, and the day before the current year, month and day is taken as the previous year, month and day. The traffic database is queried, and the traffic records of the first telecom card that match the third operator identifier field with the current operator identifier, the first year and month field with the current year and month, the first year, month and day field with the current year, month and day, the first telecom card MSISDN field with the current MSISDN, and the first telecom card ICCID field with the current ICCID are taken as the corresponding current matching records. And it identifies whether the currently matched record is empty; If the current matching record is empty, then the first telecom card traffic record in the traffic database that matches the third operator identifier field with the current operator identifier, the first year and month field with the current year and month, the first year, month, and day field with the previous year, month, and day, the first telecom card MSISDN field with the current MSISDN, and the first telecom card ICCID field with the current ICCID is taken as the corresponding previous day matching record. The system then checks whether the previous day matching record is empty. If it is, the corresponding current month's cumulative traffic is set to the corresponding current day's cumulative traffic; otherwise, the corresponding current month's cumulative traffic is set to the first telecom card's current month's cumulative traffic field and the current day's cumulative traffic field in the previous day's matching record. The traffic is summed, and the corresponding current creation time is set to the corresponding current update time. The current operator identifier, the current year and month, the current year, month and day, the current MSISDN, the current ICCID, the current daily cumulative traffic, the current monthly cumulative traffic, the current update time, and the current creation time are used as the corresponding third operator identifier field, the first year and month field, the first year, month and day field, the first telecom card MSISDN field, the first telecom card ICCID field, the first telecom card daily cumulative traffic field, the first telecom card monthly cumulative traffic field, the first update time field, and the first creation time field to form a corresponding first telecom card traffic record and add it to the traffic database. If the current matching record is not empty, then the daily cumulative traffic field and the monthly cumulative traffic field of the first telecom card in the current matching record are extracted as the corresponding previous daily cumulative traffic and previous monthly cumulative traffic. The difference between the current daily cumulative traffic and the previous daily cumulative traffic is taken as the corresponding current new traffic. The sum of the previous monthly cumulative traffic and the current new traffic is taken as the corresponding current monthly cumulative traffic. The daily cumulative traffic field, the monthly cumulative traffic field and the first update time field of the current matching record are updated to the corresponding current daily cumulative traffic, current monthly cumulative traffic and current update time. And when the traversal ends, the second operator's collection list that is currently being traversed is removed from the corresponding first operator's list queue.
6. The card traffic query system for connecting to multiple operators according to claim 2, characterized in that, The risk control module is specifically used to periodically generate a corresponding first telecommunications card information list by statistically analyzing all telecommunications card information stored in the traffic database when periodically checking abnormal traffic records in the traffic database and issuing warnings based on the check results; the first telecommunications card information list includes multiple first telecommunications card information records; the first telecommunications card information record includes a first MSISDN information field, a first ICCCID information field, and a first operator identification information field. The system iterates through the first telecom card information records in the first telecom card information list. During the iteration, the currently iterated first telecom card information record is taken as the corresponding current information record, and the first MSISDN information field, the first ICCCID information field, and the first operator identifier information field of the current information record are extracted as the corresponding current MSISDN, current ICCCID, and current operator identifier. All first telecom card traffic records in the traffic database that match the third operator identifier field with the current operator identifier, the first telecom card MSISDN field with the current MSISDN, and the first telecom card ICCID field with the current ICCCID are extracted to form the corresponding first record set. And extract the monthly cumulative traffic field of the first telecom card from each of the first telecom card traffic records in the first record set as the corresponding first single-day monthly cumulative traffic; The first daily and monthly cumulative traffic is sorted according to the time sequence of the corresponding first update time field to form a corresponding first traffic sequence; the first traffic sequence is divided into multiple first monthly traffic sequences by month; and the second to the second to last first daily and monthly cumulative traffic in each first monthly traffic sequence is sequentially polled. During polling, the first daily / monthly cumulative traffic of the current polling is taken as the corresponding current traffic, the first daily / monthly cumulative traffic before and after the current traffic is taken as the corresponding previous traffic and next traffic, the difference between the current traffic and the previous traffic is taken as the corresponding previous traffic difference, the difference between the next traffic and the current traffic is taken as the corresponding next traffic difference, and when the previous traffic difference is less than 0 or the next traffic difference is less than 0, the first daily / monthly cumulative traffic corresponding to the current traffic is marked as abnormal traffic. At the end of the polling, the abnormal traffic record set is composed of the first telecom card traffic records corresponding to all the abnormal traffic. When the abnormal traffic record set is not empty, the current information record and the abnormal traffic record set shall form a corresponding first telecom card abnormal traffic record report; At the end of the traversal, the first inspection result is composed of all the abnormal traffic record reports of the first telecom card obtained; And when the first check result is not empty, the first check result is processed by sending a warning report through the local preset warning report sending interface.
7. The card traffic query system for connecting to multiple operators according to claim 2, characterized in that, The query request gateway is specifically used to extract the corresponding first requester IP, first timestamp, and first version number from the first query request when performing compliance verification on the first query request to generate the corresponding first verification result; It also checks whether there is an authorized access IP address matching the IP of the first requester in the locally preset IP whitelist. If it is confirmed that there is an authorized access IP address, the corresponding first check result is set to "check passed"; if it is confirmed that there is no authorized access IP address, the corresponding first check result is set to "check failed". The IP whitelist includes multiple authorized access IP addresses. When the first check result is "check passed", the system identifies whether the time difference between the current time and the first timestamp exceeds a preset time difference threshold. If it does not exceed the threshold, the corresponding second check result is set to "check passed"; if it exceeds the threshold, the corresponding second check result is set to "check failed". When the second check result is "check passed", it is confirmed whether there is an available version number in the local preset list of available version numbers that matches the first version number. If it is confirmed that there is, the corresponding third check result is set to "check passed"; if it is confirmed that there is no, the corresponding third check result is set to "check failed". The list of available version numbers includes multiple available version numbers. The system identifies whether the third inspection result is a successful inspection. If it is, the corresponding first inspection result is set to successful inspection; otherwise, the corresponding first inspection result is set to failed inspection.
8. The card traffic query system for connecting to multiple operators according to claim 2, characterized in that, The query processing module is specifically used to extract the first keyword value field of the first keyword record in the first keyword record combination where the first keyword type field is MSISDN as the corresponding current MSISDN when the first query result is obtained by performing a query operation on the traffic database based on the first keyword record combination and then sending it back to the query request gateway. And extract the first keyword value field of the first keyword record in the first keyword record combination where the first keyword type field is of the instruction type as the corresponding current query instruction; When the current query instruction is a daily cumulative traffic query instruction, the first keyword value field of the first keyword record in the first keyword record combination with the first keyword type field of year, month and day is extracted as the corresponding current year, month and day. The first cumulative traffic field of the first telecom card in the traffic database that matches the current year, month and day field and the first telecom card MSISDN field matches the current MSISDN is extracted as the corresponding first query result and sent back to the query request gateway. When the current query instruction is a monthly cumulative traffic query instruction, the first keyword value field of the first keyword record in the first keyword record combination with the first keyword type field of year and month is extracted as the corresponding current year and month. The first cumulative traffic field of the first telecom card in the current month of the first telecom card traffic record in the traffic database that matches the current year and month, matches the current telecom card MSISDN field, and has the first update time field closest to the current time is extracted as the corresponding first query result and sent back to the query request gateway. When the current query instruction is a daily / monthly cumulative traffic query instruction, the first keyword value field of the first keyword record in the first keyword record combination with the first keyword type field of year, month, and day is extracted as the corresponding current year, month, and day. The first cumulative traffic field of the first telecom card and the first cumulative traffic field of the first telecom card in the traffic database that match the current year, month, and day and the first telecom card MSISDN field match the current MSISDN are extracted to form the corresponding first query result and sent back to the query request gateway.
Citation Information
Patent Citations
Normalized traffic statistics device and method based on CDR
CN111432077A
Multi-operator virtual traffic sharing method and device, equipment and storage medium
CN115086897A