Method, device and electronic equipment for determining and requesting offer data

By grouping and calculating discount data, the problem of users finding it difficult to select the best deal in complex discount combinations is solved, improving processing speed and user experience.

CN122115024APending Publication Date: 2026-05-29SHISHI TONGYUN TECH CHENGDU CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHISHI TONGYUN TECH CHENGDU CO LTD
Filing Date
2026-02-10
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

In complex scenarios involving various discount combinations, users may find it difficult to determine and select the most favorable combination, which negatively impacts the user experience.

Method used

By acquiring object information and available discount information, and based on discount overlap relationships and product association relationships, discounts are divided into multiple groups to form independent calculation groups, and recommended combination discount data are generated.

Benefits of technology

It improves processing speed and performance in complex offer combination scenarios, simplifies user operations, and enhances user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122115024A_ABST
    Figure CN122115024A_ABST
Patent Text Reader

Abstract

The application discloses a method, device and electronic equipment for determining and requesting discount data. The method for determining discount data comprises: obtaining object information of at least one object and discount information of at least one available discount corresponding to the object; determining discount exclusion groupings of the available discounts according to discount exclusion relationships between the available discounts, and determining discount circle product groupings of the object according to circle product association relationships between the available discounts; determining discount independent calculation groups according to the discount exclusion groupings and the discount circle product groupings; and determining recommended discount data recommended for the at least one object according to the discount independent calculation groups, wherein the recommended discount data is combined discount data generated based on the available discounts. The method solves the problem of how to recommend better discount data in a complex discount combination use scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, specifically to a method, apparatus, and electronic device for determining preferential data. This application also relates to a method, apparatus, and electronic device for requesting preferential data. Background Technology

[0002] With the development of internet technology and the widespread use of terminal devices, business transactions between merchants and users are increasingly conducted through applications on these devices. To attract users and increase order volume, merchants and e-commerce platforms often provide users with various types of promotional information. However, as the types of promotional information become more diverse and the scenarios for combining promotions become more complex, users face the challenge of choosing the right promotion to maximize their discounts.

[0003] In related technologies, when different types of offers are used, users view and select offers, and repeatedly calculate and try to confirm the best offer data (i.e., the offer combination that can enjoy the best discount); or, in simple scenarios of combining or mutually exclusive offers, the best offer data can be determined and recommended to the user. However, having users calculate the best offer themselves will affect the user experience of using offers, and in complex scenarios of using offer combinations, there is a lack of solutions for determining and recommending the best offer combination.

[0004] Therefore, how to recommend the best discount data to improve user experience in complex discount combination usage scenarios is a problem that needs to be solved.

[0005] The information disclosed in the background section is only intended to enhance the understanding of the background of this application, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0006] This application provides a method, apparatus, and electronic device for determining and requesting discount data, which overcomes the shortcomings of lacking solutions for determining and requesting discount data in complex discount combination usage scenarios. The specific solution is as follows: In a first aspect, this application provides a method for determining discount data, the method comprising: obtaining object information of at least one object and discount information of at least one available discount corresponding to the object; determining discount overlap groups of the available discounts based on discount overlap relationships between the available discounts; and determining discount circle groupings of the object based on circle-product association relationships between the available discounts; determining discount independent calculation groups based on the discount overlap groups and the discount circle groupings; and determining recommended discount data for the at least one object based on the discount independent calculation groups, wherein the recommended discount data is combined discount data generated based on the available discounts.

[0007] Secondly, this application provides a method for requesting discount data, the method comprising: in response to a triggering operation on a discount recommendation control or in response to an addition or deletion operation on an object, sending an optimal consultation request for requesting combined discount data; the optimal consultation request carrying object information and user information; receiving combined discount data fed back in response to the optimal consultation request; the combined discount data being determined based on the method for determining discount data described in the first aspect.

[0008] Thirdly, this application also provides an apparatus for determining discount data, the apparatus comprising: a data acquisition unit, configured to acquire object information of at least one object and discount information of at least one available discount corresponding to the object; a discount grouping unit, configured to determine a discount overlap grouping of the available discounts based on the discount overlap relationship between the available discounts, and to determine a discount circle grouping of the object based on the circle association relationship between the available discounts; an independent calculation group determination unit, configured to determine an independent discount calculation group based on the discount overlap group and the discount circle grouping; and a recommendation unit, configured to determine recommended discount data for the at least one object based on the independent discount calculation group, wherein the recommended discount data is combined discount data generated based on the available discounts.

[0009] Fourthly, this application also provides an electronic device, comprising: a processor, a memory, and computer program instructions stored in the memory and executable on the processor; wherein the processor executes the computer program instructions to implement the method as described in any one of the first to second aspects.

[0010] Fifthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method described in any one of the first to second aspects.

[0011] Sixthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the method as described in any one of the first to second aspects.

[0012] Compared with the prior art, this application has the following advantages: This application provides a method, apparatus, electronic device, and computer-readable storage medium for determining discount data. The method includes: acquiring object information of at least one object and discount information of at least one available discount corresponding to the object; determining discount overlap groups of the available discounts based on discount overlap relationships, and determining discount circle groupings of the object based on circle-product association relationships among the available discounts; determining discount independent calculation groups based on the discount overlap groups and the discount circle groupings; and determining recommended discount data for the at least one object based on the discount independent calculation groups, wherein the recommended discount data is combined discount data generated based on the available discounts. By splitting multiple available discounts into several discount overlap groups based on discount overlap relationships and forming discount circle groupings based on circle-product association relationships, and then obtaining discount independent calculation groups based on these, a smaller set of independently calculable best discounts can be formed, minimizing the number of discount combinations. This improves the processing speed and performance of combined discount data in complex discount combination usage scenarios, quickly recommends combined discount data to users, and allows users to enjoy better discounts through simple steps.

[0013] This application also provides a method, apparatus, electronic device, and computer-readable storage medium for requesting discount data. The method includes: in response to a triggering operation on a discount recommendation control or in response to an addition or deletion operation on an object, sending an optimal consultation request for requesting combined discount data; the optimal consultation request carries object information and user information; receiving combined discount data fed back in response to the optimal consultation request; the combined discount data is determined based on the method for determining discount data, thereby realizing automatic calculation of the best combined discount data for object information, simplifying the use of discount information, and improving user experience. Attached Figure Description

[0014] Figure 1 This is a flowchart of a method for determining preferential data provided in the first embodiment of this application.

[0015] Figure 2A This is a schematic diagram of an example of the preferential overlap relationship and corresponding preferential overlap grouping provided in the first embodiment of this application.

[0016] Figure 2B This is a schematic diagram illustrating another example of the preferential overlap relationship and corresponding preferential overlap grouping provided in the first embodiment of this application.

[0017] Figure 3 This is a schematic diagram illustrating an example of the product association relationship and corresponding preferential product grouping provided in the first embodiment of this application.

[0018] Figure 4This is a schematic diagram of an example of the preferential independent calculation group provided in the first embodiment of this application.

[0019] Figure 5 This is a schematic diagram of another example of an independent discount calculation group and an example of constructing a discount calculation tree based on the first embodiment of this application.

[0020] Figure 6 This is a flowchart of an example of the preferential computation tree algorithm provided in the first embodiment of this application.

