Dynamic right distribution method and device based on user contribution value, equipment and medium

By employing an event-driven architecture and cache-consistent computation, the problems of singular user contribution metrics and rigid equity configuration are resolved. This enables real-time dynamic adjustment and flexible allocation of user contribution values, enhancing the system's high-concurrency processing capabilities and scalability, and meeting the needs of large-scale commercial applications.

CN120807045BActive Publication Date: 2026-05-29QINGDAO BLUEPRINT THINK TANK INFORMATION TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
QINGDAO BLUEPRINT THINK TANK INFORMATION TECH CO LTD
Filing Date
2025-09-15
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing technologies have a single user contribution measurement mechanism, rigid rights and interests configuration, high latency in contribution data calculation and obvious throughput bottlenecks, long system response time, and difficulty in supporting the real-time rights and interests calculation needs in large-scale concurrent scenarios. In addition, the system architecture has poor scalability, which affects user experience and overall service availability.

Method used

It adopts an event-driven multi-level processing architecture, and through the construction of a dynamic adjustment mechanism for contribution value and a real-time proportion calculation system with cache consistency, it can achieve accurate quantification of user behavior and differentiated allocation of rights. Combined with an asynchronous message mechanism and a multi-level caching architecture, it supports real-time calculation and flexible rule configuration in high-concurrency scenarios.

Benefits of technology

It enables precise quantification of diverse user behaviors and real-time dynamic adjustment of contribution values, supports high concurrency demands of tens of millions of users, ensures high availability and flexibility of the system, and improves user experience and system scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120807045B_ABST
    Figure CN120807045B_ABST
Patent Text Reader

Abstract

The application discloses a kind of dynamic rights allocation method, device and equipment based on user contribution value and medium.The method is captured by front-end system user interaction behavior event, is forwarded to B system event hub after being verified and enhanced by A system, then asynchronously is delivered to message queue and is handled.Consumption end calculates contribution value variation according to dynamically configured rule base table, supports positive and negative adjustment of civilization contribution value and platform contribution value.System uses MySQL and Redis double storage architecture, and guarantees data consistency under high concurrency by atomic operation.Based on formula β (i)=U (i) / (G (t)-G (0)) Real-time calculation user contribution proportion, provide proportion type rights release, ladder type ranking empowerment, threshold type screening incentive Three allocation strategies.Through event-driven architecture and cache consistency algorithm, millisecond-level contribution value update and second-level proportion accounting are realized.The application solves the problems of single contribution measurement mechanism, rights allocation rigidity and calculation performance bottleneck in traditional integral system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of computer software and Internet technology, and in particular to a method, apparatus, device and medium for dynamic rights allocation based on user contribution values. Background Technology

[0002] With the rapid development of internet technology and the deepening of digital operation models, various platform applications have experienced explosive growth, and the ways in which users participate in platform activities are becoming increasingly diversified. In fields such as e-commerce, community services, and enterprise management, how to scientifically quantify user contributions and rationally allocate platform revenue has become a key issue in improving user activity and platform value. Traditional user incentive systems mostly adopt a static points model, that is, pre-set fixed points rules, where users earn points through specific behaviors and then redeem corresponding benefits with those points. This model could meet basic needs in the early stages of internet development, but with the expansion of user scale and the increasing complexity of business scenarios, its limitations have become increasingly apparent.

[0003] Existing user contribution evaluation systems generally suffer from three technical bottlenecks. First, the contribution measurement mechanism is too simplistic. Most systems only support simple cumulative scoring and lack the ability to flexibly adjust for multiple event types, contribution levels, and time periods. For example, they cannot distinguish between contributions to civilized behavior and contributions to platform business, cannot dynamically adjust contribution weights based on time periods, and cannot implement differentiated incentives based on users' historical performance. Second, the allocation of benefits exhibits rigid characteristics. The system's preset redemption rules are difficult to adapt to cross-incentive strategies and differentiated allocation logic in complex scenarios. When the platform needs to adjust the benefit allocation scheme according to operational strategies, it often requires modification of the underlying code, lacking flexible configuration management capabilities. Finally, contribution data calculation suffers from severe performance bottlenecks. Traditional real-time calculation solutions based on relational databases exhibit significant latency and throughput limitations when faced with high-frequency user behavior triggers, making it difficult to support the real-time benefit calculation needs of large-scale concurrent scenarios.

