# Research on Enterprise Digital Precision Marketing Strategy Based on Big Data

Authors: Cheng Kong
Journal: Mathematical Problems in Engineering
 (2022)

---

## Abstract

The combination and application of big data and machine learning in the offline consumer market makes the formulation of marketing strategies more scientific. The use of machine learning can make statistics and analysis of users’ consumption behavior and classify customers according to users’ consumption behavior, so as to realize the personalized promotion of marketing content. In this context, this paper carries out research on enterprise digital precision marketing strategy based on big data. Starting from the actual application, this paper analyzes the current problems faced by consumption data sharing, as well as the characteristic needs of precision marketing for consumer groups, introduces homomorphic encryption technology, completes the structural design, process design, and algorithm design of the scheme in combination with the actual scenario that enterprises need to carry out precision marketing for customers based on consumption data, describes each design link in detail, and verifies the feasibility of the algorithm in the scheme.


---

## Body

## 1. Introduction

As the incremental era of mobile Internet has gradually entered the end, the traffic dividend of the Internet has almost disappeared, and the mobile Internet is entering a new era, that is, the era of stock. Being “user-centered” has always been the focus of major e-commerce brands [1–3]. It is becoming more and more important to mine the flow value of brand crowd assets and conduct targeted and accurate operations [4–8]. Therefore, for major brand owners, in addition to paying attention to the rise of transaction volume, how to precipitate and consume brand group assets and make efficient use of user stock value, so as to drive the breakthrough of the boundary of the incremental market, has become the core of common concern of major e-commerce platforms and many brands [9–14].In the actual scene, there are still many complex difficulties and challenges [15–18]. First, there is a distance between enterprises and users. The actual contact between them is limited. It is very difficult to have close communication between them. Second, the phenomenon of consumers’ “clutching” has also gradually increased, and strange user needs have emerged, making it more difficult for enterprises to analyze these user needs. Therefore, there are still many difficulties for the majority of enterprises to achieve the goal of being “user-centered.” At present, the technical capabilities of enterprises provide limited help to real business scenarios [19–22].In order to solve these problems, this paper carried out research on enterprise digital precision marketing strategy based on big data. Aiming at the limitations of the original homomorphic encryption algorithm, the range of homomorphic encryption data processing is extended to rational numbers. Aiming at the problem that the k-means algorithm cannot cluster on the ciphertext domain of large integer classes, the algorithm is improved and rewritten. Aiming at the problem that it is difficult to locate the customer category after clustering, the k-means algorithm is improved by changing the generation method of the initial center point to distinguish the customer category so that the algorithm is more suitable for the scheme designed in this paper.


## 2. Consumer Data Sharing Analysis

### 2.1. Status Analysis

With the development of intelligent commerce in the whole society, the forms of online consumption are becoming more and more abundant. However, the proportion of online consumption in total consumption is still less than 20%, which means that compared with the online consumption market, the offline market is broader [17, 20]. Therefore, when the Internet economy enters the second half, the strategic focus of enterprises is transformed into offline traffic, digital drive and intelligent operation are gradually reflected in the real consumption economy, and the value of big data in offline consumption is also increasingly prominent. However, there are still some problems with offline consumption. The lack of innovation in the marketing content put in by the merchants has resulted in a poor marketing effect for a merchant in this mall when the competition in the same category is fierce. In addition, the current marketing methods cannot fully play a role in the face of new types of consumers. The new marketing methods need to accurately meet the latest preferences of target consumers and formulate targeted marketing strategies.The combination and application of big data and machine learning technology in the offline consumer market makes formulating marketing strategies more scientific. The use of machine learning can make statistics and analysis of users’ consumption behaviors and classify customers according to their consumption behaviors in order to realize the personalized promotion of marketing content. However, training machine learning models requires a large amount of data. Consumers' personal information and consumption records are illegally collected, stored, used, and even sold by economic interests. It violates personal privacy and brings the danger of personal and property damage to consumers [19]. Considering the security of consumer information, how to safely collect and use these data is an urgent problem to be solved.Homomorphic encryption allows the encrypted ciphertext to be processed, which can not only ensure the security of data processing, that is, the original data will not be leaked when processing the ciphertext data, but also ensure that the decryption is correct, that is, the user who has the private key can complete the processing. The data are decrypted, and the correct operation result can be obtained. In addition, how to propose a privacy protection model suitable for consumption data application scenarios on the premise of meeting data privacy, security, and regulatory requirements so that the model can use data from all parties at a low cost, efficiently and accurately, and according to a large amount of consumption data is of great scientific and practical significance to formulate specific marketing strategies more scientifically.


### 2.2. Scheme Design Goals

After analyzing the characteristic requirements for the safe sharing of consumption data and considering the requirements for privacy in consumer data sharing and precise marketing to consumers, the scheme should meet the following design goals.


#### 2.2.1. Data Validity

To ensure that the shared data are authentic and credible, a strict identity authentication mechanism is required to ensure that only legitimate identities can log in to the system and share user consumption data, preventing other malicious competitors from sharing data.


#### 2.2.2. Data Confidentiality

The purpose of the scheme is to ensure the privacy of customer consumption data. The customer data uploaded by the mall must be kept confidential, and the confidentiality of the data must also be guaranteed during the data processing process.


#### 2.2.3. The Correctness of the Results

The correct processing of multiparty customer data is the basic requirement of the financial data sharing scheme, and the scheme design must ensure the correctness of the data clustering results.


#### 2.2.4. Efficiency

The scheme needs to use high-efficiency homomorphic encryption and clustering algorithms to ensure the efficiency and practicability of consumption data sharing and precision marketing.


#### 2.2.5. Realization of Precision Marketing

To carry out differentiated marketing according to different customer groups, tap the potential value of customers, and maximize profits, it is necessary to analyze the basic information, behavior information, and consumption data of consumers to conduct customer segmentation and achieve precise marketing.


## 2.1. Status Analysis