[0021] Figure 7 This is a flowchart illustrating a method for requesting preferential data provided in the second embodiment of this application.

[0022] Figure 8 This is a schematic diagram of a device for determining discount data provided in the third embodiment of this application.

[0023] Figure 9 This is a structural block diagram of the electronic device provided in this application. Detailed Implementation

[0024] To enable those skilled in the art to better understand the technical solutions of this application, the application will be clearly and completely described below with reference to the accompanying drawings of the embodiments. However, this application can be implemented in many other ways different from those described below. Therefore, based on the embodiments provided in this application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this application.

[0025] It should be noted that the terms "first," "second," etc., in the claims, specification, and drawings of this application are used to distinguish similar objects and are not used to describe a specific order or sequence. Such data are interchangeable where appropriate so that the embodiments of this application described herein can be implemented in a sequence other than that shown or described herein. Furthermore, the terms "comprising," "having," and their variations 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 necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or apparatuses.

[0026] It should be noted that the user information and data involved in this application are all data and information that have been fully authorized by all parties or authorized by the user, and the collection, use and processing of the relevant data must comply with relevant laws, regulations and standards, and corresponding operation portals are provided for users to choose to authorize or refuse.

[0027] To facilitate understanding of the embodiments of this application, the relevant concepts and application background of the embodiments are given.

[0028] Discounts: These refer to the rights and benefits offered by merchants and e-commerce platforms to users (i.e., consumers), allowing users to enjoy discounted prices when purchasing goods or services. Merchants and e-commerce platforms offer various types of discounts, including but not limited to any of the following coupons / vouchers / red envelopes: platform-wide coupons, category-specific coupons, store coupons, shipping coupons, vouchers, and minimum order discount coupons (e.g., some discounts require a minimum order amount to be applied). They can also include: membership benefits offered by merchants or platforms, promotional benefits, and coupons redeemed with user points. In the following text, "coupon," "discount," and "rights" all refer to "discount." Merchants can customize the order in which coupons are applied.

[0029] SaaS stands for Software as a Service, a cloud-based service that delivers software applications on demand via the internet. SaaS tenants do not need to install or maintain the software; they simply use the service through a browser or client. For example, in a SaaS-based restaurant service system, merchants, as SaaS tenants, can use the restaurant service application for, but are not limited to: ordering and payment management, membership and marketing management, menu management, and inventory and supply chain management. Ordering and payment management includes various ordering methods such as front desk ordering, QR code ordering, and mini-program ordering, as well as various payment methods such as credit card and mobile payment. Membership and marketing management includes providing users with various types of coupons and launching marketing campaigns. Menu management includes, but is not limited to, menu creation and editing. Inventory and supply chain management includes the inventory and procurement management of ingredients and materials. Merchants can also customize the order in which discounts are applied through the services provided by the SaaS-based restaurant service system.

[0030] Discount strength: refers to the discount amount (i.e., the discount value) that a user can enjoy when purchasing multiple products by using discounts. The maximum discount value that can be enjoyed is the maximum discount strength.

[0031] Optimal consultation: This refers to a user's request to determine the maximum discount they can enjoy when purchasing multiple items, based on the merchant's discounts and the user's exclusive discount rules. Specified optimal consultation refers to the consultation where the specified discounts must be applied.

[0032] Currently, merchants and e-commerce platforms offer various types of discounts to users (i.e. consumers). Different types of discounts may be applied to different users, and merchants may also customize the order in which discounts are applied, making the combination of discounts more complex.

[0033] To provide users with optimal discounts in scenarios involving combined offers, this application provides a method for determining discount data. By leveraging the overlap and association relationships between discounts and product categories, the available discounts of an object are divided into multiple smaller groups. Available discounts can be understood as a set, and a group as a subset of that set. Recommended discount data is derived based on the results from each group, increasing user willingness to place orders and improving conversion rates. Furthermore, pruning based on each subset reduces the number of group calculations, thereby improving the speed of combining recommended discount data and increasing order efficiency.

[0034] It is understood that the method for determining discount data can be applied to applications corresponding to any scenario of discount combination usage, including but not limited to e-commerce systems, SaaS-based catering systems, etc. Each link in the shopping guide chain can trigger the invocation of the method to obtain recommended discount data. The method for determining discount data can run on any device capable of obtaining object information and available discount information and possessing computing power. This device includes, but is not limited to, independent physical servers, server clusters or distributed systems, cloud servers providing various computing / storage capabilities, artificial intelligence platforms, and other server-side electronic devices. The device can also include POS machines, smartphones, desktop computers, laptops, tablets, smart home devices, and any combination of the aforementioned devices. This application does not impose specific limitations.

[0035] It should be noted that the information disclosed above is only for the purpose of helping to understand this application, and does not mean that it constitutes prior art known to those skilled in the art, nor does it constitute a specific limitation on the methods provided in the embodiments of this application.

[0036] Example 1 The first embodiment of this application provides a method for determining discount data, which is described below in conjunction with... Figures 1 to 6 The method for determining the discount data is explained. Figure 1 The method for determining the discount data shown includes steps S101 to S104.

[0037] Step S101: Obtain object information of at least one object and discount information of at least one available discount corresponding to the object.

[0038] Specifically, the term "object" refers to goods or services that a user can purchase from a merchant. For clarity, "goods" may also be used to refer to an object below. The at least one object is an object selected by the user; it can be an object added to the shopping cart, an object added to the shopping cart and currently selected, or an object selected by the user and awaiting addition to the shopping cart. The available discount refers to a discount applicable to any number of the at least one object.

[0039] The process of obtaining object information for at least one object and discount information for at least one available discount corresponding to the object includes: receiving an optimal consultation request for requesting combined discount data; parsing the object information and user information from the optimal consultation request; querying the user's exclusive discount based on the user information; and querying available discounts provided by merchants and / or platforms based on the object information. The optimal consultation request may be sent by a device requesting recommended discount data in response to a trigger operation on a discount recommendation control or in response to an object addition or deletion operation. Alternatively, the optimal consultation request may directly carry the discount information of the available discounts. For example, in a restaurant mini-program, after adding items to the shopping cart, the user triggers a discount recommendation control similar to "one-click coupon recommendation" and sends the optimal consultation request, thereby facilitating faster checkout.

[0040] Step S102: Determine the discount overlap grouping of the available discounts based on the discount overlap relationship between the available discounts, and determine the discount circle grouping of the object based on the circle association relationship between the available discounts.

[0041] The aforementioned discount exclusivity relationship refers to any of the following possible exclusivity relationships between different discounts: overlapping, shared, and not shared. This exclusivity relationship is based on discount usage rules, which include constraints on discount usage and may also include the order in which discounts apply as specified by the merchant or platform. Discount usage rules can include pre-restrictions and post-restrictions. For example, a pre-restriction might be a requirement that the order amount must reach a certain threshold to use the discount. Another example is a post-restriction that prevents the full use of the discount due to limitations on discount usage, such as a user having two cake vouchers, but the merchant restricts the use of only one voucher per order, preventing the full use of both vouchers.

[0042] The term "overlapping relationship" refers to the fact that the same product can enjoy two or more discounts simultaneously. For example, if a serving of spicy chicken can enjoy promotional discount A and then use voucher B for further discount, then discount A and discount B have an overlapping relationship.

