Dynamic preferential activity configuration calculation method based on rule engine

By adopting a dynamic promotional activity configuration calculation method based on the rules engine in the e-commerce promotion system, the problems of insufficient flexibility and complex discount calculations of the existing system are solved, and the effect of customized promotion rules and automated discount calculations of merchants is realized, improving operational efficiency and calculation accuracy.

CN120069949APending Publication Date: 2025-05-30E-BUY INFORMATION TECH (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411797068.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

The existing e-commerce promotion system is not flexible enough to quickly launch new promotions, and the system is difficult to effectively manage the superposition of multiple promotions, which is prone to problems such as discount calculation errors and discount conflicts, affecting the user experience.

Method used

Using the dynamic promotional activity configuration calculation method based on the rules engine, the system can automatically calculate the offer and handle the discount overlay problem by defining promotion rules, designing the promotional rule configuration interface, executing promotional activities, and handling the discount calculation when multiple promotional activities are superimposed.

Benefits of technology

It realizes that merchants define complex promotion rules through the interface to improve operational efficiency. The system can automatically calculate and process complex discount overlay logic to ensure calculation accuracy and reduce maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120069949A_ABST
    Figure CN120069949A_ABST
Patent Text Reader

Abstract

The invention provides a dynamic preferential activity configuration calculation method based on a rule engine, and belongs to the technical field of e-commerce platforms. Designing a rule configuration interface of a promotion activity; executing a promotion activity; and processing preferential calculation when a plurality of promotion activities are superposed. Merchants can quickly define various complex promotion rules through a system configuration interface, so that the intervention of developers is reduced, and the adaptability of the system is improved. The system can process complex preferential superposition logic, preferential conflicts and wrong calculation are avoided, and the accuracy of the final preferential amount is ensured. The system adopts a configuration mode to manage the promotion rules, so that the development cost and the system maintenance cost are reduced. Through an extensible rule engine framework, the system can support more types of promotion activities in the future and can be flexibly expanded according to business requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of e-commerce platforms, and particularly to a dynamic preferential activity configuration calculation method based on a rule engine. Background Art

[0002] With the development of e-commerce platforms, more and more merchants rely on promotional activities to attract customers and increase sales. Typical promotional activities include:

[0003] Full reduction activity: When the order amount of a user reaches a certain threshold, a fixed amount or percentage discount is given;

[0004] Buy-one-get-one-free activity: When a certain quantity of goods is purchased, other goods are given as gifts;

[0005] Combined discount: When multiple different goods are purchased, a combined discount or a fixed discount is enjoyed;

[0006] The more you buy, the more you save: The more goods are purchased, the greater the unit price discount.

[0007] Existing promotion systems lack flexibility and usually require developers to write and test cumbersome code, which results in:

[0008] 1. High development cost: For each promotional activity, customized code is usually required, and new activities cannot be launched quickly;

[0009] 2. Poor system flexibility: Merchants cannot independently create complex promotion rules in the existing system, and all changes require the support of the technical team;

[0010] 3. Complex promotion calculation: When multiple promotional activities are superimposed, the existing system is difficult to effectively manage, and problems such as incorrect preferential calculation and preferential conflicts are likely to occur, affecting the user experience.

[0011] Currently, there are also some solutions on the market that attempt to simplify the definition process of promotional activities through configuration, but the generality and flexibility of these systems are still limited. For example, some systems provide basic promotion rule templates but cannot handle complex business requirements, especially in the calculation of superimposed activities and flexible combination rules, there are still obvious deficiencies. At the same time, existing promotion systems usually cannot support merchants to independently define complex promotion logics and cannot meet various personalized promotion needs in actual business.

[0012] For example, rule engines such as Drools can achieve a certain degree of rule automation. However, due to their broad generality in design, the support for the e-commerce promotion field is not sufficient. Especially when facing business scenarios such as the superimposed processing of multiple promotion activities and the dynamic configuration of promotion conditions, rule engines such as Drools do not provide ready-made solutions. Therefore, there is still a lack in the market of a promotion management system that can support the flexible configuration of promotion activities, the processing of preferential superposition, and is easy for merchants to operate.

[0013] The information disclosed in this background section is only intended to enhance the overall understanding of the present invention and should not be regarded as an admission or any form of implication that this information constitutes prior art already known to those of ordinary skill in the art. Summary of the Invention

[0014] The object of the present invention is to provide a method for calculating the dynamic configuration of preferential activities based on a rule engine, which allows merchants to dynamically define promotion activities through simple configuration, and the system can automatically calculate the discounts and handle the problem of preferential superposition. The system realizes efficient activity management through the rule engine and improves the scalability and maintainability through modular design.

[0015] To achieve the above object, the present invention provides the following solution:

[0016] A method for calculating the dynamic configuration of preferential activities based on a rule engine, comprising:

[0017] Defining promotion rules;

[0018] Designing a rule configuration interface for promotion activities;

[0019] Executing promotion activities;

[0020] Processing the discount calculation when multiple promotion activities are superimposed.

[0021] Optionally, the definition of promotion rules is responsible for by the rule engine module, and the rule engine module adopts an extensible rule configuration syntax, allowing merchants to define the trigger conditions and preferential methods of promotion activities through configuration files or interfaces.

[0022] Optionally, the rule engine module supports the following promotion types:

[0023] Full reduction offer: When the order amount exceeds a certain threshold, a fixed amount or a percentage discount is given;

[0024] Buy-one-get-one-free offer: When the user purchases certain specific goods, other goods are given as gifts;

[0025] Discount on the Nth item: When purchasing multiple identical goods, the Nth item enjoys a discount or special price;

[0026] Combined Offer: When purchasing the combined product of A + B, enjoy the offer;

[0027] Fixed - amount Offer: When purchasing a certain type of product, purchase it at a fixed amount regardless of the original product price;

[0028] Superimposed Offer: Single activities can be used superimposedly, or multiple rules can be configured for one activity to be superimposed.

[0029] Optionally, the rule configuration interface for designing promotional activities is completed by the activity configuration module. The activity configuration module provides a set of rule structure in JSON format, and users can design the rule configuration interface for various promotional activities according to their own styles.

[0030] Optionally, the configuration of the rule engine includes:

[0031] Multiple groups of product code configurations, rule expression configurations, discount configurations, and other configurations;

[0032] The rule expression configuration includes: rule verification expression and rule return expression;

[0033] The discount configuration includes discount rate, discount amount, and fixed amount;

[0034] The other configurations include the sorting of products to be sent, whether to participate in the discount, and the activity threshold.

[0035] Optionally, the calculation of the offer when processing the superimposition of multiple promotional activities is completed by the offer superimposition processing module. By setting different priorities for offer rules, the system can automatically determine which offers can be applied simultaneously and which offers cannot be superimposed, and the system can handle the scenario of offer superimposition across different product groups.

[0036] Optionally, the specific process for calculating the offer when processing the superimposition of multiple promotional activities is as follows:

[0037] Send the order information, and the order information must include the list of purchased products and unit price information;

[0038] Pre - process the products, sort the product list according to the configuration, and extract the product codes and price information;

[0039] Verify the activity rules, verify the rules according to the configured rule verification expression, and determine whether the sent products meet the activity requirements. If the activity rules are not met, the activity conditions are not satisfied;

[0040] Match the activity products, and match the returned products that meet the conditions according to the configured rule return expression;

[0041] Calculate the activity discount, and calculate the final discount of the order according to the matched returned product information and the configured discount information.

[0042] Compared with the prior art, the present invention has the following beneficial effects:

[0043] 1. High flexibility: Merchants can define complex promotion rules by themselves through the interface without the participation of developers, improving operational efficiency.

[0044] 2. Automatic calculation: The system can automatically calculate and process complex discount stacking logics to ensure calculation accuracy.

[0045] 3. Scalability: The system supports the combination and expansion of multiple promotion activity types, and merchants can freely define various promotion activities according to their needs.

[0046] 4. Reduced maintenance cost: The system processes promotion logics through a rule engine, reducing the frequency of developer participation and lowering the maintenance cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] 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 embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0048] Figure 1 It is a schematic diagram of rule engine configuration provided by an embodiment of the present invention.

