Member life cycle grade point management method and system based on block chain

Through blockchain technology and smart contracts, the lack of trust and high operation and maintenance costs of traditional member level points management systems have been solved, and the automated update and differentiated management of member level have been realized, which has improved the security and operation and maintenance efficiency of the system.

CN119027182AInactive Publication Date: 2024-11-26ZHUHAI ZHUOXUAN TECH CO LTD

Patent Information

Application Number
CN202410936801.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-12
Publication Date
2024-11-26
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The traditional member level points management system has lost trust and high operation and maintenance costs due to the centralized architecture, and it is difficult to meet the differentiated needs of different users for different versions of the rules.

Method used

Using blockchain technology, multiple versions of membership level rules and access permission information are stored through smart contracts. Users send level change requests through the client. The system judges permissions based on the version number and identity identification and automatically updates the level to ensure data tamper-proof and transparent traceability, and introduce hierarchical storage strategies based on frequency of use.

Benefits of technology

It improves the system's security, reliability and operation and maintenance efficiency, reduces the cost of switching rules and permission management in different versions, realizes differentiated management of access rights for rules and versions of different user groups, and optimizes the utilization rate of storage resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119027182A_ABST
    Figure CN119027182A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of block chains, in particular to a member life cycle grade point management method and system based on a block chain. According to the method, the access permission information of the rule versions is stored on the block chain, so that the differentiated requirements can be well met, and the access permissions of different users to different rule versions are flexibly controlled; according to the method, a member level change request is received, the received member level change request can be processed in real time, the problems of data consistency, security and auditing faced by a traditional centralized system are effectively solved by using a block chain technology, rules and authority information are stored in a distributed block chain account book, tamper-proofing and transparent traceability of data are ensured, and the user experience is improved. Based on access control of the user identity and the version number, the security and reliability of the system are improved, meanwhile, member management is more efficiently carried out through automatic level updating logic, and the operation and maintenance cost brought by switching of different version rules and authority management is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of blockchain, and in particular to a member lifecycle level points management method and system based on blockchain. Background Art

[0002] In many industries, membership programs and point reward systems are widely used to attract and retain customers. Members can accumulate points based on consumption behavior or other criteria, and then obtain corresponding membership levels and benefits. The membership level system not only reflects the value of members, but also brings considerable benefits to enterprises.

[0003] Traditional membership level points management systems usually adopt a centralized architecture, where all rules and data are managed and stored by the operator's centralized system. Member levels and their corresponding rules are formulated by the operator, and member points data is recorded and maintained by the operator. When the rules or levels need to be adjusted, the operator will perform the corresponding logical operations within the system.

[0004] Since the rules and data are completely controlled by the operator, members have no way of understanding the process of rule formulation and change, nor can they verify the authenticity and integrity of the data, which leads to a lack of trust. In addition, the switching of different versions of rules and permission management also bring additional operation and maintenance costs and challenges to the operator, which needs to be further improved. Summary of the invention

[0005] In order to solve the problems of lack of trust and high operation and maintenance costs in the existing points management system, this application provides a member lifecycle level points management method and system based on blockchain, which adopts the following technical solutions: In a first aspect, the present application provides a member lifecycle level points management method based on blockchain, characterized in that the method is executed by a node of a blockchain system, and comprises the following steps: Encode and store multiple versions of membership level rules and corresponding access rights information in the smart contract state of the blockchain system, and each version of the membership level rules corresponds to a version number; Receiving a level change request sent by a user through a client, wherein the request includes a requested member level rule version number and a user identity; Based on the member level rule version number, obtain the target member level rule and target access permission information of the corresponding version number from the smart contract state; Based on the user identity and the target access permission information, determining whether the user has the authority to use the requested target membership level rule; If authorized, the rule logic corresponding to the target membership level rule requested in the smart contract state is executed to automatically update the membership level; The updated membership level is written into the distributed ledger of the blockchain, and the membership level rule version number and the user identity are recorded.

[0006] By adopting the above technical solution, different members may need to use different versions of membership level rules. This differentiated demand may come from the member's joining time, payment level or other factors; this application can well meet this differentiated demand by storing the access permission information of the rule version on the blockchain, and flexibly control the access permissions of different users to different rule versions; and can process the received member level change requests in real time. By using blockchain technology, it effectively solves the data consistency, security, and auditability problems faced by traditional centralized systems, and stores the rules and permission information in a distributed blockchain ledger to ensure the tamper-proof and transparent traceability of the data. The access control based on user identity and version number improves the security and reliability of the system. At the same time, through the automated level update logic, member management is more efficient, reducing the operation and maintenance costs caused by switching between different versions of rules and permission management.