[0043] The term "sharing relationship" refers to the fact that an order can enjoy two or more discounts simultaneously, but these two or more discounts cannot be enjoyed on the same item in the order at the same time. For example, an order contains multiple items and can enjoy both promotional discount A and voucher B at the same time. However, if a serving of spicy chicken in the order can use discount A but cannot use discount B, then discount A and discount B have a sharing relationship.

[0044] In this context, "non-compete relationship" means that an order can only enjoy one type of discount, and cannot enjoy two or more discounts simultaneously. For example, if an order enjoys the member price, it cannot use any other discounts; therefore, there is a non-compete relationship between the member price discount and other discounts.

[0045] In practice, in SaaS-based catering businesses, merchants can customize the order in which discounts apply, and both merchants and the platform may set up promotional activities and offer various types of discounts, making the overlapping relationships between discounts more complex. The obtained discount information includes overlapping attribute information configured for the available discounts and product selection information (i.e., the range of selected products), used to determine the overlapping relationship of discounts. For example, when a promotional activity is set to be shared or stacked, the corresponding coupon must also be set to be shared or stacked to be shared or stacked. If either is not shared or stacked, they cannot be shared or stacked. Another example is when both promotional activities and coupons are set to be shared; different products within the same order can use the promotional activity and the coupon separately, but products in the same order cannot use both promotional activities and coupons simultaneously. Yet another example of sharing: if a promotional activity selects products A and B, and a coupon selects products B and C, and when products A and C are added to the order, there are no products in the order that can be used with both the promotional activity and the coupon. Therefore, product A can use the promotional activity, and product C can use the coupon; the promotional activity and the coupon can be shared. Another example of non-sharing: If a promotion selects products A and B, and a coupon selects products B and C, when adding products A and B to the cart, product B in the order can use both the promotion and the coupon. However, if product B can only use either the promotion or the coupon, then the promotion and the coupon cannot be shared simultaneously. Another example: If one of the two offers is set to be non-sharing, only one of the promotion or the coupon can be used within the same order. For instance: If a promotion selects products A and B, and a coupon selects products B and C, when adding products A and C to the cart, product A can use the promotion, and product C can use the coupon, but only one of the promotion or the coupon can be used in the entire order. In this case, the promotion and the coupon cannot be shared simultaneously. For example, when both promotional activities and coupons are set to be used together, they can be used in the same order. One example: if the promotional activity selects products A and B, and the coupon selects products B and C, and when products A and C are added to the order, there are no products in the order where both the promotional activity and the coupon can be used together. Therefore, product A can use the promotional activity, and product C can use the coupon; thus, the promotional activity and the coupon can be used together. Another example: if the promotional activity selects all products, and the coupon selects all products, and products A and B are added to the order, both products can use both the promotional activity and the coupon; therefore, products A and B can use both the promotional activity and the coupon together.

[0046] This step involves grouping the available offers into subsets based on different dimensions. The overlapping offer grouping and the offer circle grouping can be understood as subsets obtained by grouping the available offers into different dimensions.

[0047] Specifically, the aforementioned discount exclusion group is a first type of discount group generated based on the discount exclusion relationship between the available discounts. A discount exclusion group can be understood as a subset obtained from the available discount groups in terms of the exclusion relationship dimension. The discount exclusion groups can have mutual exclusive relationships. The so-called exclusive relationship refers to exclusivity at the order level; if a discount exclusion group is applied to an order, then other discount exclusion groups cannot be applied to that order.

[0048] Please refer to Figure 2A The diagram illustrates an example of overlapping discount relationships and their corresponding overlapping discount groups, including discounts A, B, C, D, and E. Discounts A and D cannot be shared, and discounts B and E cannot be shared. Other overlapping discount relationships are either combined or shared. This generates four groups of overlapping discount groups. The first group in the diagram includes discounts A1, B1, and C1, indicating that the first group includes discounts A, B, and C. The second group includes discounts B, C, and D, and the third and fourth groups are represented by discounts B2, C2, and D2, respectively.

[0049] Preferably, each available offer can be processed using a step-by-step traversal method to generate an offer overlap group. Specifically, the available offers are generated based on an offer template; correspondingly, determining the offer overlap group based on the offer overlap relationship between the available offers includes: sorting the available offers according to the offer template identifier corresponding to each available offer; using each available offer as a traversal starting point in turn, performing a step-by-step traversal for other available offers to generate the offer overlap group; wherein, the step-by-step traversal includes: determining the offer overlap relationship between the current traversal starting point and each of the other available offers in each round of traversal, and classifying available offers with overlapping relationships and / or sharing relationships into the same offer overlap group, and classifying available offers with different sharing relationships into different offer overlap groups. Further, the step-by-step traversal also includes: if it is determined that a traversal starting point has already been classified into a generated offer overlap group, then skipping the step-by-step traversal for that traversal starting point until the step-by-step traversal for each traversal starting point is completed. The generated offer overlap group is the maximum stackable / shared offer set, that is, a group can include as many stackable / shared offers as possible.

[0050] Please refer to Figure 2BThe diagram illustrates another example of overlapping discount relationships and corresponding overlapping discount groups. In this example, there are six available discounts: A, B, C, D, E, and F. Discounts A and B cannot be shared, A and D cannot be shared, B and E cannot be shared, and B and F cannot be shared. Other discounts are either superimposed or shared. The overlapping discount groups are generated using the aforementioned stepwise traversal method, resulting in discount set S1 (including discounts A, C, E, and F, labeled A1, C1, E1, and F1 respectively) and discount set S2 (including discounts B, C, and D, labeled B2, C2, and D2 respectively). The process of generating these overlapping discount groups includes the following steps: Step 1: Sort the discount templates by their IDs to obtain the discount set S = [Discount A, Discount B, Discount C, Discount D, Discount E, Discount F]. If the discount templates are the same, use the same template number. Step 2: Take each offer as the starting point and iterate step by step to obtain the maximum stacking / sharing group. If the starting point of the traversal is already included in the offer set generated in the previous traversal, skip the current traversal. Starting with "Discount A", traverse the set to obtain the maximum stacked / shared discount set S1 = [Discount A, Discount C, Discount E, Discount F]; Starting with "Discount B", traverse the system to obtain the maximum stacked / shared discount set of S2 = [Discount B, Discount C, Discount D]; Starting with "Discount C", skip this iteration since "Discount C" exists in discount set S1. Starting with "Discount D", skip this iteration since "Discount D" exists in discount set S2. Starting with "Discount E", skip this iteration since "Discount E" exists in discount set S1. Starting with "Discount F", skip this iteration since "Discount F" exists in the discount set S1. The final maximum stacked / shared discount sets are: discount set S1 (including discounts A, C, E, and F) and discount set S2 (including discounts B, C, and D).

[0051] In practice, a maximal clique search algorithm can be used to achieve a similar preferential overlapping group generation step as described above.

[0052] Specifically, the "circle-product association relationship" refers to the association between available discounts that overlap within the applicable object range. The applicable object range refers to the scope of objects corresponding to a discount's circle-product rule; it can be understood as the range of objects to which a discount can be applied. For example, a voucher can only be used for food items, not beverages. Overlapping objects refer to situations where two or more discounts can be used when ordering a single item; these discounts are considered to have overlapping objects. For example, discount A applies to products a and b, and discount B applies to products a and c. Since discounts A and B overlap in using product a, discounts A and B have a circle-product association relationship.

