A service data processing method, apparatus and device, and a storage medium
By matching and associating trigger rules and calculation rules in the post-return reward calculation, the problem of rule response lag is solved, flexible business data processing is achieved, and the accuracy and efficiency of calculation are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA SOUTHERN AIRLINES DIGITAL TECHNOLOGY (GUANGDONG) CO LTD
- Filing Date
- 2026-02-28
- Publication Date
- 2026-06-02
AI Technical Summary
The existing back-end reward calculation rules are slow to respond and lack flexibility, making it difficult to adapt to changing reward rules and complex business scenarios.
By matching business data with pre-configured triggering rules and associating target calculation rules with target triggering rules, the business data is processed, thereby achieving configurability and flexibility of business data processing logic.
It improves the accuracy and efficiency of data processing, supports rule configuration for multiple scenarios and strategies, reduces update and maintenance costs, and ensures the orderliness and determinism of rule execution.
Smart Images

Figure CN122134397A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information technology, and in particular to a business data processing method, apparatus, device, and storage medium. Background Technology
[0002] In ticket sales, airlines incentivize agents to improve sales performance through post-sales rewards, which are typically calculated based on multi-dimensional business data and rules.
[0003] Currently, common reward calculations rely on pre-set and fixed calculation rules. However, fixed calculation rules and processes are difficult to adapt to changing post-reward rules, and it is difficult to support business personnel in configuring and updating reward rules in real time, resulting in delayed rule response and insufficient calculation flexibility. Summary of the Invention
[0004] This application provides a business data processing method, apparatus, device, and storage medium to solve the problems of delayed rule response and insufficient calculation flexibility in the calculation of back-rewards.
[0005] Firstly, this application provides a business data processing method applied to an electronic device. The subject executing this method can be an electronic device, a component or device applied to the electronic device (e.g., a processor, chip, or chip system), or a logic module or software capable of implementing all or part of the functions of the electronic device, including: Obtain business data; Based on the business data, a target triggering rule matching the business data is determined from the pre-configured triggering rules; wherein, the pre-configured triggering rules are used to define the preconditions for performing business calculations; Determine the target calculation rule associated with the target triggering rule. The target calculation rule is used to define the business calculation logic. Based on the target calculation rules, the business data is processed to generate the target business data.
[0006] In the first aspect, by matching business data with target triggering rules from pre-configured triggering rules, and then processing the business data based on the target calculation rules associated with the matched target triggering rules, the processing logic of business data is no longer rigidly confined to a fixed processing logic. By decomposing the business data processing logic into configurable triggering rules and calculation rules, and by matching and executing the corresponding rules through business data, the configurability and flexibility of the processing logic are achieved; this ensures that data processing can be accurately triggered and calculated for different business scenarios, improving the accuracy of the output.
[0007] In conjunction with the first aspect, in one possible implementation, the target triggering rule is determined from pre-configured triggering rules based on business data, including: Extract trigger condition fields from business data; The trigger condition field is compared with the trigger conditions defined in the pre-configured trigger rules to determine the target trigger rule.
[0008] This implementation extracts trigger condition fields from business data and compares these fields with pre-configured trigger rules, enabling fast and accurate rule matching. This enhances adaptability to complex business scenarios, ensuring that only rules meeting the conditions are triggered, and improving the accuracy and execution efficiency of the overall calculation process.
[0009] In conjunction with the first aspect, in one possible implementation, the target computation rule associated with the target triggering rule is determined, including: Extract calculation condition fields from business data; The calculation condition field is compared with the calculation conditions defined in the pre-configured calculation rules to determine the target calculation rule.
[0010] This implementation extracts calculation condition fields from business data. By comparing these fields with pre-configured calculation conditions, fast and accurate rule matching can be achieved, avoiding the participation of irrelevant rules in the calculation, thereby reducing invalid data processing and improving rule matching efficiency. This enhances adaptability to complex business scenarios and ensures that the correct calculation conditions are used when processing business data.
[0011] In conjunction with the first aspect, in one possible implementation, the method further includes: Receive rule configuration information, which includes trigger rule configuration information and calculation rule configuration information; Among them, the trigger rule configuration information is used to define the trigger conditions and the association between the pre-configured trigger rules and the pre-configured calculation rules; The calculation rule configuration information is used to define the business calculation logic.
[0012] This implementation achieves configurable rule management by receiving rule configuration information, including trigger rule configuration information and calculation rule configuration information. Users can customize trigger rules, calculation rules, and their relationships, adjusting business rules without modifying program code. This mechanism greatly enhances the flexibility and maintainability of the method, enabling rapid response to changes in business rules, supporting rule configuration for multiple scenarios and strategies, reducing update and maintenance costs, and improving the efficiency of business rule management.
[0013] In conjunction with the first aspect, in one possible implementation, the method further includes: Receive updated trigger rule configuration information and update the pre-configured trigger rules according to the updated trigger rule configuration information; And / or, receive updated computation rule configuration information and update the pre-configured computation rules according to the updated computation rule configuration information.
[0014] This implementation receives updated trigger rule configuration information and / or updated computation rule configuration information and adjusts the pre-configured rules accordingly, introducing a dynamic update mechanism for the deployed and running rule set. When business processing conditions change, only the trigger rule configuration needs to be updated; when computation logic needs optimization, only the computation rule configuration needs to be updated. This ability to support partial updates enables rapid response to changes in business requirements, thereby significantly improving the flexibility of business rule maintenance.
[0015] In conjunction with the first aspect, in one possible implementation, the rule configuration information also includes priority information; Priority information is used to determine the target triggering rule or target calculation rule when business data meets the conditions of multiple pre-configured triggering rules or pre-configured calculation rules.
[0016] This implementation incorporates priority information into the rule configuration, enabling selection based on preset priorities when multiple rules are simultaneously satisfied. This avoids inconsistencies in calculation results caused by rule conflicts. It ensures the orderly and deterministic execution of rules, allowing users to flexibly match rules according to business importance. This results in stable and reliable business results even in complex rule scenarios, enhancing decision-making capabilities.
[0017] In conjunction with the first aspect, in one possible implementation, before determining the target triggering rule from pre-configured triggering rules based on business data, the method further includes: Obtain and parse rule configuration information to generate pre-configured trigger rules and / or pre-configured calculation rules.
[0018] This implementation automates the conversion of rules from configuration to execution by acquiring and parsing rule configuration information and generating triggering and calculation rules, thus reducing the risk of errors introduced by manual coding. Simultaneously, the generation mechanism can respond promptly to rule updates, supporting rapid deployment and activation of rules, improving the speed of adaptation to business changes and overall operational efficiency.
[0019] In conjunction with the first aspect, one possible implementation, after acquiring the business data, also includes: Preprocess business data; Based on business data, the target triggering rule is determined from the pre-configured triggering rules. Specifically, based on the pre-processed business data, the target triggering rule is determined from the pre-configured triggering rules.
[0020] In this implementation, preprocessing the acquired business data creates a better data foundation for subsequent rule matching. Since raw business data may contain redundant information, inconsistent formats, or noise, preprocessing operations (such as cleaning, formatting, and normalization) can transform this raw data into more standardized and uniform structured data. Performing rule matching based on this preprocessed, standardized data significantly reduces the risk of rule matching failures or mismatches caused by data quality issues (such as format errors, missing fields, or abnormal value ranges), thereby improving the reliability and accuracy of the entire rule matching process.
[0021] In conjunction with the first aspect, in one possible implementation, the method further includes: Generate a business results report based on the target business data.
[0022] This implementation generates result reports based on target business data, presenting the calculation results to users in an intuitive and structured format. This facilitates users' quick understanding of data analysis results, helps them identify business trends, and supports decision-making. It also makes complex business data calculation results easier to understand and apply.
[0023] Secondly, this application provides a business data processing apparatus, comprising: The data acquisition module is used to acquire business data; The rule matching module is used to determine the target triggering rule that matches the business data from the pre-configured triggering rules; the pre-configured triggering rules are used to define the preconditions for performing business calculations. The rule determination module is used to determine the target calculation rules associated with the target triggering rules. The target calculation rules are used to define the business calculation logic. The data calculation module is used to perform calculations on business data based on target calculation rules to generate target business data.
[0024] In conjunction with the second aspect, in one possible implementation, the rule matching module is also used to extract calculation condition fields from business data; The calculation condition field is compared with the calculation conditions defined in the pre-configured calculation rules to determine the target calculation rule.
[0025] In conjunction with the second aspect, in one possible implementation, the business data processing device further includes a rule configuration module for receiving rule configuration information, which includes trigger rule configuration information and calculation rule configuration information. Among them, the trigger rule configuration information is used to define the trigger conditions and the association between the pre-configured trigger rules and the pre-configured calculation rules; The calculation rule configuration information is used to define the business calculation logic.
[0026] In conjunction with the second aspect, in one possible implementation, the rule configuration module is also used to receive updated trigger rule configuration information and update the pre-configured trigger rules according to the updated trigger rule configuration information. And / or, receive updated computation rule configuration information and update the pre-configured computation rules according to the updated computation rule configuration information.
[0027] In conjunction with the second aspect, in one possible implementation, the rule configuration information also includes priority information; Priority information is used to determine the target triggering rule or target calculation rule when business data meets the conditions of multiple pre-configured triggering rules or pre-configured calculation rules.
[0028] In conjunction with the second aspect, in one possible implementation, the rule configuration module is also used to acquire and parse rule configuration information to generate pre-configured trigger rules and / or pre-configured calculation rules.
[0029] In conjunction with the second aspect, in one possible implementation, the data acquisition module is also used to preprocess business data; Based on business data, the target triggering rule is determined from the pre-configured triggering rules. Specifically, based on the pre-processed business data, the target triggering rule is determined from the pre-configured triggering rules.
[0030] In conjunction with the second aspect, in one possible implementation, the data calculation module is also used to generate a business result report based on the target business data.
[0031] Thirdly, this application provides an electronic device comprising: a processor and a memory; the memory storing processor-executable instructions; when the processor is configured to execute the instructions, causing the electronic device to implement the method of the first aspect described above.
[0032] Fourthly, this application provides a computer-readable storage medium comprising: computer software instructions; when the computer software instructions are executed in an electronic device, they cause the electronic device to implement the method described in the first aspect.
[0033] Fifthly, this application provides a computer program product comprising a computer program; when the computer program is run in an electronic device, it causes the electronic device to implement the method described in the first aspect.
[0034] The beneficial effects of the second to fifth aspects mentioned above are described in the corresponding description of the first aspect and will not be repeated here. Attached Figure Description
[0035] Figure 1This application provides an illustration of an application environment for a business data processing method. Figure 2 A schematic diagram of a business data processing system architecture provided in this application embodiment; Figure 3 A flowchart illustrating a business data processing method provided in an embodiment of this application; Figure 4 A schematic diagram of an airline agent bonus calculation process provided for an embodiment of this application; Figure 5 This is a schematic diagram illustrating the composition of a business data processing apparatus provided in an embodiment of this application; Figure 6 This is a schematic diagram of the composition of an electronic device provided in an embodiment of this application. Detailed Implementation
[0036] The following is a detailed description, with reference to the accompanying drawings, of a business data processing method, apparatus, device, and storage medium provided in this application.
[0037] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.
[0038] The terms "first" and "second," etc., used in the specification and drawings of this application are used to distinguish different objects or to distinguish different treatments of the same object, rather than to describe a specific order of objects.
[0039] Furthermore, the terms "comprising" and "having," and any variations thereof, used in the description of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the steps or units listed, but may optionally include other steps or units not listed, or may optionally include other steps or units inherent to such process, method, product, or apparatus.
[0040] It should be noted that in the embodiments of this application, the words "exemplary" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of the words "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0041] To facilitate a clear description of the technical solutions of the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish the same or similar items with essentially the same function and effect. Those skilled in the art can understand that the terms "first" and "second" are not intended to limit the quantity or execution order.
[0042] In the description of this application, unless otherwise stated, "a plurality of" means two or more.
[0043] In the air ticket sales sector, airlines typically incentivize agents to improve sales performance through rebate mechanisms. These rewards are calculated based on multi-dimensional business data and dynamic rules to enhance channel stickiness and market share.
[0044] Currently, such reward calculations often rely on pre-set rules to process data such as agent ticket sales, and finally summarize and generate reward results.
[0045] However, as reward rules are frequently adjusted to market changes and calculation conditions become increasingly personalized, existing methods struggle to support business personnel in flexibly configuring and updating rules in real time. Furthermore, the increasing number of performance indicators, diverse reward types, a wide variety of products, and complex data processing logic result in insufficient scalability when dealing with changing rules, leading to delayed rule responses and limited calculation flexibility.
[0046] To address the aforementioned technical problems, this application provides a business data processing method, apparatus, device, and storage medium. The approach involves matching business data with pre-configured triggering rules to target triggering rules, and then performing calculations on the business data based on target calculation rules associated with the matched triggering rules. This allows the business data processing logic to move beyond a rigid, fixed approach. By decomposing the business data processing logic into configurable triggering and calculation rules, and matching and executing the corresponding rules with the business data, the configurability and flexibility of the processing logic are achieved. This ensures that data processing can be accurately triggered and calculated for different business scenarios, improving the accuracy of the output.
[0047] The embodiments provided in this application will now be described in detail with reference to the accompanying drawings.
[0048] like Figure 1 As shown, the application environment may include a first device and a second device.
[0049] For example, the first device can be a terminal device or a server, and the second device can be a server.
[0050] Terminal device 100 and server 101.
[0051] Terminal device 100 includes a client application 102 that supports business data processing functions. This client provides users with a rule configuration interface and a computing status interface, which can be a World Wide Web page accessed through a browser or a native application that needs to be downloaded and installed. Terminal device 100 is a user equipment (UE), and its types include, but are not limited to, smartphones, tablets, laptops, desktop computers, Internet of Things (IoT) terminals, and vehicle-to-everything (V2X) terminals. The terminal accesses the access network through a wireless air interface and has the capability to carry voice services, data transmission services, and multimedia services. It can also realize direct communication between different terminals based on device-to-device (D2D) direct connection technology or V2X technology.
[0052] The business data processing method provided in this application can be applied to server 101. Server 101 runs an application 102 that supports business data processing functions. This program is responsible for acquiring business data, preprocessing the business data, and determining a matching target trigger rule from pre-configured trigger rules based on the pre-processed business data. The pre-configured trigger rules are used to define the preconditions for performing business calculations. The program also determines the target calculation rule associated with the target trigger rule, which is used to define the business calculation logic. Based on the target calculation rule, the program performs calculations on the business data to generate target business data and generates a business result report based on the target business data. In a specific implementation, the target rule can be determined by extracting trigger condition fields and calculation condition fields from the business data and comparing them with the conditions in the pre-configured rules. In addition, the program is also responsible for receiving and parsing rule configuration information to generate pre-configured trigger rules and calculation rules. The rule configuration information includes trigger rule configuration information, calculation rule configuration information, their association relationships, and priority information.
[0053] In an optional embodiment, the terminal device 100 and the server 101, and the server 101 and the database system 103, can be interconnected via wired or wireless networks. These connections support the transmission of program instructions and data between the components. The server 101 includes a first memory and a first processor. The first memory stores a business data processing program; this program is invoked and executed by the first processor to implement the business data processing method provided in this application. The first memory may include, but is not limited to, the following: random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), and electrically erasable programmable read-only memory (EEPROM). The first processor may consist of one or more integrated circuit chips. Optionally, the first processor may be a general-purpose processor, such as a central processing unit (CPU) or a network processor (NP). Optionally, the first processor can implement the business data processing method provided in this application by running programs or code.
[0054] The business data processing method provided in this application can be executed by server 101. Server 101 can be a single server, a server cluster consisting of multiple servers, or a cloud computing service center. Optionally, server 101 includes a second memory and a second processor. The second memory stores the business data processing program; the business data processing program is called by the second processor to implement the business data processing method provided in this application. Optionally, the second memory can include, but is not limited to, the following: RAM, ROM, PROM, EPROM, and EEPROM. Optionally, the second processor can be a general-purpose processor, such as a CPU or NP.
[0055] Database system 103 is deployed on a dedicated server to store business data and rule configuration information. This includes various data sources, such as relational databases (e.g., MySQL, OceanBase, PostgreSQL, Oracle, Microsoft SQL Server) and non-relational databases (e.g., ES, Redis, MongoDB, Couchbase). The relational database stores structured business data and various configuration tables, including but not limited to field configuration tables, definition tables for triggering and calculation rules, and their relationships and priority information. The non-relational database stores rule logic files (configured and generated by the user interface in complete document form, such as JSON or BSON documents), rule configuration information (including triggering rule configuration information, calculation rule configuration information, their relationships and priority information), preprocessed business data, intermediate calculation results or target business data, business result reports, and intermediate state information during the rule matching process.
[0056] This application embodiment also provides a business data processing system, which can be configured in... Figure 1 The application environment shown. For example... Figure 2 As shown, the business data processing system 200 may include: Business data processing system front-end 201: Provides a rule configuration interface to receive user-inputted rule configuration information, including trigger rule configuration information and calculation rule configuration information. Trigger rule configuration information defines trigger conditions and the relationship between trigger rules and calculation rules, while calculation rule configuration information defines business calculation logic. The rule configuration information also includes priority information to determine the target rule when business data meets the conditions of multiple trigger rules or calculation rules. It provides a calculation status interface to display the calculation processing status of business data and a data report interface to display business result reports generated based on the target business data.
[0057] Backend 202 of the business data processing system: This is used to acquire business data; preprocess the business data; determine the matching target trigger rule from the pre-configured trigger rules based on the pre-processed business data, where the trigger rule defines the preconditions for performing business calculations; determine the target calculation rule associated with the target trigger rule, which defines the business calculation logic; perform calculations on the business data based on the target calculation rule to generate target business data; and generate a business result report based on the target business data.
[0058] The business data processing system backend 202 includes: The rule management engine 2021 is used to receive and parse rule configuration information to generate pre-configured trigger rules and / or calculation rules; the rule configuration information includes trigger rule configuration information, calculation rule configuration information, their association relationships and priority information.
[0059] The rule matching engine 2022 is used to extract trigger condition fields from business data; it compares the trigger condition fields with the trigger conditions defined in the pre-configured trigger rules to determine the target trigger rule.
[0060] The data processing engine 2023 is used to extract calculation condition fields from business data; compare the calculation condition fields with the calculation conditions defined in the pre-configured calculation rules to determine the target calculation rule; execute the business calculation logic defined in the target calculation rule to perform calculation processing on the business data and generate the target business data.
[0061] Database System 203: Stores business data and rule configuration data, including various types of data sources. Relational databases can be used to store structured business data, as well as various rule configuration tables, including the definitions, relationships, and priority information of triggering and calculation rules. Non-relational databases can be used to store rule definition information persisted in complete document form (such as JSON or BSON documents), such as rule files generated by the rule configuration interface and parsed by the rule engine, containing triggering rule configuration information and calculation rule configuration information, preprocessed business data, intermediate results and target business data generated during the calculation process, business result reports, and intermediate state information during the rule matching process.
[0062] It should be noted that the system architecture described in the embodiments of this application is for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and does not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the evolution of system architecture, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0063] See Figure 3 This is a flowchart illustrating a business data processing method provided in an embodiment of this application. Figure 3 As shown, the business data processing method provided in this application can be implemented through the aforementioned server, specifically including the following steps S300~S303.
[0064] S300, the server obtains business data.
[0065] Business data refers to raw data that needs to be calculated and processed according to predefined rules. For example, in the scenario of calculating airline agent rewards, business data consists of sales records containing agent identification, flight route, ticketing time, and ticket price; in the scenario of e-commerce promotion, business data consists of a set of transaction orders containing user membership level, shopping cart item list, and historical consumption amount; in the scenario of recommending telecommunications packages, business data consists of a set of monthly bills containing user monthly call duration, data usage, and current package tariff; the server finishes processing the business data uploaded by the user, providing data input for subsequent rule-based matching and calculation processing.
[0066] Servers can obtain raw business data from various data sources. For example, in the scenario of calculating airline agent rewards, the raw data may come from Excel spreadsheets uploaded regularly by business personnel, which contain agent sales records; in the scenario of e-commerce promotion, the raw data may be obtained in real time from the order database via API interface; in the scenario of recommending telecommunications packages, the raw data may be extracted from batch exported files from the user billing system.
[0067] S301. The server determines the target triggering rule that matches the business data from the pre-configured triggering rules.
[0068] Among them, the pre-configured triggering rules are used to define the preconditions for performing business calculations.
[0069] After acquiring business data, the server first determines the target triggering rule. Based on the acquired business data, the server matches and filters from pre-configured triggering rules to determine the target triggering rule suitable for the current business data. Here, pre-configured triggering rules refer to a set of rules that are pre-set and stored to define the prerequisites that must be met to execute business calculations. A pre-configured triggering rule can be composed of one or more judgment conditions combined through logical operators to describe a complex business prerequisite. For example, a rule can be expressed as: the user's membership level is level 5, the order amount is greater than 1000 yuan, and the purchased product category is electronic products.
[0070] During the matching process, the server parses the characteristics of the business data and compares them with the conditions defined by each pre-configured triggering rule. By performing the matching operation, the server dynamically selects specific rule entries applicable to the current data processing request from the static rule base, providing the necessary rule basis for accurately associating and executing the corresponding business calculation logic, and ensuring that calculations are triggered only on data that meets the predetermined preconditions.
[0071] S302. The server determines the target calculation rule associated with the target triggering rule.
[0072] Target calculation rules are used to define business calculation logic.
[0073] After determining the target triggering rule, the server then determines the associated target calculation rule. The target calculation rule here refers to the rule used to define the specific business calculation logic to be executed when the business data meets the preconditions of the target triggering rule.
[0074] The server determines the target calculation rule based on predefined associations. Specifically, during the configuration phase, each trigger rule is explicitly associated with one or more calculation rules. Therefore, when the server matches a target trigger rule for the current business data, it can find the target calculation rule bound to it based on this association.
[0075] The target calculation rule defines the specific business calculation logic. If the target trigger rule is that a user's membership level is 5, the order amount is greater than 1000 yuan, and the purchased product category is electronic products, then the target calculation rule associated with this trigger rule can be defined as calculating the rebate amount, which is the order amount multiplied by 1%. Once the server determines this target calculation rule, it clarifies the formula and parameters for subsequent calculations on orders that meet the conditions.
[0076] By executing the operation of determining the target calculation rules, the server determines the associated target calculation rules based on the previously matched, abstract target triggering rules. This provides complete calculation logic for subsequent precise numerical calculations on business data, thereby achieving a seamless transition from conditional judgment to business calculation.
[0077] S303. The server performs calculations on the business data based on the target calculation rules to generate the target business data.
[0078] After the target calculation rules are determined, the server performs calculations on the business data based on these rules. Calculation processing refers to performing operations on the business data according to the operational logic and parameters defined by the target calculation rules. The generated target business data is the data set resulting from the calculation processing.
[0079] Specifically, the server loads the defined target calculation rule and parses the operational logic defined within it. The target calculation rule is to calculate the rebate amount, which is the order amount multiplied by 1%. The server then extracts the value of the order amount field from the corresponding business data (i.e., order records that meet the trigger conditions) as the calculation input. Next, the server performs a multiplication operation, multiplying the order amount by 1% to obtain the specific rebate amount.
[0080] After completing the calculation, the server associates the result as a new data field (e.g., "rebate amount") with the original business data, forming a new target business data record containing the calculation result. For batch business data, the server iterates through each data record that meets the conditions, repeating the above process of parsing, extracting, calculating, and associating.
[0081] By executing calculations based on target calculation rules, the server transforms pre-defined business logic into specific numerical results. This is crucial for completing the process from rule-based condition matching to the final target, generating target business data with clearly defined calculation results that can be used subsequently.
[0082] In this embodiment, by matching business data with target triggering rules from pre-configured triggering rules, and then performing calculations on the business data based on the target calculation rules associated with the matched target triggering rules, the processing logic of business data is no longer rigidly confined to a fixed processing logic. By decomposing the business data processing logic into configurable triggering rules and calculation rules, and by matching and executing the corresponding rules through business data, the configurability and flexibility of the processing logic are achieved; this ensures that data processing can be accurately triggered and calculated for different business scenarios, improving the accuracy of the output.
[0083] In one embodiment, step S301 includes: S3011, The server extracts the trigger condition field from the business data.
[0084] The server performs the operation of extracting trigger condition fields. Trigger condition fields refer to specific data items extracted from business data and used to participate in the matching and judgment of trigger rules. To achieve extraction, the server parses the obtained business data according to predefined field mapping relationships or data structure parsing rules.
[0085] The trigger condition field includes identification information: subject identifier, effectiveness condition identifier, and core constraint identifier. The subject identifier specifies the target entity to which the business data belongs or is applied, such as a specific ticket agent number, agent group code, or text representing agent identity. Its function is to associate business data with a specific rule-applicable object. The effectiveness condition identifier defines the prerequisites for the rule to take effect, such as a ticket issuance date timestamp or a sales channel code. Its function is to determine whether the current business data falls within the time, location, or scenario specified by the rule. The core constraint identifier expresses the most fundamental limiting requirements of the rule, such as a cabin class code used for reward calculation or a capped reward amount. Its function is to carry the rule elements that determine the core parameters of the business calculation.
[0086] By extracting and combining these identifiers, the server can transform a specific piece of business data into a matchable condition, thereby efficiently and accurately completing the matching process with the triggering rules.
[0087] S3012. The server compares the trigger condition field with the trigger conditions defined in the pre-configured trigger rules to determine the target trigger rule.
[0088] The server performs a comparison operation, which involves logically judging the specific content of the extracted trigger condition fields against the conditions explicitly defined in each pre-configured trigger rule, in order to verify whether the business data characteristics fully meet the preset requirements of a certain rule.
[0089] Specifically, the server compares the extracted identifier fields with the rule conditions. First, the server uses the subject identifier to determine whether the entity to which the current business data belongs (such as a specific agent number) falls within the scope of application of a certain rule. Second, the server uses the validity condition identifier to determine whether the data meets the temporal or scenario prerequisites for the rule to take effect, such as whether the ticket issuance date is within the rule's validity period. Finally, the server uses the core constraint identifier to determine whether the data meets the rule's most critical requirements, such as whether the cabin class code matches the cabin class specified by the rule.
[0090] This series of comparisons and judgments is combined using logical AND relationships. Only when the identifier values of a piece of business data in all dimensions, such as subject, effective conditions, and core constraints, meet all the corresponding conditions of a pre-configured triggering rule, is that rule determined as the target triggering rule matching the current business data.
[0091] By performing a comparison operation, the server completes item-by-item verification of a complex set of rules based on structured data. The purpose of this process is to precisely select the unique rule instance applicable to the current data processing request from among numerous rules, thereby laying the foundation for triggering the correct subsequent calculation process.
[0092] In this embodiment, trigger condition fields are extracted from business data. These fields are then compared with pre-configured trigger rules, enabling fast and accurate rule matching. This enhances adaptability to complex business scenarios, ensuring that only rules meeting the conditions are triggered, and improving the accuracy and execution efficiency of the overall calculation process.
[0093] In one embodiment, step S302 includes: S3021. Extract calculation condition fields from business data.
[0094] The server performs the operation of extracting the calculation condition fields. These calculation condition fields refer to data items extracted from the specific business data that needs to be calculated, and directly used as input parameters for the calculation rules. The extraction operation is performed after the target triggering rule is determined.
[0095] The server parses the target business data based on the target calculation rules or a pre-configured list of calculation parameters. For example, a calculation rule might be defined as: Reward Amount = Ticket Price × Reward Coefficient. The server then extracts the value corresponding to the identification field, "Ticket Price," from the corresponding single ticket sales record.
[0096] By performing this extraction operation, the server prepares precise input data for the upcoming computational processing. The purpose of this process is to transform and aggregate the scattered raw information contained in the target business data into a structured sequence of parameters that can be directly substituted into the calculation formula.
[0097] S3022. Compare the calculation condition field with the calculation conditions defined in the pre-configured calculation rules to determine the target calculation rule.
[0098] The server performs a comparison operation to determine the final applicable target calculation rule. The comparison refers to the process of verifying and matching the extracted calculation condition fields and their specific values with the input parameter requirements and applicable conditions explicitly stated in each preset calculation rule.
[0099] The server filters rules based on the extracted set of calculation condition fields. Each pre-configured calculation rule not only defines the core calculation formula, such as reward amount = ticket price × reward coefficient, but also pre-defines the data conditions necessary for it to take effect. These conditions constitute the matching threshold for the rule. For example, one calculation rule may stipulate that it only applies to sales records with a ticket price greater than or equal to 500 yuan, while another calculation rule may require a specific cabin class code.
[0100] The server performs logical comparisons between the extracted calculation condition fields (e.g., the face value of the ticket in the previous example) and the conditions of each rule. Only when all calculation condition fields of the current business data meet all the preset conditions of a certain calculation rule is that rule determined as the target calculation rule that precisely matches the current data. This matching process ensures that the selected calculation formula is applicable and compliant at the data level.
[0101] By performing this comparison operation, the server dynamically binds the computational logic that best matches the data characteristics of specific business data that has passed the trigger check. Based on the trigger rule filtering, more refined computational rule addressing is performed to ensure that the subsequent computational processing is accurate in both mathematical relationships and business constraints.
[0102] In this embodiment, calculation condition fields are extracted from business data. These fields are compared with pre-configured calculation conditions to achieve fast and accurate rule matching, avoiding irrelevant rules from participating in calculations, thereby reducing invalid data processing and improving rule matching efficiency. This enhances adaptability to complex business scenarios and ensures that correct calculation conditions are used when processing business data.
[0103] In one embodiment, the business data processing method further includes: S304. The server receives rule configuration information.
[0104] Rule configuration information includes trigger rule configuration information and calculation rule configuration information. The server performs the operation of receiving rule configuration information. Rule configuration information refers to the data submitted by the user through the configuration interface, used to dynamically define and modify trigger rules and calculation rules. The received rule configuration information includes at least two parts: trigger rule configuration information and calculation rule configuration information.
[0105] The trigger rule configuration information is used to define trigger conditions and the association between pre-configured trigger rules and pre-configured calculation rules. Specifically, it defines the prerequisites that must be met to execute business calculations, i.e., the trigger rules. This information also defines the association between pre-configured trigger rules and pre-configured calculation rules.
[0106] The calculation rule configuration information is used to define the specific business calculation logic. It clarifies how numerical calculations should be performed when the triggering conditions are met.
[0107] By receiving and processing this configuration information, the server transforms user-defined static business rules into dynamically loadable and executable logical units within the server. This allows the core judgment and calculation logic of the entire business data processing flow to no longer rely on fixed program code, but rather to be flexibly defined and adjusted through external configuration, thereby achieving high adaptability of the solution to changing business policies.
[0108] In one possible implementation, the rule configuration information also includes priority information.
[0109] Priority information is used to determine the target triggering rule or target calculation rule when business data meets the conditions of multiple pre-configured triggering rules or pre-configured calculation rules.
[0110] When a single piece of business data simultaneously meets the triggering conditions of multiple pre-configured triggering rules, the server reads the priority information of each rule. By comparing their priorities, the server can determine a unique rule to be activated. Similarly, during the calculation phase, if multiple calculation rules apply, priority information is used to determine the final target calculation rule.
[0111] By receiving and utilizing priority information, the server enhances its ability to manage complex rule sets. The purpose of this implementation is to resolve potential matching conflicts under multi-layered business rules, ensuring that when multiple rules apply, the system can deterministically execute the most core or specific business logic according to business intent, guaranteeing the accuracy and consistency of the calculation results with expectations.
[0112] In one possible implementation, step S304 further includes: S3041. The server receives the updated trigger rule configuration information and updates the pre-configured trigger rules according to the updated trigger rule configuration information.
[0113] The server performs the receiving and updating operations. Updated trigger rule configuration information refers to new data submitted by the user to modify the definition of an existing pre-configured trigger rule or a category of pre-configured trigger rules. This information includes the identifier of the trigger rule to be modified and the specific new configuration content. For example, extending the effective date range of a rule or modifying its applicable objects.
[0114] Upon receiving the information, the server immediately performs an update operation. Based on the rule identifier carried in the information, the server precisely locates the target rule entry to be modified in the database storing triggering rules. Then, the server replaces the corresponding fields in the target rule entry with the newly submitted configuration content. For example, the effective start date and effective end date fields in the rule are updated to the newly submitted dates.
[0115] By sequentially executing receive and adjust operations, the server enables online, targeted updates to specific triggering rules. This allows business personnel to dynamically optimize or correct the effective conditions and scope of a triggering rule without affecting other rules, thereby ensuring that the rules can respond swiftly to subtle adjustments in market strategies.
[0116] S3042. The server receives the updated calculation rule configuration information and updates the pre-configured calculation rules according to the updated calculation rule configuration information.
[0117] Updated computation rule configuration information refers to new data submitted by a user to modify the computation logic or parameters of an existing pre-configured computation rule or category. This information clarifies the computation rule to be modified and its new computation definition.
[0118] Based on the rule identifier specified in the information, the server locates the corresponding target calculation rule in the pre-configured calculation rule base. Subsequently, the server uses new calculation logic or parameter values to override the original definition of the target rule. For example, the calculation formula for a rebate rule might be adjusted from Rebate Amount = Order Amount × 1% to Rebate Amount = Order Amount × 1.5%.
[0119] By sequentially executing receive and update operations, the server enables real-time and precise revision of specific computational logic. This allows business personnel to quickly adjust business computational logic and immediately execute business operations based on the latest business strategies, ensuring the real-time nature of computation results and policy consistency.
[0120] In this embodiment, configurable rule management is achieved by receiving rule configuration information, including trigger rule configuration information and calculation rule configuration information. Users can customize trigger rules, calculation rules, and their relationships, adjusting business rules without modifying program code. This mechanism greatly enhances the flexibility and maintainability of the method, enabling rapid response to changes in business rules, supporting rule configuration for multiple scenarios and strategies, reducing update and maintenance costs, and improving the efficiency of business rule management.
[0121] The system receives updated trigger rule configuration information and / or updated computation rule configuration information and adjusts pre-configured rules accordingly, introducing a dynamic update mechanism for deployed and running rule sets. When business processing conditions change, only the trigger rule configuration needs to be updated; when computation logic needs optimization, only the computation rule configuration needs to be updated. This ability to support partial updates enables rapid response to changes in business requirements, thereby significantly improving the flexibility of business rule maintenance.
[0122] By introducing priority information into the rule configuration, multiple rules can be selected based on preset priorities when they are simultaneously satisfied, avoiding inconsistent calculation results caused by rule conflicts. This ensures the orderly and deterministic execution of rules, allowing users to flexibly match rules according to business importance. Consequently, even in complex rule scenarios, stable and reliable business results are output, enhancing decision-making capabilities.
[0123] In one embodiment, step S301 further includes: S3013. Obtain and parse the rule configuration information to generate pre-configured trigger rules and / or pre-configured calculation rules.
[0124] The server performs operations to obtain and parse rule configuration information, and generates pre-configured trigger rules or calculation rules based on this. Rule configuration information refers to the configuration data obtained through the receiving operation; while generating pre-configured trigger rules or calculation rules refers to the process of converting the configuration data into standard rule objects that can be loaded, matched, and executed within the server.
[0125] The server first retrieves the submitted rule configuration information from the configuration storage location (such as a database). After retrieval, the server initiates the parsing process. Based on a predefined configuration data format, the parsing operation transforms the relatively raw business intent description defined by the user in the form of a user interface form or data interface into a logical structure that the server can process internally.
[0126] Specifically, the server parses the trigger condition definitions in the trigger rule configuration information, as well as the association between the trigger rule and specific calculation rules, and structures them into a pre-configured trigger rule containing a complete condition expression and rule association pointers. Simultaneously, the server parses the calculation formulas, parameters, and applicable conditions defined in the calculation rule configuration information, and constructs them into a pre-configured calculation rule containing explicit computational logic and execution conditions.
[0127] By performing a series of operations—acquiring, parsing, and generating—the server dynamically transforms user-statically configured business rules into valid rule entities that can be directly used for condition matching and logical calculations at runtime. This provides an immediate, accurate, and scalable source of rules for subsequent rule-based matching and calculation processes, and is a key preprocessing step for enabling flexible rule configuration and dynamic loading.
[0128] In this embodiment, by acquiring and parsing rule configuration information, trigger rules and calculation rules are generated, achieving automated conversion of rules from configuration to execution and reducing the risk of errors introduced by manual coding. Simultaneously, the generation mechanism can respond promptly to rule updates, supporting rapid deployment and activation of rules, thus improving the speed of adaptation to business changes and overall operational efficiency.
[0129] In one embodiment, step S300 further includes: S3001, The server preprocesses the business data.
[0130] The server can perform correction or format conversion operations on the raw data, automatically detecting and correcting common issues in the aforementioned scenarios such as negative values in the ticket amount field, empty values in the membership level field, and inconsistent units for recording monthly call duration. For example, the server will correct invalid negative amounts to 0, fill in missing membership levels with the default value "ordinary member," and uniformly convert all call durations to minutes. The server will then convert the corrected data, which may still retain its original table structure (such as Excel) or complex object form (such as JSON objects), into an in-memory object model that can be directly recognized and efficiently processed by a rule engine (such as the DROOL engine).
[0131] The server can perform format conversion operations on the raw data, transforming data that has been modified but may still retain the original table structure (such as Excel row records) or complex object form (such as JSON nested objects) into an in-memory object model that a rule engine (such as the DROOL engine) can directly recognize and efficiently process.
[0132] S3002. The server determines the target triggering rule to match from the pre-configured triggering rules based on the business data.
[0133] Specifically, the server determines the target triggering rule from the pre-configured triggering rules based on the pre-processed business data.
[0134] The server determines the target trigger rule based on pre-processed business data. This means that the server does not directly use the initially acquired raw business data for rule matching, but rather uses standardized business data that has undergone data correction and format conversion.
[0135] The server performs matching and filtering based on the characteristics presented by the pre-processed business data from pre-configured trigger rules. Since the data has already been processed, its field values are valid and have consistent units, and the data structure is consistent with the expected input of the rule engine. This allows subsequent field extraction and conditional comparison matching processes to be based on a stable and reliable data foundation, effectively avoiding rule mismatches or matching failures caused by problems with the quality of the original data (such as null values or format errors).
[0136] In this embodiment, preprocessing the acquired business data creates a better data foundation for subsequent rule matching. Since the original business data may contain redundant information, inconsistent formats, or noise, preprocessing operations (such as cleaning, formatting, and normalization) can transform this raw data into more standardized and uniform structured data. Performing rule matching based on the preprocessed standardized data significantly reduces the risk of rule matching failures or mismatches caused by data quality issues (such as format errors, missing fields, or abnormal value ranges), thereby improving the reliability and accuracy of the entire rule matching process.
[0137] In one embodiment, the business data processing method further includes: S305. Generate a business results report based on the target business data.
[0138] The result is a collection of all target business data obtained after computation and processing, such as a list of reward amounts calculated for each of a batch of sales records. Statistical aggregation operations are performed on these discrete processing results to generate higher-dimensional statistical indicators, such as sums, averages, counts, maximum values, minimum values, or aggregated values grouped by specific dimensions. The results report is a structured document or visual view generated by organizing and rendering the summarized results according to a preset template and format, which can be read, analyzed, or archived by users.
[0139] In one possible implementation, the server displays the computation processing status of business data through a computation status interface, which includes computation progress and / or the running status of computation threads.
[0140] The computation status interface is a visual monitoring panel used to present users with the real-time progress of data processing tasks. Computation status refers to the information generated by the server during rule matching and computation, reflecting the task execution status, including computation progress and the running status of computation threads. Computation progress describes the completion rate or remaining workload of batch business data processing tasks. The running status of computation threads describes the real-time status of each concurrent execution unit launched by the server to execute computation tasks, such as whether it is active, idle, or experiencing any anomalies. Computation progress and computation thread running status are two interrelated observation dimensions of computation status: progress reflects workload completion from the perspective of the overall task, while thread status reflects processing capacity from the perspective of execution.
[0141] In this embodiment, by generating a result report based on target business data, the calculation results can be presented to the user in an intuitive and structured form. This facilitates users' quick understanding of data analysis results, helps them discover business trends, and supports decision-making. It also makes complex business data calculation results easier to understand and apply.
[0142] The following section, using a specific example—airline agent incentive bonuses—further explains the business data processing method used in this application. Figure 4 This is a schematic diagram of an airline agent bonus calculation process, such as... Figure 4 As shown: S400, the server retrieves ticket sales data.
[0143] The business data consists of a set of ticket sales records for which rewards need to be calculated. The server retrieves a list of raw ticket data from the electronic ticket data source in the database system. The raw ticket data includes fields such as ticket number, agent number, cabin class, route, ticket price, and ticketing date. The server preprocesses the raw data, including formatting the ticketing date to a standard timestamp and correcting records with negative ticket prices to zero. The goal is to obtain standardized business data that can be directly processed by the rules engine.
[0144] The structure of ticket sales data can be a List <map<String,Object> Each record in the List collection represents a ticket that needs to be checked to determine whether a reward should be issued.
[0145] The calculation logic for the bonus can be expressed as follows:
[0146] Where r represents the reward amount the agent receives from a ticket, and u is a set of multiple conditional rules in a certain reward calculation rule.
[0147] If condition u is true, the reward amount is y; otherwise, the reward amount is z (z is usually 0, meaning no reward is given if the reward condition is not met). The rule set u is a combination of several if-else statements. The rules defined by the user on the page are converted into a drl format string that the rule engine can parse. Then, the rule data and the data to be calculated are input separately. Finally, after processing, a reward amount label is added to each ticket record. The pseudocode for a common drl string is as follows: Rule Name: Bonus Calculation Rules If the trigger condition is met && The calculation conditions are met but Processed according to business calculation logic Finish S401, The server matches the corresponding triggering rules based on the ticket sales data.
[0148] The triggering rules mainly maintain information such as rule number, sales unit, reward type, and rule date. The corresponding data source can be determined by the reward type of the triggering rule.
[0149] The information maintained by the trigger conditions defined in the trigger rules includes: International Channels / Whitelist / Non-Whitelist / Customer Base / Premium Access: Whitelist Data.
[0150] Subsidized collection reward: Subsidized collection data range.
[0151] Upselling: The range of data for upselling.
[0152] Triggering conditions can also include metric completion rate:
[0153] Cr represents the agent's target completion rate, N represents the target data set for the agent, and I represents the number of tickets actually sold by the agent during the assessment period. The agent is processed according to the triggering and calculation rules before calculating the reward amount.
[0154] The information maintained in the calculation rules for the calculation conditions may include: Basic information: trigger rule number, calculation rule number, data scope (carrier data, sales data), participating agent, unified signature identifier, direct distribution identifier, etc.
[0155] Measurement information: sales amount, number of sales personnel, value creation amount, etc.
[0156] Award information includes: passenger type, flight segment type, group / individual ticket identification, whitelist identification, domestic / international ticket identification, etc.
[0157] The configuration information for triggering rules and calculation rules is received through the front-end interface. To enable flexible rule configuration, a field information configuration table and a field value table are designed to manage the information maintained in the triggering rules and calculation rules.
[0158] The field information table maintains the main field information required for configuring rules: the field usage type determines the field's final position in the SQL statement; the field concatenation string is the content directly concatenated into the SQL, where the specific value is identified by a specific placeholder, parsed through a method agreed upon by the front-end and back-end, replacing the information entered by the user on the page; the field level distinguishes whether the field information is used in triggering rules or in basic information, measurement information, or award information in calculation rules; the field disabling policy allows for special handling of certain special calculation rules. Based on this configuration information, the server generates the SQL statements needed to retrieve and filter data.
[0159] The server dynamically generates the SQL statements needed to retrieve data based on user-configured rules. This process relies on a predefined field information configuration table.
[0160] For measurement data that requires pre-summarization, the SQL generation logic is as follows: First, based on the level and type of the fields, the fields used for data grouping are dynamically determined from the field information table; then, based on the measurement items (such as sales amount and number of salespersons) selected by the user on the calculation rule configuration page, the corresponding statistical fields and aggregate functions are dynamically obtained from the field information table; finally, combined with all the filtering conditions set by the user on the trigger rules and calculation rules pages, the final filter condition clause is dynamically generated.
[0161] For reward calculation data used directly, the SQL generation focuses on data filtering: it dynamically generates filtering condition clauses by combining all the filtering conditions set by the user on the trigger rules and calculation rules pages, so as to accurately filter out the records that meet the reward calculation conditions from the raw data.
[0162] The server first extracts the trigger condition fields from the business data. These fields are key identifiers corresponding to the trigger conditions defined in the trigger rules, including the subject identifier (agent number), the effective condition identifier (ticket issuance date), and the core constraint identifier (route and cabin class). For example, a trigger rule might have the following trigger conditions: the agent number belongs to group P001, the ticket issuance date is between October 1, 2023 and October 31, 2023, the route is Beijing-Shanghai, and the cabin class is economy. The server compares each trigger condition field in the business data list collection with this trigger condition. If all conditions are met, the business data matches this trigger rule.
[0163] S402. The server calculates and processes the ticket sales data based on the business calculation logic defined in the calculation rules associated with the matched triggering rules to obtain the reward amount.
[0164] The target business data is the calculated reward amount. During this process, the calculation rules may include further refined calculation condition fields used to match their own effective conditions. The server extracts the calculation condition fields from the business data. These fields are additional identifiers corresponding to the calculation conditions defined in the calculation rules, including supplementary explanation identifiers (such as whether it's a team ticket) and rule-related constraint identifiers (such as whether it participates in the cumulative cap).
[0165] Total reward amount per ticket It can be represented as:
[0166] The reward amount for a single calculation rule business calculation logic is as shown in Formula 1. R , R i This is the reward amount for the i-th calculation rule. The total reward amount for a certain ticket can be the sum of the reward amounts from n calculation rules.
[0167] Total reward amount The calculation formula is:
[0168] in Let r be the reward for a single ticket, and r be the amount of data that meets the reward calculation criteria.
[0169] For example, the associated calculation rule specifies its own calculation condition as: whether the team ticket identifier is "no". The server compares and confirms that this condition is met. Then, it executes the business calculation logic defined in the calculation rule; this logic is a user-defined prize formula. In this example, the calculation logic is: if the ticket face value is greater than 1000 yuan, the reward amount is 5% of the ticket face value; otherwise, it is 2% of the ticket face value. The server calls the Drools rule engine, substituting the current ticket face value into the calculation rule, which has been converted to DRL format, for parsing and calculation. Assuming the current ticket face value is 1200 yuan, after the rule engine performs the calculation, the reward amount is 60 yuan. The server uses this result as the target business data.
[0170] Rule configuration information is received through the front-end interface, including trigger rule configuration information and calculation rule configuration information. Trigger rule configuration information defines the trigger conditions in S401, such as the value range for routes and cabin classes. Calculation rule configuration information defines the business calculation logic in S402 and the relationship between calculation rules and trigger rules. The configuration information may include priority information; when business data simultaneously satisfies multiple trigger rules, the server determines the execution order based on priority. After obtaining this configuration information, the server parses it, converting the field placeholders, conditional expressions, and calculation formulas into in-memory rule objects and dynamic SQL statement fragments for database queries, and generating DRL rule files that can be loaded by the Drools rule engine, thus completing the conversion from configuration to executable rules.
[0171] 403. The server generates a result report based on the target business data.
[0172] The server aggregates the reward amounts calculated from all ticket records and adds them up by agent. For example, it adds up the reward amounts of all eligible tickets under agent P001 to obtain the agent's total reward fee. The server organizes this aggregated data into structured reports, displays them through the front-end interface, and provides export functionality. Simultaneously, during the calculation process, the server displays the data processing progress and the running status of the calculation threads in real time through a calculation status interface.
[0173] As can be seen, the above mainly describes the solutions provided by the embodiments of this application from a methodological perspective. To achieve the above functions, the embodiments of this application provide corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, in conjunction with the modules and algorithm steps of the various examples described in the embodiments disclosed herein, the embodiments of this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this invention.
[0174] This application embodiment can divide the business data processing device into functional modules according to the above method example. For example, each function can be divided into its own functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. Optionally, the module division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.
[0175] In some embodiments, this application also provides a business data processing apparatus. This business data processing apparatus may include one or more functional modules for implementing the business data processing method of the above method embodiments.
[0176] For example, Figure 5 This is a schematic diagram illustrating the composition of a business data processing apparatus provided in an embodiment of this application. Figure 5 As shown, the business data processing device 500 includes: a data acquisition module 501, a rule matching module 502, a rule determination module 503, and a data calculation module 504.
[0177] The data acquisition module 501 is used to acquire business data.
[0178] The rule matching module 502 is used to determine the target triggering rule that matches the business data from the pre-configured triggering rules. The pre-configured triggering rules define the preconditions for performing business calculations.
[0179] The rule determination module 503 is used to determine the target calculation rule associated with the target triggering rule. The target calculation rule is used to define the business calculation logic.
[0180] The data calculation module 504 is used to perform calculations on business data based on target calculation rules to generate target business data.
[0181] In one embodiment, the rule matching module 502 is also used to extract calculation condition fields from business data.
[0182] The calculation condition field is compared with the calculation conditions defined in the pre-configured calculation rules to determine the target calculation rule.
[0183] In one embodiment, the business data processing device 500 further includes a rule configuration module 505, which is used to receive rule configuration information, including trigger rule configuration information and calculation rule configuration information.
[0184] Among them, the trigger rule configuration information is used to define the trigger conditions and the association between the pre-configured trigger rules and the pre-configured calculation rules.
[0185] The calculation rule configuration information is used to define the business calculation logic.
[0186] In one embodiment, the rule configuration module is further configured to receive updated trigger rule configuration information and update the pre-configured trigger rules according to the updated trigger rule configuration information; And / or, receive updated computation rule configuration information and update the pre-configured computation rules according to the updated computation rule configuration information.
[0187] In one embodiment, the rule configuration information also includes priority information.
[0188] Priority information is used to determine the target triggering rule or target calculation rule when business data meets the conditions of multiple pre-configured triggering rules or pre-configured calculation rules.
[0189] In one embodiment, the rule configuration module 505 is further configured to acquire and parse rule configuration information to generate pre-configured triggering rules and / or pre-configured calculation rules.
[0190] In one embodiment, the data acquisition module 501 is further used to preprocess the business data.
[0191] Based on business data, the target triggering rule is determined from the pre-configured triggering rules. Specifically, based on the pre-processed business data, the target triggering rule is determined from the pre-configured triggering rules.
[0192] In one embodiment, the data calculation module is also used to generate a business result report based on the target business data.
[0193] When implementing the functions of the integrated modules described above in hardware, this embodiment of the invention provides a possible schematic diagram of the electronic device involved in the above embodiments. For example... Figure 6As shown, the electronic device 600 includes: a processor 602, a communication interface 603, and a bus 604. Optionally, the electronic device 600 may also include a memory 601.
[0194] Processor 602 may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 602 may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 602 may also be a combination that implements computing functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0195] Communication interface 603 is used to connect to other devices via a communication network. This communication network can be Ethernet, wireless access network, wireless local area network (WLAN), etc.
[0196] The memory 601 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), disk storage medium or other magnetic storage device, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto.
[0197] In one possible implementation, the memory 601 can exist independently of the processor 602. The memory 601 can be connected to the processor 602 via a bus 604 and is used to store instructions or program code. When the processor 602 calls and executes the instructions or program code stored in the memory 601, it can implement the business data processing method provided in this embodiment of the invention.
[0198] In another possible implementation, the memory 601 can also be integrated with the processor 602.
[0199] Bus 604 can be an extended industry standard architecture (EISA) bus, etc. Bus 604 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 6 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0200] Through the above description of the implementation methods, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the service calling device can be divided into different functional modules to complete all or part of the functions described above.
[0201] This application also provides a computer-readable storage medium. All or part of the processes in the above method embodiments can be executed by computer instructions instructing related hardware. The program can be stored in the aforementioned computer-readable storage medium, and when executed, it can include the processes of the above method embodiments. The computer-readable storage medium can be any of the foregoing embodiments or memory. The aforementioned computer-readable storage medium can also be an external storage device of the aforementioned service invocation device, such as a plug-in hard drive, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the aforementioned service invocation device. Further, the aforementioned computer-readable storage medium can include both internal storage units of the aforementioned service invocation device and external storage devices. The aforementioned computer-readable storage medium is used to store the aforementioned computer program and other programs and data required by the aforementioned service invocation device. The aforementioned computer-readable storage medium can also be used to temporarily store data that has been output or will be output.
[0202] This application also provides computer instructions. All or part of the processes in the above method embodiments can be executed by computer instructions to instruct related hardware (such as computers, processors, network devices, and terminals). The program can be stored in the aforementioned computer-readable storage medium.
[0203] This application also provides a computer program product that, when run on a computer, causes the above-described method embodiments to be executed.
[0204] This application also provides a chip system. The chip system may be composed of chips or may include chips and other discrete devices, without limitation. The chip system includes a processor and a transceiver. All or part of the processes in the above method embodiments can be completed by this chip system, such as the chip system being used to implement the functions performed by the network devices or terminals in the above method embodiments.
[0205] In one possible design, the chip system further includes a memory for storing program instructions and / or data. When the chip system is running, the processor executes the program instructions stored in the memory to enable the chip system to perform the functions performed by the network device or terminal in the above method embodiments.
[0206] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A business data processing method, characterized in that, include: Obtain business data; Based on the business data, a target triggering rule matching the business data is determined from the pre-configured triggering rules; wherein, the pre-configured triggering rules are used to define the preconditions for performing business calculations; Determine the target calculation rule associated with the target triggering rule, the target calculation rule being used to define business calculation logic; Based on the target calculation rules, the business data is processed to generate target business data.
2. The method according to claim 1, characterized in that, The step of determining the matching target triggering rule from the pre-configured triggering rules based on the business data includes: Extract the trigger condition field from the business data; The trigger condition field is compared with the trigger conditions defined in the pre-configured trigger rules to determine the target trigger rule.
3. The method according to claim 1, characterized in that, The determination of the target calculation rule associated with the target triggering rule includes: Extract the calculation condition fields from the business data; The calculation condition field is compared with the calculation conditions defined in the pre-configured calculation rules to determine the target calculation rule.
4. The method according to claim 1, characterized in that, The method further includes: Receive rule configuration information, which includes trigger rule configuration information and calculation rule configuration information; The trigger rule configuration information is used to define trigger conditions and the association between the pre-configured trigger rules and the pre-configured calculation rules; The calculation rule configuration information is used to define the business calculation logic.
5. The method according to claim 4, characterized in that, The method further includes: Receive updated trigger rule configuration information, and adjust the pre-configured trigger rules according to the updated trigger rule configuration information; And / or, receive updated calculation rule configuration information, and adjust the pre-configured calculation rules according to the updated calculation rule configuration information.
6. The method according to claim 4, characterized in that, The rule configuration information also includes priority information; The priority information is used to determine the target triggering rule or target calculation rule when the business data meets the conditions of multiple pre-configured triggering rules or pre-configured calculation rules.
7. The method according to claim 1, characterized in that, Before determining the target triggering rule from the pre-configured triggering rules based on the business data, the method further includes: Obtain and parse the rule configuration information to generate the pre-configured triggering rules and / or pre-configured calculation rules.
8. The method according to claim 1, characterized in that, After acquiring the business data, the following is also included: The business data is preprocessed; The step of determining the matching target trigger rule from the pre-configured trigger rules based on the business data specifically involves: determining the matching target trigger rule from the pre-configured trigger rules based on the pre-processed business data.
9. The method according to any one of claims 1-8, characterized in that, The method further includes: Based on the target business data, a business results report is generated.
10. A business data processing device, characterized in that, include: The data acquisition module is used to acquire business data; The rule matching module is used to determine a target triggering rule that matches the business data from a pre-configured set of triggering rules; wherein the pre-configured triggering rules are used to define the preconditions for performing business calculations. The rule determination module is used to determine the target calculation rule associated with the target triggering rule, and the target calculation rule is used to define the business calculation logic; The data calculation module is used to perform calculations on the business data based on the target calculation rules to generate target business data.
11. An electronic device, characterized in that, The device includes a processor and a memory, the processor being coupled to the memory; the memory is used to store computer instructions, which are loaded and executed by the processor to enable the computer device to implement the business data processing method as described in any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes computer-executable instructions that, when executed on a computer, cause the computer to perform the business data processing method as described in any one of claims 1 to 9.
13. A computer program product, characterized in that, The computer program product includes a computer program that, when run on an electronic device, causes the electronic device to perform the business data processing method as described in any one of claims 1 to 9.