[0004] Furthermore, existing technologies suffer from numerous shortcomings in system architecture design. Most systems employ a synchronous processing model, tightly coupling user behavior triggering with contribution value calculation and rights allocation, resulting in long system response times and poor user experience. Regarding data consistency, the lack of an effective distributed transaction processing mechanism easily leads to data inconsistency issues in high-concurrency scenarios. In terms of fault tolerance, the strong dependencies between system components mean that single-point failures can easily trigger cascading effects, impacting overall service availability. Regarding scalability, traditional architectures struggle to support horizontal scaling; system performance degrades drastically when the user base reaches tens of millions. These technical deficiencies severely restrict the promotion and implementation of user incentive systems in large-scale commercial applications. Summary of the Invention

[0005] The purpose of this invention is to provide a method, apparatus, device, and medium for dynamic rights allocation based on user contribution values, in order to solve the technical problems existing in the prior art, such as a single contribution measurement mechanism, rigid rights allocation, high latency in contribution data calculation, and obvious throughput bottlenecks, so as to achieve accurate quantification of diversified user behaviors, real-time dynamic adjustment of contribution values, and differentiated intelligent allocation of rights.

[0006] To achieve the above objectives, the present invention provides the following technical solution:

[0007] Firstly, this invention provides a dynamic rights allocation method based on user contribution values. This method automates the entire process from user behavior capture to rights allocation by constructing an event-driven multi-level processing architecture. The core of the method lies in establishing a complete dynamic adjustment mechanism for contribution values ​​and a real-time percentage calculation system based on cache consistency.

[0008] Specifically, this method first captures multi-dimensional user interaction events in real time through the front-end system, including but not limited to actions such as liking, checking in, reporting, content uploading, and payment collection. Each event type is marked with a unique event identifier, such as "QD" for checking in and "SDZF" for payment collection. When a user triggers a specific action, the front-end system constructs a request body containing core information such as user identifier, event identifier, and trigger timestamp, and sends it to the access layer of system A.

[0009] System A, acting as the access gateway, is responsible for request verification, parameter validation, and message enhancement. The system not only verifies the legitimacy of the user's identity but also appends contextual data such as user profile information, device fingerprints, and geographic location, encapsulating the original request into a standardized message body containing complete business semantics. This message enhancement mechanism ensures that subsequent processing stages have sufficient decision-making basis.

[0010] The standardized message body is then forwarded to the event hub of System B. System B first performs an idempotency check, using the message's unique identifier to prevent abnormal accumulation of contribution values ​​caused by duplicate events. After the check passes, System B serializes the message and asynchronously delivers it to a highly reliable message queue, thus decoupling request reception from business processing and significantly improving the system's concurrent processing capabilities.

[0011] The message queue consumer uses a consumer group model for concurrent consumption, improving processing efficiency through a batch retrieval strategy. After parsing the message body, the consumer queries a pre-configured rule base table, which maintains the mapping relationship between events and contribution value adjustment rules. Rule configuration supports high flexibility, including multi-dimensional parameters such as contribution value type (civilization contribution value or platform contribution value), adjustment value (supporting positive increases and negative deductions), activation conditions, cooldown period, trigger threshold, and points cap.

[0012] Based on the matched rules, the system calculates the final change in contribution value using a rule engine. The calculation process considers complex business logic, such as the validity of the first sign-in within 24 hours, additional rewards for consecutive sign-ins, and deductions for violations. After calculation, the system simultaneously updates the user contribution value detail table and summary table via database transactions to ensure strong data consistency.

[0013] To support real-time query requirements in high-concurrency scenarios, the system adopts a dual-storage architecture of MySQL and Redis. While the database is being written to, Lua scripts ensure the atomicity of Redis cache updates, executing updates to individual user contribution values ​​and global contribution values ​​within the same transaction. This design avoids potential data inconsistency issues under extremely high concurrency (10,000 requests per second).

