A service rule hot updating method and system based on quantitative analysis and dynamic arbitration
By employing a business rule hot update method that combines quantitative analysis and dynamic arbitration, the problems of service interruption, data inconsistency, and uncontrollable risks during the business rule update process are resolved, thus achieving efficient and reliable business rule iteration.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 山东齐鲁壹点传媒有限公司
- Filing Date
- 2026-02-06
- Publication Date
- 2026-06-02
AI Technical Summary
Existing technologies struggle to simultaneously ensure uninterrupted service, strong data consistency, and low-risk deployment during business rule updates, leading to wasted computing resources and decreased service performance.
A business rule hot update method based on quantitative analysis and dynamic arbitration is adopted. The influence strength of changes is calculated through a pre-built rule influence strength network to generate incremental recalculation tasks. A distributed arbitration computing cluster and a closed-loop grayscale controller are used to achieve precise triggering and risk-adaptive release.
It enables efficient and accurate changes to business rules without interrupting online services, reducing computational load, improving system response speed, mitigating risk impact, and ensuring data consistency and controllability of release.
Smart Images

Figure CN122132066A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer software technology, specifically to a method and system for hot updating business rules based on quantitative analysis and dynamic arbitration. It is particularly suitable for scenarios such as e-commerce, finance, and advertising that require high-frequency, low-risk updates of business rules. Typical applications include iterating product rating rules on e-commerce platforms and optimizing financial credit risk control rules. Background Technology
[0002] In modern internet business, the flexibility and speed of business rule iteration are crucial. Traditional business rule update solutions often face an "impossible triangle" dilemma: it is difficult to simultaneously ensure uninterrupted service, strong data consistency, and low-risk deployment.
[0003] Existing technologies mainly include the following solutions, each with significant drawbacks: Full recalculation solution: After the new rules are released, all historical data in the system is recalculated. Although this solution can guarantee data consistency, it consumes huge amounts of computing resources (CPU peak can reach 90%), and the calculation process may last for several hours. During this period, service performance is severely degraded or even interrupted, which cannot meet the requirements of a high-availability system.
[0004] The incremental approach based on simple dependencies establishes a simple dependency graph between data fields and business metrics. When a dependent field changes, the corresponding metric is recalculated. The drawback of this approach is that the dependency relationship is Boolean (yes / no), making it impossible to quantify the impact of changes. This leads to numerous minor, unimportant changes (such as adding a simple comment) triggering recalculations, resulting in over 70% redundant calculations. This not only wastes resources but can also cause online service response delays (P99 latency can reach hundreds of milliseconds) due to the accumulation of computational tasks.
[0005] Static canary rollout solution: After a new rule goes live, user traffic is gradually increased according to a preset, fixed schedule (e.g., increasing traffic by 10% every hour). This solution lacks real-time awareness of the online operational status. If the new rule has flaws, its negative impact will passively spread as the traffic ratio increases, and the time from discovering the problem to manual intervention and rollback is usually long (e.g., more than 20 minutes). The impact of the failure may eventually cover all users, and the risk is uncontrollable.
[0006] Therefore, the industry urgently needs a business rule hot update technology that can accurately judge the impact, ensure calculation consistency, and intelligently control release risks, so as to achieve rule iteration at the minute level, with high reliability and resource friendliness. Summary of the Invention
[0007] To address the shortcomings of existing technologies, this invention proposes a business rule hot update method and system based on quantitative analysis and dynamic arbitration. Its core objective is to achieve precise triggering of business rule changes, distributed strong consistency calculation, and risk-adaptive canary release based on real-time feedback without interrupting online services or requiring global data recalculation, thereby effectively solving the aforementioned "impossible triangle" problem.
[0008] To achieve the above objectives, a business rule hot update method based on quantitative analysis and dynamic arbitration is proposed, with the following specific technical solution: In a first aspect, the present invention provides a business rule hot update method based on quantitative analysis and dynamic arbitration, comprising the following steps: S10. In response to a change event in the source data, calculate the intensity value of the affected business indicators based on a pre-built rule influence intensity network; the rule influence intensity network is a directed weighted graph, whose nodes include business field nodes and business indicator nodes, and the edge weights represent the influence weights of the business fields on the business indicators. S11. If the intensity value exceeds the preset intensity threshold, an incremental recalculation task is generated for the corresponding data record. S12. Based on the unique identifier of the data record, the incremental recalculation task is routed to a preset fixed arbitration node subset in the distributed computing cluster for execution using a consistent hashing algorithm. The arbitration node subset contains K computing nodes, where K is an odd number greater than or equal to 3. The calculation results of each node in the subset are aggregated, and the final result is determined through a preset arbitration mechanism. S13. The final result and the old rule calculation result are stored as dual-version data, and the gray release ratio is dynamically adjusted through the feedback controller based on the real-time risk indicators collected during the gray release process.
[0009] Further, the calculation of the intensity value in step S10 specifically includes: S101. For each business field i involved in the change event, calculate its normalized change amount Δx_i; S102. Calculate the sensitivity output value μ_i(Δx_i) of the field according to the preset change sensitivity function μ_i(); the sensitivity function is a piecewise linear function with a perception threshold a_i and a saturation threshold b_i; S103. Calculate the intensity value of index j S_j = Σ (ω_ij * μ_i(Δx_i)) based on the influence weight ω_ij of field i in the predefined field i in the influence intensity network.
[0010] Furthermore, the normalized change amount Δx_i is calculated as follows: Δx_i = |value after change - value before change| / total number of data records to which the field belongs after the change.
[0011] Furthermore, the arbitration mechanism in step S12 includes: Calculate the difference δ of the calculation results of each node in the fixed arbitration node subset; If δ does not exceed the preset fault tolerance range ε, then the arithmetic mean of the calculation results of each node will be used as the final result; If δ exceeds ε, then weighted voting is performed based on the real-time load status of each node to determine the final result, and the voting weight of a node is inversely proportional to its load.
[0012] Furthermore, the real-time load status of the node is characterized by CPU utilization, and the voting weight of node k is w_k = (1 / u_k) / , where u_k is the CPU utilization of node k, and K is the total number of nodes.
[0013] Furthermore, the dynamic adjustment of the grayscale release ratio in step S13 includes: S131. Periodically collect multiple risk indicators under the current grayscale traffic and calculate the comprehensive risk score R(t); S132. Input the difference e(t) between the target risk score R_target and R(t) into the PID controller to obtain the gray scale adjustment amount ΔP(t); S133. Based on the risk range of R(t) and ΔP(t), execute the corresponding proportional adjustment strategy; the risk range includes at least a safe range, a warning range, and a danger range.
[0014] Furthermore, the risk indicators include at least two of the following: the deviation rate between the calculation results of the new rules and the old rules, the system service response time, and the business error rate.
[0015] Furthermore, it also includes an automatic rollback step: when the comprehensive risk score R(t) exceeds the threshold of the danger zone M times consecutively, the grayscale release ratio is automatically reduced to zero, and an alarm and abnormal data cleanup are triggered.
[0016] Furthermore, the distributed computing cluster is a bypass computing cluster isolated from the main business system, which holds a data copy that is eventually consistent with the data source of the main business system through a change data capture (CDC) mechanism.
[0017] In a second aspect, the present invention provides a business rule hot update system based on quantitative analysis and dynamic arbitration, used to implement any of the methods described in the first aspect, the system comprising: The event capture and standardization module is used to capture changes in source data and generate standardized events; The rule impact strength analysis engine is used to calculate the strength value of business indicators and perform threshold filtering based on the standardized events and the pre-set rule impact strength network. The task scheduling and routing module is used to create incremental recalculation tasks for selected high-impact data records and route them to a specific subset of computing nodes based on the consistent hashing algorithm. A distributed arbitration computing cluster, comprising multiple computing nodes, is used to execute the recalculation task in parallel and output the final result through an arbitration mechanism. The dual-version data storage module is used to store and manage the calculation results of business rules in both the old and new versions; A closed-loop grayscale controller is used to collect risk indicators during the release process and dynamically adjust the proportion of traffic flowing to new rules through a feedback control algorithm. The monitoring and automated operation and maintenance module is used to monitor the system status and trigger alarms or automatically roll back when an anomaly occurs. Attached Figure Description
[0018] Figure 1 This is a schematic diagram of the method flow of the present invention.
[0019] Figure 2 This is a system schematic diagram of the present invention.
[0020] Figure 3 This is a schematic diagram of the pre-constructed rule influence strength network of the present invention. Detailed Implementation
[0021] The technical solutions in the embodiments of the present invention are clearly and completely described in the following description. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention. Example
[0022] like Figure 1 The diagram shown is a schematic representation of a business rule hot update method based on quantitative analysis and dynamic arbitration in an embodiment of the present invention. The method includes: Step S10: Quantification and screening of the impact intensity of the change.
[0023] In response to change events (such as INSERT and UPDATE) in source data (such as product review tables), the system calculates the impact strength of this change on relevant business metrics (such as product ratings) based on a pre-built rule impact strength network.
[0024] The rule influence strength network is a directed weighted graph G(V, E, W). Wherein: The node set V contains two types of nodes: business field nodes (such as F1: number of positive reviews) and business indicator nodes (such as I: product rating).
[0025] The set of directed edges E represents the direct influence of a field on an indicator. An edge e_ij indicates that a change in field i directly affects indicator j.
[0026] The weight set W defines the weight ω_ij of each edge e_ij, representing the degree of influence of field i on index j. For an index node j, the sum of the weights of all edges pointing to it is 1, i.e. =1.
[0027] The network supports configuration and updates via a visual interface.
[0028] The specific sub-steps for calculating the affected intensity value S_j are as follows: S101: Calculate the normalized change amount. For each field i involved in the change event, calculate its normalized change amount Δx_i. In a preferred embodiment, Δx_i = |value after change - value before change| / total cardinality of the data records to which the field belongs after the change. For example, for the "number of positive reviews" field, if it changes from 400 to 600, and the total number of reviews for its products changes from 500 to 700, then Δx_number of positive reviews = |600-400| / 700 = 200 / 700 ≈ 0.2857. This step eliminates the influence of the units of absolute values, making the impact of changes on different fields comparable.
[0029] S102: Calculate change sensitivity. A change sensitivity function μ_i(Δx) is predefined for each field i. This function is a piecewise linear function; in this example, it includes three intervals: Non-sensitive region: When Δx_i ≤ a_i, μ_i(Δx_i) = 0. Here, a_i is the perception threshold, representing a change that is small to negligible.
[0030] Linear sensitive area: When a_i < Δx_i < b_i, μ_i(Δx_i) = (Δx_i - a_i) / (b_i -a_i). Where b_i is the saturation threshold.
[0031] Saturation zone: When Δx_i ≥ b_i, μ_i(Δx_i) = 1.
[0032] The parameters a_i and b_i can be configured according to business needs. For example, a_i can be set to 0.1 and b_i to 0.5.
[0033] S103: Calculate the overall intensity value. For business indicator j, its impact intensity value S_j is obtained by weighted summation of the sensitivity outputs of all relevant fields: S_j = Let n be the total number of fields that directly affect indicator j, and for each indicator j, satisfy the following condition: =1.
[0034] Step S11: High-impact task generation and routing.
[0035] The calculated intensity value S_j is compared with a globally configurable intensity threshold λ. Only when S_j > λ is the change deemed a "high-impact change," and an incremental recalculation task is generated for the corresponding data record (identified by the business primary key, such as a product ID). This step filters out most low-impact changes, significantly reducing computational load. For example, in e-commerce rating scenarios, the amount of data requiring recalculation can be reduced from 100% to below 15%.
[0036] Step S12: Distributed arbitration computation.
[0037] S121: Consistent Hash Routing. Based on the unique business primary key of the data record associated with the incremental recalculation task, the system uses a consistent hashing algorithm (e.g., calculating MD5 (business primary key) mod N, where N is the number of virtual nodes in the hash ring) to route the task to a pre-defined fixed subset of arbitration nodes in a dedicated distributed arbitration computing cluster. This subset contains K computing nodes, where K is a pre-configured odd number greater than or equal to 3 (e.g., K=5) to ensure the validity of subsequent voting arbitration. The key point is that tasks with the same business primary key are always routed to the same subset of nodes, which provides a foundation for consistent data computation.
[0038] S122: Parallel Execution. The selected K nodes, acting as arbitration group members, execute the same recalculation task in parallel and independently: obtaining the complete and up-to-date state of the data record from a bypass data copy isolated from the online business database, and applying the new version of the business rules for calculation. The bypass data copy maintains eventual consistency with the primary database through Change Data Capture (CDC) technology.
[0039] S123: Load-aware result arbitration. After all nodes have completed their calculations, the results from each node are aggregated {v_1, v_2,..., v_K}.
[0040] First, a quick consistency check is performed: the difference δ of the results is calculated, for example, δ = (max(v_k) - min(v_k)) / mean(v_k). If δ ≤ ε (ε is a preset fault tolerance range, for example, 1%), then the calculation results of each node are considered to be highly consistent, and the arithmetic mean of all results is directly used as the final arbitration result v_final.
[0041] If δ > ε, then load-aware weighted voting arbitration is initiated. A real-time weight w_k is assigned to each arbitration node k. This weight is negatively correlated with the node's current load state (i.e., the lighter the load, the higher the weight). A preferred implementation normalizes the weight based on the reciprocal of node k's current CPU utilization u_k: w_k = (1 / u_k) / The final arbitration result is v_final = This mechanism tends to trust nodes with lighter loads and more stable operating environments when calculation results differ, thus improving the robustness and reliability of the arbitration results.
[0042] Step S13: Dual-version storage and closed-loop canary release.
[0043] S131: Dual-version persistence. The final result obtained from the arbitration in step S123 (i.e., the calculation result of the new rule) and the calculation result of the data record under the old rule are stored together as dual-version data. The storage system can adopt a hybrid architecture, for example, persisting all historical version data in a MySQL database, while caching frequently accessed dual-version results in a Redis cluster, using the business primary key: rule version number as the key, for example, "product ID_4004:V2" -> 4.824.
[0044] S132: Real-time Risk Indicator Collection and Scoring. During the canary release process, the system continuously and periodically collects multi-dimensional real-time risk indicators from the online operation, mainly including: Data quality metrics, such as the relative deviation rate between the results of the new and old rules.
[0045] System performance metrics, such as the P95 or P99 response time of the service.
[0046] Business health metrics: such as error request rate and business anomaly (such as negative score) trigger rate.
[0047] The system normalizes the collected indicator values with their respective preset safety thresholds, and then calculates a single comprehensive risk score R(t) using a weighted summation formula. For example, R(t) = w1*(deviation rate / threshold 1) + w2*(response time / threshold 2) + w3*(error rate / threshold 3), where w1+w2+w3=1.
[0048] S133: Dynamic proportional adjustment based on feedback controller. The system maintains a target risk score R_target. The difference between R(t) and R_target, e(t) = R_target - R(t), is input to a PID (proportional-integral-derivative) feedback controller. This controller calculates and outputs an adjustment amount ΔP(t) for the grayscale release ratio in real time based on preset parameters (proportional coefficient Kp, integral coefficient Ki, derivative coefficient Kd).
[0049] S134: Tiered Execution and Automatic Rollback. Based on the current risk score R(t) and adjustment amount ΔP(t), execute the tiered strategy: Safe interval (R(t) < R_s): indicates that the system is in a healthy state, and the proportion of grayscale flow of the new rule is increased in the positive direction by ΔP(t).
[0050] Warning interval (R_s ≤ R(t) ≤ R_d): This indicates a potential risk. The ratio adjustment is suspended, the current grayscale ratio is maintained, and a warning notification is sent to the operation and maintenance personnel.
[0051] Danger zone (R(t) > R_d): indicates that a clear anomaly has been detected, and the grayscale ratio should be immediately and forcibly reduced by a certain amount.
[0052] Automatic rollback mechanism: As a safeguard, when the comprehensive risk score R(t) exceeds the danger threshold R_d for M consecutive collection cycles (e.g., M=3), the system determines that the new rule has a serious defect and automatically triggers an emergency rollback. The rollback operation includes: reducing the grayscale ratio to 0% in a very short time (e.g., 1 second), clearing the abnormal cached data generated by the new rule, and notifying maintenance personnel through alarm channels. This mechanism reduces the time for fault detection and mitigation from tens of minutes of manual intervention to seconds.
[0053] Based on the same inventive concept as the business rule hot update method described in the foregoing embodiments, this invention provides a business rule hot update system based on quantitative analysis and dynamic arbitration for implementing the above method, such as... Figure 2 As shown, it includes the following logically cooperating modules: Event Acquisition and Standardization Module: Deployed on four 8-core 16G cloud server nodes, it uses Debezium to monitor the binlog logs of business databases such as MySQL, capture source data change events (such as adding / modifying product reviews), and standardize the events into a unified format (including business primary key, changed fields, values before and after the change, and change timestamp) to ensure that downstream modules can process them compatiblely.
[0054] The rule impact strength analysis engine includes a rule impact strength network manager, an intensity value calculator, and a threshold comparator. The network manager supports visual configuration of the association between business fields and indicators and their impact weights ω_ij, automatically generating a directed weighted graph and storing it in a Redis cluster. The intensity value calculator calculates the impact strength value S_j according to steps S101 to S103. The threshold comparator compares S_j with a preset intensity threshold λ to filter out high-impact change data records.
[0055] Task scheduling module: Receives the filtering results from the rule impact strength analysis engine, generates incremental recalculation tasks for high-impact change data records, and the tasks include information such as business primary key, data replica address, and new rule version number to ensure that the distributed computing cluster can accurately obtain the data required for computation.
[0056] The distributed arbitration computing cluster includes a route manager, concurrent computing executors, a result arbitrator, and a result writer. The route manager routes incremental recalculation tasks to a fixed subset of arbitration nodes using a consistent hashing algorithm (MD5 (business primary key) mod 100). The concurrent computing executors implement parallel computing based on Apache Flink 1.17, obtain complete data from a bypass data replica, and execute new rules. The result arbitrator determines the final result according to the arbitration mechanism in step S4. The result writer pushes the final result to the dual-version data storage module.
[0057] Dual-version data storage module: It adopts MySQL 8.0 (master-slave architecture) and Redis 6.2 (cluster mode) for collaborative storage. MySQL stores the full dual-version data for persistent backup, and Redis stores hot data for query response. It supports fast query of new and old version results by business primary key, and the data synchronization latency is controlled within 100ms.
[0058] The closed-loop grayscale controller includes an indicator collector, a risk scoring calculator, a PID controller, and a grayscale ratio actuator. The indicator collector collects three types of risk indicators every 3 seconds: data deviation rate, response time, and error rate. The risk scoring calculator calculates the comprehensive risk score R according to a normalized formula. The PID controller inputs the deviation e(t) and outputs an adjustment amount ΔP. The grayscale ratio actuator works in conjunction with the traffic gateway to dynamically adjust the proportion of traffic routed to the new rule, with the initial grayscale ratio configured as 5%.
[0059] Monitoring and alarm module: Real-time monitoring of the operating status of each module in the system (such as node CPU utilization, task execution success rate, and risk indicator values), setting a three-level alarm mechanism (early warning, danger, and emergency). When the risk indicator enters the early warning range, a normal alarm is triggered; when it exceeds the danger threshold, an important alarm is triggered; and when it exceeds the limit multiple times in a row, an emergency alarm is triggered and an automatic rollback mechanism is activated.
[0060] Example 3 To make the objectives, technical solutions and advantages of the present invention clearer, based on the same inventive concept as the foregoing embodiments 1-2, the following detailed description is given in conjunction with a specific embodiment of the e-commerce product rating rule upgrade from V1.0 to V2.0.
[0061] 1. System Deployment and Core Configuration Deployment level, device configuration, number of nodes, core responsibilities Quantitative analysis layer: 8-core, 16GB cloud server (Intel Xeon Gold 6278C), 4 nodes for event acquisition, impact intensity calculation, and task selection. The deterministic computing layer uses a 16-core, 32GB cloud server, deploying Apache Flink 1.17 with 20 nodes (1 JobManager + 19 TaskManagers) for incremental recalculation and result arbitration. Feedback control layer: 8 cores, 16GB RAM, 2 cloud server nodes (primary / backup). Functions include risk indicator collection, grayscale adjustment, and rollback triggering. Storage layer: MySQL 8.0 (master-slave architecture), Redis 6.2 (cluster mode), Kafka 3.3 - dual-version data storage, event queue, caching. The bypass computing cluster consists of a 16-core, 32GB cloud server with 10 nodes in an independent network partition, handling incremental recalculation tasks in isolation without affecting the main business. 1.1 Hardware Deployment Architecture Deployment level Equipment Configuration Number of nodes Core Responsibilities Quantitative Analysis Layer 8-core 16GB cloud server (Intel Xeon Gold 6278C) 4 nodes Event collection, impact intensity calculation, task selection Deterministic computation layer A 16-core, 32GB cloud server is deployed with Apache Flink 1.17. 20 nodes (1 JobManager + 19 TaskManagers) Incremental recalculation and result arbitration Feedback control layer 8-core 16GB cloud server 2 nodes (primary and backup) Risk indicator collection, grayscale ratio adjustment, rollback triggering storage layer MySQL 8.0 (master-slave architecture), Redis 6.2 (cluster mode), Kafka 3.3 - Dual-version data storage, event queue, cache Bypass computing cluster 16-core, 32GB cloud server with independent network partition. 10 nodes Incremental recalculation tasks are handled in isolation, without affecting the main business. 1.2 Core Parameter Configuration Parameter categories Configuration value Parameter Description Intensity threshold λ 0.25 Recalculation is triggered only when the intensity value S_j > 0.25. The rule affects the weight ω_ij Positive reviews: 0.6; Reviews with pictures: 0.3; Follow-up reviews: 0.1 The weights sum to 1, allowing for visual adjustment. Sensitivity function parameters Perception threshold a_i = 0.1; saturation threshold b_i = 0.5 Sensitivity output is 1 when the field change volume exceeds 0.5. Arbitration subset configuration K=5; Fault tolerance ε=1% K is an odd number to ensure the validity of the vote arbitration. PID controller parameters Kp=0.6; Ki=0.2; Kd=0.1 Balancing grayscale scaling speed and risk control Grayscale control parameters Initial ratio 5%; safety threshold R_s = 0.2; danger threshold R_d = 0.6 Tiered control of the risks of gray-scale release Automatic rollback trigger conditions Three consecutive comprehensive risk scores R>R_d Quickly terminate abnormal version releases 2. Implementation Process 2.1 System Initialization and Rule Configuration like Figure 3 As shown, a rule influence strength network is constructed: the field weights of the e-commerce product rating V2.0 rule (0.6 for positive reviews, 0.3 for reviews with pictures, and 0.1 for follow-up reviews) are entered through a visual configuration tool. The nodes include three business fields: "Number of positive reviews", "Number of reviews with pictures" and "Number of follow-up reviews" and one business indicator: "Comprehensive product rating". The edge weights are the corresponding influence coefficients. The network data is stored in a Redis cluster. Sensitivity function configuration: For the "Comprehensive Product Rating" indicator, set the perception threshold a_i=0.1 and the saturation threshold b_i=0.5 for all business fields. The system generates a segmented function based on the change sensitivity function μ_i() preset in Example 1. Bypass computing cluster initialization: The 120 million product review data from the main database are synchronized to the bypass cluster database using a full synchronization tool. Subsequently, Kafka is used to monitor changes in the main database to achieve incremental synchronization, with data latency controlled within 100ms.
[0062] 2.2 Event Collection and Impact Quantification Event Capture: The event collection and standardization module uses Debezium to monitor the MySQL product review table and captures the change event for product P4004: "Added 200 follow-up reviews with pictures (all positive), total number of reviews increased from 500 to 700, number of positive reviews increased from 400 to 600, number of reviews with pictures increased from 100 to 300, number of follow-up reviews increased from 50 to 250". The event is then standardized into a unified format that includes product ID=4004, the changed fields and their values before and after, and the change timestamp. Change Calculation: Calculate the change amount for each field according to step S101 of Example 1: Δx_number of positive reviews = (600-400) / 700≈0.2857; Δx_Number of comments with images = (300-100) / 700≈0.2857; Δx_number of follow-up comments = (250-50) / 700≈0.2857; Sensitivity Calculation: Calculate the sensitivity output value for each field using a piecewise function. Because each field Δx_i = 0.2857 ∈ [0.1, 0.5] Therefore, μ_i = (0.2857 - 0.1) / (0.5 - 0.1) = 0.464; Strength value calculation: Calculate the affected strength value according to step S103: S_j=0.6×0.464 + 0.3×0.464 + 0.1×0.464=0.464; Threshold filtering: S_j=0.464>λ=0.25, which is determined to be a high-impact change. The task scheduling module generates an incremental recalculation task for product P4004. The task information includes product ID=4004, data copy address, and rule version V2.0.
[0063] 2.3 Distributed Arbitration Computation Task routing: The routing manager of the distributed arbitration computing cluster extracts the unique identifier of product P4004 (product ID=4004), calculates the hash value of MD5(4004) mod 100 using the consistent hash algorithm, and routes it to the preset fixed arbitration node subset {node_007, node_008, node_009, node_010, node_011} (K=5) to ensure that a majority result can be obtained during voting arbitration; Parallel computing: Five arbitration nodes retrieve 700 complete review records for product P4004 from the database replica of the bypass computing cluster, and concurrently execute the V2.0 rating rule calculation (Rating = Number of positive reviews / Total number of reviews × 0.6 + Number of reviews with pictures / Total number of reviews × 0.3 + Number of follow-up reviews / Total number of reviews × 0.1), outputting the calculation results: node_007: 4.82 points; node_008: 4.83 points; node_009: 4.81 points; node_010: 4.84 points; node_011: 4.82 points; Arbitration result: The difference in the result calculated by the arbitrator is (4.84-4.81) / 4.82≈0.62%. This difference is ≤ the fault tolerance range ε=1%. Therefore, the average of the results of the 5 nodes is taken as the final result: (4.82+4.83+4.81+4.84+4.82) / 5=4.824 points; Result writing: The result writer pushes the final result to the dual-version data storage module, stores the key-value pair "4004:V2→4.824" in Redis, and simultaneously synchronizes it to the MySQL master database for persistence.
[0064] 2.4 Closed-loop gray-scale release and risk control Dual-version storage: The dual-version data storage module has pre-stored the V1.0 rule result (4.65 points) for product P4004, forming a dual-version data coexistence state, supporting fast query by version number; Initial gray-scale rollout: The gray-scale ratio actuator of the closed-loop gray-scale controller works in conjunction with the e-commerce platform's traffic gateway to route 5% of the product detail page query traffic (approximately 500 QPS) to version V2.0. When users access the product P4004 detail page, 5% of users will see the new rating of 4.824, while the remaining users will still see the old rating of 4.65. Real-time risk monitoring: The indicator collector gathers three types of risk indicators every 3 seconds: Data deviation rate: |4.824-4.65| / 4.65≈3.74%; System response time: P99 delay = 45ms; Error rate: 0.02%; Risk score calculation: The risk score calculator calculates the comprehensive risk score R using a normalized formula. R=(3.74% / 10%×0.5)+(45ms / 80ms×0.3)+(0.02% / 0.1%×0.2)=0.187+0.16875+0.04=0.39575; Grayscale adjustment: The target risk score R_target = 0.15, and the calculated deviation e(t) = 0.15 - 0.39575 = -0.24575; The PID controller input is e(t), and the adjustment amount ΔP is calculated as 0.6×(-0.24575)+0.2×(-0.73725)+0.1×(-0.085)≈-0.3025; Adjustment logic: The comprehensive risk score R=0.39575 is within the warning range [0.2,0.6], so the current gray scale ratio of 5% is maintained, and a "version switch warning" notification is sent to the operation and maintenance personnel through the monitoring and alarm module; Subsequent iterative adjustments: After 10 minutes, the data deviation rate collected by the indicator collector stabilized at 3.5%, the response time P99=42ms, the error rate=0.01%, R=0.37 was recalculated, and there were no abnormalities for 5 consecutive collection cycles (15 seconds). The PID controller output ΔP=+2%, and the grayscale ratio was increased to 7%. Subsequently, the grayscale ratio was gradually increased according to this logic until the entire system was switched to version V2.0. Abnormal rollback simulation: If, during the gray-scale process, a configuration error causes the data deviation rate to rise to 12% (exceeding the threshold of 10%), the response time P99 = 90ms (exceeding the threshold of 80ms), and the error rate = 0.12% (exceeding the threshold of 0.1%), the calculated R = (12% / 10% × 0.5) + (90ms / 80ms × 0.3) + (0.12% / 0.1% × 0.2) = 1.1775 > 0.6, and if R > 0.6 is satisfied in 3 consecutive data collections, the automatic rollback mechanism is triggered: the gray-scale ratio is reduced to 0% within 1 second, the abnormal data corresponding to "4004:V2" in Redis is cleaned up, an emergency alarm is sent to the operation and maintenance personnel, and the impact of the fault is controlled within 5%.
[0065] This invention is not limited to the specific embodiments described above. The invention extends to any new feature or combination disclosed in this specification, as well as any new method or process step or combination disclosed herein.
Claims
1. A method for hot updating business rules based on quantitative analysis and dynamic arbitration, characterized in that, Includes the following steps: S10. In response to a change event in the source data, calculate the intensity value of the affected business indicators based on a pre-built rule influence intensity network; the rule influence intensity network is a directed weighted graph, whose nodes include business field nodes and business indicator nodes, and the edge weights represent the influence weights of the business fields on the business indicators. S11. If the intensity value exceeds the preset intensity threshold, an incremental recalculation task is generated for the corresponding data record. S12. Based on the unique identifier of the data record, the incremental recalculation task is routed to a preset fixed arbitration node subset in the distributed computing cluster for execution using a consistent hashing algorithm. The arbitration node subset contains K computing nodes, where K is an odd number greater than or equal to 3. The calculation results of each node in the subset are aggregated, and the final result is determined through a preset arbitration mechanism. S13. The final result and the old rule calculation result are stored as dual-version data, and the gray release ratio is dynamically adjusted through the feedback controller based on the real-time risk indicators collected during the gray release process.
2. The method according to claim 1, characterized in that, The calculation of the intensity value in step S10 specifically includes: S101. For each business field i involved in the change event, calculate its normalized change amount Δx_i; S102. Calculate the sensitivity output value μ_i(Δx_i) of the field according to the preset change sensitivity function μ_i(); the sensitivity function is a piecewise linear function with a perception threshold a_i and a saturation threshold b_i; S103. Calculate the intensity value of index j S_j = Σ (ω_ij * μ_i(Δx_i)) based on the influence weight ω_ij of field i in the predefined field i in the influence intensity network.
3. The method according to claim 2, characterized in that, The normalized change amount Δx_i is calculated as follows: Δx_i = |value after change - value before change| / total number of data records to which the field belongs after the change.
4. The method according to claim 1, characterized in that, The arbitration mechanism in step S12 includes: Calculate the difference δ of the calculation results of each node in the fixed arbitration node subset; If δ does not exceed the preset fault tolerance range ε, then the arithmetic mean of the calculation results of each node will be used as the final result; If δ exceeds ε, then weighted voting is performed based on the real-time load status of each node to determine the final result, and the voting weight of a node is inversely proportional to its load.
5. The method according to claim 4, characterized in that, The real-time load status of the node is characterized by CPU utilization, and the voting weight w_k of node k is calculated as follows: w_k = (1 / u_k) / , where u_k is the CPU utilization of node k, and K is the total number of nodes.
6. The method according to claim 1, characterized in that, The step S13 of dynamically adjusting the grayscale release ratio includes: S131. Periodically collect multiple risk indicators under the current grayscale traffic and calculate the comprehensive risk score R(t); S132. Input the difference e(t) between the target risk score R_target and R(t) into the PID controller to obtain the gray scale adjustment amount ΔP(t); S133. Based on the risk range of R(t) and ΔP(t), execute the corresponding proportional adjustment strategy; the risk range includes at least a safe range, a warning range, and a danger range.
7. The method according to claim 6, characterized in that, The risk indicators include at least two of the following: the deviation rate between the calculation results of the new rules and the old rules, the system service response time, and the business error rate.
8. The method according to claim 6 or 7, characterized in that, It also includes an automatic rollback step: when the comprehensive risk score R(t) exceeds the threshold of the danger zone M times consecutively, the grayscale release ratio is automatically reduced to zero, and an alarm and abnormal data cleanup are triggered.
9. The method according to claim 1, characterized in that, The distributed computing cluster is a bypass computing cluster isolated from the main business system. It holds a data copy that is ultimately consistent with the data source of the main business system through the Change Data Capture (CDC) mechanism.
10. A business rule hot update system based on quantitative analysis and dynamic arbitration, characterized in that, The system for implementing the method of any one of claims 1-9 comprises: The event capture and standardization module is used to capture changes in source data and generate standardized events; The rule impact strength analysis engine is used to calculate the strength value of business indicators and perform threshold filtering based on the standardized events and the pre-set rule impact strength network. The task scheduling and routing module is used to create incremental recalculation tasks for selected high-impact data records and route them to a specific subset of computing nodes based on the consistent hashing algorithm. A distributed arbitration computing cluster, comprising multiple computing nodes, is used to execute the recalculation task in parallel and output the final result through an arbitration mechanism. The dual-version data storage module is used to store and manage the calculation results of business rules in both the old and new versions; A closed-loop grayscale controller is used to collect risk indicators during the release process and dynamically adjust the proportion of traffic flowing to new rules through a feedback control algorithm. The monitoring and automated operation and maintenance module is used to monitor the system status and trigger alarms or automatically roll back when an anomaly occurs.