With the development of intelligent commerce in the whole society, the forms of online consumption are becoming more and more abundant. However, the proportion of online consumption in total consumption is still less than 20%, which means that compared with the online consumption market, the offline market is broader [17, 20]. Therefore, when the Internet economy enters the second half, the strategic focus of enterprises is transformed into offline traffic, digital drive and intelligent operation are gradually reflected in the real consumption economy, and the value of big data in offline consumption is also increasingly prominent. However, there are still some problems with offline consumption. The lack of innovation in the marketing content put in by the merchants has resulted in a poor marketing effect for a merchant in this mall when the competition in the same category is fierce. In addition, the current marketing methods cannot fully play a role in the face of new types of consumers. The new marketing methods need to accurately meet the latest preferences of target consumers and formulate targeted marketing strategies.The combination and application of big data and machine learning technology in the offline consumer market makes formulating marketing strategies more scientific. The use of machine learning can make statistics and analysis of users’ consumption behaviors and classify customers according to their consumption behaviors in order to realize the personalized promotion of marketing content. However, training machine learning models requires a large amount of data. Consumers' personal information and consumption records are illegally collected, stored, used, and even sold by economic interests. It violates personal privacy and brings the danger of personal and property damage to consumers [19]. Considering the security of consumer information, how to safely collect and use these data is an urgent problem to be solved.Homomorphic encryption allows the encrypted ciphertext to be processed, which can not only ensure the security of data processing, that is, the original data will not be leaked when processing the ciphertext data, but also ensure that the decryption is correct, that is, the user who has the private key can complete the processing. The data are decrypted, and the correct operation result can be obtained. In addition, how to propose a privacy protection model suitable for consumption data application scenarios on the premise of meeting data privacy, security, and regulatory requirements so that the model can use data from all parties at a low cost, efficiently and accurately, and according to a large amount of consumption data is of great scientific and practical significance to formulate specific marketing strategies more scientifically.


## 2.2. Scheme Design Goals

After analyzing the characteristic requirements for the safe sharing of consumption data and considering the requirements for privacy in consumer data sharing and precise marketing to consumers, the scheme should meet the following design goals.


### 2.2.1. Data Validity

To ensure that the shared data are authentic and credible, a strict identity authentication mechanism is required to ensure that only legitimate identities can log in to the system and share user consumption data, preventing other malicious competitors from sharing data.


### 2.2.2. Data Confidentiality

The purpose of the scheme is to ensure the privacy of customer consumption data. The customer data uploaded by the mall must be kept confidential, and the confidentiality of the data must also be guaranteed during the data processing process.


### 2.2.3. The Correctness of the Results

The correct processing of multiparty customer data is the basic requirement of the financial data sharing scheme, and the scheme design must ensure the correctness of the data clustering results.


### 2.2.4. Efficiency

The scheme needs to use high-efficiency homomorphic encryption and clustering algorithms to ensure the efficiency and practicability of consumption data sharing and precision marketing.


### 2.2.5. Realization of Precision Marketing

To carry out differentiated marketing according to different customer groups, tap the potential value of customers, and maximize profits, it is necessary to analyze the basic information, behavior information, and consumption data of consumers to conduct customer segmentation and achieve precise marketing.


## 2.2.1. Data Validity

To ensure that the shared data are authentic and credible, a strict identity authentication mechanism is required to ensure that only legitimate identities can log in to the system and share user consumption data, preventing other malicious competitors from sharing data.


## 2.2.2. Data Confidentiality

The purpose of the scheme is to ensure the privacy of customer consumption data. The customer data uploaded by the mall must be kept confidential, and the confidentiality of the data must also be guaranteed during the data processing process.


## 2.2.3. The Correctness of the Results

The correct processing of multiparty customer data is the basic requirement of the financial data sharing scheme, and the scheme design must ensure the correctness of the data clustering results.


## 2.2.4. Efficiency

The scheme needs to use high-efficiency homomorphic encryption and clustering algorithms to ensure the efficiency and practicability of consumption data sharing and precision marketing.


## 2.2.5. Realization of Precision Marketing

To carry out differentiated marketing according to different customer groups, tap the potential value of customers, and maximize profits, it is necessary to analyze the basic information, behavior information, and consumption data of consumers to conduct customer segmentation and achieve precise marketing.


## 3. Customer Segmentation

### 3.1. Theory Introduction

In essence, customer segmentation is a process of customer aggregation [23, 24]. Similar customers are gathered into groups according to the customer’s values, needs, and consumer preferences. Enterprises and merchants can provide targeted products, services, or marketing for different customer groups according to the results of customer segmentation so that both parties can benefit from it. The key to winning in the consumer market competition lies in the grasp of market demand and customer characteristics, and customer segmentation can play the following roles in the market competition: (1) customer identification and positioning—due to the differences in the living environment and consumption level, consumers have diverse needs. Merchants can grasp the needs of different customers through segmentation, explore the potential needs of a target consumer group, and then launch targeted products and services; and (2) market analysis and grasp—since consumers’ consumption habits and levels are roughly unchanged, from the perspective of market analysis, segmentation can evaluate the current and potential value of customers. For some merchants, it is possible to locate customers who bring more significant benefits and customers who bring less revenue through customer segmentation based on big data, which is conducive to adopting different marketing strategies.Customer segmentation is based on customer historical consumption behavior, which can be divided into the RFM, customer loyalty-based, and customer value matrix methods.


#### 3.1.1. RFM Method

It is widely used in database marketing. In the RFM model proposed by Hughes in 1994, the customer group is divided according to the interval, frequency, and amount of consumption behavior. Specifically, R (recency) refers to the time interval from the last consumption to the present. The shorter the interval, the greater the R; F (frequency) refers to the number of times the consumer consumes within a period. The larger the value is, the greater is the consumer’s desire to consume. RFM predicts the future based on recent consumption behavior, all variables are real data, and the analysis results are more accurate. However, this method needs to be processed from three dimensions, the calculation is more complicated, and the final obtained customer group has many categories. There will also be multicollinearity between the number of consumption F and the total consumption M.


#### 3.1.2. Customer Loyalty-Based Method

Customer loyalty is a key factor in analyzing customer behavior. Dick and Basu define true loyal customers as customers who satisfy behavioral and attitude loyalty; that is, they need frequent purchasing behavior and a high attitude orientation. Loyalty reflects the stability of customers. However, this method’s strength of loyalty is also challenging to measure, which generally needs to be obtained through indirect analysis.The above two methods are based on the historical data of existing customers. They cannot analyze the behavior of potential customers, and the prediction results of the behavior of old customers are only valid for a short period.The customer segmentation method is not the only constant but should be evaluated and changed in real time according to the actual market demand and the method’s effectiveness. For merchants, the current segmentation method is dynamically selected corresponding to the current product positioning and marketing needs.


### 3.2. Customer Segmentation Variable Selection