[0049] Figure 2 It is a schematic diagram of the configuration interface provided by an embodiment of the present invention.

[0050] Figure 3 It is a specific flowchart of discount calculation when processing the stacking of multiple promotion activities provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0051] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, rather than all, embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts fall within the scope of protection of the present invention.

[0052] The purpose of the present invention is to provide a method for configuring dynamic discount activities based on a rule engine with high configuration flexibility, multiple activity types, accurate discount calculation, and high maintenance cost.

[0053] To make the above objects, features, and advantages of the present invention more obvious and understandable, the present invention will be further described in detail below with reference to the drawings and specific embodiments.

[0054] Example 1:

[0055] Most existing promotion systems adopt the hard - coding method, that is, developers write specific code logic for each activity type. The main problems of this method include: the logic of promotion activities highly depends on code implementation. Every time a new activity type is added, developers need to write new code and carry out corresponding testing and online processes, resulting in a long development cycle and being error - prone. In addition, in the scenario of multiple promotion activities overlapping, the discount calculation logic of existing systems is relatively complex, often leading to conflicts in discount rules or incorrect calculation of discount amounts, affecting the user experience.

[0056] The main disadvantages of existing promotion management systems can be summarized as follows:

[0057] 1. Poor configuration flexibility: Most promotion systems rely on hard - coding. Merchants cannot quickly define promotion rules through a graphical interface or configuration file, resulting in the need for developers to participate every time a promotion activity is changed, reducing the operation efficiency.