[0014] The calculation of contribution percentage is the core basis for the allocation of benefits. The system initializes the activity by saving a snapshot of the global contribution value as the initial base value G(0). As user behavior continues to trigger, the current global contribution value G(t) is updated in real time. Each user's contribution percentage is calculated using the formula β(i) = U(i) / (G(t) - G(0)), where U(i) represents the cumulative contribution value of user i during the activity period. This incremental calculation method ensures accuracy while avoiding interference from historical data in the current activity.

[0015] In the rights and benefits allocation process, the system provides three differentiated allocation strategies to adapt to different business scenarios. The percentage-based rights and benefits release strategy is suitable for profit-sharing scenarios. The system calculates the user's due benefit R(i) = R × β(i) based on each user's contribution percentage β(i) and the total distributable benefit R. The tiered ranking-based weighting strategy is for allocating scarce rights and benefits. It uses Redis sorted sets to achieve millisecond-level ranking calculations, granting special rights and benefits to users with higher rankings. The threshold-based screening incentive strategy sets a fixed contribution value threshold; when a user's contribution value reaches a specific threshold, rights and benefits are automatically triggered.

[0016] To ensure high system availability, the method also includes robust fault tolerance mechanisms. When the Redis caching service becomes unavailable, the system automatically degrades to direct read / write operations with MySQL. When the rules engine malfunctions, default rules are enabled to ensure basic functionality continues to operate normally. For message processing failures, the system employs an exponential backoff strategy for retries, retrying a maximum of five times before entering a dead-letter queue for manual intervention.

[0017] Secondly, this invention provides a dynamic rights allocation device based on user contribution values, including a behavior event capture module, a message processing module, a message queue module, a rule engine module, a data storage module, and a rights allocation module. These modules work collaboratively to achieve dynamic management of contribution values ​​and intelligent allocation of rights.

[0018] Thirdly, the present invention provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and the processor executes the program to implement the above-described method.

[0019] Fourthly, the present invention provides a computer-readable storage medium storing a computer program that, when executed, implements the above-described method.

[0020] Through an event-driven architecture and flexible rule configuration, it supports the accurate quantification of multi-dimensional user behavior, and can dynamically adjust the points rules according to business needs. It supports a complex incentive system that combines positive incentives and negative constraints. By adopting an asynchronous message mechanism and batch processing strategy, coupled with a multi-level caching architecture, it achieves millisecond-level points updates and second-level percentage calculations, and can support 100,000 query requests per second and 10,000 update requests per second, meeting the high concurrency needs of tens of millions of users.

[0021] Redis atomic operations and database transaction mechanisms ensure the accuracy of contribution value data under extremely high concurrency scenarios. Regularly executed audit and reconciliation mechanisms further enhance data reliability. Three equity allocation strategies can be used individually or in combination, achieving both fair allocation based on contribution percentage and meeting the differentiated configuration needs of scarce resources, thus adapting to diverse business scenarios.

[0022] A robust fault tolerance and degradation mechanism, along with a message retry strategy, ensures that the system can still provide basic services even when some components fail. A comprehensive end-to-end tracing and monitoring system facilitates problem localization and system optimization; the modular system architecture and standardized message formats facilitate the integration of new features and the upgrading of older features. Configuration-based rule management reduces system maintenance costs and improves business adaptability. Attached Figure Description

[0023] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only for this invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0024] Figure 1 This is a schematic diagram of the dynamic adjustment process of the contribution value in this invention;

[0025] Figure 2This is a schematic diagram illustrating the calculation of the contribution percentage of this invention;

[0026] Figure 3 This is a schematic diagram of the system architecture of the present invention;

[0027] Figure 4 This is a schematic diagram illustrating the three rights allocation strategies of the present invention. Detailed Implementation

[0028] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. It should also be noted that, to make the embodiments more comprehensive, the following embodiments are the best and preferred embodiments, and those skilled in the art can use other alternative methods to implement some well-known technologies; moreover, the accompanying drawings are only for more specific description of the embodiments and are not intended to specifically limit the present invention.

