A charging method and system
By introducing a collaborative working mechanism of the main center, backup center and decision-making unit in the billing system, automated handling billing is achieved, solving the problems of low efficiency and low accuracy of manual billing in the existing technology, and improving the automation efficiency and accuracy of billing.
Patent Information
- Application Number
- CN202110225965.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-01
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2041-03-01
AI Technical Summary
The existing handling billing methods rely on manual operations, resulting in low efficiency, low accuracy and high human resources consumption, especially in the case of high transaction volumes, it is difficult to achieve efficient billing and accurate results.
An automated billing method based on a billing system is designed. Through the collaborative work of the main center and the backup center, the preset billing rules and data matching mechanism are used to automatically determine the handling fee of the transaction to be billed, and the working status is adjusted through the decision unit when the data does not match.
It realizes automation of the billing process, improves billing efficiency and accuracy, reduces dependence on labor, and is suitable for high transaction volume scenarios.
Smart Images

Figure CN114997981B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of business processing, and in particular to a billing method and system. Background Art
[0002] With the development of the Internet, a considerable part of transactions in production and life need to be carried out by member institutions with the help of services provided by banks. Banks that provide services to member institutions also charge certain fees to member institutions.
[0003] Existing fee billing methods are mostly done manually, with problems such as low efficiency, low accuracy, and high human resource consumption. In addition, the fee is determined for each transaction separately. If the number of transactions that need to be billed is large, the billing workload will be large. Especially in the scenario where member institutions settle on a monthly basis, the number of transactions executed in a month is as high as 100 million, which further increases the difficulty of achieving efficient billing, obtaining accurate billing results, and reducing human resource consumption. Summary of the invention
[0004] The embodiments of the present application provide a billing method and system to at least partially solve the problems of low efficiency, low accuracy, and high human resource consumption caused by manual determination of handling fees.
[0005] The present application embodiment adopts the following technical solutions:
[0006] In a first aspect, an embodiment of the present application provides a first billing method, the billing method is based on a billing system, the billing system includes a main center and several backup centers, the method is executed by any one of the backup centers, wherein the method includes:
[0007] Acquire data of each transaction to be charged as first available data, wherein the first available data is used to determine a handling fee of the transaction to be charged;
[0008] Adopting a preset charging rule, according to the first available data, for each transaction to be charged, obtaining the first data of the transaction to be charged, and storing it locally in the backup center; the charging rule is used to determine the handling fee of the transaction to be charged;
[0009] Acquire each second data generated by the main center for each transaction to be charged;
[0010] If the first data and the second data match, the handling fee of the transaction to be charged is obtained according to the first data of the transaction to be charged.
[0011] In an optional embodiment of this specification, the billing system is connected to a preset transaction database;
[0012] The transaction database is used to store data of transactions to be billed, where the data is sent by a member institution corresponding to the billing system.
[0013] In an optional embodiment of the present specification, obtaining each second data generated by the main center for each transaction to be charged includes:
[0014] A first designated message sent by the main center is received, wherein the first designated message carries second data generated by the main center.
[0015] In an optional embodiment of the present specification, obtaining each second data generated by the main center for each transaction to be charged includes:
[0016] receiving a second designated message sent by the main center, wherein the second designated message indicates a storage location of second data generated by the main center;
[0017] According to the second designated message, second data is acquired.
[0018] In an optional embodiment of the present specification, before obtaining the handling fee of the transaction to be charged, the method includes:
[0019] Among the fields of the first data, determine a field showing a transaction identifier as a first target field;
[0020] Determining whether there is second data corresponding to the first target field;
[0021] If so, determining that the second data corresponding to the first target field is second data that matches the first data of the transaction to be charged;
[0022] If not, it is determined that there is no second data matching the first data of the transaction to be charged.
[0023] In an optional embodiment of the present specification, the billing system further includes a decision unit; the decision unit is used to generate a decision when the first data and the second data do not match, so that at least one of the centers adjusts the working state according to the decision; the method further includes:
[0024] If the first data and the second data do not match, a first warning message is generated and sent to the decision unit, so that the decision unit generates a first decision.
[0025] In an optional embodiment of the present specification, the first decision includes: verifying a first sub-decision; the verifying first sub-decision is used to verify the status of the main center; the method also includes:
[0026] Receiving a first verification result sent by the decision unit;
[0027] If the first verification result shows that the status of the main center is abnormal, then if the backup center meets the preset conditions, the backup center is changed to a new main center and the handling fee for the transaction to be charged is re-determined; the first verification result is obtained based on the first verification sub-decision.
[0028] In an optional embodiment of the present specification, the first decision includes: verifying the second sub-decision;
[0029] The second sub-decision of verification is used to verify the status of the backup center; the method further includes:
[0030] receiving a second verification result sent by the decision unit;
[0031] If the second result of the verification shows that the status of the backup center is abnormal, the backup center is disabled.
[0032] In an optional embodiment of the present specification, disabling the backup center includes:
[0033] Acquire a fee settlement rule of a member institution corresponding to the billing system, wherein the fee settlement rule shows a first cycle of fee settlement of the member institution;
[0034] The backup center is disabled during the first cycle corresponding to the transaction to be billed being processed at the current moment.
[0035] In an optional embodiment of the present specification, the first decision includes: a first sub-decision of re-billing;
[0036] The first re-billing sub-decision is used to re-determine the handling fee of the transaction to be billed; the method further includes:
[0037] Obtaining a re-determined handling fee for the transaction to be charged;
[0038] Update local storage based on the re-determined handling fee.
[0039] In an optional embodiment of the present specification, obtaining the handling fee of the transaction to be charged according to the first data of the transaction to be charged includes:
[0040] For each transaction to be charged, second data matching the first data of the transaction to be charged is determined as reference data; and a field showing transaction content in the first data of the transaction to be charged is determined as a second target field;
[0041] Determine whether there is a field matching the second target field in each reference data;
[0042] If yes, obtaining the handling fee of the transaction to be charged according to the handling fee indicated by the first data of the transaction to be charged;
[0043] If not, a second alarm message is generated and sent to the decision unit, so that the decision unit generates a second decision, and obtains the handling fee of the transaction to be charged according to the second decision, and stores it locally in the backup center.
[0044] In an optional embodiment of the present specification, the first target field shows the transaction flow identifier of the transaction to be charged; and / or,
[0045] The second target field indicates at least one of the following information: resources corresponding to the transaction to be charged, the type of the transaction to be charged, the identifier of the member institution corresponding to the transaction to be charged, and the time when the transaction to be charged is executed.
[0046] In an optional embodiment of the present specification, the transaction to be charged is a transaction executed within a preset second cycle; a plurality of second cycles constitute the first cycle;
[0047] Obtaining the handling fee of the transaction to be charged according to the handling fee indicated by the first data of the transaction to be charged, including:
[0048] Marking the first data of the transaction to be charged as normal;
[0049] For each second cycle, when marking of each first data corresponding to the second cycle is completed, the number of first data marked as normal in the first data corresponding to the second cycle is determined as the first number corresponding to the second cycle; and the local storage of the backup center is updated according to the first data marked as normal;
[0050] When marking of each first data corresponding to the first cycle is completed, the sum of each first quantity corresponding to each second cycle within the first cycle is used as the second quantity corresponding to the first cycle;
[0051] If the difference between the number of first data marked as normal stored locally in the backup center and the second number is less than a preset difference threshold, the handling fee shown by the first data marked as normal stored locally in the backup center is determined as the handling fee for the transaction to be billed executed within the first cycle.
[0052] In an optional embodiment of this specification, the method further includes:
[0053] If the difference between the number of the first data marked as normal and the second number stored locally in the backup center is not less than a preset difference threshold, a third alarm message is generated and sent to the decision unit, so that the decision unit generates a third decision;
[0054] The handling fee of the transaction to be charged is obtained according to the third decision, and the local storage is updated.
[0055] In a second aspect, an embodiment of the present application also provides a second billing method, which is based on a billing system, the billing system includes a main center and several backup centers, and the method is executed by the main center, wherein the method includes:
[0056] Acquire data of each transaction to be charged as second available data, wherein the second available data is used to determine a handling fee of the transaction to be charged;
[0057] Adopting a preset charging rule, according to the second available data, for each transaction to be charged, obtaining the second data of the transaction to be charged, and storing it locally; the charging rule is used to determine the handling fee of the transaction to be charged;
[0058] Sending the second data to any one of the backup centers; allowing the backup center to determine whether the first data obtained by itself matches the received second data;
[0059] Under the condition that the judgment result generated by the backup center is yes, the handling fee of each transaction to be charged is obtained according to the second data stored locally, and the local storage is updated according to the obtained handling fee.
[0060] In an optional embodiment of the present specification, the billing system further includes a decision unit; the decision unit is used to make at least one of the centers re-determine the handling fee of the transaction to be billed if the judgment result of the backup center is negative;
[0061] The method further comprises:
[0062] In any center in the billing system, when the handling fee is re-determined according to the decision of the decision unit, the re-determined handling fee is obtained and stored locally.
[0063] In an optional embodiment of the present specification, the billing system further includes a decision unit; and the method further includes:
[0064] Receiving the first verification result sent by the decision unit;
[0065] If the first verification result shows that the status of the main center is abnormal, the main center is disabled.
[0066] In an optional embodiment of the present specification, disabling the main center includes:
[0067] Acquire a fee settlement rule of a member institution corresponding to the billing system, wherein the fee settlement rule shows a first cycle of fee settlement of the member institution;
[0068] The main center is disabled during the first cycle corresponding to the transaction to be billed being processed at the current moment.
[0069] In a third aspect, an embodiment of the present application also provides a second billing method, which is based on a billing system, the billing system includes a main center, several backup centers and a decision unit, and the method is executed by the decision unit, wherein the method includes:
[0070] Receiving alarm information sent by any backup center, where the alarm information is generated by the backup center under the condition that the first data and the second data do not match; the first data and the second data are obtained according to any of the aforementioned methods;
[0071] A first decision is generated based on the alarm information and sent to at least one of a backup center that generates the first data and a main center that generates the second data; so that at least one of the backup center and the main center adjusts the working status based on the first decision.
[0072] In an optional embodiment of the present specification, the first decision includes: verifying the first sub-decision; the verifying the first sub-decision is used to verify the status of the main center;
[0073] Generating a first decision according to the alarm information and sending the decision to at least one of a backup center generating the first data and a main center generating the second data, including:
[0074] Generate a first sub-decision for verification and send it to the main center;
[0075] Generate a first verification result according to the feedback of the main center on the first sub-decision; the first verification result indicates whether the main center is abnormal;
[0076] The first verification result is sent to the main center and each backup center. When the first verification result shows that the main center is abnormal, the main center is switched to a disabled state, and one of the backup centers is changed to a new main center when preset conditions are met.
[0077] In a fourth aspect, an embodiment of the present application also provides a first billing device, wherein the device is applied to at least one backup center in a billing system, and the billing system includes a main center and several backup centers; the device is used to implement any of the methods described in the first aspect above.
[0078] In the fifth aspect, an embodiment of the present application also provides a second billing device, wherein the device is applied to a main center in a billing system, and the billing system includes a main center and several backup centers; the device is used to implement any of the methods described in the aforementioned second aspect.
[0079] In a sixth aspect, an embodiment of the present application also provides a third billing device, wherein the billing method device is based on a billing system, wherein the billing system includes a main center, several backup centers, and a decision unit, and the device is applied to the decision unit, and the device includes:
[0080] A receiving module, configured to receive alarm information sent by any backup center, wherein the alarm information is generated by the backup center under the condition that the first data and the second data do not match; the first data and the second data are obtained according to any one of the methods described in the first aspect, the second aspect, and the third aspect;
[0081] The first decision generation module is configured to generate a first decision based on the alarm information and send it to at least one of the backup center that generates the first data and the main center that generates the second data; so that at least one of the backup center and the main center adjusts the working status according to the first decision.
[0082] In an optional embodiment of the present specification, the first decision includes: verifying the first sub-decision; the verifying the first sub-decision is used to verify the status of the main center;
[0083] The first decision generating module is specifically configured to generate a first decision according to the alarm information, and send the first decision to at least one of a backup center generating the first data and a main center generating the second data, including:
[0084] Generate a first sub-decision for verification and send it to the main center;
[0085] Generate a first verification result according to the feedback of the main center on the first sub-decision; the first verification result indicates whether the main center is abnormal;
[0086] The first verification result is sent to the main center and each backup center. When the first verification result shows that the main center is abnormal, the main center is switched to a disabled state, and one of the backup centers is changed to a new main center when preset conditions are met.
[0087] In a seventh aspect, an embodiment of the present application further provides a billing system, the billing system comprising a main center and a plurality of backup centers;
[0088] The main center is configured to: obtain data of each transaction to be charged as second available data, wherein the second available data is used to determine the handling fee of the transaction to be charged; adopt a preset charging rule, and obtain the second data of the transaction to be charged according to the second available data for each transaction to be charged, store it locally, and send the second data to any one of the backup centers; the charging rule is used to determine the handling fee of the transaction to be charged;
[0089] The backup center is configured to: obtain data of each transaction to be charged as first available data, wherein the first available data is used to determine the handling fee of the transaction to be charged; adopt a preset charging rule, and obtain first data of the transaction to be charged for each transaction to be charged according to the first available data, and store it locally in the backup center; obtain second data generated by the main center for each transaction to be charged; determine whether there is second data matching the first data obtained by itself; and if the determination result is yes, obtain the handling fee of the transaction to be charged according to the first data of the transaction to be charged;
[0090] The main center is further configured to: under the condition that the judgment result generated by the backup center is yes, obtain the handling fee of each transaction to be charged according to the second data stored locally, and update the local storage according to the obtained handling fee.
[0091] In an optional embodiment of the present specification, the billing system further includes a decision-making unit;
[0092] The decision unit is configured to: under the condition that the judgment result of the backup center is negative, enable at least one of the centers to re-determine the handling fee of the transaction to be charged.
[0093] In an eighth aspect, an embodiment of the present application further provides an electronic device, the electronic device comprising:
[0094] Processor; and
[0095] A memory arranged to store computer executable instructions, wherein when the executable instructions are executed, the processor performs any one of the methods provided in the first aspect of this specification, the method comprising:
[0096] Acquire data of each transaction to be charged as first available data, wherein the first available data is used to determine a handling fee of the transaction to be charged;
[0097] Adopting a preset charging rule, according to the first available data, for each transaction to be charged, obtaining the first data of the transaction to be charged, and storing it locally in the backup center; the charging rule is used to determine the handling fee of the transaction to be charged;
[0098] Acquire each second data generated by the main center for each transaction to be charged;
[0099] If the first data and the second data match, the handling fee of the transaction to be charged is obtained according to the first data of the transaction to be charged.
[0100] When the executable instruction is executed, the processor executes any one of the methods provided in the first aspect of this specification, the method comprising:
[0101] Acquire data of each transaction to be charged as second available data, wherein the second available data is used to determine a handling fee of the transaction to be charged;
[0102] Adopting a preset charging rule, according to the second available data, for each transaction to be charged, obtaining the second data of the transaction to be charged, and storing it locally; the charging rule is used to determine the handling fee of the transaction to be charged;
[0103] Sending the second data to any one of the backup centers; allowing the backup center to determine whether the first data obtained by itself matches the received second data;
[0104] If the judgment result generated by the backup center is yes, the handling fee of each transaction to be charged is obtained according to the second data stored locally, and the local storage is updated according to the obtained handling fee. Or,
[0105] Receiving alarm information sent by any backup center, where the alarm information is generated by the backup center under the condition that the first data and the second data do not match; the first data and the second data are obtained according to any of the aforementioned methods;
[0106] A first decision is generated based on the alarm information and sent to at least one of a backup center that generates the first data and a main center that generates the second data; so that at least one of the backup center and the main center adjusts the working status based on the first decision.
[0107] In a ninth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores one or more programs, and when the one or more programs are executed by an electronic device including multiple application programs, the electronic device executes any one of the methods provided in the first aspect of this specification, and the method includes:
[0108] Acquire data of each transaction to be charged as first available data, wherein the first available data is used to determine a handling fee of the transaction to be charged;
[0109] Adopting a preset charging rule, according to the first available data, for each transaction to be charged, obtaining the first data of the transaction to be charged, and storing it locally in the backup center; the charging rule is used to determine the handling fee of the transaction to be charged;
[0110] Acquire each second data generated by the main center for each transaction to be charged;
[0111] If the first data and the second data match, the handling fee of the transaction to be charged is obtained according to the first data of the transaction to be charged.
[0112] When the one or more programs are executed by an electronic device including a plurality of application programs, the electronic device executes any one of the methods provided in the first aspect of this specification, the method comprising:
[0113] Acquire data of each transaction to be charged as second available data, wherein the second available data is used to determine a handling fee of the transaction to be charged;
[0114] Adopting a preset charging rule, according to the second available data, for each transaction to be charged, obtaining the second data of the transaction to be charged, and storing it locally; the charging rule is used to determine the handling fee of the transaction to be charged;
[0115] Sending the second data to any one of the backup centers; allowing the backup center to determine whether the first data obtained by itself matches the received second data;
[0116] If the judgment result generated by the backup center is yes, the handling fee of each transaction to be charged is obtained according to the second data stored locally, and the local storage is updated according to the obtained handling fee. Or,
[0117] Receiving alarm information sent by any backup center, where the alarm information is generated by the backup center under the condition that the first data and the second data do not match; the first data and the second data are obtained according to any of the aforementioned methods;
[0118] A first decision is generated based on the alarm information and sent to at least one of a backup center that generates the first data and a main center that generates the second data; so that at least one of the backup center and the main center adjusts the working status based on the first decision.
[0119] At least one of the above technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects: the billing method and system in this specification can greatly reduce the dependence of the billing process on manual work, realize the automation of the billing process, and improve the efficiency of billing. In addition, the billing process in this specification is based on a billing system, and the billing system includes a main center and several backup centers. After the backup center generates first data representing the handling fee of the transaction to be billed and the main center generates second data representing the handling fee of the transaction to be billed, it is determined whether the first data matches the second data. If they match, it indicates that the handling fee shown by the first data and the second data is likely to be accurate data. It can be seen that the process in this specification can also improve the accuracy of the obtained handling fee. BRIEF DESCRIPTION OF THE DRAWINGS
[0120] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0121] Figure 1 A schematic diagram of a scenario in which a billing system is used to perform billing according to an embodiment of this specification;
[0122] Figure 2 A schematic diagram of a process of using a billing system to perform billing provided in an embodiment of this specification;
[0123] Figure 3 A schematic diagram of at least some steps of a billing process provided in an embodiment of this specification;
[0124] Figure 4 A schematic diagram of the correspondence between the to-be-charged transactions and the cycles provided by the embodiments of this specification;
[0125] Figure 5 A schematic diagram of the structure of the first charging device provided in the embodiment of this specification;
[0126] Figure 6 A schematic diagram of the structure of a second charging device provided in the embodiment of this specification;
[0127] Figure 7 This is a schematic diagram of the structure of the first electronic device in the embodiment of the present application;
[0128] Figure 8 This is a schematic diagram of the structure of a second electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0129] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0130] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.
[0131] The billing process in this specification is based on the billing system. For example, the billing system can perform billing in the following scenarios: Figure 1 As shown. Figure 1 In the scenario shown, the member institutions that provide billing services through the billing system include member institutions a to n.
[0132] When implementing their own business functions, member institutions will generate several transactions and send them to the transaction system, such as Figure 1The transaction system is connected to the billing system, and the billing system determines which transactions sent by member institutions need to be billed and which transactions do not need to be billed. Transactions that need to be billed are transactions to be billed in this specification.
[0133] In an optional embodiment of the present specification, the transaction to be charged may be represented by data in a specified form. The data of the transaction to be charged may show at least one of the following information: the transaction identifier of the transaction to be charged (e.g., a transaction flow identifier, etc.), the resource corresponding to the transaction to be charged (e.g., a transaction amount, etc.), the type of the transaction to be charged (e.g., a transfer transaction, a payment transaction, etc.), the identifier of the member institution corresponding to the transaction to be charged (e.g., the member institution number, the member institution name, etc.), and the time when the transaction to be charged is executed (e.g., the time when the transaction is completed).
[0134] The billing system obtains transaction data from the transaction system, filters out the data of the transactions to be billed, and then calculates the handling fee of the transactions to be billed based on the data of the transactions to be billed. Figure 1 The process of determining the handling fee in this specification is further described in the scenario shown. The process of determining the handling fee in this specification may include Figure 2 One or more of the steps shown.
[0135] S200: After the billing system screens out the data of the transactions to be billed, the main center obtains the data of each transaction to be billed as the second available data.
[0136] like Figure 1 and Figure 2 As shown, the billing system in this specification includes 1 main center and several backup centers. Unless otherwise specified, the "center" below may include the main center and / or the backup center. In this description, the number of backup centers included in the billing system can be determined based on actual business needs. Preferably, the number of backup centers is greater than the number of main centers.
[0137] In an optional embodiment of this specification, the main center and the backup center can have the same billing function. "Main" and "backup" are logical divisions based on the role played by each center in the billing process. In some cases, such as when the main node fails, the main and backup roles of each center can be switched.
[0138] As can be seen from the foregoing, in some optional embodiments, the main center in the billing system is connected to the transaction system in communication, and the main center can generate a first request for obtaining the transaction to be billed, and send it to the transaction system. Then, the transaction system returns the data corresponding to the first request to obtain to the main center. The main center determines the data returned by the transaction system as the second available data. The second available data is used to determine the handling fee of the transaction to be billed.
[0139] The "center" in this specification can be a device with a fixed hardware structure, such as a server, a server cluster, etc., or a module with certain functions obtained by logically dividing the software. Furthermore, the "center" can also be a device composed of a combination of hardware and software.
[0140] This specification does not impose any specific restrictions on the layout of a "center". For example, the "center" can be built in a certain computer room; for another example, the "center" can also be composed of several parts dispersed in different geographical locations.
[0141] It should be noted that “several” in this specification means “one or more than one”.
[0142] S202: The main center adopts a preset charging rule, and according to the second available data, obtains second data of each transaction to be charged, and stores the second data locally.
[0143] The billing rules in this specification are used to determine the handling fee for the transaction to be billed. The billing rules can be obtained based on the billing methods historically agreed upon by the member institutions and the business institutions to which the billing system belongs. Since the number of member institutions corresponding to the billing system may not be unique, the number of billing methods agreed upon in history may also be large, and the contents of the specifications of different billing methods are not exactly the same, the billing rules in this specification may be a set of multiple billing methods. The second data in this specification can at least show: the handling fee for the transaction to be billed obtained by the main center.
[0144] In an optional embodiment of the present specification, the second data may include several fields, each field showing at least part of the information of the handling fee of the transaction to be charged from the dimension corresponding to the field. Exemplarily, the second data may include a first target field and a second target field, wherein the first target field shows the flow identification of the transaction to be charged, and the second target field shows at least one of the following information: the resource corresponding to the transaction to be charged, the type of the transaction to be charged, the identification of the member institution corresponding to the transaction to be charged, and the time when the transaction to be charged was executed.
[0145] It should be noted that, in this specification, a transaction is a pending transaction before the accurate handling fee is finally determined. Even if the main center currently determines the second data that can show the handling fee, the accuracy of the second data has not been verified, and the transaction corresponding to the second data is still a pending transaction.
[0146] After the main center stores the obtained second data locally, the second data may be modified, deleted, or marked as abnormal in subsequent steps.
[0147] S204: The main center sends the second data to any one of the backup centers.
[0148] In such Figure 1 In the example shown, centers 1 to 5 in the current billing system are backup centers, each of which can constitute a backup center cluster. The main center (center 6) can send the second data to the backup center cluster to send the second data to each backup center in the backup center cluster.
[0149] In an optional embodiment of the present specification, the main center may generate a first designated message according to the second data, wherein the first designated message carries the second data generated by the main center. Then, the main center sends the first designated message to each backup center, so that the backup center obtains the second data according to the first designated message.
[0150] Optionally, the first designated message may be an MQ message (Message Queue) consisting of second data of a number of transactions to be charged obtained by the main center.
[0151] S206: After the billing system screens out the data of the transactions to be billed, the backup center obtains the data of each transaction to be billed as first available data, where the first available data is used to determine the handling fee of the transaction to be billed.
[0152] In order to determine the accuracy of the information shown in the second data obtained by the main center, the backup center in this specification also determines the handling fee for each transaction to be charged.
[0153] In order to obtain the handling fee of the transaction to be charged through its own data processing, the backup center obtains the data of each transaction to be charged as the first available data. In an optional embodiment of the present specification, if the main center and the backup center are both in normal working state, and the communication between the main center and the backup center and the transaction system is also in normal state, the first available data obtained by the main center and the second available data obtained by the backup center can be the same.
[0154] For the convenience of description, the following will take the i-th backup center in the billing system (i.e., any backup center, such as Figure 2 Taking the backup center i) shown as an example, the interaction process between the main center and any backup center is explained.
[0155] S208: The backup center i adopts a preset charging rule, and according to the first available data, obtains the first data of each transaction to be charged for each transaction to be charged, and stores the first data locally in the backup center.
[0156] In an optional embodiment of the present specification, the process of the backup center i determining the first data may be the same as the process of the main center determining the second data, which will not be described in detail here.
[0157] Similarly, the first data generated by the backup center i in this specification may also include the aforementioned first target field and second target field.
[0158] S210: The backup center i obtains the second data generated by the main center for each transaction to be charged.
[0159] S212: The backup center i determines whether there is second data matching the first data obtained by itself.
[0160] However, in actual scenarios, there may be at least one of the following: a large number of concurrent billing services, a poor state of the center itself, or a poor communication state between the center and the transaction system, which may lead to a certain difference between the first available data and the second available data. Similarly, the first data obtained by the backup center i may also be inaccurate.
[0161] In an optional embodiment of the present specification, the process of determining whether the data matches may be: the backup center i determines the first target field (such as Figure 3 In step S300, for each second data, each field of the second data is searched to determine whether there is second data corresponding to the first target field. If the first target field of the second data that is the same as the first target field of the first data is found, it is determined that the second data is the second data that matches the first data of the transaction to be charged (e.g. Figure 3 If not, it is determined that there is no second data matching the first data of the transaction to be charged (e.g. Figure 3 Step S306 is shown).
[0162] S214: If the first data and the second data match, then according to the first data of the transaction to be charged, the backup center i obtains the handling fee of the transaction to be charged, and updates the local storage according to the obtained handling fee.
[0163] If they match, it means that for the transaction to be charged, both the main center and the backup center i have performed the determination of the handling fee, and there is no phenomenon of missing the transaction to be charged. In addition, if a transaction has been charged in the past, and the main center has performed repeated charging for the transaction, but the backup center i has not performed repeated charging for the transaction, then the backup center i cannot determine the first transaction data related to the repeated charging. It can be seen that the process in this specification can also identify the phenomenon of repeated charging.
[0164] S216: Under the condition that the judgment result generated by the backup center i is yes, the backup center i obtains the handling fee of each transaction to be charged according to the second data stored locally, and updates the local storage according to the obtained handling fee.
[0165] However, in actual scenarios, it is inevitable that the judgment result obtained by the backup center i is: "there is no second data matching the first data of the transaction to be charged in each second data" (such as Figure 3 Thus, in an optional embodiment of the present specification, the charging system further includes a decision-making unit, such as Figure 1 If there is no second data matching the first data of the transaction to be charged in the second data, the backup center i generates a first alarm message and sends it to the decision unit (such as Figure 1 and Figure 3 As shown, the center 1 sends a first warning message to the decision unit, so that the decision unit generates a first decision.
[0166] In an optional embodiment of the present specification, the first decision includes: verifying the first sub-decision. The first sub-decision is used to verify the status of the main center. After receiving the first alarm information, the decision unit performs verification on the main center to determine the status of the main center, and generates a first verification result based on the determined status of the main center, and sends it to the main center and each backup center.
[0167] After receiving the first verification result, if the first verification result shows that the main center is in an abnormal state, the main center disables itself according to the first verification result.
[0168] After receiving the first verification result, if any backup center (for example, backup center i) shows that the status of the main center is abnormal, indicating that the billing system currently has no available main center, the backup center determines whether it meets the preset conditions. If the result of the judgment is yes, it changes itself to the new main center. A notification message is generated and sent to other centers in the billing system except the new main center, and the decision unit.
[0169] In an actual scenario, there may be multiple backup centers that all determine that they meet the preset conditions. In this case, the backup center that generates and sends the notification message first can be determined as the main center.
[0170] After the main center is redetermined, the redetermined main center is used to perform billing, and each center in the billing system updates its local storage according to the redetermined handling fees, so that the local storage of each center in the billing system is accurate.
[0171] In addition, the phenomenon that the second data matching the first data cannot be determined may also be due to the backup center (for example, backup center i, such as Figure 3 In another optional embodiment of the present specification, the first decision includes: verifying the second sub-decision; the verifying the second sub-decision is used to verify the state of the backup center.
[0172] After receiving the first alarm information, the decision unit performs verification on the backup center (specifically, the backup center is the backup center that sends the first alarm information) to determine the status of the backup center, and generates a second verification result based on the determined status of the backup center, and sends it to the main center and the backup center.
[0173] After receiving the second verification result, if the second verification result shows that the standby center is in an abnormal state, the main center will no longer send the second data generated by it to the standby center corresponding to the first verification result.
[0174] After receiving the second verification result, if the second verification result shows that the state of the backup center is abnormal, the backup center disables itself.
[0175] like Figure 3 As shown, if the backup center i determines that the second data is the second data that matches the first data generated by it (step S304), the second data is determined to be reference data (step S310), and the field showing the transaction content in the first data is determined as the second target field (step S312). Then, the backup center i determines whether there is a field matching the second target field in each reference data (step S314). Optionally, if there is a field in the reference data that is the same as the information shown in the second target field, it is a match.
[0176] If the result of the judgment is yes, the handling fee of the transaction to be charged is obtained according to the handling fee indicated by the first data of the transaction to be charged.
[0177] If the result of the judgment is no, a second alarm message is generated and sent to the decision unit, so that the decision unit generates a second decision, and obtains the handling fee of the transaction to be charged according to the second decision, and stores it locally in the backup center.
[0178] If the judgment result is negative, it indicates that although both the main center and the backup center i have executed the billing for the transaction to be billed and obtained the handling fee, there is a deviation between the billing results obtained by the main center and the backup center i. The deviation may be caused by the main center or the backup center i. In order to identify the cause of the deviation, the decision unit can generate a second decision based on the second alarm message sent by the backup center i, so that the billing system obtains the handling fee of the transaction to be billed according to the second decision.
[0179] In an optional embodiment of the present specification, the second decision may include at least one of verifying the third sub-decision, verifying the fourth sub-decision, and re-charging the second sub-decision.
[0180] Among them, the function of verifying the third sub-decision is the same or similar to the function of verifying the first sub-decision mentioned above; the function of verifying the fourth sub-decision is the same or similar to the function of verifying the second sub-decision mentioned above; the function of re-billing the second sub-decision is the same or similar to the function of re-billing the first sub-decision mentioned above, and will not be repeated here.
[0181] It can be seen that the process in this manual can not only reduce the labor cost consumed in the reconciliation process, but also identify whether the status of the center is abnormal.
[0182] As can be seen from the foregoing, this specification does not impose any specific restrictions on the manner in which a member institution sends transactions to be charged to the trading system. For example, a member institution may send transactions to be charged to the trading system in real time. After receiving each transaction to be charged sent by a member institution, the trading system determines, for each transaction to be charged, the second cycle to which the time at which the transaction to be charged is executed.
[0183] The specific division method of each second period can be determined according to actual business needs. To facilitate the execution of the billing service, each second period is preferably arranged in chronological order.
[0184] Several second periods adjacent in time belong to one first period, such as Figure 4 As shown, the second cycle A 1 To the second cycle A s Belongs to the first cycle A; similarly, the second cycle B may also include a plurality of second cycles. The first cycles are preferably arranged in chronological order.
[0185] In an optional embodiment of the present specification, in the aforementioned step S316, the first data of the transaction to be charged may be marked as normal under the condition that it is determined that there is a field matching the second target field in each reference data.
[0186] For each second cycle, when marking of each first data corresponding to the second cycle is completed, the number of first data marked as normal in the first data corresponding to the second cycle is determined as the first number corresponding to the second cycle; and based on the first data marked as normal, the local storage of the backup center is updated. In this specification, after marking of the first data is completed, when marking of each first data corresponding to the first cycle is completed, the sum of the first numbers corresponding to each second cycle in the first cycle is used as the second number corresponding to the first cycle.
[0187] If the difference between the number of first data marked as normal stored locally in the backup center and the second number is less than a preset difference threshold, the handling fee shown by the first data marked as normal stored locally in the backup center is determined as the handling fee for the transaction to be billed executed within the first cycle.
[0188] If the difference between the number of first data marked as normal stored locally in the backup center and the second number is not less than a preset difference threshold, a third alarm message is generated and sent to the decision unit, so that the decision unit generates a third decision, and the third decision is generated for the backup center i.
[0189] In an optional embodiment of the present specification, the third decision may include at least one of verifying the fifth sub-decision and obtaining the billing result sub-decision.
[0190] The fifth sub-decision is used to determine whether the status of backup center i is abnormal. If the status of backup center i is abnormal, the backup center i is repaired; and / or the sub-decision is obtained based on the billing result, and the data representing the handling fee stored in other centers with normal status is obtained and stored locally in the backup center i.
[0191] Further, in an optional embodiment of the present specification, the fee settlement rules of the member institution corresponding to the billing system can be obtained, and the fee settlement rules show the first cycle of the member institution's settlement of fees. When the backup center is abnormal, the backup center is disabled in the first cycle corresponding to the current moment. When the main center is abnormal, the backup center is disabled in the first cycle corresponding to the to-be-billed transaction processed at the current moment.
[0192] The first period and the second period in this specification can be determined according to actual business needs. For example, the first period can be one day, and the second period can be one hour. For another example, the first period can be one year, and the second period can be one day.
[0193] As can be seen from the foregoing, the number of centers included in the billing system in this specification can be set according to actual business needs. In an optional embodiment of this specification, the number of centers included in the billing system is 6. The 6 centers can be divided into 3 groups according to geographical location, and any two groups are located in different designated areas (for example, the designated area can be a city).
[0194] After the main center is disabled, the backup center located in the same designated area as the main center can be used as the main center again.
[0195] Further, based on the same idea, the present specification also provides a corresponding Figure 2The first billing device of the partial process shown is applied to a billing system, wherein the billing system includes a main center and several backup centers; the first billing device is used in at least one of the backup centers. Figure 5 As shown, the first charging device may include one or more of the following modules:
[0196] The first available data determination module 500 is configured to: obtain data of each transaction to be charged as first available data, wherein the first available data is used to determine the handling fee of the transaction to be charged;
[0197] The first data determination module 502 is configured to: adopt a preset charging rule, according to the first available data, for each transaction to be charged, obtain the first data of the transaction to be charged, and store it locally in the backup center; the charging rule is used to determine the handling fee of the transaction to be charged;
[0198] The second data acquisition module 504 is configured to: acquire each second data generated by the main center for each transaction to be charged;
[0199] The first module 506 for determining the handling fee is configured to obtain the handling fee of the transaction to be charged according to the first data of the transaction to be charged if the first data and the second data match.
[0200] In an optional embodiment of the present specification, the billing system is connected to a preset transaction database; the transaction database is used to store data of transactions to be billed, the data being sent by a member institution corresponding to the billing system.
[0201] In an optional embodiment of the present specification, the second data acquisition module 504 is specifically configured to: receive a first designated message sent by the main center, wherein the first designated message carries the second data generated by the main center.
[0202] In an optional embodiment of the present specification, the second data acquisition module 504 is specifically configured to: receive a second designated message sent by the main center, wherein the second designated message indicates the storage location of the second data generated by the main center; and acquire the second data according to the second designated message.
[0203] In an optional embodiment of the present specification, the first charging device further includes a determination module 508 .
[0204] The judgment module 508 is configured to: determine, among the various fields of the first data, a field showing a transaction identifier as a first target field; determine whether there is second data corresponding to the first target field; if so, determine that the second data corresponding to the first target field is second data that matches the first data of the transaction to be billed; if not, determine that there is no second data that matches the first data of the transaction to be billed.
[0205] In an optional embodiment of the present specification, the billing system further includes a decision unit. The decision unit is used to generate a decision when the first data and the second data do not match, so that at least one of the centers adjusts the working state according to the decision. The first billing device also includes a first alarm message generation module 510.
[0206] The first warning message generating module 510 is configured to: if the first data and the second data do not match, generate a first warning message and send it to the decision unit, so that the decision unit generates a first decision.
[0207] In an optional embodiment of the present specification, the first decision includes: verifying the first sub-decision; the verifying the first sub-decision is used to verify the status of the main center. The first charging device also includes a change module 512.
[0208] The change module 512 is configured to: receive the first verification result sent by the decision unit; if the first verification result shows that the status of the main center is abnormal, then if the backup center meets the preset conditions, change the backup center to a new main center and redetermine the handling fee for the transaction to be billed; the first verification result is obtained based on the first verification sub-decision.
[0209] In an optional embodiment of the present specification, the first decision includes: verifying the second sub-decision; the verifying the second sub-decision is used to verify the status of the backup center. The first charging device may also include disabling the first module 514.
[0210] The first disabling module 514 is configured to receive the second verification result sent by the decision unit; if the second verification result shows that the state of the backup center is abnormal, the backup center is disabled.
[0211] In an optional embodiment of the present specification, the disabling first module 514 is specifically configured as follows: obtaining the fee settlement rules of the member institution corresponding to the billing system, the fee settlement rules showing the first cycle for settling fees of the member institution; disabling the backup center within the first cycle corresponding to the transaction to be billed being processed at the current moment.
[0212] In an optional embodiment of the present specification, the first decision includes: a first re-billing sub-decision; the first re-billing sub-decision is used to re-determine the handling fee of the transaction to be billed. The first billing device may also include an update first module 516.
[0213] The updating first module 516 is configured to: obtain the re-determined handling fee for the transaction to be charged; and update the local storage according to the re-determined handling fee.
[0214] In an optional embodiment of the present specification, the first module 506 for determining the handling fee is specifically configured as follows: for each transaction to be billed, the second data matching the first data of the transaction to be billed is determined as reference data; and the field showing the transaction content in the first data of the transaction to be billed is determined as the second target field; it is determined whether there is a field matching the second target field in each reference data; if so, the handling fee of the transaction to be billed is obtained based on the handling fee shown in the first data of the transaction to be billed; if not, a second alarm message is generated and sent to the decision unit, so that the decision unit generates a second decision, and obtains the handling fee of the transaction to be billed based on the second decision, and stores it locally in the backup center.
[0215] In an optional embodiment of the present specification, the first target field shows the transaction flow identifier of the transaction to be charged; and / or,
[0216] The second target field indicates at least one of the following information: resources corresponding to the transaction to be charged, the type of the transaction to be charged, the identifier of the member institution corresponding to the transaction to be charged, and the time when the transaction to be charged is executed.
[0217] In an optional embodiment of the present specification, the transaction to be charged is a transaction executed within a preset second cycle; and a plurality of second cycles constitute the first cycle.
[0218] In an optional embodiment of the present specification, the first module 506 for determining the handling fee is specifically configured as follows: marking the first data of the transaction to be billed as normal; for each second cycle, upon completing the marking of each first data corresponding to the second cycle, determining the number of first data marked as normal in the first data corresponding to the second cycle as the first number corresponding to the second cycle; and updating the local storage of the backup center according to the first data marked as normal; upon completing the marking of each first data corresponding to the first cycle, taking the sum of each first number corresponding to each second cycle within the first cycle as the second number corresponding to the first cycle; if the number of first data marked as normal stored locally in the backup center differs from the second number by less than a preset difference threshold, then determining the handling fee shown by the first data marked as normal stored locally in the backup center as the handling fee of the transaction to be billed executed within the first cycle.
[0219] In an optional embodiment of the present specification, the first module 506 for determining the handling fee is further configured as follows: if the difference between the number of first data marked as normal stored locally in the backup center and the second number is not less than a preset difference threshold, a third alarm message is generated and sent to the decision unit, so that the decision unit generates a third decision; the handling fee for the transaction to be billed is obtained according to the third decision, and the local storage is updated.
[0220] Further, based on the same idea, the present specification also provides a corresponding Figure 2 The second billing device of the partial process shown is applied to a billing system, which includes a main center and several backup centers; the first billing device is used in the main center. Figure 6 As shown, the first charging device may include one or more of the following modules:
[0221] The second available data determination module 600 is configured to obtain data of each transaction to be charged as second available data, where the second available data is used to determine the handling fee of the transaction to be charged.
[0222] The second data determination module 602 is configured to: adopt a preset billing rule, according to the second available data, for each transaction to be billed, obtain the second data of the transaction to be billed, and store it locally; the billing rule is used to determine the handling fee of the transaction to be billed.
[0223] The second data sending module 604 is configured to: send the second data to any one of the backup centers; so that the backup center determines whether the first data obtained by itself matches the received second data.
[0224] The second module 606 for determining the handling fee is configured to: when the judgment result generated by the backup center is yes, obtain the handling fee of each transaction to be charged according to the second data stored locally, and update the local storage according to the obtained handling fee.
[0225] In an optional embodiment of the present specification, the billing system further includes a decision unit; the decision unit is configured to enable at least one of the centers to re-determine the handling fee of the transaction to be billed when the judgment result of the backup center is negative.
[0226] In an optional embodiment of the present specification, the second charging device further includes: updating the second module.
[0227] The updating second module is configured to: when any center in the billing system re-determines the handling fee according to the decision of the decision unit, obtain the re-determined handling fee and store it locally.
[0228] In an optional embodiment of the present specification, the second charging device further includes: disabling the second module 608.
[0229] The second disabling module 608 is configured to: receive the first verification result sent by the decision unit; if the first verification result shows that the state of the main center is abnormal, disable the main center.
[0230] In an optional embodiment of the present specification, the disabling second module 608 is specifically configured as follows: obtaining the fee settlement rules of the member institution corresponding to the billing system, the fee settlement rules showing the first cycle for settling fees of the member institution; disabling the main center within the first cycle corresponding to the to-be-billed transaction being processed at the current moment.
[0231] Further, based on the same idea, the embodiment of this specification also provides a third billing device, which is applied to a billing system, and the billing system includes a main center, several backup centers and a decision unit; the third billing device is used in the decision unit. The third billing device may include one or more of the following modules:
[0232] A receiving module, configured to receive alarm information sent by any backup center, wherein the alarm information is generated by the backup center under the condition that the first data and the second data do not match; the first data and the second data are obtained according to any one of the methods described in the first aspect, the second aspect, and the third aspect;
[0233] The first decision generation module is configured to generate a first decision based on the alarm information and send it to at least one of the backup center that generates the first data and the main center that generates the second data; so that at least one of the backup center and the main center adjusts the working status according to the first decision.
[0234] In an optional embodiment of the present specification, the first decision includes: verifying the first sub-decision; the verifying the first sub-decision is used to verify the status of the main center;
[0235] The first decision generating module is specifically configured to generate a first decision according to the alarm information, and send the first decision to at least one of a backup center generating the first data and a main center generating the second data, including:
[0236] Generate a first sub-decision for verification and send it to the main center;
[0237] Generate a first verification result according to the feedback of the main center on the first sub-decision; the first verification result indicates whether the main center is abnormal;
[0238] The first verification result is sent to the main center and each backup center. When the first verification result shows that the main center is abnormal, the main center is switched to a disabled state, and one of the backup centers is changed to a new main center when preset conditions are met.
[0239] Figure 7 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. Figure 7 At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. The memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. Of course, the electronic device may also include hardware required for other services.
[0240] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0241] The memory is used to store the program. Specifically, the program may include a program code, and the program code includes a computer operation instruction. The memory may include a memory and a non-volatile memory, and provides instructions and data to the processor.
[0242] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a first charging device at the logical level. The processor executes the program stored in the memory and is specifically used to perform the following operations:
[0243] Acquire data of each transaction to be charged as first available data, wherein the first available data is used to determine a handling fee of the transaction to be charged;
[0244] Adopting a preset charging rule, according to the first available data, for each transaction to be charged, obtaining the first data of the transaction to be charged, and storing it locally in the backup center; the charging rule is used to determine the handling fee of the transaction to be charged;
[0245] Acquire each second data generated by the main center for each transaction to be charged;
[0246] If the first data and the second data match, the handling fee of the transaction to be charged is obtained according to the first data of the transaction to be charged.
[0247] Figure 8 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. Figure 8 At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. The memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. Of course, the electronic device may also include hardware required for other services.
[0248] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0249] The memory is used to store the program. Specifically, the program may include a program code, and the program code includes a computer operation instruction. The memory may include a memory and a non-volatile memory, and provides instructions and data to the processor.
[0250] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a second charging device at the logical level. The processor executes the program stored in the memory and is specifically used to perform the following operations:
[0251] Acquire data of each transaction to be charged as second available data, wherein the second available data is used to determine a handling fee of the transaction to be charged;
[0252] Adopting a preset charging rule, according to the second available data, for each transaction to be charged, obtaining the second data of the transaction to be charged, and storing it locally; the charging rule is used to determine the handling fee of the transaction to be charged;
[0253] Sending the second data to any one of the backup centers; allowing the backup center to determine whether there is second data matching the first data obtained by itself;
[0254] Under the condition that the judgment result generated by the backup center is yes, the handling fee of each transaction to be charged is obtained according to the second data stored locally, and the local storage is updated according to the obtained handling fee.
[0255] The above application Figure 2 The method performed by the first charging device or the second charging device disclosed in the embodiment can be applied to Figure 7 or Figure 8In the processor shown, or implemented by the processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in software form. The above processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0256] The electronic device may also perform Figure 2 The method is performed by the first billing device or the second billing device, and the first billing device or the second billing device is implemented in Figure 2 The functions of the illustrated embodiment will not be described in detail in the embodiments of the present application.
[0257] The present application also provides a computer-readable storage medium, which stores one or more programs, wherein the one or more programs include instructions, which, when executed by an electronic device including multiple application programs, enable the electronic device to execute Figure 2 The method performed by the first billing device and / or the second billing device in the illustrated embodiment is specifically used to perform:
[0258] Acquire data of each transaction to be charged as first available data, wherein the first available data is used to determine a handling fee of the transaction to be charged;
[0259] Adopting a preset charging rule, according to the first available data, for each transaction to be charged, obtaining the first data of the transaction to be charged, and storing it locally in the backup center; the charging rule is used to determine the handling fee of the transaction to be charged;
[0260] Acquire each second data generated by the main center for each transaction to be charged;
[0261] If the first data and the second data match, the handling fee of the transaction to be charged is obtained according to the first data of the transaction to be charged. Or,
[0262] Acquire data of each transaction to be charged as second available data, wherein the second available data is used to determine a handling fee of the transaction to be charged;
[0263] Adopting a preset charging rule, according to the second available data, for each transaction to be charged, obtaining the second data of the transaction to be charged, and storing it locally; the charging rule is used to determine the handling fee of the transaction to be charged;
[0264] Sending the second data to any one of the backup centers; allowing the backup center to determine whether the first data obtained by itself matches the received second data;
[0265] Under the condition that the judgment result generated by the backup center is yes, the handling fee of each transaction to be charged is obtained according to the second data stored locally, and the local storage is updated according to the obtained handling fee. Or, receiving an alarm message sent by any backup center, the alarm message is generated by the backup center under the condition that the first data and the second data do not match; the first data and the second data are obtained according to any of the above methods;
[0266] A first decision is generated based on the alarm information and sent to at least one of a backup center that generates the first data and a main center that generates the second data; so that at least one of the backup center and the main center adjusts the working status based on the first decision.
[0267] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0268] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0269] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0270] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0271] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0272] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0273] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0274] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0275] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0276] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A billing method, the billing method is based on a billing system, the billing system includes a main center and several backup centers, the method is executed by any one of the backup centers, wherein: The method comprises: Acquire data of each transaction to be charged as first available data, wherein the first available data is used to determine a handling fee of the transaction to be charged; Adopting a preset charging rule, according to the first available data, for each transaction to be charged, obtaining the first data of the transaction to be charged, and storing it locally in the backup center; the charging rule is used to determine the handling fee of the transaction to be charged; Acquire each second data generated by the main center for each transaction to be charged; If the first data and the second data match, obtaining the handling fee of the transaction to be charged according to the first data of the transaction to be charged; After receiving each transaction to be charged sent by the member institution, the transaction system determines, for each transaction to be charged, the second cycle to which the time when the transaction to be charged is executed belongs, and a plurality of second cycles constitute the first cycle; For each second period, determine the number of first data marked as normal in the first data corresponding to the second period as the first number corresponding to the second period, and the sum of the first numbers corresponding to the second periods in the first period as the second number corresponding to the first period; If the difference between the number of first data marked as normal stored locally in the backup center and the second number is less than a preset difference threshold, the handling fee shown by the first data marked as normal stored locally in the backup center is determined as the handling fee for the transaction to be billed executed within the first cycle.
2. The method of claim 1, wherein: Obtaining each second data generated by the main center for each transaction to be charged, including: A first designated message sent by the main center is received, wherein the first designated message carries second data generated by the main center.
3. The method of claim 1, wherein: Obtaining each second data generated by the main center for each transaction to be charged, including: receiving a second designated message sent by the main center, wherein the second designated message indicates a storage location of second data generated by the main center; According to the second designated message, second data is acquired.
4. The method of claim 1, wherein: Before obtaining the handling fee of the transaction to be charged, the method includes: Among the fields of the first data, determine a field showing a transaction identifier as a first target field; Determining whether there is second data corresponding to the first target field; If so, determining that the second data corresponding to the first target field is second data that matches the first data of the transaction to be charged; If not, it is determined that there is no second data matching the first data of the transaction to be charged.
5. The method according to any one of claims 1 to 4, wherein: The charging system further includes a decision unit; the decision unit is used to generate a decision when the first data and the second data do not match, so that at least one of the centers adjusts the working state according to the decision; the method further includes: If the first data and the second data do not match, a first warning message is generated and sent to the decision unit, so that the decision unit generates a first decision.
6. The method of claim 5, wherein: The first decision includes: verifying a first sub-decision; the verifying first sub-decision is used to verify the status of the main center; the method also includes: Receiving a first verification result sent by the decision unit; If the first verification result shows that the status of the main center is abnormal, then if the backup center meets the preset conditions, the backup center is changed to a new main center and the handling fee for the transaction to be charged is re-determined; the first verification result is obtained based on the first verification sub-decision.
7. The method of claim 5, wherein: The first decision includes: verifying the second sub-decision; The second sub-decision of verification is used to verify the status of the backup center; the method further includes: Receiving the second verification result sent by the decision unit; If the second result of the verification shows that the status of the backup center is abnormal, the backup center is disabled.
8. The method of claim 5, wherein: The first decision includes: a re-billing first sub-decision; The first re-billing sub-decision is used to re-determine the handling fee of the transaction to be billed; the method further includes: Obtaining a re-determined handling fee for the transaction to be charged; Update local storage based on the re-determined handling fee.
9. The method of claim 5, wherein: If the first data and the second data match, obtaining the handling fee of the transaction to be charged according to the first data of the transaction to be charged includes: For each transaction to be charged, second data matching the first data of the transaction to be charged is determined as reference data; and a field showing transaction content in the first data of the transaction to be charged is determined as a second target field; Determining whether there is a field in the reference data that matches the second target field; If yes, obtaining the handling fee of the transaction to be charged according to the handling fee indicated by the first data of the transaction to be charged; If not, a second alarm message is generated and sent to the decision unit, so that the decision unit generates a second decision, and obtains the handling fee of the transaction to be charged according to the second decision, and stores it locally in the backup center.
10. The method of claim 9, wherein: The transactions to be charged are transactions executed within the preset second cycle; Obtaining the handling fee of the transaction to be charged according to the handling fee indicated by the first data of the transaction to be charged, including: Marking the first data of the transaction to be charged as normal; For each second cycle, when marking of each first data corresponding to the second cycle is completed, the number of first data marked as normal in the first data corresponding to the second cycle is determined as the first number corresponding to the second cycle; and the local storage of the backup center is updated according to the first data marked as normal; When marking of each first data corresponding to the first cycle is completed, the sum of each first quantity corresponding to each second cycle within the first cycle is used as the second quantity corresponding to the first cycle; If the difference between the number of first data marked as normal stored locally in the backup center and the second number is less than a preset difference threshold, the handling fee shown by the first data marked as normal stored locally in the backup center is determined as the handling fee for the transaction to be billed executed within the first cycle.
11. The method of claim 10, wherein: The method further comprises: If the difference between the number of the first data marked as normal and the second number stored locally in the backup center is not less than a preset difference threshold, a third alarm message is generated and sent to the decision unit, so that the decision unit generates a third decision; The handling fee of the transaction to be charged is obtained according to the third decision, and the local storage is updated.
12. A billing method, the billing method is based on a billing system, the billing system includes a main center and several backup centers, the method is executed by the main center, wherein: The method comprises: Acquire data of each transaction to be charged as second available data, wherein the second available data is used to determine a handling fee of the transaction to be charged; Adopting a preset charging rule, according to the second available data, for each transaction to be charged, obtaining the second data of the transaction to be charged, and storing it locally; the charging rule is used to determine the handling fee of the transaction to be charged; Sending the second data to any one of the backup centers; allowing the backup center to determine whether the first data obtained by itself matches the received second data; Under the condition that the judgment result generated by the backup center is yes, obtaining the handling fee of each transaction to be charged according to the second data stored locally; After receiving each transaction to be charged sent by the member institution, the transaction system determines, for each transaction to be charged, the second cycle to which the time when the transaction to be charged is executed belongs, and a plurality of second cycles constitute the first cycle; For each second period, determine the number of first data marked as normal in the first data corresponding to the second period as the first number corresponding to the second period, and the sum of the first numbers corresponding to the second periods in the first period as the second number corresponding to the first period; If the difference between the number of first data marked as normal stored locally in the backup center and the second number is less than a preset difference threshold, the handling fee shown by the first data marked as normal stored locally in the backup center is determined as the handling fee for the transaction to be billed executed within the first cycle.
13. A billing method, the billing method is based on a billing system, the billing system includes a main center, several backup centers and a decision unit, the method is executed by the decision unit, wherein: The method comprises: Receiving alarm information sent by any backup center, where the alarm information is generated by the backup center under the condition that the first data and the second data do not match; the first data and the second data are obtained according to any method of claims 1 to 12; A first decision is generated based on the alarm information and sent to at least one of a backup center that generates the first data and a main center that generates the second data; so that at least one of the backup center and the main center adjusts the working status based on the first decision.
14. The method of claim 13, wherein: The first decision includes: verifying the first sub-decision; the verifying the first sub-decision is used to verify the status of the main center; Generating a first decision according to the alarm information and sending the decision to at least one of a backup center generating the first data and a main center generating the second data, including: Generate a first sub-decision for verification and send it to the main center; Generate a first verification result according to the feedback of the main center on the first sub-decision; the first verification result indicates whether the main center is abnormal; The first verification result is sent to the main center and each backup center. When the first verification result shows that the main center is abnormal, the main center is switched to a disabled state, and one of the backup centers is changed to a new main center when preset conditions are met.
15. A billing system, comprising a main center and several backup centers; The main center is configured to: obtain data of each transaction to be charged as second available data, wherein the second available data is used to determine the handling fee of the transaction to be charged; adopt a preset charging rule, and obtain the second data of the transaction to be charged according to the second available data for each transaction to be charged, store it locally, and send the second data to any one of the backup centers; the charging rule is used to determine the handling fee of the transaction to be charged; The standby center is configured to: obtain data of each transaction to be charged as first available data, wherein the first available data is used to determine the handling fee of the transaction to be charged; adopt a preset charging rule, and obtain first data of the transaction to be charged for each transaction to be charged according to the first available data, and store the data locally in the standby center; obtain second data generated by the main center for each transaction to be charged; determine whether the first data obtained by itself matches the second data received; and if the determination result is yes, obtain the handling fee of the transaction to be charged according to the first data of the transaction to be charged; The main center is further configured to: obtain the handling fee of each transaction to be charged according to the second data stored locally, if the judgment result generated by the backup center is yes; in, After receiving each transaction to be charged sent by the member institution, the transaction system determines, for each transaction to be charged, the second cycle to which the time when the transaction to be charged is executed belongs, and a plurality of second cycles constitute the first cycle; For each second period, determine the number of first data marked as normal in the first data corresponding to the second period as the first number corresponding to the second period, and the sum of the first numbers corresponding to the second periods in the first period as the second number corresponding to the first period; If the difference between the number of first data marked as normal stored locally in the backup center and the second number is less than a preset difference threshold, the handling fee shown by the first data marked as normal stored locally in the backup center is determined as the handling fee for the transaction to be billed executed within the first cycle.
16. The billing system as claimed in claim 15, wherein: The billing system also includes a decision-making unit; The decision unit is configured to: under the condition that the judgment result of the backup center is negative, enable at least one of the centers to re-determine the handling fee of the transaction to be charged.
Citation Information
Patent Citations
Charging method and device based on double center disaster tolerant charging systems and system thereof
CN103188643A