[0053] The aforementioned discount product grouping is a second type of discount grouping generated based on the product association relationship between the available discounts.

[0054] In implementation, discount grouping can be calculated based on the available discount circle lines. A circle line can be a numerical value representing the range of objects that an available discount can encompass. Specifically, determining the discount grouping of an object based on the circle association relationship between available discounts includes: identifying each of the at least one object using an object sequence number; for each available discount, generating a binary code based on the object sequence number within the applicable object range of the available discount, serving as the circle line of the available discount; a circle line of an available discount is used to represent the applicable object range of the available discount; determining the circle association relationship between each available discount and other available discounts using a tiered cyclic method; wherein, in one round of calculation using the tiered cyclic method, the circle line of the current available discount is sequentially ANDed with the circle lines of other available discounts; if the AND operation result is greater than 1, it is determined that there is a circle association relationship between the current available discount and other available discounts, and each intermediate result in this round of calculation is saved, the intermediate result including information on available discounts with circle association relationships; the discount grouping is formed based on the intermediate results of each round of calculation. Here, "AND operation" refers to bitwise AND.

[0055] Please refer to Figure 3 The diagram illustrates an example of a product circle association and its corresponding discount product circle grouping, including six available discounts: A, B, C, D, E, and F. The applicable target ranges for each discount from A to F are: product 1 and product 2, product 3, product 3 and product 4, product 5, product 4, and product 4 and product 5, respectively. Using the aforementioned method of calculating discount product circle groups based on product circle lines, discount product circle grouping sets P1 and P2 are generated, where P1 includes discount A; P2 includes discounts B, C, D, E, and F. The specific steps for generating discount product circle grouping sets P1 and P2 include: Step 1: Sort by product number, such as product 1 number 1, product 2 number 2; Step 2: Discount Circle Line = Binary value formed by the product serial number of the selected product for the discount; If the products in the discount A circle are numbered 1 and 2, where the binary line of 1 is 0001 and the binary line of 2 is 0010, then the binary value of the product line of product A is 0011=3. That is, each bit of the binary value of the product line corresponds to one product. In order: The binary value of the discounted A-level product line is 00011 = 3 The binary value of the discounted B-circle product line is 00100 = 4 The binary value of the discounted C-circle product line is 01100 = 12 The binary value of the discounted D-circle product line is 10000 = 16 The binary value of the E-circle discount product line is 01000 = 8 The binary value of the discounted F-circle product line is 11000 = 24 Step 3: Tiered Looping. Perform a bitwise AND operation on the discount lines of each circle. If the result is greater than 1, there is an intersection of circles. This also includes the discount set obtained in the current loop. If the discount used as the starting point of the current loop already exists in a previous circle set, skip this loop. Calculate the discount for tiered circle A: Discount A is sequentially ANDed with the product lines of discounts B, C, D, E, and F to obtain the product discount set P1 = [Discount A]. Discount B is sequentially ANDed with the product lines of discounts C, D, E, and F to obtain the product discount set P2 = [discount B, discount C, discount D, discount E, discount F]. When calculating discounts B and E, since discounts B and C have already been included in the discount set P2, discount E needs to be compared with the circle lines of discounts B and C. Discount C is sequentially ANDed with discounts D, E, and F. Since discount C exists in discount set P2, this round of the loop is skipped. Discount D is ANDed with discounts E and F in turn. Since discount D exists in discount set P2, this round of the cycle is skipped. Discount E is ANDed with the discount lines of discount E and discount F in sequence. Since discount E exists in discount set P2, this round of the cycle is skipped. If offer F exists in offer set P2, skip this round of the loop; (if offer F does not exist in the previous offer set, it is treated as an independent offer set).

[0056] The above-mentioned tiered cyclical discount product steps can be implemented by constructing a graph of the intersection relationships between sets and using a disjoint-set data structure algorithm. The processing flow includes: Step 1), treat the applicable object range corresponding to each available offer as a set, and construct a graph showing the intersection of these sets: Initialize a graph, where each set is a node in the graph; For each pair of sets such as (A, B), check if there is common metadata (i.e., A ∩ B ≠ 0). Whether it holds true, that is, whether the intersection is empty); If they share metadata, add an edge between A and B; Step 2), find the connected components in the intersection graph: Use the Disjoint Set Union (DSU) algorithm to find all connected components in the graph. Each connected component corresponds to a group. Specifically, the set in each connected component constitutes a discount group, and the discount group is output.

[0057] In this embodiment, the discount product grouping is the minimum product grouping. This means that a minimum product grouping covers as many available discounts as possible that have product-related relationships. These product-related relationships can be direct or indirect. A direct relationship means that two available discount products overlap, while an indirect relationship means that each of two available discounts has a direct relationship with the same other available discount, thus creating a certain association between the two available discounts.

[0058] Step S103: Determine the discount independent calculation group based on the discount overlap group and the discount circle group.

[0059] In this embodiment, there is a contextual relationship between the discount overlap relationship and the product circle association relationship. For example, for the stacking relationship, discounts can be accumulated between the same product circle; for the sharing relationship, the same product circle can only be used by one discount. An independently computable intersection group can be determined based on the discount overlap group and the discount product circle group, serving as the discount independent calculation group. Specifically, determining the discount independent calculation group based on the discount overlap group and the discount product circle group includes: for each discount product circle group, splitting the discount product circle group under the discount overlap group to form an intersection group, with each intersection group being one discount independent calculation group.

[0060] Furthermore, intersection groups can be formed by splitting the discount set lines of each group (discount overlapping group / discount circle group). Specifically, splitting the discount circle group under the discount overlapping group to form intersection groups includes: identifying each available discount by discount serial number; generating binary codes based on the discount serial numbers of the available discounts included in each discount overlapping group and discount circle group, as discount set lines representing the corresponding discount overlapping group or discount circle group; and performing a bitwise AND operation between the discount set line of each discount circle group and the discount set line of each discount overlapping group to obtain one or more subsets, which are then used as the intersection groups.

[0061] Please refer to Figure 4 The diagram shows a schematic of the independent calculation group for discounts, which is based on Figure 2B The overlapping grouped offer sets S1 and S2 shown are as follows: Figure 3 The discount set P2 and P2S2 shown are further subdivided into three independent discount subsets: P1S1 (including discount A), P2S1 (including discounts C1, E, and F), and P2S2 (including discounts B, C2, and D). The steps for forming these independent discount calculation groups include: Step 1: Encode the overlapping discount sets corresponding to the overlapping discount groups and the circle discount sets corresponding to the circle discount groups according to the binary discount sequence number to obtain the discount set line for each discount set. In the example, if the serial numbers of discounts A through E are 1 through 6 respectively, then: The discount set line of discount set S1 is 110101=53 The discount set line for discount set S2 is 001110 = 14 The discount set line of discount set P1 is 000001 = 1 The discount set line of discount set P2 is 111110 = 62 Step 2: Perform a bitwise AND operation (AND) between the circle of discounts and the overlapping discounts in sequence to obtain N subsets. Record the resulting subsets and their distribution in the overlapping / shared groups. Specifically, for the product discount set P1, AND operations are performed with the overlapping discount sets S1 and S2, as follows: Discount set P1S1 = Discount set P1 & Discount set S1 = 000001 & 110101 = 000001; Discount set P1S2 = Discount set P1 & Discount set S2 = 000001 & 001110 = 000000; Specifically, for the circle-based discount set P2, AND operations are performed with the overlapping discount sets S1 and S2 respectively: Discount set P2S1 = Discount set P2 & Discount set S1 = 111110 & 110101 = 110100; Discount set P2S2 = Discount set P2 & Discount set S2 = 111110 & 001110 = 001110.