[0058] 2. Single activity type: Existing systems usually only support simple promotion activities, such as full - reduction and discount, and cannot flexibly define the combined logic of multiple promotion activities, such as complex promotion scenarios like "10 yuan for the second cup when reaching 50 yuan" and "buy A + B and get B free".

[0059] 3. Easy to make mistakes in discount calculation: When multiple discount activities overlap, the system needs to handle complex logic to determine the final discount amount. Existing systems often make calculation mistakes in this scenario, or cannot correctly handle the priority of discount rules.

[0060] 4. High maintenance cost: Every time a merchant needs to change the promotion rules, developers need to rewrite, test, and deploy the code, increasing the workload and cost of system maintenance and being unable to quickly respond to market changes.

[0061] To solve the above problems, this embodiment provides a dynamic discount activity configuration method based on a rule engine, including:

[0062] Define promotion rules;

[0063] Design a rule configuration interface for promotion activities;

[0064] Execute promotion activities;

[0065] Handle the discount calculation when multiple promotion activities overlap.

[0066] Furthermore, the definition of promotion rules is responsible for by the rule engine module. The rule engine module adopts an extensible rule configuration syntax, allowing merchants to define the trigger conditions and discount methods of promotion activities through configuration files or interfaces.

[0067] The rules engine can support the following promotion types:

[0068] 1. Full reduction offer: When the order amount exceeds a certain threshold, a fixed amount or a percentage discount is given.

[0069] 2. Buy-one-get-one offer: When the user purchases certain specific goods, other goods are given as gifts.

[0070] 3. Discount on the Nth item: When purchasing multiple identical goods, the Nth item enjoys a discount or special price.

[0071] 4. Combo offer: When purchasing a combination of goods A + B, a discount is enjoyed.

[0072] 5. Fixed amount offer: When purchasing a certain type of goods such as coffee, it is purchased at a fixed amount regardless of the original price of the goods. For example, 10 yuan for coffee.

[0073] 6. Stackable offers: Individual activities can be stacked, or multiple rules can be configured for one activity to be stacked.

[0074] Furthermore, the rule configuration interface for designing promotion activities is completed by the activity configuration module. The activity configuration module provides a set of rule structures in JSON format, and users can design the rule configuration interface for various promotion activities according to their own styles.

[0075] Configuration instructions:

[0076]

[0077]

[0078] Furthermore,

[0079] Example 2: The calculation of discounts when processing multiple stacked promotion activities is completed by the discount stacking processing module. By setting different priorities for discount rules, the system can automatically determine which discounts can be applied simultaneously and which discounts cannot be stacked. The system can handle the scenario of discount stacking across different product groups.

[0080] For example, when the user purchases multiple SKUs, the system can determine which goods are eligible for full reduction offers and which goods enjoy buy-one-get-one offers, and calculate the final discount amount.

[0081] The specific process is as Figure 3 shown, including:

[0082] Send the order information. The order information must include the list of purchased goods and the unit price information;

[0083] Preprocess the products, sort the product list according to the configuration, and extract the product codes and price information;

[0084] Verify the activity rules, verify the rules according to the configured rule verification expression, and determine whether the submitted products meet the activity requirements. If the activity rules are not met, the activity conditions are not satisfied;

[0085] Match the activity products, and return the products that meet the conditions according to the configured rules;

[0086] Calculate the activity discount, and calculate the final order discount according to the matched returned product information and the configured discount information.

[0087] Activity configuration cases:

[0088] Example 1: Buy one get one free

[0089]

[0090] Explanation of the expression:

[0091] codeType: The type is the SKU of the product. codeConfigList: The SKU is only configured with one group, including A001 - A005 above

[0092] checkExpression: $ represents a group, $1 represents the first group, $1 / 2 represents taking 2 products from the first group. returnExpression: $$ represents the rule return group, $$1 / 1 represents taking one product from one group of the rule return 。

[0093] Example 2: 50% off the second cup

[0094] {

[0095] "codeType":"sku",

[0096] "codeConfigList":

[0097] "A001,A002,A003,A004,A005,A006,A007"

[0098] ,

[0099] discountOff:0.5,

[0100] "checkExpression":"$1 / 2",

[0101] "returnExpression":"$$1 / 1"

[0102] }

[0103] Example 2 has one more configuration compared to Example 1:

[0104] discountOff: 0.5 means a 50% discount, so for the second item in the result, the full amount reduction in Example 1 becomes a 50% reduction.

[0105] Example 3: Get the second item for 10 yuan when the total order amount reaches 50 yuan

