Special tariff business settlement method, device and equipment, storage medium and product

Through distributed storage and real-time data synchronization technology, the problem of low settlement efficiency of special tariffs in international roaming services is solved, and an automated efficient and accurate settlement process is realized, reducing the time and risks of manual operations.

CN120343513APending Publication Date: 2025-07-18中移信息技术有限公司 +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510682853.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-23
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

In the prior art, the special tariff settlement of international roaming services relies on manual operations, resulting in high work intensity, easy human error, and difficult to achieve efficient, accurate and closed-loop processing. Especially when facing massive data, the limitations of manual processing methods are significant.

Method used

The distributed storage model is used to store the call list files into a special settlement service database, and synchronize the data through real-time data warehouses, combining the database and table tools and asynchronous loading technology to realize the automated settlement process and generate special tariff settlement reports.

Benefits of technology

It improves the efficiency and accuracy of special tariff settlement, reduces the risk of data accuracy, realizes seamless connection between data clearing and financial clearing systems, and forms a complete closed-loop business processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120343513A_ABST
    Figure CN120343513A_ABST
Patent Text Reader

Abstract

The invention discloses a special tariff business settlement method and device, equipment, a storage medium and a product, and relates to the technical field of information technology data support, and the special tariff business settlement method comprises the steps: when a settlement instruction is received, extracting corresponding special tariff information from a real-time data warehouse, the real-time data warehouse synchronizes the service data of the special settlement service database in real time, the service data is obtained by performing data extraction on the obtained ticket file, and the service data is fragmented and stored to the special settlement service database through a distributed storage model loading fragmentation rules from a data source; and settling the special tariff information to obtain a special tariff settlement report. According to the invention, the distributed storage model is adopted to store the service data in the special settlement service database in a fragmented manner, so that super-large-scale file data volume can be borne; the special tariff information is extracted from the real-time data warehouse, the special tariff settlement report is output through automatic settlement, and the settlement efficiency of the special tariff is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of information technology data support, and particularly to a settlement method, device, equipment, storage medium and product for special tariff services. Background Art

[0002] In international roaming services, especially in the settlement of special tariffs, a large amount of call detail information needs to be exchanged between operators through a Data Clearing House, and the final financial settlement is completed relying on a Financial Clearing House. Traditional online settlement systems mostly rely on manual operations. Especially when the discount agreement expires at the end of the month, a large number of call detail files and complex protocol tariff models need to be processed, resulting in a high work intensity and prone to human errors.

[0003] When dealing with a huge amount of call detail data, the cost of manual verification is high and it is difficult to ensure the accuracy of the data. In addition, due to the independence of the current system and the phenomenon of data islands, the special tariff settlement process cannot achieve a closed-loop processing of the business process, resulting in all parties being unable to understand the settlement situation in a timely and accurate manner, increasing the work burden and operation risk of operation personnel.

[0004] To solve these problems, traditional solutions mainly focus on the automation of some processes, but generally still rely on manual intervention, especially in the secondary rating and settlement links of special tariffs. This obviously cannot meet the needs of modern communication operators for efficient, accurate and closed-loop processing. Especially when facing hundreds of millions of pieces of data per day, the limitations of the manual processing method become more obvious. The lack of efficient automation tools and technical support makes the special tariff settlement work not only time-consuming and laborious, but also increases financial risks and legal risks to a certain extent, posing a potential threat to the business stability of operators.

[0005] Therefore, how to improve the settlement efficiency of special tariffs is an urgent problem to be solved. Summary of the Invention

[0006] The main purpose of this application is to provide a settlement method, device, equipment, storage medium and product for special tariff services, aiming to solve the technical problem of low settlement efficiency of special tariffs.

[0007] To achieve the above object, this application proposes a settlement method for special tariff services, and the method includes:

[0008] When a settlement instruction is received, extract the corresponding special tariff information from the real-time data warehouse, where the real-time data warehouse synchronizes the business data of the special settlement service database in real time, the business data is obtained by extracting data from the acquired call record file, and is stored in the special settlement service database in a sharded manner through a distributed storage model that loads sharding rules from the data source;

[0009] Settle the special tariff information to obtain a special tariff settlement report.

[0010] In one embodiment, the step that the business data is obtained by extracting data from the acquired call record file and is stored in the special settlement service database in a sharded manner through a distributed storage model that loads sharding rules from the data source includes:

[0011] Obtain a call record file;

[0012] According to the preset information extraction rules, perform effective data extraction and data preprocessing on the call record file to obtain business data;

[0013] Use the preset rule metadata model as the data source, and asynchronously load sharding rules using a database sharding and table partitioning tool;

[0014] Based on the sharding rules, store the business data in the special settlement service database through the distributed storage model.

[0015] In one embodiment, the step of using the preset rule metadata model as the data source and asynchronously loading sharding rules using a database sharding and table partitioning tool includes:

[0016] Create a metadata loading task according to the preset rule metadata model;

[0017] Asynchronously execute the metadata loading task using a database sharding and table partitioning tool, record the loading progress through a status identifier, where when loading default metadata, skip the sharded tables, and concurrently load the metadata of the sharded tables through a preset sharding execution engine. When calling the public method of the metadata of the sharded tables, judge the loading status based on the status identifier. If the loading status is not completed, suspend the thread and wait. If the loading status is in progress, reject the call operation. If the loading status is completed, execute the call operation normally.

[0018] In one embodiment, before the step of using the preset rule metadata model as the data source and asynchronously loading sharding rules using a database sharding and table partitioning tool includes:

[0019] Create a sharding rule table and a sharding rule extension table, and combine them to obtain sharding rules;

[0020] Convert the sharding rules into automatic loading instructions through sharding annotations;

[0021] When creating a database table, load the sharding rule table and the sharding rule extension table;

[0022] Verify and refresh the sharding rule table and the sharding rule extension table,

[0023] Create and refresh the rule metadata model according to the classification rule extension table.

[0024] In one embodiment, the steps of the real-time data warehouse for real-time synchronization of business data of the special settlement service database include:

[0025] Create a target library table in the real-time data warehouse according to a preset bucketing rule;

[0026] Configure a data integration engine and configure a synchronization mechanism through the data integration engine;

[0027] Through the data integration engine and the synchronization mechanism, offline synchronize the business data of the special settlement service database to the real-time data warehouse;

[0028] Monitor change events of the business data of the special settlement service database and synchronize them to the real-time data warehouse in real time.

[0029] In one embodiment, the steps of settling the special tariff information to obtain a special tariff settlement report include:

[0030] Generate a query statement according to the parameters of the settlement instruction;

[0031] Extract the special tariff information corresponding to the query statement in the real-time data warehouse, where the special tariff information is the pre-settlement amount after audit and correction;

[0032] Settle the special tariff information according to the settlement period in the settlement instruction to obtain an internal settlement report;

[0033] Obtain a roaming user settlement report, reconcile the internal settlement report with the roaming user settlement report to obtain a credit notice and a debit notice;

[0034] Settle according to the credit notice and the debit notice to obtain a special tariff settlement report.

[0035] In addition, to achieve the above object, the present application also proposes a special tariff service settlement device, and the special tariff service settlement device includes:

[0036] The sharded storage module is used to extract corresponding special tariff information from the real-time data warehouse when receiving a settlement instruction. Among them, the real-time data warehouse synchronizes the business data of the special settlement business database in real time. The business data is obtained by extracting data from the acquired call detail record files and is sharded and stored in the special settlement business database through a distributed storage model that loads sharding rules from the data source;