[0062] Step S104: Determine recommended discount data for the at least one object based on the discount independent calculation group, wherein the recommended discount data is combined discount data generated based on the available discounts.

[0063] In this example, the recommended discount data is determined by constructing a discount computation tree, and this recommended discount data is combined discount data. Specifically, determining the recommended discount data for the at least one object based on the discount independent computation groups includes: constructing a discount computation tree based on the discount independent computation groups; and using the calculation result of the discount computation tree as the recommended discount data. Each node of the discount computation tree represents a discount selection operation performed on each element of two discount independent computation groups. The discount selection operation includes: performing an exclusive maximum value operation on elements from the same discount overlapping group, and performing a multi-element selection operation on elements from different discount overlapping groups.

[0064] Furthermore, the method further includes: obtaining a specified discount from the available discounts before determining the recommended discount data for the at least one object based on the discount independent calculation group; the step of determining the recommended discount data for the at least one object based on the discount independent calculation group includes: in the discount selection operation of each node of the discount calculation tree, directly selecting the set containing the specified discount as the operation result of the corresponding node.

[0065] Please refer to Figure 5 The diagram illustrates an example of an independent discount calculation group and a discount calculation tree built upon it. The independent discount calculation group comprises four subgroups: Group 1, Group 2, Group 3, and Group 4. Discount set S1 is calculated based on Group 2 and Group 3; S2 is calculated based on S1 and Group 1; and the discount set with the largest discount amount, based on discount sets S3 and S2, is the recommended discount data, which is also the optimal consultation result. If a specific optimal consultation needs to be achieved, the selection of the discount set can be directly chosen to include the specified discount. For example, to select the optimal consultation under discount E, when choosing between Group 2 and Group 3, Group 3 should be selected directly, regardless of whether the discount in Group 2 is greater than that in Group 3.

[0066] Furthermore, a branch and bound algorithm can be used to construct the discount calculation tree, specifically including: if the number of independent discount calculation groups is less than a third threshold, then the branch and bound algorithm is used to implement the discount calculation tree; the branch and bound algorithm includes: Add the root node to the priority queue, where the root node is the discount independent calculation group with the highest weight; If the priority queue is not empty, then the node N with the smallest weight is taken out from the queue; For all child nodes of node N, the following steps are taken: If the available discounts of the child node can belong to the same stacking and sharing group, and the child node is a better solution, then the global optimal solution of the discount calculation tree is updated using the child node, and the child node is added to the priority queue for comparison with other discount independent calculation groups; otherwise, the child node is pruned. The nodes in the priority queue are processed in a loop until the priority queue is empty, and the global optimal solution of the discount calculation tree is obtained as the recommended discount data.

[0067] Nodes include independently calculated groups of discounts and / or subsets of discounts generated during the calculation process that represent better solutions. The weights of nodes or sub-nodes can be determined based on the discount level corresponding to each node or sub-node.

[0068] Please refer to Figure 6 The diagram shows a flowchart of an example preferential computation tree algorithm, which uses the branch and bound algorithm, including: S601, Initialize the priority queue. The priority queue uses a min-heap as its data structure. A min-heap is a special type of complete binary tree where the value of each parent node is less than or equal to the value of its child nodes, and the smallest element is always removed first. S602, Add the root node to the priority queue. Initially, select the preferential independent calculation group with the largest weight as the root node.

[0069] S603: Check if the priority queue is empty. If it is empty, jump to S612 to end. Otherwise, execute S604 sequentially.

[0070] S604, retrieve the node with the smallest weight from the priority queue. This node includes: the initial independent discount calculation group, and the better solutions generated during intermediate calculations. The better solution is a type of process data, essentially a subset of discounts.

[0071] S605 expands all child nodes of this node.

[0072] S606, obtain the weight of each child node.

[0073] S607, check if the child node satisfies the constraint: all participating offer elements (i.e., all available offers contained in this child node) are in the same maximum stacking and sharing group. Specifically, this is determined by querying a two-dimensional conflict graph to determine whether the offer overlap groups to which the available offers contained in the child node belong can be stacked and / or shared. The two-dimensional conflict graph is used to record the stacking and / or sharing relationships between offer overlap groups. If yes, proceed to S608; if no, proceed to S610, pruning the child node.

[0074] S608: If the child node is a better solution, then use that better solution to update the global optimal solution. The global optimal solution is the combination of offers that currently provides the best offer data.

[0075] S609, add the child node to the priority queue.

[0076] S611: After adding the child node to the priority queue or pruning the child node, determine if there are any unprocessed child nodes. If not, return to S603. If yes, return to S606.

[0077] S612, continue until the priority queue is empty, output the globally optimal solution, and end. The output optimal solution is the recommended discount data that provides the best discount data. In this embodiment, for each discount independent calculation group, the optimal discount set within the group is determined, which is the locally optimal discount. Then, based on the locally optimal discount, the globally optimal discount is determined through the discount calculation tree, which serves as the recommended discount data. Specifically, for each discount independent calculation group, a target algorithm is selected based on the number of all available discounts in the discount independent calculation group. The target algorithm is used to determine the optimal discount set within the group for the discount independent calculation group. Wherein, if the number of discounts is less than a first threshold, the target algorithm is the longest link pruning algorithm; if the number of discounts is greater than the first threshold but less than a second threshold, the target algorithm is the group weight pruning algorithm; if the number of discounts is greater than the second threshold, the local recommended discount algorithm is the group heuristic weight greedy algorithm.

[0078] The longest link pruning algorithm for grouped discounts includes: dividing the available discounts in the discount independent calculation group into multiple independent calculation units according to the discount rules; generating all possible paths for the independent calculation units and sorting them according to path length; iteratively calculating the combined discount data of available discounts for each path; in each calculation, pruning the same-track paths and / or unreachable paths in the remaining computable paths based on the result path of the previous calculation; and updating the current combined discount data if the combined discount data on the result path obtained in this calculation is greater than the current combined discount data; until the available discounts of all paths are calculated, the current combined discount data is taken as the optimal discount set within the group. For example, if the current calculation path is 1->2->3->4->5 and the result path is 1->2->5, then paths 1, 1->2, and 1->2->5 can be pruned, reflecting same-track path pruning. As another example, if the current calculation path is 1->2->3->4->5 and the result path is 1->2->5, then paths 1->2->3 and 1->2->4 are not accessible, and paths containing these paths may be removed, reflecting unreachable path pruning.