[0007] Optionally, before executing the rule logic corresponding to the target membership level rule requested in the smart contract state, the method includes the following steps: Determine whether the version number of the target membership level rule requested for use is higher than the version number of the membership level rule currently corresponding to the user identity; If the version number of the target member level rule is higher than the version number of the current corresponding member level rule, a version upgrade notification is sent to the user, prompting the user to apply for the requested target member level rule; After receiving the version upgrade confirmation response from the user, the rule logic corresponding to the target member level rule is executed.

[0008] By adopting the above technical solution, for long-term customers, sudden changes in rules may affect their rights expectations, damage user experience and brand trust; before executing the target membership level rule logic, the system will first determine whether the target rule version number requested is higher than the current version number corresponding to the user; if the target version is newer, the system will actively send an upgrade notification to the user, prompting the user to apply to use the new version of the rule; only after the user confirms, the system will execute the logic corresponding to the new version of the rule to ensure a smooth transition of user data and avoid data confusion caused by version upgrades. At the same time, old customers can use the previous version rights to achieve differentiated management of rule version access rights for different user groups.

[0009] Optionally, the method further comprises the following steps: Count the usage frequency of different versions of membership level rules and corresponding membership data within a preset time period; Calculate the query probability of each member level rule version and the corresponding member data according to the usage frequency; Comparing the queried probability with a preset probability threshold, and storing the member level rule versions and corresponding member data for which the queried probability is greater than or equal to the probability threshold in the distributed ledger in a complete manner; The member level rule version and corresponding member data whose query probability is less than the probability threshold are downsampled and stored in the first temporary blockchain.

[0010] By adopting the above technical solution, the present application introduces a hierarchical storage strategy based on frequency of use. By counting the frequency of use of different versions of rules and data, the query probability is calculated, and it is divided into two categories according to the preset probability threshold for different storage processing; for hot data with a higher probability of being queried, the system stores it completely in the core distributed ledger, ensuring the high availability and consistency of this part of active data, and meeting the real-time and fast access requirements for hot data; for cold data with a lower probability of being queried, the system downsamples it, reduces the storage space occupancy, and stores it in a temporary blockchain, retaining the traceability of this part of historical data, and improving the overall performance and resource utilization of the system.

[0011] Optionally, the method further comprises the following steps: Count the usage frequency of different versions of membership level rules and corresponding membership data within a preset time period; Obtaining a preset data storage ratio, and calculating an initial cardinality of a complete storage set based on the data storage ratio and the total number of member level rule versions; the data storage ratio is used to control the retention degree of member level rule versions and corresponding member data; Based on the initial cardinality of the complete storage set and the usage frequency, calculating the retained member level rule version and the range of the corresponding member data to form a target complete storage set; The member level rule versions and corresponding member data in the target complete storage set are stored in the distributed ledger in a complete manner, and the member level rule versions and corresponding member data not in the target complete storage set are downsampled and stored in the second temporary blockchain.

[0012] By adopting the above technical solution, the present application first calculates the initial cardinality of a complete storage set according to the total number of versions and the storage ratio; then, based on the usage frequency of each version, a certain number of versions and corresponding data are selected from high to low to form a target complete storage set; the data in the set is completely stored in the distributed ledger, and the rest is stored in a temporary blockchain after downsampling; the distribution ratio of hot data and cold data can be flexibly adjusted to achieve a balance between complete storage and downsampled storage according to actual business needs and storage resource conditions.

[0013] Optionally, the method further comprises the following steps: According to the member level rule version and the corresponding member data in the target complete storage set, the latest member level status pool is generated for fast query and update.

[0014] By adopting the above technical solution, this application generates an independent latest membership level status pool based on the membership level rule version and corresponding data in the target complete storage set for fast query and update, thereby improving data access efficiency. The application only needs to interact with the status pool without directly processing the complex blockchain storage structure, reducing the complexity of development and maintenance.

[0015] Optionally, the method further comprises the following steps: Setting a data expiration time for the downsampled data stored in the second temporary blockchain; When the data reaches the data expiration time, the downsampled data is automatically marked as expired data.