The ultimate purpose of customer segmentation is for businesses to carry out differentiated marketing for different customer groups, tap the potential value of customers, and maximize profits; according to the different positioning of each merchant’s products, it can more accurately select which high-quality customers can bring high profits to the merchants among a large number of consumers and can also quickly select which are the consumer customers who can continue to pay attention.Customer segmentation is usually based on the standard’s interval, frequency, and amount of consumer behavior. Still, in the same period, the two variables of consumption times and total consumption have multicollinearity, so this paper transforms the total consumption amount into the average consumption amount. Since the consumption data comes from the same shopping mall, according to the consumer’s member id, the backstage of the mall can obtain the average consumption amount by summarizing the consumption records, and the data can be tracked and recorded multiple times. It is beneficial for merchants to retrieve the average consumption amount in different periods according to different needs, and the data are reliable and targeted. And since there are many customer groups obtained from customer segmentation from the three dimensions of the interval, frequency, and amount, two dimensions of consumption frequency and average consumption amount are selected to simplify the results of customer segmentation. It is necessary to disperse all customers in a two-dimensional matrix of customer value.The high-quality customers in this method have a high consumption frequency and average consumption amount, and the overall consumption level of such customers is relatively high. Therefore, sending them a short message about our store’s new products during marketing can attract such people before consuming. At the same time, the influence of the brand and the multidimensional high-quality services provided by the merchants to them, and the in-purchase price highlight the particularity of customers, which can attract them to the store for long-term consumption. The focus of marketing is to invite customers to the store.Consumption-type customers have a lower consumption frequency but higher average consumption amount; their consumption frequency is not as high as that of high-quality customers, so it is mainly through increasing the frequency of consumption and increasing customer stickiness. Predeposit and other preferential methods improve the integration of product and customer binding and guide customers to repurchase multiple times. To stimulate high-frequency consumption of customers, we can rely on festivals and the way to give products value, combine product consumption attributes with cultural and emotional attributes, and increase the frequency of customer demand.The frequent customers in the value matrix have a high consumption frequency, but the average consumption amount is not high. By sending them discounted text messages to thank old customers, it can attract them to come to the store for consumption. Such customers pay more attention to cost performance and use bidding to acquire customers in the initial publicity stage. For example, the activities of three-level fixed-file exchange products can stimulate the growth of consumption amount. In the stage of stabilizing customer sources and expanding new customers, group purchase discounts and discounts can be adopted to stimulate consumption and increase sales.Finally, uncertain customers with low consumption frequency and average consumption amount should be relatively unfamiliar with the mall or have low intention to visit the store. If ultra-low-cost auxiliary preferential products and gifts on arrival were used to stimulate customers’ interest in the store experience or provide additional experience activities in addition to the products themselves, it can enhance the impression of such customers in the mall during the activities, and at the same time can enhance the purchase intention.In recent years, the e-commerce industry has shown a trend of rapid development. The frequency of people’s consumption in shopping malls has dropped significantly. At the same time, the number of physical stores has shown a basically saturated trend. In this context, physical stores’ deep grasp of customer characteristics and actual needs is the key to competing in the consumer market, carry out different attraction activities for potential customers, implement targeted marketing plans for old customers, and launch package services that better meet the needs of different customer groups. To achieve the above goals, conducting a comprehensive and detailed division method of customer groups is necessary.


## 3.1. Theory Introduction

In essence, customer segmentation is a process of customer aggregation [23, 24]. Similar customers are gathered into groups according to the customer’s values, needs, and consumer preferences. Enterprises and merchants can provide targeted products, services, or marketing for different customer groups according to the results of customer segmentation so that both parties can benefit from it. The key to winning in the consumer market competition lies in the grasp of market demand and customer characteristics, and customer segmentation can play the following roles in the market competition: (1) customer identification and positioning—due to the differences in the living environment and consumption level, consumers have diverse needs. Merchants can grasp the needs of different customers through segmentation, explore the potential needs of a target consumer group, and then launch targeted products and services; and (2) market analysis and grasp—since consumers’ consumption habits and levels are roughly unchanged, from the perspective of market analysis, segmentation can evaluate the current and potential value of customers. For some merchants, it is possible to locate customers who bring more significant benefits and customers who bring less revenue through customer segmentation based on big data, which is conducive to adopting different marketing strategies.Customer segmentation is based on customer historical consumption behavior, which can be divided into the RFM, customer loyalty-based, and customer value matrix methods.


### 3.1.1. RFM Method

It is widely used in database marketing. In the RFM model proposed by Hughes in 1994, the customer group is divided according to the interval, frequency, and amount of consumption behavior. Specifically, R (recency) refers to the time interval from the last consumption to the present. The shorter the interval, the greater the R; F (frequency) refers to the number of times the consumer consumes within a period. The larger the value is, the greater is the consumer’s desire to consume. RFM predicts the future based on recent consumption behavior, all variables are real data, and the analysis results are more accurate. However, this method needs to be processed from three dimensions, the calculation is more complicated, and the final obtained customer group has many categories. There will also be multicollinearity between the number of consumption F and the total consumption M.


### 3.1.2. Customer Loyalty-Based Method

Customer loyalty is a key factor in analyzing customer behavior. Dick and Basu define true loyal customers as customers who satisfy behavioral and attitude loyalty; that is, they need frequent purchasing behavior and a high attitude orientation. Loyalty reflects the stability of customers. However, this method’s strength of loyalty is also challenging to measure, which generally needs to be obtained through indirect analysis.The above two methods are based on the historical data of existing customers. They cannot analyze the behavior of potential customers, and the prediction results of the behavior of old customers are only valid for a short period.The customer segmentation method is not the only constant but should be evaluated and changed in real time according to the actual market demand and the method’s effectiveness. For merchants, the current segmentation method is dynamically selected corresponding to the current product positioning and marketing needs.


## 3.1.1. RFM Method

It is widely used in database marketing. In the RFM model proposed by Hughes in 1994, the customer group is divided according to the interval, frequency, and amount of consumption behavior. Specifically, R (recency) refers to the time interval from the last consumption to the present. The shorter the interval, the greater the R; F (frequency) refers to the number of times the consumer consumes within a period. The larger the value is, the greater is the consumer’s desire to consume. RFM predicts the future based on recent consumption behavior, all variables are real data, and the analysis results are more accurate. However, this method needs to be processed from three dimensions, the calculation is more complicated, and the final obtained customer group has many categories. There will also be multicollinearity between the number of consumption F and the total consumption M.


