Search

CN-121481114-B - Insurance product flow management method based on multi-strategy mixed mode

CN121481114BCN 121481114 BCN121481114 BCN 121481114BCN-121481114-B

Abstract

The invention discloses an insurance product flow management method based on a multi-strategy mixed mode, which relates to the technical field of computers, and takes an event-driven multi-strategy mixed architecture as a core, through single submitting semantics of leasing a main node and a majority validation guarantee control surface, the misorder and repeated execution risk in a concurrent scene are substantially reduced, environment and product domain information is brought into a summary context by taking a version unique identifier as an anchor point, and heartbeat reconciliation, normalized serialization and content definition blocking are combined, so that consistency verification among channels is upgraded from coarse granularity version number comparison to fine granularity content verification, missing submission can be replayed in sequence or delta synchronization can be carried out after deviation is found, full coverage is less dependent, an abnormal window is shortened, and under the conditions of network jitter and node isomerism, a timeout optimization strategy is based on a positioning threshold and grading backoff of robust statistics, time delay distribution of each channel is dynamically matched, and long tail waiting and cascade timeout are reduced.

Inventors

  • LIU QINGXIA
  • LI LIANGWEI
  • ZHANG KUN
  • FU GUODONG
  • WANG RU

Assignees

  • 北京广易保科技有限公司

Dates

Publication Date
20260508
Application Date
20251111