[0016] By adopting the above technical solution, the present application can effectively avoid the unlimited accumulation of these cold data by regularly cleaning up expired downsampled data, thereby saving valuable storage space resources, so that only valid historical data is retained in the temporary blockchain, reducing unnecessary data query and maintenance overhead, improving overall storage efficiency, reducing unnecessary performance loss, and improving the overall operation efficiency of the system.

[0017] Optionally, based on the initial cardinality of the complete storage set and the usage frequency, calculating the retained member level rule version and the range of the corresponding member data specifically includes the following steps: Sort all versions of the membership level rules from high to low according to the usage frequency to obtain a sorted version sequence; Grouping the sorted version sequence, each group containing n consecutive versions, where n is a preset grouping coefficient; Calculate the cumulative usage frequency of each group as the corresponding weight value of each group; Sort all groups according to the weight values ​​from high to low; Calculate the retained member level rule versions Y = N + β * (M - N) * Σ(wi / W), where Y is the number of versions to be retained first; N is the initial cardinality of the complete storage set; M is the total number of all member level rule versions; β is the preset retention weighting factor, 0≤β≤1; wi is the weight value of the i-th group; W is the sum of the weight values ​​of all groups, and Σ(wi / W) is the weighted average of all group weights; Obtain the member data corresponding to the retained member level rule version, and obtain the range of the retained member level rule version and the corresponding member data.

[0018] By adopting the above technical solution, the present application first sorts and groups all versions according to the frequency of use, calculates the cumulative frequency of use of each group as the weight value, and then sorts the groups from high to low according to the weight; then calculates the number of versions Y to be retained in priority according to the weighted formula; finally, based on the versions to be retained in priority, obtains the corresponding member data to obtain the complete range to be retained. This weighted retention strategy based on frequency of use can well balance the retention requirements of active versions and inactive versions; high-frequency active versions are given higher weights and can obtain sufficient retention resources; and low-frequency versions can also obtain a certain amount of retention space in proportion to their weights.

[0019] In the second aspect, the present application provides a member lifecycle level points management system based on blockchain, including: Blockchain node cluster, used to execute various operations of the blockchain system; A smart contract module, arranged in the blockchain node cluster, for storing multiple versions of membership level rules and corresponding access permission information, each version of the membership level rules corresponding to a version number; A request receiving module, used to receive a level change request sent by a user through a client, wherein the request includes a version number of the member level rule requested to be used and a user identity identifier; A rule acquisition module, used to acquire the target member level rule and target access permission information of the corresponding version number from the smart contract module based on the member level rule version number; An authority determination module, used to determine whether the user has the authority to use the requested target membership level rule based on the user identity and the target access permission information; A level update module, used to execute the rule logic corresponding to the target member level rule in the smart contract module and automatically perform member level update when the user has the authority to use the requested rule; The data writing module is used to write the updated membership level into the distributed ledger of the blockchain and record the membership level rule version number and the user identity.

[0020] In a third aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned blockchain-based member lifecycle level points management method when executing the computer program.

[0021] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-mentioned blockchain-based member lifecycle level points management method.