## 3.1.2. Customer Loyalty-Based Method

Customer loyalty is a key factor in analyzing customer behavior. Dick and Basu define true loyal customers as customers who satisfy behavioral and attitude loyalty; that is, they need frequent purchasing behavior and a high attitude orientation. Loyalty reflects the stability of customers. However, this method’s strength of loyalty is also challenging to measure, which generally needs to be obtained through indirect analysis.The above two methods are based on the historical data of existing customers. They cannot analyze the behavior of potential customers, and the prediction results of the behavior of old customers are only valid for a short period.The customer segmentation method is not the only constant but should be evaluated and changed in real time according to the actual market demand and the method’s effectiveness. For merchants, the current segmentation method is dynamically selected corresponding to the current product positioning and marketing needs.


## 3.2. Customer Segmentation Variable Selection

The ultimate purpose of customer segmentation is for businesses to carry out differentiated marketing for different customer groups, tap the potential value of customers, and maximize profits; according to the different positioning of each merchant’s products, it can more accurately select which high-quality customers can bring high profits to the merchants among a large number of consumers and can also quickly select which are the consumer customers who can continue to pay attention.Customer segmentation is usually based on the standard’s interval, frequency, and amount of consumer behavior. Still, in the same period, the two variables of consumption times and total consumption have multicollinearity, so this paper transforms the total consumption amount into the average consumption amount. Since the consumption data comes from the same shopping mall, according to the consumer’s member id, the backstage of the mall can obtain the average consumption amount by summarizing the consumption records, and the data can be tracked and recorded multiple times. It is beneficial for merchants to retrieve the average consumption amount in different periods according to different needs, and the data are reliable and targeted. And since there are many customer groups obtained from customer segmentation from the three dimensions of the interval, frequency, and amount, two dimensions of consumption frequency and average consumption amount are selected to simplify the results of customer segmentation. It is necessary to disperse all customers in a two-dimensional matrix of customer value.The high-quality customers in this method have a high consumption frequency and average consumption amount, and the overall consumption level of such customers is relatively high. Therefore, sending them a short message about our store’s new products during marketing can attract such people before consuming. At the same time, the influence of the brand and the multidimensional high-quality services provided by the merchants to them, and the in-purchase price highlight the particularity of customers, which can attract them to the store for long-term consumption. The focus of marketing is to invite customers to the store.Consumption-type customers have a lower consumption frequency but higher average consumption amount; their consumption frequency is not as high as that of high-quality customers, so it is mainly through increasing the frequency of consumption and increasing customer stickiness. Predeposit and other preferential methods improve the integration of product and customer binding and guide customers to repurchase multiple times. To stimulate high-frequency consumption of customers, we can rely on festivals and the way to give products value, combine product consumption attributes with cultural and emotional attributes, and increase the frequency of customer demand.The frequent customers in the value matrix have a high consumption frequency, but the average consumption amount is not high. By sending them discounted text messages to thank old customers, it can attract them to come to the store for consumption. Such customers pay more attention to cost performance and use bidding to acquire customers in the initial publicity stage. For example, the activities of three-level fixed-file exchange products can stimulate the growth of consumption amount. In the stage of stabilizing customer sources and expanding new customers, group purchase discounts and discounts can be adopted to stimulate consumption and increase sales.Finally, uncertain customers with low consumption frequency and average consumption amount should be relatively unfamiliar with the mall or have low intention to visit the store. If ultra-low-cost auxiliary preferential products and gifts on arrival were used to stimulate customers’ interest in the store experience or provide additional experience activities in addition to the products themselves, it can enhance the impression of such customers in the mall during the activities, and at the same time can enhance the purchase intention.In recent years, the e-commerce industry has shown a trend of rapid development. The frequency of people’s consumption in shopping malls has dropped significantly. At the same time, the number of physical stores has shown a basically saturated trend. In this context, physical stores’ deep grasp of customer characteristics and actual needs is the key to competing in the consumer market, carry out different attraction activities for potential customers, implement targeted marketing plans for old customers, and launch package services that better meet the needs of different customer groups. To achieve the above goals, conducting a comprehensive and detailed division method of customer groups is necessary.


## 4. Scheme Design

### 4.1. Scheme Structure Design

In order to maximize the analysis and utilization of consumption data, the data owner of the, e.g., mall needs to provide the consumption data generated in all stores in his or her mall, but in order to ensure the privacy of information, homomorphic encryption is required in the system before sharing the consumption data; in order for data users (a merchant who needs to send marketing short messages) to carry out personalized marketing to all consumer groups in the mall according to their own product characteristics, attract specific users, or tap potential users, the merchant can propose the required number of customer classification in the system and corresponding marketing messages; the third-party computing center performs theK-means clustering processing on the data according to the provided encrypted consumption data and the required number of customer classifications, and returns the results to the system database after the processing; and advertising operators can view the classification results of user consumption data, set different SMS templates according to the user’s mobile phone number and the corresponding marketing SMS, and finally send SMS in batches.To sum up, the plan includes four participating entities: consumption data owner (shopping mall), consumption data user (a merchant who needs marketing), third-party computing center, and marketer. The overall framework of the scheme is shown in Figure1.Figure 1
Overall framework of the scheme.In this solution, although the data owner (mall) has all the registration information and consumption records of consumers, the consumption data are encrypted into ciphertext in the system and then uploaded, which ensures the security of the data from the source. The third-party computing center retrieves the ciphertext from the database and does not have access to the real consumption data; when a merchant needs to send a marketing message, the required number of customer categories and the corresponding marketing template are entered into the system. After classifying customers according to their needs, merchants only have the right to view customer classifications. The system automatically anonymizes personal information, such as consumers’ phone numbers. Merchants cannot obtain personal information for private marketing, ensuring consumers’ privacy and security. Advertising operators read the merchant’s presetk value and short messages from the system, set the corresponding marketing short messages according to the classification results, and then send short messages in batches with one click, without touching sensitive information such as phone numbers, which not only ensures the integrity of consumer information without leakage, but also ensures the precise marketing to different consumer groups.The main worksheets for which the various participating entities in the program are responsible are shown in Table1.Table 1
Participating entities and main work.
EntityMain workConsumption data ownerEncrypt and upload consumption dataConsumption data userThe default number of customer classifications required iskPreset corresponding marketing SMSMarketerRead presetk value and setRead marketing text messagesSet the corresponding marketing SMS according to the customer classification resultsSend SMS in batchesThird-party computing centerRead ciphertextRead thek valueK-means clustering of ciphertexts based onk values