[0037] The settlement module is used to settle the special tariff information to obtain a special tariff settlement report.

[0038] In addition, to achieve the above object, the present application also proposes a special tariff business settlement device, which includes: a memory, a processor, and a computer program stored on the memory and executable on the processor. The computer program is configured to implement the steps of the special tariff business settlement method as described above.

[0039] In addition, to achieve the above object, the present application also proposes a storage medium, which is a computer-readable storage medium. A computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the special tariff business settlement method as described above.

[0040] In addition, to achieve the above object, the present application also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the steps of the special tariff business settlement method as described above.

[0041] One or more technical solutions proposed by the present application have at least the following technical effects:

[0042] Compared with the related art where manual calculation is required for special tariff settlement, in the present application, when receiving a settlement instruction, corresponding special tariff information is extracted from the real-time data warehouse. Among them, the real-time data warehouse synchronizes the business data of the special settlement business database in real time. The business data is obtained by extracting data from the acquired call detail record files and is sharded and stored in the special settlement business database through a distributed storage model that loads sharding rules from the data source; the special tariff information is settled to obtain a special tariff settlement report. It can be understood that the present application uses a distributed storage model to shard and store business data in the special settlement business database, which can carry an ultra-large-scale file data volume; by synchronizing the business data of the special settlement business database to the real-time data warehouse in real time, the real-time performance and security of the data can be improved; by extracting special tariff information from the real-time data warehouse and automatically settling and outputting a special tariff settlement report, replacing the traditional manual settlement of special tariff business, the settlement efficiency of special tariffs is improved. Description of the Drawings

[0043] The accompanying drawings here are incorporated into and form a part of this specification, showing embodiments consistent with this application, and are used together with the specification to explain the principles of this application.

[0044] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the following will briefly introduce the accompanying drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0045] Figure 1 It is a schematic flowchart provided for the first embodiment of the special tariff service settlement method of this application;

[0046] Figure 2 It is a schematic flowchart provided for the second embodiment of the special tariff service settlement method of this application;

[0047] Figure 3 It is a schematic flowchart provided for the third embodiment of the special tariff service settlement method of this application;

[0048] Figure 4 It is a schematic module structure diagram of the special tariff service settlement device for the embodiment of this application;

[0049] Figure 5 It is a schematic device structure diagram of the hardware operating environment involved in the special tariff service settlement method for the embodiment of this application.

[0050] The realization of the purpose, functional features, and advantages of this application will be further described in conjunction with the embodiments with reference to the accompanying drawings. Specific Embodiments

[0051] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of this application and are not used to limit this application.

[0052] To better understand the technical solutions of this application, the following will be described in detail in conjunction with the accompanying drawings of the specification and specific embodiments.

[0053] The main solution of the embodiment of this application is:

[0054] When a settlement instruction is received, extract the corresponding special tariff information from the real-time data warehouse, where the real-time data warehouse synchronizes the business data of the special settlement service database in real time, the business data is obtained by extracting data from the acquired call record file, and is shard-stored in the special settlement service database through a distributed storage model that loads sharding rules from the data source;

[0055] Settle the special tariff information to obtain a special tariff settlement report.

[0056] In this embodiment, the present application takes the special tariff service settlement device as the execution entity. For the convenience of description, it is hereinafter referred to as the "device" for specific description.

[0057] Since the existing technologies mostly rely on manual operations, especially when the discount agreement expires at the end of the month, a large number of call detail files and complex protocol tariff models need to be processed, resulting in a large workload and prone to human errors.

[0058] The present application provides a solution. First, special tariff data is extracted from the call detail files and shard-stored in the special settlement service database using a distributed storage model, which can greatly improve the data processing speed. Then, this data is synchronized to the real-time data warehouse for subsequent automated settlement. Once a settlement instruction is received, the system extracts the corresponding special tariff information from the real-time data warehouse, generates the monthly pre-settlement amount after audit correction by executing a query statement, performs settlement in combination with the settlement cycle, and finally outputs a special tariff settlement report. This series of automated processes not only greatly reduces the time and effort of manual operations, improves the settlement efficiency, but also significantly reduces the risk of data inaccuracy, realizes seamless docking with the data clearing and financial clearing systems, and forms a complete business closed-loop processing. By creating a metadata loading task and asynchronously executing the loading process, the progress of data loading can be accurately recorded to ensure data integrity. At the same time, the sharding rule table and sharding extension table in the data source are dynamically loaded, and the sharding rules are adjusted according to the preset annotations to adapt to the complex tariff models of different protocols, realizing the efficiency and flexibility of data storage. The overall working principle is to efficiently extract, store, synchronize and settle massive call detail data, realizing an automated closed-loop process from data acquisition to report generation, and improving the current inefficient phenomenon relying on manual calculation.

[0059] Based on this, the embodiment of the present application provides a special tariff service settlement method. Refer to Figure 1 , Figure 1 which is the process schematic diagram of the first embodiment of the special tariff service settlement method of the present application.

[0060] In this embodiment, the special tariff service settlement method includes steps S10 to S20:

[0061] Step S10, when a settlement instruction is received, extract the corresponding special tariff information from the real-time data warehouse, where the real-time data warehouse synchronizes the business data of the special settlement service database in real time, the business data is obtained by extracting data from the acquired call detail files, and is shard-stored in the special settlement service database through a distributed storage model for loading sharding rules from the data source;

[0062] It should be noted that a settlement instruction is a command or signal that triggers the system to start the settlement operation in the special tariff service settlement process. It can be initiated manually by an operator or automatically triggered by the system according to preset time or conditions. A real-time data warehouse is a system used to store and manage a large amount of real-time data, capable of real-time synchronization and update of data, providing support for business analysis and decision-making. In the settlement of special tariff services, the real-time data warehouse synchronizes the business data of the special settlement service database in real time to ensure the timeliness and accuracy of the data. Special tariff information is information related to special tariff services, including but not limited to tariff standards, discount agreements, business usage, amounts, etc. This information is extracted from the real-time data warehouse and used to settle special tariff services. Business data in the settlement of special tariff services refers to the valid data extracted from the call detail record (CDR) file and preprocessed, including CDR detail data, CDR summary data, etc., which is used to support the settlement and analysis of special tariff services. A CDR file is a file that records detailed information about various calls, data usage, etc. in communication services. In international roaming services, the CDR file is an important basis for billing and settlement between operators. Data extraction is the process of obtaining valid data from the original CDR file. Through data extraction, the useful information in the CDR file can be sorted out, providing a basis for subsequent data processing and analysis. The data source in the settlement of special tariff services refers to the database or file, etc. that stores the sharding rules, which are used to guide the storage of data in multiple databases and tables. The sharding rule is a rule that defines how to disperse data storage into multiple databases or tables. Through the sharding rule, horizontal expansion of data can be achieved, improving the performance and scalability of the system. The distributed storage model is a data storage method that disperses data storage on multiple nodes or servers to increase the data storage capacity, access speed, and system reliability. In the settlement of special tariff services, the business data is sharded and stored in the special settlement service database through the distributed storage model. The special settlement service database is a database specifically used to store data related to special tariff services. This database stores business data through the distributed storage model, supporting the efficient settlement and management of special tariff services.