[0022] In summary, the present application includes at least one of the following beneficial technical effects: 1. This application can well meet such differentiated needs by storing the access rights information of the rule version on the blockchain, flexibly controlling the access rights of different users to different rule versions; and can process the received membership level change requests in real time. By using blockchain technology, it effectively solves the data consistency, security, and auditability problems faced by traditional centralized systems, and stores the rules and permission information in a distributed blockchain ledger, ensuring the tamper-proof and transparent traceability of the data. The access control based on user identity and version number improves the security and reliability of the system. At the same time, the automated level update logic can be used to more efficiently manage members and reduce the operation and maintenance costs caused by switching between different versions of rules and permission management. 2. Before executing the target membership level rule logic, the system will first determine whether the target rule version number requested is higher than the current version number of the user; if the target version is newer, the system will proactively send an upgrade notification to the user, prompting the user to apply for the new version of the rule; only after the user confirms, the system will execute the logic corresponding to the new version of the rule to ensure a smooth transition of user data and avoid data confusion caused by version upgrades. At the same time, old customers can use the previous version rights and realize differentiated management of access rights to rule versions for different user groups; 3. This application introduces a hierarchical storage strategy based on frequency of use. By counting the frequency of use of different versions of rules and data, the query probability is calculated, and it is divided into two categories according to the preset probability threshold for different storage processing; for hot data with a higher probability of being queried, the system stores it completely in the core distributed ledger, ensuring the high availability and consistency of this part of active data, and meeting the real-time and fast access requirements for hot data; for cold data with a lower probability of being queried, the system downsamples it, reducing the storage space occupancy, and stores it in a temporary blockchain, retaining the traceability of this part of historical data, and improving the overall performance and resource utilization of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 It is a flowchart of a member lifecycle level points management method based on blockchain in an embodiment of the present application; Figure 2 It is a flowchart of version determination in the member life cycle level points management method based on blockchain in an embodiment of the present application; Figure 3 It is a flowchart of hierarchical storage in the member life cycle level points management method based on blockchain in an embodiment of the present application; Figure 4 It is a flowchart of obtaining a complete storage set in the member life cycle level points management method based on blockchain in an embodiment of the present application; Figure 5 It is a flowchart of step S430 in the member lifecycle level points management method based on blockchain in an embodiment of the present application; Figure 6 This is another flowchart of the member lifecycle level points management method based on blockchain in an embodiment of the present application; Figure 7 It is a module diagram of a member life cycle level points management system based on blockchain in an embodiment of the present application; Figure 8 It is a diagram of the internal structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0024] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to be used as limitations to the present application. As used in the specification and appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include plural expressions, unless there is a clear indication to the contrary in the context. It should also be understood that the term "and / or" used in the present application refers to any or all possible combinations comprising one or more listed items.

[0025] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.

[0026] The embodiments of the present application are further described in detail below in conjunction with the drawings in the specification.

[0027] In the first aspect, the present application provides a member life cycle level points management method based on blockchain, referring to Figure 1, the method is executed by a node of the blockchain system, and includes the following steps: S110. Encode and store multiple versions of membership level rules and corresponding access permission information in the smart contract state of the blockchain system, where each version of the membership level rules corresponds to a version number.

[0028] Among them, the membership level rules define the conditions and standards for membership levels, such as consumption amount and points level; the access permission information stipulates the system access permissions corresponding to different membership levels, such as product discounts, order purchase permissions, etc.

[0029] Specifically, for example, the e-commerce platform divides membership levels into four levels: ordinary members, silver members, gold members, and diamond members. As the business develops, the platform constantly adjusts the rules and standards for membership levels, forming multiple historical versions of rules; all versions of membership level rules and corresponding access rights formulated in different periods are tabulated and coded, and the coded data is deployed to the smart contract of the Ethereum blockchain using the smart contract language. The coded data of all versions of the rules are stored in the contract state variables, and an incremental version number is specified for each version.

[0030] S120: receiving a level change request sent by a user through a client, wherein the request includes a requested member level rule version number and a user identity.

[0031] Among them, the level change request is an operation request sent by the client to modify its own membership level, and the user identity is information used to uniquely identify the user's identity, such as member ID, wallet address, etc.

[0032] S130. Based on the member level rule version number, obtain the target member level rule and target access permission information of the corresponding version number from the smart contract status.

[0033] Among them, the smart contract searches for the rules and permission data corresponding to the version number stored in the state variable through a mapping or key-value pair data structure, and decodes the query results to obtain the specific conditions and standards of the target membership level rules, as well as the system access permission list corresponding to the rule version.

[0034] Specifically, for example, Xiao Ming's member ID is 1001. He opens the e-commerce APP client, and after recharging and consuming, he initiates a request to upgrade his membership level. He selects the applicable version number 3. The smart contract finds the corresponding membership rules based on the version number 3 in the request, such as upgrading to diamonds and permission lists when the consumption reaches 15,000.

[0035] S140: Based on the user identity and the target access permission information, determine whether the user has the authority to use the requested target membership level rule.

[0036] In this embodiment, the current membership level of the user is queried from the system database or the blockchain distributed ledger, and the current membership level of the user is compared with the target access permission list. If the user has the right to access all the permission items in the permission list corresponding to the target rule version, it is determined that the user has the permission to use it, otherwise, the user does not have the permission.

[0037] Specifically, the smart contract checks Xiao Ming's current membership level as ordinary member, and checks his historical consumption amount as 18,000. By comparing the rule conditions of version 3, Xiao Ming meets the requirements for upgrading to diamond membership and is determined to have the right to use this rule version.