Claims (7)

  1. 1. The insurance product flow management method based on the multi-strategy mixed mode is characterized by comprising the following steps: Step S1, when a state change event occurs to a security product in a plurality of channels and a plurality of environments, a state change request is generated, wherein the state change request at least comprises a product identifier, a target environment, a target channel set, a target version number, a change type and a serial number; step S2, a multi-strategy mixing mechanism is applied to the state change request, wherein the multi-strategy mixing mechanism comprises a priority broadcasting protocol and a state checking algorithm, and the execution sequence and the parallelism of the priority broadcasting protocol and the state checking algorithm are determined by a rule engine layer; Step S3, based on the processing result of the multi-strategy mixing mechanism, submitting update and synchronizing the state data of each channel node, and if the verification is not passed within the threshold time, triggering a consistency restoration process or rolling back to an upper one-to-one version; The priority broadcast protocol includes: Broadcasting the state change request to the target channel node by the main node according to a priority queue, wherein the state change request carries a monotonously increasing serial number and a version unique identifier; generating a commit record after receiving acknowledgement responses that are not less than a majority threshold, the acknowledgement responses being verified based on sequence number order and supporting idempotent processing; Performing an effective operation on the submitted changes and persisting the commit record to a commit log; The state verification algorithm comprises the following steps: The method comprises the steps of carrying out normalized serialization on state data of each channel node to generate a unique identifier, wherein the state data comprises rate version, sales rule version, on-off state and dependency configuration; Each channel node exchanges unique identifiers with each other according to a set heartbeat period and checks accounts with the main node; Triggering the consistency repair flow when the identifiers are detected to be inconsistent, wherein the consistency repair flow comprises replaying missing submissions in sequence and/or performing increment synchronization based on delta packets; the rule engine layer is used for: calculating priority weight for the state change request according to the change event type, channel weight, history stability and compliance requirements; sorting the state change requests based on the priority weights, and determining the execution sequence of a priority broadcast protocol and a state verification algorithm; for a parallelizable target channel set, carrying out concurrency control on each channel node so that each channel node only processes one state change request related to the same product at the same time; when a conflict multi-state change request exists, sorting and preempting according to the priority weight; and recording conflict resolution logs when executing conflict resolution, wherein the conflict resolution logs are associated with the submitted logs for subsequent audit and playback.
  2. 2. The method of claim 1, wherein the master node performs election and renewal through a lease mechanism, and when a master node failure is detected during the lease, the candidate node takes over and continues to broadcast an incomplete state change request according to a latest offset of a commit log.
  3. 3. The method for managing insurance product flow in a multi-policy based hybrid mode according to claim 1, wherein the unique identifier is a hash value calculated based on normalized state data, and the hash value and the version number are combined to form a version unique identifier for reconciliation and rollback anchor points of consistency across environments/channels; the normalization rule of the hash calculation is as follows: Step C1, normalizing and serializing the state data to obtain a stable byte stream for subsequent hash: , Wherein, the Representing the sequence of the normalized bytes, Representing the set of raw state data, The normalized mapping of the value range is represented, Representing a stable ordering by dictionary order of field paths, Representing field path dictionary order rules for ordering, Representing a deterministic serialization function employing UTF-8+NFC; Step C2, pair Partitioning according to content definition, and triggering segmentation by rolling hash: , When (when) And is also provided with Then the cutting is carried out, Wherein, the Indicating that the window starts at A rolling hash of the time-point and, Indicating that the window starts at A rolling hash of the time-point and, Representation of First, the The number of bytes, Representing the new byte value into which the window is slid, The radix constants are represented as radix constants, Indicating the length of the rolling window, Representing the prime modulus of the object, The operation of taking the modulus is shown, A boundary determination mode is indicated, Represents the boundary trigger remainder and, Representing an allowable block length closed interval threshold; Step C3, calculating quick hash for each block, summarizing by anti-collision hash, and simultaneously introducing a domain separation salt binding environment and a product: , , Wherein, the Representing a concatenated summary hash, Representing a collision-resistant hash function, Represents a domain-separated salt which is isolated from the water, A byte-level concatenation operation is represented, Representation press To the point of The multi-section splicing is performed in sequence, Representing an intra-block fast hash function, Represent the first A normalized byte sequence of a block, The number of blocks is represented by the number of blocks, The context code is represented by a code of the environment, Representing a product identifier; Step C4, combining and encoding the summarized hash and the version number: , Wherein, the Represents a version-unique identifier and, Representing the Base32 coding function of the code, A character string representing the version number is presented, Representing the constant separator bytes and, Representing a function truncated by the bit length, Representing the truncated bit length.
  4. 4. The method for managing insurance product flow in a multi-policy based hybrid mode according to claim 1, wherein the multi-policy hybrid mechanism further comprises a timeout optimization policy for adaptively calculating a waiting timeout time according to a historical response time distribution of each channel node, dividing the nodes into a plurality of timeout levels according to a preset rule, and configuring differentiated retry and backoff parameters.
  5. 5. The method for managing insurance product flow in a multi-policy based hybrid mode according to claim 4, wherein the timeout optimization policy uses a sliding time window to count response delays of nodes, calculates a waiting threshold of each timeout level according to a quantile threshold, and dynamically updates retry times and backoff intervals when node levels change; The quantile threshold, smoothing and backoff functions are defined as follows: Step D1, at the node Response time delay sequence of (2) In the above, robust clipping is first performed to reduce the disturbance of outliers to the threshold value: , Wherein, the The sample after the clipping is represented as such, The original sample is represented as such, The median value within the window is indicated, Represents the cutting multiple times of the cutting machine, Represents a robust scale based on the median absolute deviation, 、 Respectively representing the operation of taking two smaller values and a larger value; Step D2, at length of Is assembled by quantiles on a sliding window of (1) Calculating empirical quantiles: , Wherein, the Representing nodes At the moment of time Corresponding to timeout level Is a function of the empirical quantile of (a), Represent the first A homeotropic ordered-statistics function, The representation is rounded up and down to the top, Represent the first A plurality of dividing points are arranged on the surface of the substrate, Indicating the number of samples within the window, Indicating the number of timeout levels, Representing the clipping sequence obtained in the step D1; step D3, carrying out index weighted update on the quantile sequence: , Wherein, the The number of quantiles after the smoothing is represented, The smoothing factor is represented as such, Representing the last moment; Step D4, giving a grade based on the smooth quantiles and the robust scale Wait threshold and the first Back-off time for secondary retry: , Wherein, the Represent the first A wait threshold for the secondary retry is set, It means that both are taken to be small, Indicating the upper limit of the seal, Representing the smoothed quantiles of step D3, Representing the scale-off-set coefficient, Representing the robust dimensions of step D1, The back-off reference coefficient is indicated, Indicating that the retry number is to be used, Indicating the back-off type, Representing an exponential growth factor.
  6. 6. A computer device comprising a memory and a processor, said memory storing a computer program, characterized in that the processor, when executing said computer program, implements the steps of a method for managing insurance product flows in a multi-policy based hybrid mode according to any one of claims 1 to 5.
  7. 7. A computer readable storage medium having stored thereon a computer program, wherein the computer program when executed by a processor implements the steps of any one of claims 1 to 5 for a method for managing insurance product flows in a multi-policy based hybrid mode.