[0063] It can be understood that in the international roaming service of a certain communication operator, the system processes the settlement of special tariff services according to a preset process. When the system receives a settlement instruction, it first extracts the corresponding special tariff information from the real-time data warehouse. This real-time data warehouse synchronizes the business data in the special settlement business database in real time. These business data are obtained by extracting valid data and performing data preprocessing on the acquired call detail record (CDR) files according to preset information extraction rules. In terms of data storage, the system uses the preset rule metadata model as the data source, uses the database sharding and table partitioning tool to asynchronously load the sharding rules, and then based on these sharding rules, stores the business data in slices in the special settlement business database through a distributed storage model to achieve efficient data storage and management, thereby improving the efficiency and accuracy of special tariff service settlement.

[0064] Exemplarily, when a settlement instruction is received, the corresponding special tariff information is extracted from the real-time data warehouse built based on StarRocks. Among them, the real-time data warehouse synchronizes the business data of the special settlement business database in real time through a data integration tool. The business data is obtained by deduplicating, field supplementing, and classifying the CDR files after parsing the TAP file (international roaming billing file), and is stored in slices in the special settlement business database through the Sharding-JDBC database sharding and table partitioning model that loads sharding rules from the rule metadata table. StarRocks is a new generation of extremely fast full-scenario massively parallel processing database, mainly used in scenarios such as data analysis and data warehousing.

[0065] In this embodiment, through slice storage, real-time synchronization, and distributed query, the processing efficiency of CDR files with an extremely large file volume is improved.

[0066] In a feasible embodiment, the step of obtaining the business data by extracting data from the acquired CDR files and storing the business data in slices in the special settlement business database through a distributed storage model that loads sharding rules from the data source includes:

[0067] Obtain CDR files;

[0068] According to the preset information extraction rules, perform valid data extraction and data preprocessing on the CDR files to obtain business data;

[0069] Use the preset rule metadata model as the data source and use the database sharding and table partitioning tool to asynchronously load the sharding rules;

[0070] Based on the sharding rules, store the business data in the special settlement business database through the distributed storage model.

[0071] It should be noted that the preset information extraction rules are rules formulated in advance according to the requirements of special tariff services and the characteristics of call detail record files, and are used to guide the system to accurately extract valid data from call detail record files, including data formats, fields, screening conditions, etc. Data preprocessing is the preliminary processing of the raw data extracted from call detail record files, such as duplicate removal, format unification, field supplementation, etc., to improve the quality and usability of the data. The rule metadata model is the abstraction and organization of data related to sharding rules, including rule definitions of sharding tables, global tables, etc., and is used to guide the storage of data in multiple databases and tables through database sharding and table partitioning. The database sharding and table partitioning tool is a tool used to implement the database sharding and table partitioning function, which helps to disperse the storage of large-scale data into multiple databases or tables, improving the performance and scalability of the system. Asynchronous loading is a way of loading data, which means that while other tasks are being executed, data is gradually loaded in the background without blocking the main thread, improving the response speed and efficiency of the system. The distributed storage model is a data storage architecture that disperses data storage on multiple nodes or servers, improving the data storage and processing capabilities through parallel processing and distributed computing.

[0072] It can be understood that in the special tariff settlement scenario of a certain communication service, the system first obtains call detail record files containing a large number of call and data usage records through the interface with the data clearing center. Then, the system processes these call detail record files according to the preset information extraction rules, such as screening specific service types, extracting specified fields, etc. In the data preprocessing stage, the system will remove duplicate data records, supplement missing field information, and unify the data format into the format required for subsequent processing, thus obtaining high-quality business data.

[0073] Next, the system uses the preset rule metadata model as the data source, and the rule metadata model here contains rule definitions of sharding tables, global tables, etc. The system uses the database sharding and table partitioning tool to load the sharding rules asynchronously, so that while other tasks are being executed, the loading of the sharding rules does not block the main thread, improving the efficiency of the system.

[0074] Finally, based on the loaded sharding rules, the system stores the processed business data in the special settlement service database in slices through the distributed storage model. This distributed storage method can disperse the storage pressure, improve the data storage and reading efficiency, and provide strong support for subsequent special tariff settlements.

[0075] Exemplarily, obtain the international roaming TAP file and parse it to generate a special tariff call detail record text file;

[0076] According to the preset field mapping rules and deduplication strategies, perform effective data extraction and format standardization processing on the dialogue single file to obtain business data; use the preset rule metadata model as the data source, and use the Sharding-JDBC tool to asynchronously load sharding rules. The rule metadata model includes a sharding rule table and a sharding rule extension table; based on the sharding rules, store the business data in multiple physical nodes of the special settlement service database in a hash sharding manner according to the user ID through the database sharding and table sharding model.

[0077] In this embodiment, by preprocessing the dialogue single file and storing the business data in a sharding manner, the processing efficiency of the special tariff settlement service is improved.

[0078] In a feasible embodiment, the step of using the preset rule metadata model as the data source and using the database sharding and table sharding tool to asynchronously load sharding rules includes:

[0079] Create a metadata loading task according to the preset rule metadata model;

[0080] Asynchronously execute the metadata loading task using the database sharding and table sharding tool, and record the loading progress through a status identifier. Among them, when loading default metadata, skip the sharding table, and concurrently load the metadata of the sharding table through a preset sharding execution engine. When calling the public method of the metadata of the sharding table, judge the loading status based on the status identifier. If the loading status is unfinished, suspend the thread and wait; if the loading status is in progress, reject the call operation; if the loading status is completed, execute the call operation normally.

[0081] It should be noted that the metadata loading task is a task created to load the data in the rule metadata model into the database sharding and table sharding tool, and is responsible for guiding and executing the loading work of the sharding rules. The status identifier is a flag used to identify the execution progress of the metadata loading task, and represents the execution situation of the task through different status values, such as unfinished, in progress, completed, etc. Default metadata is the metadata that is pre-set by the system and has universality. When loading, if default metadata is encountered, the loading of the sharding table can be skipped according to needs to improve the loading efficiency. The sharding execution engine is a component or module responsible for concurrently loading the metadata of the sharding table, and concurrently loads the metadata of multiple sharding tables through multi-threading and other methods to speed up the loading speed. The public method is a method in the metadata class of the sharding table that can be called externally, used to obtain or operate on the metadata of the sharding table. When calling, it is necessary to judge the loading status according to the status identifier to determine how to respond to the call operation. The loading status is the current situation of the metadata loading task represented by the status identifier, including statuses such as unfinished, in progress, completed, etc., and is used to control the flow of the call operation.

[0082] Exemplarily, in a special tariff settlement system for a certain communication service, first, a metadata loading task is created according to a preset rule metadata model. This task aims to load the data in the rule metadata model, such as the rule definitions of sharded tables and global tables, into the sharding and partitioning tool.

[0083] Then, the sharding and partitioning tool is used to execute this metadata loading task asynchronously. During the execution process, a status identifier is used to record the loading progress. For example, when loading default metadata, the system will skip the loading of sharded tables and directly load the necessary basic data, thereby improving the loading efficiency.

[0084] Meanwhile, the system utilizes a preset sharding execution engine to concurrently load the sharded table metadata. This can make full use of system resources and accelerate the metadata loading speed.

[0085] When other modules need to call the public method of the sharded table metadata, the system will judge the current loading status based on the status identifier. If the loading status indicates that the task has not been completed, the calling thread will be suspended and wait to avoid using incomplete data. If the loading status indicates that the task is in progress, the system will reject this call operation to prevent data inconsistency problems. Only when the status identifier shows that the loading task has been completed will the call operation be executed normally to ensure that complete and accurate metadata is used.