[0038] S150. If permission is granted, the rule logic corresponding to the target membership level rule requested in the smart contract state is executed, and the membership level update is automatically performed.

[0039] Specifically, the smart contract calls the rule logic function corresponding to the target membership level rule, which extracts the parameter values ​​required by the relevant rule conditions from the user's historical transactions, points, consumption and other data, executes the rule logic judgment based on the extracted parameter values ​​and rule conditions, obtains the user's new membership level, and writes the user identity and the new level status into the state variable of the smart contract. In this embodiment, the smart contract executes the logic of the version 3 membership level rule and automatically updates Xiao Ming's membership level to the diamond membership level.

[0040] S160. Write the updated membership level into the distributed ledger of the blockchain, and record the membership level rule version number and user identity.

[0041] Specifically, the smart contract initiates a transaction, and uses the user's new membership level, applicable rule version number, user identity, etc. as transaction data. The transaction is packaged into a new block and written into the distributed general ledger of the entire blockchain network through a consensus mechanism. The new membership level status and associated metadata are permanently stored in the blockchain's tamper-proof public records. In this embodiment, a transaction recording member ID: 1001, member level: diamond, and using rule version: 3 is packaged and written into the distributed ledger of the blockchain.

[0042] Through this, dynamic membership level changes can be achieved. The blockchain smart contract is responsible for storing and executing various versions of membership rules, and dynamically updating membership status according to the rule conditions, while ensuring that the level change process is transparent, traceable and cannot be tampered with.

[0043] In one embodiment, referring to Figure 2 In step S150, before executing the rule logic corresponding to the target membership level rule requested in the smart contract state, the method includes the following steps: S210: Determine whether the version number of the target member level rule requested for use is higher than the member level rule version number currently corresponding to the user identity.

[0044] Since different members may need to use different versions of membership level rules, this differentiated demand may come from the member's joining time, payment level or other factors. When a new version of the membership level rules is launched, different member groups may need to switch to the new rules in batches or stages. This smooth transition process requires detailed permission control over which members can use which version of the rules. If the access rights to the rule versions are not restricted, members may try to maliciously abuse or bypass certain versions of the rules to obtain more rights and interests. Therefore, access permission control is required to ensure that each member can only use the authorized version of the rules.

[0045] Specifically, before executing the target rule logic, the system needs to compare the target rule version number with the rule version number currently applicable to the user. For example, in version 1, a user can be upgraded to a diamond member when spending 20,000 or more, and in version 3, a user can be upgraded to a diamond member when spending 15,000 or more. Xiao Ming is currently using version 1 of the rule, and he has applied to use version 3 of the rule. The version number of version 3 is higher than that of version 1, so Xiao Ming can switch to version 3 and be upgraded to a diamond member when spending 15,000 or more. On the other hand, if a user can be upgraded to a diamond member when spending 15,000 or more in version 1 and a user can be upgraded to a diamond member when spending 20,000 or more in version 3, and Xiao Ming is a user of version 3 of the rule, he cannot be upgraded to a diamond member when spending 15,000 or more.

[0046] S220: If the version number of the target member level rule is higher than the version number of the current corresponding member level rule, a version upgrade notification is sent to the user, prompting the user to apply to use the requested target member level rule.

[0047] S230: After receiving the version upgrade confirmation response from the user, execute the rule logic corresponding to the target membership level rule.

[0048] Specifically, if the result of S210 is that the target version number is higher, the system needs to proactively notify the user to confirm whether to upgrade to a newer version of the rules. For example, the system sends a notification to Xiao Ming, "You are currently using the old version of the membership rules. A new version has been launched and you can apply for an upgrade. After the upgrade, you can enjoy XXXX new benefits. Do you want to upgrade?" Only after the user confirms and agrees to the upgraded version, the system will actually execute the membership level update logic corresponding to the target rule version applied for. In this way, the user's right to choose independently can be respected. The user can review whether the new version of the rules is beneficial to him before confirming whether to upgrade, preventing the user from being unilaterally upgraded to an unfavorable new version by the system due to the user's ignorance of the changes in the new version of the rules. At the same time, it reduces user confusion and complaints caused by version rule changes, and improves user experience and system interpretability.

[0049] In one embodiment, referring to Figure 3 , the method further comprises the following steps: S310: Count usage frequencies of different versions of membership level rules and corresponding membership data within a preset time period.