### 4.2. Scheme Process Design

The main steps of the precision marketing plan based on consumption data and homomorphic encryption algorithm include the following:(1)
The data owner (mall) downloads the consumption data upload template and imports the user data into the template according to the specifications;(2)
In the data management of the consumption data encryption system, the user consumption data for a certain period is encrypted and uploaded to the database for use by advertising operators and third-party computing centers;(3)
Advertising operators set the required number of customer categories to set the value ofk according to their own needs and hand them over to a third party for processing;(4)
The third-party computing center reads the dataset, performsK-means clustering on the ciphertext according to k, and imports the output result into the customer classification of the file; and(5)
According to the generated customer classification results and the specific marketing SMS provided by the merchant, the advertising operator sets the corresponding marketing SMS in the marketable list and sends it.


## 4.1. Scheme Structure Design

In order to maximize the analysis and utilization of consumption data, the data owner of the, e.g., mall needs to provide the consumption data generated in all stores in his or her mall, but in order to ensure the privacy of information, homomorphic encryption is required in the system before sharing the consumption data; in order for data users (a merchant who needs to send marketing short messages) to carry out personalized marketing to all consumer groups in the mall according to their own product characteristics, attract specific users, or tap potential users, the merchant can propose the required number of customer classification in the system and corresponding marketing messages; the third-party computing center performs theK-means clustering processing on the data according to the provided encrypted consumption data and the required number of customer classifications, and returns the results to the system database after the processing; and advertising operators can view the classification results of user consumption data, set different SMS templates according to the user’s mobile phone number and the corresponding marketing SMS, and finally send SMS in batches.To sum up, the plan includes four participating entities: consumption data owner (shopping mall), consumption data user (a merchant who needs marketing), third-party computing center, and marketer. The overall framework of the scheme is shown in Figure1.Figure 1
Overall framework of the scheme.In this solution, although the data owner (mall) has all the registration information and consumption records of consumers, the consumption data are encrypted into ciphertext in the system and then uploaded, which ensures the security of the data from the source. The third-party computing center retrieves the ciphertext from the database and does not have access to the real consumption data; when a merchant needs to send a marketing message, the required number of customer categories and the corresponding marketing template are entered into the system. After classifying customers according to their needs, merchants only have the right to view customer classifications. The system automatically anonymizes personal information, such as consumers’ phone numbers. Merchants cannot obtain personal information for private marketing, ensuring consumers’ privacy and security. Advertising operators read the merchant’s presetk value and short messages from the system, set the corresponding marketing short messages according to the classification results, and then send short messages in batches with one click, without touching sensitive information such as phone numbers, which not only ensures the integrity of consumer information without leakage, but also ensures the precise marketing to different consumer groups.The main worksheets for which the various participating entities in the program are responsible are shown in Table1.Table 1
Participating entities and main work.
EntityMain workConsumption data ownerEncrypt and upload consumption dataConsumption data userThe default number of customer classifications required iskPreset corresponding marketing SMSMarketerRead presetk value and setRead marketing text messagesSet the corresponding marketing SMS according to the customer classification resultsSend SMS in batchesThird-party computing centerRead ciphertextRead thek valueK-means clustering of ciphertexts based onk values


## 4.2. Scheme Process Design

The main steps of the precision marketing plan based on consumption data and homomorphic encryption algorithm include the following:(1)
The data owner (mall) downloads the consumption data upload template and imports the user data into the template according to the specifications;(2)
In the data management of the consumption data encryption system, the user consumption data for a certain period is encrypted and uploaded to the database for use by advertising operators and third-party computing centers;(3)
Advertising operators set the required number of customer categories to set the value ofk according to their own needs and hand them over to a third party for processing;(4)
The third-party computing center reads the dataset, performsK-means clustering on the ciphertext according to k, and imports the output result into the customer classification of the file; and(5)
According to the generated customer classification results and the specific marketing SMS provided by the merchant, the advertising operator sets the corresponding marketing SMS in the marketable list and sends it.


## 5. Improvement of Clustering Algorithm Based onK-Means

Currently, the clustering algorithm, as an essential machine-learning data mining technology, is widely used in customer segmentation. The customer segmentation technology based on a clustering algorithm has been applied in various areas as early as the 19th century, such as retail, financial stocks, banking, e-commerce, telecommunications, tourism, aviation, and other industries.The similarity function of theK-means algorithm is mainly determined based on the distance between the data, and the distance measurement method constitutes the primary method of clustering [25–27]. The algorithm in this paper adopts the Euclidean distance because the Euclidean distance is mostly used to analyze individual differences in values, such as using user behavior indicators to analyze the similarity of user values.The validity evaluation of the clustering algorithm measures the accuracy of the clustering results. In general, unsupervised clustering evaluation is more complex than supervised learning evaluation. External quality evaluation methods often cannot be applied because the labels of clustering results cannot be obtained. Therefore, many domestic and foreign literature papers have proposed internal quality evaluation and relative quality evaluation methods for clustering algorithms to evaluate unsupervised clustering results. However, these evaluation indicators’ tightness and separation performance are relatively simple, and the measurement effect is one-sided. If tightness does not consider interclass effects, separation does not consider intraclass effects. Therefore, it is necessary to comprehensively evaluate the clustering results using an overall index that can simultaneously measure closeness and separation.The silhouette coefficientsi takes into account both compactness and separation, and the calculation formula is shown as follows:(1)si=bi−aimaxai,bi.That is,(2)si=1−aibi,ai<bi,0,ai=bi,biai−1,ai>bi,ai represents the average distance from the sample to other samples in class C. The smaller the ai is, the more the sample i should belong to this category. bi represents the smallest value of the average distance bij from sample i to all samples in other classes cj. The larger the bi is, the less the sample i belongs to other classes. Therefore, the si value is between −1 and 1. The closer the si is to 1, the more reasonable the clustering is, and vice versa.The traditionalK-means clustering is a learning method that depends on the number of clusters. This method does not require supervision and randomly selects k points and then performs continuous clustering. First, k points are randomly chosen as the starting cluster centers. Then, according to the principle of the shortest distance, the samples are continuously calculated, and new cluster centers are constantly iterated in the iterative process so that the cluster centers can achieve a stable optimal clustering scheme.