[0029] It should be noted that the use of terms such as "an embodiment," "an embodiment," "an exemplary embodiment," and "some embodiments" in the specification indicates that the described embodiment may include a specific feature, structure, or characteristic, but not every embodiment necessarily includes that specific feature, structure, or characteristic. Furthermore, when a specific feature, structure, or characteristic is described in connection with an embodiment, implementing such a feature, structure, or characteristic in conjunction with other embodiments (whether explicitly described or not) should be within the knowledge of those skilled in the art.

[0030] Generally, terms can be understood at least partly from their use in context. For example, depending at least partly on the context, the term "one or more" as used herein can be used to describe any feature, structure, or characteristic in a singular sense, or a combination of features, structures, or characteristics in a plural sense. Additionally, the term "based on" can be understood not necessarily to convey an exclusive set of factors, but rather, alternatively, depending at least partly on the context, to allow for the presence of other factors that are not necessarily explicitly described.

[0031] See Figures 1 to 4 As shown

[0032] This invention provides a method, apparatus, device, and medium for dynamic rights allocation based on user contribution values. The technical solution of this invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0033] Example 1: Specific implementation of dynamic adjustment of contribution value:

[0034] This embodiment details the complete implementation process from user behavior event triggering to contribution value update. The system pre-configures a dynamic rule base table, containing parameters such as event codes, contribution value types, and adjustment weights for various events. For example, the sign-in event corresponds to the event code "QD," which can be configured to add 5 platform contribution values; the report of illegal content corresponds to the event code "JB," which can be configured to add 10 civility contribution values; while publishing illegal content may trigger a negative incentive of deducting 20 platform contribution values. When a user performs a sign-in operation, the front-end system recognizes the action and constructs a request body, including basic information such as the user ID (e.g., user_123456), the event code "QD," and the trigger timestamp, and initiates an interface call to the access layer of system A. After receiving the request, System A performs authentication and parameter verification, and attaches contextual data such as user profile information, device fingerprint, and geolocation, assembling it into a standardized message body: {userId:"user_123456",eventCode:"QD",timestamp:1719900000,deviceId:"device_abc",location:"Beijing Chaoyang District",extra:{...}}. System A then forwards this message body to System B's event hub via HTTP / RPC. System B, as the message processing hub, first performs idempotency verification on the message to prevent abnormal accumulation of contribution values ​​due to duplicate events. Then, it serializes the message and delivers it to a highly reliable message queue, such as a specific topic in RocketMQ.

[0035] The message queue consumer uses a consumer group model for concurrent consumption. Each consumer instance pulls messages from the queue in batches, with a batch size configured to 100-500 messages. After parsing the message body, it queries the corresponding rule configuration. The rule engine matches the rule table based on the event identifier code to obtain the contribution value adjustment parameters for that event, including contribution value type, civilization contribution value or platform contribution value, adjustment value, effective conditions, and cooldown period. For example, the rules for a sign-in event might include complex logic such as: only the first sign-in within 24 hours is valid, and an extra 20 contribution points are awarded for 7 consecutive sign-ins. The consumer calculates the final contribution value change based on the rules and simultaneously updates the user contribution value detail table and summary table through database transactions to ensure data consistency. If message processing fails, the system will re-deliver the message to the delayed queue and retry according to an exponential backoff strategy, such as 1 second, 5 seconds, and 30 seconds, with a maximum of 5 retries before it enters the dead-letter queue for manual processing.

[0036] Example 2: Real-time calculation of contribution ratio in high-concurrency scenarios:

[0037] This embodiment focuses on how to achieve real-time and accurate calculation of contribution value proportions in a high-concurrency environment. The system uses MySQL to store persistent data of contribution values, and uses a Redis caching layer to implement high-frequency read and write operations. At the start of the activity, the system executes an initialization process: First, it calculates the sum of the contribution values ​​of all users at the current moment from the MySQL database as the initial base value. For example, the total contribution value of the entire platform at 0:00 on June 1, 2025 is 1,000,000. This value will be stored in a specific key in Redis, such as contribution:baseline:202506. At the same time, two key cached data structures are initialized: a global contribution value counter (contribution:total:202506) and a hash table of individual user contribution values ​​(contribution:user:202506).