[0050] Specifically, the system continuously tracks and counts the number of times each member level rule version and its corresponding member data set is queried and used within a pre-set time window, such as a week or a month.

[0051] S320: Calculate the query probability of each member level rule version and the corresponding member data according to the usage frequency.

[0052] S330: Compare the queried probability with a preset probability threshold, and store the member level rule version and corresponding member data for which the queried probability is greater than or equal to the probability threshold in a complete manner in the distributed ledger.

[0053] It is understandable that popular rule versions and member data with higher probabilities need to be completely stored in an immutable blockchain distributed ledger to ensure their traceability and durability.

[0054] S340: downsample the member level rule versions and corresponding member data whose query probabilities are less than the probability threshold and store them in the first temporary blockchain.

[0055] For unpopular rule versions and member data with low probability, compression techniques such as downsampling can be used for storage, thereby saving storage space and temporarily storing compressed data in a temporary blockchain. In this way, through the layered storage method, resources are allocated to popular data first, while also taking into account the needs of unpopular data, and better balancing storage overhead and data integrity requirements.

[0056] In one embodiment, referring to Figure 4, the method further comprises the following steps: S410: Count usage frequencies of different versions of membership level rules and corresponding membership data within a preset time period.

[0057] S420. Obtain a preset data storage ratio, and calculate an initial cardinality of a complete storage set based on the data storage ratio and the total number of member level rule versions; the data storage ratio is used to control the degree of retention of member level rule versions and corresponding member data.

[0058] S430: Based on the initial cardinality and usage frequency of the complete storage set, calculate the range of the retained member level rule version and the corresponding member data to form a target complete storage set.

[0059] Wherein, in the above embodiment, the storage scheme is determined by comparing the queried probability with a preset probability threshold, and in this embodiment, the storage scheme is determined by a preset data storage ratio and a retention degree corresponding to the preset data storage ratio.

[0060] Specifically, refer to Figure 5 In step S430, based on the initial cardinality and usage frequency of the complete storage set, the retained member level rule version and the range of the corresponding member data are calculated, which specifically includes the following steps: S431. Sort all versions of the membership level rules from high to low according to the usage frequency to obtain a sorted version sequence.

[0061] S432: Group the sorted version sequence, each group containing n consecutive versions, where n is a preset grouping coefficient.

[0062] S433: Calculate the cumulative usage frequency of each group as the weight value corresponding to each group.

[0063] S434. Sort all groups according to their weight values ​​from high to low.

[0064] S435. Calculate the retained member level rule version Y = N + β * (M - N) * Σ(wi / W).

[0065] Among them, Y is the number of versions that are retained first; N is the initial cardinality of the complete storage set; M is the total number of all membership level rule versions; β is the preset retention weighting factor, 0≤β≤1; wi is the weight value of the i-th group; W is the sum of the weight values ​​of all groups, and Σ(wi / W) is the weighted average of all group weights.

[0066] S436. Obtain the member data corresponding to the retained member level rule version, and obtain the range of the retained member level rule version and the corresponding member data.

[0067] S440: Store the member level rule version and the corresponding member data in the target complete storage set in a distributed ledger in a complete manner, and store the member level rule version and the corresponding member data that are not in the target complete storage set in a second temporary blockchain after downsampling.

[0068] Through this, the present application first sorts and groups all versions by usage frequency, calculates the cumulative usage frequency of each group as the weight value, and then sorts the groups from high to low by weight; then calculates the number of versions Y to be retained in priority according to the weighted formula; finally, based on the versions to be retained in priority, obtains the corresponding member data to obtain the complete range to be retained. This weighted retention strategy based on usage frequency can well balance the retention requirements of active versions and inactive versions; high-frequency active versions are given higher weights and can obtain sufficient retention resources; and low-frequency versions can also obtain a certain amount of retention space in proportion to their weights.

[0069] Further, see Figure 6 , the method further comprises the following steps: S610: Generate the latest member level status pool based on the member level rule version and corresponding member data in the target complete storage set for quick query and update.

[0070] Specifically, based on the membership level rule version and corresponding data in the target complete storage set, an independent latest membership level status pool is generated for fast query and update, which improves data access efficiency. The application only needs to interact with the status pool without directly processing the complex blockchain storage structure, reducing the complexity of development and maintenance.

