Marketing data distribution method based on network flow algorithm
By transforming the marketing data allocation problem into a network flow model with capacity constraints and using the Edmond-Karp algorithm to solve it, the problems of inefficient data allocation and subjective impact in the existing technology are solved, efficient and refined data allocation is achieved, and marketing strategies and effects are optimized.
Patent Information
- Application Number
- CN202411805922.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-03-14
AI Technical Summary
The existing marketing data allocation methods are difficult to effectively adapt to complex marketing data and strategy changes, resulting in inefficient data allocation, susceptible to subjective factors, and cannot meet the needs of enterprises for refined data management and optimization.
The network flow algorithm is used to transform the marketing data allocation problem into a network flow model with capacity constraints, and solve it through the Edmond-Karp algorithm to achieve efficient allocation of marketing data.
It significantly improves the efficiency and refined management level of data allocation, enhances the system's adaptability and flexibility to dynamic changes in marketing data and strategies, avoids the subjective impact of manual allocation, ensures the objectivity and fairness of allocation results, and thus optimizes the formulation and marketing effect of marketing strategies.
Smart Images

Figure CN119624506A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of digital sales, and in particular, relates to a marketing data distribution method based on a network flow algorithm. Background Art
[0002] Marketing data is defined as a series of population sets, which are divided according to the characteristics and behavioral preferences of different populations. The data in each set follows the independent and identically distributed assumption to ensure the consistency and reliability of the data; and different sets represent population groups with distinct characteristics. Marketing strategies are personalized marketing plans tailored based on these diverse marketing data, including but not limited to voice, text, and speech. A marketing strategy can be flexibly applied to multiple sets of similar marketing data to achieve economies of scale; but at the same time, for data sets with different characteristics, marketing strategies need to be adjusted accordingly to reflect their differences and targeting. Data allocation is a refined management process that scientifically and reasonably allocates multiple sets of marketing data to various marketing plans according to the specific needs of the marketing strategy. This process aims to ensure that each marketing plan can obtain sufficient and highly relevant data support. At the same time, by optimizing resource allocation, the overall utilization efficiency of marketing data is maximized to promote the successful implementation and effectiveness of marketing activities.
[0003] In the process of data allocation, each set of marketing data may be allocated to multiple marketing strategies, and each marketing strategy may also obtain available data from multiple sets of marketing data. There may be several restrictions in the allocation process, such as a certain strategy can only obtain available data from certain sets of data, or certain data can only be used for certain strategies, or the amount of available data obtained by a certain strategy on a certain set of data must not exceed a certain threshold. This brings about the complexity of data allocation. In traditional data allocation schemes, data allocation is based on manual experience or simple priority settings, which is difficult to adapt to the complex changes in marketing data and strategies, is often inefficient, and is easily affected by subjective factors, resulting in unreasonable data allocation and waste of marketing resources, and cannot meet the needs of enterprises for refined data management and optimization. Summary of the invention
[0004] In view of the problems of existing marketing data distribution methods, the present invention provides a marketing data distribution method based on a network flow algorithm.
[0005] In order to achieve the above technical objectives, the technical solution adopted by the present invention is as follows:
[0006] A marketing data distribution method based on a network flow algorithm comprises the following steps:
[0007] S1. Obtain marketing data from the data source and convert it into a binary representation:
[0008] S2, obtain marketing strategies from data sources and convert them into triple representation: T(l,h,x);
[0009] S3, obtaining the distributable relationship between marketing data and marketing strategies from the configuration file and converting it into constraint conditions P;
[0010] S4. Define the network source point S, connect the network source point S with each marketing data node D, and initialize the capacity w;
[0011] S5. Define the network sink E, connect the network sink to each marketing strategy node T, and initialize the capacity w;
[0012] S6. Initialize edges in the marketing data node D and the marketing strategy node T according to the constraint P;
[0013] S7. For nodes that are connected to the marketing data node D and the marketing strategy node T, further determine whether r is between [l, h], adjust the capacity w, and the network flow model is initialized;
[0014] S8. Use the Edmond-Karp algorithm to solve the network flow model and obtain the marketing data distribution results.
[0015] Furthermore, after completing the network initialization in step S7, the Edmond-Karp algorithm is used to solve the network flow model;
[0016] The Edmond-Karp algorithm solution steps are:
[0017] Initialize the residual network to the original network;
[0018] Find the augmenting path and use BFS to search for the path from the source to the sink on the residual network. If no path is found, the algorithm ends and the current flow is the maximum flow.
[0019] Determine the minimum residual capacity on the augmented path as the augmentation amount, increase the flow of each edge on the path, and update the residual network and add reverse edges;
[0020] Repeat the steps of finding augmented paths and updating traffic until no augmented paths are found. Output the total traffic flowing out of the source point as the maximum flow, and the actual traffic on each edge is the marketing data allocation result.
[0021] Furthermore, the constraint P is indicated as the maximum magnitude of the number of values that a certain rule is allowed to obtain on a certain data set;
[0022] When a data set cannot be assigned to a certain strategy, or a certain strategy cannot extract data from a certain data set, it is defined as p = 0;
[0023] For the case where there is no clear capacity limit, the maximum capacity is the smaller value of c or x.
[0024] Furthermore, the collection Each element in are all connected to the source node S, and the capacity of their edges is initialized to w i =c i ;
[0025] Every element T in the set T j are all connected to the sink E, and the capacity of their edges is initialized to w j =x j ;
[0026] For any T j , its connectivity needs to consider both the weight constraint l≤r≤h and the assignable magnitude constraint p, that is, when The weight r in T j In the range of [l,h], and when p>0, T j The space can be connected, and the capacity is initialized to w ij =p, otherwise T j There is no edge between them, and the capacity is 0. Through the initialization of the network, the constraints in the data distribution process are converted into capacity constraints when solving the network flow, which is the core link of the present invention for solving the data distribution problem with capacity constraints. In other applications, only the capacity initialization of the edges adjacent to the source and sink is often considered, and the capacity of the edges adjacent to the source and sink are not effectively utilized. T j The constraint relationship between them.
[0027] Furthermore, marketing data In the formula, r is the weight corresponding to a group of marketing data, which is also the cost-to-income ratio of the group data in the marketing process, and c is the amount of available data in the group of marketing data;
[0028] In the marketing strategy T(l,h,x), l is the acceptable lower limit of weight, h is the acceptable upper limit of weight, and x is the amount of data required for marketing for this task.
[0029] Compared with the prior art, the present invention has the following beneficial effects:
[0030] By cleverly transforming the marketing data allocation problem into a network flow model with capacity constraints, and using the network maximum flow algorithm to solve it, the marketing data is regarded as the source point, the marketing strategy is regarded as the sink point, and the constraint condition is converted into the flow limit. By applying the network maximum flow algorithm, the present invention can efficiently calculate the optimized data allocation plan to meet the needs of enterprises for refined data management. It not only significantly improves the efficiency and refined management level of data allocation, but also greatly enhances the adaptability and flexibility of the system to the dynamic changes of marketing data and strategies. This solution effectively avoids the subjective influence brought by manual allocation, ensures the objectivity and fairness of the allocation results, and then optimizes the formulation of marketing strategies, improves marketing effects and resource utilization, and creates greater value for enterprises. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 A network flow initialization flow chart of a marketing data distribution method based on a network flow algorithm in an embodiment of the present invention;
[0032] Figure 2 A flowchart of solving a network flow model using the Edmond-Karp algorithm used in an embodiment of the present invention;
[0033] Figure 3 A schematic diagram of a network flow model after a problem is defined as a network flow algorithm in an embodiment of the present invention;
[0034] Figure 4 Schematic diagram of a network flow model after initialization in an embodiment of the present invention;
[0035] Figure 5 This is the actual traffic distribution result of the network flow model in the embodiment of the present invention. DETAILED DESCRIPTION
[0036] In order to facilitate the understanding of those skilled in the art, the present invention is further described below in conjunction with embodiments and drawings. The contents mentioned in the implementation modes are not intended to limit the present invention.
[0037] like Figure 1 As shown, this embodiment provides a marketing data distribution method based on a network flow algorithm, comprising the steps of:
[0038] S1. Obtain marketing data from the data source and convert it into a binary representation:
[0039] S2, obtain marketing strategies from data sources and convert them into triple representation: T(l,h,x);
[0040] S3, obtaining the distributable relationship between marketing data and marketing strategies from the configuration file and converting it into constraint conditions P;
[0041] S4. Define the network source point S, connect the network source point S with each marketing data node D, and initialize the capacity w;
[0042] S5. Define the network sink E, connect the network sink to each marketing strategy node T, and initialize the capacity w;
[0043] S6. Initialize edges in the marketing data node D and the marketing strategy node T according to the constraint P;
[0044] S7. For nodes that are connected to the marketing data node D and the marketing strategy node T, further determine whether r is between [l, h], adjust the capacity w, and the network flow model is initialized;
[0045] S8. Use the Edmond-Karp algorithm to solve the network flow model and obtain the marketing data distribution results.
[0046] like Figure 2 As shown, the Edmond-Karp algorithm solution steps are:
[0047] Initialize the residual network to the original network;
[0048] Find the augmenting path and use BFS to search for the path from the source to the sink on the residual network. If no path is found, the algorithm ends and the current flow is the maximum flow.
[0049] Determine the minimum residual capacity on the augmented path as the augmentation amount, increase the flow of each edge on the path, and update the residual network and add reverse edges;
[0050] Repeat the steps of finding augmented paths and updating traffic until no augmented paths are found. Output the total traffic flowing out of the source point as the maximum flow, and the actual traffic on each edge is the marketing data allocation result.
[0051] The constraint P is marked as the maximum magnitude of the number of values that a rule is allowed to obtain on a certain data set;
[0052] When a data set cannot be assigned to a certain strategy, or a certain strategy cannot extract data from a certain data set, it is defined as p = 0;
[0053] For the case where there is no clear capacity limit, the maximum capacity is the smaller value of c or x.
[0054] like Figure 3 As shown, the collection Each element in are all connected to the source node S, and the capacity of their edges is initialized to w i =c i ;
[0055] gather Every element T inj are all connected to the sink E, and the capacity of their edges is initialized to w j =x j ;
[0056] For any T j , its connectivity needs to consider both the weight constraint l≤r≤h and the assignable magnitude constraint p, that is, when The weight r in T j In the range of [l,h], and when p>0, T j The space can be connected, and the capacity is initialized to w ij =p, otherwise T j There is no edge between them, and the capacity is 0. Through the initialization of the network, the constraints in the data distribution process are converted into capacity constraints when solving the network flow, which is the core link of the present invention for solving the data distribution problem with capacity constraints. In other applications, only the capacity initialization of the edges adjacent to the source and sink is often considered, and the capacity of the edges adjacent to the source and sink are not effectively utilized. T j The constraint relationship between them.
[0057] Marketing data In the formula, r is the weight corresponding to a group of marketing data, which is also the cost-to-income ratio of the group data in the marketing process, and c is the amount of available data in the group of marketing data;
[0058] In the marketing strategy T(l,h,x), l is the acceptable lower limit of weight, h is the acceptable upper limit of weight, and x is the amount of data required for marketing for this task.
[0059] Assume that there are three groups of marketing data, namely That is, the weights are 20, 30, and 50 respectively, and the quantities are 20, 30, and 50 respectively; there are three strategies that need to be marketed, namely T1 (10, 25, 10), T2 (10, 40, 60), and T3 (10, 50, 80), that is, the weight intervals considered when taking data for the three groups of strategies are [10, 25], [10, 40], and [10, 50] respectively, and the required quantities are 10, 60, and 80 respectively; there are constraints that the number of data taken from each group of data by the T2 strategy cannot exceed 10, and the number of data taken from each group of data by the T3 strategy cannot exceed 10. The T3 strategy is to take data from The number of magnitudes taken should not exceed 40.
[0060] Based on the above assumptions. Each element in are all connected to the source node S, and the capacity of their edges is initialized to w i =c i, that is, 20, 30, 50. Each element in the set T are all connected to the sink E, and the capacity of their edges is initialized to w j =x j , that is, 10, 60, and 80. Since the number of data taken from each set of data by the T2 strategy cannot exceed 10, The corresponding w 12 、w 22 、w 32 Both are 10. Since strategy T3 cannot Therefore, there is no edge between the two. Since the weight constraint must be satisfied when taking data, we know that Only from T2 can extract the number from T3 can extract data from Take the number (eliminated from the previous link ), and w 33 =40. Therefore, the network diagram can be initialized as Figure 4 As shown (the original network on the left and the augmented network on the right), the maximum capacity is indicated on the edge.
[0061] The Edmond-Karp algorithm is a well-known algorithm. Here we will briefly describe its execution process as follows: Figure 4 (Left) As the original network, Figure 4 (Right) As an augmented network (i.e., a network with all edge capacities equal to 0), and a residual network is constructed with the capacity of each edge of the initial network (the initial Figure 4 Left); Search the path from the source to the sink through the breadth-first algorithm, and then find the path The minimum value on this edge is 10, which is the amount of augmentation; update this path in the augmented network The flow of the edge is augmented by 10, and the corresponding augmentation is subtracted from the residual network; a reverse edge is added to the corresponding path, and the capacity is also augmented by 10; when the capacity of an edge is 0, the edge is removed from the residual network, and the edge is deleted. T1E; continue to execute this loop until no augmenting path is found. At this time, the total flow outflowing from the source point is the maximum flow, and the actual flow on each edge is the marketing data distribution result, such as Figure 5 shown.
[0062] It can be seen that even if the total amount of available data is 100, the maximum flow can only be 90, that is, T1 from Take 10 from T2 Take 10 from each, T2 from Take 20 from Take 40, this allocation is the maximum order of magnitude that can be allocated to each marketing strategy under the constraints. This method can achieve the optimal data allocation under multiple constraints.
[0063] Compared with the prior art, the present invention has the following beneficial effects:
[0064] By cleverly transforming the marketing data allocation problem into a network flow model with capacity constraints, and using the network maximum flow algorithm to solve it, the marketing data is regarded as the source point, the marketing strategy is regarded as the sink point, and the constraint condition is converted into the flow limit. By applying the network maximum flow algorithm, the present invention can efficiently calculate the optimized data allocation plan to meet the needs of enterprises for refined data management. It not only significantly improves the efficiency and refined management level of data allocation, but also greatly enhances the adaptability and flexibility of the system to the dynamic changes of marketing data and strategies. This solution effectively avoids the subjective influence brought by manual allocation, ensures the objectivity and fairness of the allocation results, and then optimizes the formulation of marketing strategies, improves marketing effects and resource utilization, and creates greater value for enterprises.
[0065] The above is a detailed introduction to a marketing data distribution method based on a network flow algorithm provided by the present application. The description of the specific embodiments is only used to help understand the method and its core idea of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims
1. A marketing data distribution method based on network flow algorithm, characterized in that: Includes steps: Get marketing data from the data source and convert it into a bigram representation: Obtain marketing strategies from data sources and transform them into triple representation: T(l,h,x); Obtain the assignable relationship between marketing data and marketing strategies from the configuration file and transform it into constraint conditions P; Define the network source point S, connect the network source point S to each marketing data node D, and initialize the capacity w; Define the network sink E, connect the network sink to each marketing strategy node T, and initialize the capacity w; In the marketing data node D and the marketing strategy node T, initialize the edge according to the constraint P; For nodes that are connected between the marketing data node D and the marketing strategy node T, further determine whether r is between [l,h], adjust the capacity w, and the network flow model is initialized; The Edmond-Karp algorithm is used to solve the network flow model and obtain the marketing data distribution results.
2. The marketing data distribution method based on network flow algorithm according to claim 1, characterized in that: Marketing data In the formula, r is the weight corresponding to a group of marketing data, which is also the cost-to-income ratio of the group data in the marketing process, and c is the amount of available data in the group of marketing data; In the marketing strategy T(l,h,x), l is the acceptable lower limit of weight, h is the acceptable upper limit of weight, and x is the amount of data required for marketing for this task.
3. The marketing data distribution method based on network flow algorithm according to claim 2 is characterized in that: The Edmond-Karp algorithm solution steps are: Initialize the residual network to the original network; Find the augmenting path and use BFS to search for the path from the source to the sink on the residual network. If no path is found, the algorithm ends and the current flow is the maximum flow. Determine the minimum residual capacity on the augmented path as the augmentation amount, increase the flow of each edge on the path, and update the residual network and add reverse edges; Repeat the steps of finding augmented paths and updating traffic until no augmented paths are found. Output the total traffic flowing out of the source point as the maximum flow, and the actual traffic on each edge is the marketing data allocation result.
4. The marketing data distribution method based on network flow algorithm according to claim 2 is characterized in that: gather Each element in are all connected to the source node S, and the capacity of their edges is initialized to w i =c i ; Every element T in the set T j are all connected to the sink E, and the capacity of their edges is initialized to w j =x j ; For any T j , its connectivity needs to consider both the weight constraint l≤r≤h and the assignable magnitude constraint p, that is, when The weight r in T j In the range of [l,h], and when p>0, T j The space can be connected, and the capacity is initialized to w ij =p, otherwise T j There is no edge between them, and the capacity is 0.
5. A marketing data distribution method based on network flow algorithm according to claim 3 or 4, characterized in that: The constraint P is marked as the maximum magnitude of the number of values that a rule is allowed to obtain on a certain data set; When a data set cannot be assigned to a certain strategy, or a certain strategy cannot extract data from a certain data set, it is defined as p = 0; For the case where there is no clear capacity limit, the maximum capacity is the smaller value of c or x.