A multi-level insurance agent sales point calculation method

CN122887611APending Publication Date: 2026-10-09GUANGZHOU CHEYIBAO DIGITAL INTELLIGENCE TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611092687.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-22
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

当积分发生冲正或到期时,难以确定需要解除的匹配关系以及需要更新的积分批次,个人积分、团队积分与可提现积分之间容易出现状态不同步

Benefits of technology

(1)通过订单计分时点下的代理关系快照、订单状态版本和积分规则版本关联,使历史保险订单在代理关系或积分规则发生变化后的再次处理仍对应原计分条件,减少积分归属变化、规则错配及历史计算结果难以追溯的情况。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122887611A_ABST
    Figure CN122887611A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of insurance data processing, and particularly relates to a multi-level insurance agent sales point calculation method. The method acquires insurance order state events, agent relationship records, point rule records and processed order state records; when the order meets point processing conditions, an order scoring context containing an agent relationship snapshot and a point rule version is generated according to an order scoring time point; personal point contribution records and team point contribution records are generated according to valid premium change amounts, forming an order point change record set; personal point sub-accounts and team point sub-accounts are updated based on the record set, forming two types of point batches and equivalent matching, generating a withdrawable point matching record; when the source point batch is corrected or expires, the corresponding matching is removed and reconstructed, generating a point processing state. The present application keeps the order state, agent relationship, point rule and withdrawable points associated, reducing point misplacement and state asynchronization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of insurance business data processing technology, and in particular to a method for calculating sales points for multi-level insurance agents. Background Technology

[0002] In the field of insurance business data processing technology, existing solutions for insurance agent sales points typically involve the cooperation of an insurance order system, an agency relationship management system, a points rule configuration module, and a points settlement module. After an insurance order is linked to a sales agent, the system calculates individual and team points according to the order premium, preset points ratios, or agency level allocation rules, and aggregates the points balance for each insurance agent or generates withdrawable points. This type of solution can complete basic points calculation when the insurance order status, agency relationship, and points rules remain stable. However, when these three elements change dynamically, limitations such as changes in the ownership of points for historical orders, discrepancies in points records before and after order changes, and difficulty in matching the sources of withdrawable points can arise.

[0003] Existing solutions often rely on the current agency relationship and current points rules to directly calculate or re-aggregate points, and use the comparison between the individual's points balance and the team's points balance as the withdrawable points. When an insurance order is subject to premium adjustments, cancellation, or rescission, or when the insurance agency relationship and points rules change, the agency level and points rules used in the original order may be inconsistent with the data read during subsequent processing. There is a lack of stable status correlation between individual points contribution records, team points contribution records, and agent points sub-ledgers, which can easily lead to duplicate scoring, misaligned reversal objects, or inconsistencies between order points details and points balances.

[0004] For situations where individual points and team points have different generation times and validity periods, existing solutions typically only store the aggregate balance, failing to differentiate between the individual and team point sources corresponding to withdrawable points. When points are reversed or expire, it's difficult to determine the matching relationships that need to be terminated and the batch of points that need to be updated, easily leading to a disconnect between individual points, team points, and withdrawable points. Therefore, a joint processing approach involving insurance order status events, multi-level agency relationships, and point rules is needed to address the issue of seamless state transitions between individual points, team points, and withdrawable points during dynamic changes. Summary of the Invention

[0005] To address the aforementioned technical problems, this invention provides a method for calculating sales points for multi-level insurance agents, comprising: S100: Obtain insurance order status events, agency relationship records, points rule records, and processed order status records; when the insurance order status event meets the points processing conditions and the processing identifier formed by the order identifier and the order status version is not recorded, if there is no order scoring context associated with the order identifier, then filter valid agency relationship records and valid points rule records according to the sales agent identifier and the order scoring time point, and generate and save an order scoring context containing an agency relationship snapshot, points rule version, and points calculation parameters; if it exists, then read the saved order scoring context; S200. Based on the order scoring context and the processed order status record, calculate the effective premium change amount between the effective premium and the scored effective premium; generate individual points contribution records and team points contribution records according to the effective premium change amount, and associate them with the order status version, the agency relationship snapshot, and the points rule version to form an order points change record set; save the order points change record set and then update the processed order status record. S300. Based on the order points change record set, update the individual points sub-account and team points sub-account according to the beneficiary agent identifier and points type; according to the positive individual points contribution records and positive team points contribution records in the order points change record set, form individual points batches and team points batches respectively; for the same beneficiary agent's available individual points batches and available team points batches, perform equal-value matching according to the points expiration time, record the source batch identifier and matching points value, and generate withdrawable points matching records; S400. When a source points batch experiences a points reversal or expires, the corresponding withdrawable points matching record is released according to the source batch identifier, the source points batch is updated, and the available individual points batch and available team points batch of the same beneficiary agent are re-equalized to generate a points processing status.

[0006] Furthermore, the insurance order status event includes an order identifier, a sales agent identifier, an order status, an order status version, a valid premium, and the time when the status occurred; When there is no order scoring context associated with the order identifier, the moment when the insurance order first reaches the points processing condition is determined as the order scoring point, and the valid premium that has been scored is determined to be zero; The conditions for processing points include insurance orders reaching the underwriting confirmation status or premium payment confirmation status for the first time, and insurance orders with established order scoring contexts experiencing premium increases, premium reductions, partial refunds, full refunds, or cancellations. When a saved order scoring context exists, the order scoring time point, the valid premium for which points have been scored, and the order scoring context identifier are read from the processed order status record, and the original agency relationship snapshot, the original points rule version, and the original points calculation parameters are read according to the order scoring context identifier.

