Method, device and electronic equipment for processing customer transaction data
Patent Information
- Application Number
- CN202310116065.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-08
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2043-02-08
AI Technical Summary
[0005]本申请的主要目的在于提供一种客户交易数据的处理方法、装置及电子设备,以解决相关技术中依赖人工经验对多个客户进行分类导致分类的结果不准确的问题
[0016]通过本申请,采用以下步骤:从受理客户交易的服务器中获取在预设时间内多个待分类客户的第一交易数据和多个预设客户的第二交易数据;依据所述第一交易数据和所述第二交易数据,采用第一算法计算所述多个待分类客户和每个预设客户之间的相似度,得到第一相似度集合;依据所述第一交易数据和所述第二交易数据,采用第二算法计算所述多个待分类客户和每个预设客户之间的相似度,得到第二相似度集合;依据所述第一相似度集合和所述第二相似度集合,确定所述多个待分类客户的分类结果,解决相关技术中依赖人工经验对多个客户进行分类导致分类的结果不准确的问题。通过使用两种计算相似度的算法(第一算法和第二算法)获取第一相似度集合和所述第二相似度集合,将第一相似度集合和所述第二相似度集合作为对多个待分类客户进行分类的依据,达到了通过数字化自动计算分类多个待分类客户的效果,提升了对多个待分类客户进行分类的准确性。
Smart Images

