Coded product sales data real-time analysis method
By building a social network for customer ticket purchases and analyzing changes in purchase frequency and signs of churn, the problem of declining customer loyalty in cross-regional behavioral analysis was solved, enabling early identification of churn risks and resource optimization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGDONG CAIHUI INTELLIGENT TECH CO LTD
- Filing Date
- 2026-01-23
- Publication Date
- 2026-05-08
AI Technical Summary
Existing technologies fail to accurately capture and analyze customer behavior across different stores when dealing with cross-regional customer behavior, causing businesses to be unable to detect declining customer loyalty trends in a timely manner, resulting in incorrect marketing strategies and wasted resources.
By tracking the differences between the original ticket purchase store and the prize redemption store codes of customers who won prizes, a customer ticket purchase social network is constructed, changes in ticket purchase frequency are analyzed, signs of churn are identified, the role of opinion leaders and the siphon effect are assessed, the deviation between expected and actual contribution values is calculated, and defensive windows are identified.
It enables early identification of customer churn, quantification of the siphon effect, precise targeting of the defense window, and improvement of store customer retention rate and the ability to protect against cross-selling.
Smart Images

Figure CN121998680A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information technology, and in particular to a method for real-time analysis of sales data of coded products. Background Technology
[0002] In the fields of retail and customer management, researching how to improve customer retention rates and accurately predict customer behavior is crucial for business development. This area directly relates to a company's revenue growth and market competitiveness, especially in real-time product sales analysis, where customer behavior patterns and loyalty become core factors determining a company's long-term profitability. Finding a balance between complex customer flow and cross-regional behavior is a pressing challenge. Existing methods for handling customer behavior analysis often overlook the profound impact of cross-regional interactions on customer loyalty. Many solutions focus only on the data performance of a single store, failing to fully consider the ripple effects of customer movement between different stores. This oversight prevents companies from accurately grasping the true reasons for customer churn, especially in scenarios involving cross-store interactions. Particularly in reward redemption, apparent convenience may conceal more complex changes in customer affiliation. Ultimately, the real challenge lies in accurately capturing and analyzing customer behavior across different stores, particularly the relationship between the initial reward redemption store and the original ticket purchase store. This factor directly determines the accuracy of assessing customer churn risk. Because of the inability to effectively track the complete behavioral paths of customers across different stores, companies often fail to promptly detect declining trends in customer loyalty. For example, if a customer purchases a product at store A and then chooses to redeem a prize at store B, and store B attracts this customer to become a regular through on-site activities, store A may gradually lose this customer's spending. Conversely, if a customer buys a ticket at store B, goes to store A to redeem a prize, and is attracted by store A's service or environment, continuing to buy from store A, store B also faces the predicament of customer loss without realizing it. In either case, if the original store where the ticket was purchased cannot detect this change, it will still overestimate the customer's future value based on past data, thus developing incorrect marketing strategies. For instance, a customer who buys a ticket at a suburban betting station may transfer their loyalty due to the convenience and additional services of a downtown betting station, and the original store may not be able to detect this subtle change, leading to a waste of marketing resources. Furthermore, in a chain betting network, a customer may first buy a ticket at a small community store, then redeem a prize and continue to purchase at a large shopping mall store. This path switching not only affects the revenue of a single store but also amplifies the risk of customer churn throughout the network because the original store cannot foresee the chain reaction of loyalty transfer. If businesses rely solely on local store data, they may overestimate the future value of customers and overlook the ambiguity of ownership arising from cross-store traffic. This lag in risk identification due to incomplete recording of behavioral patterns is a pressing technological challenge that needs to be addressed. Summary of the Invention
[0003] This invention provides a method for real-time analysis of sales data of coded products, mainly including: Track the original ticket purchase store code and prize redemption store code of the customer who won the prize, and combine them with the identity list of other customers who purchased tickets at the same time to form a list of store codes of the customer's ticket purchase social network; For customers whose prize redemption store code and original ticket purchase store code are inconsistent, the service staff configuration and promotional activity type of the original ticket purchase store, as well as the service advantages and environmental factors of the prize redemption store, are associated with the customer's ticket purchase social network to form a store comparison file and determine the ticket purchase store code segment before prize redemption and the ticket purchase store code segment after prize redemption. Based on the store code segment before and after the prize redemption, the change value of the customer's purchase frequency at the original store was analyzed, and the change of purchase frequency of the same customer in the customer's social circle was extracted from the store comparison file. Based on the correlation between the decrease in the frequency of ticket purchases at the original store after prize redemption and the increase in the number of times the prize redemption store code appeared in the ticket code segment after prize redemption, it was confirmed that the customer showed signs of loss, shifting from the original ticket purchase store to the prize redemption store. After confirming signs of loss, identify the positive cumulative trend of the contribution deviation between the expected contribution value and the actual contribution value of store prize redemption within a continuous statistical period; When the contribution deviation value is consistently positive and the cumulative amount exceeds the customer's historical average consumption per cycle, it is determined that there is a systemic overestimation. The defensive window period missed by the original store due to insufficient service staff is identified, and the identities of other customers in the same social circle who have begun to reduce their ticket purchases from the original store are included in the chain loss scope and pushed to the original ticket purchase store.
[0004] Furthermore, by tracking the original ticket purchase store code and prize redemption store code of the winning customer, and combining this with a list of other customers who purchased tickets at the same time, a list of store codes from the customer's social network for ticket purchases is formed, including: Obtain other ticket purchase records within a preset time range before and after the customer's ticket purchase period. Identify customers who purchase tickets together based on the rule that the payment time difference is less than a preset time threshold and the ticket amount difference is less than a preset amount threshold. Record the identity number and ticket store code of the customers who purchase tickets together, and form an initial social association record centered on the customer. For the prize redemption of winning lottery tickets, read the prize redemption store code and prize redemption timestamp, query the original ticket purchase store code of the winning lottery ticket, extract the identity number of each accompanying customer from the initial social association record, query the ticket purchase records of each accompanying customer within a preset time period after the prize redemption time point, and obtain the ticket purchase store code sequence of each accompanying customer. Based on the initial social association records and the ticket purchase store code sequence, a data structure is constructed that includes customer ID number, original ticket purchase store code, prize redemption store code, and a list of accompanying customer IDs and their corresponding ticket purchase store code sequences. The ticket purchase association and prize redemption association between customer nodes and store nodes are stored in an adjacency list, forming a customer ticket purchase social network store code list.
[0005] Furthermore, for customers whose prize-redemption store code and original ticket purchase store code do not match, the staffing and promotional activities of the original ticket purchase store, as well as the service advantages and environmental factors of the prize-redemption store, are linked to the customer's ticket-purchasing social network to form a store comparison profile. This determines the pre-prize-redemption and post-prize-redemption store code segments, including: For customers whose prize redemption store code is inconsistent with the original ticket purchase store code, obtain the number of service personnel, their skill level, and average years of service at the original ticket purchase store. At the same time, obtain the promotional activity type code, activity frequency, and discount of the store during the preset period before prize redemption to form a record of the service attributes of the original ticket purchase store. Based on the store code in the original ticket purchase store's service attribute record, query the service personnel configuration data and environmental rating data of the prize redemption store to obtain the prize redemption store's environmental attribute record; By comparing the service attribute records of the original ticket purchase store with the environmental attribute records of the prize redemption store, the identification codes of all associated customers in the customer's ticket purchase social network are read, and the historical ticket purchase frequency and amount of each associated customer in the two stores are queried to construct a store comparison profile. Based on the aforementioned store comparison files, with the prize redemption time as the central point, the time window before prize redemption and the time window after prize redemption are determined, and the store code segment before prize redemption and the store code segment after prize redemption are extracted from the ticket purchase records.
[0006] Furthermore, based on the store code segments before and after prize redemption, the changes in the customer's ticket purchase frequency at the original store were analyzed. The changes in ticket purchase frequency among customers in the customer's social circle were extracted from the store comparison file, including: The frequency of the original ticket purchase store code is counted from the ticket purchase store code segment before and after the prize redemption. The average monthly number of tickets purchased at the original ticket purchase store before and after the prize redemption is calculated to obtain the change value of the customer's ticket purchase frequency at the original ticket purchase store. Based on the change in ticket purchase frequency, the customer's social circle member list is retrieved from the store comparison file. For each social circle member, the total number of times they purchased tickets at the original ticket purchase store within the time window before and after the prize redemption is counted, and the change in ticket purchase frequency for each member is calculated.
[0007] Furthermore, based on the correlation between the decrease in the frequency of ticket purchases at the original store after prize redemption and the increase in the number of times the prize-redemption store code appeared in the ticket purchase code segment after prize redemption, it was confirmed that the customer showed signs of churn, shifting from the original ticket purchase store to the prize-redemption store, including: Calculate the rate of decrease in the frequency of ticket purchases at the original ticket purchase stores before and after the prize redemption, and also calculate the increase in the number of times the prize redemption store code appears in the ticket purchase code segment after the prize redemption. Based on the decline rate and the incremental number of occurrences of the prize redemption store code, a coordinate point is constructed to determine whether the coordinate point is located within the preset loss judgment area; If a transfer relationship exists and the decrease rate and the increase in the number of times the prize redemption store code appears meet preset conditions, then it is confirmed that the customer has shown signs of loss, transferring from the original ticket purchase store to the prize redemption store.
[0008] Furthermore, the method also includes: extracting customer records that confirm signs of churn from the store comparison files, analyzing the opinion leader role of churned customers in their social circles, which leads other customers to follow suit, assessing the siphon effect of the reward redemption store on surrounding stores through the word-of-mouth spread of the customer, and identifying the identities of other customers in the social circles of the churned customer who may follow suit.
[0009] Furthermore, customer records confirming signs of churn are extracted from store comparison files. Analysis is conducted to determine the opinion leader role of churned customers within their social circles, which might lead other customers to follow suit. The influence of this customer's word-of-mouth on surrounding stores is assessed, and the identities of other customers potentially following the churned customer within their social circles are identified, specifically including: Extract customer records with confirmed signs of loss from the store comparison files, obtain the customer's ticket purchase history data and social network relationship data, and calculate the proportion of the number of times the customer initiated ticket purchases in the social circle to the total number of ticket purchases. If the proportion exceeds the preset proportion, the customer is marked as a potential opinion leader. Record the time when the customer first purchased a ticket at the prize redemption store as the individual transfer starting point. Based on the individual's starting point of transfer, retrieve the changes in ticket purchasing behavior of other members in the social circle after that point in time, count the number of decreases in ticket purchasing frequency at the original ticket purchasing store and the number of new ticket purchasing records at the prize redemption store for each member, calculate the average value of the change in ticket purchasing frequency for each member, and determine the starting point of the social circle's wait-and-see attitude. Using the social circle observation starting point and potential opinion leader marker, the time difference between the individual opinion leader's transfer starting point and the circle observation starting point is calculated. The number of times the opinion leader purchases tickets at the prize redemption store within this time difference is counted. The dissemination frequency is calculated and combined with the preset weight coefficient to obtain the siphon intensity value of the prize redemption store on the surrounding stores through the opinion leader. By filtering the scope of influence using the siphon intensity value, members whose ticket purchase frequency continued to decline after the social circle's observation point and who had ticket purchase records at the prize redemption store were identified, thus determining that these members were other customers who might follow the transfer.
[0010] Furthermore, after confirming signs of churn, identify the positive cumulative trend of the deviation between the expected and actual contribution values of store reward redemption over a continuous statistical period, including: After confirming the signs of loss, the total number of times and the total amount of tickets purchased by the customer at the original ticket purchase store within the original ticket purchase store code segment before the prize redemption are counted. The average amount of a single ticket purchase is calculated, and the expected contribution value is obtained by multiplying the number of times tickets were purchased at the original ticket purchase store by the average amount of a single ticket purchase. The actual contribution value is obtained by counting the number of times tickets were purchased at the original ticket outlets within the coded segment after the prize redemption and multiplying it by the average single ticket purchase amount. The contribution deviation value is calculated based on the expected contribution value and the actual contribution value. The deviation value is recorded according to a preset statistical period. If the deviation value is positive for multiple consecutive statistical periods and the cumulative deviation value of the later period is greater than that of the previous period, a positive cumulative trend is identified.
[0011] Furthermore, identify the defensive window period missed by the original store due to insufficient service staff, including: combining the identities of other customers who may follow the lost customer in their social circle, assessing the attractiveness spread of the reward store in the surrounding community through the word-of-mouth promotion of the lost customer, and determining the defensive window period missed by the original store due to insufficient service staff to retain lost customers in time.
[0012] Furthermore, when the contribution deviation value remains positive and the cumulative amount exceeds the customer's historical average spending per cycle, a systemic overestimation is determined. This identifies the defensive window period missed by the original store due to insufficient staffing, includes other customers within the same social circle who have begun to reduce their ticket purchases from the original store in the chain churn assessment, and pushes this information to the original ticketing store. This includes: When the contribution deviation value is consistently positive and the cumulative amount exceeds the customer's historical average consumption per cycle, it is determined that there is a systematic overestimation; Obtain the customer's ticket purchase records within a preset time period, calculate the total amount of goods purchased each time, and calculate the lost sales opportunity value; Based on the aforementioned sales opportunity loss value, query the original store service personnel's shift records to determine insufficient staffing and identify the defense window period; Based on the defense window period and the results of the systemic overestimation judgment, other customers whose ticket purchase frequency decreased during the defense window period are selected from the social circle data and pushed to the original ticket purchase stores.
[0013] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects: This invention discloses a real-time analysis method for coded product sales data. By tracking the differences in coding between the original ticket purchase store and the prize redemption store of winning customers, and combining this with peer-to-peer ticket purchase social networks to construct a store comparison profile, a symmetrical time window is defined before and after the prize redemption time. The method analyzes changes in the frequency of ticket purchases at the original store and the increase in the prize redemption store's activity before and after the prize redemption, confirming signs of customer churn towards the prize redemption store. Furthermore, it extracts the influence of opinion leaders from social circles, assessing the tendency of customers to follow suit due to word-of-mouth and the diffusion of the prize redemption store's attractiveness to the surrounding community. Simultaneously, it calculates the cumulative trend of the deviation between the expected and actual contribution values. When the deviation remains positive and exceeds a threshold, it determines that there is a systemic overestimation, identifies the defensive window period missed by the original store due to insufficient service configuration, and includes other customers within the chain of churn within the early warning range, precisely pushing intervention information to the original store. This invention effectively solves the business problem of individual and social circle churn caused by differences in the prize redemption experience of winning customers, resulting in the dual loss of sales and service opportunities for the original store. It achieves early identification of churn, quantitative assessment of the siphon effect, and precise locking of the defensive window, significantly improving the store's customer retention rate and the ability to protect against related sales. Attached Figure Description
[0014] Figure 1 This is a flowchart of a method for real-time analysis of sales data of coded products according to the present invention.
[0015] Figure 2 This is a schematic diagram of a real-time analysis method for coded product sales data according to the present invention.
[0016] Figure 3 This is another schematic diagram of a real-time analysis method for coded product sales data according to the present invention. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0018] like Figures 1-3 This embodiment of a method for real-time analysis of coded product sales data may specifically include: S101. Track the original ticket purchase store code and prize redemption store code of the customer who won the prize, and combine them with the identity list of other customers who purchased tickets at the same time to form a list of store codes of the customer's ticket purchase social network.
[0019] The system retrieves the store code and ticket purchase serial number of the customer when purchasing tickets. It then extracts other ticket purchase records from the customer's purchase history within 15 minutes before and after the purchase time. Based on the rule that the payment time difference is less than a preset time threshold and the ticket amount difference is less than a preset amount threshold, it identifies customers who purchased tickets in the same category and records their identification numbers and store codes, forming an initial social association record centered on that customer. For winning lottery tickets, it reads the prize-claiming store code and prize-claiming timestamp, and uses the prize-claiming system to reverse-look up the original store code of the winning ticket. It extracts the identification numbers of each customer in the same category from the initial social association record and queries their ticket purchase records within a preset time period after the prize-claiming time, obtaining a sequence of store codes for each customer in the same category. Based on the initial social association record and the store code sequence, it constructs a data structure containing the customer's identification number, original store code, prize-claiming store code, a list of customer identification numbers in the same category, and their corresponding store code sequences. It stores the ticket purchase and prize-claiming associations between customer nodes and store nodes using an adjacency list, forming a store code list for the customer's ticket purchase social network.
[0020] In one implementation, the construction of a customer ticket-buying social network begins with identifying peer relationships based on the time of ticket purchase. Once a customer completes a ticket purchase, all purchase records within a 15-minute window before and after that time are automatically retrieved. By comparing payment completion timestamps, purchase records with a time difference of less than 3 minutes are selected as potential peer records.
[0021] Specifically, the difference in ticket purchase amount is determined using a relative proportion method.
[0022] For example, if the difference between two ticket purchase records does not exceed 30% of the smaller amount, they are considered to be similar amounts. If customer A buys a 50 yuan lottery ticket, and customer B buys a lottery ticket worth 40 to 65 yuan within 3 minutes of each other, they are identified as having a peer-to-peer purchase relationship. This relative judgment method avoids the applicability problem of fixed amount thresholds under different consumption levels. Tracking the prize redemption behavior of winning lottery tickets relies on a unique lottery ticket coding mechanism. Each lottery ticket generates a unique identifier containing a store code, terminal number, and serial number when it is sold. When a customer redeems a prize at any store, the prize redemption system scans the lottery ticket code to automatically query the original sales record of the lottery ticket, obtaining complete information such as the original store code, purchase time, and purchase amount. If the prize redemption store code is detected to be inconsistent with the original store code, the customer is immediately marked as a cross-store prize redemption customer, triggering the subsequent social network tracking process.
[0023] In one possible implementation, the subsequent ticket purchase behavior of customers traveling together is tracked through a membership system or linked to mobile phone numbers. Identification of all customers traveling together is extracted from the initial social connection records, and all their ticket purchase records within 30 days after the prize redemption date are queried. Each purchase record includes information such as the store code, purchase time, and purchase amount, arranged chronologically to form a store code sequence. This sequence reflects the movement trajectory of customers traveling together between different stores, providing a data foundation for subsequent analysis of customer group store preference shifts.
[0024] Preferably, the customer ticketing social network is stored using an adjacency list data structure. Customer nodes store basic information such as customer ID, registered mobile phone number, and total ticket purchase amount; store nodes include attributes such as store code, store address, and store type. Edge relationships are divided into two categories: ticket purchase associations and prize redemption associations. Ticket purchase association edges record the number of times a customer purchases tickets at that store and the total amount spent, while prize redemption association edges record the number of times a customer redeems prizes and the total amount redeemed. Through this graph structure, the system can quickly query a customer's frequently visited stores, a store's core customer group, and the strength of social relationships between customers.
[0025] For example, the resulting customer ticket-buying social network store code list contains multi-layered information. The first layer is the customer's basic information and the original ticket-buying store; the second layer is the customer's list of fellow ticket-buying partners; and the third layer is the distribution of ticket-buying stores among each partner. This hierarchical organization facilitates the identification of changes in collective behavioral patterns within the social circle.
[0026] S102. For customers whose prize redemption store code and original ticket purchase store code are inconsistent, the service personnel configuration and promotional activity type of the original ticket purchase store, as well as the service advantages and environmental factors of the prize redemption store, are associated with the customer's ticket purchase social network to form a store comparison file and determine the ticket purchase store code segment before prize redemption and the ticket purchase store code segment after prize redemption.
[0027] For customers whose prize-redemption store code differs from the original ticket purchase store code, the system extracts the number of service personnel, their skill levels, and average years of service at the original ticket purchase store from the store management database. It also retrieves the store's promotional activity type code, activity frequency, and discount amount during the pre-set period before prize redemption, creating a service attribute record for the original ticket purchase store. Based on the store code in this record, the system queries the service personnel configuration data for the prize-redemption store, including the number of personnel and skill level distribution. It also obtains the store's environmental rating data, including store area, decoration level rating, equipment configuration rating, and location convenience rating, resulting in a prize-redemption store environmental attribute record. By comparing the original ticket purchase store service attribute record with the prize-redemption store environmental attribute record, the system reads the identity codes of all associated customers in the customer's ticket-buying social network, queries the historical ticket purchase frequency and amount of each associated customer at both stores, and constructs a store comparison profile containing customer identity, original store service attributes, prize-redemption store environmental attributes, and social network member ticket purchase distribution data. Based on the store comparison files, with the prize redemption time as the center point, a preset number of days are traced forward as the pre-prize redemption time window, and the same number of days are extended backward as the post-prize redemption time window. The store code sequence corresponding to all the customer's ticket purchase behavior within the pre-prize redemption time window is extracted from the ticket purchase records as the pre-prize redemption ticket purchase store code segment, and the store code sequence corresponding to all the ticket purchase behavior within the post-prize redemption time window is extracted as the post-prize redemption ticket purchase store code segment.
[0028] In one implementation, the construction of store service attribute records relies on multi-dimensional data extraction from the store management system. The number of service personnel at the original ticketing store is obtained through shift schedule statistics, including the number of employees on duty for each shift (morning, afternoon, and evening). Personnel skill levels are divided into three levels—basic, intermediate, and advanced—based on training records and assessment results, with each level corresponding to a different service capability score. Average years of service are calculated by taking into account the average length of service of all current employees. Promotional activity type codes use a unified coding system, such as "001" representing a discount promotion, "002" representing a gift promotion, and "003" representing a points multiplier promotion.
[0029] Specifically, the assessment of the environmental attributes of the prize-winning stores involves a comprehensive consideration of multiple quantitative indicators. Store area data is directly extracted from the property management system and recorded in square meters. The decoration level score is based on three dimensions: decoration investment amount, decoration age, and facility condition, using a 100-point scale. The equipment configuration score focuses on hardware conditions such as the number of self-service terminals, air conditioning system configuration, lighting brightness, and surveillance coverage. The location convenience score comprehensively considers factors such as walking time to the subway station, the number of nearby parking spaces, the number of bus routes, and the maturity of the business district, calculating a weighted overall convenience score.
[0030] It's important to note that constructing the store comparison profile essentially involves building a multi-dimensional comparison matrix. The rows of this matrix represent different evaluation dimensions, while the columns represent the original ticket purchase store and the prize redemption store. For the service attribute dimension, the focus is on comparing the staffing differences between the two stores. For example, the original ticket purchase store might have only two service personnel, both at the basic skill level, while the prize redemption store might have five service personnel, including two with advanced skills. This difference directly impacts the customer's service experience. The environmental attribute comparison focuses on the quality of hardware facilities and geographical location. For instance, the prize redemption store might be located in a commercial center with luxurious decor, while the original ticket purchase store might be located in a neighborhood alley with outdated facilities. This environmental difference could be a significant factor influencing customer migration. The ticket purchase distribution data of social network members is obtained by statistically analyzing the historical number of tickets purchased and the amount spent by each associated customer at the two stores, forming a ticket purchase preference distribution map to identify the collective behavioral tendencies of social circles.
[0031] Preferably, the symmetrical setting of the time window adopts a mirror division method centered on the prize redemption time. The length of the time window before and after prize redemption is consistent, usually set at 90 days. This duration covers the customer's regular ticket purchase cycle without introducing irrelevant data due to an excessively long time span. The core value of this symmetrical design lies in ensuring the fairness of the comparison before and after, and avoiding data deviation caused by inconsistent time lengths.
[0032] In one possible implementation, the extraction of the ticket purchase store code segment involves filtering and sorting a massive number of ticket purchase records. First, based on customer identification and time range criteria, all records meeting the conditions are retrieved from the ticket purchase database. Each purchase record contains complete store codes, purchase timestamps, and purchase amounts. After arranging these records in chronological order, the store code field is extracted to form a code sequence. The pre-redemption ticket purchase store code segment reflects the customer's ticket purchasing habits and store preferences before redemption, while the post-redemption ticket purchase store code segment demonstrates the impact of the redemption event on the customer's subsequent ticket purchasing behavior.
[0033] For example, a customer wins a lottery prize at store A and chooses to redeem it at store B. The system automatically triggers a comparative analysis process. Analysis reveals that store A has only one junior service staff member and few promotional activities, while store B has three service staff members, including one senior staff member, and weekly promotional activities. Environmental comparison shows that store B is located on the first floor of a shopping mall, with an area of 200 square meters and a decoration score of 85, while store A is located in a residential alley, with an area of only 50 square meters and a decoration score of 45. Furthermore, the customer's lottery-buying social network includes five friends who frequently buy lottery tickets together. Analysis of these five friends' purchase records shows that within 30 days of the customer redeeming the prize, three friends began purchasing tickets at store B, while the frequency of purchases at store A decreased significantly. This chain reaction of social networks indicates that cross-store prize redemption not only affects individual customer behavior but may also trigger group store switching through social relationships. By comparing the frequency of different store codes in the coding segment before and after prize redemption, the changing trend of customer store loyalty can be quantitatively assessed, and potential customer churn risks can be identified in a timely manner.
[0034] S103. Based on the store code segment before and after the prize redemption, analyze the change in the customer's ticket purchase frequency at the original store, and extract the change in the ticket purchase frequency of customers in the same social circle of the customer in the store comparison file.
[0035] The frequency of the original ticket purchase store code is counted from both the pre-prize and post-prize purchase store code segments. The pre-prize store frequency is divided by the number of months in the pre-prize time window to obtain the average monthly purchase frequency before the prize. The post-prize store frequency is divided by the number of months in the post-prize time window to obtain the average monthly purchase frequency after the prize. If the pre-prize average monthly purchase frequency is greater than 0, the change in the customer's purchase frequency at the original store is CR = (AR - BR) / BR, where CR is the rate of change, AR is the average monthly purchase frequency after the prize, and BR is the average monthly purchase frequency before the prize. If the pre-prize average monthly purchase frequency is 0 and the post-prize average monthly purchase frequency is greater than 0, then CR is defined as a positive value of 1, indicating new activity. If both are 0, then CR is 0. Based on the change in ticket purchase frequency, the customer's social circle member list is retrieved from the store comparison file, and the identity code of each member is obtained. For each social circle member, the total number of ticket purchases at the original store before the prize redemption time window and the total number of ticket purchases at the original store after the prize redemption time window are counted. Using the total number of ticket purchases at the original store for each member, the difference between the number of ticket purchases after prize redemption and the number of ticket purchases before prize redemption is calculated as the member's change in ticket purchase frequency. The proportion of members with negative ticket purchase frequency in the social circle is counted. If the proportion exceeds a preset threshold, it is determined that the social circle has a tendency to collectively churn. The preset threshold is 60%, determined based on historical customer behavior data analysis and industry churn pattern standards. A data set containing the identity codes of each customer and their change in ticket purchase frequency is extracted and output.
[0036] In one implementation, the calculation of the change in ticket purchase frequency uses a time-standardized method. All records containing the original ticket purchase store code are extracted from the coded segment, and their total occurrences are counted. Although the time window before and after prize redemption has the same number of days, it is uniformly converted to months for calculation to account for differences in the number of days in different months. If the time window is 90 days, it is approximately equal to 3 months, and the monthly average is obtained by dividing the number of times the original store appeared by 3.
[0037] Specifically, the identification of social circle members is based on established relationships in the store comparison files. These files record the correspondence between each customer and their accompanying ticket-buying partners, identified and tagged based on rules such as similar payment times and ticket amounts. After reading these member lists, the purchase records of each member within a specified time period are queried in batches, forming an individual ticket-buying behavior dataset. This batch processing method avoids the inefficiency of querying one by one and improves data extraction efficiency. The positive or negative value of the change in ticket purchase frequency has clear business implications. Negative values indicate a decrease in customer activity at the original store, potentially indicating a risk of customer churn; positive values indicate increased activity and stronger customer loyalty; zero or near-zero values indicate stable ticket-buying behavior. By calculating the change values of all members in the social circle, group behavior trends can be identified. When most members show negative changes, it indicates that the social circle may be influenced by some external factor, such as the attraction of competing stores or a decline in the service quality of the original store, leading to a collective shift in ticket-buying behavior. Identifying these group characteristics is valuable for predicting potential cascading losses, as the mutual influence among members of social circles can accelerate the formation of individual churn decisions.
[0038] Preferably, a proportional threshold method is used to determine the tendency of collective churn. The churn rate is calculated by dividing the number of members with negative changes in ticket purchase frequency by the total number of members in the social circle. When this rate exceeds 60%, a tendency of collective churn is considered to exist. This threshold is set based on historical data analysis, which avoids misjudgments caused by changes in the behavior of individual members while promptly identifying genuine risks of group churn.
[0039] For example, the output data set is stored in a structured format and includes fields such as member identification code, number of tickets purchased before prize redemption, number of tickets purchased after prize redemption, frequency change value, and percentage change.
[0040] S104. Based on the correlation between the decrease in the frequency of ticket purchases at the original store after prize redemption and the increase in the number of times the prize redemption store code appears in the ticket purchase code segment after prize redemption, it is confirmed that the customer shows signs of loss, shifting from the original ticket purchase store to the prize redemption store.
[0041] The frequency decrease is calculated by subtracting the frequency of purchases at the original store before and after the prize redemption. This decrease is then divided by the pre-prize purchase frequency to obtain the decrease rate. Simultaneously, the number of times the prize-winning store code appears in the post-prize purchase code segment is subtracted from the pre-prize purchase code segment's occurrence count to obtain the prize-winning store increment. Based on the decrease rate and the prize-winning store increment, a two-dimensional coordinate system is constructed, with the decrease rate as the horizontal axis and the prize-winning store increment as the vertical axis. If this coordinate point falls within a preset churn detection area, a transfer relationship is determined between the decrease in purchases at the original store and the increase in purchases at the prize-winning store. If this transfer relationship exists and the decrease rate exceeds 0.5 and the prize-winning store increment exceeds 5, it is confirmed that the customer has shown signs of churn, shifting from the original purchase store to the prize-winning store.
[0042] In one implementation, the decline rate is calculated using a relative proportion method to quantify the degree of change in customer ticket-buying behavior. First, the total number of ticket purchases made by customers at the original ticket outlet within the time window before prize redemption is counted. Then, the number of purchases within the same time window after prize redemption is counted. The frequency decline value is obtained by subtracting the two, and the decline rate is calculated by dividing the frequency decline value by the ticket purchase frequency before prize redemption, reflecting the relative magnitude of change in ticket-buying activity.
[0043] Specifically, the statistics on the increase in prize-redeem stores involve tracking the prize-redeem store codes at different time periods. Before prize redemption, the ticket purchase code segment is scanned, and the frequency of the prize-redeem store code is counted. This value is usually small or zero because customers previously mainly frequented the original ticket purchase store. After prize redemption, the frequency of the prize-redeem store code in the ticket purchase code segment often increases significantly; the difference between the two is the increase in prize-redeem stores. This increase directly reflects the degree to which customers have shifted to prize-redeem stores.
[0044] It's important to note that the construction of the two-dimensional coordinate system and the design of the churn determination region are based on statistical patterns from a large amount of historical data. The horizontal axis represents the rate of decline in ticket purchases at the original store, and the vertical axis represents the increase in ticket purchases at the prize-winning store. Each customer corresponds to a point in the coordinate system. The churn determination region is typically set as a specific area in the first quadrant, i.e., an area where both the decline rate and the increase in prize-winning stores are positive. The boundary of this region is determined through cluster analysis of historical churn customer data. Typical churn customer coordinate points tend to concentrate in areas where the decline rate is greater than 30% and the increase in prize-winning stores is greater than twice per month on average. When a new customer's coordinate point falls into this preset region, it indicates that the customer exhibits a similar behavioral pattern to historical churn customers, showing a clear tendency to switch stores. This coordinate-based visualization method makes churn risk assessment more intuitive and accurate.
[0045] Preferably, the dual-threshold determination mechanism provides a more accurate standard for confirming customer churn. The first preset threshold is set for the decline rate, typically between 25% and 40%, adjusted according to industry characteristics and store type. The second preset threshold is set for the increase in prize-winning stores, generally above 50% of the average monthly ticket purchases. Only when both conditions are met simultaneously does the system confirm that the customer has shown signs of churn.
[0046] For example, a customer who originally purchased tickets 10 times per month at store A reduced that number to 6 after redeeming a prize, a decrease of 40%. Simultaneously, the customer's ticket purchases at store B increased from 0 to 4 per month. Since the coordinate point is within the churn detection area and meets both threshold conditions, it is confirmed that the customer has shown signs of churn, shifting from store A to store B.
[0047] One approach to identifying the window of opportunity missed by a store due to insufficient staffing and inability to retain lost customers involves extracting customer records from the store's comparative archives that confirm signs of customer churn. This analysis examines the influence of lost customers as opinion leaders within their social circles, which may lead other customers to follow suit. The assessment also evaluates the siphon effect of the customer's word-of-mouth promotion on surrounding stores and identifies other customers within the lost customer's social circle who may follow suit.
[0048] Extract customer records showing confirmed signs of churn from store comparison files, obtain the customer's ticket purchase history and social network relationship data, and calculate the proportion of the customer's ticket purchases initiated within the social circle to the total number of ticket purchases. The number of ticket purchases initiated is based on the time proximity of purchase records, payment relevance within 24 hours, and the use of the same payment account or method. If this proportion exceeds 0.7, the customer is marked as a potential opinion leader. Record the time when the customer first purchased a ticket at the prize redemption store as the individual's transfer starting point. Based on this individual transfer starting point, retrieve changes in the ticket purchase behavior of other members in the social circle after that time point, and calculate the decrease in ticket purchase frequency at the original ticket purchase store and the new ticket purchase records at the prize redemption store for each member. Calculate the average change in ticket purchase frequency for each member, and determine the time point when more than half of the members' ticket purchase frequency simultaneously decreases as the social circle's observation starting point. Using the aforementioned social circle observation starting point and the potential opinion leader markers, the time difference between the opinion leader's individual transfer starting point and the circle's observation starting point is calculated. The number of ticket purchases by the opinion leader at the prize redemption store within this time difference is counted. The number of purchases is divided by the time difference to obtain the dissemination frequency. The dissemination frequency is multiplied by a preset weighting coefficient to obtain the siphon intensity value of the prize redemption store's influence on surrounding stores through the opinion leader. The weighting coefficient is calculated based on the average dissemination impact of historical data, W = 0.5 x (layer size / 10), where W is the weighting coefficient. The influence range is filtered using the siphon intensity value. Members whose ticket purchase frequency continuously decreases after the social circle observation starting point, with a decrease exceeding 20% for three consecutive months, and who have purchase records at the prize redemption store, are identified. Their identity codes and historical average monthly ticket purchase amounts are obtained. If a member's average monthly ticket purchase amount exceeds the circle average and the siphon intensity value exceeds a preset threshold, then that member is identified as another potential customer who may follow the transfer.
[0049] In one implementation, the identification of potential opinion leaders is based on an assessment of a customer's behavioral dominance within their social circle. Records of customers confirmed to be attrition are extracted from store comparison files; these records include the customer's complete ticketing history, social network, and data on ticketing organization behavior. The number of ticket purchase initiations is statistically analyzed, encompassing customers actively inviting others to purchase tickets together, identified by analyzing the temporal proximity and payment correlation in the purchase records. When a customer's ticket purchase initiation counts for more than 40% of their total ticket purchases, it indicates that the customer possesses strong organizational skills and influence within their social circle.
[0050] Specifically, determining the individual shift starting point requires accurately capturing the key moments of customer behavior transformation. Tracking all ticket purchase records of the opinion leader after the prize redemption event identifies the point in time when they first independently purchased a ticket at the prize redemption store. This point in time marks the beginning of the customer's shift from accidental cross-store prize redemption behavior to actively choosing to purchase tickets at the new store, representing the substantial starting point of customer loyalty transfer. Determining the social circle's observation starting point involves statistical analysis of group behavior patterns. Daily monitoring of each member's ticket purchase behavior after the individual shift starting point records changes in the frequency of ticket purchases at the original stores. Using a sliding window method, with a 7-day statistical period, the average ticket purchase frequency of circle members is calculated for each period. When more than 50% of members simultaneously experience a decrease in ticket purchase frequency within a certain period, and the decrease exceeds 20% of the previous average, the start time of that period is determined as the social circle's observation starting point. This point in time reflects the psychological state of circle members beginning to collectively pay attention to the opinion leader's behavioral changes and hesitating about their own ticket purchase choices. The time difference between the starting point of observation and the starting point of individual transfer reflects the speed at which the influence of opinion leaders spreads. The shorter the time difference, the higher their prestige in the circle, and the stronger the members' attention to their behavior and their tendency to follow them.
[0051] Preferably, the siphon intensity value is calculated using a multi-factor weighted method. The dissemination frequency is calculated by dividing the number of tickets purchased by the opinion leader within the time difference by the number of days in the time difference, reflecting their activity level at the new store. The weighting coefficients consider factors such as the opinion leader's historical ticket purchase amount, winning frequency, and social circle size. Specifically, the dissemination frequency is multiplied by the comprehensive weighting coefficient to obtain a siphon intensity value between 0 and 10. The higher the intensity value, the stronger the attraction of the prize-winning store to customers in surrounding stores through that opinion leader.
[0052] In one possible implementation, the siphon strength value is used as an important parameter for screening customers who are following the trend. First, the scope of influence is determined based on the siphon strength value. If the strength value is greater than 6, the scope of influence extends to the opinion leader's second-degree social relationships; if the strength value is between 3 and 6, the scope of influence is limited to first-degree social relationships. Within the defined scope of influence, members whose ticket purchase frequency has been continuously decreasing since the initial observation period are identified. This continuity is determined by a frequency decrease over three consecutive statistical periods. Further, the identification codes and historical average monthly ticket purchase amounts of these members are obtained. The average monthly ticket purchase amount is calculated based on the ticket purchase records of the past 6 months, averaging after removing abnormally high and low values. When a member's average monthly ticket purchase amount exceeds 1.2 times the average of their social circle, it indicates that the member has high spending power and ticket purchase demand, and their churn will cause significant economic losses to the original store.
[0053] For example, the final identification of customers who follow the transfer requires the simultaneous fulfillment of multiple conditions. Besides the average monthly ticket purchase amount exceeding the average of the social circle, the "siphoning intensity" value must exceed a preset threshold of 5, and the member must have at least one ticket purchase record at the prize redemption store. This multi-condition judgment mechanism avoids misclassifying accidental behavior as follow-the-transfer, improving the accuracy of prediction. The output list of potential follow-the-transfer customers is sorted according to their churn risk level, which comprehensively considers factors such as ticket purchase amount, the closeness of the relationship with the opinion leader, and the frequency of ticket purchases at the new store.
[0054] Understandably, this social network-based churn prediction method can help stores identify potential customer churn groups in advance, especially high-value customers influenced by opinion leaders. By analyzing the behavioral patterns and social influence of opinion leaders, stores can develop more targeted retention strategies and take effective measures before customers are completely lost.
[0055] For example, after winning a prize, an opinion leader switched to the more comfortable store B. Three out of five members in their social circle began reducing their ticket purchases at their original store A. These three members each spent over 500 yuan per month on tickets. The calculated attraction strength is 7.2, predicting that these three high-value customers are highly likely to completely migrate to store B within the next month. Store A can then offer targeted exclusive discounts or improved services to retain these customers.
[0056] By combining the identities of other customers who may follow the lost customer in their social circles, we can assess the appeal and spread of the reward redemption store in the surrounding community through the word-of-mouth promotion of the lost customer, and determine the defensive window period missed by the original store due to insufficient service staff to retain the lost customer in time.
[0057] The system acquires social interaction records between churned customers and their follower customers, calculates the frequency of contact between churned and follower customers within a preset number of days after an individual's churn inception, reads the residential community codes of follower customers, and calculates the proportion of follower customers in each community to the total number of lottery customers in that community, thus obtaining the word-of-mouth influence density value for each community. For communities whose word-of-mouth influence density value exceeds a preset threshold, the system counts the number of new customers purchasing tickets at prize redemption stores after the individual's churn inception. The number of new customers is divided by the total number of lottery customers in the community to obtain the attraction diffusion rate. This attraction diffusion rate is combined with the geographical distance between the community and the prize redemption store to assess the attraction diffusion range formed by the prize redemption store through word-of-mouth promotion by churned customers. Based on the customer churn rate within the attraction diffusion range, the system obtains the number of service personnel and skill level configuration at the original store, calculates the average number of customers each service personnel is responsible for, and determines insufficient staffing if this number exceeds a preset service capacity threshold. The system extracts the earliest time point from the customer file where the churned customer's ticket purchase frequency decreased, and subtracts this earliest time point from the individual churn inception time to obtain the defense window duration.
[0058] In one implementation, social interaction records are obtained based on multi-dimensional contact behavior tracking between customers. The co-occurrence time of churned customers and those who followed the customer's transfer is identified from ticket purchase records. When both customers appear at the same store or complete their ticket purchase within the same time period or at adjacent times, it is recorded as one contact. The frequency of contacts within 30 days after an individual's churn point is given special attention, as this period is the peak time for word-of-mouth marketing.
[0059] Specifically, the calculation of word-of-mouth influence density value needs to comprehensively consider community size and customer distribution characteristics. First, the residential community codes of customers who followed the churn are extracted from the geographic information database; these codes correspond to specific residential areas or street ranges. The total number of lottery customers in each community is calculated using address information from historical ticket purchase data, including active and occasional customers. The word-of-mouth influence density value equals the number of customers who followed the churn within the community divided by the total number of lottery customers in that community, reflecting the degree of penetration of the churn impact in a specific community. When the density value of a community exceeds 15%, it indicates that a strong word-of-mouth effect has formed in that community, and the original store's market position in that community is seriously threatened. New customer identification is achieved by comparing customer lists before and after an individual's churn point; the system filters out community customers who made their first purchase at the prize redemption store after the churn point. The attraction diffusion rate considers not only the absolute number of new customers but also their geographical distance from the prize redemption store. Communities with greater distances but higher diffusion rates indicate stronger word-of-mouth influence.
[0060] Preferably, the complete purchase frequency record of the lost customer is extracted from the customer profile, and a moving average algorithm is used to identify the turning point where the frequency begins to decline continuously. This earliest point in time represents the moment when customer loyalty begins to waver, which is the golden opportunity for the store to take retention measures.
[0061] For example, service capacity assessment is achieved through the ratio of staffing to the number of customers. When the average number of customers handled by each service staff member exceeds a preset threshold of 150, it indicates that the store is unable to provide sufficient personalized service and has missed the opportunity to respond promptly and retain lost customers during the defensive window period.
[0062] Understandably, calculating the duration of the defensive window reveals the extent of a store's slow response. If the window exceeds 30 days, it indicates that the store failed to take effective measures for up to a month after customers began showing signs of churn, reflecting serious deficiencies in customer relationship management.
[0063] S105. After confirming signs of loss, identify the positive cumulative trend of the contribution deviation between the expected contribution value and the actual contribution value of store prize redemption within a continuous statistical period.
[0064] After confirming signs of customer attrition, the total number of times the customer visited the original store within the code segment before redeeming the prize is calculated. The total amount of all tickets purchased during that period is divided by the number of purchases to obtain the average amount per purchase. The expected contribution value is obtained by multiplying the number of purchases at the original store by the average amount per purchase. The actual contribution value is obtained by counting the number of purchases at the original store within the code segment after redemption and multiplying it by the average amount per purchase. Based on the expected contribution value and the actual contribution value, the contribution deviation value is obtained by subtracting the actual contribution value from the expected contribution value. The deviation value is recorded according to a preset statistical period. If the deviation value is positive for three or more consecutive statistical periods and the cumulative deviation value of the later period is greater than that of the previous period, a positive cumulative trend is identified.
[0065] In one implementation, the average ticket purchase amount per transaction is calculated using an arithmetic mean. All ticket purchases made by the customer at the original store during the period prior to prize redemption are extracted from the purchase records, outliers are removed, the sum is calculated, and then divided by the number of valid purchases. This average represents the customer's typical spending level and is used to estimate the customer's value contribution.
[0066] Specifically, the expected contribution value reflects the revenue that a customer should have generated for the original store based on their pre-redemption ticketing habits. The actual contribution value is the actual amount of tickets purchased by the customer after redemption. The difference between the two is the contribution deviation value; a positive value indicates that the actual contribution is lower than expected, suggesting a decline in customer loyalty.
[0067] It's important to note that identifying a positive cumulative trend requires observing multiple statistical periods. Each period is typically one month, recording the deviation value for each period. When the deviation values are all positive for three consecutive months, and the cumulative value increases month by month, it indicates that customer churn is deepening. This continuously worsening trend serves as a wake-up call for stores, prompting immediate retention measures.
[0068] S106. When the contribution deviation value is consistently positive and the cumulative amount exceeds the customer's historical average consumption amount per cycle, it is determined that there is a systemic overestimation. The defense window period missed by the original store due to insufficient service staff is identified, and the identities of other customers in the same social circle who have begun to reduce their ticket purchases from the original store are included in the chain loss scope and pushed to the original ticket purchase store.
[0069] When the Contribution Deviation Value (CDV) remains positive and the cumulative amount exceeds the customer's historical average spending per cycle, a systemic overestimation is identified. CDV = AC - EC, where AC is the actual contribution and EC is the expected contribution. The customer's ticket purchase records within a preset time period are obtained, and the types and amounts of additional goods purchased with each ticket purchase are statistically analyzed. The Average Linked Sales Rate (ALSR) is calculated as: Total Additional Amount / Total Ticket Amount. The ALSR is multiplied by the number of lost ticket purchases to obtain the linked sales opportunity loss value, where the number of lost ticket purchases is the historical average number of purchases minus the current number of purchases. If the linked sales opportunity loss value exceeds a preset threshold of 10, the original store's staff scheduling records are queried. The number of days after the customer's departure is recorded and the number of days the staff's contact with the customer drops to zero is calculated. The ratio of the original store's total staff to the total number of customers is obtained. If the ratio is lower than a preset standard, staffing is deemed insufficient. The duration between the time when signs of customer departure appear and the time when the customer completely leaves is determined as the defensive window period. Based on the defense window period and the results of the systemic overestimation judgment, other customers whose ticket purchase frequency decreased by more than a preset percentage during the defense window period are selected from the social circle data. The identity codes and contact information of these customers are obtained to form a chain loss warning list, and the list and defense window period data are pushed to the original ticket purchase store management terminal.
[0070] In one implementation, the determination of systematic overvaluation is based on the persistence and cumulative effect of contribution deviation values. When the contribution deviation value remains positive for three consecutive months or longer, and the cumulative amount exceeds the customer's historical average spending per cycle, it indicates a systematic bias in the system's valuation of the customer. This bias is not a random fluctuation, but a signal of a fundamental change in customer behavior patterns.
[0071] Specifically, calculating lost cross-selling opportunities requires in-depth analysis of customers' historical ticketing behavior. Detailed ticketing records for the past 180 days are extracted from the database, identifying the items purchased each time. By statistically analyzing the types, quantities, and amounts of these items, the average cross-selling rate is calculated.
[0072] For example, if a customer purchases an average of 20 yuan worth of additional merchandise with each ticket purchase, resulting in a 40% cross-selling rate, then the cross-selling loss reaches 200 yuan when that customer misses 10 ticket purchase opportunities. This loss not only reflects a decrease in direct sales but, more importantly, reveals a decline in the depth of customer interaction with the store, as customers willing to purchase additional merchandise typically have higher loyalty and trust. Determining the defensive window involves identifying two key time points. The first time point is the moment when signs of churn first appear, which is determined by analyzing the change curve of ticket purchase frequency; the starting point is when the frequency begins to decline continuously. The second time point is the moment when the customer completely churns, defined as 60 consecutive days without a ticket purchase record. The duration between these two time points is the defensive window, a golden opportunity for the store to retain customers.
[0073] Preferably, the determination of insufficient service personnel adopts a ratio analysis method. The ratio of the total number of service personnel in the original store to the total number of active customers is calculated. When the ratio is less than 1:100, it is considered insufficient staffing. This insufficiency directly leads to a decline in service quality and an inability to promptly detect and respond to customer churn.
[0074] For example, the formation of the chain churn warning list is based on the contagion effect of social networks. Other customers whose ticket purchase frequency drops by more than 30% during the defense window period are screened from social circle data. These customers are affected by the churned customers and are in a wait-and-see state, and are very likely to follow suit.
[0075] Understandably, sending early warning information to the original ticketing store can help the store take timely and targeted retention measures, intervene before customers are completely lost, and improve the success rate of retention.
[0076] If the technical solution of this application involves the collection, processing, or application of personal information, the relevant products have, before implementing any personal information processing activities, fully and clearly informed individuals of the processing rules in accordance with the "Personal Information Protection Law of the People's Republic of China" and other current laws and regulations, and obtained their voluntary and explicit consent. If sensitive personal information is involved, the product has obtained the individual's separate consent before processing, and such consent is given in an explicit manner. For example, prominent signs are set up in the area where information collection devices such as cameras are located, clearly indicating "Entering is considered as consent to the collection of personal information"; or through pop-ups, checkboxes, user-initiated uploads, etc., under the premise of clearly listing the processor's identity, processing purpose, processing method, and information type, the user actively completes the authorization operation. The above mechanisms ensure that all personal information processing activities are based on legal authorization and fully comply with national compliance requirements regarding personal information protection.
[0077] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A method for real-time analysis of sales data of coded products, characterized in that, The method includes: Track the original ticket purchase store code and prize redemption store code of the customer who won the prize, and combine them with the identity list of other customers who purchased tickets at the same time to form a list of store codes of the customer's ticket purchase social network; For customers whose prize redemption store code and original ticket purchase store code are inconsistent, the service staff configuration and promotional activity type of the original ticket purchase store, as well as the service advantages and environmental factors of the prize redemption store, are associated with the customer's ticket purchase social network to form a store comparison file and determine the ticket purchase store code segment before prize redemption and the ticket purchase store code segment after prize redemption. Based on the store code segment before and after the prize redemption, the change value of the customer's purchase frequency at the original store was analyzed, and the change of purchase frequency of the same customer in the customer's social circle was extracted from the store comparison file. Based on the correlation between the decrease in the frequency of ticket purchases at the original store after prize redemption and the increase in the number of times the prize redemption store code appeared in the ticket code segment after prize redemption, it was confirmed that the customer showed signs of loss, shifting from the original ticket purchase store to the prize redemption store. After confirming signs of loss, identify the positive cumulative trend of the contribution deviation between the expected contribution value and the actual contribution value of store prize redemption within a continuous statistical period; When the contribution deviation value is consistently positive and the cumulative amount exceeds the customer's historical average consumption per cycle, it is determined that there is a systemic overestimation. The defensive window period missed by the original store due to insufficient service staff is identified, and the identities of other customers in the same social circle who have begun to reduce their ticket purchases from the original store are included in the chain loss scope and pushed to the original ticket purchase store.
2. The method for real-time analysis of sales data of coded products according to claim 1, characterized in that, The tracking of the original ticket purchase store code and prize redemption store code of the winning customer, combined with the identity list of other customers who purchased tickets at the same time, forms a customer ticket purchase social network store code list, including: Obtain other ticket purchase records within a preset time range before and after the customer's ticket purchase period. Identify customers who purchase tickets together based on the rule that the payment time difference is less than a preset time threshold and the ticket amount difference is less than a preset amount threshold. Record the identity number and ticket store code of the customers who purchase tickets together, and form an initial social association record centered on the customer. For the prize redemption of winning lottery tickets, read the prize redemption store code and prize redemption timestamp, query the original ticket purchase store code of the winning lottery ticket, extract the identity number of each accompanying customer from the initial social association record, query the ticket purchase records of each accompanying customer within a preset time period after the prize redemption time point, and obtain the ticket purchase store code sequence of each accompanying customer. Based on the initial social association records and the ticket purchase store code sequence, a data structure is constructed that includes customer ID number, original ticket purchase store code, prize redemption store code, and a list of accompanying customer IDs and their corresponding ticket purchase store code sequences. The ticket purchase association and prize redemption association between customer nodes and store nodes are stored in an adjacency list, forming a customer ticket purchase social network store code list.
3. The method for real-time analysis of sales data of coded products according to claim 1, characterized in that, For customers whose prize-redemption store code and original ticket purchase store code do not match, the staffing and promotional activities of the original ticket purchase store, as well as the service advantages and environmental factors of the prize-redemption store, are linked to the customer's ticket purchase social network to form a store comparison file, determining the ticket purchase store code segment before prize redemption and the ticket purchase store code segment after prize redemption, including: For customers whose prize redemption store code is inconsistent with the original ticket purchase store code, obtain the number of service personnel, their skill level, and average years of service at the original ticket purchase store. At the same time, obtain the promotional activity type code, activity frequency, and discount of the store during the preset period before prize redemption to form a record of the service attributes of the original ticket purchase store. Based on the store code in the original ticket purchase store's service attribute record, query the service personnel configuration data and environmental rating data of the prize redemption store to obtain the prize redemption store's environmental attribute record; By comparing the service attribute records of the original ticket purchase store with the environmental attribute records of the prize redemption store, the identification codes of all associated customers in the customer's ticket purchase social network are read, and the historical ticket purchase frequency and amount of each associated customer in the two stores are queried to construct a store comparison profile. Based on the aforementioned store comparison files, with the prize redemption time as the central point, the time window before prize redemption and the time window after prize redemption are determined, and the store code segment before prize redemption and the store code segment after prize redemption are extracted from the ticket purchase records.
4. The method for real-time analysis of sales data of coded products according to claim 1, characterized in that, The analysis, based on the store code segments before and after prize redemption, identifies changes in the customer's ticket purchase frequency at the original store. It then extracts changes in the ticket purchase frequency of other customers within the customer's social circle from the store comparison file, including: The frequency of the original ticket purchase store code is counted from the ticket purchase store code segment before and after the prize redemption. The average monthly number of tickets purchased at the original ticket purchase store before and after the prize redemption is calculated to obtain the change value of the customer's ticket purchase frequency at the original ticket purchase store. Based on the change in ticket purchase frequency, the customer's social circle member list is retrieved from the store comparison file. For each social circle member, the total number of times they purchased tickets at the original ticket purchase store within the time window before and after the prize redemption is counted, and the change in ticket purchase frequency for each member is calculated.
5. The method for real-time analysis of sales data of coded products according to claim 1, characterized in that, The correlation between the decrease in the frequency of ticket purchases at the original store after prize redemption and the increase in the number of times the prize redemption store code appears in the ticket purchase code segment after prize redemption confirms that the customer is showing signs of churn, shifting from the original ticket purchase store to the prize redemption store. This includes: Calculate the rate of decrease in the frequency of ticket purchases at the original ticket purchase stores before and after the prize redemption, and also calculate the increase in the number of times the prize redemption store code appears in the ticket purchase code segment after the prize redemption. Based on the decline rate and the incremental number of occurrences of the prize redemption store code, a coordinate point is constructed to determine whether the coordinate point is located within the preset loss judgment area; If a transfer relationship exists and the decrease rate and the increase in the number of times the prize redemption store code appears meet preset conditions, then it is confirmed that the customer has shown signs of loss, transferring from the original ticket purchase store to the prize redemption store.
6. The method for real-time analysis of sales data of coded products according to claim 1, characterized in that, The method also includes: extracting customer records that confirm signs of churn from store comparison files, analyzing the opinion leader role of churned customers in their social circles, which leads other customers to follow suit, assessing the siphon effect of the reward redemption store on surrounding stores through the word-of-mouth spread of the customer, and identifying the identities of other customers in the social circles of the churned customer who may follow suit.
7. The method for real-time analysis of sales data of coded products according to claim 6, characterized in that, The process involves extracting customer records from store comparison files that confirm signs of churn, analyzing the opinion leader role of churned customers within their social circles, assessing the siphon effect of word-of-mouth referrals from these customers on surrounding stores, and identifying other customers within the churned customer's social circle who may follow suit. Specifically, this includes: Extract customer records with confirmed signs of loss from the store comparison files, obtain the customer's ticket purchase history data and social network relationship data, and calculate the proportion of the number of times the customer initiated ticket purchases in the social circle to the total number of ticket purchases. If the proportion exceeds the preset proportion, the customer is marked as a potential opinion leader. Record the time when the customer first purchased a ticket at the prize redemption store as the individual transfer starting point. Based on the individual's starting point of transfer, retrieve the changes in ticket purchasing behavior of other members in the social circle after that point in time, count the number of decreases in ticket purchasing frequency at the original ticket purchasing store and the number of new ticket purchasing records at the prize redemption store for each member, calculate the average value of the change in ticket purchasing frequency for each member, and determine the starting point of the social circle's wait-and-see attitude. Using the social circle observation starting point and potential opinion leader marker, the time difference between the individual opinion leader's transfer starting point and the circle observation starting point is calculated. The number of times the opinion leader purchases tickets at the prize redemption store within this time difference is counted. The dissemination frequency is calculated and combined with the preset weight coefficient to obtain the siphon intensity value of the prize redemption store on the surrounding stores through the opinion leader. By filtering the scope of influence using the siphon intensity value, members whose ticket purchase frequency continued to decline after the social circle's observation point and who had ticket purchase records at the prize redemption store were identified, thus determining that these members were other customers who might follow the transfer.
8. The method for real-time analysis of sales data of coded products according to claim 1, characterized in that, After confirming signs of attrition, identifying the positive cumulative trend of the deviation between the expected and actual contribution values of store prize redemption over a continuous statistical period includes: After confirming the signs of loss, the total number of times and the total amount of tickets purchased by the customer at the original ticket purchase store within the original ticket purchase store code segment before the prize redemption are counted. The average amount of a single ticket purchase is calculated, and the expected contribution value is obtained by multiplying the number of times tickets were purchased at the original ticket purchase store by the average amount of a single ticket purchase. The actual contribution value is obtained by counting the number of times tickets were purchased at the original ticket outlets within the coded segment after the prize redemption and multiplying it by the average single ticket purchase amount. The contribution deviation value is calculated based on the expected contribution value and the actual contribution value. The deviation value is recorded according to a preset statistical period. If the deviation value is positive for multiple consecutive statistical periods and the cumulative deviation value of the later period is greater than that of the previous period, a positive cumulative trend is identified.
9. The method for real-time analysis of sales data of coded products according to claim 1, characterized in that, The identification of the defensive window period missed by the original store due to insufficient service staff includes: combining the identities of other customers who may follow the lost customer in their social circle, assessing the attractiveness spread of the redemption store in the surrounding community through the word-of-mouth promotion of the lost customer, and determining the defensive window period missed by the original store due to insufficient service staff to retain lost customers in time.
10. A method for real-time analysis of sales data of coded products according to claim 1, characterized in that, When the contribution deviation value remains positive and the cumulative amount exceeds the customer's historical average spending per cycle, it is determined that there is a systemic overestimation. This involves identifying the defensive window period missed by the original store due to insufficient staffing, including other customers in the same social circle who have begun to reduce their ticket purchases from the original store in the chain churn scope, and pushing this information to the original ticket-purchasing store. When the contribution deviation value is consistently positive and the cumulative amount exceeds the customer's historical average consumption per cycle, it is determined that there is a systematic overestimation; Obtain the customer's ticket purchase records within a preset time period, calculate the total amount of goods purchased each time, and calculate the lost sales opportunity value; Based on the aforementioned sales opportunity loss value, query the original store service personnel's shift records to determine insufficient staffing and identify the defense window period; Based on the defense window period and the results of the systemic overestimation judgment, other customers whose ticket purchase frequency decreased during the defense window period are selected from the social circle data and pushed to the original ticket purchase stores.