A billing diagnostic method, apparatus, electronic device and medium
By determining the billing factor sequence and judgment rules in the billing system, the data source of billing discrepancies can be quickly located, solving the problem of difficulty in locating billing discrepancies caused by the complexity of billing rules in existing technologies, and improving the speed and efficiency of billing anomaly location and processing.
Patent Information
- Application Number
- CN202310118834.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-03
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2043-02-03
AI Technical Summary
In existing technologies, the complexity of billing rules makes it difficult to locate the data source causing billing discrepancies, and it is difficult to quickly and accurately locate the data source causing the billing discrepancies.
By identifying the target diagnostic rule among multiple diagnostic rules, including the billing factor sequence and judgment rule, and judging the sub-results based on the billing factor sequence and data source, anomaly prompts are generated and solutions are output, enabling rapid location of billing anomalies.
It enables rapid and accurate location of data sources for billing discrepancies, reduces the difficulty of location, and improves the speed and efficiency of locating and processing billing anomalies.
Smart Images

Figure CN116233320B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of billing diagnostics technology, specifically to a billing diagnostics method, apparatus, electronic device, and medium. Background Technology
[0002] With the diversification of mobile communication services, the rules of billing systems are becoming increasingly complex, making daily analysis of billing issues quite challenging. Billing systems need to interface with multiple external modules, and once billing discrepancies are discovered, it's necessary to investigate the historical data synchronized by each module to pinpoint the data source causing the discrepancy. However, due to the complexity of the billing system rules, locating the data source causing the billing discrepancy is extremely difficult.
[0003] Therefore, how to quickly locate the data source causing the billing discrepancy is a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0004] To address this issue, the present invention provides a billing diagnosis method, apparatus, electronic device, and medium to solve the problem in the prior art where it is difficult to locate the data source causing billing discrepancies due to the complexity of billing rules.
[0005] To achieve the above objectives, a first aspect of the present invention provides a billing diagnosis method, comprising: determining a target diagnosis rule among a plurality of diagnosis rules, the target diagnosis rule including a billing factor sequence, each billing factor in the billing factor sequence corresponding to a data source and at least one judgment rule; determining a sub-result corresponding to each billing factor based on the billing factor sequence, the data source corresponding to each billing factor, and at least one judgment rule; and determining a billing diagnosis result based on the sub-result corresponding to each billing factor.
[0006] In some embodiments, determining the sub-result corresponding to each billing factor based on the billing factor sequence, the data source corresponding to each billing factor, and at least one judgment rule includes: for each billing factor, determining target data corresponding to the user identifier from the data source corresponding to the billing factor based on the user identifier; and processing the target data using at least one judgment rule corresponding to the billing factor to obtain the sub-result.
[0007] In some embodiments, the target diagnostic rule includes the expected result corresponding to each billing factor; the method further includes: generating an anomaly prompt instruction for target data corresponding to a user identifier in a target data source when it is determined that the diagnostic result represents a sub-result of at least one billing factor that is inconsistent with the expected result; wherein the target data source corresponds to the abnormal billing factor, and the abnormal billing factor is a billing factor whose sub-result is inconsistent with the expected result.
[0008] In some embodiments, the target diagnostic rule includes the expected result corresponding to each billing factor; the method further includes: when it is determined that the diagnostic result represents a sub-result of at least one billing factor that is inconsistent with the expected result, determining a target solution corresponding to the abnormal billing factor from a plurality of solutions according to predetermined mapping information; and outputting the target solution; wherein the predetermined mapping information represents the correspondence between billing factors and solutions.
[0009] In some embodiments, the target diagnostic rule includes an expected result corresponding to each billing factor; determining the diagnostic result of billing based on the sub-results corresponding to each billing factor includes: determining the diagnostic result as passed in response to detecting that the sub-results of each billing factor in the same target diagnostic rule are consistent with the expected results; and determining the diagnostic result as failed in response to detecting that the sub-results of at least one billing factor in the same target diagnostic rule are inconsistent with the expected results.
[0010] In some embodiments, the target diagnostic rule includes the expected result corresponding to each billing factor; determining the diagnostic result of billing based on the sub-results corresponding to each billing factor includes: determining whether the number of billing factors in the current billing factor sequence is equal to 0; if the number is equal to 0, ending the process and determining the diagnostic result as passing; and if the number is greater than 0, performing the following operations: determining the current billing factor from the current billing factor sequence; in response to detecting that the sub-result of the current billing factor is inconsistent with the expected result, ending the process and determining the diagnostic result as failing; and in response to detecting that the sub-result of the current billing factor is consistent with the expected result, deleting the current billing factor from the current billing factor sequence and returning to the operation of determining whether the number of billing factors in the current billing factor sequence is equal to 0.
[0011] In some embodiments, determining the current billing factor from the current billing factor sequence includes: determining the first billing factor in the current billing factor sequence as the current billing factor according to the order in which the multiple billing factors are arranged in the billing factor sequence.
[0012] A second aspect of the present invention provides a billing diagnostic apparatus, comprising: a first determining module, configured to determine a target diagnostic rule among a plurality of diagnostic rules, the target diagnostic rule including a billing factor sequence, each billing factor in the billing factor sequence corresponding to a data source and at least one judgment rule; a second determining module, configured to determine a sub-result corresponding to each billing factor based on the billing factor sequence, the data source corresponding to each billing factor, and at least one judgment rule; and a third determining module, configured to determine a billing diagnostic result based on the sub-result corresponding to each billing factor.
[0013] A third aspect of the present invention provides an electronic device, comprising: one or more processors; a memory having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any of the methods described above; and one or more I / O interfaces connected between the processors and the memory, configured to enable information interaction between the processors and the memory.
[0014] A fourth aspect of the present invention provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the method according to any one of the above.
[0015] The present invention has the following advantages:
[0016] The billing diagnosis method provided in this application includes determining a target diagnosis rule among multiple diagnosis rules, the target diagnosis rule including a billing factor sequence, each billing factor in the billing factor sequence corresponding to a data source and at least one judgment rule; determining a sub-result corresponding to each billing factor based on the billing factor sequence, the data source corresponding to each billing factor, and at least one judgment rule; and determining the billing diagnosis result based on the sub-result corresponding to each billing factor.
[0017] The billing diagnostic method assesses the data source using a billing factor sequence and judgment rules, thereby obtaining a sub-result for each billing factor in the sequence. If the sub-result meets expectations, billing is normal; otherwise, a billing discrepancy occurs. This method accurately and quickly locates the billing factor causing the discrepancy through the sub-results, thus reducing the difficulty of identifying the discrepancy. Attached Figure Description
[0018] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the following detailed description to explain the invention, but do not constitute a limitation thereof.
[0019] Figure 1 A flowchart of a billing diagnosis method provided in an embodiment of the present invention;
[0020] Figure 2 This is a schematic diagram of a diagnostic device provided in an embodiment of the present invention;
[0021] Figure 3 This is a schematic diagram illustrating the relationship between billing rules, billing factors, and diagnostic rules provided in an embodiment of the present invention.
[0022] Figure 4 A schematic diagram of the pre-billing rules for combined billing provided in an embodiment of the present invention;
[0023] Figure 5 A schematic diagram of the combined billing rules provided in an embodiment of the present invention;
[0024] Figure 6 A schematic diagram of a single-attribute billing factor provided in an embodiment of the present invention;
[0025] Figure 7 A schematic diagram of a multi-attribute billing factor provided in an embodiment of the present invention;
[0026] Figure 8 This is a schematic diagram illustrating the fixed diagnostic rules for group users provided in an embodiment of the present invention.
[0027] Figure 9 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0028] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0029] As used in this invention, the term "and / or" includes any and all combinations of one or more of the associated enumerated entries.
[0030] The terminology used in this invention is for describing particular embodiments only and is not intended to limit the invention. As used herein, the singular forms "a" and "the" are also intended to include the plural forms, unless the context clearly indicates otherwise.
[0031] When the terms “comprising” and / or “made of” are used in this invention, the presence of the said feature, integral, step, operation, element and / or component is specified, but the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or groups thereof is not excluded.
[0032] Unless otherwise specified, all terms used in this invention (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in common dictionaries should be interpreted as having the meaning consistent with their meaning in the context of the relevant art and the invention, and will not be interpreted as having an idealized or overly formal meaning unless expressly so defined by the invention.
[0033] In a first aspect, embodiments of the present invention provide a billing diagnosis method, including:
[0034] S110. Determine the target diagnostic rule among multiple diagnostic rules. The target diagnostic rule includes a billing factor sequence. Each billing factor in the billing factor sequence corresponds to a data source and at least one judgment rule.
[0035] There are multiple diagnostic rules, each targeting a specific billing scenario. A user's billing process may involve multiple billing scenarios; therefore, the diagnostic rules for the billing scenarios involved are the target diagnostic rules. Before conducting billing diagnostics, target diagnostic rules can be determined based on the user's billing scenarios, and these target diagnostic rules can be selected from the existing diagnostic rules. Of course, when determining diagnostic rules, some or all diagnostic rules can be designated as target diagnostic rules.
[0036] Each diagnostic rule includes a billing factor sequence, which is formed by arranging at least one billing factor. Billing factors are atomic billing rules within the billing process. Multiple billing factors involved in a billing scenario are arranged to form a billing factor sequence. Billing factors can be pre-set before billing diagnosis, and the billing factor sequence can be pre-arranged before billing diagnosis and directly applied during the billing diagnosis process.
[0037] Optionally, billing factors can be planned and constructed based on attributes such as the complexity and reusability of billing rules. Billing factors include single-attribute billing factors and multi-attribute billing factors. A single-attribute billing factor consists of one billing rule, while a multi-attribute billing factor consists of multiple billing rules. Each billing factor corresponds to a data source and at least one judgment rule. It determines whether the data source meets the judgment rule and outputs a sub-result. For example, "user group relationship" can be used as a single-attribute billing factor, and user data can be used as the data source for this billing factor. User data can be obtained through user ID. "User has a group relationship" can be used as the judgment rule for the "user group relationship" billing factor. After querying based on user data, a sub-result can be obtained. The sub-result can be either "true" or "false," where "true" indicates that the judgment rule is met, i.e., the user has a group relationship, and "false" indicates that the judgment rule is not met, i.e., the user does not have a group relationship. Multi-attribute billing factors include at least two billing rules. For example, "user discounted subscription" can be used as a multi-attribute billing factor, and user data can be used as the data source for this billing factor. The judgment rules for this billing factor include "user subscribes to discounts", "discounts take effect at the end of the month", and "discount type is 8". If the user meets all three conditions, the output is "true"; otherwise, the output is "false". Each judgment rule of the multi-attribute billing factor can be judged independently or in combination. The data for each judgment rule can come from different data sources. The multi-attribute billing factor executes the judgment rules sequentially until the result is output.
[0038] It should be noted that sub-results only indicate whether the data source meets the judgment rules, and do not represent the diagnostic results. In the "User Group Relationship" billing factor, if it is expected that users do not have group relationships, then "false" is a sub-result that meets the expectations.
[0039] Billing factors can be reused in different diagnostic rules. When compiling diagnostic rules, any combination of billing factors can be flexibly selected to form a complete diagnostic rule for the billing service.
[0040] S120. Based on the billing factor sequence, the data source corresponding to each billing factor, and at least one judgment rule, determine the sub-result corresponding to each billing factor;
[0041] Each billing factor in the billing factor sequence is judged against its corresponding data source by a judgment rule, resulting in a sub-result corresponding to each billing factor.
[0042] S130. Determine the billing diagnosis result based on the sub-results corresponding to each billing factor.
[0043] Before performing billing diagnostics, expected results can be set for each target diagnostic rule's billing factors. If a sub-result does not match the expected result, it indicates that the user's billing is abnormal, and the billing factor whose sub-result does not match the expected result is the billing factor with billing abnormality. If all sub-results match the expected result, it indicates that the user has no abnormalities.
[0044] In this embodiment, billing factors are constructed through atomic billing rule planning. The billing factors are arranged to form a billing factor sequence. The billing factor sequence is used as a diagnostic rule to perform billing diagnosis on user data. When the sub-result of a billing factor does not match the expected result, the billing factor is determined to be abnormal, thereby realizing rapid location of billing anomalies and reducing the difficulty of locating billing anomalies.
[0045] In some embodiments, based on the billing factor sequence, the data source corresponding to each billing factor, and at least one judgment rule, a sub-result corresponding to each billing factor is determined, including:
[0046] For each billing factor, based on the user identifier, the target data corresponding to the user identifier is determined from the data source corresponding to the billing factor; and
[0047] The data source corresponding to the billing factor may include multiple user data. When performing billing diagnosis for a specific user, it is necessary to first determine the user data for that user, i.e., the target data. User data can be located based on user identifiers, which may specifically be one or more of the user's mobile phone number, ID card number, name, fingerprint, etc.
[0048] The target data is processed using at least one judgment rule corresponding to the billing factor to obtain sub-results.
[0049] After determining the target data, a sub-result is obtained by judging it using at least one judgment rule corresponding to the billing factor. The specific judgment process can be referred to the previous embodiment, and will not be repeated here.
[0050] In some embodiments, the target diagnostic rule includes the expected result corresponding to each billing factor; the method further includes:
[0051] If the diagnostic result indicates that the sub-result representing at least one billing factor is inconsistent with the expected result, an anomaly prompt instruction is generated for the target data in the target data source corresponding to the user identifier.
[0052] The target data source is the data source corresponding to the abnormal billing factor, which is the billing factor whose sub-result is inconsistent with the expected result. The expected result can be preset before billing diagnosis.
[0053] The error message instruction can include prompts such as user ID and billing factor location, making it easy to quickly locate the billing factor where the billing is abnormal.
[0054] In this embodiment, the billing diagnosis method issues an anomaly warning instruction for the target data when a billing anomaly occurs. This not only alerts to the occurrence of a billing anomaly but also helps to quickly locate the billing factor where the anomaly occurred, further improving the speed of billing anomaly location.
[0055] In some embodiments, the target diagnostic rule includes the expected result corresponding to each billing factor; the method further includes:
[0056] When a diagnostic result indicating that a sub-outcome representing at least one billing factor is inconsistent with the expected result is determined, a target solution corresponding to the abnormal billing factor is identified from multiple solutions based on predetermined mapping information; and
[0057] Output the target solutions;
[0058] Among them, the pre-defined mapping information represents the correspondence between billing factors and solutions.
[0059] When billing anomalies occur, they need to be handled to ensure accurate billing results. To facilitate the handling of billing anomalies, this application also formulates solutions for billing anomalies and establishes predetermined mapping information between billing anomalies and solutions. After a billing anomaly is detected, the corresponding target solution can be found according to the predetermined mapping information, and the target solution can help operators handle the billing anomaly.
[0060] In this embodiment, the billing diagnosis method can determine the target solution corresponding to the abnormal billing factor based on the predetermined mapping information, and output the target solution to the operator to help the operator handle the abnormal billing factor, thereby improving the efficiency of abnormal handling and reducing the requirements for the operator.
[0061] In some embodiments, the target diagnostic rule includes the expected result corresponding to each billing factor; and the diagnostic result for billing is determined based on the sub-results corresponding to each billing factor, including:
[0062] In response to the detection that the sub-results of each billing factor in the same target diagnostic rule are consistent with the expected results, the diagnostic result is determined to be passed; and
[0063] In response to the detection that at least one billing factor sub-result in the same target diagnostic rule is inconsistent with the expected result, the diagnostic result is determined to be unsuccessful.
[0064] In this embodiment, the diagnostic result is determined by whether the sub-results of the billing factor are consistent with the expected result. This method is simple, computationally inefficient, and highly efficient. Other methods can also be used to determine the diagnostic result. For example, the judgment rules can be adjusted so that all sub-results without abnormalities are marked as "true" or "false," thus determining the diagnostic result as "failure" if an abnormal sub-result appears.
[0065] In some embodiments, the target diagnostic rule includes the expected result corresponding to each billing factor; and the diagnostic result for billing is determined based on the sub-results corresponding to each billing factor, including:
[0066] Determine whether the number of billing factors in the current billing factor sequence is equal to 0;
[0067] If the quantity is 0, the process ends and the diagnosis result is confirmed as passed; and
[0068] If the quantity is greater than 0, perform the following operation:
[0069] Determine the current billing factor from the current billing factor sequence;
[0070] In response to the detection that the sub-result of the current billing factor is inconsistent with the expected result, the processing ends and the diagnostic result is determined to be a failure; and
[0071] In response to the detection that the sub-result of the current billing factor is consistent with the expected result, the current billing factor is removed from the current billing factor sequence, and an operation is returned to determine whether the number of billing factors in the current billing factor sequence is equal to 0.
[0072] In this embodiment, the target diagnostic rule needs to evaluate all billing factors in the billing factor sequence to determine a pass / fail result. If a sub-result of a billing factor is inconsistent with the expected result, the diagnostic process ends and the result is determined to be fail / fail. This diagnostic process reduces the computational load in the failure diagnostic process, terminates the diagnostic process promptly, and processes the data source corresponding to the abnormal billing factor, thus improving processing efficiency.
[0073] In some embodiments, determining the current billing factor from the current billing factor sequence includes:
[0074] Based on the order of multiple billing factors in the billing factor sequence, the first billing factor in the current billing factor sequence is determined as the current billing factor.
[0075] The diagnostic process begins with the first billing factor in the billing factor sequence, and a result is considered passed only if the sub-results of all billing factors in the entire sequence match the expected results. This avoids the problem of missed detections during the diagnostic process.
[0076] The steps of the various methods described above are only for clarity. In practice, they can be combined into one step or some steps can be split into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent. Adding insignificant modifications or introducing insignificant designs to the algorithm or process, but without changing the core design of the algorithm and process, are also within the scope of protection of this patent.
[0077] The following combination Figure 2 This provides an overview of the diagnostic device. For example... Figure 2 As shown, the diagnostic device aims to quickly detect billing anomalies and pinpoint the root cause of problems. The device abstracts and models each module in the billing process, constructing billing factors of varying specifications based on the complexity and reusability of each module. These billing factors are externally connected to various data models to obtain data support, and then, according to predetermined diagnostic logic, several billing factors are arranged to form billing diagnostic rules. When using the device, users only need to input their user identifier (e.g., user ID), and the diagnostic rules are automatically executed to perform a comprehensive user anomaly diagnosis and output the results. If any billing factor in the rules exhibits an anomaly, the device outputs anomaly information and repair suggestions, allowing even non-professionals to quickly locate the problem.
[0078] The following combination Figure 3 The billing factors should be explained. For example... Figure 3 As shown, the billing factor is one of the important components of the diagnostic device. By rationally planning and combining the atomic billing rules in the billing process, a component with identical inputs and outputs can be constructed. When arranging diagnostic rules, any combination of billing factors can be flexibly selected to form a complete abnormal diagnostic rule for the billing business.
[0079] Before constructing billing factors, the scenarios for diagnostic rules are first determined, and all atomic billing rules in these scenarios are obtained. Then, the complexity, reusability, correlation between rules, and complexity of subsequently orchestrated diagnostic rules are considered to construct single-attribute billing factors consisting of one billing rule and multi-attribute billing factors consisting of multiple billing rules. When planning billing factor categories, billing rules are first combined based on their correlation. If combining billing rules does not reduce their reusability, then these billing rules are combined to construct a multi-attribute billing factor; if combining them reduces reusability, then they are directly classified as single-attribute billing factors.
[0080] The following combination Figure 4 and Figure 5 This describes the diagnostic scenario. For example... Figure 4The scenarios shown are as follows: Scenario 1 includes billing rules 1, 2, 4, and 5; Scenario 2 includes billing rules 2, 3, and 6; and Scenario 3 includes billing rules 1, 2, and 3. In this case, rules 2 and 3 can be combined, maintaining a reusability of 3. Combining them reduces the complexity of the diagnostic rule orchestration for the subsequent three scenarios. Although rules 4 and 5 have a reusability of 1 at this point, and the reusability remains 1 after merging, their complexity is high, and their reusability is not high. Combining them will not reduce the complexity of diagnostic rule orchestration; instead, it will increase the complexity of individual billing factors. Therefore, they are not combined. The combined effect is as follows. Figure 5 .
[0081] In real-world billing systems, billing scenarios are more complex. By reasonably combining billing rules, single-attribute billing factors and multi-attribute billing factors can be constructed, which can effectively reduce code redundancy and improve program readability.
[0082] The billing factor calls various data modules to obtain target data and processes and validates the data according to the billing rules. Single-attribute and multi-attribute billing factors have unified inputs and outputs, ensuring a standardized input-processing-output flow. Each billing factor has exactly one input and outputs "true" or "false," providing greater flexibility and reusability for subsequent use. Once implemented, the billing factor can be reused in diagnostic rules across multiple scenarios, improving code reusability and maintaining business logic consistency.
[0083] The following combination Figure 6 This section explains the single-attribute billing factor. For example... Figure 6 As shown, a single-attribute billing factor contains only one billing business attribute judgment rule. For example, to determine the user relationship category, a billing factor named "whether the user is a single user" can be constructed. The user ID is input, the data query rule is set, and the query result is judged by the existing billing judgment logic, outputting "true" or "false". When calling this billing factor, if the scenario needs to determine that the user has no group relationship, then the input "false" is considered to be in line with expectations. If the scenario needs to determine that the user has a group relationship, then the output "true" is considered to be in line with expectations.
[0084] The following combination Figure 7 This section explains the multi-attribute billing factors. For example... Figure 7 As shown, a multi-attribute billing factor consists of several billing rules that can be combined into a single billing factor. A multi-attribute billing factor contains judgments on multiple billing attributes, and the result of each judgment will affect the final output of the billing factor.
[0085] like Figure 7Example: The billing factor is "whether the user has subscribed to the end-of-month discount tariff". The implementation logic of this multi-attribute billing factor is as follows: First, billing rule (1) determines whether the user has subscribed to the discount tariff. At this time, it is necessary to query the user database. If the user has not subscribed to this type of tariff, there is no need to continue executing the rule and output false. If the user has subscribed, it will be true. Then, the precondition of billing rule (2) is that the judgment result of (1) is "true". If (1) meets the expectation, then rule (2) is executed to determine whether the discount is effective at the end of the month. It is determined whether there is an end-of-month mark in the subscription tariff record. If it is not effective at the end of the month, it is considered that there is no need to continue judging and output false. If it is, it will be true. Next, the preconditions for billing rule (3) are that the result of (1) is "true" and the result of (2) is "true". Then, it continues to determine whether the user discount type in rule (3) is "8". It retrieves data from the associated tariff parameter database. The judgment content "discount type is 8" means that the data field A is discount and field B is 8. If both conditions are met, it is considered that the user has subscribed to the monthly discount tariff and outputs "true". If not, it outputs "false". Until a billing rule outputs an unexpected result or all billing rules are executed, the output result is "true" or "false".
[0086] The billing diagnosis rules are explained in detail below with reference to Table 1. For example... Figure 8 As shown, orchestrating diagnostic rules is another core step of the diagnostic device, namely, selecting any number of billing factors to construct billing diagnostic rules based on a predetermined scenario.
[0087] Table 1 Billing and Diagnostic Rules
[0088] Billing factor 1 Billing factor 2 Billing factor 3 ··· Billing factor n Diagnostic results Diagnostic Rule 1 True True False ··· True pass Diagnostic Rule 2 True False False ··· null pass Diagnostic Rule 3 True True True null pass
[0089] The diagnostic rules flexibly combine any number of billing factors based on the business logic of each billing module, and output the final result of the rule by comprehensively judging the results of each billing factor. Proper planning of billing factors can significantly reduce the coding complexity of the diagnostic device and increase the diagnostic coverage. For example, with a total of n billing factors, selecting m of them for combination and sorting can, under ideal conditions, achieve a maximum of [missing information - likely a specific number of possible combinations]. There are several diagnostic rules. Furthermore, each billing factor outputs "true" or "false," with "true" considered logically correct and "false" considered logically correct based on the expected scenario. Outputting "false" does not necessarily indicate abnormal termination. Under this setting, the number of rules that can be programmed for a fixed set of n billing factors will increase exponentially.
[0090] The entire diagnostic rule ends when all billing factors are executed or is interrupted when the output of a certain billing factor does not meet expectations. If the result of a certain billing factor does not meet expectations, the return value of that factor is output. If the results of all billing factors meet expectations, the final result is output as "true", indicating that the user data meets expectations and there are no abnormalities.
[0091] like Figure 8 As shown, for example, the diagnostic rule "Group User Fixed Charge Diagnostic Rule" requires the following billing factors: the user is in a normal billing status (single attribute factor), the user is a group user (single attribute factor), the user's status meets the conditions for subscribing to a fixed tariff (multi-attribute factor), the user's fixed fee collection has a month-end condition (single attribute factor), and the user's charge is collected in a specified account item (multi-attribute factor). The diagnostic rules arranged according to the billing logic are shown in Table 1.
[0092] The diagnostic device provided in this embodiment has been described above. This embodiment breaks down each module in the billing system process and rationally plans it into billing factors. Then, by arranging and combining the billing factors, a series of abnormal diagnostic rules that conform to the billing rules are constructed. Only the system user ID needs to be entered to perform a comprehensive abnormal diagnosis and return the diagnostic results and repair suggestions.
[0093] In a second aspect, embodiments of the present invention provide a billing diagnostic device, comprising:
[0094] The first determining module is used to determine the target diagnostic rule among multiple diagnostic rules. The target diagnostic rule includes a billing factor sequence, and each billing factor in the billing factor sequence corresponds to a data source and at least one judgment rule. The second determining module is used to determine the sub-result corresponding to each billing factor based on the billing factor sequence, the data source corresponding to each billing factor, and at least one judgment rule. The third determining module is used to determine the billing diagnostic result based on the sub-result corresponding to each billing factor.
[0095] In some embodiments, the second determining module includes a second determining submodule, configured to determine, for each billing factor, target data corresponding to the user identifier from the data source corresponding to the billing factor based on the user identifier; and a second processing submodule, configured to process the target data using at least one judgment rule corresponding to the billing factor to obtain a sub-result.
[0096] In some embodiments, the target diagnostic rule includes the expected result corresponding to each billing factor; the billing diagnostic device further includes: a generation module, configured to generate an anomaly prompt instruction for target data corresponding to a user identifier in the target data source when it is determined that the sub-result representing at least one billing factor is inconsistent with the expected result; wherein the target data source corresponds to the abnormal billing factor, and the abnormal billing factor is the billing factor whose sub-result is inconsistent with the expected result.
[0097] In some embodiments, the target diagnostic rule includes the expected result corresponding to each billing factor; the billing diagnostic device further includes: a fourth determining module, configured to determine, based on predetermined mapping information, a target solution corresponding to the abnormal billing factor from a plurality of solutions when the determined diagnostic result indicates that the sub-result of at least one billing factor is inconsistent with the expected result; and an output module, configured to output the target solution; wherein the predetermined mapping information indicates the correspondence between the billing factor and the solution.
[0098] In some embodiments, the target diagnostic rule includes the expected result corresponding to each billing factor; the third determining module includes a third determining submodule, configured to determine the diagnostic result as passed in response to detecting that the sub-result of each billing factor in the same target diagnostic rule is consistent with the expected result; the third determining submodule is further configured to determine the diagnostic result as failed in response to detecting that the sub-result of at least one billing factor in the same target diagnostic rule is inconsistent with the expected result.
[0099] In some embodiments, the target diagnostic rule includes the expected result corresponding to each billing factor; the third determination module includes a third judgment submodule for determining whether the number of billing factors in the current billing factor sequence is equal to 0; if the number is equal to 0, the processing ends and the diagnostic result is determined to be pass; and if the number is greater than 0, the following operations are performed: determining the current billing factor from the current billing factor sequence; in response to detecting that the sub-result of the current billing factor is inconsistent with the expected result, the processing ends and the diagnostic result is determined to be fail; and in response to detecting that the sub-result of the current billing factor is consistent with the expected result, the current billing factor is deleted from the current billing factor sequence, and the operation of determining whether the number of billing factors in the current billing factor sequence is equal to 0 is returned.
[0100] In some embodiments, the third determination submodule is further configured to determine the first billing factor in the current billing factor sequence as the current billing factor based on the order of the multiple billing factors in the billing factor sequence.
[0101] The apparatus provided in the embodiments of the present invention has functions or includes modules that can be used to perform the methods described in the first aspect of the method embodiments above. The specific implementation and technical effects can be referred to the description of the method embodiments above. For the sake of brevity, they will not be repeated here.
[0102] It should be noted that all modules involved in this embodiment are logical modules. In practical applications, a logical unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. Furthermore, to highlight the innovative aspects of this invention, this embodiment does not introduce units that are not closely related to solving the technical problem proposed by this invention; however, this does not mean that other units are absent from this embodiment.
[0103] Reference Figure 9 This invention provides an electronic device comprising:
[0104] One or more processors 901;
[0105] The memory 902 stores one or more programs that, when executed by one or more processors, enable the one or more processors to implement any of the billing diagnostic methods described above.
[0106] One or more I / O interfaces 903 are connected between the processor and the memory and configured to enable information exchange between the processor and the memory.
[0107] The processor 901 is a device with data processing capabilities, including but not limited to a central processing unit (CPU); the memory 902 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), and flash memory (FLASH); the I / O interface (read / write interface) 903 is connected between the processor 901 and the memory 902, enabling information exchange between the processor 901 and the memory 902, including but not limited to a data bus (Bus).
[0108] In some embodiments, the processor 901, memory 902, and I / O interface 903 are interconnected via a bus, and thus connected to other components of the computing device.
[0109] This embodiment also provides a computer-readable medium having a computer program stored thereon. When the program is executed by a processor, it implements the billing diagnosis method provided in this embodiment. To avoid repetition, the specific steps of the billing diagnosis method will not be repeated here.
[0110] Those skilled in the art will understand that all or some of the steps, systems, or apparatuses in the methods, systems, and apparatuses described above can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software may be distributed on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0111] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0112] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0113] In the technical solution disclosed herein, the user's authorization or consent is obtained before acquiring or collecting the user's personal information.
[0114] Those skilled in the art will understand that although some embodiments described herein include certain features that are included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of this embodiment and form different embodiments.
[0115] It is understood that the above embodiments are merely exemplary implementations used to illustrate the principles of the present invention, and the present invention is not limited thereto. For those skilled in the art, various modifications and improvements can be made without departing from the spirit and essence of the present invention, and these modifications and improvements are also considered to be within the scope of protection of the present invention.
Claims
1. A billing diagnosis method, characterized in that, include: A target diagnostic rule is determined among multiple diagnostic rules. The target diagnostic rule includes a billing factor sequence and an expected result corresponding to each billing factor in the billing factor sequence. Each billing factor in the billing factor sequence corresponds to a data source and at least one judgment rule. Based on the billing factor sequence, the data source corresponding to each billing factor, and at least one judgment rule, determine the sub-result corresponding to each billing factor; as well as Based on the sub-results corresponding to each billing factor, a billing diagnostic result is determined; wherein, determining the billing diagnostic result based on the sub-results corresponding to each billing factor includes: in response to detecting that the sub-results of each billing factor in the same target diagnostic rule are consistent with the expected result, determining the diagnostic result as passed; and in response to detecting that the sub-results of at least one billing factor in the same target diagnostic rule are inconsistent with the expected result, determining the diagnostic result as failed.
2. The method according to claim 1, characterized in that, The step of determining the sub-result corresponding to each billing factor based on the billing factor sequence, the data source corresponding to each billing factor, and at least one judgment rule includes: For each billing factor, based on the user identifier, target data corresponding to the user identifier is determined from the data source corresponding to the billing factor; and The target data is processed using at least one judgment rule corresponding to the billing factor to obtain the sub-result.
3. The method according to claim 2, characterized in that, The method further includes: If the diagnostic result indicates that the sub-result representing at least one billing factor is inconsistent with the expected result, an anomaly prompt instruction is generated for the target data in the target data source corresponding to the user identifier. The target data source corresponds to the abnormal billing factor, which is a billing factor where the sub-result is inconsistent with the expected result.
4. The method according to claim 3, characterized in that, The method further includes: If the diagnostic result indicates that a sub-result representing at least one billing factor is inconsistent with the expected result, a target solution corresponding to the abnormal billing factor is determined from multiple solutions based on predetermined mapping information; and Output the proposed solutions to the objectives; The predetermined mapping information represents the correspondence between billing factors and solutions.
5. The method according to claim 1, characterized in that, The step of determining the billing diagnostic result based on the sub-results corresponding to each billing factor includes: Determine whether the number of billing factors in the current billing factor sequence is equal to 0; If the quantity is 0, the process ends and the diagnostic result is determined to be passed; and If the quantity is greater than 0, perform the following operation: Determine the current billing factor from the current billing factor sequence; In response to the detection that the sub-result of the current billing factor is inconsistent with the expected result, the processing ends and the diagnostic result is determined to be a failure; and In response to detecting that the sub-result of the current billing factor is consistent with the expected result, the current billing factor is removed from the current billing factor sequence, and an operation to determine whether the number of billing factors in the current billing factor sequence is equal to 0 is returned.
6. The method according to claim 5, characterized in that, Determining the current billing factor from the current billing factor sequence includes: Based on the order of multiple billing factors in the billing factor sequence, the first billing factor in the current billing factor sequence is determined as the current billing factor.
7. A billing diagnostic device, characterized in that, include: The first determining module is used to determine a target diagnostic rule among multiple diagnostic rules. The target diagnostic rule includes a billing factor sequence and an expected result corresponding to each billing factor in the billing factor sequence. Each billing factor in the billing factor sequence corresponds to a data source and at least one judgment rule. The second determining module is used to determine the sub-result corresponding to each billing factor based on the billing factor sequence, the data source corresponding to each billing factor, and at least one judgment rule. as well as The third determining module is used to determine the billing diagnosis result based on the sub-results corresponding to each billing factor. Specifically, the third determining module is used to: determine the diagnosis result as passed when the sub-results of each billing factor in the same target diagnostic rule are consistent with the expected results; and determine the diagnosis result as failed when the sub-results of at least one billing factor in the same target diagnostic rule are inconsistent with the expected results.
8. An electronic device, characterized in that, include: One or more processors; A memory having stored one or more programs that, when executed by one or more processors, cause the one or more processors to implement the method according to any one of claims 1-6; One or more I / O interfaces are connected between the processor and the memory and configured to enable information interaction between the processor and the memory.
9. A computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the method according to any one of claims 1-6.
Citation Information
Patent Citations
Method of automatic fault diagnosis based on groovy dynamic scripting language
CN109033449A