[0071] S620. Set a data expiration time for the downsampled data stored in the second temporary blockchain.

[0072] S630: When the data reaches the data expiration time, the downsampled data is automatically marked as expired data.

[0073] Specifically, the system sets a data expiration time. When the data reaches the data expiration time, the downsampled data is automatically marked as expired data. By regularly cleaning up expired downsampled data, it can effectively avoid the unlimited accumulation of these cold data, thereby saving valuable storage space resources, so that only valid historical data is retained in the temporary blockchain, reducing unnecessary data query and maintenance overhead, improving overall storage efficiency, reducing unnecessary performance loss, and improving the overall operation efficiency of the system.

[0074] The implementation principle of the embodiment of the present application is as follows: the present application can well meet such differentiated needs by storing the access permission information of the rule version on the blockchain, and flexibly control the access permissions of different users to different rule versions; and can process the received membership level change requests in real time. By using blockchain technology, the data consistency, security, and auditability issues faced by traditional centralized systems are effectively solved. The rules and permission information are stored in a distributed blockchain ledger, ensuring the tamper-proof and transparent traceability of the data. The access control based on user identity and version number improves the security and reliability of the system. At the same time, the membership management is more efficient through the automated level update logic, reducing the operation and maintenance costs caused by the switching of different versions of rules and permission management.

[0075] On the second aspect, the present application provides a member life cycle level points management system based on blockchain. The member life cycle level points management system of the blockchain of the present application is described below in combination with the member life cycle level points management method of the blockchain mentioned above.

[0076] Reference Figure 7 , a member lifecycle level points management system based on blockchain, including: Blockchain node cluster 710, used to execute various operations of the blockchain system; A smart contract module 720 is provided in the blockchain node cluster and is used to store multiple versions of membership level rules and corresponding access rights information, each version of the membership level rules corresponding to a version number; The request receiving module 730 is used to receive a level change request sent by a user through a client, wherein the request includes a version number of the member level rule requested to be used and a user identity; A rule acquisition module 740 is used to acquire target member level rules and target access rights information of a corresponding version number from a smart contract module based on the member level rule version number; The authority determination module 750 is used to determine whether the user has the authority to use the requested target membership level rule based on the user identity and the target access permission information; The level update module 760 is used to execute the rule logic corresponding to the target member level rule in the smart contract module and automatically perform the member level update when the user has the authority to use the requested rule; The data writing module 770 is used to write the updated membership level into the distributed ledger of the blockchain and record the membership level rule version number and user identity.

[0077] In one embodiment, the present application provides an electronic device, which may be a server, and its internal structure diagram may be as follows: Figure 8As shown. The electronic device includes a processor, a memory and a network interface connected via a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the electronic device is used to store data. The network interface of the electronic device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a member life cycle level points management method based on blockchain is implemented.

[0078] Those skilled in the art will understand that Figure 8 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0079] In one embodiment, an electronic device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0080] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the above-mentioned computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0081] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Therefore, any equivalent changes made according to the structure, shape, and principle of the present application should be included in the protection scope of the present application.

Claims

1. A member lifecycle level points management method based on blockchain, characterized in that: The method is executed by a node of the blockchain system and includes the following steps: Encode and store multiple versions of membership level rules and corresponding access rights information in the smart contract state of the blockchain system, and each version of the membership level rules corresponds to a version number; Receiving a level change request sent by a user through a client, wherein the request includes a requested member level rule version number and a user identity; Based on the member level rule version number, obtain the target member level rule and target access permission information of the corresponding version number from the smart contract state; Based on the user identity and the target access permission information, determining whether the user has the authority to use the requested target membership level rule; If authorized, the rule logic corresponding to the target membership level rule requested in the smart contract state is executed to automatically update the membership level; The updated membership level is written into the distributed ledger of the blockchain, and the membership level rule version number and the user identity are recorded.

2. The member lifecycle level points management method based on blockchain according to claim 1 is characterized in that: Before executing the rule logic corresponding to the target membership level rule requested in the smart contract state, the method includes the following steps: Determine whether the version number of the target membership level rule requested for use is higher than the version number of the membership level rule currently corresponding to the user identity; If the version number of the target member level rule is higher than the version number of the current corresponding member level rule, a version upgrade notification is sent to the user, prompting the user to apply for the requested target member level rule; After receiving the version upgrade confirmation response from the user, the rule logic corresponding to the target member level rule is executed.