### 5.1. Algorithm Improvement

K-means in this scheme uses the Euclidean distance formula to calculate the distance between the two points, but due to a large number of ciphertext bits, common codes cannot perform large number operations, so this scheme first performs the K-means clustering algorithm. For optimization and improvement of the algorithm, it is necessary to rewrite the K-means calculation method, make it cluster on the ciphertext field of the large integer class, improve the clustering effect, and perform more accurate segmentation of the vast and multidimensional consumer population.Although the improved K-means algorithm can effectively cluster encrypted data, according to the requirements of this solution, it is necessary to carry out precise marketing to different types of customer groups after the encrypted data are successfully clustered, so after the clustering is completed, the problem of indistinguishable customer categories arises.To solve the above problem of how to distinguish what kind of customer the customer is, this scheme proposes a method based on the value matrix. In theK-means clustering, the method of the initial center point is changed, and the initial center point is limited to different areas; that is, different types of customers are located in the value matrix, and the categories of customers are distinguished by marking points.The specific operation steps are as follows: if customers need to be clustered intok categories, then there is class a in the abscissa and class b in the ordinate, and there are a × b = k classes in total.It is necessary to find the maximum coordinate value (xmax, ymax) and the minimum coordinate value (xmin, ymin) in all the data to be clustered. First, according to formula (3), the abscissa of the center point of different types of regions can be obtained:(3)Xkij=xmax−xmina⋅i+xmin−xmax−xmina⋅12=xmax−xminai−12+xmin.In the same way, the obtained ordinate is given by(4)Ykij=ymax−yminb⋅j−12+ymin.Therefore, thekij coordinates of the center point of the clustering area are as follows:(5)xmax−xmina⋅i−12+xmin,ymax−yminb⋅j−12+ymin.Assuming thatk = 4 at present, then a = 2 and b = 2; then, according to formula (5), k11, k12, k21, and k22 area center points can be obtained. Then, according to the positioning of k11, k12, k21, and k22, the initial center point of the K-means algorithm is randomly generated within the corresponding area. This can not only ensure the effective operation of K-means, but also simply fix the initial cluster center point on the regional center point, make the clustering result more dynamic, and distinguish different categories of customers according to their positioning.Due to the uncertainty of consumption data, the data to be clustered may not be evenly distributed. Still, according to the range of the maximum and minimum values of the data, the relative customer category area can be dynamically obtained. It is concluded that the customer category whose initial center point isk11 is relatively uncertain customers, and k22 is a high-quality customer compared with k21, which can achieve clustering.


### 5.2. ImprovedK-Means Algorithm Flow

Based on the ciphertext, the system uses theK-means clustering algorithm and the Euclidean distance to calculate the distance between the each point and the center point for clustering. The algorithm 1 is as follows.Algorithm 1: K-means algorithm.
Input: ciphertext, number of clusters kOutput: ciphertext clustering result(1)
Find the maximum value (xmax, ymax) and minimum value (xmin, ymin) of all points. Within the maximum and minimum distances, according to formula (3.5), initialize k points around kij as the cluster centroid;(2)
For each ciphertext point, assign it to the corresponding cluster according to its Euclidean distance from the centroid;(3)
Calculate the average value in each cluster as a new cluster centroid, and repeat step (2);(4)
Determine whether the centroid has changed. If it does not change, the clustering has converged. Otherwise, go to step (2);(5)
Output the clustering results.


## 5.1. Algorithm Improvement

K-means in this scheme uses the Euclidean distance formula to calculate the distance between the two points, but due to a large number of ciphertext bits, common codes cannot perform large number operations, so this scheme first performs the K-means clustering algorithm. For optimization and improvement of the algorithm, it is necessary to rewrite the K-means calculation method, make it cluster on the ciphertext field of the large integer class, improve the clustering effect, and perform more accurate segmentation of the vast and multidimensional consumer population.Although the improved K-means algorithm can effectively cluster encrypted data, according to the requirements of this solution, it is necessary to carry out precise marketing to different types of customer groups after the encrypted data are successfully clustered, so after the clustering is completed, the problem of indistinguishable customer categories arises.To solve the above problem of how to distinguish what kind of customer the customer is, this scheme proposes a method based on the value matrix. In theK-means clustering, the method of the initial center point is changed, and the initial center point is limited to different areas; that is, different types of customers are located in the value matrix, and the categories of customers are distinguished by marking points.The specific operation steps are as follows: if customers need to be clustered intok categories, then there is class a in the abscissa and class b in the ordinate, and there are a × b = k classes in total.It is necessary to find the maximum coordinate value (xmax, ymax) and the minimum coordinate value (xmin, ymin) in all the data to be clustered. First, according to formula (3), the abscissa of the center point of different types of regions can be obtained:(3)Xkij=xmax−xmina⋅i+xmin−xmax−xmina⋅12=xmax−xminai−12+xmin.In the same way, the obtained ordinate is given by(4)Ykij=ymax−yminb⋅j−12+ymin.Therefore, thekij coordinates of the center point of the clustering area are as follows:(5)xmax−xmina⋅i−12+xmin,ymax−yminb⋅j−12+ymin.Assuming thatk = 4 at present, then a = 2 and b = 2; then, according to formula (5), k11, k12, k21, and k22 area center points can be obtained. Then, according to the positioning of k11, k12, k21, and k22, the initial center point of the K-means algorithm is randomly generated within the corresponding area. This can not only ensure the effective operation of K-means, but also simply fix the initial cluster center point on the regional center point, make the clustering result more dynamic, and distinguish different categories of customers according to their positioning.Due to the uncertainty of consumption data, the data to be clustered may not be evenly distributed. Still, according to the range of the maximum and minimum values of the data, the relative customer category area can be dynamically obtained. It is concluded that the customer category whose initial center point isk11 is relatively uncertain customers, and k22 is a high-quality customer compared with k21, which can achieve clustering.


## 5.2. ImprovedK-Means Algorithm Flow