[0079] The group weight pruning algorithm includes: dividing the available discounts in the discount independent calculation group into multiple independent calculation units according to the discount rules; wherein, a specified discount is divided into an independent calculation unit; determining the weight of each independent calculation unit; generating all possible paths for the independent calculation unit and sorting the paths; determining the maximum and minimum possible weights of the current path; selecting the independent node with the maximum weight to start cyclically calculating the combined discount data and weight value of the available discounts for each path; wherein the independent node is an independent calculation unit that includes only one available discount; pruning all possible paths whose maximum possible weight is less than the weight of the currently selected path; if the weight of the currently selected path is greater than the weight of the selected path, then the currently selected path is taken as the optimal path for generating the optimal discount set within the group. The maximum and minimum possible weights of the current path satisfy the condition min(f(a),f(b))<=f(a+b)<=f(a)+fa(b), where f(x) is the weight of x, that is, the maximum possible weight of the current group is the sum of f(x)+f(...), and the minimum possible weight is min(f(x),f(...)). Additionally, if a mandatory group exists due to a specified discount, then f(x) is f(x+must), and if the results of calculating f(x+must) do not fully include the mandatory group, the current group's combination is discarded. The path sorting includes sorting all paths according to certain rules: if no mandatory group exists, they are sorted in descending order of maximum possible weight; if a mandatory group exists, they are sorted by a combination of path length from longest to shortest and maximum possible weight from largest to smallest. Initially, the independent node with the highest weight (i.e., the group with only one node) is selected by default. Initial pruning removes all possible paths with a maximum possible weight less than the currently selected weight. The discount for each path is calculated iteratively, including: calculating the weight value; pruning; and selecting the result. Furthermore, the pruning includes pruning paths on the same track and pruning unreachable paths. Furthermore, the result selection includes: if the current weight value is greater than the selected weight value, then the current path is taken as the optimal result; if the current weight value is less than or equal to the selected weight value, then the current path is ignored; the current optimal result is returned as the maximum discount in the combination, which is used as the recommended discount data.

[0080] The grouped heuristic weighted greedy algorithm includes: dividing the available discounts in the discount independent calculation group into multiple independent calculation units according to the discount rules; determining the weight of each independent calculation unit and sorting the independent calculation units in descending order according to the weight; selecting an independent calculation unit from the independent calculation units, and sequentially traversing each other independent calculation unit and comparing its weight with the currently selected independent calculation unit; if the comparison result is that the weight is greater than the weight of the currently selected independent calculation unit, then merging the other independent calculation unit into the currently selected independent calculation unit; and so on, until the traversal is completed, and the obtained currently selected independent calculation units are taken as the optimal discount set within the group.

[0081] Experiments revealed that the problem to be solved by combining discounts within a group is that, given a set of known discounts, one discount can be selected independently, and several discounts can be combined, but the goal is always to obtain the maximum discount after any combination within the group. A better solution is as follows: If a group contains 1 to 5 offers, the longest link pruning algorithm is used, with a pruning rate of at least 33%, which can obtain the absolutely optimal recommended offer data. The pruning rate is higher in scenarios with a small number of offers. If a group contains 6 to 10 offers, a group weighted pruning algorithm is used, with a maximum pruning rate of over 95%, which can obtain the absolutely optimal recommended offer data. The pruning rate is high when the number of offers reaches a certain level. If a group contains 11 to x discounts, a grouped heuristic weighted greedy algorithm is used. This algorithm has a time complexity of O(n) and can obtain the probabilistically optimal recommended discount data. It has low time complexity and is suitable for calculating the optimal recommended discount data in large-scale discount scenarios. For example, in the case of 100 independent discounts, the result of the recommended discount data can be obtained by processing 200 times.

[0082] Taking 10 dishes and 10 discounts as an example: In the discount overlap grouping process, all possibilities will be traversed, but some invalid discounts can be filtered out in the pre-filter, reducing the number of discounts participating in the overlap processing. If it is split into 3, 5, and 2 subsets, it becomes 7 + 31 + 3 = 41 combinations, greatly reducing the number of calculations.

[0083] The method presented in this embodiment uses two limiting dimensions—exclusivity and product association—to divide all eligible discount sets into several smaller sets. The optimal solution for each smaller set is calculated, and finally, the overall optimal solution is selected based on the optimal solution of each set, thus reducing the possible set of overall optimal solutions. The approach to decomposing exclusivity relationships involves discount exclusivity grouping, which is the maximum stackable group, meaning that discounts not in the same group cannot be selected simultaneously, thus addressing the maximum boundary of the discount set. The approach to decomposing minimum associated product associations involves discount product association grouping, where discounts without product conflicts can be calculated independently. The maximum computable group is obtained by intersecting the discount exclusivity grouping and the discount product association grouping, further reducing the number of elements in the stackable discount set, decreasing the number of local optimum calculations, and quickly calculating local optimum results. After obtaining the list of local optima, the global optimum is the optimal solution for any combination under the maximum stackable set.

[0084] It should be noted that, unless otherwise specified, the features given in this embodiment and other embodiments of this application can be combined with each other, and steps S101 and S102 or similar terms do not limit the steps to be performed in a specific order.

[0085] The method provided in this embodiment has been described above. This method determines independent discount calculation groups based on discount overlap grouping and discount product grouping; and determines recommended discount data for the at least one object based on the independent discount calculation groups. The recommended discount data is combined discount data generated based on the available discounts. By splitting multiple available discounts into several discount overlap groupings based on discount overlap relationships and forming discount product groupings based on product association relationships, and then obtaining independent discount calculation groups based on these, a smaller set of independently calculated best discounts can be formed, minimizing the number of discount combinations. This improves the processing speed and performance of combined discount data in complex discount combination usage scenarios, quickly recommending combined discount data to users, allowing users to enjoy better discounts through simple steps.

[0086] Example 2 Based on the above embodiments, this embodiment also provides a method for requesting discount data. The following is in conjunction with... Figure 7 The method for requesting discount data will be described below. For the relevant technical features and effects, please refer to the corresponding descriptions in the above embodiments. Figure 7 The method for requesting discount data shown includes steps S701 to S702.

[0087] Step S701: In response to a trigger operation on the discount recommendation control or an operation to add or delete objects, send an optimal consultation request to request combined discount data; the optimal consultation request carries object information and user information. Step S702: Receive the combined discount data in response to the optimal consultation request; the combined discount data is determined based on the aforementioned method for determining discount data.

[0088] It is understood that the method for requesting discount data can be applied to both the merchant's first client and the user's second client. A client can refer to an application, a mini-program, or a webpage of an application, or it can refer to a terminal device running the aforementioned application; the client can interact with the user via a display screen. The merchant's first client runs on a computing-capable terminal device on the store side, which can be, but is not limited to, any form of device such as a POS machine, mobile phone, or desktop computer. The user's second client runs on a computing-capable terminal device on the user side, which can be, but is not limited to, any form of computing device such as a mobile phone, PAD, desktop computer, or smart home device. Both the first and second clients have the function of providing a shopping guide link to help users select products. At some key stages of the shopping guide link (such as product browsing and selection, adding to cart, order placement, and checkout), a request can be sent to the device implementing the method for determining discount data to obtain recommended discount data.

[0089] Specifically, the first or second client displays a shopping guide page in the shopping guide chain of the catering system. This shopping guide page includes any of the following pages: shopping cart page, order page, and checkout page. The catering system is a SaaS-based catering system. The discount recommendation control is displayed on the shopping guide page. The shopping guide page corresponds to each stage of the shopping guide chain. Of course, user operations can also be detected on each shopping guide page. If an operation is performed to add or delete a product (adding or deleting a selected product), in response to the detected operation, a new optimal consultation request is generated for the currently selected product and sent. The product browsing page corresponding to the product browsing and selection stage can also provide a product selection control, accepting the selection (i.e., adding) or deselection (i.e., deleting) of a product, and can also provide a discount recommendation control similar to "one-click discount recommendation".