[0007] Furthermore, the agency relationship record includes the lower-level agent identifier, the direct superior agent identifier, the relationship effective time, the relationship ineffective time, and the relationship status; Starting with the sales agent identifier, filter agent relationship records where the relationship status is valid, the order scoring time is not earlier than the relationship effective time, and the relationship expiration time is empty or the order scoring time is earlier than the relationship expiration time. The first-level, second-level, and third-level agents are identified layer by layer along the direct superior agent identifier, and the sales agent, the first-level agent, the second-level agent, and the third-level agent are associated as a snapshot of the agency relationship.

[0008] Furthermore, in the process of determining the first-level superior agent, the second-level superior agent, and the third-level superior agent layer by layer, the identified agent identifiers are recorded; When the identifier of the direct superior agent to be determined is the same as the identifier of the agent that has already been determined, an abnormal relationship identifier is generated and the determination of the corresponding agent level and subsequent agent levels is terminated. When there is no direct superior agent identifier with a valid relationship status, the determination of the corresponding agent level and subsequent agent levels is stopped.

[0009] Furthermore, the points rule record includes the rule version, effective period, individual points ratio, first-level team points ratio, second-level team points ratio, third-level team points ratio, and points validity period; Filter the points rule records where the order scoring time point is within the effective interval, and determine the filtered rule version as the points rule version; The order scoring context also includes the individual points ratio, the first-level team points ratio, the second-level team points ratio, the third-level team points ratio, and the points validity period.

[0010] Furthermore, the order scoring context also includes a rating parameter; The determination of the level parameters includes: Using the order scoring point as the end point of the historical time window, the premiums of valid insurance orders of the sales agent within the historical time window are calculated; the length of the historical time window is determined by the window parameters corresponding to the scoring rule version. The premium quantification level is determined based on the premium range to which the valid insurance order premium belongs; Agents who have a direct subordinate agency relationship with the sales agent are identified as first-level subordinate agents. The number of valid order-issuing agents among the first-level subordinate agents is deduplicated to obtain the number of valid order-issuing agents. The level parameter is determined based on the premium quantification level and the number of valid policy-issuing agents.

[0011] Furthermore, a processing identifier is generated based on the order identifier and the order status version; When the processing identifier is already recorded in the processed order status record, the order points change record set is not generated; When the effective premium is greater than the quantified effective premium, the difference between the two is determined as the positive effective premium change amount; When the effective premium is less than the quantified effective premium, the difference between the two is determined as a negative effective premium change.

[0012] Furthermore, the individual points contribution record is generated based on the effective premium change amount, the individual points ratio, and the level parameter; The first-level team points contribution record of the first-level superior agent is generated based on the effective premium change amount and the first-level team points ratio; The secondary team contribution record of the secondary superior agent is generated based on the effective premium change amount and the secondary team points ratio; The third-level team points contribution record of the third-level superior agent is generated based on the effective premium change amount and the third-level team points ratio; The team contribution record includes the first-level team contribution record, the second-level team contribution record, and the third-level team contribution record.

[0013] Furthermore, both the individual points contribution record and the team points contribution record include the source order identifier, order status version, beneficiary agent identifier, points type, record direction, changed points value, agent relationship snapshot identifier, rule version identifier, generation time, and points expiration time; According to the beneficiary agent identifier and the points type, positive individual points contribution records are formed into individual points batches, and positive team points contribution records are formed into team points batches. For the same beneficiary agent, select individual and team point batches that are not yet due, not withdrawn, not occupied, not fully reversed, and have available points greater than zero. Sort the individual and team point batches according to their point expiration times from first to last. Select the first point batch in each of the two sorted sequences and determine the smaller value of the available points of the two first point batches as the matching point value. When the available points of any first point batch become zero, remove the first point batch from the corresponding sorted sequence and continue to select the next point batch for matching. Write the beneficiary agent identifier, individual points batch identifier, team points batch identifier, and the matched points value into the withdrawable points matching record.

[0014] Furthermore, negative individual or team point contribution records are associated with the original positive point contribution records, and the corresponding source point batch is located based on the original positive point contribution records; when the source point batch has been written into the withdrawable point matching record, the corresponding withdrawable point matching record is deactivated based on the source batch identifier. Keep the initial points of the source points batch unchanged, add positive points according to the negative change points value and update the available points and matched points, and re-match the individual points batch and team points batch of the same beneficiary agent after the update. According to the beneficiary agent identifier, all individual points contribution records and all team points contribution records associated with the beneficiary agent are aggregated respectively. The aggregated individual points result is compared with the record value of the individual points sub-account, and the aggregated team points result is compared with the record value of the team points sub-account. When any aggregated result is inconsistent with the corresponding record value, a recalculation task is generated. The corresponding points sub-account is reconstructed according to the recalculation task, and the withdrawable points matching record is updated.

[0015] The key innovations of this invention include: (1) Using the order scoring time point as a unified time benchmark, the effective multi-level agency relationship is solidified into an agency relationship snapshot, and the agency relationship snapshot, order status version and points rule version are jointly associated with the order scoring context and subsequent points contribution records.

[0016] (2) Based on the change in effective premium between the effective premium and the effective premium that has been scored, the individual point contribution record of the sales agent and the team point contribution record of the superior agents at all levels are formed respectively; the positive point contribution record and the negative point contribution record are both snapshotted along the same agency relationship and refer to the same point rule version.

