Intelligent data-driven charging rule generation method and system and electronic equipment
By generating billing rules through intelligent data-driven methods and utilizing decision tree models, genetic algorithms, and reinforcement learning, the inefficiency of traditional billing rule engines has been solved. This enables the automation, dynamic optimization, and real-time verification of billing rules, improving the efficiency and accuracy of the billing system and reducing operating costs.
Patent Information
- Application Number
- CN202510952578.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-10
- Publication Date
- 2025-11-14
AI Technical Summary
Traditional billing rule engines rely on complex and inefficient manual configuration, making it difficult to flexibly adapt to complex business needs. This results in insufficient billing accuracy, high operating costs, and difficulty in quickly responding to business changes.
By collecting user behavior and business rule data, and using decision tree models, genetic algorithms, and reinforcement learning to generate billing rules, we can achieve automation, dynamic optimization, and real-time verification, generating billing rules that conform to business logic.
It enables automated generation and dynamic optimization of billing rules, improving the efficiency, accuracy, and flexibility of the billing system, reducing labor costs and operational risks, and ensuring the fairness and transparency of the rules.
Smart Images

Figure CN120952777A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to an intelligent data-driven billing rule generation method, system, and electronic device. Background Technology
[0002] Traditional billing rule engines typically require manual rule writing and configuration, which becomes complex and time-consuming to maintain as business needs change. Furthermore, manual rule configuration is prone to errors and inefficient in large-scale data processing. Billing rule engines usually rely on predefined rule sets, but as business evolves, new billing models (such as pay-as-you-go, dynamic discounts, freemium, and peak / off-peak billing) constantly emerge, requiring the rule engine to make intelligent decisions based on changes in configuration parsing. In complex business scenarios, a single rule engine may not be able to handle multi-layered billing needs (such as basic billing, dynamic discount billing, and value-added service billing).
[0003] Manually setting billing rules often consumes a significant amount of time and manpower, especially when dealing with complex services or large datasets. This inefficiency can severely impact work efficiency. Relying on manual setting is prone to inaccuracies due to oversight or misunderstanding of policy intent, thus affecting billing accuracy. As billing rules become increasingly complex and frequent updates become the norm, manual setting struggles to respond quickly to these changes and flexibly adapt to new rule requirements. Subjective judgment may be involved in the manual setting process, which not only affects the fairness and transparency of billing rules but may also erode public trust in government services. Maintaining and managing billing rules requires substantial human and financial resources, significantly increasing operating costs. Summary of the Invention
[0004] The present invention aims to at least solve the technical problems existing in the prior art, and to provide an intelligent data-driven billing rule generation method, system and electronic device.
[0005] In a first aspect, the present invention provides an intelligent data-driven billing rule generation method, comprising: collecting user behavior data and business rule data, and cleaning the user behavior data and the business rule data; clustering the cleaned user behavior data and business rule data to generate initial billing rules, and optimizing the initial billing rules using a pre-trained decision tree model to generate billing rules; using a genetic algorithm to perform a global search on gene sequences representing rule parameters to generate an initial rule combination, and using reinforcement learning to locally fine-tune the initial rule combination to generate billing rules; verifying the billing rules, and determining the validity of the billing rules based on the verification results; wherein, if the billing rules are valid, the billing rules are used as the final billing rules; if the billing rules are invalid, the pre-trained decision tree model is used to optimize the billing rules.
[0006] Optionally, clustering is performed on the cleaned user behavior data and business rule data to generate initial billing rules, including: using the K-means clustering algorithm to cluster the cleaned user behavior data, and selecting elbow points as the optimal number of clusters; wherein, the cleaned business rule data serves as the constraint conditions corresponding to the cleaned user behavior data; and user behavior patterns are extracted based on the clustering results to generate the initial billing rules.
[0007] Optionally, the initial billing rule is optimized using a pre-trained decision tree model to generate a billing rule, including: extracting user behavior features and business rule features corresponding to the cleaned user behavior data and business rule data respectively; training the decision tree model based on the user behavior features and the business rule features; and extracting rule paths from the decision tree model to generate the billing rule.
[0008] Optionally, a genetic algorithm is used to perform a global search on the gene sequences representing the rule parameters to generate an initial rule combination, including: encoding the billing rule parameters into gene sequences; generating an initial population and evaluating the quality of individuals through a fitness function; wherein the fitness function is a weighted combination based on profit, satisfaction, and accuracy; and generating the initial rule combination through selection, crossover, and mutation operations.
[0009] Optionally, reinforcement learning is used to locally fine-tune the initial rule combination to generate billing rules, including: defining the state as the current billing rule configuration and business indicator data; defining the action as the adjustment operation of the rule parameters; optimizing the billing rule parameters through a reward function, and generating the billing rules based on the optimized billing rule parameters.
[0010] Optionally, the billing rules are verified, including: conducting a small-scale pilot test of the billing rules; using an intelligent monitoring system to detect anomalies and generate alarms; and adjusting the billing rules based on the pilot test feedback.
[0011] Optionally, the method further includes: decomposing the generated billing rules into multiple layers; wherein the multiple layers include: a first layer of core billing rules, a second layer of preferential rules that depend on the core rules, and a third layer of special billing rules for specific user groups; independently configuring and updating the rules of each layer through a distributed rule engine architecture; and using a scheduler to execute the rules according to priority and dependency.
[0012] Optionally, the user behavior data includes at least one of usage frequency, usage duration, and usage time period, and the business rule data includes at least one of on-demand billing, dynamic discounts, freemium, and peak-valley billing.
[0013] Secondly, this invention provides an intelligent data-driven billing rule generation system, comprising: a data collection and cleaning module for collecting user behavior data and business rule data, and cleaning the user behavior data and the business rule data; a first billing rule generation module for clustering based on the cleaned user behavior data and business rule data to generate initial billing rules, and optimizing the initial billing rules using a pre-trained decision tree model to generate billing rules; a second billing rule generation module for using a genetic algorithm to perform a global search on gene sequences representing rule parameters to generate an initial rule combination, and using reinforcement learning to locally fine-tune the initial rule combination to generate billing rules; and a billing rule verification module for verifying the billing rules and determining the validity of the billing rules based on the verification results; wherein, if the billing rule is valid, the billing rule is used as the final billing rule; if the billing rule is invalid, the pre-trained decision tree model is used to optimize the billing rule.
[0014] Thirdly, the present invention provides an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to execute the intelligent data-driven billing rule generation method as described above.
[0015] In this embodiment of the invention, user behavior data and business rule data are collected and cleaned. Based on the cleaned user behavior data and business rule data, clustering is performed to generate initial billing rules. These initial billing rules are then optimized using a pre-trained decision tree model to generate new billing rules. A genetic algorithm is used to perform a global search of the gene sequences representing the rule parameters to generate initial rule combinations. Reinforcement learning is then used to locally fine-tune these initial rule combinations to generate new billing rules. The billing rules are then verified, and their validity is determined based on the verification results. If a billing rule is valid, it is adopted as the final billing rule. If a billing rule is invalid, the pre-trained decision tree model is used to optimize it. In other words, the embodiments of the present invention achieve automated generation, dynamic optimization and real-time verification of billing rules through an intelligent data-driven billing rule generation method. This solves the technical problems of traditional billing rule generation, which relies on manual labor, is inefficient, lacks flexibility, is prone to errors and has delayed verification, resulting in high costs, slow response and insufficient accuracy. The invention achieves the technical effect of significantly improving the efficiency, accuracy and flexibility of the billing system, while reducing labor costs and operational risks. Attached Figure Description
[0016] Figure 1 This is a flowchart of the intelligent data-driven billing rule generation method provided by the present invention;
[0017] Figure 2 This is a schematic diagram of the intelligent data-driven billing rule generation system provided by the present invention;
[0018] Figure 3 This is a schematic diagram of the structure of an electronic device provided by the present invention. Detailed Implementation
[0019] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0020] In the description of this invention, it should be understood that the terms "longitudinal", "lateral", "up", "down", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.
[0021] In the description of this invention, unless otherwise specified and limited, it should be noted that the terms "installation", "connection" and "linking" should be interpreted broadly. For example, they can refer to mechanical or electrical connections, or internal connections between two components. They can be direct connections or indirect connections through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms according to the specific circumstances.
[0022] The execution entity of the intelligent data-driven billing rule generation method includes, but is not limited to, at least one of the following electronic devices that can be configured to execute the method provided in this embodiment of the invention: a server, a terminal, etc. In other words, the intelligent data-driven billing rule generation method can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes, but is not limited to, a single server, a server cluster, a cloud server, or a cloud server cluster. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.
[0023] According to one aspect of the present invention, an intelligent data-driven billing rule generation method is provided. Figure 1 This is a flowchart of the intelligent data-driven billing rule generation method provided by the present invention, such as... Figure 1 As shown, the method includes the following steps:
[0024] Step S102 involves collecting user behavior data and business rule data, and then cleaning the user behavior data and business rule data. The user behavior data includes at least one of usage frequency, usage duration, and usage time period; the business rule data includes at least one of on-demand billing, dynamic discounts, freemium, and peak-valley billing models. The aforementioned business rule data can be obtained from multiple sources, including government service systems, policy documents, and market research.
[0025] Step S104 involves clustering the cleaned user behavior data and business rule data to generate initial billing rules. These initial billing rules are then optimized using a pre-trained decision tree model to generate new billing rules. During implementation, the billing rules generated in step S104 can be used preferentially.
[0026] Step S106 involves using a genetic algorithm to perform a global search of the gene sequences representing the rule parameters, generating an initial rule combination, and then using reinforcement learning to locally fine-tune the initial rule combination to generate billing rules. During implementation, the billing rules generated in step S106 can be used as an auxiliary method.
[0027] Step S108: Verify the billing rule and determine its validity based on the verification result. If the billing rule is valid, it will be used as the final billing rule. If the billing rule is invalid, it will be optimized using a pre-trained decision tree model.
[0028] This invention, through an intelligent data-driven billing rule generation method, achieves automated generation, dynamic optimization, and real-time verification of billing rules. This solves the technical problems of traditional billing rule generation, which relies on manual labor, is inefficient, lacks flexibility, is prone to errors, and suffers from delayed verification, resulting in high costs, slow response, and insufficient accuracy. The invention significantly improves the efficiency, accuracy, and flexibility of the billing system while reducing labor costs and operational risks.
[0029] It's worth noting that this method can automate the processing of massive amounts of data in government services, significantly reducing the time required for data collection, cleaning, and rule generation. Complex rule-setting tasks that previously required substantial manpower and time can now be completed quickly through automation. The efficiency improvement is particularly pronounced when dealing with massive amounts of data and complex services.
[0030] This method uses artificial intelligence and other related technologies to automatically extract key information from policy documents and service data, and generate billing rules based on policy intent. Compared to the oversights or misunderstandings that are prone to occur in manual settings, it can more accurately capture and process complex information, significantly reducing errors in the rules.
[0031] This method possesses adaptive and self-optimizing capabilities, automatically updating billing rules in response to frequent policy changes. When faced with new policy documents or service adjustments, new rules can be quickly generated by retraining the model, eliminating the need for manual intervention. Furthermore, the intelligent algorithm can be adjusted based on actual usage performance, ensuring that the rules always adapt to changing environments.
[0032] The generation process of automated billing rules is more transparent, and the algorithm processing is traceable and auditable. By reducing potential subjective biases in manual rule setting, the rules are ensured to be more fair and impartial. Government service processes are also made more transparent.
[0033] This method's automation significantly reduces the need for manual input, particularly in rule creation, updating, and maintenance. It reduces reliance on manual rule setting, lowering operational and maintenance costs. Especially in scenarios with frequent policy changes, it can automatically adapt and generate new rules, saving both manpower and time.
[0034] As an optional implementation, clustering is performed on the cleaned user behavior data and business rule data to generate initial billing rules, including: using the K-means clustering algorithm to cluster the cleaned user behavior data, and selecting elbow points as the optimal number of clusters; wherein, the cleaned business rule data serves as the constraint condition corresponding to the cleaned user behavior data; and user behavior patterns are extracted based on the clustering results to generate initial billing rules.
[0035] Optionally, identify features related to user behavior data, such as usage frequency, usage duration, and usage time period. Plot the SSE curve using the elbow rule, selecting the elbow point as the optimal number of clusters. Initialize K random centroids, assign each data point to the cluster containing the nearest centroid, update the centroid of each cluster, and repeat the assignment and update steps until the centroids no longer change or the maximum number of iterations is reached. Calculate the silhouette coefficient to evaluate the clustering effect. Analyze the characteristics of each cluster and extract user behavior patterns. Generate billing rules based on the cluster characteristics. For example, generate monthly subscription billing rules for user groups with high usage frequency during weekdays.
[0036] In embodiments of the present invention, user behavior patterns are automatically identified through clustering, reducing manual intervention and improving rule generation efficiency. Compared to traditional manual settings, it can quickly adapt to massive amounts of data and complex business scenarios.
[0037] As an optional implementation, the initial billing rules are optimized using a pre-trained decision tree model to generate billing rules, including: extracting user behavior features and business rule features corresponding to the cleaned user behavior data and business rule data respectively; training a decision tree model based on the user behavior features and business rule features; and extracting rule paths from the decision tree model to generate billing rules.
[0038] Optionally, user behavior characteristics include, but are not limited to, usage frequency, usage duration, usage time period, and historical spending amount. Business rule characteristics include, but are not limited to, billing model type, discount rules, and service level.
[0039] Furthermore, numerical features are standardized. Categorical features are one-hot encoded to construct cross features (such as "usage frequency × service level").
[0040] The CART (Classification and Regression Trees) algorithm is used to support classification and regression tasks. Initial parameters for the decision tree are set, such as maximum depth (max_depth), minimum number of sample splits (min_samples_split), and minimum number of leaf samples (min_samples_leaf). These initial settings can be made based on the size and complexity of the dataset. By recursively splitting nodes, the optimal feature and threshold (based on Gini impurity or information gain) are selected until the maximum depth is reached or the number of samples in a node is less than the threshold, at which point model training stops. Each path from the root node to a leaf node corresponds to a rule. Redundant conditions (such as duplicate feature judgments) are merged. Rules with low confidence are removed (based on the proportion of leaf node samples). The extracted rules are converted into executable billing logic (such as JSON or DSL format).
[0041] Optionally, the features and labels of the decision tree can be determined; feature selection should be based on factors that have a potential impact on recommendation performance. In addition to user behavior data, information such as product attributes and recommendation scenarios may also be included.
[0042] The CART algorithm is selected, and its specific implementation method is as follows:
[0043] Decision tree training function:
[0044]
[0045]
[0046]
[0047] feature_names=['age','usage_frequency']
[0048] rules=extract_rules(root,feature_names)
[0049] for rule in rules:
[0050] print("->".join(rule))
[0051] In embodiments of the present invention, feature cross-validation and business rule constraints ensure that the generated rules conform to actual business logic. When user behavior or business rules change, retraining the decision tree can quickly generate new rules.
[0052] As an optional embodiment, a genetic algorithm is used to perform a global search on the gene sequences representing the rule parameters to generate an initial rule combination, including: encoding the billing rule parameters into gene sequences; generating an initial population and evaluating the quality of individuals through a fitness function; wherein the fitness function is a weighted combination based on profit, satisfaction, and accuracy; and generating the initial rule combination through selection, crossover, and mutation operations.
[0053] A two-stage hybrid optimization strategy is adopted, in which a genetic algorithm is used for the initial combination and screening of billing rules, and then reinforcement learning is used to locally optimize the selected rules.
[0054] Alternatively, the billing rule optimization problem can be modeled as a combinatorial optimization problem in a high-dimensional search space. Each billing rule can be viewed as a combination of configuration parameters, and the goal is to optimize these combinations to achieve the best results in terms of profit, customer satisfaction, and accuracy for the billing system.
[0055] The billing rules are represented as an array using gene encoding, with each element representing a rule parameter. Example: [P1, P2, P3, ..., Pn*m], where Pi represents the parameter value of the i-th rule. A population is generated where each individual is a randomly generated gene sequence. The population size can be set to N.
[0056] It should be noted that when generating an individual's gene sequence, the value of each parameter is randomly selected within its defined domain. For example, the value of P1 can be randomly generated between 0 and 1000, the value of P2 between 0 and 10, and so on. Each randomly generated gene sequence corresponds to a specific combination of billing rules. For example, if the gene sequence is 500,5,3, the corresponding billing rules can be interpreted as follows: special billing applies when the user's monthly usage time exceeds 500 minutes; a certain discount is provided when the monthly usage frequency exceeds 5 times. The billing scheme type is 3.
[0057] Furthermore, a fitness function is determined to evaluate the merits of each individual. The fitness function should be weighted according to the following objectives: Profit, Satisfaction, and Accuracy.
[0058] Example of fitness function:
[0059] Fitness=w1Profit*w2·Accuracy+w3·Satis
[0060] Where w1, w2, and w3 are the weights of each objective.
[0061] Furthermore, a crossover operation is performed on the selected individuals to generate new individuals. For example, single-point crossover or double-point crossover. The stopping condition is set to reach the maximum number of iterations or if the fitness does not significantly improve over multiple consecutive generations.
[0062] In the embodiments of the present invention, by deeply integrating feature engineering with multi-objective decision trees, the generation of billing rules is transformed from "human experience-driven" to "data intelligence-driven", which significantly improves operational efficiency while ensuring business compliance.
[0063] As an optional implementation, reinforcement learning is used to locally fine-tune the initial rule combination to generate billing rules, including: defining the state as the current billing rule configuration and business indicator data; defining the action as the adjustment operation of the rule parameters; optimizing the billing rule parameters through the reward function, and generating billing rules based on the optimized billing rule parameters.
[0064] Optionally, a suitable reinforcement learning algorithm, Deep Q-Learning (DQN), is determined.
[0065] Furthermore, define the environment, such as: State: the current billing rule configuration and business indicator data of the system; Action: the operation of adjusting the billing rule parameters, such as increasing or decreasing a certain parameter; Reward: the reward given according to the adjusted billing result.
[0066] Furthermore, clearly define the adjustable billing rule parameters, such as usage duration thresholds, frequency thresholds, and fee standards, and determine the value range for each parameter. For example, the usage duration threshold range is 0 to Tmax, and the frequency threshold range is 0 to Fmax. Define a set of actions, commonly including "increase by 10%", "decrease by 10%", "increase a fixed value such as 1 hour or 2 hours", and "decrease a fixed value of 1 hour or 2 hours". After selecting an action based on the current status, adjust the parameters according to the action definition. For example, if the current usage duration threshold is 500 minutes, after executing the "increase by 10%" action, the new threshold will be 550 minutes. Check whether the adjusted parameters are within a reasonable range and meet the business rule constraints. If they exceed the range or violate the constraints, adjust them to the most recent legal value.
[0067] When calculating the reward value, the following formula can be used: R = w1·ΔP + w2·ΔS + w3·ΔA; where R represents the reward value; w1, w2, and w3 are weighting coefficients, corresponding to the weights of profit, satisfaction, and accuracy, respectively; ΔP represents the change in profit; ΔS represents the change in satisfaction; and ΔA represents the change in accuracy. The selection of weights should be based on business priorities and objectives. If profit is the primary objective, then w1 should be given a higher weight.
[0068] Furthermore, the strategy's performance is gradually improved through multiple rounds of training until suitable billing rules are generated. The specific implementation process is as follows:
[0069] Retrieve current billing rule parameters and business metric data from the environment. Select an action based on the current state. Execute the selected action to adjust the billing rule parameters. Update the business metric data and calculate the reward value based on the adjusted billing rule. Store the current state, action, reward, and new state in the experience replay buffer. Extract samples from the buffer, update the policy network, and optimize the parameter adjustment strategy. Determine if the termination condition is met, such as reaching the maximum training steps or performance no longer improving. Generate the final billing rule using the training results.
[0070] In the embodiments of the present invention, the intelligent search capability of the genetic algorithm achieves a breakthrough in efficiency improvement and multi-objective balance in the optimization of billing rules, providing reliable technical support for dynamic pricing in complex business scenarios.
[0071] As an optional implementation, the billing rules are validated, including: running the billing rules on a small-scale pilot; using an intelligent monitoring system to detect anomalies and generate alarms; and adjusting the billing rules based on pilot feedback.
[0072] Optionally, a small-scale pilot program can be implemented for a period of time, introducing an intelligent monitoring system to automatically detect anomalies and generate alarms. Based on the feedback from the pilot program, the effectiveness and widespread acceptance of the billing rules can be determined. If successful, a valid billing rule is generated; otherwise, a pre-trained decision tree model is used to optimize the billing rule until a valid and widely accepted billing rule is generated.
[0073] As an optional embodiment, the above method further includes: decomposing the generated billing rules into multiple layers; wherein the multiple layers include: the first layer is the core billing rules, the second layer is the preferential rules that depend on the core rules, and the third layer is the special billing rules for specific user groups; independently configuring and updating the rules of each layer through a distributed rule engine architecture; and using a scheduler to execute the rules according to priority and dependency.
[0074] Optionally, a multi-layered distributed rule engine architecture can be used to decompose the billing rules generated by S2 and S3 into multiple layers for separate processing. Each layer of the rule engine can be configured and updated independently and managed by a scheduler, executing rules according to priority and dependencies.
[0075] It should be noted that analyzing all billing rules identifies the fundamental and critical core rules, which are usually closely related to basic billing logic, such as billing by usage or billing by service duration. These core rules constitute the first layer.
[0076] Identify the dependencies between rules and categorize those rules that depend on the core rule into the second layer. For example, a discount package rule typically relies on the basic billing rule to calculate the discounted cost.
[0077] Continue analyzing the remaining rules, dividing them into finer layers based on business complexity and data dependencies. For example, specific billing rules for particular user groups could serve as a third layer.
[0078] Each level of the rule engine adopts a modular design and has its own independent configuration file. The configuration file defines the rules' parameters, execution conditions, priorities, and other information. The parameters of each level of the rule engine can be adjusted individually according to business needs and market changes.
[0079] Each layer of the rule engine has its own version control system. When rules need to be updated, updates and tests can be performed without affecting other layers.
[0080] The scheduler is responsible for executing rule engines at different levels according to priority and dependencies. It can ensure that high-priority rule engines are executed based on a preset priority order.
[0081] According to another aspect of the present invention, an intelligent data-driven billing rule generation system is provided. Figure 2 This is a schematic diagram of the intelligent data-driven billing rule generation system provided by the present invention, such as... Figure 2 As shown, the intelligent data-driven billing rule generation system includes: a data collection and cleaning module 202, a first billing rule generation module 204, a second billing rule generation module 206, and a billing rule verification module 208. The intelligent data-driven billing rule generation system will be described in detail below.
[0082] The data collection and cleaning module 202 is used to collect user behavior data and business rule data, and to clean the user behavior data and business rule data.
[0083] The first billing rule generation module 204 is used to cluster based on cleaned user behavior data and business rule data to generate initial billing rules, and to optimize the initial billing rules using a pre-trained decision tree model to generate the final billing rules.
[0084] The second billing rule generation module 206 is used to perform a global search on the gene sequence representing the rule parameters using a genetic algorithm to generate an initial rule combination, and to perform local fine-tuning on the initial rule combination using reinforcement learning to generate billing rules.
[0085] The billing rule verification module 208 is used to verify the billing rules and determine the validity of the billing rules based on the verification results. If the billing rule is valid, it is adopted as the final billing rule; if the billing rule is invalid, it is optimized using a pre-trained decision tree model.
[0086] This invention, through an intelligent data-driven billing rule generation system, achieves automated generation, dynamic optimization, and real-time verification of billing rules. This solves the technical problems of traditional billing rule generation, which relies on manual labor, is inefficient, lacks flexibility, is prone to errors, and suffers from delayed verification, resulting in high costs, slow response, and insufficient accuracy. The invention significantly improves the efficiency, accuracy, and flexibility of the billing system while reducing labor costs and operational risks.
[0087] It should be noted that the data collection and cleaning module 202, the first billing rule generation module 204, the second billing rule generation module 206, and the billing rule verification module 208 mentioned above correspond to steps S102 to S108 in the method embodiment. The examples and application scenarios implemented by the above modules and the corresponding steps are the same, but are not limited to the content disclosed in the above method embodiment.
[0088] According to another aspect of the present invention, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the intelligent data-driven billing rule generation method as described above.
[0089] like Figure 3 The diagram shown is a structural schematic of an electronic device for an intelligent data-driven billing rule generation method according to an embodiment of the present invention. The electronic device may include a processor 10, a memory 11, a communication bus 12, and a communication interface 13, and may also include a computer program, such as an intelligent data-driven billing rule generation method program, stored in the memory 11 and executable on the processor 10.
[0090] In some embodiments, the processor 10 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control unit of the electronic device, connecting various components of the entire electronic device through various interfaces and lines. It executes programs or modules stored in the memory 11 (e.g., executing intelligent data-driven billing rule generation methods) and calls data stored in the memory 11 to perform various functions of the electronic device and process data.
[0091] The memory 11 includes at least one type of readable storage medium, including flash memory, portable hard drive, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of an electronic device, such as a portable hard drive. In other embodiments, the memory 11 can be an external storage device of the electronic device, such as a plug-in portable hard drive, SmartMediaCard (SMC), SecureDigital (SD) card, FlashCard, etc. Furthermore, the memory 11 can include both internal and external storage units of the electronic device. The memory 11 can be used not only to store application software and various types of data installed on the electronic device, such as the code of an intelligent data-driven billing rule generation method program, but also to temporarily store data that has been output or will be output.
[0092] The communication bus 12 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. The bus is configured to enable communication between the memory 11 and at least one processor 10, etc.
[0093] Communication interface 13 is used for communication between the aforementioned electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a Wi-Fi interface, Bluetooth interface, etc.), typically used to establish communication connections between the electronic device and other electronic devices. The user interface may be a display, an input unit (such as a keyboard), or, optionally, a standard wired or wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen, etc. The display may also be appropriately referred to as a screen or display unit, used to display information processed in the electronic device and to display a visual user interface.
[0094] Figure 3 Only electronic devices with components are shown; it will be understood by those skilled in the art that... Figure 3 The structure shown does not constitute a limitation on the electronic device and may include fewer or more components than shown, or combine certain components, or have different component arrangements.
[0095] For example, although not shown, the electronic device may also include a power supply (such as a battery) to power various components. Preferably, the power supply can be logically connected to at least one processor 10 via a power management device, thereby enabling functions such as charging management, discharging management, and power consumption management. The power supply may also include one or more DC or AC power supplies, recharging devices, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.
[0096] It should be understood that the embodiments are for illustrative purposes only and are not limited to this structure in the scope of the patent application.
[0097] Furthermore, if the modules / units integrated into the electronic device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, a computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, or a read-only memory (ROM).
[0098] In the description of this specification, the references to terms such as "an embodiment," "some embodiments," "example," "specific example," "a implementation," "a preferred implementation," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0099] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
Claims
1. An intelligent data-driven billing rule generation method, characterized in that, include: Collect user behavior data and business rule data, and clean the user behavior data and business rule data; Clustering is performed on the cleaned user behavior data and business rule data to generate initial billing rules, and the initial billing rules are optimized using a pre-trained decision tree model to generate new billing rules. A genetic algorithm is used to perform a global search on the gene sequences representing the rule parameters to generate an initial rule combination, and reinforcement learning is used to locally fine-tune the initial rule combination to generate billing rules. The billing rules are verified, and their validity is determined based on the verification results. If the billing rules are valid, they are adopted as the final billing rules. If the billing rules are invalid, they are optimized using a pre-trained decision tree model.
2. The method according to claim 1, characterized in that, Clustering is performed on the cleaned user behavior data and business rule data to generate initial billing rules, including: The cleaned user behavior data is clustered using the K-means clustering algorithm, and the elbow points are selected as the optimal number of clusters; wherein, the cleaned business rule data serves as the constraint condition corresponding to the cleaned user behavior data. User behavior patterns are extracted based on the clustering results to generate the initial billing rules.
3. The method according to claim 1, characterized in that, The initial billing rules are optimized using a pre-trained decision tree model to generate billing rules, including: Extract the user behavior features and business rule features corresponding to the cleaned user behavior data and business rule data respectively; The decision tree model is trained based on the user behavior characteristics and the business rule characteristics; The billing rules are generated by extracting rule paths from the decision tree model.
4. The method according to claim 1, characterized in that, A genetic algorithm is used to perform a global search on the gene sequences representing the rule parameters to generate an initial combination of rules, including: Encode the billing rule parameters into gene sequences; An initial population is generated, and the quality of individuals is evaluated using a fitness function; wherein the fitness function is a weighted combination of profit, satisfaction, and accuracy. Initial rule combinations are generated through selection, crossover, and mutation operations.
5. The method according to claim 1, characterized in that, The initial rule combination is locally fine-tuned using reinforcement learning to generate billing rules, including: Define the status as the current billing rule configuration and business metric data; Define the action as an operation that adjusts the rule parameters; The billing rule parameters are optimized using a reward function, and the billing rule is generated based on the optimized billing rule parameters.
6. The method according to claim 1, characterized in that, Verification of the billing rules includes: The billing rules will be piloted on a small scale. Utilize intelligent monitoring systems to detect anomalies and generate alarms; The billing rules will be adjusted based on feedback from the pilot program.
7. The method according to claim 1, characterized in that, The method further includes: The generated billing rules are decomposed into multiple layers; wherein, the multiple layers include: the first layer is the core billing rules, the second layer is the preferential rules that depend on the core rules, and the third layer is the special billing rules for specific user groups; The distributed rule engine architecture allows for independent configuration and updating of rules at each level. Use the scheduler to execute rules based on priority and dependencies.
8. The method according to any one of claims 1 to 7, characterized in that, The user behavior data includes at least one of usage frequency, usage duration, and usage time period, and the business rule data includes at least one of on-demand billing, dynamic discount, freemium, and peak-valley billing.
9. An intelligent data-driven billing rule generation system, characterized in that, include: The data collection and cleaning module is used to collect user behavior data and business rule data, and to clean the user behavior data and the business rule data. The first billing rule generation module is used to cluster based on cleaned user behavior data and business rule data to generate initial billing rules, and to optimize the initial billing rules using a pre-trained decision tree model to generate billing rules. The second billing rule generation module is used to perform a global search on the gene sequence representing the rule parameters using a genetic algorithm to generate an initial rule combination, and to perform local fine-tuning on the initial rule combination using reinforcement learning to generate billing rules. The billing rule verification module is used to verify the billing rule and determine the validity of the billing rule based on the verification result. If the billing rule is valid, it is adopted as the final billing rule. If the billing rule is invalid, it is optimized using a pre-trained decision tree model.
10. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to execute the intelligent data-driven billing rule generation method as described in any one of claims 1 to 8.