Based on the ciphertext, the system uses theK-means clustering algorithm and the Euclidean distance to calculate the distance between the each point and the center point for clustering. The algorithm 1 is as follows.Algorithm 1: K-means algorithm.
Input: ciphertext, number of clusters kOutput: ciphertext clustering result(1)
Find the maximum value (xmax, ymax) and minimum value (xmin, ymin) of all points. Within the maximum and minimum distances, according to formula (3.5), initialize k points around kij as the cluster centroid;(2)
For each ciphertext point, assign it to the corresponding cluster according to its Euclidean distance from the centroid;(3)
Calculate the average value in each cluster as a new cluster centroid, and repeat step (2);(4)
Determine whether the centroid has changed. If it does not change, the clustering has converged. Otherwise, go to step (2);(5)
Output the clustering results.


## 6. Experiments

### 6.1. Experimental Environment

For the simulation, the experimental platform we use is the Windows 10 64-bit operating system; the CPU is Intel(R) Core (TM) i5-8210Y CPU @ 1.60 GHz, the programming language of clustering is Java, and the encryption part is implemented in C++.The security parameters are set in the encryption experiment based on the following considerations: first, to ensure actual security, the security level is set toλ=80; then, to ensure the correctness of the ciphertext field, set ω=230,l=100,eBound=1000; and for the possible plaintext space, specify p=10 and q=2128. Furthermore, we evaluate performance with different values of the parameter n, representing the number of data items.


### 6.2. Relationship between Clustering Efficiency and Number of Plaintext Bits

After ensuring the stability and efficiency of encryption, we need to test the efficiency of the improved K-means clustering algorithm. The correctness of the encryption algorithm has been verified, so we can directly perform K-means clustering on the encrypted ciphertext and then compare it with the plaintext clustering effect of the same dataset to verify the improved K-means that means the efficiency and accuracy of the algorithm. We still measure clustering time and silhouette coefficient values by averaging 60 runs.Since the improved K-means clustering algorithm supports the processing of large integers based on encryption, the K-means clustering test is first performed on ciphertexts with different digits to compare the efficiency and accuracy of the clustering algorithm. To save time and cost, we select 600 sets of two-dimensional data for comparison, the default number of clusters is 4, and the test results are shown in Table2.Table 2
Relationship between clustering time and ciphertext bits.
Ciphertext bits (m)Ciphertext clustering time (ms)Silhouette coefficientsiCorresponds to the plaintext bit nPlaintext clustering time (ms)Silhouette coefficientsi161230.41045170.43664171390.394892350.40069181630.424363360.42502191890.404964480.40352201960.410335490.41132212190.380296680.37841Since the minimum number of ciphertext bits is 16 bits, this experiment starts from 16 bits of ciphertext bits and increases sequentially until processing 21 bits of ciphertext. As the number of ciphertext bits increases, the time of theK-means clustering algorithm running on the ciphertext increases linearly, and the corresponding plaintext clustering time also increases linearly; since the maximum number of digits corresponding to the plaintext data is 6, it is much smaller than the number of digits of ciphertext data, so the clustering time on the plaintext is generally shorter than that on the ciphertext.The silhouette coefficientsi is between −1 and 1, and the larger the value is, the more reasonable the clustering result is. As the number of ciphertext bits increases, the values of si are maintained between 0.38 and 0.43, which shows that the improved K-means clustering algorithm can perform stable and correct clustering operations. However, in terms of clustering accuracy, although the number of bits of plaintext is relatively short, the gap between the silhouette coefficient of clustering on the plaintext and the silhouette coefficient of clustering on the ciphertext is very small. The error is about 0.01, indicating that the improved K-means clustering algorithm can cluster the data well regardless of the number of data bits.


### 6.3. Relationship between Clustering Efficiency and the Number of Clusters

According to the experiment above, when the length of ciphertext is 20 bits, the clustering time decreases slightly, so it is possible to control the ciphertext based on 20 bits and continue to test the relationship between clustering efficiency and other variables. A total of 500 sets of two-dimensional data were randomly selected to test whether the change in the number of clusters impacts the clustering efficiency. Three datasets were tested, averaging 50 runs to measure the clustering time, and the silhouette coefficient values are recorded in Table3.Table 3
Relationship between the clustering time and the number of clustersk.
DatasetThe number of clusters kPlaintext clustering time (ms)Plaintext contour systemsiCiphertext clustering time (ms)Plaintext contour systemsiTestset 1k = 2330.33752730.34358k = 3860.360771790.36052k = 4660.376192210.37741k = 51380.395183130.39512Testset 2k = 2260.34869630.34789k = 3500.371361270.37172k = 4700.396792140.39734k = 5870.375382980.38129Testset 3k = 2310.36964820.35596k = 3530.381911360.37893k = 4650.397421710.39752k = 5830.374792210.37853As the number of clusters increases, the running time of theK-means clustering algorithm on both the plaintext and the ciphertext increases linearly. After the test, the processing time of the improved clustering algorithm for 600 groups of the 20-bit ciphertext 2D data is maintained at about 0.3 seconds, and the silhouette coefficient is also maintained between 0.34 and 0.4. It is worth noting that when k = 4, the silhouette coefficient is higher than other values, and the clustering effect is the most reasonable when clustering 4 classes.


### 6.4. Relationship between Clustering Efficiency and Data Volume

From the experiment above, whenk = 4, the value of the silhouette coefficient is relatively high, which means that the effect of clustering is relatively reasonable at this time, and when the length of ciphertext is 20 bits, the algorithm runs faster, so we test on this basis, which reflects the effect of data volume on clustering efficiency. The values are recorded in Table 4.Table 4
Relationship between clustering time and data volume.
The amount of dataCiphertext clustering time (ms)Ciphertext silhouette coefficientsi100 groups490.3732200 groups840.41644500 groups1770.402731000 groups3500.417482000 groups9070.40576As the amount of data increases, the running time of the K-means clustering algorithm on the ciphertext increases linearly. After testing multiple datasets, the improved clustering algorithm takes about 1 second to process two-dimensional data of 2000 groups of the 20-bit ciphertext, and the silhouette coefficient can reach the level of 0.4. Therefore, it can be concluded that the greater the amount of data, the longer the time required for this clustering algorithm, but the clustering effect is excellent and stable.


## 6.1. Experimental Environment

For the simulation, the experimental platform we use is the Windows 10 64-bit operating system; the CPU is Intel(R) Core (TM) i5-8210Y CPU @ 1.60 GHz, the programming language of clustering is Java, and the encryption part is implemented in C++.The security parameters are set in the encryption experiment based on the following considerations: first, to ensure actual security, the security level is set toλ=80; then, to ensure the correctness of the ciphertext field, set ω=230,l=100,eBound=1000; and for the possible plaintext space, specify p=10 and q=2128. Furthermore, we evaluate performance with different values of the parameter n, representing the number of data items.