[0017] (3) Form individual point contribution records and team point contribution records into individual point batches and team point batches with generation time and point expiration time respectively, perform equivalent matching according to available points and save source batch identifier; when the source point batch has point reversal or expiration, remove the corresponding matching relationship, update the point batch and perform equivalent matching again.

[0018] The following are its main beneficial effects: (1) By associating the agency relationship snapshot, order status version and points rule version at the time of order scoring, the reprocessing of historical insurance orders after changes in agency relationship or points rules still corresponds to the original scoring conditions, reducing the situation of changes in points attribution, rule mismatch and difficulty in tracing historical calculation results.

[0019] (2) By driving the positive or negative contribution records of individual points and multi-level team points through effective premium changes, the increase of premiums, partial refunds, surrenders or cancellations are associated with the affected sales agents and superior agents, reducing duplicate scoring, full recalculation and misalignment of points correction targets.

[0020] (3) By matching the source level of individual points batches and team points batches, the withdrawable points can correspond to the two specific source batches. When the source points are reversed or expire, the original matching can be canceled and the withdrawable points status can be reconstructed according to the source batch identifier, thereby reducing the asynchrony between the status of individual points, team points and withdrawable points. Attached Figure Description

[0021] Figure 1 This is a flowchart illustrating a method for calculating sales points for multi-level insurance agents, provided as an embodiment of the present invention. Detailed Implementation

[0022] Example 1: Refer to Figure 1 This is a flowchart illustrating a method for calculating sales points for multi-level insurance agents according to an embodiment of the present invention. The process may include at least steps S100-S400: S100: Obtain insurance order status events, agency relationship records, points rule records, and processed order status records; when the insurance order status event meets the points processing conditions and the processing identifier formed by the order identifier and the order status version is not recorded, if there is no order scoring context associated with the order identifier, then filter valid agency relationship records and valid points rule records according to the sales agent identifier and the order scoring time point, and generate and save an order scoring context containing an agency relationship snapshot, points rule version, and points calculation parameters; if it exists, then read the saved order scoring context; S200. Based on the order scoring context and the processed order status record, calculate the effective premium change amount between the effective premium and the scored effective premium; generate individual points contribution records and team points contribution records according to the effective premium change amount, and associate them with the order status version, the agency relationship snapshot, and the points rule version to form an order points change record set; save the order points change record set and then update the processed order status record. S300. Based on the order points change record set, update the individual points sub-account and team points sub-account according to the beneficiary agent identifier and points type; according to the positive individual points contribution records and positive team points contribution records in the order points change record set, form individual points batches and team points batches respectively; for the same beneficiary agent's available individual points batches and available team points batches, perform equal-value matching according to the points expiration time, record the source batch identifier and matching points value, and generate withdrawable points matching records; S400. When a source points batch experiences a points reversal or expires, the corresponding withdrawable points matching record is released according to the source batch identifier, the source points batch is updated, and the available individual points batch and available team points batch of the same beneficiary agent are re-equalized to generate a points processing status.

[0023] S100: Obtain insurance order status events, agency relationship records, points rule records, and processed order status records; when the insurance order status event meets the points processing conditions and the processing identifier formed by the order identifier and order status version is not recorded, if there is no order scoring context associated with the order identifier, then filter valid agency relationship records and valid points rule records according to the sales agent identifier and the order scoring time point, and generate and save an order scoring context containing an agency relationship snapshot, points rule version, and points calculation parameters; if it exists, then read the saved order scoring context: This implementation runs on the points calculation server of the insurance agent aggregation platform. The points calculation server is connected to the insurance order service, agency relationship service, points rules service, and points ledger. The insurance order service sends an insurance order status event to the points calculation server after a change in the underwriting status, premium status, or cancellation status of an insurance order. The agency relationship service stores the hierarchical relationships between insurance agents and their validity periods. The points rules service stores the individual points ratios used for different effective periods, the team points ratios corresponding to each agency level, and the points validity period. The points ledger stores the previous points processing status of insurance orders and the individual and team points status of each insurance agent.

[0024] Insurance order status events include order identifier, sales agent identifier, order status, order status version, valid premium, and the time the status occurred. An order status version corresponds to a single status change for the same insurance order. A new order status version is created when an order changes from a pending underwriting status to an underwriting confirmed status; a new order status version is created when premium amendments, partial refunds, policy cancellations, or rescissions occur after underwriting. Upon receiving an insurance order status event, the points calculation server first queries the processed order status records according to the order identifier, and then checks whether a new order status version already exists. If a new order status version already exists, this event is considered a duplicate order event and will not be entered into the points calculation process; if a new order status version does not yet exist, the server continues to check whether the order status meets the points processing conditions.

[0025] In one implementation, the underwriting confirmation status is set as a condition for points processing. When an insurance order first changes to the underwriting confirmation status, the points calculation server uses the corresponding status occurrence time as the order scoring point. In another implementation, the premium payment confirmation status is set as a condition for points processing, and the order scoring point is the occurrence time of the premium payment confirmation event. When an order is in a pending underwriting, payment failure, or premium not yet confirmed status, the points calculation server retains the insurance order status event but does not form an order scoring context. Points calculation is initiated again with a new order status event after the order subsequently enters the points processing status.