[0086] In this way, the system can efficiently and accurately manage the loading and use of metadata, providing a solid data foundation for subsequent special tariff settlement.

[0087] Exemplarily, a metadata loading task is created according to the rule metadata model, and the task includes the sharding key, sharding algorithm, and data node mapping of the sharding rule table; the asynchronous thread pool of Sharding-JDBC is used to execute the loading task, and the loading progress is recorded through a status identifier; when loading default metadata, the tables without configured sharding rules are skipped, and the sharded table metadata is loaded concurrently; when calling the public method of the sharded table metadata, the loading status is judged based on the status identifier: if the status is not completed, the current thread is suspended until the loading is completed; if the status is in progress, the call is rejected; if the status is completed, the query routing and data read / write operations are executed normally.

[0088] Exemplarily, when a shard metadata is instantiated, a metadata loading task is generated and passed to the shard table metadata; when the shard table metadata is instantiated, the table metadata loading task is executed asynchronously, and a status bit is used to identify the completion status of the table metadata loading; the table metadata initializer ignores the loading of the shard table when loading the default table metadata, and at the same time, reuses the ShardingExecuteEngine (shard execution engine) to load the table metadata in multiple threads; when calling the public method of the shard table metadata, the ShardingTableMetaData (shard table metadata) needs to wait, execute, or reject according to the execution status of the asynchronous loading task.

[0089] In this embodiment, by asynchronously loading the original data, it can effectively avoid the slow startup of the application caused by waiting for the completion of the table metadata loading; by loading the table metadata in a multi-threaded and deduplicated manner, the actual loading efficiency of the table metadata can be further improved, thus efficiently solving the problems mentioned in the background art.

[0090] In a feasible implementation manner, before the step of using the preset rule metadata model as the data source and asynchronously loading the sharding rules by using the database sharding and table partitioning tool, it includes:

[0091] Create a sharding rule table and a sharding rule extension table, and combine them to obtain the sharding rules; through the sharding annotation, convert the sharding rules into automatic loading instructions; when creating a database table, load the sharding rule table and the sharding rule extension table; verify and refresh the sharding rule table and the sharding rule extension table, and create and refresh the rule metadata model according to the classification rule extension table.

[0092] It should be noted that the sharding rule table is a database table used to record sharding rules, including information such as the rule definitions of sharded tables and global tables, and is uniquely identified by a composite primary key, etc. The sharding rule extension table is a universal table used to supplement sharding rules, which can record sharding variables, data sources, read-write configurations, etc., and is used in combination with the sharding rule table to jointly define complete sharding rules. Sharding annotations are a way of marking, which specify the sharding rules of a table by adding specific annotations to SQL statements, and use the JSON format for DDL comments so that the system can recognize and apply these rules. SQL statement is the abbreviation of Structured Query Language, which is a standard language for managing and operating relational databases. SQL statements are used to perform various database operations, such as querying data, updating data, creating and modifying database structures, etc. JSON format is the abbreviation of JavaScript Object Notation, which is a lightweight data exchange format. The JSON format stores and transmits data in an easy-to-read and write manner, and is often used in Web applications, especially for data exchange between clients and servers. DDL is the abbreviation of Data Definition Language, which is a part of SQL statements and is used to define and modify the structure of a database, such as creating, modifying, and deleting database objects (tables, views, indexes, etc.). DDL comments refer to the comments added in DDL statements, which are used to explain the purpose, function of the code or provide other relevant information to help developers and other team members better understand and maintain the code. The automatic loading instruction converts sharding rules into instructions that the system can automatically recognize and execute, enabling the system to automatically load and apply sharding rules at runtime. The classification rule extension table may refer to classifying and organizing the data in the sharding rule extension table to better manage and apply these extended rules. The rule metadata model is the abstraction and organization of data related to sharding rules, including the rule definitions of sharded tables and global tables, etc., and is used to guide the storage of data in different databases and tables.

[0093] Exemplarily, during the development of a special tariff settlement system of a certain communication enterprise, first, the database administrator creates a sharding rule table and a sharding rule extension table according to business requirements. The sharding rule table records key information such as the rule definitions of sharded tables and global tables, while the sharding rule extension table is used to record extended information such as sharding variables, data sources, and read-write configurations. By combining the data of these two tables, complete sharding rules are obtained.

[0094] Developers use sharding annotations to convert these sharding rules into automatic loading instructions. For example, specific annotations are added to SQL statements, and DDL comments are in JSON format, so that the system can automatically recognize and apply these sharding rules. When creating a database table, the system will automatically load the data in the previously created sharding rule table and sharding rule extension table to ensure that the creation of the database table conforms to the preset sharding rules. During the operation of the system, in order to ensure the accuracy and consistency of data, verification and refresh operations are performed on the sharding rule table and sharding rule extension table. The verification process includes checking whether the bound table exists, whether the sharding key and sharding algorithm are consistent, etc. The refresh operation ensures that the system can apply the latest sharding rules in a timely manner. Based on the data in the classification rule extension table, the system creates and refreshes the rule metadata model. This model is an abstraction and organization of the data related to sharding rules, and is used to guide subsequent data sharding and table storage, improving the efficiency of data management and access.

[0095] Exemplarily, a sharding rule table (new_sharding_rule) is created to store the sharding key, sharding algorithm, number of sub-tables, and bound table relationship; a sharding rule extension table (new_sharding_ext) is created to store data source connection information, read-write separation rules, and custom variables; the sharding rules are embedded in the table definition statement through SQL annotations (such as COMMENT='@@SHARDING_TAG={...}') to generate automatic loading instructions; when creating a database table, the consistency of the sharding rule table and the extension table is loaded and verified, and the sharding strategy in the ShardingRule (sharding rule) instance is refreshed.

