Method, device and equipment for determining target customer group based on block chain
By using smart contracts and association rule algorithms in the blockchain network, the problem of low security and accuracy in the determination of target customer groups in the existing technology is solved, and more efficient and accurate customer group mining and recommendation effects are achieved.
Patent Information
- Application Number
- CN202411873587.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-12-18
Smart Images

Figure CN119809637A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the fields of blockchain and financial technology, and specifically, to a method, device and equipment for determining a target customer group based on blockchain. Background Art
[0002] At present, when exploring the target customer groups for redemption products, a sampling test method is usually used to understand the significant characteristics of the target customers (such as occupations, etc.). The information security is low, there is a risk of information leakage, and the analysis method is single, resulting in low accuracy in the identified customer groups.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The main purpose of this application is to provide a method, device and equipment for determining the target customer group based on blockchain, so as to at least solve the technical problem of low security and accuracy in the prior art of determining the target customer group of redemption products by sampling detection.
[0005] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a method for determining a target customer group based on blockchain is provided, comprising: receiving a transaction request sent by a client based on a preset time interval through a blockchain network, and performing authority verification on the client, wherein the transaction request is used to request customer group mining for a target redemption product; if the client passes the authority verification, calling and executing the corresponding smart contract according to the smart contract identifier contained in the transaction request to obtain the target customer group of the target redemption product, wherein the smart contract is used to implement a process of customer group mining according to an association rule algorithm; after feeding back the target customer group to the client, receiving transaction data sent by the client, and performing consensus processing on the transaction data, wherein the transaction data at least includes the target customer group; generating a block based on the consensus transaction data, and verifying the block, and if the block passes the verification, adding the block to the blockchain network.
[0006] Furthermore, the corresponding smart contract is called and executed according to the smart contract identifier contained in the transaction request to obtain the target customer group of the target redemption product, including: obtaining object information of multiple objects, and performing data conversion processing on the object information to obtain converted object data; obtaining the indicator threshold of the association rule algorithm, and configuring multiple rule fields of the association rule algorithm according to the indicator threshold; processing the converted object data according to the configured association rule algorithm to obtain the target customer group.
[0007] Furthermore, the indicator threshold includes a support threshold, a confidence threshold and a variable quantity threshold, wherein multiple rule fields of the association rule algorithm are configured according to the indicator threshold, including: configuring the support rule field of the association rule algorithm as the support threshold; configuring the confidence rule field of the association rule algorithm as the confidence threshold; configuring the rule length field of the association rule algorithm as the variable quantity threshold.
[0008] Furthermore, the converted object data is processed according to the configured association rule algorithm to obtain the target customer group, including: taking the occurrence frequency greater than the support threshold as a constraint condition, performing data mining on the converted object data according to the configured association rule algorithm to obtain multiple item sets; generating multiple association rules based on the multiple item sets, and determining the target association rule from the multiple association rules based on the confidence threshold and the variable quantity threshold; and determining the target customer group based on the target association rule.
[0009] Furthermore, consensus processing is performed on the transaction data, including: processing the transaction data according to a preset message format to obtain processed transaction data; sending the processed transaction data to a preset message queue, wherein the preset message queue is used to sort the processed transaction data to obtain sorted transaction data; receiving the sorted transaction data returned by the preset message queue, and using the sorted transaction data as the consensus transaction data.
[0010] Furthermore, before receiving a transaction request sent by the client based on a preset time interval through the blockchain network, the method also includes: receiving a permission application request sent by the client through the blockchain network, registering and registering the client based on the permission application request, and feeding back the client's identity certificate to the client.
[0011] Furthermore, after the target customer groups are fed back to the client, the client sorts the target customer groups based on the corresponding promotion degree of each customer group, and displays the sorted customer groups.
[0012] In order to achieve the above-mentioned purpose, according to another aspect of the present application, there is also provided a device for determining a target customer group based on blockchain, comprising: a first processing unit, for receiving a transaction request sent by a client based on a preset time interval through a blockchain network, and performing authority verification on the client, wherein the transaction request is used to request customer group mining for a target redemption product; a second processing unit, for calling and executing a corresponding smart contract according to a smart contract identifier contained in the transaction request if the client passes the authority verification, to obtain a target customer group for the target redemption product, wherein the smart contract is used to implement a process for customer group mining according to an association rule algorithm; a third processing unit, for receiving transaction data sent by the client after feeding back the target customer group to the client, and performing consensus processing on the transaction data, wherein the transaction data at least includes the target customer group; a fourth processing unit, for generating a block based on the consensus transaction data, and verifying the block, and if the block passes the verification, adding the block to the blockchain network.
[0013] Furthermore, the second processing unit includes: a first acquisition subunit, used to acquire object information of multiple objects, and perform data conversion processing on the object information to obtain converted object data; a second acquisition subunit, used to acquire an indicator threshold of an association rule algorithm, and configure multiple rule fields of the association rule algorithm based on the indicator threshold; a first processing subunit, used to process the converted object data based on the configured association rule algorithm to obtain a target customer group.
[0014] Furthermore, the second acquisition subunit includes: a first configuration module, used to configure the support rule field of the association rule algorithm as a support threshold; a second configuration module, used to configure the confidence rule field of the association rule algorithm as a confidence threshold; and a third configuration module, used to configure the rule length field of the association rule algorithm as a variable quantity threshold.
[0015] Furthermore, the first processing sub-unit includes: a processing module, which is used to perform data mining on the converted object data based on the configured association rule algorithm with the occurrence frequency being greater than the support threshold as a constraint condition to obtain multiple item sets; a first determination module, which is used to generate multiple association rules based on the multiple item sets, and determine the target association rule from the multiple association rules based on the confidence threshold and the variable quantity threshold; a second determination module, which is used to determine the target customer group based on the target association rule.
[0016] Furthermore, the third processing unit includes: a second processing sub-unit, used to process the transaction data according to a preset message format to obtain processed transaction data; a third processing sub-unit, used to send the processed transaction data to a preset message queue, wherein the preset message queue is used to sort the processed transaction data to obtain sorted transaction data; a fourth processing sub-unit, used to receive the sorted transaction data returned by the preset message queue, and use the sorted transaction data as the consensus transaction data.
[0017] Furthermore, the device also includes: a receiving unit, which is used to receive a permission application request sent by the client through the blockchain network before receiving a transaction request sent by the client based on a preset time interval through the blockchain network, register and register the client based on the permission application request, and feedback the client's identity certificate to the client.
[0018] Furthermore, after the target customer groups are fed back to the client, the client sorts the target customer groups based on the corresponding promotion degree of each customer group, and displays the sorted customer groups.
[0019] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a computer program product is also provided, including a computer program, which implements the above-mentioned method for determining a target customer group based on blockchain when executed by a processor.
[0020] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a computer-readable storage medium is further provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned method for determining a target customer group based on blockchain when running.
[0021] In order to achieve the above-mentioned purpose, according to another aspect of the present application, there is further provided an electronic device, which includes one or more processors; a memory for storing one or more programs, so that when the one or more programs are executed by the one or more processors, the one or more processors are implemented to run the programs, wherein the programs are configured to execute the above-mentioned method for determining a target customer group based on blockchain when running.
[0022] In an embodiment of the present application, a transaction request sent by a client based on a preset time interval is received through a blockchain network, and the client is subjected to an authority check, wherein the transaction request is used to request customer group mining for a target redemption product; if the client passes the authority check, the corresponding smart contract is called and executed according to the smart contract identifier contained in the transaction request to obtain a target customer group for the target redemption product, wherein the smart contract is used to implement a process of customer group mining according to an association rule algorithm; after the target customer group is fed back to the client, the transaction data sent by the client is received, and consensus processing is performed on the transaction data, wherein the transaction data at least includes the target customer group; based on the transaction after consensus The data generates a block and verifies the block. If the block passes the verification, the block is added to the blockchain network. The blockchain network and the association rule algorithm are combined to realize the intention mining of the target redemption product, and the target customer group is obtained, ensuring the security and immutability of the data. By introducing the association rule algorithm, the customer group who intends to use the redemption product can be displayed in a three-dimensional way, which is helpful for the accurate recommendation of the redemption product, and achieves the purpose of better realizing the intention mining of the target redemption product, thereby achieving the technical effect of improving data security and accuracy, and then solving the technical problem of low security and accuracy in the prior art of using sampling detection to determine the target customer group of the redemption product. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0024] Figure 1 is a flowchart of an optional method for determining a target customer group based on blockchain according to an embodiment of the present application;
[0025] Figure 2 is a schematic diagram of a framework of an optional customer group mining device according to an embodiment of the present application;
[0026] Figure 3 is a schematic diagram of a network structure of an optional customer group mining device according to an embodiment of the present application;
[0027] Figure 4 It is a schematic diagram of an optional customer group mining transaction process according to an embodiment of the present application;
[0028] Figure 5 is a schematic diagram of an optional device for determining a target customer group based on blockchain according to an embodiment of the present application;
[0029] Figure 6 It is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0030] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0032] It should be noted that the collected information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this application are information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of relevant data are in compliance with relevant laws, regulations and standards, necessary confidentiality measures are taken, and public order and good customs are not violated, and corresponding operation entrances are provided for users to choose to authorize or refuse. For example, an interface is set up between this system and relevant users or institutions to provide users with corresponding operation entrances for users to choose to agree or refuse the results of automated decision-making; if the user chooses to refuse, the expert decision-making process will be entered.
[0033] Example 1
[0034] According to an embodiment of the present application, an embodiment of a method for determining a target customer group based on blockchain is provided. It should be noted that the steps shown in the flowchart of 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 an order different from that shown here.
[0035] Figure 1is a flowchart of an optional method for determining a target customer group based on blockchain according to an embodiment of the present application, such as Figure 1 As shown, the method comprises the following steps:
[0036] Step S101, receiving a transaction request sent by a client based on a preset time interval through a blockchain network, and performing an authority check on the client, wherein the transaction request is used to request customer group mining for a target redemption product.
[0037] In the above steps, the blockchain network is used as the execution subject (i.e., mining device) to implement the mining of the target customer group and interact with the client. For example, the application client initiates a transaction proposal (i.e., transaction request) to the endorsement node of the blockchain network through the software development kit based on a preset time interval (e.g., every five minutes), including the smart contract identifier (e.g., the name of the smart contract) to be called for this transaction, the contract method (the specific implementation logic of the smart contract method), parameter information (the required input items required to call the corresponding smart contract and the input flag that can identify the unique smart contract) and the client signature (the identifier that can identify which transaction channel the customer is in and the label for verifying the identity) and other information. After receiving the transaction proposal, the endorsement node performs permission verification on the client, for example, verifies the signature and confirms whether the submitter has the authority to perform the operation.
[0038] Step S102, if the client passes the authority check, the corresponding smart contract is called and executed according to the smart contract identifier contained in the transaction request to obtain the target customer group of the target redemption product, wherein the smart contract is used to implement the process of customer group mining according to the association rule algorithm.
[0039] Optionally, if the client passes the authority check, the corresponding smart contract is called and executed according to the smart contract identifier contained in the transaction proposal to obtain the target customer group of the target redemption product (e.g., video membership, shopping card, etc.). For example, the endorsement node calls and executes the smart contract of each transaction proposal, and returns the execution result and CA signature of each transaction proposal to the application client.
[0040] Optionally, the smart contract includes processes such as data preprocessing, obtaining association rule indicator thresholds, association sorting, eliminating redundancy, and data conversion and visualization returning to the client. First, data preprocessing is performed. The influencing variables involved in this solution include occupation, gender, and income, among which occupation can include state-owned enterprise employees, entrepreneurs, private enterprise employees, freelancers, etc., and state-owned enterprise employees are converted to 1, entrepreneurs are converted to 2, private enterprise employees are converted to 3, and freelancers are converted to 4; gender includes male and female, male is converted to 1, and female is converted to 2; income includes low income, middle income, and high income, and low income is converted to 1, middle income is converted to 2, and high income is converted to 3.
[0041] Furthermore, the threshold of the association rule indicator is obtained. The association rule indicators involved in this scheme include support, confidence and the minimum number of variables. The three parameters of support, confidence and the minimum number of variables passed by the client are obtained from the parameter information of the transaction proposal. For example, the support is 0.005, the confidence is 0.8, and the minimum number of variables is 2. Since the data set of this scheme has about 2500 data, each case contains at least 2500*0.005=13 (rounded) data, the sample data volume meets the general requirement of being greater than or equal to 10, and the support parameter is set reasonably; setting the confidence to 0.8 refers to the data of a certain specific condition. The probability that the customer has the intention to use the redemption product or does not have the intention to use the redemption product exceeds 80%. Generally, when the ratio reaches 80%, it can be preliminarily judged that the willingness of this group of customers to use the redemption product is relatively strong.
[0042] Further, the association sorting process is performed. First, the field configuration is performed. Since this scheme is a scenario for mining customers who intend to use redemption products, Rhs = c (Purchase intention = true) is set, where Rhs is the right side of the rule and Purchase intention is the purchase intention; default = Lhs is set, which means that all item sets can appear on the left side of the rule (Lhs), that is, the variable support, confidence and minimum number of variables involved in this scheme can appear in the item set; supp (the minimum support threshold of the association rule) is set to 0.005, conf (the minimum confidence threshold of the association rule) is set to 0.8, and maxlen (the maximum length of the association rule) is set to 2. After configuring the parameters of the association rule algorithm, the variable data related to the influencing factors of the redemption product is obtained from the blockchain and substituted into the above algorithm to obtain the processing results, as shown in Table 1.
[0043] Table 1
[0044]
[0045]
[0046] Furthermore, redundancy is eliminated. Since some of the association rules generated by the association sorting process provide only a small amount of additional information compared to other rules, it is necessary to prune redundant rules in this case. All rules are sorted in descending order according to the degree of lift. The results are shown in Table 2.
[0047] Table 2
[0048]
[0049] Further, the data is transformed and visualized and returned to the client, which will show that the customer combinations in four scenarios have the strongest willingness to use the redemption products: combination 1 is an entrepreneur with a middle income, combination 2 is a state-owned enterprise employee with a female gender, combination 3 is an entrepreneur with a female gender, and combination 4 is a freelancer with a female gender. Optionally, based on the results, redemption products can be recommended to customer groups that meet these characteristics.
[0050] Step S103, after feeding back the target customer group to the client, receiving the transaction data sent by the client, and performing consensus processing on the transaction data, wherein the transaction data at least includes the target customer group.
[0051] Step S104, generating a block based on the consensus transaction data and verifying the block. If the block passes the verification, the block is added to the blockchain network.
[0052] Optionally, the endorsement node returns the customer combination of the four scenarios determined above as the target customer group to the client, and the client determines whether the target customer groups mined out by each transaction proposal are consistent. If not, the processing is terminated; if consistent, the client packages all transaction data related to each transaction proposal into a transaction and signs it, and sends it to the sorting service node of the blockchain network. Therefore, after the target customer group is fed back to the client, the sorting service node of the blockchain network receives the transaction data (i.e., multiple transactions) sent by the client, and performs consensus processing on the transaction data, and then packages the consensus transaction data together to generate a new block, which is sent to the submission node of the blockchain network. The submission node verifies each transaction in the block. If the block passes the verification, the block is added to the blockchain network and the world state (the latest values of all keys) is modified.
[0053] Based on the scheme defined in the above steps S101 to S104, it can be known that in the embodiment of the present application, a transaction request sent by a client based on a preset time interval is received through a blockchain network, and the client is subjected to authority verification, wherein the transaction request is used to request customer group mining for a target redemption product; if the client passes the authority verification, the corresponding smart contract is called and executed according to the smart contract identifier contained in the transaction request to obtain the target customer group of the target redemption product, wherein the smart contract is used to implement the process of customer group mining according to the association rule algorithm; after the target customer group is fed back to the client, the transaction data sent by the client is received, and the transaction data is processed by consensus, wherein the transaction data at least includes Target customer group; Generate blocks based on the transaction data after consensus, and verify the blocks. If the blocks pass the verification, the blocks will be added to the blockchain network. The blockchain network and the association rule algorithm are combined to realize the intention mining of the target redemption product, and the target customer group is obtained, ensuring data security and immutability. By introducing the association rule algorithm, the customer group who intends to use the redemption product can be three-dimensionally displayed, which is helpful for accurate recommendation of redemption products, and achieves the purpose of better realizing the intention mining of the target redemption product, thereby achieving the technical effect of improving data security and accuracy, and then solving the technical problem of low security and accuracy in the prior art of using sampling detection to determine the target customer group of the redemption product.
[0054] In an optional embodiment, the corresponding smart contract is called and executed according to the smart contract identifier included in the transaction request to obtain the target customer group of the target redemption product, including: obtaining object information of multiple objects, and performing data conversion processing on the object information to obtain converted object data; obtaining the indicator threshold of the association rule algorithm, and configuring multiple rule fields of the association rule algorithm according to the indicator threshold; processing the converted object data according to the configured association rule algorithm to obtain the target customer group.
[0055] Optionally, data preprocessing is first performed to obtain object information of multiple objects, such as occupation, gender, and income, and data conversion processing is performed on the object information to obtain converted object data, for example, state-owned enterprise employees are converted to 1, entrepreneurs are converted to 2, private enterprise employees are converted to 3, and self-employed are converted to 4; males are converted to 1, females are converted to 2; low income is converted to 1, medium income is converted to 2, and high income is converted to 3. Then, the index threshold of the association rule algorithm is obtained, and multiple rule fields of the association rule algorithm are configured according to the index threshold, for example, the three parameters of support, confidence, and minimum number of variables passed in by the client are obtained from the parameter information of the transaction proposal, for example, the support is 0.005, the confidence is 0.8, and the minimum number of variables is 2. Set Rhs = c (Purchase intention = true), where Rhs is the right side of the rule and Purchase intention is the purchase intention; set default = Lhs, which means that all item sets can appear on the left side of the rule (Lhs), that is, the variable support, confidence and minimum number of variables involved in this solution can all appear in the item set; set supp (the minimum support threshold of the association rule) to 0.005, conf (the minimum confidence threshold of the association rule) to 0.8, and maxlen (the maximum length of the association rule) to 2. Then process the converted object data according to the configured association rule algorithm to obtain the target customer group. The specific implementation process can refer to the aforementioned association sorting processing and redundancy elimination, which will not be repeated here.
[0056] In an optional embodiment, the indicator threshold includes a support threshold, a confidence threshold and a variable quantity threshold, wherein multiple rule fields of the association rule algorithm are configured according to the indicator threshold, including: configuring the support rule field of the association rule algorithm as the support threshold; configuring the confidence rule field of the association rule algorithm as the confidence threshold; configuring the rule length field of the association rule algorithm as the variable quantity threshold.
[0057] Optionally, the support rule field of the association rule algorithm is configured as a support threshold, for example, supp is set to 0.005; the confidence rule field of the association rule algorithm is configured as a confidence threshold, for example, conf is set to 0.8; the rule length field of the association rule algorithm is configured as a variable number threshold, for example, maxlen is set to 2.
[0058] In an optional embodiment, the converted object data is processed according to a configured association rule algorithm to obtain a target customer group, including: taking the occurrence frequency greater than a support threshold as a constraint condition, performing data mining on the converted object data according to a configured association rule algorithm to obtain multiple item sets; generating multiple association rules based on the multiple item sets, and determining a target association rule from the multiple association rules based on a confidence threshold and a variable quantity threshold; and determining the target customer group based on the target association rule.
[0059] Optionally, with the frequency of occurrence greater than the support threshold as a constraint condition, the converted object data is mined according to the configured association rule algorithm to obtain multiple item sets. For example, a widely used association rule algorithm is used to find all item sets with a frequency greater than the set support threshold. These item sets may contain characteristics such as the customer's occupation, gender, and income. For example, if the support threshold is 0.005, any feature combination with a frequency of occurrence exceeding 0.5% in the data set will be identified as the target item set. Then, multiple association rules are generated based on the multiple item sets, and the target association rule is determined from the multiple association rules based on the confidence threshold and the variable number threshold. For example, the association rule is expressed in the form of A=>B, where A is a set of one or more features and B is another feature or feature set. The algorithm will try to generate as many rules as possible from each item set, and calculate the support and confidence of each rule. Based on the confidence and lift thresholds, the association rules that meet the conditions are screened out, for example, redundant rules are eliminated to obtain the target association rule. Then, the target customer group is determined based on the target association rules. For example, the rules are sorted according to the lift degree. The higher the lift degree, the more valuable the rule is because it indicates that the feature combination has a greater impact on the target redemption product.
[0060] For example, the data obtained after data preprocessing includes the customer's occupation (state-owned enterprise employee = 1, entrepreneur = 2, private enterprise employee = 3, self-employed = 4), gender (male = 1, female = 2) and income (low income = 1, medium income = 2, high income = 3). Applying the association rule algorithm, we can get the rule {occupation = 2, income = 2} => {intention to redeem = true}, support = 0.011, confidence = 1.000, lift = 3.096. This means that in the data set, customers who are entrepreneurs and have medium income have a confidence of 1.000 that they will tend to redeem the product, and the lift of this rule shows that the tendency of this customer group to redeem the product is much higher than that of randomly selected customers.
[0061] It should be noted that by introducing the association rule algorithm and setting the thresholds of support, confidence and the minimum number of variables, the customer groups who intend to use the redemption products can be presented in a three-dimensional manner, which is helpful for making accurate recommendations for redemption products.
[0062] In an optional embodiment, consensus processing is performed on transaction data, including: processing the transaction data according to a preset message format to obtain processed transaction data; sending the processed transaction data to a preset message queue, wherein the preset message queue is used to sort the processed transaction data to obtain sorted transaction data; receiving the sorted transaction data returned by the preset message queue, and using the sorted transaction data as consensus transaction data.
[0063] Optionally, the transaction data is processed according to a preset message format (e.g., the format of a Kafka message) to obtain the processed transaction data, and then the processed transaction data is sent to a preset message queue (e.g., a Kafka message queue), and then the sorted transaction data returned by the preset message queue is received, and the sorted transaction data is used as the consensus transaction data. Optionally, this solution adopts an improved consensus algorithm based on Kafka, and the sorting service node is connected to the Kafka node, and Kafka is used to perform message consensus. Since the data preprocessing, obtaining the threshold of the association rule indicator, the association sorting processing, and the redundancy elimination process in the smart contract involve storing data on the chain, four groups of sorting service nodes are set for these four-step scenarios, and Kafka is used for message consensus, and the smart contract calculation and processing results are stored on the chain. Specifically, the message sent by the client is endorsed by the sorting service node group, assembled into the format of the Kafka message, and then sent to the Kafka cluster to complete the unified sorting of the transaction information, and the processing results of the smart contract are stored on the chain.
[0064] It should be noted that the device performance and processing efficiency are improved by using the improved Kafka-based consensus algorithm to ensure that data is not executed repeatedly.
[0065] In an optional embodiment, before receiving a transaction request sent by the client based on a preset time interval through the blockchain network, a permission application request sent by the client is received through the blockchain network, the client is registered and registered based on the permission application request, and the client's identity certificate is fed back to the client.
[0066] Optionally, firstly, the permission application request sent by the client is received through the blockchain network, the client is registered and registered based on the permission application request, and the client's identity certificate is fed back to the client. For example, the application client calls the member service node of the blockchain network through the software development kit to register and register, and obtain the identity certificate that allows the use of the mining device, that is, obtain the permission to use the device. Optionally, in this solution, the identity authentication mechanism is implemented through a module component that manages and verifies the identities of the members in the network.
[0067] It should be noted that registering and registering the client based on the permission application request provides a basis for subsequent permission verification of the client.
[0068] In an optional embodiment, after the target customer groups are fed back to the client, the client sorts the target customer groups based on the corresponding promotion degree of each customer group, and displays the sorted customer groups.
[0069] For example, if all rules are sorted in descending order according to the degree of improvement, the client will show four scenarios in which customer combinations have the strongest willingness to use redemption products. Combination 1 is for entrepreneurs with middle-income status, combination 2 is for employees of state-owned enterprises with female gender, combination 3 is for entrepreneurs with female gender, and combination 4 is for freelancers with female gender.
[0070] It should be noted that by displaying the sorted customer groups, a three-dimensional display of customer groups who intend to use redemption products is achieved, which helps to make accurate recommendations for redemption products.
[0071] In an optional embodiment, a blockchain network (i.e., a mining device) is implemented using a framework that provides a modular distributed ledger solution and uses an asymmetric encryption algorithm. Figure 2 is a schematic diagram of a framework of an optional customer group mining device according to an embodiment of the present application, such as Figure 2 As shown in the figure, the distributed ledger platform is used as the underlying network environment, and the distributed ledger platform related API is used at the business layer to call the chain code (i.e., smart contract). The Linux operating system, HTTP server, and MySQL database are used to implement the web application example program, and vue.js is used on the front end to realize visual display and receive input instructions.
[0072] Figure 3 is a schematic diagram of a network structure of an optional customer group mining device according to an embodiment of the present application, such as Figure 3 As shown, the interface is implemented using a web browser, which is mainly used to set support, confidence, and the minimum number of variable threshold information, trigger relevant smart contracts, and finally return the visualization results of the redemption product intention mining. Optionally, the data structure for saving data in the ledger is shown in Table 3.
[0073] Table 3
[0074] Table field English name Table field Chinese name lhs The left side of the rule rhs Right side of the rule support Support of association rules confidence Confidence of association rules lift The lift of association rules
[0075] Figure 4 is a flow chart of an optional customer group mining transaction according to an embodiment of the present application, such as Figure 4As shown, the application client calls the member service through the software development kit to register and obtain the identity certificate that allows the use of the mining device. The application client initiates a transaction proposal to the endorsement node of the blockchain network through the software development kit. After receiving the transaction proposal, the endorsement node performs permission verification on the client, for example, verifies the signature and confirms whether the submitter has the authority to perform the operation. If the client passes the permission verification, the corresponding smart contract is called and executed according to the smart contract identifier contained in the transaction proposal to obtain the target customer group of the target redemption product (for example, video membership, shopping card, etc.). For example, the endorsement node calls the smart contract of each transaction proposal and executes it, and returns the execution result and CA signature of each transaction proposal to the application client. The client determines whether the target customer group mined by each transaction proposal is consistent. If consistent, the client packages all transaction data related to each transaction proposal into transactions and signs them, and sends them to the sorting service node of the blockchain network. The sorting service node performs consensus processing on the transaction data, and then packages the consensus transaction data together to generate a new block, which is sent to the submission node of the blockchain network. The submission node verifies each transaction in the block. If the block passes the verification, the block is added to the blockchain network.
[0076] In an embodiment of the present application, a transaction request sent by a client based on a preset time interval is received through a blockchain network, and the client is subjected to an authority check, wherein the transaction request is used to request customer group mining for a target redemption product; if the client passes the authority check, the corresponding smart contract is called and executed according to the smart contract identifier contained in the transaction request to obtain a target customer group for the target redemption product, wherein the smart contract is used to implement a process of customer group mining according to an association rule algorithm; after the target customer group is fed back to the client, the transaction data sent by the client is received, and consensus processing is performed on the transaction data, wherein the transaction data at least includes the target customer group; based on the transaction after consensus The data generates a block and verifies the block. If the block passes the verification, the block is added to the blockchain network. The blockchain network and the association rule algorithm are combined to realize the intention mining of the target redemption product, and the target customer group is obtained, ensuring the security and immutability of the data. By introducing the association rule algorithm, the customer group who intends to use the redemption product can be displayed in a three-dimensional way, which is helpful for the accurate recommendation of the redemption product, and achieves the purpose of better realizing the intention mining of the target redemption product, thereby achieving the technical effect of improving data security and accuracy, and then solving the technical problem of low security and accuracy in the prior art of using sampling detection to determine the target customer group of the redemption product.
[0077] Example 2
[0078] According to an embodiment of the present application, an embodiment of a device for determining a target customer group based on blockchain is provided, wherein: Figure 5 is a schematic diagram of an optional device for determining a target customer group based on blockchain according to an embodiment of the present application, such as Figure 5 As shown, the device includes: a first processing unit 501, a second processing unit 502, a third processing unit 503, and a fourth processing unit 504.
[0079] The first processing unit 501 is used to receive a transaction request sent by a client based on a preset time interval through a blockchain network, and perform authority verification on the client, wherein the transaction request is used to request customer group mining for a target redemption product;
[0080] The second processing unit 502 is used to call and execute the corresponding smart contract according to the smart contract identifier contained in the transaction request if the client passes the authority verification, and obtain the target customer group of the target redemption product, wherein the smart contract is used to implement the process of customer group mining according to the association rule algorithm;
[0081] The third processing unit 503 is used to receive the transaction data sent by the client after feeding back the target customer group to the client, and perform consensus processing on the transaction data, wherein the transaction data at least includes the target customer group;
[0082] The fourth processing unit 504 is used to generate a block according to the transaction data after consensus, and verify the block. If the block passes the verification, the block is added to the blockchain network.
[0083] In an embodiment of the present application, a first processing unit 501 receives a transaction request sent by a client based on a preset time interval through a blockchain network, and performs an authority check on the client, wherein the transaction request is used to request customer group mining for a target redemption product; if the client passes the authority check, the second processing unit 502 calls and executes the corresponding smart contract based on the smart contract identifier contained in the transaction request to obtain a target customer group for the target redemption product, wherein the smart contract is used to implement a process for customer group mining according to an association rule algorithm; after feeding back the target customer group to the client, the third processing unit 503 receives the transaction data sent by the client, and performs consensus processing on the transaction data, wherein the transaction data at least includes the target customer group; the fourth processing unit 504 generates a block based on the consensus transaction data, and verifies the block. If the block passes the verification, the block is added to the blockchain network. Combining the blockchain network and the association rule algorithm, the intention mining of the target redemption product is realized, and the target customer group is obtained, ensuring the security and immutability of the data. By introducing the association rule algorithm, the customer group who intends to use the redemption product can be displayed in a three-dimensional way, which is helpful for the accurate recommendation of the redemption product, and achieves the purpose of better realizing the intention mining of the target redemption product, thereby achieving the technical effect of improving data security and accuracy, and further solving the technical problem of low security and accuracy in the prior art of using sampling detection to determine the target customer group of the redemption product.
[0084] It should be noted that the above-mentioned first processing unit 501, second processing unit 502, third processing unit 503, and fourth processing unit 504 correspond to steps S101 to S104 in the above-mentioned embodiment, and the examples and application scenarios implemented by the four units and the corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned embodiment 1.
[0085] Furthermore, the second processing unit includes: a first acquisition subunit, used to acquire object information of multiple objects, and perform data conversion processing on the object information to obtain converted object data; a second acquisition subunit, used to acquire an indicator threshold of an association rule algorithm, and configure multiple rule fields of the association rule algorithm based on the indicator threshold; a first processing subunit, used to process the converted object data based on the configured association rule algorithm to obtain a target customer group.
[0086] Furthermore, the second acquisition subunit includes: a first configuration module, used to configure the support rule field of the association rule algorithm as a support threshold; a second configuration module, used to configure the confidence rule field of the association rule algorithm as a confidence threshold; and a third configuration module, used to configure the rule length field of the association rule algorithm as a variable quantity threshold.
[0087] Furthermore, the first processing sub-unit includes: a processing module, which is used to perform data mining on the converted object data based on the configured association rule algorithm with the occurrence frequency being greater than the support threshold as a constraint condition to obtain multiple item sets; a first determination module, which is used to generate multiple association rules based on the multiple item sets, and determine the target association rule from the multiple association rules based on the confidence threshold and the variable quantity threshold; a second determination module, which is used to determine the target customer group based on the target association rule.
[0088] Furthermore, the third processing unit includes: a second processing sub-unit, used to process the transaction data according to a preset message format to obtain processed transaction data; a third processing sub-unit, used to send the processed transaction data to a preset message queue, wherein the preset message queue is used to sort the processed transaction data to obtain sorted transaction data; a fourth processing sub-unit, used to receive the sorted transaction data returned by the preset message queue, and use the sorted transaction data as the consensus transaction data.
[0089] Furthermore, the device also includes: a receiving unit, which is used to receive a permission application request sent by the client through the blockchain network before receiving a transaction request sent by the client based on a preset time interval through the blockchain network, register and register the client based on the permission application request, and feedback the client's identity certificate to the client.
[0090] Furthermore, after the target customer groups are fed back to the client, the client sorts the target customer groups based on the corresponding promotion degree of each customer group, and displays the sorted customer groups.
[0091] Example 3
[0092] An embodiment of the present application may provide an electronic device, Figure 6 is a structural block diagram of an electronic device according to an embodiment of the present application. Figure 6 As shown, the electronic device may include: one or more ( Figure 6 (only one is shown) processor 602, memory 604, storage controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.
[0093] Among them, the memory can be used to store software programs and modules, such as program instructions / modules corresponding to the methods and devices in the embodiments of the present application, and the processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0094] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: receiving a transaction request sent by the client based on a preset time interval through the blockchain network, and performing an authority check on the client, wherein the transaction request is used to request customer group mining for the target redemption product; if the client passes the authority check, the corresponding smart contract is called and executed according to the smart contract identifier contained in the transaction request to obtain the target customer group of the target redemption product, wherein the smart contract is used to implement the process of customer group mining according to the association rule algorithm; after feeding back the target customer group to the client, receiving the transaction data sent by the client, and performing consensus processing on the transaction data, wherein the transaction data at least includes the target customer group; generating a block based on the consensus transaction data, and verifying the block, and if the block passes the verification, adding the block to the blockchain network.
[0095] The processor can also call the information and application programs stored in the memory through the transmission device to execute the following steps: obtain object information of multiple objects, and perform data conversion processing on the object information to obtain converted object data; obtain the indicator threshold of the association rule algorithm, and configure multiple rule fields of the association rule algorithm based on the indicator threshold; process the converted object data according to the configured association rule algorithm to obtain the target customer group.
[0096] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: configure the support rule field of the association rule algorithm as a support threshold; configure the confidence rule field of the association rule algorithm as a confidence threshold; configure the rule length field of the association rule algorithm as a variable quantity threshold.
[0097] The processor can also call the information and application programs stored in the memory through the transmission device to perform the following steps: with the occurrence frequency being greater than the support threshold as a constraint condition, data mining is performed on the converted object data according to the configured association rule algorithm to obtain multiple item sets; multiple association rules are generated based on the multiple item sets, and the target association rules are determined from the multiple association rules based on the confidence threshold and the variable quantity threshold; the target customer group is determined based on the target association rule.
[0098] The processor can also call the information and application programs stored in the memory through the transmission device to perform the following steps: processing the transaction data according to the preset message format to obtain processed transaction data; sending the processed transaction data to the preset message queue, wherein the preset message queue is used to sort the processed transaction data to obtain sorted transaction data; receiving the sorted transaction data returned by the preset message queue, and using the sorted transaction data as the consensus transaction data.
[0099] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: before receiving the transaction request sent by the client based on the preset time interval through the blockchain network, receive the permission application request sent by the client through the blockchain network, register and register the client based on the permission application request, and feedback the client's identity certificate to the client.
[0100] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: after feeding back the target customer group to the client, the client sorts the target customer group based on the corresponding improvement degree of each customer group, and displays the sorted customer groups.
[0101] It can be understood by those skilled in the art that Figure 6 The structure shown is for illustration only, and the electronic device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, and other terminal devices. Figure 6 The structure of the electronic device is not limited. Figure 6 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Figure 6 Different configurations are shown.
[0102] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0103] Example 4
[0104] The embodiment of the present application also provides a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the method for determining the target customer group based on blockchain provided in the first embodiment.
[0105] Optionally, in this embodiment, the above storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.
[0106] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing the program steps of the method for determining a target customer group based on blockchain.
[0107] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0108] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0109] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0110] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0111] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0112] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.
[0113] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for determining a target customer group based on blockchain, characterized in that: include: Receiving a transaction request sent by a client based on a preset time interval through a blockchain network, and performing an authority check on the client, wherein the transaction request is used to request customer group mining for a target redemption product; If the client passes the permission check, the corresponding smart contract is called and executed according to the smart contract identifier contained in the transaction request to obtain the target customer group of the target redemption product, wherein the smart contract is used to implement the process of customer group mining according to the association rule algorithm; After feeding back the target customer group to the client, receiving transaction data sent by the client, and performing consensus processing on the transaction data, wherein the transaction data at least includes the target customer group; A block is generated based on the transaction data after consensus, and the block is verified. If the block passes the verification, the block is added to the blockchain network.
2. The method according to claim 1, characterized in that The corresponding smart contract is called and executed according to the smart contract identifier contained in the transaction request to obtain the target customer group of the target redemption product, including: Acquire object information of multiple objects, and perform data conversion processing on the object information to obtain converted object data; Acquire an indicator threshold of the association rule algorithm, and configure multiple rule fields of the association rule algorithm according to the indicator threshold; The converted object data is processed according to the configured association rule algorithm to obtain the target customer group.
3. The method according to claim 2, characterized in that The indicator thresholds include a support threshold, a confidence threshold, and a variable quantity threshold, wherein multiple rule fields of the association rule algorithm are configured according to the indicator thresholds, including: Configuring the support rule field of the association rule algorithm to be the support threshold; Configuring the confidence rule field of the association rule algorithm to be the confidence threshold; The rule length field of the association rule algorithm is configured as the variable quantity threshold.
4. The method according to claim 3, characterized in that The converted object data is processed according to the configured association rule algorithm to obtain the target customer group, including: Taking the occurrence frequency greater than the support threshold as a constraint condition, data mining is performed on the transformed object data according to the configured association rule algorithm to obtain multiple item sets; Generate a plurality of association rules according to the plurality of item sets, and determine a target association rule from the plurality of association rules according to the confidence threshold and the variable quantity threshold; The target customer group is determined according to the target association rule.
5. The method according to claim 1, characterized in that: The transaction data is processed by consensus, including: Processing the transaction data according to a preset message format to obtain processed transaction data; Sending the processed transaction data to a preset message queue, wherein the preset message queue is used to sort the processed transaction data to obtain sorted transaction data; Receive the sorted transaction data returned by the preset message queue, and use the sorted transaction data as the consensus-posted transaction data.
6. The method according to claim 1, characterized in that Before receiving, through the blockchain network, a transaction request sent by the client based on a preset time interval, the method further includes: The permission application request sent by the client is received through the blockchain network, the client is registered and registered based on the permission application request, and the identity certificate of the client is fed back to the client.
7. The method according to claim 1, characterized in that After the target customer groups are fed back to the client, the client sorts the target customer groups based on the corresponding promotion degree of each customer group, and displays the sorted customer groups.
8. A device for determining a target customer group based on blockchain, characterized in that: include: A first processing unit is used to receive a transaction request sent by a client based on a preset time interval through a blockchain network, and perform authority verification on the client, wherein the transaction request is used to request customer group mining for a target redemption product; A second processing unit is configured to, if the client passes the authority verification, call and execute the corresponding smart contract according to the smart contract identifier included in the transaction request to obtain the target customer group of the target redemption product, wherein the smart contract is used to implement the process of customer group mining according to the association rule algorithm; a third processing unit, configured to receive transaction data sent by the client after feeding back the target customer group to the client, and perform consensus processing on the transaction data, wherein the transaction data at least includes the target customer group; The fourth processing unit is used to generate a block according to the transaction data after consensus, and verify the block. If the block passes the verification, the block is added to the blockchain network.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the method for determining a target customer group based on blockchain as described in any one of claims 1 to 7 when running.
10. An electronic device, characterized in that: The electronic device includes one or more processors; A memory for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to run the programs, wherein the program is configured to execute the method for determining a target customer group based on blockchain as described in any one of claims 1 to 7 when running.
Citation Information
Patent Citations
User group feature analysis method and system based on block chain
CN110060095A
Integrating method, system, device and apparatus based on intelligent contract
CN110348882A
Target user screening method and device
CN111223227A
Blockchain consensus method and system based on association rule model training
CN111680076A
Business processing method, device, equipment and medium
CN111769956A