[0026] Once the order scoring time is determined, the points calculation server retrieves agency relationship records from the agency relationship service, starting with the sales agent's identifier. Each agency relationship record includes the lower-level agent's identifier, the direct superior agent's identifier, the relationship's effective time, the relationship's expiration time, and the relationship status. The points calculation server filters agency relationship records whose order scoring time falls between the relationship's effective time and expiration time, and whose relationship status is valid. If the relationship's expiration time is empty, the agency relationship record is considered to still be valid at the order scoring time. If the order scoring time is earlier than the relationship's effective time or not earlier than the relationship's expiration time, the agency relationship record does not participate in the points allocation for the current insurance order.

[0027] After filtering the direct superior agency relationships, the points calculation server queries upwards layer by layer along the direct superior agent identifier. First, the sales agent's direct superior agent is identified as the first-level superior agent; then, using the first-level superior agent as a subordinate agent, the server queries their direct superior agent, and the query result is identified as the second-level superior agent; subsequently, using the second-level superior agent as a subordinate agent, the server queries the third-level superior agent. The sales agent, first-level superior agent, second-level superior agent, and third-level superior agent form a multi-level agency relationship according to the agency hierarchy. This multi-level agency relationship is associated with the order identifier to form an agency relationship snapshot. Subsequent changes in the order status continue to reference this agency relationship snapshot, and the points allocation of the original insurance order will not be changed due to subsequent adjustments to the current agency relationship.

[0028] During the layer-by-layer query process, the points calculation server stores the identified agent identifiers. If the identifier of the direct superior agent to be determined is the same as a stored sales agent identifier or any superior agent identifier, it indicates that there are duplicate agent nodes or agent relationship loops in the agency relationship. The points calculation server generates a relationship anomaly identifier and terminates the query for the abnormal agency level and its subsequent agency levels; the agency relationships already determined before the abnormal level are still retained in the agency relationship snapshot. If no valid direct superior agent identifier is found at a certain agency level, the points calculation server stops determining that agency level and its subsequent agency levels, and does not allocate team points to the non-existent superior agent.

[0029] After the agency relationship snapshot is formed, the points calculation server queries the points rule records according to the order scoring time. The points rule records include the rule version, effective period, individual points ratio, first-level team points ratio, second-level team points ratio, third-level team points ratio, and points validity period. When the order scoring time falls within the effective period of a points rule record, the rule version of that record is determined as the points rule version for the current insurance order. When two points rule records with overlapping effective periods correspond to the same order scoring time, one record is selected from the last to the first according to the rule's effective time, and the unselected record is marked as a rule conflict. If no points rule record with an effective period covering the order scoring time is found, the insurance order is placed in a rule pending confirmation state, and the process does not proceed to S200.

[0030] In one implementation, the order scoring context also includes a level parameter. The points calculation server uses the order scoring point as the end of the historical time window and reads the sales agent's valid insurance orders within the historical time window from the historical order database. For historical insurance orders in the underwriting confirmation state and without full refunds, their valid premiums are included in the accumulation; insurance orders with full refunds are not included in the accumulation; insurance orders with partial refunds are accumulated based on the valid premiums after the refund. The points calculation server matches the accumulated valid insurance order premiums with multiple pre-configured premium ranges to obtain the corresponding premium quantification level.

[0031] The number of valid policy-issuing agents for first-level subordinate agents is counted based on the first-level subordinate agent relationship at the time of order scoring. The points calculation server reads the valid insurance orders of each first-level subordinate agent within the historical time window and removes duplicates according to the agent identifier. If the same first-level subordinate agent has multiple valid insurance orders within the historical time window, only one valid policy-issuing agent is counted. If a first-level subordinate agent's insurance order has been fully refunded before the order scoring time, it is not included in the number of valid policy-issuing agents. Subsequently, the points calculation server queries the level parameter configuration based on the premium quantification level and the number of valid policy-issuing agents to obtain the level parameters corresponding to the sales agent's current order.

[0032] The order scoring context consists of the order identifier, order status version, order scoring time, sales agent identifier, valid premium, scored valid premium, multi-level agency relationship, agency relationship snapshot, points rule version, individual points ratio, team points ratio for each agency level, points validity period, and level parameters. The scored valid premium is obtained from the processed order status record; when an insurance order first enters the points processing state, the scored valid premium is recorded as 0. The order scoring context is submitted to S200, which directly uses the agency relationship snapshot, points rule version, valid premium, scored valid premium, and level parameters, without re-querying the current agency relationship or current points rule based on the processing time.

[0033] S200. Based on the order scoring context and the processed order status record, calculate the effective premium change amount between the effective premium and the scored effective premium; generate individual points contribution records and team points contribution records according to the effective premium change amount, and associate them with the order status version, the agency relationship snapshot, and the points rule version to form an order points change record set; after saving the order points change record set, update the processed order status record: After receiving the order scoring context generated by S100, the points contribution generation unit first generates a processing identifier based on the order identifier and order status version, and then compares this processing identifier with the processed order status records. If the same processing identifier exists in the processed order status records, the points contribution generation unit ends the current processing and does not generate duplicate individual points contribution records and team points contribution records. If the processing identifier does not yet exist, the points contribution generation unit reads the valid premium and the already scored valid premium from the order scoring context and calculates the change in valid premium corresponding to the current order status change.