3. The member lifecycle level points management method based on blockchain according to claim 1 is characterized in that: The method further comprises the steps of: Count the usage frequency of different versions of membership level rules and corresponding membership data within a preset time period; Calculate the query probability of each member level rule version and the corresponding member data according to the usage frequency; Comparing the queried probability with a preset probability threshold, and storing the member level rule versions and corresponding member data for which the queried probability is greater than or equal to the probability threshold in the distributed ledger in a complete manner; The member level rule version and corresponding member data whose query probability is less than the probability threshold are downsampled and stored in the first temporary blockchain.

4. The method for managing member lifecycle level points based on blockchain according to claim 1, characterized in that: The method further comprises the steps of: Count the usage frequency of different versions of membership level rules and corresponding membership data within a preset time period; Obtaining a preset data storage ratio, and calculating an initial cardinality of a complete storage set based on the data storage ratio and the total number of member level rule versions; The data storage ratio is used to control the retention degree of the member level rule version and the corresponding member data; Based on the initial cardinality of the complete storage set and the usage frequency, calculating the retained member level rule version and the range of the corresponding member data to form a target complete storage set; The member level rule versions and corresponding member data in the target complete storage set are stored in the distributed ledger in a complete manner, and the member level rule versions and corresponding member data not in the target complete storage set are downsampled and stored in the second temporary blockchain.

5. The method for managing member lifecycle level points based on blockchain according to claim 4, characterized in that: The method further comprises the steps of: According to the member level rule version and the corresponding member data in the target complete storage set, the latest member level status pool is generated for fast query and update.

6. The method for managing member lifecycle level points based on blockchain according to claim 4, characterized in that: The method further comprises the steps of: Setting a data expiration time for the downsampled data stored in the second temporary blockchain; When the data reaches the data expiration time, the downsampled data is automatically marked as expired data.

7. The method for managing member lifecycle level points based on blockchain according to claim 4, characterized in that: Based on the initial cardinality of the complete storage set and the usage frequency, calculating the retained member level rule version and the range of the corresponding member data specifically includes the following steps: Sort all versions of the membership level rules from high to low according to the usage frequency to obtain a sorted version sequence; Grouping the sorted version sequence, each group containing n consecutive versions, where n is a preset grouping coefficient; Calculate the cumulative usage frequency of each group as the corresponding weight value of each group; Sort all groups according to the weight values ​​from high to low; Calculate the retained member level rule version Y = N + β * (M - N) * Σ(wi / W), where Y is the number of versions to be retained first; N is the initial cardinality of the complete storage set; M is the total number of all member level rule versions; β is the preset retention weighting factor, 0≤β≤1; wi is the weight value of the i-th group; W is the sum of the weight values ​​of all groups; Obtain the member data corresponding to the retained member level rule version, and obtain the range of the retained member level rule version and the corresponding member data.

8. A member lifecycle level points management system based on blockchain, characterized in that: include: Blockchain node cluster, used to execute various operations of the blockchain system; A smart contract module, arranged in the blockchain node cluster, for storing multiple versions of membership level rules and corresponding access permission information, each version of the membership level rules corresponding to a version number; A request receiving module, used to receive a level change request sent by a user through a client, wherein the request includes a version number of the member level rule requested to be used and a user identity identifier; A rule acquisition module, used to acquire the target member level rule and target access permission information of the corresponding version number from the smart contract module based on the member level rule version number; An authority determination module, used to determine whether the user has the authority to use the requested target membership level rule based on the user identity and the target access permission information; A level update module, used to execute the rule logic corresponding to the target member level rule in the smart contract module and automatically perform member level update when the user has the authority to use the requested rule; The data writing module is used to write the updated membership level into the distributed ledger of the blockchain and record the membership level rule version number and the user identity.

9. An electronic device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the member lifecycle level points management method based on blockchain described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of blockchain-based member lifecycle level points management according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Method and device for accessing block chain data, electronic device, and storage medium

    CN109274752A

  • Storage method of block chain and node of block chain

    CN110738472A

  • Data management method and device, electronic equipment and readable storage medium

    CN111124952A

  • Data processing method in block chain node and related equipment

    CN113010115A

  • Data processing method and device based on node memory, equipment and medium

    CN113094396A

Cited By

  • Block chain distributed account book-based credit mall operation and maintenance credible auditing method

    CN121707643A