Water fee calculation system and method based on rule engine
By adopting a component design based on rules engine in the water fee calculation system, the flexibility and maintainability problems of existing systems in the face of high-frequency policy adjustments are solved, and the effects of rapid response and cross-platform application are achieved.
Patent Information
- Application Number
- CN202510637557.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-19
- Publication Date
- 2025-06-20
AI Technical Summary
When facing high-frequency policy adjustments in the water industry, the existing water fee calculation system has low debugging efficiency, insufficient flexibility and maintainability, high learning costs, and it is difficult to quickly respond to policy changes and cross-platform transplantation.
Using a water fee calculation system based on the rules engine, by separating business rules from the code, the rules designed by component can be managed and modified independently of the application logic, supporting automatic matching and orchestration of business components, and achieving flexible policy adjustments and cross-platform applications.
It realizes the flexibility and maintainability of the water fee calculation system, supports high-frequency policy adjustments, reduces debugging and maintenance costs, and improves the cross-platform adaptability and computing efficiency of the system.
Smart Images

Figure CN120181803A_ABST
Abstract
Description
Technical Field
[0001] Multiple embodiments of this specification relate to the technical field of water utility enterprise billing, and specifically to a water fee calculation system and method based on a rule engine. Background Art
[0002] As a people's livelihood service enterprise, the water utility company undertakes the core responsibility of accurately and efficiently calculating water fees. The accuracy of water fee calculation not only concerns the normal operation of the enterprise, but also directly affects people's livelihood. Only by strictly following national laws, regulations and local policies and quickly completing water consumption accounting and fee collection can the orderly operation of residents' lives and commercial activities be guaranteed. The water fee calculation logic is significantly complex: multiple factors such as user type (residential / commercial / industrial), regional water resource allocation policies, stepped pricing rules, seasonal floating rates, and preferential policies for special groups need to be considered, and these rules may change frequently with policy adjustments.
[0003] The current mainstream solution uses database stored procedures to implement the billing logic. As pre-compiled SQL code blocks, stored procedures are directly executed on the database server, accept parameters, execute complex logic, and return results, reducing the network interaction between the application layer and the database and being suitable for massive data calculations.
[0004] However, there are significant conflicts between the technical characteristics of stored procedures and the business requirements of the water utility industry with high-frequency policy adjustments: 1. Low debugging efficiency: ① Tool dependence: Specific database tools need to be used to set breakpoints and execute step by step, and it cannot be debugged intuitively like application code such as Java and C; ② Difficult logical tracing: Nested calls or dynamic SQL easily lead to opaque execution paths, and it takes a long time to locate when there are rule errors; ③ Dependence on test data: Test data covering multiple steps and multiple user types need to be constructed, and the rollback cost is high after failure. 2. Insufficient flexibility and maintainability: ① Lag in rule iteration: Each time the policy is adjusted, the stored procedure needs to be modified and redeployed, and it cannot respond quickly through configuration; ② High cross-platform porting cost: The syntax of stored procedures in different databases varies greatly, and the logic needs to be rewritten when migrating to a new database, which hinders system upgrades and is costly. 3. High learning cost: Developers need to master specific database syntax and debugging tools, and the team skill training cycle is long. Summary of the Invention
[0005] Embodiments of this specification provide a water fee calculation system and method based on a rule engine. By separating business rules from the code, the componentized rules can be managed and modified independently of the application program logic, meeting the business requirements of high-frequency policy adjustments in the water utility industry.
[0006] The technical solution is as follows: In a first aspect, an embodiment of this specification provides a water fee calculation system based on a rule engine, including: An acquisition unit that acquires a component library including a plurality of water volume business components related to water volume and a plurality of water price business components related to water price, as well as business information including user data and water usage data; A matching unit that, based on user data, acquires the water volume business components and water price business components in the component library to obtain a component package; An orchestration unit that orchestrates based on the water volume business components and water price business components in the component package to obtain process orchestration information; A billing unit that obtains water usage fees based on water usage data and process orchestration information.
[0007] By adopting the above technical solution, business components are automatically matched according to user data to form a component package, and the execution order of each business component in the component package is automatically or manually orchestrated to obtain process orchestration information. The water usage data enters the first business component for calculation according to the process orchestration information, and other business components recalculate the calculation results of their respective previous business components in turn, and finally the water usage fees are calculated.
[0008] When a new pricing policy is added, there is no need to modify the water fee generation code in the database. Just add new business components to the component library directly. When calculating the water fee, the matching unit automatically matches the corresponding water volume business components and water price business components according to user data, and the water usage fees under the new policy can be obtained. When adjusting the existing policy, due to the componentization of the business, the businesses are relatively independent of each other. Modifying the code of the corresponding business component in the application layer can be used for intuitive debugging, and it will not affect other business components and the overall fee generation logic, with stronger flexibility and maintainability. And the business components located in the application layer are convenient for maintenance and expansion, and support cross-platform applications.
[0009] As a preferred solution, the orchestration unit includes a standard orchestration module; The standard module orchestrates the water volume business components and water price business components in the component package according to a preset priority standard to obtain process orchestration information.
[0010] By adopting the above technical solution, the preset priority can automatically orchestrate the execution order of each business component in the component package to avoid rule conflicts, so as to meet large-scale batch calculations.
[0011] As a preferred solution, the orchestration unit further includes a non-standard orchestration module; The non-standard orchestration module acquires an external configuration command and adjusts the process orchestration information based on the external configuration command, and the external configuration command includes the addition, reduction, and replacement of business components.
[0012] By adopting the above technical solution, the process scheduling information generated according to the preset priority standard can be adjusted through the configuration module to achieve component scheduling and meet customized business needs. Further visual configuration can be performed to adjust the process scheduling information more intuitively.
[0013] As a preferred solution, each of the water volume business components or water price business components includes at least one first-level subcomponent, and each first-level subcomponent in the same water volume business component or water price business component corresponds to a different policy implementation area.
[0014] By adopting the above technical solution, all users share the same component library and continuously iterate, adding components to different businesses, sharing components for the same business, using different first-level sub-components to distinguish policy areas, and constantly improving the component library to improve the compatibility of the water fee calculation system.
[0015] As a preferred solution, each of the first-level sub-components includes at least one second-level sub-component, and each second-level sub-component in the same first-level sub-component corresponds to a different policy implementation time.
[0016] By adopting the above technical solution, different secondary sub-components are used to distinguish policy time periods, so as to facilitate the calculation of water charges on a quarterly basis or to calculate and verify historical water charges.
[0017] As a preferred solution, the matching unit includes a region screening module and a time screening module; The area screening module screens the first-level subcomponents in the component library based on the user location information in the user data to obtain a first subcomponent set; The time screening module screens the secondary sub-components in the first sub-component set based on the statistical time data in the user data to obtain the second sub-component set as a component package.
[0018] By adopting the above technical solution, the effective time period of the policy rules is marked to avoid rule conflicts caused by historical data backtracking.
[0019] As a preferred solution, the matching unit further includes a recording module, a verification module and a matching module; The recording module records the user data of the most recent business information and the corresponding first sub-component set and second sub-component set; The verification module obtains data change information based on the latest service information and the user data corresponding to the most recent service information recorded by the recording module; The matching module adjusts the first sub-component set or the second sub-component set corresponding to the most recent business information recorded by the recording module based on the data change situation, so as to obtain the component package corresponding to the latest business information.
[0020] By adopting the above technical solution, since water fee generation has the characteristics of large-scale batch computing, the water charges of millions of users are calculated centrally every month. Each request needs to match the component package, which requires extremely high computing resources. By comparing the changes in user location data and statistical time data of the two user data before and after, it is determined whether the component package needs to be adjusted or which parts need to be adjusted, thereby greatly reducing the usage of computing resources.
[0021] As a preferred solution, it also includes a data cleaning unit; The data cleaning unit determines whether the water consumption has changed based on the water consumption data; The billing unit outputs the water consumption fee corresponding to the business information whose water consumption has not changed.
[0022] By adopting the above technical solution, the business information is screened, and the matching unit only processes the business information for calculating the change in water consumption. For the business information for which the water consumption has changed, the billing unit directly outputs the water charges to avoid useless calculations occupying computing resources.
[0023] In a second aspect, the embodiments of this specification provide a water fee calculation method based on a rule engine, including: Acquire a component library including a plurality of water quantity business components related to water quantity and a plurality of water price business components related to water price, and business information including user data and water use data; Based on user data, a water volume business component and a water price business component in a component library are obtained to obtain a component package; Based on the water volume business component and the water price business component in the component package, the process arrangement information is obtained by arrangement; Gain access to water usage costs based on usage data and process orchestration information.
[0024] In a third aspect, an embodiment of this specification provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the steps described in the second aspect of the above embodiment.
[0025] The beneficial effects brought by the technical solutions provided by some embodiments of this specification include at least: 1. The water fee calculation system based on the rule engine separates the business rules from the code. The component-based design of the rules can be managed and modified independently of the application logic, meeting the business needs of high-frequency policy adjustments in the water industry. In addition, the business components located in the application layer are easy to maintain and expand, and support cross-platform applications.
[0026] 2. The standard orchestration module and non-standard orchestration module meet the needs of automatic large-scale batch computing and manual customized business respectively, so that each business component can accurately perform computing tasks according to the whole process orchestration information.
[0027] 3. The multi - level setting of the primary sub - components and secondary sub - components classifies a large number of policy rules in terms of region and time, so that the matching unit can obtain the component package corresponding to the user data more quickly. The multi - level classification method can also facilitate the implementation of customized services more conveniently.
[0028] 4. By comparing the user data recording the previous business information with the latest business information, judging the business overlap degree, and adjusting the first sub - component set or the second sub - component set corresponding to the previous business information according to the business overlap degree to obtain the component package corresponding to the latest business information, so as to simplify the matching and calling steps of business components, thereby greatly reducing the occupation of computing resources.
[0029] 5. The data cleaning unit screens the business information, and the matching unit only processes the business information with the changed calculated water consumption. For the business information with the changed water consumption, the billing unit directly outputs the water consumption cost, avoiding the occupation of computing resources by useless calculations. Description of the Drawings
[0030] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required in the description of the embodiments or the prior art. Obviously, the following - described drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0031] Figure 1 is a schematic structural diagram of a water - fee calculation system based on a rule engine provided by an embodiment of this specification.
[0032] Figure 2 is a schematic visualization configuration diagram of a water - fee calculation system based on a rule engine provided by an embodiment of this specification.
[0033] Figure 3 is a hierarchical schematic diagram of a rule library in a water - fee calculation system based on a rule engine provided by an embodiment of this specification, showing the primary sub - components and secondary sub - components.
[0034] Figure 4 is a schematic flowchart of a water - fee calculation method based on a rule engine provided by an embodiment of this specification. Detailed Embodiments
[0035] The following will clearly and completely describe the technical solutions in the embodiments of this specification with reference to the drawings in the embodiments of this specification.
[0036] In the description, claims, and the above-mentioned drawings of this specification, terms such as "first", "second", "third", etc. are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally further include steps or units not listed, or may optionally further include other steps or units inherent to these processes, methods, products, or devices.
[0037] The following description provides examples and does not limit the scope, applicability, or examples set forth in the claims. Changes can be made to the functions and arrangements of the described elements without departing from the scope of the content of this specification. Various processes or components can be appropriately omitted, substituted, or added in each example. For example, the described method can be executed in a different order than the described order, and various steps can be added, omitted, or combined. In addition, the features described for some examples can be combined into other examples.
[0038] As mentioned in the background art, due to the significant conflict between the technical characteristics of the storage process and the business requirements of the frequent policy adjustments in the water industry, the present invention proposes a water fee calculation system and method based on a rule engine.
[0039] To meet the centralized and flexible configuration management in the rule set, a rule engine is introduced. A rule engine is a component embedded in an application program and developed from an inference engine. The rule engine accepts data input, reads business rules, and obtains business decisions that conform to the business rules through reasoning. Based on the core ideas such as shared rule decoupling in the application of the rule engine in the financial field (such as risk control, credit), the rule engine is adaptively optimized according to the characteristics of the water fee calculation system, and the experience is migrated between different fields.
[0040] It should be noted that water fee calculation pays more attention to the accuracy of data and the frequent changes of policies, while the financial field emphasizes more on real-time performance, complex event processing, and compliance. There are essential differences in the optimization directions between the two. In addition, the rule engine may involve more risk models and real-time decisions in finance, while water utilities are more about structured calculations and batch processing. Therefore, it is not a simple technology migration, and creative labor is required to achieve the corresponding technical effects. Specifically as follows: As Figure 1 , Figure 1 is a schematic structural diagram of a water fee calculation system based on a rule engine provided by an embodiment of this specification.
[0041] The water fee calculation system 100 may at least include: An acquisition unit 110 acquires a component library 150 including a plurality of water volume service components 151 related to water volume and a plurality of water price service components 152 related to water price, as well as service information including user data and water consumption data. A matching unit 120 acquires the water volume service components 151 and water price service components 152 in the component library 150 based on the user data to obtain a component package. An orchestration unit 130 orchestrates based on the water volume service components 151 and water price service components 152 in the component package to obtain process orchestration information. A billing unit 140 obtains the water consumption cost based on the water consumption data and the process orchestration information.
[0042] Illustratively, the service information is a water fee calculation command of a target user sent by a host computer, including user data and water consumption data. The user data is, for example, user ID, water fee calculation time span, address information, etc. The water consumption data is historical water consumption data within the water fee calculation time span read from the database according to the user ID, such as the starting water volume degree and the ending water volume reading. The component library 150 is a water fee calculation rule pre-set by each user according to the relevant policies applicable to them. In this specification, the calculation elements of water fees are abstracted into water volume and water price, and different water companies have different business scenarios for different water volumes and water prices. For example, water volume = meter reading water volume + supplementary water volume + increased or decreased water volume - preferential water volume - exempted water volume + shared water volume, and water price includes single-standard water price, tiered water price, over-plan, etc.
[0043] Explanatorily, service components are automatically matched according to the user data to form a component package, and the execution order of each service component in the component package is automatically or manually orchestrated to obtain process orchestration information. The water consumption data enters the first service component for calculation according to the process orchestration information, and other service components recalculate the calculation results of their respective previous service components in turn, and finally calculate the water consumption cost.
[0044] When a new pricing policy is added, there is no need to modify the water fee generation code in the database. Just add new service components to the component library 150. When calculating the water fee, the matching unit 120 automatically matches the corresponding water volume service components 151 and water price service components 152 according to the user data, and the water consumption cost under the new policy can be obtained. When adjusting the existing policy, due to the componentization of services, the services are relatively independent of each other. Modifying the code of the corresponding service component in the application layer can be used for intuitive debugging, and it will not affect other service components and the overall cost generation logic, with stronger flexibility and maintainability. And the service components located in the application layer are convenient for maintenance and extension, and support cross-platform applications.
[0045] The implementation principle is that multiple business components surround a workbench in the order of information arranged in the process, and each produces parts in sequence. The produced parts can ultimately be assembled into a machine (i.e., the final water consumption cost). Each business component only needs to complete the production of the parts in its own hands without knowing the content produced by other business components. The resources required for the production of each business component are taken from the workbench. If the necessary resources for production are available on the workbench, production will proceed; otherwise, it will wait until the resources are available. The parts completed by each business component are also placed on the workbench. All business points of water fees are completely decoupled, easily meeting the customized needs of different customers.
[0046] In an embodiment of the present specification, the orchestration unit 130 includes a standard orchestration module; The standard module orchestrates the water volume business component 151 and the water price business component 152 in the component package according to a preset priority standard to obtain process orchestration information.
[0047] Illustratively, each user pre-sets the water fee calculation rule according to the relevant policies applicable to them while defining the corresponding priority (such as levels 1-10, the higher the level, the higher the priority), so as to avoid business conflicts and meet the requirements of automatic large-scale batch calculations. When the matching component package includes business components of the same level, the business components of the same level have a parallel calculation logic and output their respective calculation results.
[0048] In another embodiment of the present specification, the orchestration unit 130 further includes a non-standard orchestration module; The non-standard orchestration module obtains an external configuration command and adjusts the process orchestration information based on the external configuration command. The external configuration command includes the addition, reduction, and replacement of business components.
[0049] Combined with the attached Figure 2 , further, the water fee calculation system 100 can be visually configured to more intuitively adjust the process orchestration information. Figure 2 It is a schematic diagram of the visual configuration interaction interface of a water fee calculation system based on a rule engine provided by an embodiment of the present specification.
[0050] Illustratively, Figure 2 On the left side in [Figure] is a component library 150 containing multiple water volume business components 151 and multiple water price business components 152 for users to select. On the right side, the water volume business component 151 and the water price business component 152 in the component package are orchestrated according to a preset priority standard to obtain process orchestration information. By dragging the component library 150 to add, reduce, and replace business components in the process orchestration, the customized business needs of users can be intuitively met.
[0051] In an embodiment of the present specification, referring to the attached Figure 3Each water volume business component 151 or water price business component 152 includes at least one first-level subcomponent, and each first-level subcomponent in the same water volume business component 151 or water price business component 152 corresponds to a different policy implementation area.
[0052] Figure 3 It is a hierarchical schematic diagram of a rule base in a water fee calculation system based on a rule engine provided in an embodiment of this specification, showing multiple first-level sub-components, such as first-level sub-component A, first-level sub-component B...
[0053] Explanatory, the target users of the water fee calculation system 100 are water companies in various places. In order to ensure the compatibility of the water fee calculation system 100, all users share the same set of component libraries 150, so the component libraries 150 are configured in a hierarchical manner. As the business components continue to increase and iterate, the component package matching link of the matching unit 120 will become more and more difficult, increasing the system resource usage and unit calculation time. The same type of business shares a business component, and different first-level subcomponents are used to correspond to different water companies to distinguish policy areas, so as to quickly match based on the address information in the user data, avoiding the traversal matching of business components, thereby reducing system resource usage and unit calculation time.
[0054] In one embodiment of this specification, referring to the attached Figure 3 Each first-level subcomponent includes at least one second-level subcomponent, and each second-level subcomponent in the same first-level subcomponent corresponds to a different policy implementation time.
[0055] Figure 3 It is a hierarchical schematic diagram of a rule base in a water fee calculation system based on a rule engine provided in an embodiment of the present specification, showing multiple secondary sub-components, such as secondary sub-component A1, secondary sub-component A2...
[0056] Explanatory, with the high-frequency policy adjustments in the water industry, the iteration of business components will produce the same business components with different implementation times, and different secondary subcomponents will be used to distinguish policy times, so as to calculate water charges by quarter or to calculate and verify historical water charges. Similarly, the water charge calculation time span in the user data is quickly matched with the policy implementation time, avoiding the traversal matching of business components, thereby reducing system resource usage and unit calculation time.
[0057] In one embodiment of the present specification, the matching unit 120 includes a region screening module and a time screening module; A region screening module, which screens the first-level subcomponents in the component library 150 based on the user location information in the user data to obtain a first subcomponent set; A time filtering module filters the secondary sub-components in the first sub-component set based on the statistical time data in the user data to obtain a second sub-component set, which is used as a component package.
[0058] Mark the effective time period of the policy rule to avoid rule conflicts caused by historical data backtracking.
[0059] Explanatory. The matching unit 120 hierarchically filters business components through the region filtering module and the time filtering module. First, it filters out the first-level sub-components applicable in terms of region based on the user's territorial information (equivalent to the above address information) in the user data, and then filters out the second-level sub-components applicable in terms of time based on the statistical time data (equivalent to the above water fee calculation time span) in the user data. While ensuring system compatibility and traceability, it avoids traversing and matching business components, thereby reducing system resource occupancy and unit calculation duration.
[0060] In an embodiment of this specification, the matching unit 120 further includes a recording module, a verification module, and a matching module; The recording module records the user data of the most recent business information, as well as the corresponding first sub-component set and second sub-component set; The verification module obtains the data change situation based on the user data corresponding to the most recent business information recorded by the recording module and the most recent business information of the latest business information; The matching module adjusts the first sub-component set or the second sub-component set corresponding to the most recent business information recorded by the recording module based on the data change situation to obtain the component package corresponding to the latest business information.
[0061] Explanatory. Usually, when the rule engine processes each request, it needs to parse rules, match conditions, and execute actions. If these steps are reprocessed each time, it will lead to performance degradation. Especially when the rules are complex or the data volume is large, repeated calculations will increase the CPU and memory overhead. Due to the demand characteristics of large-scale batch calculation for water fee generation, calculating the water usage fees of millions of users centrally every month, and each request needs to match the component package, which requires extremely high computing resources. For similar users or user data with the same conditions, historical matching results can be cached to reduce repeated processing.
[0062] Explanatory. By comparing the changes in the user's territorial data and statistical time data of the user data before and after, it is judged whether the component package needs to be adjusted or which parts need to be adjusted, greatly reducing the occupancy of computing resources.
[0063] Specifically, through the hierarchical setting of the rule library, when the statistical time data and the user location information in the user data corresponding to the latest business information and the most recent business information recorded by the recording module are the same, there is no need to re-match the five business components, and the second sub-component set corresponding to the most recent business information can be directly used as the component package of the latest business information; when the latest business information and the most recent business information recorded by the recording module each correspond to the user data, only the statistical time data is different, the component package of the latest business information can be obtained by directly matching the first sub-component set corresponding to the most recent business information with the statistical time data of the latest business information; only when the statistical time data and the user location information in the user data corresponding to the latest business information and the most recent business information recorded by the recording module are different, the matching unit 120 will re-match from the component library 150.
[0064] It is understandable that reducing the number of component calls and reducing the usage of computing resources by hierarchical screening of other types of information other than statistical time data and user location information falls within the scope of protection of this technical solution.
[0065] In one embodiment of the present specification, the water fee calculation system 100 further includes a data cleaning unit; A data cleaning unit determines whether water consumption has changed based on water consumption data; The billing unit 140 outputs the water usage fee corresponding to the service information in which the water usage has not changed.
[0066] Explanatory, the data cleaning unit screens the business information, and the matching unit 120 only processes the business information for calculating the change in water consumption. For the business information for which the water consumption has changed, the billing unit 140 directly outputs the water charges to avoid useless calculations occupying computing resources.
[0067] Reference Figure 4 As shown, Figure 4 : is a flow chart of a water fee calculation method based on a rule engine provided in an embodiment of this specification, which may include at least the following steps: Step 402, obtaining a component library 150 including a plurality of water volume business components 151 related to water volume and a plurality of water price business components 152 related to water price, and business information including user data and water use data; Step 404: based on the user data, the water volume business component 151 and the water price business component 152 in the component library 150 are obtained to obtain a component package; Step 406: Perform arrangement based on the water volume business component 151 and the water price business component 152 in the component package to obtain process arrangement information; Step 408: Obtain the water usage cost based on the water usage data and the process scheduling information.
[0068] Each embodiment in this specification is described in a progressive manner. For the parts that are the same or similar among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the embodiment of the water fee calculation method, since it is basically similar to the embodiment of the water fee calculation system 100, the description is relatively simple. For the relevant parts, reference can be made to the partial description of the embodiment of the water fee calculation system 100.
[0069] The embodiment of this specification also provides a computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are run on a computer or a processor, the computer or the processor is caused to execute one or more steps in the above embodiment of the water fee calculation method. If each component module of the above electronic device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in the computer-readable storage medium.
[0070] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the embodiments of this specification are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in the computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center in a wired manner (such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or a wireless manner (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that the computer can access or a data storage device such as a server or a data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a Digital Versatile Disc (DVD)), or a semiconductor medium (such as a Solid State Disk (SSD)).
[0071] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. This program can be stored in a computer-readable storage medium. When this program is executed, it can include the processes of the embodiments of the above various methods. The aforementioned storage medium includes: various media such as ROM, RAM, magnetic disks, or optical discs that can store program codes. Without conflict, the technical features in this embodiment and the implementation scheme can be combined arbitrarily.
[0072] The above embodiments are only described in the preferred embodiment manner of this specification, and do not limit the scope of this specification. Without departing from the design spirit of this specification, various deformations and improvements made by those of ordinary skill in the art to the technical solutions of this specification shall fall within the protection scope determined by the claims of this specification.
Claims
1. A water fee calculation system based on rule engine, characterized in that: include: An acquisition unit, which acquires a component library including a plurality of water volume business components related to water volume and a plurality of water price business components related to water price, and business information including user data and water use data; A matching unit, which acquires a water volume business component and a water price business component in a component library based on user data to obtain a component package; The orchestration unit performs orchestration based on the water volume business component and the water price business component in the component package to obtain process orchestration information; The billing unit obtains water usage charges based on water usage data and process orchestration information.
2. A water fee calculation system based on rule engine according to claim 1, characterized in that: The arrangement unit includes a standard arrangement module; The standard module arranges the water volume business component and the water price business component in the component package according to a preset priority standard to obtain process arrangement information.
3. A water fee calculation system based on rule engine according to claim 2, characterized in that: The arrangement unit also includes a non-standard arrangement module; The non-standard orchestration module obtains external configuration commands and adjusts the process orchestration information based on the external configuration commands, wherein the external configuration commands include adding, reducing and replacing business components.
4. A water fee calculation system based on rule engine according to claim 1, characterized in that: Each of the water volume business components or water price business components includes at least one first-level subcomponent, and each first-level subcomponent in the same water volume business component or water price business component corresponds to a different policy implementation area.
5. A water fee calculation system based on rule engine according to claim 4, characterized in that: Each of the first-level subcomponents includes at least one second-level subcomponent, and each second-level subcomponent in the same first-level subcomponent corresponds to a different policy implementation time.
6. A water fee calculation system based on rule engine according to claim 5, characterized in that: The matching unit includes a region screening module and a time screening module; The area screening module screens the first-level subcomponents in the component library based on the user location information in the user data to obtain a first subcomponent set; The time screening module screens the secondary sub-components in the first sub-component set based on the statistical time data in the user data to obtain the second sub-component set as a component package.
7. A water fee calculation system based on rule engine according to claim 6, characterized in that: The matching unit also includes a recording module, a verification module and a matching module; The recording module records the user data of the most recent business information and the corresponding first sub-component set and second sub-component set; The verification module obtains data change information based on the latest service information and the user data corresponding to the most recent service information recorded by the recording module; The matching module adjusts the first sub-component set or the second sub-component set corresponding to the most recent business information recorded by the recording module based on the data change situation, so as to obtain the component package corresponding to the latest business information.
8. A water fee calculation system based on a rule engine according to any one of claims 1 to 7, characterized in that: It also includes a data cleaning unit; The data cleaning unit determines whether the water consumption has changed based on the water consumption data; The billing unit outputs the water consumption fee corresponding to the business information whose water consumption has not changed.
9. A water fee calculation method based on a rule engine, characterized in that: include: Acquire a component library including a plurality of water quantity business components related to water quantity and a plurality of water price business components related to water price, and business information including user data and water use data; Based on user data, a water volume business component and a water price business component in a component library are obtained to obtain a component package; Based on the water volume business component and the water price business component in the component package, the process arrangement information is obtained by arrangement; Gain access to water usage costs based on usage data and process orchestration information.
10. A computer storage medium, characterized in that: The computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the steps of a water fee calculation method based on a rule engine as described in claim 9.
Citation Information
Patent Citations
Distributed calculation method and system for water quantity and water fee of water supply
CN111241143A
Settlement algorithm model updating method and device and electronic equipment
CN114154974A
Service rule configuration method, system and equipment based on rule engine and medium
CN115185613A
Charging rule generation method and device
CN116468436A
Digital employee intelligent financial accounting method and system
CN118691418A