[0034] When an insurance order first enters the points processing stage, the valid premium with accumulated points is 0. The change in valid premium is taken as the current valid premium, and the recording direction is set to positive. When the insurance order experiences a premium increase, the valid premium is greater than the valid premium with accumulated points, and the difference is recorded as a positive change in valid premium. When the insurance order experiences a partial refund, premium reduction, full refund, or cancellation, the valid premium is less than the valid premium with accumulated points, and the difference is recorded as a negative change in valid premium. When the valid premium and the valid premium with accumulated points are the same, no points contribution record is generated; only the order status version is updated to the processed order status record.

[0035] Individual contribution records are generated based on valid premium changes, individual contribution ratios, and grade parameters. For positive valid premium changes, the contribution generation unit converts the valid premium change into basic individual points according to the individual contribution ratio, and then adjusts the basic individual points according to the grade parameters to obtain the positive change contribution value. For negative valid premium changes, the absolute value is first subjected to the same proportional conversion and grade parameter processing, and then the recording direction is set to negative. The recording direction and the change contribution value are stored separately. The change contribution value uses a non-negative value, and subsequent contribution sub-ledgers add or deduct points based on the recording direction.

[0036] The rating parameters use values ​​already fixed in the order scoring context. Even if the sales agent changes the current rating parameters when canceling the order later, the negative individual points contribution record still references the rating parameters and points rule version in the original order scoring context. This process ensures that positive points for the same insurance order and subsequent reversals of positive points use the same calculation conditions. If the original order scoring context is missing, the points contribution generation unit sets the order to a scoring context missing state and does not directly use the current rating parameters as a substitute.

[0037] Team contribution records are generated layer by layer according to the agency relationship snapshot. The contribution generation unit reads the first-level superior agent's identifier from the agency relationship snapshot and generates a first-level team contribution record based on the effective premium change amount and the first-level team contribution ratio; after reading the second-level superior agent's identifier, it generates a second-level team contribution record based on the second-level team contribution ratio; after reading the third-level superior agent's identifier, it generates a third-level team contribution record based on the third-level team contribution ratio. If a superior agent at a certain level is missing from the agency relationship snapshot, no team contribution record is generated for that level and subsequent levels.

[0038] In one implementation, team point contribution records are directly calculated based on the effective premium change amount of the current insurance order. When a sales agent generates a new effective insurance order, the order generates team point contributions for the corresponding levels of the first-level, second-level, and third-level superior agents in the agency relationship snapshot. If a partial refund occurs after the insurance order, the point contribution generation unit still generates negative team point contributions along the original agency relationship snapshot, without re-querying the agency relationship at the time of the refund. Thus, increases and decreases in team points for the same insurance order fall within the same range of superior agents.

[0039] Both individual and team points contribution records are linked to the source insurance order. Each record includes the source order identifier, order status version, beneficiary agent identifier, points type, record direction, changed points value, agency relationship snapshot identifier, rule version identifier, generation time, and points expiration time. In individual points contribution records, the beneficiary agent is the sales agent, and the points type is individual points; in team points contribution records, the beneficiary agent is the superior agent at the corresponding level, and the points type is team points generated at the corresponding level. The points expiration time is determined by both the generation time and the points validity period.

[0040] For negative points contribution records, the points contribution generation unit also retrieves the original positive points contribution records according to the source order identifier, beneficiary agent identifier, and points type. When an original positive points contribution record is retrieved, its identifier is associated with the negative points contribution record. If the negative change points value is less than the unreversed positive points of the original positive contribution record, this is considered a partial reversal; if the negative change points value is not less than the unreversed positive points of the original positive contribution record, the entire unreversed portion of the original positive contribution record is included in this reversal. Negative points exceeding the original positive contribution portion enter a pending deduction status and will be deducted from newly added points of the same type by the same beneficiary agent according to the platform configuration.

[0041] Individual point contribution records and multiple team point contribution records generated under the same order status version use the same point change batch identifier and together constitute the order point change record set. The point contribution generation unit first saves the complete order point change record set, and then updates the order status version and the valid premium that has been scored in the processed order status record. If the order point change record set is not completely saved, the processed order status record is not updated; when the same insurance order status event is received again later, it will still be re-executed according to the original processing identifier. After the order point change record set is completely saved, it is submitted to S300, and S300 updates the corresponding point sub-ledger according to the beneficiary agent and point type.

[0042] S300. Based on the order points change record set, update the individual points sub-account and team points sub-account according to the beneficiary agent identifier and points type; according to the positive individual points contribution records and positive team points contribution records in the order points change record set, form individual points batches and team points batches respectively; for the same beneficiary agent's available individual points batches and available team points batches, perform equal-value matching according to the points expiration time, record the source batch identifier and matching points value, and generate withdrawable points matching records; After receiving the order points change record set, the points ledger and matching update unit group the records according to the beneficiary agent identifier, and then update the individual points sub-ledger and team points sub-ledger separately according to points type. Individual points contribution records are written to the sales agent's individual points sub-ledger; first-level team points contribution records, second-level team points contribution records, and third-level team points contribution records are all written to the corresponding beneficiary agent's team points sub-ledger, and the agent level and source order identifier are retained in the team points sub-ledger. Individual points sub-ledgers and team points sub-ledgers are accounted for separately, and the two types of points are not directly merged into a single balance.

[0043] When positive individual point contribution records are written to the individual point sub-ledger, the point ledger and matching update unit form individual point batches based on the generation time and point expiration time. When positive team point contribution records are written to the team point sub-ledger, team point batches are formed in the same way. Each point batch stores a batch identifier, source contribution record identifier, generation time, point expiration time, initial points, available points, matched points, withdrawn points, and reversal points. Point contributions from different insurance orders form point batches with distinguishable sources; points of the same type generated from the same order and the same status version are grouped into the same point batch in one implementation.