[0090] This concludes the description of the method for requesting discount data provided in this embodiment. In response to a trigger operation on a discount recommendation control or an operation to add or delete objects, an optimal consultation request for requesting combined discount data is sent. The optimal consultation request carries object information and user information. Combined discount data is received in response to the optimal consultation request. This combined discount data is determined based on the method for determining discount data, thereby automatically calculating the best combined discount data for the object information, simplifying the use of discount information, and improving user experience.

[0091] Example 3 Corresponding to the method for determining discount data provided in Embodiment 1, this embodiment also provides an apparatus for determining discount data. The following is in conjunction with... Figure 8 The device will be described in detail below. For related technical features and effects, please refer to the description of the corresponding method. Figure 8 The apparatus for determining discount data shown includes: The data acquisition unit 801 is used to acquire object information of at least one object and discount information of at least one available discount corresponding to the object; The discount grouping unit 802 is used to determine the discount overlap grouping of the available discounts based on the discount overlap relationship between the available discounts, and to determine the discount circle grouping of the object based on the circle association relationship between the available discounts; Independent calculation group determination unit 803 is used to determine an independent calculation group for discounts based on the discount overlap grouping and the discount product grouping; The recommendation unit 804 is used to determine recommended discount data for the at least one object based on the discount independent calculation group, wherein the recommended discount data is combined discount data generated based on the available discounts.

[0092] Optionally, the independent calculation group determination unit 803 is specifically used to: for each discount product group, split the discount product group under the discount overlapping group to form an intersection group, and each intersection group is a discount independent calculation group.

[0093] Optionally, the independent calculation group determination unit 803 is specifically used to: identify each available offer by the offer sequence number; generate binary codes based on the offer sequence numbers of the available offers included in the offer overlap group and the offer circle group, respectively, as the offer set line representing the corresponding offer overlap group or offer circle group; and perform AND operation between the offer set line of each offer circle group and the offer set line of each offer overlap group in sequence to obtain one or more subsets, which are used as the intersection group.

[0094] Optionally, the recommendation unit 804 is specifically used for: constructing a discount calculation tree based on the discount independent calculation group; using the calculation result of the discount calculation tree as the recommended discount data; wherein each node of the discount calculation tree is a discount selection operation performed on each element of the two discount independent calculation groups; wherein the discount selection operation includes: performing an exclusive maximum value operation on elements from the same discount overlapping group, and performing a multi-element selection operation on elements from different discount overlapping groups.

[0095] Optionally, the recommendation unit 804 is specifically used to: obtain a specified discount from the available discounts before determining the recommended discount data for the at least one object according to the discount independent calculation group; and directly select the set containing the specified discount as the calculation result of the corresponding node in the discount selection operation of each node of the discount calculation tree.

[0096] Optionally, the available offers are generated based on an offer template; the offer grouping unit 802 is specifically used to: sort the available offers according to the offer template identifier corresponding to the available offers; take each available offer as a traversal starting point in turn, and perform a step traversal for other available offers to generate the offer overlap group; wherein, the step traversal includes: determining the offer overlap relationship between the current traversal starting point and each of the other available offers in each round of traversal, and classifying available offers with overlapping relationships and / or sharing relationships into the same offer overlap group, and classifying available offers with different sharing relationships into different offer overlap groups.

[0097] Optionally, the step traversal further includes: if it is determined that a traversal starting point has been classified into the generated preferential overlapping group, then skip performing step traversal for the traversal starting point until the step traversal for each traversal starting point is completed.

[0098] Optionally, the discount grouping unit 802 is specifically used for: identifying each of the at least one objects by object serial number; for each available discount, generating a binary code based on the object serial number within the applicable object range of the available discount, as the circle line of the available discount; a circle line of available discount is used to characterize the applicable object range of the available discount; determining the circle association relationship between each available discount and other available discounts through a step-by-step cyclic method based on the circle lines of each available discount; wherein, in one round of calculation of the step-by-step cyclic method, the circle line of the current available discount is sequentially ANDed with the circle lines of other available discounts, and if the result of the AND operation is greater than 1, it is determined that there is a circle association relationship between the current available discount and other available discounts, and each intermediate result in this round of calculation is saved, the intermediate result including information on available discounts with circle association relationships; and forming the discount circle grouping based on the intermediate results of each round of calculation.

[0099] Optionally, the recommendation unit 804 is further configured to: for each discount independent calculation group, select a target algorithm based on the total number of available discounts in the discount independent calculation group, wherein the target algorithm is used to determine the optimal discount set within the group; wherein, if the number of discounts is less than a first threshold, the target algorithm is a group longest link pruning algorithm; if the number of discounts is greater than the first threshold but less than a second threshold, the target algorithm is a group weight pruning algorithm; if the number of discounts is greater than the second threshold, the local recommendation discount algorithm is a group heuristic weight greedy algorithm.

[0100] Optionally, the longest link pruning algorithm includes: dividing the available discounts in the discount independent calculation group into multiple independent calculation units according to the discount rules; generating all possible paths for the independent calculation units and sorting them according to path length; iteratively calculating the combined discount data of available discounts for each path; in each calculation, pruning the same-track paths and / or unreachable paths in the remaining computable paths based on the result path of the previous calculation; and updating the current combined discount data if the combined discount data on the result path obtained in this calculation is greater than the current combined discount data; until the available discounts of all paths are calculated, the current combined discount data is taken as the optimal discount set within the group.

[0101] Optionally, the group weight pruning algorithm includes: dividing the available discounts in the discount independent calculation group into multiple independent calculation units according to the discount rules; wherein, a specified discount is divided into an independent calculation unit; determining the weight of each independent calculation unit; generating all possible paths for the independent calculation unit and sorting the paths; determining the maximum and minimum possible weights of the current path; selecting the independent node with the maximum weight to start cyclically calculating the combined discount data and weight value of the available discounts for each path; wherein the independent node is an independent calculation unit that includes only one available discount; pruning all possible paths whose maximum possible weight is less than the weight of the currently selected path; if the weight of the currently selected path is greater than the weight of the selected path, then the currently selected path is taken as the optimal path for generating the optimal discount set within the group.

[0102] Optionally, a grouped heuristic weighted greedy algorithm includes: dividing the available discounts in the discount independent calculation group into multiple independent calculation units according to the discount rules; determining the weight of the independent calculation unit and sorting the independent calculation units in descending order according to the weight; selecting an independent calculation unit from the independent calculation units, and sequentially traversing each other independent calculation unit and comparing its weight with the currently selected independent calculation unit; if the comparison result is that the weight is greater than the weight of the currently selected independent calculation unit, then merging the other independent calculation unit into the currently selected independent calculation unit; and so on, until the traversal is completed, and the obtained currently selected independent calculation unit is the optimal discount set within the group.

