Method, device and equipment for outputting promotion products based on subset enumeration and medium
Through subset enumeration and state transfer equations, the optimal bundled sales combination of insurance products is determined, which solves the problems of insured companies' low combination selection, price optimization and decision-making efficiency in bundled sales, and improves market competitiveness.
Patent Information
- Application Number
- CN202411403849.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2025-01-03
AI Technical Summary
Insurance companies lack effective methods to choose the optimal combination when implementing bundling sales, lack of price optimization, lack of decision-making support tools, and low computing efficiency, resulting in a decline in market competitiveness.
The subset enumeration method is adopted to collect insurance product information, assign binary identifiers, establish mapping relationships, define state arrays, analyze the lowest price using subset enumeration and state transfer equations, and finally determine the optimal combination and price.
The optimal combination selection for bundled sales of insurance products is realized, cost-effectiveness is optimized, decision-making response speed is improved, and calculation complexity is reduced.
Smart Images

Figure CN119250989A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of data analysis technology and financial technology, and in particular to an output method, device, equipment and storage medium for promotional products based on subset enumeration. Background Art
[0002] In the insurance industry, in order to attract customers and increase sales, insurance companies often adopt a bundling sales strategy, combining multiple insurance products into a package sale. However, the existing technology has some obvious deficiencies in implementing bundling sales, especially in how to determine the optimal bundling sales combination.
[0003] First, it is difficult to select promotional combinations. Existing technologies usually lack effective methods to select the best bundled combination from a large number of insurance products. Due to the wide variety of insurance products on the market and the diverse needs of customers, it is difficult for insurance companies to effectively evaluate the combination effect of each product when designing a bundled sales combination. This causes customers to feel confused when faced with multiple choices and may eventually give up purchasing.
[0004] Second, price optimization is insufficient. In bundled sales, reasonable pricing is crucial to attracting consumers, but existing technologies often face challenges in setting prices. Insurance companies need to balance the relationship between consumers' perceived value and their own profits, and the lack of a scientific pricing model makes this process complicated and uncertain.
[0005] In addition, there is a lack of decision support tools. Current methods often rely on manual experience and simple rules, and lack scientific and systematic decision support tools. This makes it impossible for insurance companies to obtain market feedback in a timely manner during the formulation and adjustment of bundling sales strategies, resulting in delayed decision-making and missed opportunities.
[0006] Finally, the calculation efficiency is low. For bundled sales involving a large number of insurance products, existing technologies are inefficient in calculating the optimal combination, especially when faced with complex combinations, the calculation time may be significantly extended. This inefficiency makes it difficult for insurance companies to respond quickly to market changes and flexibly adjust product portfolios to meet changing customer needs.
[0007] These shortcomings limit the potential of insurance companies in providing more favorable product portfolios that are more in line with market demand, affect the overall effectiveness of bundling sales strategies, and lead to a decline in market competitiveness. Summary of the invention
[0008] The main purpose of the present invention is to provide a method, device, equipment and storage medium for outputting promotional products based on subset enumeration, aiming to solve the technical problem that the prior art cannot efficiently and automatically determine the sales combination with the best price from a large number of insurance products.
[0009] To achieve the above object, the present invention provides a method for outputting promotional products based on subset enumeration, comprising:
[0010] Collect information about insurance products participating in promotional activities, including insurance names and corresponding unit prices, as well as insurance names and total prices included in existing bundled insurance packages;
[0011] Assign a binary identifier to each individual insurance product and each existing bundled insurance combination, and establish a mapping relationship between the binary identifier and the insurance product and insurance combination and the corresponding price;
[0012] Define a state array for recording the lowest prices of all insurance combinations represented by binary identifiers;
[0013] Initializing each element of the state array to a preset maximum value, wherein the preset maximum value indicates that the price of the insurance combination is unknown in the initial state;
[0014] Based on the mapping relationship, the lowest prices of all insurance combinations are analyzed through subset enumeration and state transition equations;
[0015] Backtracking from the state array, the specific insurance products constituting the optimal promotional product combination are determined in sequence until the final optimal insurance combination is confirmed, and the optimal insurance combination and the corresponding minimum price are output.
[0016] Furthermore, to achieve the above-mentioned object, the present invention provides a device for outputting promotional products based on subset enumeration, comprising:
[0017] A data collection module is used to collect information about insurance products participating in the promotional activities, including insurance names and corresponding unit prices, as well as insurance names and total prices included in existing bundled insurance packages;
[0018] An identification allocation module, used to allocate a binary identification to each individual insurance product and each existing bundled insurance combination, and establish a mapping relationship between the binary identification and the insurance product and insurance combination and the corresponding price;
[0019] A state array definition module, used for defining a state array for recording the lowest prices of all insurance combinations represented by binary identifiers;
[0020] A state array initialization module, used to initialize each element of the state array to a preset maximum value, wherein the preset maximum value indicates that the price of the insurance combination is unknown in the initial state;
[0021] A combination analysis module, used for analyzing the lowest prices of all insurance combinations through subset enumeration and state transition equations based on the mapping relationship;
[0022] The result backtracking module is used to backtrack from the state array, determine the specific insurance products that constitute the optimal promotional product combination in sequence, until the final optimal insurance combination is confirmed, and output the optimal insurance combination and the corresponding lowest price.
[0023] Furthermore, to achieve the above-mentioned purpose, the present invention also provides a computer device, which includes a memory, a processor, and an output program for promotional products based on subset enumeration stored in the memory and executable on the processor, wherein the output program for promotional products based on subset enumeration, when executed by the processor, implements the steps of the method for outputting promotional products based on subset enumeration as described above.
[0024] Furthermore, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, on which is stored an output program for promotional products based on subset enumeration, and when the output program for promotional products based on subset enumeration is executed by a processor, the steps of the output method for promotional products based on subset enumeration as described above are implemented.
[0025] Beneficial effects: The present invention relates to the fields of data analysis technology and financial technology, and discloses a method for outputting promotional products based on subset enumeration, which collects information on insurance products participating in promotional activities and relevant data on existing bundled sales combinations; assigns a binary identifier to each insurance product and bundled combination, and establishes a mapping relationship between the identifier and the product and price; defines a state array to record the lowest price of all insurance combinations represented by the binary identifier, and initializes the array to a preset maximum value; based on the mapping relationship, analyzes all possible insurance combinations through subset enumeration and state transition equations, and finally backtracks from the state array to determine the final optimal insurance combination and its corresponding lowest price. The present invention realizes the optimal combination selection for bundled sales of insurance products by adopting subset enumeration and dynamic programming algorithms, optimizes the cost-effectiveness of insurance purchases, and enables the most attractive product combinations to be quickly identified. In addition, the dynamically adjusted state array effectively reduces the computational complexity and improves the decision response speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which:
[0027] Figure 1 A schematic diagram of an application environment of a method for outputting promotional products based on subset enumeration in one embodiment of the present invention;
[0028] Figure 2 It is a flow chart of an embodiment of a method for outputting promotional products based on subset enumeration according to the present invention;
[0029] Figure 3It is a functional module diagram of a preferred embodiment of the output device of promotional products based on subset enumeration of the present invention;
[0030] Figure 4 A schematic diagram of the structure of a computer device in one embodiment of the present invention;
[0031] Figure 5 FIG. 4 is another schematic diagram of the structure of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION
[0032] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0033] The method for outputting promotional products based on subset enumeration provided by the embodiment of the present invention can be applied in the following aspects: Figure 1 In an application environment, the client communicates with the server through a network. The server can collect information about insurance products participating in promotional activities and relevant data of existing bundled sales combinations through the client; assign a binary identifier to each insurance product and bundled combination, and establish a mapping relationship between the identifier and the product and price; define a state array to record the lowest price of all insurance combinations represented by the binary identifier, and initialize the array to a preset maximum value; based on the mapping relationship, analyze all possible insurance combinations through subset enumeration and state transition equations, and finally backtrack from the state array to determine the final optimal insurance combination and its corresponding lowest price. The present invention realizes the optimal combination selection of insurance product bundle sales by adopting subset enumeration and dynamic programming algorithms, optimizes the cost-effectiveness of insurance purchase, and enables the most attractive product combination to be quickly identified. In addition, the dynamically adjusted state array effectively reduces the computational complexity and improves the decision response speed. Among them, the client can be but is not limited to various personal computers, laptops, smart phones, tablet computers and portable wearable devices. The server can be implemented by an independent server or a server cluster composed of multiple servers. The present invention is described in detail below through specific embodiments.
[0034] See also Figure 2 , Figure 2 This is a flow chart of an embodiment of a method for outputting promotional products based on subset enumeration provided by the present invention. It should be noted that although a logical sequence is shown in the flow chart, in some cases, the steps shown or described may be performed in a different order than that shown here.
[0035] like Figure 2 As shown, the method for outputting promotional products based on subset enumeration proposed by the present invention comprises the following steps:
[0036] S10, collecting information on insurance products participating in the promotional activities, including insurance names and corresponding unit prices, and insurance names and total prices included in existing bundled insurance packages;
[0037] In this embodiment, detailed information of all insurance products participating in the promotional activity is obtained, including the name of each insurance product and its corresponding unit price, as well as the composition and total price of the existing bundled insurance combination.
[0038] Identify the insurance company's internal database system, which may contain detailed information on all products. Use a database management system (such as MySQL, Oracle) to access and manage data. It may be necessary to obtain relevant information from third-party data providers (such as insurance market data analysis companies) or partners' systems. If insurance products are sold on multiple platforms, consider integrating information from these platforms to obtain a comprehensive market perspective.
[0039] Extract the required insurance product information from the database by writing SQL queries. This involves using SELECT statements to obtain product names, unit prices, and bundle combination information. In the case where the information comes from a web page, a web crawler is developed using programming languages such as Python to automatically access the specified insurance product page and grab the required data. This process involves parsing HTML and using libraries such as Beautiful Soup or Scrapy to extract product names and price information.
[0040] Store the collected information in a structured database, such as a relational database, to facilitate subsequent queries and operations. Use data tables to classify and manage different categories of insurance products and portfolio information. If the data comes from multiple formats, consider using a NoSQL database (such as MongoDB) to store data in different formats to maintain flexibility.
[0041] After the data is stored, perform a data integrity check to ensure that all required fields (such as name, unit price, etc.) are filled. Verify the accuracy of the newly collected data by comparing historical data or using logical rules (such as price range, product type consistency). If necessary, confirm the rationality of the data with the product manager or marketing team.
[0042] Establish a regular update mechanism to update the information in the database in a timely manner according to market changes, product adjustments or new product launches, etc. If conditions permit, use real-time data monitoring tools to automatically track changes in data sources to keep the information current.
[0043] Example: For example, a bank may offer a variety of loan products, such as personal loans, car loans, and home loans. The bank's internal product management system stores detailed information on all loan products, including product name, interest rate, repayment period, etc. Obtain competitor loan product data from a market analysis company for comparison. Use SQL queries to extract information on all loan products from the internal database, such as "SELECT * FROM LoanProducts WHERE Active = 1". Use a crawler to access financial product comparison websites and crawl loan product information from various banks to ensure that the latest market interest rates and conditions are obtained.
[0044] By systematically collecting and managing information on insurance products and their bundled combinations, the accuracy and effectiveness of subsequent analysis and decision-making can be significantly improved. This ensures the integrity and real-time nature of the data, laying a solid foundation for subsequent portfolio analysis, enabling insurance companies to better meet customer needs and optimize sales strategies.
[0045] S20, assigning a binary identifier to each individual insurance product and each existing bundled insurance combination, and establishing a mapping relationship between the binary identifier and the insurance product and insurance combination and the corresponding price;
[0046] In this embodiment, a unique binary identifier is assigned to each individual insurance product and each existing bundled insurance combination. This identifier is used to uniquely identify each product and combination in data processing and analysis. The identifier is generated for each product and combination using the Universal Unique Identifier (UUID) method. UUID is a standard format that can generate a unique identifier with a very high probability. A simple counter can also be used. Each time a new product or combination is added, the counter is incremented by one and converted to binary form. For example, the first item is "0001", the second item is "0010", and so on.
[0047] Establish a mapping relationship between each binary identifier and the corresponding insurance product or insurance combination and its price. This mapping relationship ensures that the corresponding product information can be easily found through the identifier in subsequent operations. Create a table in a relational database, which contains three fields: "binary identifier", "insurance product name" and "corresponding price". In a programming language (such as Python), a dictionary (key-value) structure is used to store the mapping relationship, where the key is the binary identifier and the value is a tuple containing the product name and price.
[0048] Associate the price information of each insurance product and its bundle with its corresponding binary identifier to facilitate subsequent cost analysis and determination of the optimal bundle. Obtain the latest pricing information for each product and bundle from the insurance company's internal system and store this information in the corresponding fields when creating the mapping table. Check and update the price information regularly to ensure that the data in the mapping table is always up to date to avoid decision-making errors caused by information lag.
[0049] For example, after each insurance or insurance combination is compressed, the decimal number corresponding to the binary bit and the price are stored in the hash table dic. For example, the current insurance list is [a, b, c, d, e, f, g], and the corresponding insurance unit prices are [10, 20, 30, 40, 50, 60, 70]. The state of each insurance is represented by binary, and the length of the binary bit is the same as the length of the insurance list. The binary bit corresponding to insurance a is (1000000)2, which corresponds to 64 in decimal. The unit price of insurance a is 10, which is stored in the hash table as dic
[64] =10. Similarly, the binary bit corresponding to insurance f is (0000010)2, which corresponds to 2 in decimal. The unit price of insurance a is 60, which is stored in the hash table as dic[2]=60. If a bundled insurance policy contains a, c, and g, then its corresponding binary bit is (1010001)2, and its corresponding decimal value is 81. If its price is 80, then dic
[81] =80.
[0050] Example: An insurance company has a variety of insurance products, such as life insurance, critical illness insurance, and accident insurance. Assign a binary identifier to each product, for example, the identifier for life insurance is "0001", the identifier for critical illness insurance is "0010", and the identifier for accident insurance is "0011". By establishing a mapping relationship, the system can quickly find the name and corresponding price of each product. When a customer asks about the total price of combining life insurance and accident insurance, the system only needs to find the identifiers "0001" and "0011" and add the corresponding prices. For example, the price of life insurance is 1000, the price of accident insurance is 800, and the total price is 1800. This efficient data management not only saves time, but also improves the quality of customer service, enabling insurance companies to better meet customer needs.
[0051] By assigning a unique binary identifier to each insurance product and bundle combination and establishing a mapping relationship, the system can achieve efficient data management and retrieval. It not only improves the accuracy of data processing, but also greatly improves the efficiency of subsequent analysis and decision-making. Especially when faced with huge amounts of insurance product data, it can quickly locate specific products or combinations, thereby optimizing customer output and helping insurance companies gain an advantage in the fierce market competition.
[0052] S30, defining a state array for recording the lowest prices of all insurance combinations represented by binary identifiers;
[0053] In this embodiment, a state array is created to record the lowest prices of all insurance combinations represented by binary identifiers. Each element of the state array represents a specific insurance combination. By setting the binary bit, it is possible to clearly indicate which insurance products are selected, thereby achieving efficient combination price tracking.
[0054] Define a one-dimensional array in the program, whose length is the number of all possible insurance combinations. For N insurance products, the length of the array is 2 to the power of N to cover all possible combinations. During the initialization process, each element in the array is set to a preset maximum value, such as 99999, indicating that in the initial state, the lowest price of the combination has not yet been calculated.
[0055] The index of the array directly corresponds to the binary flag, and the binary form of the index indicates the selected insurance product. For example, index 0 (0000) represents not selecting any insurance, index 1 (0001) represents selecting the first insurance, index 2 (0010) represents selecting the second insurance, and so on, index 15 (1111) represents selecting all four insurance products. The state of each index can be quickly generated through bit operations, which facilitates the efficient addition or removal of insurance products.
[0056] The state array is stored in memory in a continuous form, ensuring that it can be accessed and updated within the time complexity of O(1). This structure allows the corresponding array element to be quickly located when the lowest price for a specific combination needs to be queried.
[0057] When the price of a combination is calculated through other steps, the system will compare the price with the value currently stored in the state array. If the newly calculated price is lower, the array element is updated. This dynamic update mechanism ensures that the state array always stores the lowest price for each combination.
[0058] Example: Assume that an insurance company provides four insurance products, including life insurance, critical illness insurance, accident insurance, and vehicle insurance. The length of the state array is 16 (i.e., 2 to the fourth power), and each element is initially set to 99999, indicating that the price of the combination has not yet been calculated.
[0059] When the system starts to analyze the prices of each combination, for example, if it finds that the total price of the combination of critical illness insurance and accident insurance (the index corresponding to 0010 and 0100 is 6) is 1500, the system will update the value of index 6 in the status array to 1500.
[0060] Later, if the price of another combination of life insurance and car insurance is calculated to be 1400, the system will continue to update the corresponding index in the state array to ensure that each combination always reflects the lowest price. This efficient management method enables insurance companies to output the most cost-effective insurance combination to customers more quickly, improving customer satisfaction.
[0061] Defining a state array to record the lowest price of insurance packages helps the system track and manage package pricing efficiently. The system can quickly determine the lowest cost of a certain package and maintain data accuracy and consistency during multiple calculations. This structure not only reduces computational complexity, but also improves processing speed, allowing insurance companies to respond more flexibly to market changes and customer needs.
[0062] S40, initializing each element of the state array to a preset maximum value, wherein the preset maximum value indicates that the price of the insurance combination is unknown in the initial state;
[0063] In this embodiment, in the process of creating the state array, each element is assigned a preset maximum value, which is intended to indicate that the prices of all insurance combinations are not yet determined in the initial state. The core purpose of this strategy is to provide a clear starting point for subsequent price calculations, so that any actual insurance combination price can effectively replace this maximum value.
[0064] The preset maximum value should usually be a value much higher than the total price of the possible insurance combination. In this way, the system can ensure that each actual price is smaller than this maximum value during the calculation process, thereby achieving effective update.
[0065] After the state array is created, each element is set to the preset maximum value by traversing. This process is not only an assignment, but also lays the foundation for subsequent price comparisons, ensuring that all insurance combinations are considered "unknown" or "invalid" in the initial state.
[0066] When the system calculates the actual price of a certain insurance combination through subsequent steps, it compares this price with the value of the corresponding element in the current state array. If the newly calculated price is lower than the current value, the element is updated to the new lowest price. This comparison process ensures that each update reflects the latest combination price information, so that the state array always remains accurate.
[0067] This initialization method provides good support for dynamic programming, so that during the entire calculation process, it is possible to quickly identify which combination prices have been calculated and updated, thereby improving the calculation efficiency. This strategy not only makes the program structure clearer, but also significantly reduces the possibility of errors in subsequent analysis.
[0068] Example description: When the system starts to analyze insurance combinations, assume that there are four insurance products. The length of the state array is 16, and after initialization, the value of all elements is 99999. As the calculation proceeds, when the price of a combination is found to be 1500, the system will update the corresponding array element to 1500. This process ensures that any new combination price can be identified and recorded in a timely manner, thereby continuously optimizing the output results.
[0069] Initializing each element of the state array to a preset maximum value not only provides a clear initial state, making the comparison process in subsequent calculations efficient and intuitive, but also ensures the accuracy of the system in finding the lowest insurance combination price.
[0070] S50, based on the mapping relationship, analyzing the lowest prices of all insurance combinations through subset enumeration and state transition equations;
[0071] In this embodiment, based on the previously established mapping relationship, a subset enumeration method is used in combination with a state transition equation to systematically analyze all possible insurance combinations, thereby determining the lowest price for each combination. The goal of this process is to effectively identify the optimal solution under various combination conditions.
[0072] Subset enumeration is a strategy that traverses all possible combinations. In the scenario of insurance combinations, each insurance product can be regarded as a binary bit selection, and the system generates all possible insurance combinations by enumerating all binary states. This approach ensures that no combination is missed while providing a comprehensive basis for price comparison.
[0073] Based on the subset enumeration, a state transition equation is constructed to describe how to transfer from a known combination state to a new combination state. This equation usually depends on the price of the current combination and the price of the newly added product to achieve dynamic update of the combination price. Through this equation, the system can gradually deduce the lowest price of the new combination.
[0074] For each combination state, the system will check the price of the combination and compare it with the currently recorded lowest price. If the new combination price is lower, the system will update the corresponding element in the state array. This process continues until all combinations have been evaluated.
[0075] Example description: Assuming that the system has four insurance products, using subset enumeration, the system will generate 16 possible combinations. In each combination, the corresponding price is calculated through the state transition equation. If the combination "0110" (selecting the second and third insurance) is calculated to have a price of 2500, the system will compare it with other combinations to ensure that it is recorded as one of the lowest prices among all combinations. Through such iteration and comparison, the system can eventually output the combination with the lowest price and provide a corresponding list of insurance products.
[0076] By combining subset enumeration with state transition equations, the system can comprehensively and efficiently evaluate all possible insurance combinations, significantly improving the efficiency of finding the lowest price combination. This process ensures that the prices of all combinations are fully considered, providing solid data support for the final decision.
[0077] S60, backtracking from the state array, determining in sequence the specific insurance products that constitute the optimal promotional product combination, until the final optimal insurance combination is confirmed, and outputting the optimal insurance combination and the corresponding lowest price.
[0078] In this embodiment, after the lowest price of all insurance combinations is calculated, the system extracts the insurance product combination corresponding to the lowest price from the state array through a backtracking mechanism. The purpose of this process is to accurately identify the specific products of the optimal combination to ensure that the selected combination not only has the lowest price but also meets the needs of customers.
[0079] Backtracking is a bottom-up algorithmic idea that aims to gradually deduce the details that constitute the result from the known result. In this step, the system will find the index that stores the lowest price from the state array. This index represents a specific insurance combination state. The backtracking strategy ensures that no possible combination is missed in the process of finding the optimal solution, providing a comprehensive basis for selection.
[0080] Get the index of the element storing the lowest price from the state array. Next, the system will use the information of the state transition equation to gradually track which insurance products are included in the combination. Each time it backtracks, the system will record the selected insurance products and update the current index according to the changes in the combination until it returns to the initial state. In this process, backtracking not only tracks the specific names of the insurance products, but also maintains a clear understanding of the prices and characteristics in the combination.
[0081] After the backtracking is completed, the system will construct a complete insurance combination and output it together with the corresponding lowest price. The output should not only include specific insurance products, but also feature information of each product, such as coverage, insurance amount, etc., to help users fully understand the selected combination. This result can be directly used in the formulation of sales strategies to support the marketing team in promoting the most competitive product combination.
[0082] During the retrospective process, the system should accurately record each selection to ensure that the selection basis of all insurance products is clear and traceable, and avoid omissions or incorrect combinations due to algorithm errors.
[0083] For example, define a one-dimensional array dp, where dp[i] represents the cheapest price when the decimal corresponding to the binary formed by insurance products is i. Initialize the dp array: Since the minimum value needs to be calculated, dp[i] is initialized to positive infinity. When i is 0, it means there are no insurance products to choose from, and 0 yuan needs to be paid.
[0084] For dp[i], the optimal insurance prices corresponding to the subsets of i have already been calculated at this time. Use the results of the subsets to find the minimum value that can be obtained for the current combination of i. Let sub be a subset of i, then the state transition equation is: dp[i] = min(dp[i], dp[i - sub] + dic[sub]).
[0085] Among them, dp[i] represents the minimum cost or optimal solution corresponding to the current combination i. sub is a subset of the current combination i, that is, the situation where some insurance products are selected from i. For the current combination i, its optimal solution dp[i] should be the currently known optimal solution dp[i], which is the minimum value between the optimal solution of the combination i - sub after removing the subset sub and the cost dic[sub] of the subset sub.
[0086] The calculation method of the subset is: sub = (sub - 1) & i. For example, i = (00011010)2, that is, the binary corresponding to i contains 3 ones, which means there are three kinds of insurance in i. The subset obtained in the first calculation is sub = (00011001)2 & (00011010)2 = (00011000)2. At this time, the state transition equation is: dp[(00011010)2] = min(dp[(00011010)2], dp[(00000010)2] + dic[(00011000)2]). Since there are 3 ones in i, it is necessary to enumerate 2 3 -1 subsets, and calculate the minimum value of dp[i] through the above state transition equation until the minimum value is obtained.
[0087] Calculate dp[i] one by one starting from dp[1] until dp[(1 << N) - 1] ((1 << N) - 1 represents a binary number with all 1s and a length of N), and obtain the optimal price for purchasing all insurance.
[0088] Starting from the initial state dp[1], gradually calculate the optimal solution for each possible combination i. (1 << N) - 1 is a bitwise operation, which represents the situation where the binary number of length N is all 1, that is, the state where all insurance products are selected. (1 << N) means shifting 1 to the left by N bits, getting 2 to the Nth power, and subtracting 1 to get the binary number with all 1s. The final dp[(1 << N) - 1]: This value represents the optimal price when all insurance products are selected. Through the recurrence and subset enumeration of dynamic programming, calculate the optimal solution of the combination selection.
[0089] Get the optimal price for purchasing all insurances: dp[(1 << N) - 1] calculated through the above steps is the minimum cost for purchasing all insurances.
[0090] To construct an insurance portfolio, we can reverse-derive from dp[(1 << N) - 1] using the backtracking method. If dp[i] == dp[i - sub] + dic[sub], it means the insurance product corresponding to sub has been selected; otherwise, it means the insurance product corresponding to the subset sub has not been selected, and sub is added to the insurance portfolio. Then continue to reverse-derive the construction plan for i - sub until backtracking to dp[0], and the optimal insurance portfolio can be obtained.
[0091] Example illustration: In the insurance field, assume there are three insurance products available for selection: life insurance, critical illness insurance, and accident insurance, and each insurance has its corresponding price. For example, the price of life insurance is 100 yuan, the price of critical illness insurance is 150 yuan, and the price of accident insurance is 80 yuan. In addition, there is an existing bundled sales combination with a price of 270 yuan, which includes the above three insurances.
[0092] The insurance product information collected by the system includes the name and price, and records the name and total price of the existing combinations. Binary identifiers are assigned to each insurance product and combination. For example, life insurance is 001, critical illness insurance is 010, accident insurance is 100, and the combination is 111. Create a status array to record the lowest price of all combinations, and the initial value is set to a maximum value. Initialize each element of the status array to the preset maximum value, indicating that the price of the insurance portfolio is unknown in the initial state. Based on the mapping relationship, the system enumerates all possible combinations through subsets, such as {life insurance}, {critical illness insurance}, {accident insurance}, {life insurance + critical illness insurance}, etc., and updates the combination price using the state transition equation.
[0093] Finally, backtrack from the status array to identify the combination with the lowest price. For example, it is found that the combination of selecting life insurance, critical illness insurance, and accident insurance is the optimal combination with a price of 270 yuan.
[0094] By backtracking from the status array and determining the specific insurance products of the optimal promotional product combination, the system can effectively identify the combination corresponding to the lowest price and provide a clear and accurate insurance plan.
[0095] The present invention relates to the fields of data analysis technology and financial technology, and discloses a method for outputting promotional products based on subset enumeration, by collecting information on insurance products participating in promotional activities and relevant data on existing bundled sales combinations; assigning binary identifiers to each insurance product and bundled combination, and establishing a mapping relationship between the identifier and the product and price; defining a state array to record the lowest price of all insurance combinations represented by the binary identifier, and initializing the array to a preset maximum value; based on the mapping relationship, analyzing all possible insurance combinations through subset enumeration and state transition equations, and finally backtracking from the state array to determine the final optimal insurance combination and its corresponding lowest price. The present invention realizes the optimal combination selection of insurance product bundled sales by adopting subset enumeration and dynamic programming algorithms, optimizes the cost-effectiveness of insurance purchases, and enables the most attractive product combination to be quickly identified. In addition, the dynamically adjusted state array effectively reduces the computational complexity and improves the decision response speed.
[0096] In one embodiment, the above S20 includes:
[0097] S201, using an identifier generator to generate a unique binary identifier for each insurance product and bundled insurance combination;
[0098] S202, creating a mapping table to associate each binary identifier with a corresponding insurance product or insurance combination;
[0099] S203, in the mapping table, associating corresponding price information with the binary identifier of each insurance product or insurance combination;
[0100] S204: Store the mapping table in a memory, and assign a unique index number to each entry in the mapping table.
[0101] In this embodiment, assigning a unique binary identifier to each insurance product and bundled sales combination is the basis for ensuring effective and efficient data management. This identifier not only simplifies data storage, but also speeds up subsequent retrieval and analysis.
[0102] Different generation algorithms can be selected according to needs, such as sequential numbering, random number generation or hash function. Sequential numbering is suitable for situations with a small number of products, which facilitates subsequent sorting and retrieval; random generation can adapt to more complex product combinations and reduce the probability of conflicts; hash functions are very efficient, especially when large-scale data processing can quickly generate unique identifiers. Each insurance product and combination can be traversed, and the corresponding binary string can be generated through the identifier generator. For example, the random number library or built-in hash function of the programming language can be used to generate identifiers to ensure that each identifier meets the uniqueness and stability requirements.
[0103] By associating each binary identifier with the corresponding insurance product and combination through a mapping table, data can be managed and accessed efficiently. This structure allows the corresponding information to be found quickly when searching for a specific product, avoiding the inefficiency of one-by-one comparison.
[0104] The mapping table can use a dictionary, hash table or simple list. Each entry should include binary identification, insurance product name, combination type, price and other information. The design should take into account access efficiency and data volume to ensure that the structure of the table can adapt to future expansion. After generating the identification, enter the name, price and other information of each insurance product into the mapping table one by one to ensure that each binary identification can accurately correspond to the corresponding product. This process can be achieved through programming loops, making the establishment of mapping fast and systematic.
[0105] Associating the price information of each insurance product and bundle with its binary identifier facilitates subsequent price analysis and optimal combination output. This association ensures that the system can quickly access relevant price information when processing data.
[0106] Add a price field to each entry in the mapping table to ensure that the price information of each insurance product is available in the database in real time. This requires systematic recording at the stage of product information collection to avoid subsequent omissions. Regularly review and update the price information in the mapping table to ensure the accuracy and timeliness of the data. Automatic price updates can be achieved by comparing with external data sources.
[0107] Storing the mapping table in memory and assigning a unique index to each entry helps improve data access speed and efficiency. With the index, the system can quickly locate specific product or combination information, significantly reducing data retrieval time.
[0108] According to the data size and access frequency, choose the appropriate memory storage structure, such as array, linked list or tree structure, to optimize the data access speed. Assign a unique index number to each entry in the mapping table, which can be achieved by a simple incrementing counter. In the implementation process, the database index mechanism can be used to facilitate more efficient data management and access.
[0109] An entry in a mapping table refers to the information contained in each row or item in the mapping table, which associates a specific binary identifier with the relevant attributes of an insurance product or bundle. The specific content of each entry usually includes:
[0110] Binary Identifier: A unique binary string that identifies a specific insurance product or portfolio.
[0111] Insurance Name: The name of the insurance product corresponding to this logo.
[0112] Insurance type or combination type: Indicates whether the entry is a single insurance product or a bundled insurance combination.
[0113] Price information: price data related to the insurance product or package, usually the unit price of the insurance or the total price of the package.
[0114] Index Number: A unique index number assigned to each entry for quick retrieval and management.
[0115] Example description: In the financial field, suppose an insurance company wants to launch a new health insurance package. The company uses an identifier generator to generate a unique binary identifier for each insurance product, such as hospitalization insurance, outpatient insurance, and critical illness insurance. These identifiers are stored in a mapping table and associated with the name and price of each product. For example, the identifier of hospitalization insurance is "0001" and the price is 500 yuan. Next, the company associates price information with the identifier of each product in the mapping table. Finally, the mapping table is stored in memory and an index is assigned to each entry to quickly find and display the prices of different insurance combinations in promotional activities, thereby optimizing the customer experience and improving sales efficiency.
[0116] This embodiment significantly improves the efficiency and accuracy of data management by generating a unique binary identifier for each insurance product and bundled sales combination and establishing a systematic mapping relationship, making data retrieval more efficient, information association more accurate, and easy to expand and maintain.
[0117] In one embodiment, the above S30 includes:
[0118] S301, determining the total number of insurance products participating in the promotion activity;
[0119] S302, setting the size of the state array to the number of all combinations that can be formed by the number of insurance products, where the number of all combinations is 2 raised to the power of the total number of insurance products;
[0120] S303, defining a composite data structure for each index of the status array, the composite data structure comprising a numerical field and a status field, the numerical field being used to store the lowest price of the corresponding insurance combination, and the status field being used to indicate whether the lowest price of the corresponding insurance combination has been determined.
[0121] In this embodiment, the number of all insurance products currently participating in the promotion is accurately counted to provide the necessary data basis for the construction of the state array. Through accurate numbers, it can be ensured that no product is missed in the subsequent combination calculation.
[0122] The system scans all insurance products participating in the promotion, uses a loop structure to check each insurance product one by one, and calculates the total number. For example, a counter variable is initialized to zero, and when traversing the list of insurance products, the counter is incremented by one each time an insurance product is found. When insurance products are added or removed, the system updates the total number in real time to ensure that the data always reflects the current status. This can be achieved by listening to data change events.
[0123] The size of the state array is set to the number of all possible combinations of the number of insurance products, that is, 2 to the power of the total number of insurance products, that is, the dimension of the state array is set to a power of 2, so that each array index corresponds to all possible insurance combinations. In this way, the characteristics of binary coding can be fully utilized to effectively manage the state and price information of the combination.
[0124] The length of the state array is determined by calculating the total number of insurance products raised to the power of 2. For example, if the total number of participating insurance products is 3, the dimension of the state array should be 2^3, which is 8. This can be achieved through simple mathematical operations. After the dimensions are calculated, the state array is dynamically created to ensure that each index can store the corresponding combination information. The length of this array should match the above calculation result to provide enough space for subsequent storage.
[0125] A composite data structure is defined for each index in the status array to store the lowest price and status information of the insurance portfolio corresponding to the index. This design makes portfolio management more flexible and intuitive, and facilitates subsequent operations.
[0126] In programming, you can create a structure or class that contains two fields: a numeric field (used to store the lowest price of the corresponding insurance combination) and a status field (used to indicate whether the lowest price of the combination has been determined). For example, the numeric field can be a floating point type, and the status field can be a Boolean type. After initializing the state array, assign an instance of the above composite data structure to each index to ensure that each combination has corresponding price and status information. The initial state can be set to undetermined, and the price field can be set to a maximum value to indicate that it is uninitialized.
[0127] Example: Assume that an insurance company is launching three insurance products: life insurance, accident insurance, and health insurance. Through statistics, it is determined that the total number of insurance products participating in the promotion is 3. According to the calculation, the dimension of the state array is set to 2 to the power of 3, that is, 8. A composite data structure is created for each combination, and each index of the array can store the minimum price and status information of the combination. This design not only makes the management of insurance combinations more efficient, but also lays a solid foundation for subsequent price optimization and decision support.
[0128] This embodiment effectively manages the combined price and status of insurance products by defining a state array, thereby improving the efficiency of insurance combination analysis. First, accurately counting the total number of insurance products participating in the promotion provides a reliable basis for subsequent operations. Second, by setting the dimension of the state array to a power of 2, the characteristics of binary identification are fully utilized to simplify the complexity of combination calculation. In addition, a composite data structure is defined for each index, making the management of the lowest price and status information more flexible and intuitive.
[0129] In one embodiment, the above S40 includes:
[0130] S401, selecting a value as a preset maximum value, wherein the preset maximum value is greater than the price of any insurance combination;
[0131] S402, setting each element of the state array to the preset maximum value to indicate that the price of the insurance combination is unknown in the initial state;
[0132] S403, setting a specific element representing an empty combination in the state array to zero.
[0133] In this embodiment, when initializing the state array, a preset maximum value is selected to ensure that this value is higher than any possible insurance combination price. This design can effectively prevent erroneous minimum price records and provide a reference benchmark for subsequent comparisons.
[0134] By investigating the price range of existing insurance products in advance, a value outside the range can be selected as the preset maximum value. For example, if the highest insurance combination price is 5000, 6000 can be selected as the maximum value. In actual applications, the system can obtain the highest price of all current insurance combinations from the database and add a constant to determine the preset maximum value.
[0135] Initialize all elements of the state array to the preset maximum value to indicate that the prices of all combinations have not yet been determined in the current state. This process provides a unified starting point for subsequent price comparisons and updates.
[0136] Use a loop structure to traverse the state array and assign each element to the preset maximum value one by one. This can be achieved with a simple for loop, ensuring that each index is assigned the same initial value. In some programming languages, you can use the array fill function to set the value of the entire array to the preset maximum value at once to improve efficiency.
[0137] Certain elements are set to zero to identify the situation where there is no insurance product combination. This design makes it easy to identify the state without any insurance in subsequent combination calculations.
[0138] In the state array, index 0 is usually set as a specific element of the empty combination. When the system is initialized, it directly accesses this index position and sets its value to zero. In the subsequent calculation process, the value of this element remains zero to indicate the state of no product combination, which is convenient for judgment and processing in the combination logic.
[0139] Example description: In a new promotion launched by an insurance company, there are five insurance products involved: life insurance, critical illness insurance, accident insurance, travel insurance, and car insurance. In order to determine the optimal bundle combination, the system first needs to collect the prices of these products and initialize the state array.
[0140] Assume that through market research, it is found that the highest price of all possible insurance combinations is 4,500 yuan, so the system selects 5,000 yuan as the preset maximum value to ensure that it is higher than any known combination price. The system creates a state array with a length of 32 (that is, 2 to the fifth power) and uses a loop to set each element to 5,000 yuan, indicating that the combination price is unknown in the initial state. In the state array, index 0 represents an empty combination, and the system sets the value of this index to 0, indicating that the combination without selecting any insurance product is free.
[0141] This embodiment achieves high flexibility and accuracy in analyzing the lowest price of insurance combinations by initializing each element of the state array to a preset maximum value and setting the specific element representing an empty combination to zero. This effectively prevents the introduction of erroneous data and provides a clear starting point for subsequent price updates and comparisons. This initialization strategy not only enhances the stability of the system, but also improves the effectiveness of decision support, allowing insurance companies to respond to market demand more quickly.
[0142] In one embodiment, the above S50 includes:
[0143] S501, using subset enumeration technology to generate all subsets of each insurance combination;
[0144] S502, analyzing the lowest price of each insurance combination and all corresponding subsets using a state transition equation;
[0145] S503, during the analysis process, query the current lowest price of each subset through the mapping relationship, and compare it with the price obtained through the state transition equation analysis;
[0146] S504: According to the comparison result, if the newly determined price is lower than the current lowest price currently recorded, the lowest price of the corresponding insurance combination is updated in the state array.
[0147] In this embodiment, the subset enumeration technique is used to generate all possible insurance combinations participating in the promotion, and each subset represents a different product combination. This process ensures that all possible insurance combinations are considered, which is convenient for subsequent calculation of the lowest price.
[0148] Use the binary bit mask method to map each insurance product to a binary bit. For example, if there are five insurance products, use a five-bit binary number (00000 to 11111) to indicate whether the corresponding product is selected. The subset corresponding to each binary number is a combination, and all combinations are traversed to generate possible product combinations. Design a recursive function, passing in the current product list and the selected combination. In each layer of recursion, decide whether to add the current product to the combination until all products are traversed. This method ensures that the generated combinations are non-repetitive and cover all possibilities.
[0149] The state transition equation is the core of dynamic programming. By defining the relationship between the lowest price of each combination and its subset, the optimal solution can be gradually determined. This method significantly improves efficiency.
[0150] Construct a state transition equation and define the lowest price of the current combination as the lowest price of the known subset plus the current price of the newly added insurance. For example, if the price of combination A is X, and the lowest price of its subset B is Y, then it can be concluded that the price of A is Y + the current price of the newly added insurance. Such a design helps to derive new results from known results. Each time a new combination is analyzed, the mapping relationship is used to query the lowest price of the current subset. By comparing the newly calculated price with the currently stored price, if the new price is lower, the lowest price of the corresponding combination in the state array is updated. This strategy ensures the real-time and accuracy of price updates.
[0151] Using the previously established mapping table, quickly locate the current lowest price of each subset. This process avoids repeated calculations and improves efficiency. For example, if combination C contains subset D, the price of D can be directly obtained through the mapping table without recalculation.
[0152] After obtaining the subset price, a logical comparison is performed: if the new price obtained through the state transition equation is lower than the currently recorded lowest price, the state array is updated. The key to this operation is to ensure the consistency of price information so as to effectively reflect the true cost of the combination.
[0153] Example description: Assume that an insurance company offers five insurance products: life insurance, critical illness insurance, accident insurance, auto insurance, and health insurance. Through subset enumeration, the company generates all possible combinations, such as "life insurance + critical illness insurance", "accident insurance + auto insurance", etc. When analyzing the lowest prices of these combinations, assume that the combined price of "life insurance + critical illness insurance" is 3,000 yuan, while the price of purchasing "life insurance" alone is 2,500 yuan, and the price of purchasing "critical illness insurance" alone is 2,000 yuan. By comparing these prices, the insurance company can find that the price of the combination is actually lower than the sum of the two insurances purchased separately, and thus judge that the combination is attractive.
[0154] Next, the insurance company will use the state transition equation to analyze other combinations, such as "accident insurance + auto insurance". If the combined price of these two insurances is 1,800 yuan, while the separate price of "accident insurance" is 1,000 yuan, and the separate price of "auto insurance" is 900 yuan, the insurance company can conclude that the price of this combination is also competitive.
[0155] Through the above steps, this embodiment can more systematically evaluate and optimize the insurance combination for bundled sales, ensuring that customers can obtain the most cost-effective products, thereby improving decision-making efficiency, reducing manual intervention, and optimizing the scientific nature of sales strategies.
[0156] In one embodiment, the above S60 includes:
[0157] S601, executing a backtracking process starting from the end state representing that all insurance products are selected in the state array;
[0158] S602, in the backtracking process, comparing the lowest price of the subset with the lowest price of the current state, and identifying the insurance products that constitute the lowest price combination;
[0159] S603, recording the binary identifiers of the insurance products constituting the lowest price combination;
[0160] S604, converting the recorded binary identifier back to the corresponding insurance product name and price to construct the optimal insurance combination;
[0161] S605, outputting detailed information of the optimal insurance combination, wherein the detailed information includes the name of each insurance product in the optimal insurance combination and the total minimum price of the combination.
[0162] In this embodiment, the backtracking process starts from the end state in the state array, which indicates that all insurance products have been selected. This process is intended to systematically backtrack to identify the specific insurance products that form the best combination and ultimately determine the lowest price combination.
[0163] In the state array, the end state is usually represented as all 1s in binary form. For example, for five insurance products, the end state corresponds to index 31 (i.e. binary 11111), indicating that all products are selected. The index of the end state is determined by calculating the power of 2 of the number of products. Starting from this end state, set a loop and backtrack step by step. Each time you backtrack, check the relationship between the current state and its parent state, record the selected insurance products, and update the price information of the combination during the backtracking process.
[0164] Each step in the backtracking process compares the lowest prices of different subsets to identify the specific insurance products that constitute the lowest price combination. This process ensures that the system can accurately identify the lowest-cost insurance combination and avoid unnecessary losses.
[0165] At each step of the backtracking, extract the lowest price of the current state and the lowest price of each associated subset. Use conditional judgment statements to compare the price of the newly discovered subset with the current combination price to determine whether the combination needs to be updated. When it is found that the price of a subset is lower than the current combination price, record the insurance product corresponding to the subset, and it may be necessary to save its related binary identification and price information to build the optimal combination later.
[0166] During the tracing process, the binary identification of each identified insurance product is recorded to facilitate subsequent conversion into specific product information. This identification not only provides uniqueness for the insurance product, but also provides a basis for subsequent analysis and display.
[0167] Create a dynamic array or list specifically for storing the binary IDs of identified insurance products. When a new product is identified, add its ID to the list to ensure uniqueness of the product ID. During the backtracking process, each time a new product is identified, use the list append operation to add the new ID to the record so that the complete optimal combination can be constructed in the end.
[0168] The recorded binary identifiers are converted into the corresponding insurance product names and their prices to construct the final optimal insurance combination. This process provides direct information for the presentation of the final results.
[0169] Use the mapping relationship to associate the stored binary identifiers with the corresponding insurance product names and prices. You can quickly search through the pre-established mapping table. Traverse the stored binary identifiers and use the mapping relationship to convert them into product names and prices one by one, eventually forming a complete insurance product combination and calculating the total price of the combination.
[0170] Example description: Assume that an insurance company has five products: life insurance, critical illness insurance, accident insurance, auto insurance, and health insurance. After subset enumeration, the company generated all possible combinations. Through state transition equation analysis, it is assumed that the lowest price of the combination of "life insurance + critical illness insurance" is 3,000 yuan. When backtracking, the system starts from the end state of the state array and gradually identifies the products that make up the lowest price combination, such as the binary identifiers of life insurance and critical illness insurance. Ultimately, these identifiers are converted into product names and output as "life insurance" and "critical illness insurance", with a total price of 3,000 yuan. Through this process, insurance companies can quickly find the best combination with the lowest price and formulate corresponding sales strategies.
[0171] This embodiment can systematically determine the lowest price of all insurance products by backtracking from the state array to identify the optimal promotional product combination. It effectively integrates the pricing information of different combinations, ensuring that insurance companies can quickly find the best sales plan, optimize product combinations to meet customer needs, and improve market competitiveness. This not only reduces the decision-making cost of customers, but also provides a scientific basis for insurance companies, which helps to improve overall business benefits.
[0172] In one embodiment, in the above S10, collecting information of insurance products participating in the promotion activity includes:
[0173] S101, screening data sources for obtaining promotional insurance product information based on data timeliness, accuracy, reliability and completeness standards;
[0174] S102, verifying the stability and data quality of the data source by checking the historical records and update frequency of the data source;
[0175] S103, determining the time frequency, data set scope and detail level of data collection, and generating a data collection strategy;
[0176] S104, based on the data collection strategy, extract insurance product information from the data source using a web crawler or an API interface.
[0177] In this embodiment, screening data sources is the basis for ensuring subsequent analysis and decision-making. High-quality data sources can provide the latest and most relevant insurance product information, thereby improving the effectiveness and accuracy of the output system.
[0178] Set specific evaluation indicators, such as data update frequency (e.g. daily, weekly), the authority of data sources (e.g. official agencies, industry reports), and the completeness of data content (whether all necessary fields are included). By scoring and ranking different data sources, select the best data source that meets the standards, and use industry surveys and user feedback to assist in judgment.
[0179] Verifying the stability and quality of data sources is an important step to ensure that the collected information is accurate and reliable. Only verified data sources can be used for analysis to avoid decision-making errors due to data quality issues.
[0180] Conduct a detailed analysis of the historical updates of the selected data source, including the timestamps of the updates, the content of the updates, and the frequency of the updates. Data visualization tools can be used to display update trends. Use sampling inspection methods to regularly check the accuracy of the data, such as by comparing with other authoritative data sources to calculate data consistency and error rates.
[0181] Clarify the specific plan for data collection to ensure efficient information collection at the appropriate time and scope, and improve data processing efficiency. Combine market demand, data source update frequency and product characteristics to reasonably arrange the frequency of data collection to ensure data freshness. Determine the types of insurance products that need to be collected, relevant fields (such as price, coverage, terms and conditions, etc.) and collection methods (such as comprehensive collection or focusing on certain products) based on product requirements.
[0182] Design and implement crawler programs to automatically crawl insurance product information on web pages and handle the compatibility of different web page structures. Use the API interface provided by the data source to write code to automatically extract the required information to ensure real-time update and accuracy of the data.
[0183] This embodiment can obtain high-quality insurance product information through a systematic data collection process, ensure the timeliness and accuracy of data, reduce information distortion, improve decision-making efficiency, help formulate more effective market strategies, and thus enhance competitive advantages.
[0184] In one embodiment, a device for outputting promotional products based on subset enumeration is provided, and the device for outputting promotional products based on subset enumeration corresponds one-to-one to the method for outputting promotional products based on subset enumeration in the above-mentioned embodiment. Figure 3 , Figure 3 This is a functional module diagram of a preferred embodiment of the output device for promotional products based on subset enumeration of the present invention. It includes a data collection module 10, an identification allocation module 20, a state array definition module 30, a state array initialization module 40, a combination analysis module 50 and a result backtracking module 60. The functional modules are described in detail as follows:
[0185] The data collection module 10 is used to collect information about insurance products participating in the promotional activities, including insurance names and corresponding unit prices, and insurance names and total prices included in existing bundled insurance packages;
[0186] The identification allocation module 20 is used to allocate a binary identification to each individual insurance product and each existing bundled insurance combination, and establish a mapping relationship between the binary identification and the insurance product and insurance combination and the corresponding price;
[0187] A state array definition module 30, used to define a state array for recording the lowest prices of all insurance combinations represented by binary identifiers;
[0188] A state array initialization module 40, used to initialize each element of the state array to a preset maximum value, wherein the preset maximum value indicates that the price of the insurance combination is unknown in the initial state;
[0189] A combination analysis module 50, for analyzing the lowest prices of all insurance combinations through subset enumeration and state transition equations based on the mapping relationship;
[0190] The result backtracking module 60 is used to backtrack from the state array, determine the specific insurance products that constitute the optimal promotional product combination in sequence, until the final optimal insurance combination is confirmed, and output the optimal insurance combination and the corresponding lowest price.
[0191] In one embodiment, the identification allocation module 20 is specifically configured to:
[0192] Generate a unique binary identifier for each insurance product and bundle using an identifier generator;
[0193] Create a mapping table to associate each binary identifier with the corresponding insurance product or insurance combination;
[0194] In the mapping table, the corresponding price information is associated with the binary identifier of each insurance product or insurance combination;
[0195] The mapping table is stored in a memory, and a unique index number is assigned to each entry in the mapping table.
[0196] In one embodiment, the state array definition module 30 is specifically used to:
[0197] Determine the total number of insurance products participating in the promotion;
[0198] The size of the state array is set to the number of all combinations that can be formed by the number of insurance products, where the number of all combinations is 2 raised to the power of the total number of insurance products;
[0199] A composite data structure is defined for each index of the status array, the composite data structure comprising a value field and a status field, the value field being used to store the lowest price of the corresponding insurance combination, and the status field being used to indicate whether the lowest price of the corresponding insurance combination has been determined.
[0200] In one embodiment, the state array initialization module 40 is specifically used to:
[0201] Selecting a value as a preset maximum value, wherein the preset maximum value is greater than the price of any insurance combination;
[0202] Setting each element of the state array to the preset maximum value to indicate that the price of the insurance combination is unknown in the initial state;
[0203] The specific element in the state array representing the empty combination is set to zero.
[0204] In one embodiment, the combined analysis module 50 is specifically configured to:
[0205] Using subset enumeration technology, all subsets of each insurance combination are generated;
[0206] Use the state transition equation to analyze each insurance combination and the lowest price of all corresponding subsets;
[0207] During the analysis, the current lowest price of each subset is queried through the mapping relationship and compared with the price obtained through the state transition equation analysis;
[0208] According to the comparison result, if the newly determined price is lower than the current lowest price currently recorded, the lowest price of the corresponding insurance combination is updated in the state array.
[0209] In one embodiment, the result backtracking module 60 is specifically used to:
[0210] Execute the backtracking process starting from the end state in the state array representing that all insurance products are selected;
[0211] In the backtracking process, the lowest price of the subset is compared with the lowest price of the current state to identify the insurance products that constitute the lowest price combination;
[0212] Recording the binary identifiers of the insurance products that constitute the lowest price combination;
[0213] Convert the recorded binary identifiers back to the corresponding insurance product names and prices to construct the optimal insurance portfolio;
[0214] Output detailed information of the optimal insurance combination, wherein the detailed information includes the name of each insurance product in the optimal insurance combination and the total minimum price of the combination.
[0215] In one embodiment, the data collection module 10 is specifically used for:
[0216] Screen the data sources used to obtain insurance product information for promotional activities based on the criteria of timeliness, accuracy, reliability and completeness of the data;
[0217] Verify the stability and data quality of the data source by checking the historical records and update frequency of the data source;
[0218] Determine the frequency of data collection, the scope of the data set, and the level of detail to generate a data collection strategy;
[0219] Based on the data collection strategy, insurance product information is extracted from the data source using a web crawler or an API interface.
[0220] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client through a network connection. When the computer program is executed by the processor, the functions or steps on the service side of a method for outputting promotional products based on subset enumeration are realized.
[0221] In one embodiment, a computer device is provided. The computer device may be a client, and its internal structure diagram may be as follows: Figure 5 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server through a network connection. When the computer program is executed by the processor, the client-side functions or steps of a method for outputting promotional products based on subset enumeration are implemented.
[0222] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0223] Collect information about insurance products participating in promotional activities, including insurance names and corresponding unit prices, as well as insurance names and total prices included in existing bundled insurance packages;
[0224] Assign a binary identifier to each individual insurance product and each existing bundled insurance combination, and establish a mapping relationship between the binary identifier and the insurance product and insurance combination and the corresponding price;
[0225] Define a state array for recording the lowest prices of all insurance combinations represented by binary identifiers;
[0226] Initializing each element of the state array to a preset maximum value, wherein the preset maximum value indicates that the price of the insurance combination is unknown in the initial state;
[0227] Based on the mapping relationship, the lowest prices of all insurance combinations are analyzed through subset enumeration and state transition equations;
[0228] Backtracking from the state array, the specific insurance products constituting the optimal promotional product combination are determined in sequence until the final optimal insurance combination is confirmed, and the optimal insurance combination and the corresponding minimum price are output.
[0229] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0230] Collect information about insurance products participating in promotional activities, including insurance names and corresponding unit prices, as well as insurance names and total prices included in existing bundled insurance packages;
[0231] Assign a binary identifier to each individual insurance product and each existing bundled insurance combination, and establish a mapping relationship between the binary identifier and the insurance product and insurance combination and the corresponding price;
[0232] Define a state array for recording the lowest prices of all insurance combinations represented by binary identifiers;
[0233] Initializing each element of the state array to a preset maximum value, wherein the preset maximum value indicates that the price of the insurance combination is unknown in the initial state;
[0234] Based on the mapping relationship, the lowest prices of all insurance combinations are analyzed through subset enumeration and state transition equations;
[0235] Backtracking from the state array, the specific insurance products constituting the optimal promotional product combination are determined in sequence until the final optimal insurance combination is confirmed, and the optimal insurance combination and the corresponding minimum price are output.
[0236] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can refer to the relevant descriptions on the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.
[0237] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0238] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0239] It should be noted that if software tools or components other than those of the Company appear in the embodiments of the present application, they are only used for illustration and do not represent actual use. The above-described embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the above-mentioned embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the above-mentioned embodiments can still be modified, or some of the technical features thereof can be replaced by equivalents; and these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A method for outputting promotional products based on subset enumeration, characterized in that: The following steps are involved: Collect information about insurance products participating in promotional activities, including insurance names and corresponding unit prices, as well as insurance names and total prices included in existing bundled insurance packages; Assign a binary identifier to each individual insurance product and each existing bundled insurance combination, and establish a mapping relationship between the binary identifier and the insurance product and insurance combination and the corresponding price; Define a state array for recording the lowest prices of all insurance combinations represented by binary identifiers; Initializing each element of the state array to a preset maximum value, wherein the preset maximum value indicates that the price of the insurance combination is unknown in the initial state; Based on the mapping relationship, the lowest prices of all insurance combinations are analyzed through subset enumeration and state transition equations; Backtracking from the state array, the specific insurance products constituting the optimal promotional product combination are determined in sequence until the final optimal insurance combination is confirmed, and the optimal insurance combination and the corresponding minimum price are output.
2. The method for outputting promotional products based on subset enumeration as claimed in claim 1, characterized in that: Assign a binary identifier to each individual insurance product and each existing bundled insurance combination, and establish a mapping relationship between the binary identifier and the insurance product and insurance combination and the corresponding price, including: Generate a unique binary identifier for each insurance product and bundle using an identifier generator; Create a mapping table to associate each binary identifier with the corresponding insurance product or insurance combination; In the mapping table, the corresponding price information is associated with the binary identifier of each insurance product or insurance combination; The mapping table is stored in a memory, and a unique index number is assigned to each entry in the mapping table.
3. The method for outputting promotional products based on subset enumeration as claimed in claim 1, characterized in that: Define a state array for recording the lowest prices of all insurance combinations represented by binary identifiers, including: Determine the total number of insurance products participating in the promotion; The size of the state array is set to the number of all possible combinations of insurance products, where the number of all possible combinations is 2 raised to the power of the total number of insurance products; A composite data structure is defined for each index of the status array, the composite data structure comprising a value field and a status field, the value field being used to store the lowest price of the corresponding insurance combination, and the status field being used to indicate whether the lowest price of the corresponding insurance combination has been determined.
4. The method for outputting promotional products based on subset enumeration according to claim 1, characterized in that: Initializing each element of the state array to a preset maximum value, wherein the preset maximum value indicates that the price of the insurance combination is unknown in the initial state, includes: Selecting a value as a preset maximum value, wherein the preset maximum value is greater than the price of any insurance combination; Setting each element of the state array to the preset maximum value to indicate that the price of the insurance combination is unknown in the initial state; The specific element in the state array representing the empty combination is set to zero.
5. The method for outputting promotional products based on subset enumeration as claimed in claim 1, characterized in that: Based on the mapping relationship, the lowest prices of all insurance combinations are analyzed through subset enumeration and state transition equations, including: Using subset enumeration technology, all subsets of each insurance combination are generated; Use the state transition equation to analyze each insurance combination and the lowest price of all corresponding subsets; During the analysis, the current lowest price of each subset is queried through the mapping relationship and compared with the price obtained through the state transition equation analysis; According to the comparison result, if the newly determined price is lower than the current lowest price currently recorded, the lowest price of the corresponding insurance combination is updated in the state array.
6. The method for outputting promotional products based on subset enumeration according to claim 1, characterized in that: Backtracking from the state array, determining the specific insurance products that constitute the optimal promotional product combination in sequence, until the final optimal insurance combination is determined, and outputting the optimal insurance combination and the corresponding minimum price, including: Execute the backtracking process starting from the end state in the state array representing that all insurance products are selected; In the backtracking process, the lowest price of the subset is compared with the lowest price of the current state to identify the insurance products that constitute the lowest price combination; Recording the binary identifiers of the insurance products that constitute the lowest price combination; Convert the recorded binary identifiers back to the corresponding insurance product names and prices to construct the optimal insurance portfolio; Output detailed information of the optimal insurance combination, wherein the detailed information includes the name of each insurance product in the optimal insurance combination and the total minimum price of the combination.
7. The method for outputting promotional products based on subset enumeration according to claim 1, characterized in that: Collect information about insurance products participating in promotional activities, including: Screen the data sources used to obtain insurance product information for promotional activities based on the criteria of timeliness, accuracy, reliability and completeness of the data; Verify the stability and data quality of the data source by checking the historical records and update frequency of the data source; Determine the frequency of data collection, the scope of the data set, and the level of detail to generate a data collection strategy; Based on the data collection strategy, insurance product information is extracted from the data source using a web crawler or an API interface.
8. An output device for promotional products based on subset enumeration, characterized in that: The output device of the promotional product based on subset enumeration includes: A data collection module is used to collect information about insurance products participating in the promotional activities, including insurance names and corresponding unit prices, as well as insurance names and total prices included in existing bundled insurance packages; An identification allocation module, used to allocate a binary identification to each individual insurance product and each existing bundled insurance combination, and establish a mapping relationship between the binary identification and the insurance product and insurance combination and the corresponding price; A state array definition module, used for defining a state array for recording the lowest prices of all insurance combinations represented by binary identifiers; A state array initialization module, used to initialize each element of the state array to a preset maximum value, wherein the preset maximum value indicates that the price of the insurance combination is unknown in the initial state; A combination analysis module, used for analyzing the lowest prices of all insurance combinations through subset enumeration and state transition equations based on the mapping relationship; The result backtracking module is used to backtrack from the state array, determine the specific insurance products that constitute the optimal promotional product combination in sequence, until the final optimal insurance combination is confirmed, and output the optimal insurance combination and the corresponding lowest price.
9. A computer device, characterized in that: The computer device includes a memory, a processor, and an output program for promotional products based on subset enumeration stored in the memory and executable on the processor. When the output program for promotional products based on subset enumeration is executed by the processor, the steps of the method for outputting promotional products based on subset enumeration as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The storage medium stores a promotional product output program based on subset enumeration, and when the promotional product output program based on subset enumeration is executed by a processor, the steps of the promotional product output method based on subset enumeration as described in any one of claims 1-7 are implemented.