[0044] When negative point contribution records exist in the order points change record set, the points ledger and matching update unit locate the corresponding points batch based on the original contribution record identifier. If the corresponding points batch has not yet participated in the cashable points matching, the available points for that batch are directly reduced according to the negative change point value, and positive points are added. If the corresponding points batch has already participated in the cashable points matching, the batch is first marked as pending unmatching, and then S400 is used to unmatch the corresponding cashable points based on the source batch identifier. If all points in a batch have been cashed out, the portion that cannot be directly deducted from the available points is written into the pending deduction points. When new points of the same type are added to the sub-ledger, the pending deduction points are deducted first.

[0045] After individual and team point batches are updated, the point ledger and matching update unit respectively filter out point batches eligible for matching. Point batches participating in matching must simultaneously meet the following conditions: points have not reached their expiration date, are not in a withdrawal state, are not occupied by other withdrawal requests, and have not been fully reversed. When a portion of a point batch has already been matched, the remaining available points continue to participate in subsequent matching. Point batches with 0 available points are not included in this matching sequence.

[0046] The matching order is arranged from first to last according to the expiration time of the points. Individual point batches and team point batches form ordered sequences. The point ledger and matching update unit start comparing available points from the first batch of each sequence. If the available point values ​​of the two batches are different, the smaller value is used as the matching point value for this time; the batch with fewer available points is removed from the matching sequence after this matching, while the batch with more available points retains its remaining portion and continues to match with the next batch in the other sequence. If the expiration times of the points in two batches are the same, they are arranged from first to last according to the generation time.

[0047] For example, an insurance agent's personal points sub-ledger contains a personal points batch P1 with 120 available points, expiring on April 30th; the team points sub-ledger contains a team points batch T1 with 80 available points, expiring on March 31st. The points ledger and matching update unit first matches the 80 points in P1 with the 80 points in T1, leaving P1 with 40 points and T1 with 0 available points. When the team points sub-ledger subsequently contains a team points batch T2 with an expiration date of April 15th and 50 available points, the remaining 40 points in P1 are matched with the 40 points in T2, leaving T2 with 10 points. Each match saves its source batch separately, avoiding merging two matches into a single, indistinguishable aggregate value.

[0048] Each successful matching of equal value results in a new record of withdrawable points in the points ledger and matching update unit. This record includes the agent identifier, individual points batch identifier, team points batch identifier, matched points value, matching status, and matching time. Matched points in both individual and team points batches increase synchronously, while available points decrease synchronously. Withdrawable points are the sum of multiple matched points currently in a valid matching state. Any unmatched differences in individual or team points remain in the corresponding sub-ledger and are not added to the current withdrawable points.

[0049] Upon receiving a withdrawal request, the points ledger sequentially occupies the matching records of withdrawable points according to the withdrawal amount. When each matching record is occupied, its corresponding individual points source batch and team points source batch simultaneously enter the occupied state; after the withdrawal is completed, the corresponding points in both types of source batches are converted into withdrawn points. When the withdrawal request is cancelled, the occupied state is released, and the matching record is restored to the unoccupied state. At the end of this step, the points ledger and matching update unit generate updated individual points sub-ledgers, team points sub-ledgers, withdrawable points matching records, and agent points status; the source batch identifier and matching status are retrieved by S400 when points are reversing or expiring.

[0050] S400. When a source points batch experiences a points reversal or expires, the corresponding withdrawable points matching record is released based on the source batch identifier, the source points batch is updated, and the available individual points batch and available team points batch for the same beneficiary agent are re-equalized to generate a points processing status. The points status feedback unit receives points reversal events, points expiration events, or ledger verification tasks. Points reversal events originate from negative points contribution records generated by S200; points expiration events are triggered by the points ledger according to the points expiration time of the points batch; ledger verification tasks are initiated according to a preset verification cycle, or when the order points change record set is successfully saved but the points sub-ledger update fails. All three types of triggering objects carry a beneficiary agent identifier and a corresponding points batch identifier, which the points status feedback unit uses to limit the range of points that need to be processed in this instance.

[0051] When a point reversal occurs in a source points batch, the points status feedback unit first reads the available points, matched points, withdrawn points, and reversal points for that batch. If the negative change in points does not exceed the available points, it is directly deducted from the available points; if the negative change in points exceeds the available points, the available points are first reduced to 0, and then the available points matching record is queried based on the source batch identifier. If the source points batch is an individual points batch, the matching team points batch is also retrieved; if the source points batch is a team points batch, the matching individual points batch is also retrieved.

[0052] When deregistering a matching record for withdrawable points, first change the matching status of the record to "deregistered," then release the uncorrected matching points to the corresponding individual and team point batches. Negative changes to point values ​​only affect one source batch; points originally occupied by matching in the other source batch are restored to available points. Batches subject to correction retain their initial points, with correction points added based on the negative change value, and available and matched points updated accordingly. When a source point batch corresponds to multiple matching records, deregister from latest to earliest matching time until the released matching points cover the required correction value.

[0053] For example, individual points batch P1 and team points batch T1 form a matching record of 80 points. P1 subsequently incurs a negative individual points contribution record of 30 points due to a partial refund of the original insurance order. The points status feedback unit cancels the original 80-point matching, restoring the 80 points in T1 to usable points; P1 retains 50 points after the 30-point deduction. Then, an equivalent matching is re-performed with the updated P1 and T1, forming a new matching record of 50 points. T1's remaining 30 points are in an unmatched state. The original matching record is retained but marked as canceled, and the new matching record is associated with both P1 and T1.