[0038] When a user triggers a contribution value change event, the system uses Lua scripts to ensure the atomicity of Redis operations. For example, if user A completes a payment transaction worth 100 yuan, according to the rules, 50 platform contribution values ​​should be added. The system will execute the following within the same Redis transaction: `HINCRBYcontribution:user:202506userA50` (adding user A's contribution value) and `INCRBYcontribution:total:20250650` (adding the global contribution value). This atomic operation ensures strong data consistency under extremely high concurrency (100,000 requests per second). The system uses scheduled tasks to batch synchronize incremental data from Redis to MySQL every minute, employing batch insert and update strategies to reduce database pressure.

[0039] The contribution percentage is calculated using the following formula:

[0040] User contribution percentage β(i) = U(i) / (G(t) - G(0));

[0041] Where U(i) represents the cumulative contribution value of user i during the activity, G(t) represents the total global contribution value at the current moment, and G(0) represents the initial base value at the start of the activity. For example, when the activity reaches day 15, the global contribution value reaches 5,000,000, and user A's contribution value is 20,000, then its proportion is: 20,000 / (5,000,000-1,000,000)=0.5%.

[0042] To support real-time ranking, the system uses Redis's sorted set data structure, with contribution value as the score and user ID as the member. Ranking queries are performed in O(logN) complexity using the ZADD and ZREVRANK commands. A reasonable cache expiration time (e.g., 5 minutes) and a preheating mechanism are also set to avoid cache avalanche issues.

[0043] Example 3: Implementation of a multi-dimensional rights and interests allocation strategy:

[0044] This embodiment details the implementation of three equity distribution strategies. The first is the percentage-based equity release strategy, suitable for scenarios such as platform revenue sharing. Assume the platform generated 1 million yuan in distributable revenue in June 2025. The system distributes the revenue based on each user's contribution percentage. The specific calculation process is as follows: First, obtain the total incremental contribution value during the activity period (e.g., 4,000,000). Then, calculate the deserved revenue for each participating user. User A's contribution value is 20,000, representing 0.5%, and their deserved revenue is 1 million × 0.5% = 5,000 yuan. The system performs the calculation uniformly after the activity ends through batch processing tasks, generates an allocation list, and pushes it to the financial system for payment.

[0045] Secondly, a tiered ranking and weighting strategy is used primarily for allocating scarce benefits. For example, the "green channel" benefit is only available to the top 1000 users in terms of contribution value. The system performs a ranking snapshot at 2 AM daily, persistently storing the ranking results and notifying eligible users via push notifications. Benefit activation employs a list synchronization mechanism, pushing a list of eligible user IDs to partner systems to ensure timely activation. For users on the borderline of their ranking, such as those ranked 990-1010, the system sends reminder messages to incentivize them to increase their contribution value.

[0046] The third approach is a threshold-based incentive strategy, which sets a fixed contribution value threshold to allocate benefits. For example, a contribution value of 5000 points grants VIP privileges on the platform, while 10000 points grants priority registration for offline events. The system uses a trigger mechanism to achieve real-time benefit distribution: when a user's contribution value crosses the threshold, the benefit distribution process is immediately triggered, including updating the user's benefit status, sending a notification message, and synchronizing with relevant business systems. To prevent benefit abuse, the system also implements benefit expiration management, periodically checking and revoking expired benefits.

[0047] Example 4: System Fault Tolerance and Performance Optimization Scheme:

[0048] This embodiment illustrates the system's fault tolerance mechanism and performance optimization scheme in actual operation. Regarding fault tolerance design, the system employs a multi-level degradation strategy: when the Redis cache is unavailable, it automatically degrades to direct MySQL read / write, ensuring service availability despite performance degradation; when the message queue is blocked, a local buffer queue is used to temporarily store messages, which are then resent in batches after recovery; when the rule engine malfunctions, default rules are used to ensure basic functions function normally. The system also implements a comprehensive monitoring and alarm mechanism, including alarms for abnormal fluctuations in contribution values, such as a single user's daily contribution value exceeding a threshold; system performance alarms, such as a Redis hit rate below 80%; and business metric alarms, such as an abnormal decrease in daily active users.

[0049] In terms of performance optimization, the system employs multiple strategies to enhance processing capabilities. At the database level, it supports tens of millions of user data entries through database sharding and table partitioning, and uses user ID hashing for data partitioning, while establishing composite indexes to optimize query performance. At the caching level, it adopts a multi-level caching architecture, with local caching storing hot data and distributed caching storing all data. At the message processing level, it achieves horizontal scaling by adding consumer instances and improves throughput through batch consumption and asynchronous processing. After optimization, the system can support 10,000 contribution value query requests and 10,000 contribution value update requests per second, meeting the business needs of large-scale platforms.

[0050] To verify the system's accuracy, a contribution value auditing mechanism was also implemented. The system periodically, for example, performs a reconciliation task at midnight each day, comparing the contribution value data in the Redis cache and the MySQL database. If inconsistencies are found, the system automatically corrects them and records the discrepancies in the audit log. A full-chain tracking function for contribution value changes is also provided, generating a unique tracking ID for each change, facilitating troubleshooting and handling user complaints.

[0051] Example 5: Expanding Application Scenarios:

[0052] This embodiment demonstrates the extended applications of the invention in different business scenarios. In an e-commerce platform scenario, the system maps user purchase behavior, review behavior, and sharing behavior to different contribution values, with the purchase amount converted into platform contribution values ​​proportionally. For example, spending 1 yuan earns 1 contribution value, and positive reviews earn additional civilization contribution values. The platform uses a portion of its advertising revenue as a reward pool, distributing it to users according to their monthly contribution percentage, thus creating a positive cycle between user growth and platform revenue.

[0053] In community governance scenarios, the system supports a more complex contribution value system. Residents earn civilization contribution points by participating in activities such as garbage sorting, volunteering, and neighborhood mutual assistance, and platform contribution points by participating in community voting and providing feedback. Contribution points are not only used for material rewards but are also linked to priority in community services; for example, residents with high contribution points can have priority access to community activity rooms and priority registration for community activities. The system also supports seasonal adjustments to contribution values, such as increasing the weight of snow shoveling contributions in winter and increasing the weight of water conservation contributions in summer.

[0054] In enterprise management scenarios, this system is transformed into an employee contribution evaluation system. Employees' overtime hours, project participation, knowledge sharing, teamwork, and other behaviors are converted into contribution points, which are used for year-end bonus allocation, promotion evaluation, and training opportunity allocation. The system supports both departmental independent accounting and company-wide unified accounting modes to meet different management needs. A visual dashboard displays real-time rankings of departmental and individual contribution points, fostering a positive and proactive work environment.

[0055] As can be seen from the above embodiments, the dynamic rights and interests allocation method based on user contribution values ​​provided by the present invention has the following technical advantages: First, it achieves refined and real-time management of contribution values, supporting a complex rule system that combines positive incentives and negative constraints; Second, through an event-driven architecture and asynchronous message mechanism, it achieves high concurrency and low latency contribution value processing capabilities, supporting a user scale of tens of millions; Third, it adopts a cache consistency algorithm and incremental calculation strategy to ensure the accuracy and real-time performance of contribution ratio calculation; Fourth, it provides flexible and diverse rights and interests allocation strategies that can adapt to the incentive needs of different business scenarios; Fifth, a sound fault tolerance mechanism and performance optimization scheme ensure the high availability and scalability of the system.

[0056] This invention not only solves the technical bottlenecks of traditional points systems, but also provides a complete technical solution for building a new generation of user incentive platforms through innovative architecture design and algorithm optimization. With the deepening development of digital operations, this technical solution will play an important role in more fields, promoting a two-way increase in user engagement and platform value.

[0057] This invention encompasses any substitutions, modifications, equivalent methods, and solutions made within the spirit and scope of this invention. To provide the public with a thorough understanding of this invention, specific details are described in detail in the following preferred embodiments; however, those skilled in the art will fully understand the invention even without these details. Furthermore, to avoid unnecessary misunderstanding of the essence of this invention, well-known methods, processes, procedures, components, and circuits are not described in detail.

[0058] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A dynamic rights allocation method based on user contribution values, characterized in that, Includes the following steps: S1: The front-end system identifies the interactive behavior event triggered by the user, constructs a request body containing the user identifier, event identifier code and trigger timestamp, and sends it to the access layer of system A; The S2:A system authenticates and validates the request, adds user profile information, device fingerprint and geolocation data, and assembles it into a standardized message body. S3: System A forwards the standardized message body to the event hub of System B. After System B performs idempotency verification, it serializes the message and delivers it to the message queue. S4: The consumer pulls messages in batches from the message queue, parses the message body, queries the rule base table, and adjusts the parameters according to the corresponding contribution value matched by the event identifier code. S5: Calculates the change in contribution value based on the rule engine, updates the user contribution value detail table and summary table through database transactions, and uses Redis atomic operations to execute the HINCRBY command to update the user's personal contribution value hash table and the INCRBY command to update the global contribution value counter in the same transaction through Lua scripts in the same transaction. S6: The system calculates the user contribution percentage according to the formula β(i)=U(i) / (G(t)-G(0)), where U(i) is the cumulative contribution value of user i, G(t) is the current global contribution value, and G(0) is the initial base value of the activity; S7: Based on the preset rights and benefits allocation strategy, including percentage-based rights and benefits release, tiered ranking empowerment, and threshold-based screening incentives, distribute corresponding rights and benefits to eligible users. S8: When message processing fails, the message is re-delivered to the delay queue and retried according to the exponential backoff strategy of 1 second, 5 seconds, and 30 seconds. After a maximum of 5 retries, the message is entered into the dead letter queue. S9: Implement fault tolerance and degradation mechanisms: When the Redis cache is unavailable, degrade to direct read and write to the MySQL database; when the message queue is blocked, enable the local buffer queue to temporarily store messages; when the rule engine is abnormal, enable the default rules to ensure the operation of basic functions.

2. The method according to claim 1, characterized in that, The rule base table includes parameters such as event identifier code, contribution value type, adjustment value, effective conditions, cooldown period, and points limit. The contribution value type includes civilization contribution value and platform contribution value, and the adjustment value supports positive value increase and negative value deduction.

3. The method according to claim 1, characterized in that, The implementation of the percentage-based equity release strategy includes: Obtain the total incremental contribution value ΔG during the activity period; Calculate the contribution percentage β(i) for each user; Based on the total distributable income R, calculate the income that user i should receive, R(i) = R × β(i); Generate an allocation list and push it to the financial system for execution.

4. The method according to claim 1, characterized in that, The tiered ranking and weighting strategy is implemented using a Redis ordered set data structure. Contribution value is used as score, user identifier is used as member, and ranking is calculated using the ZADD and ZREVRANK commands. A ranking snapshot is taken every day at midnight and stored persistently.

5. A dynamic rights allocation device for implementing the dynamic rights allocation method based on user contribution value according to any one of claims 1 to 4, characterized in that, include: The behavior event capture module is used to identify user-triggered interactive behavior events, construct a request body containing user identifier, event identifier code and trigger timestamp, and send it to the access layer of system A. The message processing module is used by System A to authenticate and validate requests, attach user profile information, device fingerprints and geolocation data, and assemble them into a standardized message body. The message queue module is used by system A to forward standardized message bodies to the event hub of system B. After system B performs idempotency verification, it serializes the message and delivers it to the message queue. The rules engine module is used to pull messages in batches from the message queue, parse the message body, query the rule base table, and adjust the parameters according to the corresponding contribution value matched by the event identifier code. The data storage module is used to update the user contribution value detail table and summary table through database transactions. At the same time, Redis atomic operations are used to execute the HINCRBY command to update the user's individual contribution value hash table and the INCRBY command to update the global contribution value counter in the same transaction through Lua script. The user contribution ratio is calculated according to the formula β(i)=U(i) / (G(t)-G(0)), where U(i) is the cumulative contribution value of user i, G(t) is the current global contribution value sum, and G(0) is the initial base value of the activity. The rights and benefits allocation module is used to distribute corresponding rights and benefits to eligible users according to preset rights and benefits allocation strategies, including percentage-based rights and benefits release, tiered ranking empowerment, and threshold-based screening incentives.

6. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-4.

7. A computer-readable storage medium, characterized in that, The device contains a computer program that, when executed by a processor, implements the method as described in any one of claims 1-4.