[0096] Exemplarily, in a special tariff settlement system for a certain communication service, in order to solve the problem of high development and maintenance complexity caused by traditional ShardingSphere-JDBC managing sharding rules in yaml files, this application proposes a method for loading sharding rules from data sources based on Sharding-JDBC. YAML (YAML Ain't Markup Language) is a data serialization format.

[0097] First, a rule metadata model is established. Developers create a sharding rule table (new_sharding_rule) in the database, which records information such as the rules for sharding tables and global tables. Among them, a composite primary key (namespace, product_name, project_code, table_name) is used for unique identification. If it is a single-piece table, there is no need to record it currently, and it can be extended through the table_type table type later. The information of the new_sharding_rule table is as follows:

[0098]

[0099]

[0100] Secondly, establish a sharding rule extension table (new_sharding_ext). This table serves as a universal table to record information such as sharding variables, data sources, read / write configurations, etc. It is uniquely identified by a composite primary key (namespace, product_name, project_code, ext_type, ext_id, attr_name). Among them, variables are used to define custom variables, such as the number of shards TB_NUM, etc.; defaultRule is used to define default rules, such as defaultDataSourceName (default data source name), defaultDatabaseStrategy (default database strategy), etc.; dataSources are used to define data source connection information; props correspond to props in the yaml file and can be overridden by the Properties passed in by the framework; configMap corresponds to configMap in the yaml file and can be overridden by the Properties passed in by the framework; masterSlaveRule corresponds to masterSlaveRule in the yaml file and is used to configure read / write separation. The information of the new_sharding_ext table is as follows:

[0101]

[0102]

[0103] Then, during the code development process, specify the sharding rules of the table in the form of SQL annotations and use the JSON format for DDL comments. For example:

[0104] @@PARTITION_SQL_SEGMENT = {"sharding_db_key": "ROUTING_ID", "sharding_db_alg": "HASH", "sharding_tb_num": "{TB_NUM}"};

[0105] Among them, the json field names correspond to the column names of the new_sharding_rule table, and the number of sub-tables can be replaced by variables, such as {TB_NUM}. Compared with DRDS, there is an additional BINDTO syntax, which means forming a binding relationship with a specific base table.

[0106] Finally, the rule metadata is refreshed. The system loads the new_sharding_rule and new_sharding_ext tables respectively according to the incoming product_name (namespace is optional). During the loading process, the system will verify the rule metadata, checking whether the bound tables exist in new_sharding_rule, whether the sharding keys and sharding algorithms are consistent, etc. After the verification passes, the corresponding rule update is achieved by adding a refresh method in ShardingRule and passing in the above results. At the same time, the system will load information such as dataSources and masterSlaveRule in new_sharding_ext, call the framework method to create data sources, and adopt the SPI mechanism to let the framework provide capabilities to update the data source information in ShardingContext, ShardingRule, and ShardingTransactionalDataSource.

[0107] Through the above steps, the system can efficiently load sharding rules from data sources, reduce the complexity of development and maintenance, and improve the scalability and flexibility of the system.

[0108] In a feasible implementation manner, the steps for the real-time data warehouse to synchronize the business data of the special settlement business database in real time include:

[0109] Create a target library table in the real-time data warehouse according to the preset bucketing rules;

[0110] Configure a data integration engine and configure a synchronization mechanism through the data integration engine;

[0111] Through the data integration engine and the synchronization mechanism, offline synchronize the business data of the special settlement business database to the real-time data warehouse;

[0112] Monitor the change events of the business data of the special settlement business database and synchronize them to the real-time data warehouse in real time.

[0113] It should be noted that the preset bucketing rules are rules formulated in advance according to business requirements and data characteristics, and are used to determine how to bucket and store data in a real-time data warehouse. For example, hash bucketing or range bucketing can be performed according to a certain field value of the data. The target library table is a database table created in the real-time data warehouse for storing business data synchronized from a special settlement business database. Its structure and design should match the source data and meet the storage and query optimization requirements of the real-time data warehouse. The data integration engine is a tool or framework for data integration and synchronization, which can connect different data sources and target databases to achieve operations such as data extraction, transformation, and loading, such as the Apache SeaTunnel tool. The synchronization mechanism is the data synchronization method and strategy configured through the data integration engine, including the frequency and method of data extraction, transmission, and loading, such as offline batch synchronization and real-time incremental synchronization, to ensure that data can be synchronized from the source database to the target data warehouse as expected. Offline synchronization is to extract and load the business data in the special settlement business database into the real-time data warehouse at one time according to the preset batch processing method during non-business peak periods or specific time periods. Necessary data transformation and cleaning may be performed during this process, which is suitable for data synchronization scenarios with a large amount of historical data or low real-time requirements. A change event refers to an event record generated when operations such as addition, deletion, or modification occur to the business data in the special settlement business database. These events can be monitored and captured by the data integration engine to timely trigger data synchronization operations to ensure that the data in the real-time data warehouse is consistent with the source database. Real-time synchronization means that when changes occur to the business data in the special settlement business database, the data integration engine can immediately capture these change events and update the changed data to the real-time data warehouse in real time, ensuring the timeliness and consistency of the data, which is suitable for business scenarios with high real-time requirements for data.

[0114] It can be understood that in the special tariff settlement system of a certain communication service, first, according to the preset bucketing rules, a target library table is created in the real-time data warehouse. For example, for the detailed data such as TAP call record data and special tariff call record data, a detailed model is adopted, and bucketing is performed based on the call record ID; for the pre-accumulated data of each dimension, a primary key model is adopted, and bucketing is performed based on the cumulative ID; for the data after batch pricing and settlement of each dimension, a primary key model is adopted, and bucketing is performed based on the dimension or year and month.

[0115] Then, configure a data integration engine, such as Apache SeaTunnel, and configure a synchronization mechanism through this engine. Declare the data source in the source configuration component of SeaTunnel, including information such as the address, port, username, password, database name, and table name of the special settlement business database. In the transform configuration component, the conversion rules for business data can be configured. If no conversion is required, this step can be omitted. Configure the relevant information of the target data source in the Sink configuration component, that is, the address, port, username, password, database name, and table name of the real-time data warehouse StarRocks.

[0116] Next, through the data integration engine and the synchronization mechanism, offline synchronize the business data of the special settlement business database to the real-time data warehouse. Define the operation mode of the job as the BATCH offline batch processing mode in env, and configure the checkpoint.interval parameter to 6000. During offline synchronization, first verify the data to ensure data consistency and accuracy. After verification passes, record the current data status as the benchmark for subsequent incremental synchronization.

[0117] Finally, monitor the change events of the business data in the special settlement business database and synchronize them to the real-time data warehouse in real time. The data integration engine monitors the Binlog change events at the data source end in real time, such as INSERT (insert), UPDATE (update), and DELETE (delete) operations. When a change event is detected, obtain the changed data and synchronize it to the receiver. The receiver replays and executes the corresponding change operations in the order of the source-side change events, so as to ensure that the data in the real-time data warehouse is consistent with the data in the special settlement business database in real time.

[0118] Exemplarily, according to the bucketing rules of StarRocks, create a target table in the real-time data warehouse that is consistent with the structure of the special settlement business database, where the detailed data is bucketed by call record ID using the detailed model, and the summary data is bucketed by settlement cycle using the primary key model;

[0119] Configure the SeaTunnel data integration engine and define the mapping relationship between the source database (MySQL) and the target database (StarRocks);

[0120] Full synchronize the historical data through the offline batch processing mode of SeaTunnel. After completion, switch to the real-time incremental synchronization mode, listen for the Binlog events of MySQL and synchronize them to StarRocks in real time.

[0121] This embodiment improves the processing efficiency of special tariff settlement by synchronizing business data.

[0122] Step S20, settle the special tariff information to obtain a special tariff settlement report.

[0123] It should be noted that the special tariff settlement report is an official document or file containing the settlement results generated by the system after the settlement of special tariff information. This report is an important basis for reconciling accounts with roaming partners, issuing credit notices or debit notices, and conducting financial processing.

[0124] Exemplarily, in the special tariff settlement system of a certain communication service, when the settlement period arrives, the system automatically triggers the settlement process. The system settles the special tariff information based on preset tariff models, such as different statistical levels like by day, by month, by quarter, or by contract period, and minimum commitment rules, such as minimum commitment for service usage and minimum commitment for service amount.

[0125] First, the system performs pre-settlement processing. According to the input basic tariff information, it obtains the atomic attributes of valid tariffs and statistically aggregates the usage in the previous period. If there is a minimum commitment for service usage, it compares the aggregated usage with the minimum commitment and takes the larger value as the pre-settlement usage. Then, it associates the specific tariff value and currency type and performs tariff calculation according to the rating model. If the statistical level is by day, it sums up all the tariff data for the dates belonging to the same period; if it is at the quarterly or contract period level, it performs tariff calculation after monthly apportionment. Finally, it calculates the monthly pre-settlement amount by combining the TAP amount and the monthly pre-discount amount.

[0126] Then, the system audits and corrects the monthly pre-settlement amount, verifies whether the service volumes in each table are consistent, and corrects them if they are not. It parses the TAP clearing operations and tariff change operations in the service log. If the key attributes are modified, it clears and re-performs pre-rating and settlement processing. Finally, it inputs the customer, roaming partner, and discount period, verifies whether the data is consistent, and if not, regenerates the special tariff service bill file and stores it in the special settlement service database.

[0127] Finally, the system performs rating and settlement according to the settlement period. If the statistical level is by day and by month, and the settlement period is monthly, it takes the audited and corrected monthly pre-settlement amount as the final monthly settlement amount; if the settlement is by quarter or contract period, it aggregates the monthly settlement amounts into quarterly or contract period settlement amounts respectively. If the statistical level is by quarter and the settlement period is quarterly, it accumulates the monthly settlement usage into quarterly settlement usage, compares and performs rating according to the minimum commitment rule, and finally outputs the quarterly settlement amount. If the statistical level is by contract period and the settlement period is the contract period, it accumulates the monthly settlement usage into the contract period service usage, compares and performs rating according to the minimum commitment rule, and finally outputs the contract period settlement amount.

[0128] After completing the above settlement steps, the reporting system reads the settlement data for the corresponding settlement period in the real-time data warehouse StarRocks based on the input customers, roaming partners, and settlement period, and generates a final special tariff settlement report. This report details various expense items, discount application situations, final settlement amounts, and relevant reconciliation information during the settlement period, and serves as an important basis for reconciling with roaming partners, issuing credit notices or debit notices, and performing financial processing.

[0129] In a feasible implementation manner, the steps of settling the special tariff information to obtain a special tariff settlement report include:

[0130] Generate a query statement according to the parameters of the settlement instruction;

[0131] Extract the special tariff information corresponding to the query statement in the real-time data warehouse, where the special tariff information is the pre-settlement amount after audit and correction;

[0132] Settle the special tariff information according to the settlement period in the settlement instruction to obtain an internal settlement report;

[0133] Obtain a roaming user settlement report, reconcile the internal settlement report with the roaming user settlement report to obtain a credit notice and a debit notice;

[0134] Settle according to the credit notice and the debit notice to obtain a special tariff settlement report.

[0135] It should be noted that the parameters of the settlement instruction are specific information carried in the settlement instruction, which are used to guide the system to perform settlement operations, such as customer identification, roaming partner identification, service type, settlement cycle, settlement currency, etc. The query statement is an SQL query statement or other type of query command generated based on the parameters of the settlement instruction, which is used to retrieve specific special tariff information from the real-time data warehouse. The audited and revised pre-settlement amount is the special tariff information that has been audited and revised after the pre-settlement amount is generated to ensure data accuracy and consistency. The audit process includes operations such as verifying the consistency of business volume data, parsing business logs for data cleaning and recalculation. The internal settlement report is an internal report generated by the system based on the settlement cycle and special tariff information. It lists in detail the details of various expenses, discount application, final settlement amount, etc. within the settlement cycle. It is the basic file used for further processing and reconciliation within the system. The roaming user settlement report is a settlement report related to roaming users, which may be provided by roaming partners or other systems. It contains the usage and cost information of roaming users within the settlement cycle and is used for reconciliation with the internal settlement report. A Credit Note is a formal document generated by the system during the settlement process when a roaming partner needs to be refunded. It indicates the credit operation to the roaming partner's account. It is usually used for refunds or deductions from future expenses. A Debit Note is a formal document generated by the system during the settlement process when a roaming partner needs to be charged additional fees. It indicates the debit operation to the roaming partner's account. It is usually used for additional charges or to adjust previous settlement errors.

[0136] It can be understood that SQL query statements are generated according to the settlement instruction parameters (customer, roaming partner, settlement cycle) to extract the pre-settlement data from StarRocks; the business volume consistency of the call bill detail table, monthly summary table and pre-settlement table is verified, and if there is inconsistency, the data correction process is triggered; the tariff model is associated with the settlement cycle, the monthly / quarterly / contract period settlement amount is calculated, and the final settlement amount is generated after comparison with the minimum commitment rule; the internal settlement report is reconciled with the settlement report provided by the roaming partner, and an abnormal alarm is generated if the difference exceeds the threshold;

[0137] Based on the reconciliation results, CN / DN is automatically issued in the financial settlement system, and the StarRocks offset interface is called to complete the closed-loop processing.

[0138] For example, in a special tariff settlement system for a certain communication service, when a settlement instruction is received, the system first generates a corresponding query statement based on parameters in the settlement instruction, such as customer ID, roaming partner ID, service type, settlement cycle, settlement currency, etc. For example, an SQL query statement is generated to retrieve specific special tariff information from a real-time data warehouse.

[0139] Next, the system uses the generated query statement to extract the corresponding special tariff information from the real-time data warehouse. This special tariff information is the pre-settlement amount after auditing and correction, ensuring the accuracy and consistency of the data. The data stored in the real-time data warehouse is synchronized offline and in real-time, containing the latest business data and change events.

[0140] Then, the system settles the extracted special tariff information according to the settlement cycle in the settlement instruction. For example, if the settlement cycle is monthly, the system will aggregate all the special tariff information within that month and calculate according to the preset tariff model and minimum commitment rules to obtain an internal settlement report. The internal settlement report details various expense items, discount application situations, final settlement amounts, etc. within the settlement cycle.

[0141] Subsequently, the system obtains the roaming user settlement report, which may come from the roaming partner or other relevant systems and contains the usage and expense information of the roaming user within the settlement cycle. The system reconciles the internal settlement report with the roaming user settlement report, compares the settlement data of both sides, finds the differences and makes corresponding adjustments and processing. After the reconciliation is completed, the system generates a credit note and a debit note, which are respectively used to record the fees to be refunded to the roaming partner and the additional fees to be charged to the roaming partner.

[0142] Finally, the system performs the final settlement operation according to the credit note and debit note to generate a special tariff settlement report. This report synthesizes all the information of the internal settlement report and the roaming user settlement report, and is the final settlement result after reconciliation and adjustment, which is an important basis for financial settlement and legal reconciliation with the roaming partner. The special tariff settlement report will be used for subsequent financial processing and business decision-making to ensure the closed-loop and efficient settlement process of the special tariff business.

[0143] Exemplarily, in the special tariff settlement system of a certain communication service, when the settlement cycle arrives, the system automatically triggers the settlement process. The system settles the special tariff information according to the preset tariff model and minimum commitment rules and generates a special tariff settlement report.

[0144] The system generates a query statement according to the parameters in the settlement instruction and extracts the corresponding special tariff information from the real-time data warehouse. This information is the pre-settlement amount after auditing and correction, ensuring the accuracy and consistency of the data.

[0145] The system settles the special tariff information according to the settlement period and generates an internal settlement report. Then, the system automatically obtains the settlement report of roaming users and reconciles it with the internal settlement report. During the reconciliation process, the system automatically compares the service usage and amount of both parties to generate credit notices and debit notices to record the fees to be refunded or charged.

[0146] Finally, based on these notices, the system automatically adjusts the settlement result to generate the final special tariff settlement report. This report details various fee items, discount applications, the final settlement amount, and relevant reconciliation information during the settlement period, and is an important basis for financial settlement and legal reconciliation with roaming partners. The entire process requires no manual intervention, achieving an automated closed-loop processing of special tariff settlement, improving the settlement efficiency and accuracy.

[0147] Refer to Figure 2 , this embodiment provides a special tariff service settlement method. First, the present application extracts special tariff data from the call detail record file and stores it in slices in the special settlement service database using a distributed storage model, which can greatly improve the data processing speed. Then, this data is synchronized to the real-time data warehouse for subsequent settlement calls. Once a settlement instruction is received, the corresponding special tariff information is extracted from the real-time data warehouse, settled in combination with the settlement period, and finally a special tariff settlement report is output. The present application significantly reduces the time and effort of manual operations, improves the settlement efficiency, and also significantly reduces the risk of data inaccuracy, achieving seamless docking with the data clearing and financial clearing systems, forming a complete business closed-loop processing, improving the current inefficient phenomenon relying on manual calculation, and realizing the improvement of the settlement efficiency of special tariffs.

[0148] Exemplarily, to help understand the implementation process of the special tariff service settlement method obtained by combining the above Embodiment 1, please refer to Figure 3 , Figure 3 provides a schematic diagram of the brief process of a special tariff service settlement method, specifically:

[0149] The data clearing system completes the processing of the TAP file, forms a text file of special tariffs from the parsed call details, and establishes a mapping relationship between the TAP file and the special tariff call detail file. The special tariff call detail processing module extracts valid data from the special tariff call detail file, including operations such as duplicate removal, field supplementation, and format unification, classifies the data into call detail data and call summary data, and stores it in the special settlement service database.

[0150] Adopt the optimized Sharding-JDBC database sharding and table partitioning technology to achieve horizontal expansion support for large tables in the special settlement business database and distributed transaction services. When Sharding-JDBC starts, load table metadata through asynchronous tasks and record the loading progress through status identifiers to avoid the problem of slow application startup. Load sharding rules from the data source and implement dynamic management and update of sharding rules through SQL annotations and rule metadata models. According to the sharding rules, store the structured call record files in slices in the special settlement business database to improve data processing efficiency and scalability.

[0151] Deploy the SeaTunnel tool cluster and configure the mapping relationship and synchronization mechanism between the data source and the target data source. For existing database tables, use SeaTunnel for offline full-volume data synchronization, including various data tables in the data clearing business system, financial clearing business system, and special tariff business system. After completing the full-volume synchronization, modify the configuration to real-time incremental synchronization to perform real-time synchronization on the newly added special tariff business settlement call record file information and the parsed details of the call records after table partitioning and sharding.

[0152] The rating and settlement module calls the FE of StarRocks through SeaTunnel to query the sharding metadata information of the corresponding table, obtains the data distribution of the data to be read, and then directly reads the data from multiple BE nodes of StarRocks in a distributed parallel manner. According to the parameters of the settlement instruction (such as customer, roaming partner, service type, settlement period, etc.), obtain the attributes of the valid tariff and perform monthly pre-settlement processing, including judging the minimum commitment of service usage, associating tariff values and currency types for rating calculation, etc.

[0153] The reporting system generates a settlement report based on the settlement results, and business personnel reconcile with the roaming partner according to the settlement report. In the financial clearing system, issue or enter CN / DN, and the financial clearing system calls all the bill data of StarRocks to complete the write-off, realizing the automated closed-loop processing of international roaming call records.

[0154] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the special tariff business settlement method of this application. Based on this technical concept, more forms of simple transformations are within the protection scope of this application.

[0155] This application also provides a special tariff business settlement device. Please refer to Figure 4 . The special tariff business settlement device includes:

[0156] The sharding storage module 10 is used to extract corresponding special tariff information from the real-time data warehouse when receiving a settlement instruction. Among them, the real-time data warehouse synchronizes the business data of the special settlement service database in real time. The business data is obtained by extracting data from the acquired call record file and is shard-stored in the special settlement service database through a distributed storage model that loads sharding rules from the data source.

[0157] The settlement module 20 is used to settle the special tariff information to obtain a special tariff settlement report.

[0158] And / or, the special tariff service settlement device includes:

[0159] The first acquisition module is used to acquire call record files;

[0160] The first extraction module is used to perform valid data extraction and data preprocessing on the call record file according to preset information extraction rules to obtain business data;

[0161] The first loading module is used to use the preset rule metadata model as the data source and asynchronously load sharding rules using a database sharding and table partitioning tool;

[0162] The first storage module is used to store the business data in the special settlement service database through the distributed storage model based on the sharding rules.

[0163] And / or, the first loading module includes:

[0164] The first creation module is used to create a metadata loading task according to the preset rule metadata model;

[0165] The first asynchronous execution module is used to asynchronously execute the metadata loading task using a database sharding and table partitioning tool, record the loading progress through a status identifier. Among them, when loading default metadata, skip the sharded table, and concurrently load the metadata of the sharded table through a preset sharding execution engine. When calling the public method of the sharded table metadata, judge the loading status based on the status identifier. If the loading status is not completed, suspend the thread and wait. If the loading status is in progress, reject the call operation. If the loading status is completed, execute the call operation normally.

[0166] And / or, the first loading module includes:

[0167] The second creation module is used to create a sharding rule table and a sharding rule extension table, and combine them to obtain sharding rules;

[0168] The first conversion module is used to convert the sharding rules into automatic loading instructions through sharding annotations;

[0169] A second loading module, configured to load the sharding rule table and the sharding rule extension table when creating a database table;

[0170] A first verification module, configured to verify and refresh the sharding rule table and the sharding rule extension table,

[0171] A third creation module, configured to create and refresh a rule metadata model according to the classification rule extension table.

[0172] And / or, the special tariff service settlement device includes:

[0173] A fourth creation module, configured to create a target library table in a real-time data warehouse according to a preset bucketing rule;

[0174] A first configuration module, configured to configure a data integration engine and configure a synchronization mechanism through the data integration engine;

[0175] A first synchronization module, configured to offline synchronize service data of the special settlement service database to the real-time data warehouse through the data integration engine and the synchronization mechanism;

[0176] A second synchronization module, configured to monitor a change event of service data of the special settlement service database and synchronize it to the real-time data warehouse in real time.

[0177] And / or, the settlement module 20 includes:

[0178] A first generation module, configured to generate a query statement according to parameters of the settlement instruction;

[0179] A second extraction module, configured to extract special tariff information corresponding to the query statement in the real-time data warehouse, where the special tariff information is a pre-settlement amount after audit and correction;

[0180] A first settlement module, configured to settle the special tariff information according to a settlement period in the settlement instruction to obtain an internal settlement report;

[0181] A first reconciliation module, configured to obtain a roaming user settlement report, reconcile the internal settlement report with the roaming user settlement report to obtain a credit notice and a debit notice;

[0182] A second settlement module, configured to settle according to the credit notice and the debit notice to obtain a special tariff settlement report.

[0183] The special tariff service settlement device provided by this application adopts the special tariff service settlement method in the above embodiment, and can solve the technical problem of low settlement efficiency of special tariffs. Compared with the prior art, the beneficial effects of the special tariff service settlement device provided by this application are the same as those of the special tariff service settlement method provided by the above embodiment, and other technical features in the special tariff service settlement device are the same as the features disclosed in the above embodiment method, and will not be elaborated here.

[0184] This application provides a special tariff service settlement device, and the special tariff service settlement device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the special tariff service settlement method in the first embodiment above.

[0185] Refer to the following Figure 5 , which shows a schematic structural diagram of a special tariff service settlement device suitable for implementing the embodiments of this application. The special tariff service settlement device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, tablet computers, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PMPs (Portable Media Players), in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The special tariff service settlement device shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of this application.

[0186] As Figure 5As shown, the special tariff service settlement device may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM: Read Only Memory) 1002 or the program loaded from the storage device 1003 into the random access memory (RAM: Random Access Memory) 1004. In the RAM 1004, various programs and data required for the operation of the special tariff service settlement device are also stored. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. The input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the special tariff service settlement device to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows a special tariff service settlement device with various systems, it should be understood that it is not required to implement or have all the shown systems. Instead, more or fewer systems can be implemented or had.