[0054] When a batch of source points expires, the points status feedback unit first checks if there are any unused and unwithdrawn redeemable points matching records for that batch. If no matching record exists, the remaining available points for that batch are updated to expired points. If a matching record exists, the corresponding match is released according to the source batch identifier, the points from the other source batch that have not yet expired are restored to available points, and the remaining points of the expired batch are updated to expired status. Matching records that have entered the withdrawal completion status are not involved in the expiration release, and their points status remains in the withdrawn status.

[0055] After completing the reversal or expiration update, the points status feedback unit rereads the agent's personal and team points sub-ledgers, filters out points batches that are not yet expired, not withdrawn, not occupied, not fully reversed, and have available points greater than zero, and then performs equivalent matching according to the points expiration time order in S300. The rematch only uses points currently in an available state and does not regenerate personal or team points contribution records. The newly formed withdrawable points matching record uses a new matching record identifier, while previously de-matched records retain their source batch and reason for de-matching.

[0056] When an insurance order is cancelled or its premium is revised, negative points contribution records are generated based on the original agency relationship snapshot and the original points rule version. Taking order O1 as an example, the effective premium corresponding to order status version V1 is 10,000 yuan, and the subsequent order status version V2 adjusts the effective premium to 8,000 yuan; S200 generates a negative personal points contribution record and a multi-level negative team points contribution record corresponding to the 2,000 yuan premium difference. S400 respectively locates the sales agent's personal points batch and the team points batch of each superior agent. If a superior agent has left the current agency relationship after scoring for order V1, their team points are still deducted according to the original agency relationship snapshot of order O1, and the positive points are not transferred to the new superior agent.

[0057] After points processing is complete, the points status feedback unit aggregates individual and team points contribution records from all order points change record sets associated with the benefiting agent, according to the benefiting agent's identifier. During aggregation, positive points contribution records are added, negative points contribution records are deducted, and revoked abnormal records are not included in the aggregation. The aggregated value of individual points contribution records is compared with the individual points record value in the individual points sub-ledger, and the aggregated value of team points contribution records is compared with the team points record value in the team points sub-ledger. When the two values ​​match, the ledger verification status is updated to "passed"; if there is a difference, a recalculation task is generated.

[0058] The recalculation task uses the set of all order point change records associated with the benefiting agent as its source, without directly modifying the single aggregate balance. The point status feedback unit extracts point contribution records from the set of all order point change records, arranges the point contribution records according to the source order identifier, order status version, and record direction, and reconstructs the personal point sub-ledger based on the point type corresponding to the recalculation task, when the personal point aggregation result is inconsistent with the record value of the personal point sub-ledger; when the team point aggregation result is inconsistent with the record value of the team point sub-ledger, the team point sub-ledger is reconstructed based on the arranged team point contribution records; after the sub-ledger reconstruction is completed, all records that have not been withdrawn in the original withdrawable point matching record are removed, and then the equivalent matching is re-executed based on the reconstructed personal point batch and team point batch.

[0059] Finally, the points status feedback unit generates the points processing status. The points processing status includes the processing result of the order status version, the points reversal result, the points batch expiration result, the matching cancellation result, the re-matching result, and the ledger verification result. The latest order status version corresponding to the order identifier, the latest valid premium with accumulated points, and the processing identifier are updated to the processed order status record; the updated processed order status record will be read by S100 when the next status event for the same insurance order arrives, and will be used in S200 as the basis for calculating the next valid premium change.

Claims

1. A method for calculating sales points for multi-level insurance agents, characterized in that, include: S100, obtain insurance order status events, agency relationship records, points rule records, and processed order status records; When the insurance order status event meets the points processing conditions and the processing identifier formed by the order identifier and the order status version is not recorded, if there is no order scoring context associated with the order identifier, then the valid agency relationship record and valid points rule record are filtered according to the sales agent identifier and the order scoring time point, and an order scoring context containing the agency relationship snapshot, points rule version and points calculation parameters is generated and saved. If it exists, read the saved order scoring context; S200. Based on the order scoring context and the processed order status record, calculate the effective premium change amount between the effective premium and the scored effective premium. Based on the effective premium change amount, generate individual points contribution records and team points contribution records, and associate them with the order status version, the agency relationship snapshot, and the points rule version to form an order points change record set; After saving the order points change record set, update the processed order status record; S300. Based on the order points change record set, update the individual points sub-account and team points sub-account according to the beneficiary agent identifier and points type; Based on the positive individual point contribution records and positive team point contribution records in the order point change record set, individual point batches and team point batches are formed respectively; For the same beneficiary agent, the available personal points batch and available team points batch are matched equally according to the points expiration time, the source batch identifier and the matched points value are recorded, and a cashable points matching record is generated. S400. When a source points batch experiences a points reversal or expires, the corresponding withdrawable points matching record is released according to the source batch identifier, the source points batch is updated, and the available individual points batch and available team points batch of the same beneficiary agent are re-equalized to generate a points processing status.