[0103] Optionally, the recommendation unit 804 is further configured to: if the number of the independent discount calculation groups is less than a third threshold, then implement the discount calculation tree using a branch and bound algorithm; the branch and bound algorithm includes: adding the root node to a priority queue, wherein the root node is the independent discount calculation group with the largest weight; if the priority queue is not empty, then taking out the node N with the smallest weight from the queue; processing all child nodes of node N: if the available discounts of the child node can belong to the same stacking and sharing group, and the child node is a better solution, then using the child node to update the global optimal solution of the discount calculation tree, and adding the child node to the priority queue for comparison with other independent discount calculation groups; otherwise, pruning the child node; and so on, cyclically processing the nodes in the priority queue until the priority queue is empty, obtaining the global optimal solution of the discount calculation tree as the recommended discount data.

[0104] Optionally, the overlapping relationship of the offers includes any of the following relationships: superposition relationship, sharing relationship, and non-sharing relationship, and the overlapping groups of offers have a mutual exclusive relationship; the circle product association relationship refers to the association relationship between available offers of overlapping objects within the scope of applicable objects.

[0105] Based on the above embodiments, one embodiment of this application provides an electronic device; for relevant parts, please refer to the corresponding descriptions of the above embodiments. Figure 9 A schematic diagram of an electronic device is shown in the figure. The electronic device includes a memory and a processor. The memory is used to store computer instructions for data processing. When the computer instructions are read and executed by the processor, they execute the method provided in the embodiments of this application.

[0106] Based on the above embodiments, one embodiment of this application provides a computer-readable storage medium. For relevant details, please refer to the corresponding descriptions in the above embodiments. The schematic diagram of the computer-readable storage medium is similar to that of an electronic device, and the memory in the diagram can be understood as the computer-readable storage medium. The computer-readable storage medium stores computer instructions, which, when executed by a processor, are used to implement the method provided in the embodiments of this application.

[0107] It should be noted that the embodiments in this application may involve platform operation, order transactions, and other situations. In practical applications, the solutions described herein should be applied within the scope permitted by applicable laws and regulations of the country in which they are applied.

[0108] It should be noted that the embodiments of this application may involve the use of user data. In practical applications, user-specific personal data should be used in the scheme described herein within the scope permitted by applicable laws and regulations, provided that it complies with the applicable laws and regulations of the country in which it is located (e.g., with the user's explicit consent, and with the user being properly notified).

[0109] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, a network interface, and memory. Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0110] 1. Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include non-transitory computer-readable media, such as modulated data signals and carrier waves.

[0111] 2. Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0112] Although this application discloses preferred embodiments as described above, it is not intended to limit this application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of this application. Therefore, the scope of protection of this application should be determined by the scope defined in the claims of this application.

Claims

1. A method for determining discount data, characterized in that, include: Obtain object information for at least one object and discount information for at least one available discount corresponding to the object; The discount overlap grouping of the available discounts is determined based on the discount overlap relationship between the available discounts, and the discount circle grouping of the object is determined based on the circle association relationship between the available discounts; Determine an independent discount calculation group based on the overlapping discount grouping and the discount product grouping; Recommended offer data is determined for the at least one object based on the independent offer calculation group, and the recommended offer data is a combination of offer data generated based on the available offers.

2. The method according to claim 1, characterized in that, The step of determining the independent discount calculation group based on the overlapping discount grouping and the discount product grouping includes: For each discount product group, the discount product group is split into intersection groups under the discount overlap group, and each intersection group is a discount independent calculation group.

3. The method according to claim 2, characterized in that, The step of splitting the discounted product groups into overlapping groups under the overlapping discount groups to form intersection groups includes: Each available offer is identified by its offer number; Based on the discount sequence number of the available discounts included in the discount overlap group and the discount circle group respectively, a binary code is generated as a discount set line representing the corresponding discount overlap group or discount circle group; The discount set line of each discount circle group is sequentially ANDed with the discount set line of each discount overlapping group to obtain one or more subsets, which are used as the intersection group.

4. The method according to claim 1, characterized in that, The step of determining the recommended discount data for the at least one object based on the discount independent calculation group includes: Construct a discount calculation tree based on the aforementioned discount independent calculation group; The calculation result of the discount calculation tree is used as the recommended discount data; Each node of the discount calculation tree is a discount selection operation performed on each element of the two discount independent calculation groups; The preferential selection operation includes: performing an exclusive maximum value operation on elements from the same preferential overlapping group, and performing a multi-element selection operation on elements from different preferential overlapping groups.

5. The method according to claim 4, characterized in that, The method further includes: Before determining the recommended offer data for the at least one object based on the offer independent calculation group, a specific offer from the available offers is obtained; The step of determining the recommended discount data for the at least one object based on the discount independent calculation group includes: In the discount selection operation of each node in the discount calculation tree, the set containing the specified discount is directly selected as the operation result of the corresponding node.

6. The method according to claim 1, characterized in that, The available offers are generated based on the offer template; The step of determining the offer overlap grouping of the available offers based on the offer overlap relationship between the available offers includes: The available offers are sorted according to the offer template identifier corresponding to the available offers; Each available offer is used as the starting point for traversal, and a stepwise traversal is performed on other available offers to generate the offer overlap group; The stepwise traversal includes: determining the discount overlap relationship between the current traversal starting point and each of the other available discounts in each round of traversal, classifying available discounts with overlapping and / or sharing relationships into the same discount overlap group, and classifying available discounts with different sharing relationships into different discount overlap groups.

7. The method according to claim 6, characterized in that, The ladder traversal also includes: If a traversal starting point is determined to be classified into an already generated preferential overlapping group, then skip performing a step traversal for that traversal starting point until a step traversal is performed for each traversal starting point.

8. The method according to claim 1, characterized in that, The step of determining the discount grouping of the object based on the group association relationship between the available discounts includes: Each of the at least one objects is identified by its object number; For each available offer, a binary code is generated based on the object number within the applicable object range of the available offer, which serves as the circle line of the available offer; a circle line of an available offer is used to characterize the applicable object range of the available offer. The algorithm uses a tiered, iterative approach to determine the association between each available offer and other available offers based on their respective circle lines. In each round of calculation, the circle line of the current available offer is sequentially ANDed with the circle lines of other available offers. If the result of the AND operation is greater than 1, it is determined that there is a circle association between the current available offer and other available offers. Each intermediate result in this round of calculation is saved, and the intermediate result includes information about available offers with circle association relationships. The preferential product groups are formed based on the intermediate results of each round of calculations.

9. A method for requesting discount data, characterized in that, include: In response to a trigger operation on a discount recommendation control or in response to an operation to add or delete an object, an optimal consultation request is sent to request combined discount data; the optimal consultation request carries object information and user information; Receive the combined discount data in response to the optimal consultation request; The combined discount data is determined based on the method for determining discount data as described in any one of claims 1-8.

10. An apparatus for determining discount data, characterized in that, include: A data acquisition unit is used to acquire object information of at least one object and discount information of at least one available discount corresponding to the object; The discount grouping unit is used to determine the discount overlap grouping of the available discounts based on the discount overlap relationship between the available discounts, and to determine the discount circle grouping of the object based on the circle association relationship between the available discounts; An independent calculation group determination unit is used to determine an independent calculation group for discounts based on the discount overlap grouping and the discount product grouping. The recommendation unit is configured to determine recommended discount data for the at least one object based on the discount independent calculation group, wherein the recommended discount data is combined discount data generated based on the available discounts.