[0187] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device, or installed from the storage device 1003, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above functions defined in the methods of the embodiments disclosed in the present application are executed.

[0188] The special tariff service settlement device provided by the present application adopts the special tariff service settlement method in the above embodiments, and can solve the technical problem of low settlement efficiency of special tariffs. Compared with the prior art, the beneficial effects of the special tariff service settlement device provided by the present application are the same as those of the special tariff service settlement method provided by the above embodiments, and other technical features in the special tariff service settlement device are the same as those disclosed in the method of the previous embodiment, and will not be elaborated here.

[0189] It should be understood that each part disclosed in this application can be implemented by hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in a suitable manner in any one or more embodiments or examples.

[0190] As described above, the above is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed in this application can easily think of changes or substitutions, which should all be covered within the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

[0191] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the special tariff service settlement method in the above embodiments.

[0192] The computer-readable storage medium provided by this application can be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) or flash memory, optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this embodiment, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or combined with an instruction execution system, device, or device. The program code contained on the computer-readable storage medium can be transmitted by any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0193] The above computer-readable storage medium can be included in the special tariff service settlement device; it can also exist alone without being assembled into the special tariff service settlement device.

[0194] The above computer-readable storage medium carries one or more programs, which when executed by the special tariff service settlement device, cause the special tariff service settlement device to: when receiving a settlement instruction, extract corresponding special tariff information from the real-time data warehouse, where the real-time data warehouse synchronizes the service data of the special settlement service database in real time, and the service data is obtained by extracting data from the acquired call record file and is stored in the special settlement service database in a sharded manner through a distributed storage model that loads sharding rules from the data source;