Description

Insurance product flow management method based on multi-strategy mixed mode Technical Field The invention relates to the technical field of computers, in particular to an insurance product flow management method based on a multi-strategy mixed mode. Background Insurance products are generally released by aiming at multiple terminals such as an online application platform, agent channels and third party cooperation institutions, in order to shorten the marketing period, enterprises generally adopt multiple environments (development, test, pre-release, production) and multiple-node collaborative release processes, product elements (names, rates, responsibility terms, check and protection rules, on-shelf and off-shelf states and the like) displayed by each channel are required to be kept consistent within reasonable time, short-term or lasting inconsistency between environments and channel side states easily occurs in the propagation process due to dispersion of release nodes, fluctuation of network conditions and heterogeneous channel butt joint, and the problems are typically manifested in that part of channels display old versions, rate switching is not effective at the same time, or residual history configuration after rollback and the like, and the problems can influence user experience and increase compliance risks, and in practice, manual sampling inspection or rechecking are often required. In the prior art, a distributed lock and a state machine are combined to reduce the risk of concurrency conflict, for example, middleware such as Redis is utilized to lock key steps, an operation sequence is constrained by explicit state circulation (such as to be issued, test verification, gray scale and full quantity), and transaction compensation and overtime control are assisted to alleviate inconsistency to a certain extent. However, in the high concurrency, network partition or node failure scenario, the distributed lock may fail in the master-slave switching, clock drift or resource competition, resulting in abnormal reentry or state rollback, the fixed state machine timeout and branch are difficult to adapt to real-time load and channel health condition, and part of schemes lack a unified observation and recovery strategy for the product rising and channel side final consistency across environments, so that the system still needs manual intervention, and stable automatic operation and maintenance are difficult to realize. Disclosure of Invention The present invention has been made in view of the above-described problems occurring in the prior art. The invention provides an insurance product flow management method based on a multi-strategy mixed mode, which solves the problems of easy sequence losing, drifting and slow convergence of multi-channel cross-environment release and often relies on manual checking and backtracking. In order to solve the technical problems, the invention provides the following technical scheme: In a first aspect, an embodiment of the present invention provides a method for managing insurance product flows in a multi-policy based hybrid mode, including: Step S1, when a state change event occurs to a security product in a plurality of channels and a plurality of environments, a state change request is generated, wherein the state change request at least comprises a product identifier, a target environment, a target channel set, a target version number, a change type and a serial number; step S2, a multi-strategy mixing mechanism is applied to the state change request, wherein the multi-strategy mixing mechanism comprises a priority broadcasting protocol and a state checking algorithm, and the execution sequence and the parallelism of the priority broadcasting protocol and the state checking algorithm are determined by a rule engine layer; and step S3, based on the processing result of the multi-strategy mixing mechanism, submitting update and synchronizing the state data of each channel node, and triggering a consistency restoration process or rolling back to an upper one-to-one version if the verification is not passed within the threshold time. As a preferable scheme of the insurance product flow management method based on the multi-strategy mixed mode, the preferential broadcasting protocol comprises the following steps: Broadcasting the state change request to the target channel node by the main node according to a priority queue, wherein the state change request carries a monotonously increasing serial number and a version unique identifier; generating a commit record after receiving acknowledgement responses that are not less than a majority threshold, the acknowledgement responses being verified based on sequence number order and supporting idempotent processing; performing validation operations on the committed changes and persisting commit records to a commit log. The method for managing the insurance product flow under the multi-strategy mixed mode is characterized in that t