2. The method according to claim 1, characterized in that, The insurance order status event includes the order identifier, sales agent identifier, order status, order status version, valid premium, and the time when the status occurred; When there is no order scoring context associated with the order identifier, the moment when the insurance order first reaches the points processing condition is determined as the order scoring point, and the valid premium that has been scored is determined to be zero; The conditions for processing points include insurance orders reaching the underwriting confirmation status or premium payment confirmation status for the first time, and insurance orders with established order scoring contexts experiencing premium increases, premium reductions, partial refunds, full refunds, or cancellations. When a saved order scoring context exists, the order scoring time point, the valid premium for which points have been scored, and the order scoring context identifier are read from the processed order status record, and the original agency relationship snapshot, the original points rule version, and the original points calculation parameters are read according to the order scoring context identifier.

3. The method according to claim 2, characterized in that, The agency relationship record includes the lower-level agent identifier, the direct superior agent identifier, the time when the relationship takes effect, the time when the relationship expires, and the relationship status; Starting with the sales agent identifier, filter agent relationship records where the relationship status is valid, the order scoring time is not earlier than the relationship effective time, and the relationship expiration time is empty or the order scoring time is earlier than the relationship expiration time. The first-level, second-level, and third-level agents are identified layer by layer along the direct superior agent identifier, and the sales agent, the first-level agent, the second-level agent, and the third-level agent are associated as a snapshot of the agency relationship.

4. The method according to claim 3, characterized in that, During the process of determining the first-level superior agent, the second-level superior agent, and the third-level superior agent layer by layer, the identified agent identifiers are recorded; When the identifier of the direct superior agent to be determined is the same as the identifier of the agent that has already been determined, an abnormal relationship identifier is generated and the determination of the corresponding agent level and subsequent agent levels is terminated. When there is no direct superior agent identifier with a valid relationship status, the determination of the corresponding agent level and subsequent agent levels is stopped.

5. The method according to claim 3, characterized in that, The points rules record includes the rule version, effective period, individual points ratio, first-level team points ratio, second-level team points ratio, third-level team points ratio, and points validity period; Filter the points rule records where the order scoring time point is within the effective interval, and determine the filtered rule version as the points rule version; The order scoring context also includes the individual points ratio, the first-level team points ratio, the second-level team points ratio, the third-level team points ratio, and the points validity period.

6. The method according to claim 5, characterized in that, The order scoring context also includes a rating parameter; The determination of the level parameters includes: Using the order scoring point as the end of the historical time window, the premiums of valid insurance orders of the sales agent within the historical time window are calculated; the length of the historical time window is determined by the window parameters corresponding to the scoring rule version. The premium quantification level is determined based on the premium range to which the valid insurance order premium belongs; Agents who have a direct subordinate agency relationship with the sales agent are identified as first-level subordinate agents. The number of valid order-issuing agents among the first-level subordinate agents is deduplicated to obtain the number of valid order-issuing agents. The level parameter is determined based on the premium quantification level and the number of valid policy-issuing agents.

7. The method according to claim 2, characterized in that, A processing identifier is generated based on the order identifier and the order status version; When the processing identifier is already recorded in the processed order status record, the order points change record set is not generated; When the effective premium is greater than the quantified effective premium, the difference between the two is determined as the positive effective premium change amount; When the effective premium is less than the quantified effective premium, the difference between the two is determined as a negative effective premium change.

8. The method according to claim 6, characterized in that, The individual points contribution record is generated based on the effective premium change amount, the individual points ratio, and the level parameters. The first-level team points contribution record of the first-level superior agent is generated based on the effective premium change amount and the first-level team points ratio; The secondary team contribution record of the secondary superior agent is generated based on the effective premium change amount and the secondary team points ratio; The third-level team points contribution record of the third-level superior agent is generated based on the effective premium change amount and the third-level team points ratio; The team contribution record includes the first-level team contribution record, the second-level team contribution record, and the third-level team contribution record.

9. The method according to claim 8, characterized in that, Both the individual points contribution record and the team points contribution record include the source order identifier, order status version, beneficiary agent identifier, points type, record direction, changed points value, agent relationship snapshot identifier, rule version identifier, generation time, and points expiration time; According to the beneficiary agent identifier and the points type, positive individual points contribution records are formed into individual points batches, and positive team points contribution records are formed into team points batches. For the same beneficiary agent, select individual and team point batches that are not yet due, not withdrawn, not occupied, not fully reversed, and have available points greater than zero. Sort the individual and team point batches according to their point expiration times from first to last. Select the first point batch in each of the two sorted sequences and determine the smaller value of the available points of the two first point batches as the matching point value. When the available points of any first point batch become zero, remove the first point batch from the corresponding sorted sequence and continue to select the next point batch for matching. Write the beneficiary agent identifier, individual points batch identifier, team points batch identifier, and the matched points value into the withdrawable points matching record.

10. The method according to claim 9, characterized in that, Associate negative individual or team point contribution records with original positive point contribution records, and locate the corresponding source point batch based on the original positive point contribution records; when the source point batch has been written into the withdrawable point matching record, remove the corresponding withdrawable point matching record based on the source batch identifier. Keep the initial points of the source points batch unchanged, add positive points according to the negative change points value and update the available points and matched points, and re-match the individual points batch and team points batch of the same beneficiary agent after the update. According to the beneficiary agent identifier, all individual points contribution records and all team points contribution records associated with the beneficiary agent are aggregated respectively. The aggregated individual points result is compared with the record value of the individual points sub-account, and the aggregated team points result is compared with the record value of the team points sub-account. When any aggregated result is inconsistent with the corresponding record value, a recalculation task is generated. The corresponding points sub-account is reconstructed according to the recalculation task, and the withdrawable points matching record is updated.