[0195] Settle the special tariff information to obtain a special tariff settlement report.

[0196] Computer program code for performing the operations of the present application can be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., by using an Internet service provider to connect through the Internet).

[0197] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagram can represent a module, a program segment, or a part of the code that contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.

[0198] The modules involved in the embodiments of the present application can be implemented in software or in hardware. In some cases, the name of the module does not constitute a limitation on the unit itself.

[0199] The readable storage medium provided by the present application is a computer-readable storage medium, and the computer-readable storage medium stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned special tariff service settlement method, which can solve the technical problem of low settlement efficiency of special tariffs. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as those of the special tariff service settlement method provided by the above embodiments, and will not be elaborated here.

[0200] The present application also provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of the special tariff service settlement method as described above are implemented.

[0201] The computer program product provided by the present application can solve the technical problem of low settlement efficiency of special tariffs. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as those of the special tariff service settlement method provided by the above embodiments, and will not be elaborated here.

[0202] The above are only some embodiments of the present application, and thus do not limit the patent scope of the present application. Any equivalent structural transformation made under the technical concept of the present application by using the content of the specification and drawings of the present application, or any direct / indirect application in other related technical fields, is included in the patent protection scope of the present application.

Claims

1. A special tariff service settlement method, characterized in that The method described above includes: When receiving a settlement instruction, extract corresponding special tariff information from the real-time data warehouse. Among them, the real-time data warehouse synchronizes the business data of the special settlement business database in real time. The business data is obtained by extracting data from the acquired call detail record (CDR) files, and is stored in the special settlement business database in a sharded manner through a distributed storage model that loads sharding rules from the data source. Settle the special tariff information to obtain a special tariff settlement report.