[0106] {

[0107] "codeType": "sku",

[0108] "codeConfigList":

[0109] "A001,A002,A003,A004,A005"

[0110] ,

[0111] limitMinAmount: 50,

[0112] fixedAmount: 10,

[0113] "checkExpression": "$1 / 2",

[0114] "returnExpression": "$$1 / 1"

[0115] }

[0116] Example 3 adds one parameter and modifies one configuration compared to Example 2:

[0117] Increase the activity threshold, limitMinAmount: 50, the total order amount must be greater than or equal to 50 yuan.

[0118] Change discountOff to fixedAmount, the preferential method changes from discount to fixed - amount purchase. For example, if the original price of the second item is 35 yuan, now it is purchased at a fixed 10 yuan, which means a discount of 25 yuan for this order.

[0119] Example 4: Buy A + B and get B for free

[0120] {

[0121] "codeType": "sku",

[0122] "codeConfigList":

[0123] "A001,A002,A003,A004,A005",

[0124] "B001,B002,B003"

[0125] ,

[0126] "checkExpression": "$1 / 1 && $2 / 1",

[0127] "returnExpression": "$$2 / 1"

[0128] }

[0129] The checkExpression: $1 / 1 && $2 / 1 means taking 1 item from the first group A and also taking 1 item from the second group B.

[0130] The returnExpression: $$2 / 1 means taking 1 from group 2, that is, item B, which is equivalent to giving away item B.

[0131] The biggest difference between this case and the previous examples is that the condition must be to take items from 2 groups. If you need to configure discounts or others, you can add the same parameters as in the previous examples.

[0132] The various embodiments in this specification are described in a progressive manner. The key point of each embodiment is to illustrate the differences from other embodiments. For the same and similar parts among the embodiments, reference can be made to each other. For the system disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and reference can be made to the description in the method part for related parts.

[0133] Specific examples are used in this article to elaborate on the principles and implementation manners of the present invention. The descriptions of the above embodiments are only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, there will be changes in the specific implementation manners and application scopes according to the idea of the present invention. In summary, the content of this specification should not be construed as a limitation to the present invention.

Claims

1. A dynamic preferential activity configuration calculation method based on a rule engine, characterized in that: include: Define promotion rules; Design the rule configuration interface for promotion activities; Execute promotional activities; Handle discount calculation when multiple promotions overlap.

2. The dynamic preferential activity configuration calculation method based on rule engine according to claim 1 is characterized in that: The rule engine module is responsible for defining the promotion rules. The rule engine module adopts an extensible rule configuration syntax, allowing merchants to define the triggering conditions and preferential methods of promotion activities through configuration files or interfaces.

3. The dynamic preferential activity configuration calculation method based on rule engine according to claim 1 is characterized in that: The rules engine module supports the following promotion types: Full discount: When the order amount exceeds a certain threshold, a fixed amount or discount percentage will be given; Buy-one-get-one-free offer: When users buy certain products, they will receive other products as gifts. Nth item discount: When purchasing multiple items of the same product, the Nth item will enjoy a discount or special price; Combination discount: enjoy discount when purchasing A+B combination products; Fixed amount discount: Buy a category of goods for a fixed amount, regardless of the original price of the goods; Superimposed discounts: a single activity can be used in combination or multiple rules can be configured for one activity to be superimposed.

4. The dynamic preferential activity configuration calculation method based on rule engine according to claim 1 is characterized in that: The rule configuration interface for designing promotional activities is completed by the activity configuration module, which provides a set of rule structure JSON format, and users can design rule configuration interfaces for various promotional activities according to their own style.

5. The dynamic preferential activity configuration calculation method based on rule engine according to claim 2 is characterized in that: The configuration of the rule engine includes: Multiple groups of product code configuration, rule expression configuration, discount configuration and other configurations; The rule expression configuration includes: a rule verification expression and a rule return expression; The discount configuration includes a discount rate, a discount amount and a fixed amount; The other configurations include the sorting of items to be sent, whether to participate in discounts and activity thresholds.

6. The method for calculating dynamic preferential activity configuration based on rule engine according to claim 1, characterized in that: The discount calculation when processing multiple promotional activities is superimposed is completed by the discount superposition processing module. By setting different discount rule priorities, the system can automatically determine which discounts can be applied at the same time and which discounts cannot be superimposed. The system can handle the discount superposition scenario across product groups.

7. The dynamic preferential activity configuration calculation method based on rule engine according to claim 1 is characterized in that: The specific process of calculating discounts when multiple promotional activities overlap is as follows: Submit order information, which must include the list of purchased goods and unit price information; Product preprocessing: sort the product list according to the configuration and extract product codes and price information; Verify the activity rules. Verify the expression based on the configured rules to determine whether the uploaded products meet the activity requirements. If they do not meet the activity rules, the activity conditions are not met. Match the active products and return the products that meet the conditions according to the configured rules; Calculate the activity discount and calculate the final discount of the order based on the matching returned product information and configured discount information.