## 6.2. Relationship between Clustering Efficiency and Number of Plaintext Bits

After ensuring the stability and efficiency of encryption, we need to test the efficiency of the improved K-means clustering algorithm. The correctness of the encryption algorithm has been verified, so we can directly perform K-means clustering on the encrypted ciphertext and then compare it with the plaintext clustering effect of the same dataset to verify the improved K-means that means the efficiency and accuracy of the algorithm. We still measure clustering time and silhouette coefficient values by averaging 60 runs.Since the improved K-means clustering algorithm supports the processing of large integers based on encryption, the K-means clustering test is first performed on ciphertexts with different digits to compare the efficiency and accuracy of the clustering algorithm. To save time and cost, we select 600 sets of two-dimensional data for comparison, the default number of clusters is 4, and the test results are shown in Table2.Table 2
Relationship between clustering time and ciphertext bits.
Ciphertext bits (m)Ciphertext clustering time (ms)Silhouette coefficientsiCorresponds to the plaintext bit nPlaintext clustering time (ms)Silhouette coefficientsi161230.41045170.43664171390.394892350.40069181630.424363360.42502191890.404964480.40352201960.410335490.41132212190.380296680.37841Since the minimum number of ciphertext bits is 16 bits, this experiment starts from 16 bits of ciphertext bits and increases sequentially until processing 21 bits of ciphertext. As the number of ciphertext bits increases, the time of theK-means clustering algorithm running on the ciphertext increases linearly, and the corresponding plaintext clustering time also increases linearly; since the maximum number of digits corresponding to the plaintext data is 6, it is much smaller than the number of digits of ciphertext data, so the clustering time on the plaintext is generally shorter than that on the ciphertext.The silhouette coefficientsi is between −1 and 1, and the larger the value is, the more reasonable the clustering result is. As the number of ciphertext bits increases, the values of si are maintained between 0.38 and 0.43, which shows that the improved K-means clustering algorithm can perform stable and correct clustering operations. However, in terms of clustering accuracy, although the number of bits of plaintext is relatively short, the gap between the silhouette coefficient of clustering on the plaintext and the silhouette coefficient of clustering on the ciphertext is very small. The error is about 0.01, indicating that the improved K-means clustering algorithm can cluster the data well regardless of the number of data bits.


## 6.3. Relationship between Clustering Efficiency and the Number of Clusters

According to the experiment above, when the length of ciphertext is 20 bits, the clustering time decreases slightly, so it is possible to control the ciphertext based on 20 bits and continue to test the relationship between clustering efficiency and other variables. A total of 500 sets of two-dimensional data were randomly selected to test whether the change in the number of clusters impacts the clustering efficiency. Three datasets were tested, averaging 50 runs to measure the clustering time, and the silhouette coefficient values are recorded in Table3.Table 3
Relationship between the clustering time and the number of clustersk.
DatasetThe number of clusters kPlaintext clustering time (ms)Plaintext contour systemsiCiphertext clustering time (ms)Plaintext contour systemsiTestset 1k = 2330.33752730.34358k = 3860.360771790.36052k = 4660.376192210.37741k = 51380.395183130.39512Testset 2k = 2260.34869630.34789k = 3500.371361270.37172k = 4700.396792140.39734k = 5870.375382980.38129Testset 3k = 2310.36964820.35596k = 3530.381911360.37893k = 4650.397421710.39752k = 5830.374792210.37853As the number of clusters increases, the running time of theK-means clustering algorithm on both the plaintext and the ciphertext increases linearly. After the test, the processing time of the improved clustering algorithm for 600 groups of the 20-bit ciphertext 2D data is maintained at about 0.3 seconds, and the silhouette coefficient is also maintained between 0.34 and 0.4. It is worth noting that when k = 4, the silhouette coefficient is higher than other values, and the clustering effect is the most reasonable when clustering 4 classes.


## 6.4. Relationship between Clustering Efficiency and Data Volume

From the experiment above, whenk = 4, the value of the silhouette coefficient is relatively high, which means that the effect of clustering is relatively reasonable at this time, and when the length of ciphertext is 20 bits, the algorithm runs faster, so we test on this basis, which reflects the effect of data volume on clustering efficiency. The values are recorded in Table 4.Table 4
Relationship between clustering time and data volume.
The amount of dataCiphertext clustering time (ms)Ciphertext silhouette coefficientsi100 groups490.3732200 groups840.41644500 groups1770.402731000 groups3500.417482000 groups9070.40576As the amount of data increases, the running time of the K-means clustering algorithm on the ciphertext increases linearly. After testing multiple datasets, the improved clustering algorithm takes about 1 second to process two-dimensional data of 2000 groups of the 20-bit ciphertext, and the silhouette coefficient can reach the level of 0.4. Therefore, it can be concluded that the greater the amount of data, the longer the time required for this clustering algorithm, but the clustering effect is excellent and stable.


## 7. Conclusions

In the context of big data, this paper carries out research on enterprise digital precision marketing strategy. First, it analyzes the privacy problems faced by the current consumption data sharing scheme, puts forward the objectives that the precision marketing scheme based on consumption data needs to meet, and completes the precision marketing scheme design based on homomorphic encryption from the perspective of customer segmentation. This research has completed the design of precision marketing scheme based on consumption data and homomorphic encryption algorithm. This paper studies and analyzes the impact of the existing consumer data leakage on consumers. In order to improve the effect of merchants’ marketing to consumers, homomorphic encryption is introduced into consumer data sharing. At the same time, combined with K-means clustering algorithm, the precise marketing scheme based on consumer data and homomorphic encryption algorithm is designed in detail.This paper still has some limitations and deficiencies worthy of further discussion and research: in the improved k-means clustering algorithm proposed in this paper, the similarity function of clustering only uses the simple Euclidean distance to calculate. If the two-dimensional data in the system have a large difference in the number of data bits, the results of K-means clustering will be affected by the value of large bits, resulting in the clustering results that cannot match the value matrix used in this paper. When selecting customer segmentation variables, this paper only simplifies the complex RFM scheme into two-dimensional parameters and applies them to the value matrix. In the subsequent customer segmentation, we should consider the impact of more parameters on the results of customer segmentation, so as to improve the accuracy of precision marketing again.



---

*Source: 4279983-2022-08-25.xml*