2. The method according to claim 1, characterized in that, The step that the business data is obtained by extracting data from the acquired call detail record (CDR) files and is stored in the special settlement business database in a sharded manner through a distributed storage model that loads sharding rules from the data source includes: Obtain call detail record (CDR) files. According to the preset information extraction rules, perform effective data extraction and data preprocessing on the call detail record (CDR) files to obtain business data. Use the preset rule metadata model as the data source and asynchronously load sharding rules using a database sharding and table partitioning tool. Based on the sharding rules, store the business data in the special settlement business database through the distributed storage model.

3. The method according to claim 2, wherein The step that uses the preset rule metadata model as the data source and asynchronously loads sharding rules using a database sharding and table partitioning tool includes: Create a metadata loading task according to the preset rule metadata model. Asynchronously execute the metadata loading task using a database sharding and table partitioning tool, and record the loading progress through a status identifier. Among them, when loading default metadata, skip the sharded tables, and concurrently load the metadata of the sharded tables through a preset sharding execution engine. When calling the public method of the sharded table metadata, judge the loading status based on the status identifier. If the loading status is not completed, suspend the thread and wait. If the loading status is in progress, reject the call operation. If the loading status is completed, execute the call operation normally.

4. The method according to claim 2, wherein Before the step that uses the preset rule metadata model as the data source and asynchronously loads sharding rules using a database sharding and table partitioning tool includes: Create a sharding rule table and a sharding rule extension table, and combine them to obtain sharding rules. Convert the sharding rules into automatic loading instructions through sharding annotations. When creating a database table, load the sharding rule table and the sharding rule extension table. Verify and refresh the sharding rule table and the sharding rule extension table. Create and refresh a rule metadata model according to the classification rule extension table.

5. The method according to claim 1, characterized in that The step that the real-time data warehouse synchronizes the business data of the special settlement business database in real time includes: Create a target database table in the real-time data warehouse according to the preset bucketing rules. Configure a data integration engine and configure a synchronization mechanism through the data integration engine. Through the data integration engine and the synchronization mechanism, offline synchronize the business data of the special settlement business database to the real-time data warehouse. Monitor the change events of the business data of the special settlement business database and synchronize them to the real-time data warehouse in real time.

6. The method according to claim 1, wherein The step that settles the special tariff information to obtain a special tariff settlement report includes: Generate a query statement according to the parameters of the settlement instruction. Extract the special tariff information corresponding to the query statement in the real-time data warehouse. Among them, the special tariff information is the pre-settlement amount after audit and correction. Settle the special tariff information according to the settlement period in the settlement instruction to obtain an internal settlement report; Obtain a roaming user settlement report, reconcile the internal settlement report with the roaming user settlement report to obtain a credit note and a debit note; Settle according to the credit note and the debit note to obtain a special tariff settlement report.

7. A special tariff service settlement device, characterized in that The device includes: A shard storage module, configured to extract corresponding special tariff information from a real-time data warehouse when receiving a settlement instruction, wherein the real-time data warehouse synchronizes the service data of a special settlement service database in real time, the service data is obtained by extracting data from the obtained call record file, and is shard stored in the special settlement service database through a distributed storage model that loads shard rules from a data source; A settlement module, configured to settle the special tariff information to obtain a special tariff settlement report.

8. A special tariff service settlement device, characterized in that, The device includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program is configured to implement the steps of the special tariff service settlement method according to any one of claims 1 to 6.

9. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium, and when the computer program is executed by a processor, the steps of the special tariff service settlement method according to any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that, The computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the special tariff service settlement method according to any one of claims 1 to 6 are implemented.

Citation Information

Cited By

  • Cost calculation method and device and electronic equipment

    CN120910157A