Figure CN116127358B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of big data, and more specifically, to a method, apparatus, and electronic device for processing customer transaction data. Background Technology
[0002] Currently, when providing acquiring services to customers, financial institutions need to adopt differentiated management for different customers based on their daily transaction patterns. For example, rewarding high-performing customers with good business performance, while punitive measures are taken against customers with risky behaviors such as fraudulent transactions, in order to ensure the healthy development of the financial institution's overall business.
[0003] Existing technologies for classifying customer transaction data often employ manual processing. This method relies on the experience and judgment of customer service personnel, or on periodically generating transaction lists based on certain customer metrics, which are then used by customer service personnel to determine specific measures to take against the customer. However, neither of these methods considers the low efficiency and high cost of manual processing. Furthermore, different customer service personnel may obtain different customer classification results, which can negatively impact the development of financial institutions.
[0004] There is currently no effective solution to the problem of inaccurate classification results caused by relying on human experience to classify multiple customers in related technologies. Summary of the Invention
[0005] The main objective of this application is to provide a method, apparatus, and electronic device for processing customer transaction data, in order to solve the problem in the related art where the classification of multiple customers is inaccurate due to reliance on human experience.
[0006] To achieve the above objectives, according to one aspect of this application, a method for processing customer transaction data is provided. The method includes: obtaining first transaction data of multiple customers to be classified and second transaction data of multiple preset customers within a preset time period from a server that handles customer transactions; calculating the similarity between the multiple customers to be classified and each preset customer using a first algorithm based on the first transaction data and the second transaction data, to obtain a first similarity set; calculating the similarity between the multiple customers to be classified and each preset customer using a second algorithm based on the first transaction data and the second transaction data, to obtain a second similarity set; and determining the classification result of the multiple customers to be classified based on the first similarity set and the second similarity set.
[0007] Further, the first algorithm is a cosine similarity algorithm. Based on the first transaction data and the second transaction data, the first algorithm is used to calculate the similarity between the multiple customers to be classified and each preset customer to obtain a first similarity set. This includes: converting the multiple customer transaction data in the first transaction data into multiple n-dimensional vectors to obtain a first vector set; converting the multiple customer transaction data in the second transaction data into multiple n-dimensional vectors to obtain a second vector set; and using the cosine similarity algorithm to calculate the first similarity between each n-dimensional vector in the first vector set and each n-dimensional vector in the second vector set to obtain the first similarity set.
[0008] Furthermore, the second algorithm is the Euclidean distance algorithm. Based on the first transaction data and the second transaction data, the second algorithm is used to calculate the similarity between the multiple customers to be classified and each preset customer to obtain the second similarity set. This includes: using the Euclidean distance algorithm to calculate the second similarity between each n-dimensional vector in the first vector set and each n-dimensional vector in the second vector set to obtain the second similarity set.
[0009] Further, determining the classification results of the plurality of customers to be classified based on the first similarity set and the second similarity set includes: obtaining first customers whose first similarity to a target preset customer among the plurality of customers to be classified is greater than or equal to a first preset similarity, thus obtaining a first customer set; obtaining second customers whose second similarity to the target preset customer is less than or equal to a second preset similarity, thus obtaining a second customer set; calculating the median of the similarities in the third similarity set to obtain a first median, wherein the third similarity set includes the similarity between each first customer in the first customer set and the target preset customer; calculating the median of the similarities in the fourth similarity set to obtain a second median, wherein the fourth similarity set includes the similarity between each second customer in the second customer set and the target preset customer; and obtaining the classification results of the plurality of customers to be classified based on the first median and the second median.
[0010] Further, based on the first median and the second median, the classification results of the plurality of customers to be classified include: S1, if the first similarity between the target customer to be classified and the target preset customer is greater than or equal to the first median, and the second similarity between the target customer to be classified and the target preset customer is less than or equal to the second median, then it is determined that the target customer to be classified and the target preset customer belong to the same type of customer, and it is further determined whether the target customer to be classified and other preset customers among the plurality of preset customers belong to the same type of customer, thus obtaining the classification result of the target customer to be classified; S2, if the first similarity between the target customer to be classified and the target preset customer is greater than or equal to the first median, the classification results of the target customer to be classified are obtained; If the first similarity between the target customer to be classified is greater than or equal to the first median, and the second similarity between the target customer to be classified and the target preset customer is greater than the second median, then the target customer to be classified continues to be processed to determine the classification result of the target customer to be classified; S3, if the first similarity between the target customer to be classified and the target preset customer is less than the first median, then it is further determined whether the target customer to be classified belongs to the same category of customers as other preset customers among the multiple preset customers, and the classification result of the target customer to be classified is obtained; the non-target customers among the multiple customers to be classified are processed one by one using steps S1 to S3 to obtain the classification result of the multiple customers to be classified.
[0011] Further, if the first similarity between the target customer to be classified and the target preset customer is greater than or equal to the first median, and the second similarity between the target customer to be classified and the target preset customer is greater than the second median, then the target customer to be classified is further processed to determine the classification result of the target customer to be classified, including: obtaining third transaction data of the target customer to be classified from the server within the past M preset time periods; obtaining fourth transaction data of the target preset customer from the second transaction data; converting the third transaction data into M n-dimensional vectors to obtain a third vector set; converting the fourth transaction data into n-dimensional vectors to obtain a fourth vector; using a cosine similarity algorithm to calculate a fifth similarity between each N-dimensional vector in the third vector set and each n-dimensional vector in the fourth vector set to obtain a fifth similarity set; and using an Euclidean distance algorithm to calculate the third vector set... The sixth similarity between each N-dimensional vector in the fifth similarity set and each n-dimensional vector in the fourth similarity set is used to obtain a sixth similarity set. It is then determined whether all fifth similarities in the fifth similarity set are greater than or equal to the first median, and whether there exists a sixth similarity in the sixth similarity set whose difference from the first preset value is less than the first preset difference. If all fifth similarities in the fifth similarity set are greater than or equal to the first median, and there exists a sixth similarity in the sixth similarity set whose difference from the first preset value is less than the first preset difference, then the target customer to be classified is confirmed as a first-type customer. If not all fifth similarities in the fifth similarity set are greater than or equal to the first median, or if the difference between the sixth similarity in the sixth similarity set and the first preset value is greater than or equal to the first preset difference, then the target customer to be classified is confirmed as a second-type customer.
[0012] Further, after processing each non-target customer among the plurality of customers to be classified using steps S1 to S3 to obtain the classification results for the plurality of customers to be classified, the method further includes: if the classification result indicates that the target customer to be classified corresponds only to the customer category of the target preset customer, then the target customer to be classified and the target preset customer belong to the same customer category; if the classification result indicates that the first customer to be classified corresponds to the customer category of at least one preset customer among the plurality of preset customers, then a plurality of first preset customers corresponding to the first customer to be classified are obtained; the first similarity between the target customer to be classified and the plurality of first preset customers is obtained from the first similarity set to obtain a seventh similarity set; from the second similarity set... The second similarity between the first customer to be classified and the plurality of first preset customers is obtained from the set, resulting in an eighth similarity set; based on the seventh similarity set and the eighth similarity set, a second preset customer is obtained, wherein the difference between the seventh similarity and the second preset value between the second preset customer and the first customer to be classified is less than the second preset difference, and the difference between the eighth similarity and the first preset value between the second preset customer and the first customer to be classified is less than the third preset difference; it is determined that the first customer to be classified and the second preset customer belong to the same type of customer; if it is confirmed that the target customer to be classified does not belong to the same type of customer as any of the plurality of preset customers, then the target customer to be classified is confirmed as the second type of customer.
[0013] Furthermore, after processing each of the non-target customers to be classified among the multiple customers to be classified using steps S1 to S3 to obtain the classification results of the multiple customers to be classified, the method further includes: if the classification result indicates that the customer to be classified corresponds to the customer category of the target preset customer, then according to the customer category of the target preset customer, an intervention strategy is configured for the customer to be classified according to a preset rule; if the classification result indicates that the customer to be classified belongs to the first type of customer, then an intervention strategy for manual intervention is configured for the customer to be classified; if the classification result indicates that the customer to be classified belongs to the second type of customer, then no intervention strategy is configured for the customer to be classified.
[0014] To achieve the above objectives, according to another aspect of this application, a customer transaction data processing apparatus is provided. The apparatus includes: an acquisition unit, configured to acquire first transaction data of multiple customers to be classified and second transaction data of multiple preset customers within a preset time period from a server that handles customer transactions; a first calculation unit, configured to calculate the similarity between the multiple customers to be classified and each preset customer using a first algorithm based on the first transaction data and the second transaction data, to obtain a first similarity set; a second calculation unit, configured to calculate the similarity between the multiple customers to be classified and each preset customer using a second algorithm based on the first transaction data and the second transaction data, to obtain a second similarity set; and a determination unit, configured to determine the classification result of the multiple customers to be classified based on the first similarity set and the second similarity set.
[0015] To achieve the above objectives, according to one aspect of this application, an electronic device is provided, including one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the customer transaction data processing method described in any of the above.
[0016] This application employs the following steps: obtaining first transaction data of multiple customers to be classified and second transaction data of multiple preset customers within a preset time period from a server handling customer transactions; calculating the similarity between the multiple customers to be classified and each preset customer using a first algorithm based on the first and second transaction data, obtaining a first similarity set; calculating the similarity between the multiple customers to be classified and each preset customer using a second algorithm based on the first and second transaction data, obtaining a second similarity set; and determining the classification result of the multiple customers to be classified based on the first and second similarity sets. This solves the problem in related technologies where relying on human experience to classify multiple customers leads to inaccurate classification results. By using two similarity calculation algorithms (a first algorithm and a second algorithm) to obtain the first and second similarity sets, and using these sets as the basis for classifying multiple customers to be classified, the application achieves the effect of automatically classifying multiple customers to be classified through digital calculation, improving the accuracy of classifying multiple customers to be classified. Attached Figure Description
[0017] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0018] Figure 1This is a flowchart of a customer transaction data processing method provided in the embodiments of this application;
[0019] Figure 2 This is an illustration of an optional customer transaction data processing method provided according to an embodiment of this application. Figure 1 ;
[0020] Figure 3 This is an illustration of an optional customer transaction data processing method provided according to an embodiment of this application. Figure 2 ;
[0021] Figure 4 This is an illustration of an optional customer transaction data processing method provided according to an embodiment of this application. Figure 3 ;
[0022] Figure 5 This is a schematic diagram of a customer transaction data processing apparatus provided according to an embodiment of this application;
[0023] Figure 6 This is a schematic diagram of an electronic device for processing customer transaction data according to an embodiment of this application. Detailed Implementation
[0024] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0025] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0027] The present invention will now be described in conjunction with preferred implementation steps. Figure 1 This is a flowchart of a customer transaction data processing method provided in the embodiments of this application, such as... Figure 1 As shown, the method includes the following steps:
[0028] Step S101: Obtain first transaction data of multiple customers to be classified and second transaction data of multiple preset customers from the server that handles customer transactions within a preset time period.
[0029] In this embodiment, "multiple customers to be classified" refers to at least one customer that needs to be classified. Within a customer category, the transaction data of a predefined customer is considered the most representative. Multiple predefined customers are the set of predefined customers for each customer category within at least one customer category. For example, given customers A, B, C, D, and E, the transaction data of customers A and B, which are representative within a predefined time period, are selected from these five customers. Customer A is classified as customer category X, and customer A is the predefined customer for customer category X. Customer B is classified as customer category Y, and customer B is the predefined customer for customer category Y. Customers C, D, and E are the multiple customers to be classified.
[0030] Step S102: Based on the first transaction data and the second transaction data, the first algorithm is used to calculate the similarity between multiple customers to be classified and each preset customer, so as to obtain the first similarity set.
[0031] In this embodiment, based on the first transaction data of multiple customers to be classified and the second transaction data of multiple preset customers, a first similarity calculation algorithm is used to calculate the similarity between the multiple customers to be classified and each preset customer.
[0032] Step S103: Based on the first transaction data and the second transaction data, the second algorithm is used to calculate the similarity between multiple customers to be classified and each preset customer, and a second similarity set is obtained.
[0033] In this embodiment, based on the first transaction data of multiple customers to be classified and the second transaction data of multiple preset customers, a second similarity calculation algorithm is used to calculate the similarity between the multiple customers to be classified and each preset customer.
[0034] Step S104: Based on the first similarity set and the second similarity set, determine the classification results for multiple customers to be classified.
[0035] In this embodiment, by using two algorithms (a first algorithm and a second algorithm) to calculate similarity, a first similarity set and a second similarity set are obtained. Then, based on the first similarity set and the second similarity set, the classification results of multiple customers to be classified are determined. This achieves the effect of automatically classifying multiple customers to be classified through digital calculation, and realizes the upgrade of the customer-oriented operation mode from the traditional operation mode that relies on human experience judgment to the digital operation mode. At the same time, it also improves the accuracy of classifying multiple customers to be classified, thereby effectively reducing manual management costs and improving the acquiring service quality and risk control capabilities of the acquiring agency.
[0036] In summary, the customer transaction data processing method provided in this application obtains first transaction data of multiple customers to be classified and second transaction data of multiple preset customers within a preset time period from a server that handles customer transactions; calculates the similarity between the multiple customers to be classified and each preset customer using a first algorithm based on the first and second transaction data, obtaining a first similarity set; calculates the similarity between the multiple customers to be classified and each preset customer using a second algorithm based on the first and second transaction data, obtaining a second similarity set; and determines the classification result of the multiple customers to be classified based on the first and second similarity sets. This solves the problem in related technologies where relying on human experience to classify multiple customers leads to inaccurate classification results. By using two similarity calculation algorithms (the first algorithm and the second algorithm) to obtain the first and second similarity sets, and using the first and second similarity sets as the basis for classifying multiple customers to be classified, the method achieves the effect of automatically calculating and classifying multiple customers to be classified through digitalization, thus improving the accuracy of classifying multiple customers to be classified.
[0037] Optionally, in the customer transaction data processing method provided in this application embodiment, the first algorithm is a cosine similarity algorithm. Based on the first transaction data and the second transaction data, the first algorithm is used to calculate the similarity between multiple customers to be classified and each preset customer to obtain a first similarity set, including: converting multiple customer transaction data in the first transaction data into multiple n-dimensional vectors to obtain a first vector set; converting multiple customer transaction data in the second transaction data into multiple n-dimensional vectors to obtain a second vector set; and using the cosine similarity algorithm to calculate the first similarity between each n-dimensional vector in the first vector set and each n-dimensional vector in the second vector set to obtain a first similarity set.
[0038] In this embodiment, to obtain a first similarity set for subsequent calculations, the transaction data of multiple customers to be classified (i.e., the first transaction data) are first converted into multiple n-dimensional vectors according to a preset rule, resulting in a first vector set; then, the transaction data of multiple preset customers (i.e., the second transaction data) are converted into multiple n-dimensional vectors, resulting in a second vector set; then, a first algorithm is used to calculate the first similarity between each n-dimensional vector in the first vector set and each n-dimensional vector in the second vector set, thus obtaining the first similarity set. In this embodiment, the first algorithm can be a cosine similarity algorithm, or other algorithms can be used as the first algorithm depending on the actual situation of the customers.
[0039] By converting the first and second transaction data into multiple n-dimensional vectors and using a first algorithm to calculate the first similarity between multiple customers to be classified and multiple preset customers, the algorithm automatically calculates the first similarity between multiple customers to be classified and multiple preset customers, avoiding the influence of manual processing, and further improving work efficiency and the accuracy of classification results for multiple customers to be classified.
[0040] Optionally, in the customer transaction data processing method provided in the embodiments of this application, the second algorithm is the Euclidean distance algorithm. Based on the first transaction data and the second transaction data, the second algorithm is used to calculate the similarity between multiple customers to be classified and each preset customer to obtain a second similarity set. This includes: using the Euclidean distance algorithm to calculate the second similarity between each n-dimensional vector in the first vector set and each n-dimensional vector in the second vector set to obtain a second similarity set.
[0041] In this embodiment, to obtain a second similarity set for subsequent calculations, based on the obtained first and second vector sets, the Euclidean distance algorithm is used to calculate the second similarity between each n-dimensional vector in the first vector set and each n-dimensional vector in the second vector set, thus obtaining the second similarity set. In this embodiment, the second algorithm can be the Euclidean distance algorithm, or other algorithms can be used depending on the client's specific needs.
[0042] By using a second algorithm to calculate the second similarity between multiple customers to be classified and multiple preset customers, the algorithm automatically calculates the second similarity between multiple customers to be classified and multiple preset customers, avoiding the influence of manual processing, and further improving work efficiency and the accuracy of classification results for multiple customers to be classified.
[0043] Optionally, in the customer transaction data processing method provided in this application embodiment, determining the classification results of multiple customers to be classified based on a first similarity set and a second similarity set includes: obtaining first customers whose first similarity to a target preset customer among multiple customers to be classified is greater than or equal to a first preset similarity, thus obtaining a first customer set; obtaining second customers whose second similarity to a target preset customer is less than or equal to a second preset similarity, thus obtaining a second customer set; calculating the median of similarities in a third similarity set to obtain a first median, wherein the third similarity set includes the similarity between each first customer in the first customer set and the target preset customer; calculating the median of similarities in a fourth similarity set to obtain a second median, wherein the fourth similarity set includes the similarity between each second customer in the second customer set and the target preset customer; and obtaining the classification results of multiple customers to be classified based on the first median and the second median.
[0044] In this embodiment, to classify multiple customers to be classified, it is necessary to process these customers with multiple preset customers. First, among the multiple customers to be classified, a first set of customers (i.e., customers whose first similarity to the target preset customer is greater than or equal to a first preset similarity) is obtained. For example, if the first similarity of customer A is 0.95, the first similarity of customer B is 0.85, and the first preset similarity is 0.9, then customer A is assigned to the first set of customers. Then, among the multiple customers to be classified, a second set of customers (i.e., customers whose Euclidean distance (i.e., second similarity) to the target preset customer is less than or equal to a second preset similarity is obtained. Next, from the first similarity set, a set of third similarities between each customer in the first customer group and the target preset customer is obtained, and the median of the similarities in the third similarity set is calculated to obtain the first median. For example, if the first customer group includes customer A, customer B, and customer C, and their first similarities are 0.9, 0.92, and 0.96 respectively, then the first median is 0.92. Then, from the second similarity set, a set of fourth similarities between each customer in the second customer group and the target preset customer is obtained, and the median of the similarities in the fourth similarity set is calculated to obtain the second median. Finally, based on the calculated first and second medians, the multiple unclassified customers and multiple preset customers are further processed to obtain the classification results for the multiple unclassified customers.
[0045] By analyzing the specific values of the first and second similarity scores, the customers to be classified are processed, and customers with a high probability of belonging to the same category as the target preset customers are selected (i.e., the first customer set and the second customer set). This achieves the preliminary classification of multiple customers to be classified, which is conducive to assigning more accurate customer categories to the customers to be classified in the future, and thus improves the accuracy of the classification results of multiple customers to be classified.
[0046] Optionally, in the customer transaction data processing method provided in this application embodiment, obtaining the classification results of multiple customers to be classified based on the first median and the second median includes: S1, if the first similarity between the target customer to be classified and the target preset customer among the multiple customers to be classified is greater than or equal to the first median, and the second similarity between the target customer to be classified and the target preset customer is less than or equal to the second median, then it is determined that the target customer to be classified and the target preset customer belong to the same type of customer, and it is further determined whether the target customer to be classified and other preset customers among the multiple preset customers belong to the same type of customer, thereby obtaining the classification result of the target customer to be classified; S2, if the target customer to be classified... If the first similarity between the target customer and the target preset customer is greater than or equal to the first median, and the second similarity between the target customer to be classified and the target preset customer is greater than the second median, then the target customer to be classified continues to be processed to determine the classification result of the target customer to be classified; S3, if the first similarity between the target customer to be classified and the target preset customer is less than the first median, then it continues to determine whether the target customer to be classified belongs to the same category of customers as other preset customers among multiple preset customers, and obtain the classification result of the target customer to be classified; the non-target customers among multiple customers to be classified are processed one by one using steps S1 to S3 to obtain the classification result of multiple customers to be classified.
[0047] To confirm the customer category of multiple unclassified customers, in this embodiment, it is necessary to first determine the classification result of the target unclassified customer among the multiple unclassified customers through steps S1 to S3. For example, if the first median is 0.92 and the second median is 0.08, when the first similarity between the target unclassified customer and the target preset customer is 0.95 and the second similarity is 0.05, it is determined that the target unclassified customer and the target preset customer belong to the same customer category, and it is further determined whether the target unclassified customer belongs to the same customer category as other preset customers among the multiple preset customers, thus obtaining the classification result of the target unclassified customer; when the first similarity between the target unclassified customer and the target preset customer is 0.95 and the second similarity is 0.09, the target unclassified customer is further processed to determine the classification result of the target unclassified customer; when the first similarity between the target unclassified customer and the target preset customer is 0.91, it is further determined whether the target unclassified customer belongs to the same customer category as other preset customers among the multiple preset customers, thus obtaining the classification result of the target unclassified customer.
[0048] After obtaining the classification results of the target customers to be classified, the classification results of non-target customers among the multiple customers to be classified are obtained according to steps S1 to S3, and finally the classification results of multiple customers to be classified are obtained.
[0049] By using the first median calculated by the first algorithm and the second median calculated by the second algorithm as the basis for judging whether the target customer to be classified belongs to the same customer as the target preset customer, compared with the method of classifying the target customer to be classified by human experience and the method of classifying the target customer to be classified by a single similarity algorithm, the method adopted by this scheme achieves the effect of improving the accuracy of the classification results of the target customer to be classified.
[0050] Optionally, in the customer transaction data processing method provided in this application embodiment, if the first similarity between the target customer to be classified and the target preset customer is greater than or equal to the first median, and the second similarity between the target customer to be classified and the target preset customer is greater than the second median, then the target customer to be classified is further processed to determine the classification result of the target customer to be classified, including: obtaining the third transaction data of the target customer to be classified from the server within the past M preset time periods; obtaining the fourth transaction data of the target preset customer from the second transaction data; converting the third transaction data into M n-dimensional vectors to obtain a third vector set; converting the fourth transaction data into n-dimensional vectors to obtain a fourth vector; using a cosine similarity algorithm to calculate the fifth similarity between each N-dimensional vector in the third vector set and each n-dimensional vector in the fourth vector set to obtain a fifth similarity set; and using a Euclidean similarity algorithm... The distance algorithm calculates the sixth similarity between each N-dimensional vector in the third vector set and each n-dimensional vector in the fourth vector set, resulting in a sixth similarity set. It then determines whether all fifth similarities in the fifth similarity set are greater than or equal to the first median, and whether there exists a sixth similarity in the sixth similarity set whose difference from the first preset value is less than the first preset difference. If all fifth similarities in the fifth similarity set are greater than or equal to the first median, and there exists a sixth similarity in the sixth similarity set whose difference from the first preset value is less than the first preset difference, then the target customer to be classified is confirmed as a first-class customer. If not all fifth similarities in the fifth similarity set are greater than or equal to the first median, or if the difference between the sixth similarity in the sixth similarity set and the first preset value is greater than or equal to the first preset difference, then the target customer to be classified is confirmed as a second-class customer.
[0051] In this embodiment, when the first similarity between the target customer to be classified and the target preset customer is greater than or equal to the first median, and the second similarity between the target customer to be classified and the target preset customer is greater than the second median, it is confirmed that the target customer to be classified and the target preset customer may belong to the same type of customer. It is necessary to continue to collect the transaction data of the target customer to be classified in the past M preset time periods (i.e., the third transaction data) and the transaction data of the target preset customer (i.e., the fourth transaction data), and convert them into n-dimensional vectors to obtain the third vector set and the fourth vector. Then, the first algorithm is used to calculate the fifth similarity set, and the second algorithm is used to calculate the sixth similarity set. Finally, the classification result of the target customer to be classified is determined based on the similarity values in the fifth similarity set and the sixth similarity set.
[0052] By further calculating and judging the target customers to be classified and the target preset customers that may belong to the same customer category, a more refined judgment of the target customers to be classified is achieved, and the effect of more accurately analyzing the relationship between the target customers to be classified and the target preset customers is achieved, thereby improving the accuracy of the classification results of multiple customers to be classified.
[0053] Optionally, in the customer transaction data processing method provided in this application embodiment, after processing each non-target customer among multiple customers to be classified using steps S1 to S3 to obtain classification results for multiple customers to be classified, the method further includes: if the classification result indicates that the target customer to be classified corresponds only to the customer category of the target preset customer, then the target customer to be classified and the target preset customer belong to the same type of customer; if the classification result indicates that the first customer to be classified corresponds to the customer category of at least one preset customer among multiple preset customers, then multiple first preset customers corresponding to the first customer to be classified are obtained; the first similarity between the target customer to be classified and the multiple first preset customers is obtained from the first similarity set to obtain the first similarity, thus obtaining the first similarity between the target customer to be classified and the multiple first preset customers. A seventh similarity set is used; the second similarity between the first customer to be classified and multiple first preset customers is obtained from the second similarity set, resulting in an eighth similarity set; based on the seventh and eighth similarity sets, a second preset customer is obtained, wherein the difference between the seventh similarity between the second preset customer and the first customer to be classified and the second preset value is less than the second preset difference, and the difference between the eighth similarity between the second preset customer and the first customer to be classified and the first preset value is less than the third preset difference; it is determined that the first customer to be classified and the second preset customer belong to the same type of customer; if it is confirmed that the target customer to be classified does not belong to the same type of customer as any of the multiple preset customers, then the target customer to be classified is confirmed as a second type of customer.
[0054] After obtaining the classification results of multiple customers to be classified, the target customer to be classified among the multiple customers to be classified may belong to the same customer category as at least one preset customer, or may not belong to the same customer category as any of the preset customers. Therefore, in this embodiment, it is necessary to continue processing the target customer to be classified and the multiple preset customers to obtain the classification result of the target customer to be classified.
[0055] First, if the classification result indicates that the target customer to be classified corresponds only to the target preset customer's customer category, then the target customer to be classified and the target preset customer belong to the same customer category. Second, if the classification result indicates that the customer to be classified (i.e., the first customer to be classified) corresponds to at least one preset customer's customer category among multiple preset customers, then it is necessary to obtain the preset customer with the highest probability of belonging to the same category as the customer to be classified from the customer categories of at least one preset customer. For example, obtain preset customers B and C (i.e., the first preset customer) corresponding to customer A to be classified; from the first similarity set, obtain the first similarity between customer A and preset customer B as 0.93, and the first similarity between customer A and preset customer C as 0.98. The first similarity of 0.93 and 0.98 constitutes the seventh similarity set. Then, from the second similarity set, obtain the second similarity between customer A and preset customer B as 0.07, and the second similarity between customer A and preset customer C as 0.02. The second similarity of 0.07 and 0.02 constitutes the seventh similarity set. The eighth similarity set is then used. Next, the first preset value is set to 0, the second preset value to 1, the second preset difference to 0.03, and the third preset difference to 0.03. Based on the seventh and eighth similarity sets, the difference between the first similarity set (0.93) and the second preset value (1) is 0.07; the difference between the first similarity set (0.98) and the second preset value (1) is 0.02; the difference between the second similarity set (0.07) and the second preset value (0) is 0.07; and the difference between the second similarity set (0.02) and the second preset value (0) is 0.02. Therefore, it is confirmed that customer A to be classified and preset customer C belong to the same customer category.
[0056] By further analyzing the classification results of customers to be classified, the classification results of customers to be classified were calculated more precisely, thereby improving the accuracy of the classification results of target customers to be classified.
[0057] Optionally, in the customer transaction data processing method provided in this application embodiment, after processing each non-target customer among multiple customers to be classified using steps S1 to S3 to obtain the classification results of multiple customers to be classified, the method further includes: if the classification result indicates that the customer to be classified corresponds to the customer category of the target preset customer, then according to the customer category of the target preset customer, an intervention strategy is configured for the customer to be classified according to preset rules; if the classification result indicates that the customer to be classified belongs to the first type of customer, then an intervention strategy for manual intervention is configured for the customer to be classified; if the classification result indicates that the customer to be classified belongs to the second type of customer, then no intervention strategy is configured for the customer to be classified.
[0058] In this embodiment, after obtaining the classification results of multiple customers to be classified, different intervention strategies can be configured for the customers to be classified based on the classification results: if the classification result indicates that the customer to be classified belongs to the first type of customer, then an intervention strategy for manual intervention is configured for the customer to be classified; if the classification result indicates that the customer to be classified belongs to the second type of customer, then no intervention strategy is configured for the customer to be classified; if the classification result indicates that the customer to be classified corresponds to the customer category of the target preset customer, then an intervention strategy is configured for the customer to be classified according to the customer category of the target preset customer and the preset rules that have been set.
[0059] By configuring different intervention strategies for different customer categories based on the classification results, the system achieves automatic intervention in customer operation strategies, effectively reducing the cost of manual customer classification and intervention in customer operation strategies, and further improving the acquiring service quality and risk control capabilities of the acquiring institutions.
[0060] Optionally, in this embodiment, the data flow process of the customer's transaction data between the accepting institution and the customer's local server can be as follows: Figure 2 As shown, the customer (corresponding to) Figure 2 Merchants can use mobile terminal 1 and POS terminal 2 to transmit customer transaction data to transaction processing server 3 via an external network. Transaction processing server 3 processes the transaction data and registers it locally. The transaction processing result is returned to mobile terminal 1 or POS terminal 2 via the external network. Merchant management server 4 accesses transaction processing server 3 via internal network to obtain customer transaction data according to a preset time. Customer operation personnel log in to business operation terminal 5 to enter merchant data and set customer classification parameters. Business operation terminal 5 uploads customer classification parameters to merchant management server 4 via internal network.
[0061] Optionally, in this embodiment, the process of processing customer transaction data can be as follows: Figure 3 As shown, in step S301, the customer (corresponding to...) Figure 3In step S302, the merchant operations staff logs into the business operation terminal 5 to enter customer data. The business operation terminal 5 accesses the customer data on the merchant management server 4 through the internal network. In step S303, the customer initiates a transaction through the mobile terminal 1 or the cash register 2. The transaction request is sent to the transaction acceptance server 3 through the external network. In step S304, the transaction acceptance server 3 completes the transaction acceptance and registers the transaction data locally. The transaction processing result is returned to the mobile terminal 1 or the cash register 2 through the external network. In step S305, the merchant management server 4 periodically accesses the transaction acceptance server 3 through the internal network to obtain transaction data. In step S306, the customer operations staff logs into the business operation terminal 5 to set customer classification parameters. This includes various classification types and pre-selected customers for each category. The business operation terminal 5 uploads customer classification parameters to the merchant management server 4 via the internal network. In step S306, the merchant management server 4 periodically analyzes customer data, uses a similarity algorithm to calculate the similarity between the customer to be classified and the pre-set customers for a specific category, and classifies them based on the similarity. In step S307, the merchant management server 4 intervenes according to the customer classification and the corresponding pre-set intervention strategy. In step S308, customer operation personnel log in to the business operation terminal 5 to query customer data, transaction data, customer classification status, and customer intervention status, etc. The business operation terminal 5 accesses the merchant management server 4 via the internal network to obtain relevant information. Among these, mobile terminal 1, cash register 2, transaction processing server 3, merchant management server 4, and business operation terminal 5 are all as follows... Figure 2 As shown in the image.
[0062] Optionally, in this embodiment, the customer of this solution (corresponding to) Figure 4 The merchant management server architecture diagram can be shown as follows: Figure 4 As shown, the merchant management server includes an information maintenance module 41, a merchant classification module 42, a merchant intervention module 43, and a query and statistics module 44.
[0063] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0064] This application also provides a customer transaction data processing apparatus. It should be noted that this apparatus can be used to execute the customer transaction data processing method provided in this application. The following describes the customer transaction data processing apparatus provided in this application.
[0065] Figure 5 This is a schematic diagram of a customer transaction data processing apparatus according to an embodiment of this application. Figure 5As shown, the device includes: an acquisition unit 501, a first calculation unit 502, a second calculation unit 503, and a determination unit 504.
[0066] Specifically, the acquisition unit 501 is used to acquire first transaction data of multiple customers to be classified and second transaction data of multiple preset customers from the server that accepts customer transactions within a preset time period.
[0067] The first calculation unit 502 is used to calculate the similarity between multiple customers to be classified and each preset customer based on the first transaction data and the second transaction data, and to obtain a first similarity set.
[0068] The second calculation unit 503 is used to calculate the similarity between multiple customers to be classified and each preset customer based on the first transaction data and the second transaction data, and to obtain a second similarity set.
[0069] The determining unit 504 is used to determine the classification results of multiple customers to be classified based on the first similarity set and the second similarity set.
[0070] The customer transaction data processing apparatus provided in this application embodiment acquires first transaction data of multiple customers to be classified and second transaction data of multiple preset customers from a server that handles customer transactions within a preset time period through an acquisition unit 501; a first calculation unit 502 calculates the similarity between the multiple customers to be classified and each preset customer using a first algorithm based on the first and second transaction data, obtaining a first similarity set; a second calculation unit 503 calculates the similarity between the multiple customers to be classified and each preset customer using a second algorithm based on the first and second transaction data, obtaining a second similarity set; and a determination unit 504 determines the classification result of the multiple customers to be classified based on the first and second similarity sets, solving the problem in related technologies where relying on human experience to classify multiple customers leads to inaccurate classification results. By using two similarity calculation algorithms (a first algorithm and a second algorithm) to obtain the first and second similarity sets, and using the first and second similarity sets as the basis for classifying multiple customers to be classified, the apparatus achieves the effect of automatically classifying multiple customers to be classified through digital calculation, improving the accuracy of classifying multiple customers to be classified.
[0071] Optionally, in the customer transaction data processing apparatus provided in this application embodiment, the first calculation unit 502 includes: a first conversion subunit, configured to convert multiple customer transaction data in the first transaction data into multiple n-dimensional vectors to obtain a first vector set; a second conversion subunit, configured to convert multiple customer transaction data in the second transaction data into multiple n-dimensional vectors to obtain a second vector set; and a first calculation subunit, configured to use a cosine similarity algorithm to calculate a first similarity between each n-dimensional vector in the first vector set and each n-dimensional vector in the second vector set to obtain a first similarity set.
[0072] Optionally, in the customer transaction data processing apparatus provided in the embodiments of this application, the second calculation unit 503 mentioned above includes: a second calculation subunit, used to calculate the second similarity between each n-dimensional vector in the first vector set and each n-dimensional vector in the second vector set using the Euclidean distance algorithm, to obtain a second similarity set.
[0073] Optionally, in the customer transaction data processing apparatus provided in this application embodiment, the determination unit 504 includes: a first acquisition subunit, configured to acquire first customers whose first similarity to a target preset customer among a plurality of customers to be classified is greater than or equal to the first preset similarity, to obtain a first customer set; a second acquisition subunit, configured to acquire second customers whose second similarity to a target preset customer is less than or equal to the second preset similarity among a plurality of customers to be classified, to obtain a second customer set; a third calculation subunit, configured to calculate the median of similarities in a third similarity set to obtain a first median, wherein the third similarity set includes the similarity between each first customer in the first customer set and the target preset customer; a fourth calculation subunit, configured to calculate the median of similarities in a fourth similarity set to obtain a second median, wherein the fourth similarity set includes the similarity between each second customer in the second customer set and the target preset customer; and a third acquisition subunit, configured to obtain classification results for a plurality of customers to be classified based on the first median and the second median.
[0074] Optionally, in the customer transaction data processing apparatus provided in this application embodiment, the aforementioned third acquisition subunit includes: a first determining module, configured to determine that the target customer to be classified and the target preset customer belong to the same type of customer if the first similarity between the target customer to be classified and the target preset customer among a plurality of customers to be classified is greater than or equal to the first median, and the second similarity between the target customer to be classified and the target preset customer is less than or equal to the second median, and further determine whether the target customer to be classified and other preset customers among a plurality of preset customers belong to the same type of customer, thereby obtaining the classification result of the target customer to be classified; and a first processing module, configured to determine if the first similarity between the target customer to be classified and the target preset customer is greater than or equal to the first median. If the similarity is greater than or equal to the first median, and the second similarity between the target customer to be classified and the target preset customer is greater than the second median, then the target customer to be classified continues to be processed to determine the classification result of the target customer to be classified; the judgment module is used to determine whether the target customer to be classified and other preset customers among multiple preset customers belong to the same category of customers if the first similarity between the target customer to be classified and the target preset customer is less than the first median, and obtain the classification result of the target customer to be classified; the second processing module is used to process each non-target customer among multiple customers to be classified using the steps from the first determination module to the judgment module, and obtain the classification result of multiple customers to be classified.
[0075] Optionally, in the customer transaction data processing apparatus provided in this application embodiment, the first processing module includes: a first acquisition submodule, used to acquire third transaction data of a target customer to be classified within a preset time period of M segments from a server; a second acquisition submodule, used to acquire fourth transaction data of a target customer from the second transaction data; a first conversion submodule, used to convert the third transaction data into M n-dimensional vectors to obtain a third vector set; a second conversion submodule, used to convert the fourth transaction data into n-dimensional vectors to obtain a fourth vector; a first calculation submodule, used to calculate the fifth similarity between each N-dimensional vector in the third vector set and each n-dimensional vector in the fourth vector set using a cosine similarity algorithm to obtain a fifth similarity set; and a second calculation submodule, used to calculate the fifth similarity between each N-dimensional vector in the third vector set and each n-dimensional vector in the fourth vector set using an Euclidean distance algorithm. The sixth similarity between n-dimensional vectors is used to obtain a sixth similarity set; a judgment submodule is used to determine whether all fifth similarities in the fifth similarity set are greater than or equal to the first median, and whether there is a sixth similarity in the sixth similarity set whose difference from the first preset value is less than the first preset difference; a first determination submodule is used to confirm that the target customer to be classified is a first type of customer if all fifth similarities in the fifth similarity set are greater than or equal to the first median, and there is a sixth similarity in the sixth similarity set whose difference from the first preset value is less than the first preset difference; a second determination submodule is used to confirm that the target customer to be classified is a second type of customer if not all fifth similarities in the fifth similarity set are greater than or equal to the first median, or if the difference between the sixth similarity in the sixth similarity set and the first preset value is greater than or equal to the first preset difference.
[0076] Optionally, in the customer transaction data processing apparatus provided in the embodiments of this application, the apparatus further includes: a second determining module, configured to process each non-target customer to be classified among multiple customers to be classified using the steps from the first determining module to the judging module, and after obtaining classification results for multiple customers to be classified, if the classification results indicate that the target customer to be classified corresponds only to the customer category of the target preset customer, then determine that the target customer to be classified and the target preset customer belong to the same type of customer; a first obtaining module, configured to obtain multiple first preset customers corresponding to the first customer to be classified if the classification results indicate that the first customer to be classified corresponds to the customer category of at least one preset customer among multiple preset customers; and a second obtaining module, configured to obtain the first similarity between the target customer to be classified and the multiple first preset customers from the first similarity set, and obtain the first similarity between the target customer to be classified and the multiple first preset customers. The system comprises: a seventh similarity set; a third acquisition module, used to acquire the second similarity between the first customer to be classified and multiple first preset customers from the second similarity set, to obtain an eighth similarity set; a fourth acquisition module, used to acquire the second preset customer based on the seventh and eighth similarity sets, wherein the difference between the seventh similarity between the second preset customer and the first customer to be classified and the second preset value is less than the second preset difference, and the difference between the eighth similarity between the second preset customer and the first customer to be classified and the first preset value is less than the third preset difference; a third determination module, used to determine that the first customer to be classified and the second preset customer belong to the same type of customer; and a fourth determination module, used to determine that if the target customer to be classified does not belong to the same type of customer as any of the multiple preset customers, then the target customer to be classified is a second type of customer.
[0077] Optionally, in the customer transaction data processing apparatus provided in the embodiments of this application, the apparatus further includes: a first configuration module, configured to process each non-target customer to be classified among multiple customers to be classified using the steps from the first determination module to the judgment module to obtain the classification results of multiple customers to be classified; if the classification results indicate that the customer to be classified corresponds to the customer category of the target preset customer, then configure an intervention strategy for the customer to be classified according to the customer category of the target preset customer and according to preset rules; a second configuration module, configured to configure an intervention strategy for manual intervention for the customer to be classified if the classification results indicate that the customer to be classified belongs to the first type of customer; and a third processing module, configured not to configure an intervention strategy for the customer to be classified if the classification results indicate that the customer to be classified belongs to the second type of customer.
[0078] The customer transaction data processing device includes a processor and a memory. The aforementioned acquisition unit 501, first calculation unit 502, second calculation unit 503, and determination unit 504 are all stored in the memory as program units. The processor executes the aforementioned program units stored in the memory to realize the corresponding functions.
[0079] The processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured, and adjusting kernel parameters can improve the accuracy of classification results for customers.
[0080] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0081] This invention provides a computer-readable storage medium storing a program thereon, which, when executed by a processor, implements a method for processing customer transaction data.
[0082] This invention provides a processor for running a program, wherein the program executes a method for processing customer transaction data during runtime.
[0083] like Figure 6 As shown, this embodiment of the invention provides an electronic device. The device includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it performs the following steps: obtaining first transaction data of multiple customers to be classified and second transaction data of multiple preset customers within a preset time period from a server that handles customer transactions; calculating the similarity between the multiple customers to be classified and each preset customer using a first algorithm based on the first transaction data and the second transaction data, to obtain a first similarity set; calculating the similarity between the multiple customers to be classified and each preset customer using a second algorithm based on the first transaction data and the second transaction data, to obtain a second similarity set; and determining the classification result of the multiple customers to be classified based on the first similarity set and the second similarity set.
[0084] When the processor executes the program, it also performs the following steps: The first algorithm mentioned above is a cosine similarity algorithm. Based on the first transaction data and the second transaction data, the first algorithm is used to calculate the similarity between multiple customers to be classified and each preset customer to obtain a first similarity set, including: converting multiple customer transaction data in the first transaction data into multiple n-dimensional vectors to obtain a first vector set; converting multiple customer transaction data in the second transaction data into multiple n-dimensional vectors to obtain a second vector set; and using the cosine similarity algorithm to calculate the first similarity between each n-dimensional vector in the first vector set and each n-dimensional vector in the second vector set to obtain a first similarity set.
[0085] When the processor executes the program, it also performs the following steps: The second algorithm mentioned above is the Euclidean distance algorithm. Based on the first transaction data and the second transaction data, the second algorithm is used to calculate the similarity between multiple customers to be classified and each preset customer to obtain a second similarity set, including: using the Euclidean distance algorithm to calculate the second similarity between each n-dimensional vector in the first vector set and each n-dimensional vector in the second vector set to obtain a second similarity set.
[0086] When the processor executes the program, it also performs the following steps: determining the classification results of multiple customers to be classified based on a first similarity set and a second similarity set, including: obtaining first customers whose first similarity to a target preset customer among multiple customers to be classified is greater than or equal to the first preset similarity, thus obtaining a first customer set; obtaining second customers whose second similarity to a target preset customer is less than or equal to the second preset similarity, thus obtaining a second customer set; calculating the median of the similarities in a third similarity set to obtain a first median, wherein the third similarity set includes the similarity between each first customer in the first customer set and the target preset customer; calculating the median of the similarities in a fourth similarity set to obtain a second median, wherein the fourth similarity set includes the similarity between each second customer in the second customer set and the target preset customer; and obtaining the classification results of multiple customers to be classified based on the first median and the second median.
[0087] When the processor executes the program, it also performs the following steps: Based on the first median and the second median, it obtains the classification results of multiple customers to be classified, including: S1, if the first similarity between the target customer to be classified and the target preset customer is greater than or equal to the first median, and the second similarity between the target customer to be classified and the target preset customer is less than or equal to the second median, then it is determined that the target customer to be classified and the target preset customer belong to the same type of customer, and it is further determined whether the target customer to be classified and other preset customers among the multiple preset customers belong to the same type of customer, thus obtaining the classification result of the target customer to be classified; S2, if the target customer to be classified and the target preset customer belong to the same type of customer, the classification result of the target customer to be classified is obtained; If the first similarity between customers is greater than or equal to the first median, and the second similarity between the target customer to be classified and the target preset customer is greater than the second median, then the target customer to be classified continues to be processed to determine the classification result of the target customer to be classified; S3, if the first similarity between the target customer to be classified and the target preset customer is less than the first median, then it continues to determine whether the target customer to be classified belongs to the same category of customers as other preset customers among multiple preset customers, and obtain the classification result of the target customer to be classified; the non-target customers among multiple customers to be classified are processed one by one using steps S1 to S3 to obtain the classification result of multiple customers to be classified.
[0088] The processor also performs the following steps when executing the program: If the first similarity between the target customer to be classified and the target preset customer is greater than or equal to the first median, and the second similarity between the target customer to be classified and the target preset customer is greater than the second median, then the target customer to be classified continues to be processed to determine the classification result of the target customer to be classified, including: obtaining the third transaction data of the target customer to be classified from the server within the past M preset time periods; obtaining the fourth transaction data of the target preset customer from the second transaction data; converting the third transaction data into M n-dimensional vectors to obtain a third vector set; converting the fourth transaction data into n-dimensional vectors to obtain a fourth vector; using the cosine similarity algorithm, calculating the fifth similarity between each N-dimensional vector in the third vector set and each n-dimensional vector in the fourth vector set to obtain a fifth similarity set; and using the Euclidean distance algorithm... Calculate the sixth similarity between each N-dimensional vector in the third vector set and each n-dimensional vector in the fourth vector set to obtain the sixth similarity set; determine whether all fifth similarities in the fifth similarity set are greater than or equal to the first median, and whether there exists a sixth similarity in the sixth similarity set whose difference from the first preset value is less than the first preset difference; if all fifth similarities in the fifth similarity set are greater than or equal to the first median, and there exists a sixth similarity in the sixth similarity set whose difference from the first preset value is less than the first preset difference, then the target customer to be classified is confirmed as a first-class customer; if not all fifth similarities in the fifth similarity set are greater than or equal to the first median, or if the difference between the sixth similarity in the sixth similarity set and the first preset value is greater than or equal to the first preset difference, then the target customer to be classified is confirmed as a second-class customer.
[0089] When the processor executes the program, it also performs the following steps: After processing each non-target customer among multiple customers to be classified using steps S1 to S3 to obtain classification results for multiple customers to be classified, the method further includes: if the classification result indicates that the target customer to be classified corresponds only to the customer category of the target preset customer, then the target customer to be classified and the target preset customer belong to the same customer category; if the classification result indicates that the first customer to be classified corresponds to the customer category of at least one preset customer among multiple preset customers, then multiple first preset customers corresponding to the first customer to be classified are obtained; the first similarity between the target customer to be classified and the multiple first preset customers is obtained from the first similarity set to obtain the seventh similarity. The system first sets the similarity scores of the first customer to be classified and multiple first preset customers from the second similarity set to obtain the eighth similarity set. Based on the seventh and eighth similarity sets, it obtains the second preset customer, where the difference between the seventh similarity score and the second preset value between the second preset customer and the first customer to be classified is less than the second preset difference, and the difference between the eighth similarity score and the first preset value between the second preset customer and the first customer to be classified is less than the third preset difference. It then determines that the first customer to be classified and the second preset customer belong to the same customer category. If it is confirmed that the target customer to be classified does not belong to the same customer category as any of the preset customers among the multiple preset customers, then the target customer to be classified is confirmed as a second customer category.
[0090] When the processor executes the program, it also performs the following steps: After processing each non-target customer among multiple customers to be classified using steps S1 to S3 to obtain classification results for multiple customers to be classified, the above method further includes: if the classification result indicates that the customer to be classified corresponds to the customer category of the target preset customer, then according to the customer category of the target preset customer, an intervention strategy is configured for the customer to be classified according to preset rules; if the classification result indicates that the customer to be classified belongs to the first category of customers, then an intervention strategy for manual intervention is configured for the customer to be classified; if the classification result indicates that the customer to be classified belongs to the second category of customers, then no intervention strategy is configured for the customer to be classified.
[0091] The devices mentioned in this article can be servers, PCs, tablets, mobile phones, etc.
[0092] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program having the following method steps: obtaining first transaction data of multiple customers to be classified and second transaction data of multiple preset customers within a preset time period from a server that handles customer transactions; calculating the similarity between the multiple customers to be classified and each preset customer using a first algorithm based on the first transaction data and the second transaction data, to obtain a first similarity set; calculating the similarity between the multiple customers to be classified and each preset customer using a second algorithm based on the first transaction data and the second transaction data, to obtain a second similarity set; and determining the classification result of the multiple customers to be classified based on the first similarity set and the second similarity set.
[0093] When executed on a data processing device, it is also suitable to execute an initialization program with the following steps: The first algorithm mentioned above is a cosine similarity algorithm. Based on the first transaction data and the second transaction data, the first algorithm is used to calculate the similarity between multiple customers to be classified and each preset customer to obtain a first similarity set, including: converting multiple customer transaction data in the first transaction data into multiple n-dimensional vectors to obtain a first vector set; converting multiple customer transaction data in the second transaction data into multiple n-dimensional vectors to obtain a second vector set; and using the cosine similarity algorithm to calculate the first similarity between each n-dimensional vector in the first vector set and each n-dimensional vector in the second vector set to obtain a first similarity set.
[0094] When executed on a data processing device, it is also suitable to execute an initialization program with the following steps: The second algorithm mentioned above is the Euclidean distance algorithm. Based on the first transaction data and the second transaction data, the second algorithm is used to calculate the similarity between multiple customers to be classified and each preset customer to obtain a second similarity set, including: using the Euclidean distance algorithm to calculate the second similarity between each n-dimensional vector in the first vector set and each n-dimensional vector in the second vector set to obtain a second similarity set.
[0095] When executed on a data processing device, it is also suitable to execute an initialization program with the following method steps: determining the classification results of multiple customers to be classified based on a first similarity set and a second similarity set, including: obtaining first customers whose first similarity to a target preset customer among multiple customers to be classified is greater than or equal to the first preset similarity, thus obtaining a first customer set; obtaining second customers whose second similarity to a target preset customer is less than or equal to the second preset similarity, thus obtaining a second customer set; calculating the median of the similarities in a third similarity set to obtain a first median, wherein the third similarity set includes the similarity between each first customer in the first customer set and the target preset customer; calculating the median of the similarities in a fourth similarity set to obtain a second median, wherein the fourth similarity set includes the similarity between each second customer in the second customer set and the target preset customer; and obtaining the classification results of multiple customers to be classified based on the first median and the second median.
[0096] When executed on a data processing device, it is also suitable to execute an initialization program with the following method steps: Based on the first median and the second median, obtain the classification results of multiple customers to be classified, including: S1, if the first similarity between the target customer to be classified and the target preset customer is greater than or equal to the first median, and the second similarity between the target customer to be classified and the target preset customer is less than or equal to the second median, then determine that the target customer to be classified and the target preset customer belong to the same type of customer, and continue to determine whether the target customer to be classified and other preset customers among the multiple preset customers belong to the same type of customer, to obtain the classification result of the target customer to be classified; S2, if the target customer to be classified... If the first similarity between the target customer and the target preset customer is greater than or equal to the first median, and the second similarity between the target customer to be classified and the target preset customer is greater than the second median, then the target customer to be classified continues to be processed to determine the classification result of the target customer to be classified; S3, if the first similarity between the target customer to be classified and the target preset customer is less than the first median, then it continues to determine whether the target customer to be classified belongs to the same customer category as other preset customers among multiple preset customers, and obtains the classification result of the target customer to be classified; the non-target customers among multiple customers to be classified are processed one by one using steps S1 to S3 to obtain the classification result of multiple customers to be classified.
[0097] When executed on a data processing device, it is also suitable to execute an initialization program with the following steps: If the first similarity between the target customer to be classified and the target preset customer is greater than or equal to the first median, and the second similarity between the target customer to be classified and the target preset customer is greater than the second median, then continue processing the target customer to determine the classification result of the target customer to be classified, including: obtaining the third transaction data of the target customer to be classified from the server within the past M preset time periods; obtaining the fourth transaction data of the target preset customer from the second transaction data; converting the third transaction data into M n-dimensional vectors to obtain a third vector set; converting the fourth transaction data into n-dimensional vectors to obtain a fourth vector; using a cosine similarity algorithm to calculate the fifth similarity between each N-dimensional vector in the third vector set and each n-dimensional vector in the fourth vector set to obtain a fifth similarity set; using a Euclidean similarity algorithm... The Giri distance algorithm calculates the sixth similarity between each N-dimensional vector in the third vector set and each n-dimensional vector in the fourth vector set, obtaining a sixth similarity set. It then determines whether all fifth similarities in the fifth similarity set are greater than or equal to the first median, and whether there exists a sixth similarity in the sixth similarity set whose difference from the first preset value is less than the first preset difference. If all fifth similarities in the fifth similarity set are greater than or equal to the first median, and there exists a sixth similarity in the sixth similarity set whose difference from the first preset value is less than the first preset difference, then the target customer to be classified is confirmed as a first-class customer. If not all fifth similarities in the fifth similarity set are greater than or equal to the first median, or if the difference between the sixth similarity in the sixth similarity set and the first preset value is greater than or equal to the first preset difference, then the target customer to be classified is confirmed as a second-class customer.
[0098] When executed on a data processing device, it is also suitable to execute an initialization procedure with the following steps: after processing each non-target customer among multiple customers to be classified using steps S1 to S3 to obtain classification results for multiple customers to be classified, the method further includes: if the classification result indicates that the target customer to be classified corresponds only to the customer category of the target preset customer, then the target customer to be classified and the target preset customer belong to the same customer category; if the classification result indicates that the first customer to be classified corresponds to the customer category of at least one preset customer among multiple preset customers, then multiple first preset customers corresponding to the first customer to be classified are obtained; and the first similarity between the target customer to be classified and the multiple first preset customers is obtained from the first similarity set. The seventh similarity set is obtained; the second similarity between the first customer to be classified and multiple first preset customers is obtained from the second similarity set, resulting in the eighth similarity set; based on the seventh and eighth similarity sets, the second preset customer is obtained, wherein the difference between the seventh similarity and the second preset value between the second preset customer and the first customer to be classified is less than the second preset difference, and the difference between the eighth similarity and the first preset value between the second preset customer and the first customer to be classified is less than the third preset difference; it is determined that the first customer to be classified and the second preset customer belong to the same type of customer; if it is confirmed that the target customer to be classified does not belong to the same type of customer as any of the multiple preset customers, then the target customer to be classified is confirmed as the second type of customer.
[0099] When executed on a data processing device, it is also suitable to execute an initialization procedure with the following steps: after processing each non-target customer among multiple customers to be classified using steps S1 to S3 to obtain classification results for multiple customers to be classified, the above method further includes: if the classification result indicates that the customer to be classified corresponds to the customer category of the target preset customer, then according to the customer category of the target preset customer, an intervention strategy is configured for the customer to be classified according to preset rules; if the classification result indicates that the customer to be classified belongs to the first category of customers, then an intervention strategy for manual intervention is configured for the customer to be classified; if the classification result indicates that the customer to be classified belongs to the second category of customers, then no intervention strategy is configured for the customer to be classified.
[0100] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0101] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0102] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0103] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0104] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0105] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0106] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0107] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0108] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0109] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for processing customer transaction data, characterized in that, include: The system retrieves first transaction data of multiple customers to be categorized and second transaction data of multiple preset customers within a preset time period from the server that processes customer transactions. The transaction data is transmitted by the customer's terminal to the server that processes customer transactions via an external network. The transaction data is transaction data generated by the acquiring business service of the financial institution. Based on the first transaction data and the second transaction data, the first algorithm is used to calculate the similarity between the multiple customers to be classified and each preset customer, to obtain a first similarity set; Based on the first transaction data and the second transaction data, a second algorithm is used to calculate the similarity between the multiple customers to be classified and each preset customer, thereby obtaining a second similarity set; Based on the first similarity set and the second similarity set, the classification results of the multiple customers to be classified are determined; The classification results for the plurality of customers to be classified, determined based on the first similarity set and the second similarity set, include: Obtain a first customer set by finding a first customer whose first similarity to a target preset customer among the plurality of customers to be classified is greater than or equal to a first preset similarity. Obtain second customers whose second similarity to the target preset customers is less than or equal to the second preset similarity, and obtain a second customer set; Calculate the median of similarities in the third similarity set to obtain the first median, wherein the third similarity set includes the similarity between each first customer in the first customer set and the target preset customer; Calculate the median of similarities in the fourth similarity set to obtain the second median, wherein the fourth similarity set includes the similarity between each second customer in the second customer set and the target preset customer; Based on the first median and the second median, the classification results of the multiple customers to be classified are obtained; Based on the first median and the second median, the classification results for the plurality of customers to be classified include: S2, if the first similarity between the target customer to be classified and the target preset customer is greater than or equal to the first median, and the second similarity between the target customer to be classified and the target preset customer is greater than the second median, then the target customer to be classified continues to be processed to determine the classification result of the target customer to be classified. If the first similarity between the target customer to be classified and the target preset customer is greater than or equal to the first median, and the second similarity between the target customer to be classified and the target preset customer is greater than the second median, then the target customer to be classified continues to be processed to determine the classification result of the target customer to be classified, including: Obtain the third transaction data of the target customer to be classified from the server within the past M preset time periods; Obtain the fourth transaction data of the target preset customer from the second transaction data; The third transaction data is converted into M n-dimensional vectors to obtain a third vector set; The fourth transaction data is converted into an n-dimensional vector to obtain the fourth vector; The cosine similarity algorithm is used to calculate the fifth similarity between each N-dimensional vector in the third vector set and each n-dimensional vector in the fourth vector set, thus obtaining the fifth similarity set; The Euclidean distance algorithm is used to calculate the sixth similarity between each N-dimensional vector in the third vector set and each n-dimensional vector in the fourth vector set, thus obtaining the sixth similarity set; Determine whether all fifth similarities in the fifth similarity set are greater than or equal to the first median, and whether there exists a sixth similarity set where the difference between the sixth similarity and the first preset value is less than the first preset difference; If all fifth similarities in the fifth similarity set are greater than or equal to the first median, and there is a sixth similarity in the sixth similarity set whose difference from the first preset value is less than the first preset difference, then the target customer to be classified is confirmed as a first type of customer. If not all fifth similarities in the fifth similarity set are greater than or equal to the first median, or if the difference between the sixth similarity in the sixth similarity set and the first preset value is greater than or equal to the first preset difference, then the target customer to be classified is confirmed as a second type of customer. The first algorithm is a cosine similarity algorithm. Based on the first transaction data and the second transaction data, the first algorithm is used to calculate the similarity between the multiple customers to be classified and each preset customer, resulting in a first similarity set including: The multiple customer transaction data in the first transaction data are converted into multiple n-dimensional vectors to obtain the first vector set; The multiple customer transaction data in the second transaction data are converted into multiple n-dimensional vectors to obtain the second vector set; Using the cosine similarity algorithm, the first similarity between each n-dimensional vector in the first vector set and each n-dimensional vector in the second vector set is calculated to obtain the first similarity set.
2. The method according to claim 1, characterized in that, The second algorithm is the Euclidean distance algorithm. Based on the first transaction data and the second transaction data, the second algorithm is used to calculate the similarity between the multiple customers to be classified and each preset customer, resulting in a second similarity set including: Using the Euclidean distance algorithm, the second similarity between each n-dimensional vector in the first vector set and each n-dimensional vector in the second vector set is calculated to obtain the second similarity set.
3. The method according to claim 1, characterized in that, Based on the first median and the second median, the classification results for the plurality of customers to be classified include: S1, if the first similarity between the target customer to be classified and the target preset customer among the plurality of customers to be classified is greater than or equal to the first median, and the second similarity between the target customer to be classified and the target preset customer is less than or equal to the second median, then it is determined that the target customer to be classified and the target preset customer belong to the same type of customer, and it is further determined whether the target customer to be classified and other preset customers among the plurality of preset customers belong to the same type of customer, so as to obtain the classification result of the target customer to be classified; S3, if the first similarity between the target customer to be classified and the target preset customer is less than the first median, then continue to determine whether the target customer to be classified and other preset customers among the multiple preset customers belong to the same type of customer, and obtain the classification result of the target customer to be classified; The non-target customers among the multiple customers to be classified are processed one by one using steps S1 to S3 to obtain the classification results of the multiple customers to be classified.
4. The method according to claim 1, characterized in that, After processing each non-target customer among the multiple customers to be classified using steps S1 to S3 to obtain the classification results for the multiple customers to be classified, the method further includes: If the classification result indicates that the target customer to be classified corresponds only to the customer category of the target preset customer, then it is determined that the target customer to be classified and the target preset customer belong to the same customer category. If the classification result indicates that the first customer to be classified corresponds to the customer category of at least one of the multiple preset customers, then multiple first preset customers corresponding to the first customer to be classified are obtained. The first similarity between the target customer to be classified and the plurality of first preset customers is obtained from the first similarity set to obtain the seventh similarity set; The second similarity between the first customer to be classified and the plurality of first preset customers is obtained from the second similarity set to obtain the eighth similarity set; Based on the seventh similarity set and the eighth similarity set, a second preset customer is obtained, wherein the difference between the seventh similarity and the second preset value between the second preset customer and the first customer to be classified is less than the second preset difference, and the difference between the eighth similarity and the first preset value between the second preset customer and the first customer to be classified is less than the third preset difference. Determine that the first customer to be classified and the second preset customer belong to the same customer category; If it is confirmed that the target customer to be classified does not belong to the same category as any of the preset customers among the plurality of preset customers, then the target customer to be classified is confirmed as the second category of customers.
5. The method according to claim 1, characterized in that, After processing each non-target customer among the multiple customers to be classified using steps S1 to S3 to obtain the classification results for the multiple customers to be classified, the method further includes: If the classification result indicates that the customer to be classified corresponds to the customer category of the target preset customer, then an intervention strategy is configured for the customer to be classified according to the customer category of the target preset customer and in accordance with the preset rules. If the classification result indicates that the customer to be classified belongs to the first type of customer, then an intervention strategy for manual intervention is configured for the customer to be classified. If the classification result indicates that the customer to be classified belongs to the second type of customer, then no intervention strategy will be configured for the customer to be classified.
6. A device for processing customer transaction data, characterized in that, include: The acquisition unit is used to acquire first transaction data of multiple customers to be classified and second transaction data of multiple preset customers from the server that accepts customer transactions within a preset time period. The transaction data is transmitted by the customer using a terminal through an external network to the server that accepts customer transactions. The transaction data is transaction data generated by the acquiring business service of a financial institution. The first calculation unit is used to calculate the similarity between the plurality of customers to be classified and each preset customer based on the first transaction data and the second transaction data, using a first algorithm, to obtain a first similarity set; The second calculation unit is used to calculate the similarity between the plurality of customers to be classified and each preset customer based on the first transaction data and the second transaction data, using a second algorithm, to obtain a second similarity set; The determining unit is used to determine the classification results of the plurality of customers to be classified based on the first similarity set and the second similarity set; The determining unit includes: a first acquisition subunit, used to acquire first customers whose first similarity to a target preset customer among multiple customers to be classified is greater than or equal to a first preset similarity, to obtain a first customer set; a second acquisition subunit, used to acquire second customers whose second similarity to a target preset customer is less than or equal to a second preset similarity, to obtain a second customer set; a third calculation subunit, used to calculate the median of similarities in a third similarity set to obtain a first median, wherein the third similarity set includes the similarity between each first customer in the first customer set and the target preset customer; a fourth calculation subunit, used to calculate the median of similarities in a fourth similarity set to obtain a second median, wherein the fourth similarity set includes the similarity between each second customer in the second customer set and the target preset customer; and a third acquisition subunit, used to obtain classification results for multiple customers to be classified based on the first median and the second median. The third acquisition subunit includes: a first processing module, used to continue processing the target customer to determine the classification result of the target customer if the first similarity between the target customer to be classified and the target preset customer is greater than or equal to the first median, and the second similarity between the target customer to be classified and the target preset customer is greater than the second median; The first processing module includes: a first acquisition submodule, used to acquire third transaction data of the target customer to be classified from the server within the past M preset time periods; a second acquisition submodule, used to acquire fourth transaction data of the target customer from the second transaction data; a first conversion submodule, used to convert the third transaction data into M n-dimensional vectors to obtain a third vector set; a second conversion submodule, used to convert the fourth transaction data into n-dimensional vectors to obtain a fourth vector; a first calculation submodule, used to calculate the fifth similarity between each N-dimensional vector in the third vector set and each n-dimensional vector in the fourth vector set using a cosine similarity algorithm to obtain a fifth similarity set; and a second calculation submodule, used to calculate the sixth similarity between each N-dimensional vector in the third vector set and each n-dimensional vector in the fourth vector set using an Euclidean distance algorithm. A sixth similarity set is obtained; a judgment submodule is used to determine whether all fifth similarities in the fifth similarity set are greater than or equal to the first median, and whether there is a sixth similarity in the sixth similarity set whose difference from the first preset value is less than the first preset difference; a first determination submodule is used to confirm that the target customer to be classified is a first type of customer if all fifth similarities in the fifth similarity set are greater than or equal to the first median, and there is a sixth similarity in the sixth similarity set whose difference from the first preset value is less than the first preset difference; a second determination submodule is used to confirm that the target customer to be classified is a second type of customer if not all fifth similarities in the fifth similarity set are greater than or equal to the first median, or if the difference between the sixth similarity in the sixth similarity set and the first preset value is greater than or equal to the first preset difference. The first calculation unit includes: a first conversion subunit, used to convert multiple customer transaction data in the first transaction data into multiple n-dimensional vectors to obtain a first vector set; a second conversion subunit, used to convert multiple customer transaction data in the second transaction data into multiple n-dimensional vectors to obtain a second vector set; and a first calculation subunit, used to use a cosine similarity algorithm to calculate a first similarity between each n-dimensional vector in the first vector set and each n-dimensional vector in the second vector set to obtain a first similarity set.
7. An electronic device, characterized in that, It includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the customer transaction data processing method of any one of claims 1 to 5.
Citation Information
Patent Citations
Similar document retrieval method using plural similarity calculation methods and recommended article notification service system using similar document retrieval method
US6301577B1