Combination product selection method, system and electronic device based on FP-growth algorithm
Patent Information
- Application Number
- CN202610877573.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-17
- Publication Date
- 2026-08-28
AI Technical Summary
[0003]本公开的目的在于提供基于FP-Growth算法的组合选品方法、系统及电子设备,通过挖掘用户历史购买行为中的频繁项集,智能推荐高关联商品组合,以解决现有选品策略主观性强、用户匹配度低的问题
[0037] The positive and progressive effects of this invention are as follows: This disclosure obtains all frequent itemsets that satisfy the minimum support threshold and the maximum combination length threshold through the FP-Growth algorithm model; it evaluates the relevance of each frequent itemset and selects target related combination products, thereby replacing purely manual experience-based product recommendations, avoiding erroneous product selection due to subjective misjudgment, making product selection decisions more scientific and objective, and effectively distinguishing between "real product associations" and "random co-occurrence of popular products," which can accurately uncover potential user needs and improve user experience and satisfaction.
Smart Images

Figure CN122656728A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer data processing, specifically to a combination selection method, system, and electronic equipment based on the FP-Growth algorithm. Background Technology
[0002] In e-commerce platforms, when a platform establishes a deep partnership with a supplier, it often acquires scarce inventory (such as concert tickets, fast passes, etc.). To increase revenue and drive user conversion, platforms frequently employ "bundled sales" strategies. However, traditional bundled product selection relies heavily on expert experience or gross margin calculations, lacking data analysis of users' historical purchasing habits. This approach may lead consumers to purchase premium packages simply because of scarce resources, but with low usage rates of bundled items, resulting in a negative experience. In the long run, this can damage the platform's reputation and user loyalty. Therefore, an intelligent product selection method based on historical transaction data is needed to scientifically quantify the correlation between products and generate bundled solutions that both meet needs and enhance the user experience. Summary of the Invention
[0003] The purpose of this disclosure is to provide a product selection method, system, and electronic device based on the FP-Growth algorithm. By mining frequent itemsets in users' historical purchasing behavior, it can intelligently recommend highly relevant product combinations to solve the problems of strong subjectivity and low user matching in existing product selection strategies.
[0004] The present invention solves the above-mentioned technical problems through the following technical solution:
[0005] Firstly, this disclosure provides a product selection method based on the FP-Growth algorithm, applied to tourism product combination recommendation, including the following steps:
[0006] Obtain historical travel order data, which includes multiple historical travel orders, and each historical travel order includes one or more product items;
[0007] The historical travel order data is preprocessed to group travel product items with the same attributes into the same preset travel product category, generating a shopping basket dataset;
[0008] Set a minimum support threshold and a maximum combination length threshold, where support represents the proportion of historical tourism orders for a certain tourism product category to the total number of historical tourism orders, the minimum support threshold represents the lowest proportion of historical tourism orders for a certain tourism product category to the total number of historical tourism orders, and the maximum combination length threshold represents the maximum number of tourism product categories that can be included in a combination of multiple tourism product categories.
[0009] Based on the minimum support threshold and the maximum combination length threshold, candidate frequent itemsets are obtained from the shopping basket dataset according to the FP-Growth algorithm;
[0010] A correlation assessment is performed on the tourism product combinations in the candidate frequent itemset, and a target tourism product combination is selected from the candidate frequent itemset.
[0011] Optionally, based on the minimum support threshold and the maximum combination length threshold, candidate frequent itemsets are obtained from the shopping basket dataset according to the FP-Growth algorithm, specifically including:
[0012] Scan the shopping basket dataset, calculate the frequency of each tourism product category in all historical tourism order data, and filter out tourism product categories in the shopping basket dataset that are less than the minimum support threshold to obtain a high-frequency dataset.
[0013] Scan the high-frequency dataset, sort the tourism product categories in the high-frequency dataset in descending order, and recursively construct a frequent pattern tree (FP-Tree) for tourism product combinations composed of multiple tourism product categories in the high-frequency dataset to obtain a candidate frequent itemset that satisfies the maximum combination length threshold.
[0014] Optionally, the preprocessing of the historical travel order data further includes:
[0015] If the frequency of occurrence of each product category in the historical travel orders of the product combination is less than the minimum support threshold, the historical travel orders are filtered.
[0016] Optionally, the preprocessing of the historical travel order data further includes:
[0017] If the number of occurrences of any tourism product category in the historical tourism orders of the tourism product combination is less than the minimum support threshold, the tourism product category is filtered.
[0018] Optionally, an association assessment is performed on the tourism product combinations in the candidate frequent items set, specifically including:
[0019] Calculate the confidence score of any combination of tourism products in the candidate frequent itemset, where the confidence score represents the ratio of the support for the co-occurrence of multiple tourism product categories in the frequent itemset to the support for the occurrence of any single tourism product category among the multiple tourism product categories.
[0020] The confidence level is compared with a preset confidence threshold, and tourism product combinations with a confidence level not lower than the preset confidence threshold are selected from the candidate frequent itemset to obtain the first candidate combination as the target tourism product combination.
[0021] Optionally, an association assessment is performed on the combination of items in the candidate frequent itemset, specifically including:
[0022] Calculate the confidence score of any combination of tourism products in the candidate frequent itemset, where the confidence score represents the ratio of the support for the co-occurrence of multiple tourism product categories in the frequent itemset to the support for the occurrence of any single tourism product category among the multiple tourism product categories.
[0023] The confidence level is compared with a preset confidence threshold, and tourism product combinations with a confidence level not lower than the preset confidence threshold are selected from the candidate frequent itemset to obtain the first candidate combination;
[0024] Obtain the confidence level of each tourism product combination in the first candidate combination;
[0025] Calculate the support of any tourism product category in the aforementioned tourism product mix across all historical tourism orders;
[0026] Based on the support and the confidence, the lift of the tourism product combination is obtained; the lift is used to represent the ratio of the confidence to the support.
[0027] The improvement degree is compared with a preset improvement degree threshold, and the combination with an improvement degree not lower than the preset improvement degree threshold is selected from the first candidate combination as the target tourism product combination.
[0028] Secondly, this disclosure provides a product selection system based on the FP-Growth algorithm, applied to tourism product combination recommendation, including:
[0029] The acquisition module is used to acquire historical travel order data, which includes multiple historical travel orders, and each historical travel order includes one or more travel product items;
[0030] The preprocessing module is used to preprocess the historical travel order data, grouping travel product items with the same attributes into the same preset travel product category, and generating a shopping basket dataset.
[0031] The threshold setting module is used to set the minimum support threshold and the maximum combination length threshold. The support represents the proportion of the number of historical tourism orders for a certain tourism product category to the total number of historical tourism orders. The minimum support threshold represents the lowest proportion of the number of historical tourism orders for a certain tourism product category to the total number of historical tourism orders. The maximum combination length threshold represents the maximum number of tourism product categories that can be included in a combination of multiple tourism product categories.
[0032] The execution module is used to obtain a candidate frequent itemset from the shopping basket dataset based on the minimum support threshold and the maximum combination length threshold according to the FP-Growth algorithm;
[0033] The evaluation module is used to evaluate the relevance of tourism product combinations in the candidate frequent itemset and to select target tourism product combinations from the candidate frequent itemset.
[0034] Thirdly, this disclosure provides an electronic device including a memory, a processor, and a computer program stored in the memory and for running on the processor, wherein the processor executes the computer program to implement the combined product selection method described in any one of the first aspects.
[0035] Fourthly, this disclosure provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the combination selection method described in any one of the first aspects.
[0036] Fifthly, this disclosure provides a computer program product, including a computer program that, when executed by a processor, implements the combination selection method as described in any one of the first aspects.
[0037] The positive and progressive effects of this invention are as follows: This disclosure obtains all frequent itemsets that satisfy the minimum support threshold and the maximum combination length threshold through the FP-Growth algorithm model; it evaluates the relevance of each frequent itemset and selects target related combination products, thereby replacing purely manual experience-based product recommendations, avoiding erroneous product selection due to subjective misjudgment, making product selection decisions more scientific and objective, and effectively distinguishing between "real product associations" and "random co-occurrence of popular products," which can accurately uncover potential user needs and improve user experience and satisfaction. Attached Figure Description
[0038] Figure 1 A flowchart illustrating a combined product selection method based on the FP-Growth algorithm provided as an exemplary embodiment of this disclosure;
[0039] Figure 2 A flowchart illustrating the process of obtaining a candidate frequent itemset from a shopping basket dataset using the FP-Growth algorithm, provided as an exemplary embodiment of this disclosure;
[0040] Figure 3 A schematic diagram illustrating the process of performing confidence assessment on a combination of tourism products in a candidate frequent itemset, as provided in an exemplary embodiment of this disclosure;
[0041] Figure 4 A flowchart illustrating the process of evaluating the improvement of a tourism product combination in a candidate frequent itemset, provided as an exemplary embodiment of this disclosure;
[0042] Figure 5 A schematic diagram of a combined product selection system based on the FP-Growth algorithm provided as an exemplary embodiment of this disclosure;
[0043] Figure 6 This is a schematic diagram of the structure of an electronic device shown in an example embodiment of the present disclosure. Detailed Implementation
[0044] The present invention will be further illustrated by way of embodiments below, but the present invention is not limited to the scope of the embodiments described herein.
[0045] The prefixes such as "first" and "second" used in this disclosure are merely for distinguishing different descriptive objects and do not limit the position, order, priority, quantity, or content of the described objects. The use of ordinal numbers and other prefixes used to distinguish descriptive objects in this disclosure does not constitute a limitation on the described objects. The description of the described objects is given in the claims or the context of the embodiments, and should not be construed as an unnecessary limitation. Furthermore, in the description of this embodiment, unless otherwise stated, "multiple" means two or more.
[0046] In this embodiment of the disclosure, the collection, storage, use, processing, transmission, provision, and disclosure of user personal information comply with relevant laws and regulations and do not violate public order and good morals.
[0047] Example 1
[0048] Figure 1 A flowchart illustrating a combined product selection method based on the FP-Growth algorithm provided as an exemplary embodiment of this disclosure.
[0049] S101: Obtain historical travel order data.
[0050] The historical travel order data contains multiple historical travel orders, and each historical travel order contains one or more product items.
[0051] In one example, all historical travel order data within a specific time period is retrieved from the platform's order database. The time period can be set according to business needs. For instance, user spending patterns may differ significantly between peak and off-peak seasons, so historical travel order data for different time periods can be retrieved for analysis. The retrieved historical travel order data can exist in a relational table format. For example, the historical travel order data table might contain the following fields: Travel Order ID (order_id), User ID (user_id), Product ID (product_id), Product Name (product_name), Product Quantity (quantity), Order Amount (amount), Order Time (order_time), Payment Status (payment_status), etc.
[0052] In one example, each historical travel order can contain one or more product items. For instance, a user might book "Tickets to Attraction A", "Airport transfer from Attraction A to Hotel B", and "Hotel B near the attraction" before a trip. These three product items will appear in the same travel order record and be associated with the same travel order ID, order_id.
[0053] S102: Preprocess the historical travel order data, group the travel goods items with the same attributes into the same preset travel goods category, and generate a shopping basket dataset.
[0054] It's understandable that the product names in each user's travel order won't be exactly the same. For example, User A might book "Tickets to Attraction A" and "Airport transfer from Attraction A to Hotel B," while User B might book "Tickets to Attraction C" and "Airport transfer from Attraction C to Hotel D." Therefore, it's necessary to preprocess the historical travel order data to group similar products into the same category, generating a shopping basket dataset. As mentioned above, after preprocessing, the shopping basket datasets obtained by Users A and B would both be "Tickets to Attractions" and "Airport transfer from Attractions to Hotel."
[0055] In one example, the preprocessing of the historical travel order data further includes filtering the historical travel orders if the frequency of occurrence of each product category in the historical travel orders of the product combination is less than the minimum support threshold.
[0056] It's understandable that after constructing the shopping basket dataset, if all product categories in a particular shopping basket appear very infrequently across the entire dataset (all less than the subsequently set minimum support threshold), then this record can be considered "noise" and directly filtered out from the historical travel orders. For example, a user might only purchase extremely niche products like "diving experiences" and "helicopter tours," both of which are very rare across the platform. This record contributes little to mining general association rules and would only increase the computational burden; in this case, the travel order should be filtered out.
[0057] In one example, the preprocessing of the historical travel order data further includes filtering the travel product category if the frequency of any travel product category in the historical travel orders of the travel product combination is less than the minimum support threshold.
[0058] After constructing the shopping basket dataset, the frequency of occurrence of each product category is counted. If the frequency of occurrence of a product category is lower than a preset minimum support threshold, it is defined as a "niche category" and removed from all shopping basket records. For example, if the platform only has user orders for "flight tickets," "airport transfer from flight to hotel," "hotel," and "desert trekking," then "desert trekking" is an extremely niche travel product category. In this case, preprocessing the historical travel order data can remove the "desert trekking" travel product category from the shopping basket.
[0059] S103: Set the minimum support threshold and the maximum combination length threshold.
[0060] Support represents the proportion of historical tourism orders for a certain tourism product category to the total number of historical tourism orders. The minimum support threshold represents the lowest proportion of historical tourism orders for a certain tourism product category to the total number of historical tourism orders.
[0061] For example, if an online travel platform obtains 10,000 historical travel orders and sets a minimum support threshold of 5%, then any product category (such as "airport transfers," "attraction tickets," or "hotel accommodations") must appear in the historical travel orders at least 500 times to be included in the subsequent "frequent itemset." If the product category "VIP lounge" (a niche, high-end service) only appears 120 times in the 10,000 orders, which is less than 500 times, then "VIP lounge" does not meet the 5% minimum support threshold requirement and will be considered a "niche category" and filtered out in this step.
[0062] The maximum combination length threshold represents the maximum number of tourism product categories that can be included in a combination of multiple tourism product categories. In other words, it represents the maximum number of different product categories that can be included in a historical tourism order's product combination.
[0063] It is understandable that the number of products in a bundle should not be too large. Usually, the bundle length threshold is set to 3, that is, only 2-3 products are bundled together, which reduces the user's decision-making cost and meets the need to focus on a small number of product categories.
[0064] For example, if the maximum combination length threshold is set to 1, then the historical travel orders will have a maximum of "1 product category"; such as {attraction ticket A}, {airport pick-up}.
[0065] For example, if the maximum combination length threshold is set to 2, then the most historical travel orders will be "combinations of 2 product categories", such as {attraction ticket A, airport pick-up}, {attraction ticket A, hotel accommodation}.
[0066] For example, if the maximum combination length threshold is set to 3, then the maximum number of historical travel orders that can appear is "3 product category combinations", such as {attraction tickets A, airport pick-up, hotel accommodation}.
[0067] S104: Based on the minimum support threshold and the maximum combination length threshold, obtain the candidate frequent itemset from the shopping basket dataset according to the FP-Growth algorithm.
[0068] Based on the minimum support threshold and the maximum combination length threshold, candidate frequent itemsets are obtained from the shopping basket dataset according to the FP-Growth algorithm, such as... Figure 2 As shown, it specifically includes:
[0069] S1041: Scan the shopping basket dataset, calculate the frequency of each tourism product category in all historical tourism order data, filter out tourism product categories in the shopping basket dataset that are less than the minimum support threshold, and obtain a high-frequency dataset.
[0070] By traversing the entire shopping basket dataset, the frequency of occurrence (i.e., support count) of each standardized travel product category in all historical travel order data is counted. The frequency of occurrence of each product category is compared with the minimum support threshold set in S103. Product categories with a frequency below this threshold are marked as "infrequent items" and directly filtered out, resulting in a high-frequency dataset. The subsequent FP-tree construction only contains "high-frequency" products, thus greatly compressing the data size.
[0071] For example, in a total of 10,000 historical travel order data, the minimum support threshold set in S103 is 5%. At this point, any product category must appear in at least 500 historical travel order data to be retained. After scanning the shopping basket dataset, the frequency of each travel product category in all historical travel order data is calculated, as shown in Table 1. With a minimum support threshold of 5%, the following product categories are scanned. The shopping basket dataset is filtered from 7 product categories {Attraction Tickets A, Scenic Area Catering, Airport Transfer, Hotel Accommodation, Tour Guide Services, Souvenirs, VIP Lounge} into 4 high-frequency product categories: {Attraction Tickets A, Scenic Area Catering, Airport Transfer, Hotel Accommodation}. These four product categories together constitute the "high-frequency dataset".
[0072] Table 1: High-frequency dataset obtained from the shopping basket dataset
[0073] Product Category Number of orders received (support count) Should we retain it? (If the support level is greater than the minimum support threshold) Remark Attraction Ticket A 900 yes reserve Catering in scenic areas 700 yes reserve Pick up boarding 650 yes reserve Hotel accommodation 500 yes reserve Tour guide service 430 no Not meeting the threshold, filtered out souvenir 300 no Not meeting the threshold, filtered out VIP Lounge 120 no Not meeting the threshold, filtered out
[0074] S1042: Scan the high-frequency dataset, sort the tourism product categories in the high-frequency dataset in descending order, and recursively construct a frequent pattern tree (FP-Tree) for tourism product combinations composed of multiple tourism product categories in the high-frequency dataset to obtain a candidate frequent itemset that satisfies the maximum combination length threshold.
[0075] By scanning the high-frequency dataset obtained from S1041, the product categories in the high-frequency dataset are sorted in descending order according to their frequency of occurrence (support count) in the entire high-frequency dataset. High-frequency product categories are ranked first, and an FP-Tree is constructed, consisting of a root node and multiple child nodes. Each node represents a product category and records the number of times that product category appears (count).
[0076] In one example, the FP-tree is constructed by first inserting product categories one by one from a high-frequency dataset sorted in descending order. If a newly inserted product category has the same prefix as an existing path in the tree, the prefix path is shared, and the count of the corresponding node on the path is incremented by 1. If the prefix match breaks at a certain point, a new branch node is created starting from that point.
[0077] It is understandable that the more paths overlap in an FP-tree, the better the compression effect obtained by using the FP-tree structure.
[0078] In one example, a bottom-up recursive strategy is used to mine frequent itemsets. Starting from the bottom node of the FP-tree, the nodes are backtracked upwards to the root node, and all their "prefix paths" are collected to obtain candidate frequent itemsets that satisfy the maximum combination length threshold.
[0079] S105: Perform a correlation assessment on the tourism product combinations in the candidate frequent itemset and select the target tourism product combination from the candidate frequent itemset.
[0080] In one example, the association assessment of tourism product combinations in the candidate frequent itemset can be performed using confidence level assessment, such as... Figure 3 As shown, it specifically includes:
[0081] S10511: Calculate the confidence level of any combination of tourism products in the candidate frequent itemset.
[0082] The confidence level represents the ratio of the support for the co-occurrence of multiple tourism product categories in the frequent itemset to the support for the occurrence of any single tourism product category among the multiple tourism product categories.
[0083] In one example, the support of any tourism product category A This can be expressed by the following formula:
[0084]
[0085] Confidence levels for product A and product B The calculation formula is as follows:
[0086]
[0087] in, This indicates the confidence level of product A and product B. This indicates the support level for the simultaneous occurrence of product A and product B. This indicates the level of support for the appearance of product A.
[0088] For example, Table 2 shows the candidate frequent itemsets and their support counts. When calculating the confidence of {Attraction Ticket A, Airport Pickup} (i.e., users who purchased Attraction Ticket A also purchased Airport Pickup), the support count for the item {Attraction Ticket A} appearing alone is 900, and the support count for {Attraction Ticket A} and {Airport Pickup} appearing together is 600. Therefore, the confidence of Attraction Ticket A and Airport Pickup is 66.7%. This means that among the 900 users who purchased "Attraction Ticket A", 66.7% of the users (i.e., 600 users) also purchased the "Airport Pickup" service.
[0089] Table 2: Support Count of Candidate Frequent Itemsets
[0090] Candidate frequent itemsets (product combinations) Support count Support (percentage) {Attraction Ticket A} 900 9.00% {Check-in} 650 6.50% {Dining in Scenic Area} 700 7.00% {Attraction ticket A, airport pick-up} 600 6.00% {Attraction Tickets A, Dining at the Scenic Area} 550 5.50%
[0091] S10512: Compare the confidence level with a preset confidence threshold, and select tourism product combinations with a confidence level not lower than the preset confidence threshold from the candidate frequent itemset to obtain the first candidate combination as the target tourism product combination.
[0092] By comparing the confidence level with a preset confidence threshold, tourism product combinations with a confidence level not lower than the preset confidence threshold are selected from the candidate frequent itemsets to filter out product combinations with weak correlation. Only candidate combinations with a confidence level not lower than the threshold are initially identified as "first candidate combinations" and output as "target tourism product combinations".
[0093] In one example, the correlation assessment of tourism product combinations in the candidate frequent items set can also be performed through lift assessment, specifically including:
[0094] S10521: Calculate the confidence level of any combination of tourism products in the candidate frequent itemset.
[0095] The confidence level represents the ratio of the support for the co-occurrence of multiple tourism product categories in the frequent itemset to the support for the occurrence of any single tourism product category among the multiple tourism product categories.
[0096] S10522: Compare the confidence level with a preset confidence threshold, and select tourism product combinations with a confidence level not lower than the preset confidence threshold from the candidate frequent itemset to obtain the first candidate combination.
[0097] Steps S10521-S10522 are the same as those in S10511-S10512 above to obtain the first candidate combination, and will not be repeated here.
[0098] S10523: Obtain the confidence level of each tourism product combination in the first candidate combination.
[0099] For example, the confidence level of the above product combination {attraction ticket A, airport pick-up} is 66.7%.
[0100] S10524: Calculate the support of any tourism product category in the tourism product combination in all historical tourism orders; the support represents the proportion of the number of historical tourism orders for any tourism product category to the total number of historical tourism orders.
[0101] S10525: Based on the support and the confidence, the lift of the tourism product combination is obtained, wherein the lift represents the ratio of the confidence to the support.
[0102] The lift is the ratio of the confidence level to the support level. It is used to calculate how many times the probability of purchasing product category B is greater than the probability of purchasing product category B under normal circumstances, given that product category A is purchased. The calculation formula is as follows:
[0103]
[0104] in This indicates the degree of improvement in purchasing product category B under the condition of product category A. This indicates the confidence level between product category A and product category B. This indicates the level of support for product category B.
[0105] In one example, a lift greater than 1 indicates that the association rule is more effective than random combination, equal to 1 indicates that there is no difference between the two, and less than 1 indicates that the association rule is not as effective as random combination.
[0106] S10526: Compare the elevation degree with a preset elevation degree threshold, and select from the first candidate combinations the combination whose elevation degree is not lower than the preset elevation degree threshold as the target tourism product combination.
[0107] The product mix is screened by comparing the lift level with a preset lift level threshold. Only combinations with a lift level not lower than the threshold will be ultimately determined as the "target tourism product mix".
[0108] In one example, after filtering out frequent itemsets, experimental and control groups can be set up for testing. The experimental group displays 2-3 bundled sales packages, priced 10% cheaper than buying the items individually. Control group 1 only displays single-item resources, i.e., products not sold in bundles, while control group 2 displays bundled sales packages selected based on expert experience. The tests are then conducted in multiple groups to verify conversion rates and positive or negative user feedback.
[0109] In one example, the candidate frequent itemsets can be continuously filtered and updated. For instance, the FP-Growth algorithm can be re-executed monthly or quarterly to obtain candidate frequent itemsets, which are then compared with the support, confidence, and lift of previous candidate frequent itemsets. More suitable iterative packages can then be identified. For example, replacing the package of scenic spot ticket A + scenic spot catering with a package of scenic spot ticket A + sightseeing bus can further refine the understanding of potential user needs.
[0110] In this way, by evaluating the confidence and lift of each frequent itemset, the truly commercially valuable "strong association" target association combinations are selected, effectively filtering out "false strong associations" generated by the popularity of the products themselves. This replaces purely manual experience-based product recommendations, avoids incorrect product selection due to subjective misjudgment, and thus achieves accurate discovery of users' potential needs, improving user experience and satisfaction.
[0111] Example 2
[0112] Corresponding to the aforementioned embodiments of the product selection method, this disclosure also provides a product selection system based on the FP-Growth algorithm, applied to tourism product combination recommendations, such as... Figure 5 As shown, the combined product selection system specifically includes:
[0113] The acquisition module 501 is used to acquire historical travel order data, which includes multiple historical travel orders, and each historical travel order includes one or more travel product items.
[0114] Preprocessing module 502 is used to preprocess the historical tourism order data, group tourism product items with the same attributes into the same preset tourism product category, and generate a shopping basket dataset;
[0115] The threshold setting module 503 is used to set the minimum support threshold and the maximum combination length threshold, wherein the support represents the proportion of the number of historical tourism orders of a certain tourism product category to the total number of historical tourism orders, the minimum support threshold represents the lowest proportion of the number of historical tourism orders of a certain tourism product category to the total number of historical tourism orders, and the maximum combination length threshold represents the maximum number of tourism product categories included in a tourism product combination composed of multiple tourism product categories.
[0116] Execution module 504 is used to obtain a candidate frequent itemset from the shopping basket dataset based on the minimum support threshold and the maximum combination length threshold according to the FP-Growth algorithm;
[0117] Evaluation module 505 is used to evaluate the relevance of tourism product combinations in the candidate frequent itemset and select target tourism product combinations from the candidate frequent itemset.
[0118] In one example, the execution module 504 is specifically used for:
[0119] Scan the shopping basket dataset, calculate the frequency of each tourism product category in all historical tourism order data, and filter out tourism product categories in the shopping basket dataset that are less than the minimum support threshold to obtain a high-frequency dataset.
[0120] Scan the high-frequency dataset, sort the tourism product categories in the high-frequency dataset in descending order, and recursively construct a frequent pattern tree (FP-Tree) for tourism product combinations composed of multiple tourism product categories in the high-frequency dataset to obtain a candidate frequent itemset that satisfies the maximum combination length threshold.
[0121] In one example, the preprocessing module 502 can also be used to filter the historical travel orders if the number of occurrences of each product category in the historical travel orders of the product combination is less than the minimum support threshold.
[0122] In one example, the preprocessing module 502 can also be used to filter the tourism product category if the number of occurrences of any tourism product category in the historical tourism orders of the tourism product combination is less than the minimum support threshold.
[0123] In one example, the evaluation module 505 is specifically used for:
[0124] Calculate the confidence score of any combination of tourism products in the candidate frequent itemset, where the confidence score represents the ratio of the support for the co-occurrence of multiple tourism product categories in the frequent itemset to the support for the occurrence of any single tourism product category among the multiple tourism product categories.
[0125] The confidence level is compared with a preset confidence threshold, and tourism product combinations with a confidence level not lower than the preset confidence threshold are selected from the candidate frequent itemset to obtain the first candidate combination as the target tourism product combination.
[0126] In one example, the evaluation module 505 is specifically used for:
[0127] Calculate the confidence score of any combination of tourism products in the candidate frequent itemset, where the confidence score represents the ratio of the support for the co-occurrence of multiple tourism product categories in the frequent itemset to the support for the occurrence of any single tourism product category among the multiple tourism product categories.
[0128] The confidence level is compared with a preset confidence threshold, and tourism product combinations with a confidence level not lower than the preset confidence threshold are selected from the candidate frequent itemset to obtain the first candidate combination;
[0129] Obtain the confidence level of each tourism product combination in the first candidate combination;
[0130] Calculate the support of any tourism product category in the tourism product mix in all historical tourism orders; the support represents the proportion of historical tourism orders for any tourism product category to the total number of historical tourism orders.
[0131] Based on the support and the confidence, the lift of the tourism product combination is obtained; the lift is used to represent the ratio of the confidence to the support.
[0132] The improvement degree is compared with a preset improvement degree threshold, and the combination with an improvement degree not lower than the preset improvement degree threshold is selected from the first candidate combination as the target tourism product combination.
[0133] Example 3
[0134] Figure 6 This is a schematic diagram of the structure of an electronic device according to an example embodiment of the present disclosure. The electronic device includes a memory, a processor, and a computer program stored in the memory and used to run on the processor. When the processor executes the computer program, it implements the combined product selection method of any of the above embodiments. Figure 6 The electronic device 600 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.
[0135] like Figure 6 As shown, the electronic device 600 can be manifested as a general-purpose computing device, such as a server device. The components of the electronic device 600 may include, but are not limited to: at least one processor 601, at least one memory 602, and a bus 603 connecting different system components (including memory 602 and processor 601).
[0136] Bus 603 includes a data bus, an address bus, and a control bus.
[0137] The memory 602 may include volatile memory, such as random access memory (RAM) 6021 and / or cache memory 6022, and may further include read-only memory (ROM) 6023.
[0138] The memory 602 may also include a program tool 6025 (or utility) having a set (at least one) program module 6024, such program module 6024 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.
[0139] The processor 601 executes various functional applications and data processing, such as the combined product selection method provided in any of the above embodiments, by running a computer program stored in the memory 602.
[0140] Electronic device 600 can also communicate with one or more external devices 604 (e.g., keyboard, pointing device, etc.). This communication can be performed via input / output (I / O) interface 605. Furthermore, electronic device 600 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 606. Network adapter 606 communicates with other modules of electronic device 600 via bus 603. It should be understood that, although... Figure 6 As not shown, other hardware and / or software modules may be used in conjunction with electronic device 600, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems.
[0141] It should be noted that although several units / modules or sub-units / modules of the electronic device have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided and embodied by multiple units / modules.
[0142] Example 4
[0143] This disclosure also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the combined product selection method provided in any of the above embodiments.
[0144] The readable storage medium may be more specifically adopted, including but not limited to: portable disk, hard disk, random access memory, read-only memory, erasable programmable read-only memory, optical storage device, magnetic storage device, or any suitable combination thereof.
[0145] Example 5
[0146] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements a combination of the above-described product selection methods.
[0147] The program code for executing the computer program product disclosed herein can be written in any combination of one or more programming languages. The program code can be executed entirely on a user device, partially on a user device, as a stand-alone software package, partially on a user device and partially on a remote device, or entirely on a remote device.
[0148] While specific embodiments of the present invention have been described above, those skilled in the art should understand that these are merely illustrative examples, and the scope of protection of the present invention is defined by the appended claims. Those skilled in the art can make various changes or modifications to these embodiments without departing from the principles and essence of the present invention, but all such changes and modifications fall within the scope of protection of the present invention.
Claims
1. A product selection method based on the FP-Growth algorithm, applied to tourism product combination recommendation, characterized in that, Includes the following steps: Obtain historical travel order data, which includes multiple historical travel orders, and each historical travel order includes one or more product items; The historical travel order data is preprocessed to group the product items with the same attributes into the same preset travel product category, thereby generating a shopping basket dataset; Set a minimum support threshold and a maximum combination length threshold, where support represents the proportion of historical tourism orders for a certain tourism product category to the total number of historical tourism orders, the minimum support threshold represents the lowest proportion of historical tourism orders for a certain tourism product category to the total number of historical tourism orders, and the maximum combination length threshold represents the maximum number of tourism product categories that can be included in a combination of multiple tourism product categories. Based on the minimum support threshold and the maximum combination length threshold, candidate frequent itemsets are obtained from the shopping basket dataset according to the FP-Growth algorithm; A correlation assessment is performed on the tourism product combinations in the candidate frequent itemset, and a target tourism product combination is selected from the candidate frequent itemset.
2. The combined product selection method according to claim 1, characterized in that, Based on the minimum support threshold and the maximum combination length threshold, the candidate frequent itemset is obtained from the shopping basket dataset according to the FP-Growth algorithm, specifically including: Scan the shopping basket dataset, calculate the frequency of each tourism product category in all historical tourism order data, and filter out tourism product categories in the shopping basket dataset that are less than the minimum support threshold to obtain a high-frequency dataset. Scan the high-frequency dataset, sort the tourism product categories in the high-frequency dataset in descending order, and recursively construct a frequent pattern tree (FP-Tree) for tourism product combinations composed of multiple tourism product categories in the high-frequency dataset to obtain a candidate frequent itemset that satisfies the maximum combination length threshold.
3. The combined product selection method according to claim 1, characterized in that, The preprocessing of the historical travel order data also includes: If the frequency of occurrence of each product category in the historical travel orders of the product combination is less than the minimum support threshold, the historical travel orders are filtered.
4. The combined product selection method according to claim 1, characterized in that, The preprocessing of the historical travel order data also includes: If the number of occurrences of any tourism product category in the historical tourism orders of the tourism product combination is less than the minimum support threshold, the tourism product category is filtered.
5. The combined product selection method according to claim 4, characterized in that, The association assessment of the tourism product combinations in the candidate frequent items set specifically includes: Calculate the confidence score of any combination of tourism products in the candidate frequent itemset, where the confidence score represents the ratio of the support for the co-occurrence of multiple tourism product categories in the frequent itemset to the support for the occurrence of any single tourism product category among the multiple tourism product categories. The confidence level is compared with a preset confidence threshold, and tourism product combinations with a confidence level not lower than the preset confidence threshold are selected from the candidate frequent itemset to obtain the first candidate combination as the target tourism product combination.
6. The combined product selection method according to claim 4, characterized in that, The association assessment of the product combinations in the candidate frequent itemset specifically includes: Calculate the confidence score of any combination of tourism products in the candidate frequent itemset, where the confidence score represents the ratio of the support for the co-occurrence of multiple tourism product categories in the frequent itemset to the support for the occurrence of any single tourism product category among the multiple tourism product categories. The confidence level is compared with a preset confidence threshold, and tourism product combinations with a confidence level not lower than the preset confidence threshold are selected from the candidate frequent itemset to obtain the first candidate combination; Obtain the confidence level of each tourism product combination in the first candidate combination; Calculate the support of any tourism product category in the aforementioned tourism product mix across all historical tourism orders; Based on the support and the confidence, the lift of the tourism product combination is obtained; the lift is used to represent the ratio of the confidence to the support. The improvement degree is compared with a preset improvement degree threshold, and the combination with an improvement degree not lower than the preset improvement degree threshold is selected from the first candidate combination as the target tourism product combination.
7. A product selection system based on the FP-Growth algorithm, applied to tourism product combination recommendation, characterized in that, include: The acquisition module is used to acquire historical travel order data, which includes multiple historical travel orders, and each historical travel order includes one or more travel product items. The preprocessing module is used to preprocess the historical travel order data, grouping travel product items with the same attributes into the same preset travel product category, and generating a shopping basket dataset. The threshold setting module is used to set the minimum support threshold and the maximum combination length threshold. The support represents the proportion of the number of historical tourism orders for a certain tourism product category to the total number of historical tourism orders. The minimum support threshold represents the lowest proportion of the number of historical tourism orders for a certain tourism product category to the total number of historical tourism orders. The maximum combination length threshold represents the maximum number of tourism product categories that can be included in a combination of multiple tourism product categories. The execution module is used to obtain a candidate frequent itemset from the shopping basket dataset based on the minimum support threshold and the maximum combination length threshold according to the FP-Growth algorithm; The evaluation module is used to evaluate the relevance of tourism product combinations in the candidate frequent itemset and to select target tourism product combinations from the candidate frequent itemset.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and for running on the processor, characterized in that, When the processor executes the computer program, it implements the combined product selection method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the combined product selection method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the combined product selection method as described in any one of claims 1-6.