An AI-based pension treatment dynamic multi-thread generation method, device and medium

By constructing an AI prediction model and a heterogeneous computing resource zone, the problem of task scheduling and resource allocation in pension benefit calculation is solved by dynamically allocating resources, thereby achieving efficient utilization of computing resources and improved throughput performance.

CN121210145BActive Publication Date: 2026-02-10YILIANZHONG MINSHENG (XIAMEN) TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511755732.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-27
Publication Date
2026-02-10
Estimated Expiration
2045-11-27

AI Technical Summary

Technical Problem

Existing methods for calculating pension benefits lack dynamic awareness in task scheduling and resource allocation, leading to disordered competition for computing resources and mismatched resource allocation, resulting in blocking of computationally intensive tasks and low throughput performance.

Method used

By constructing an AI prediction model to generate a classification result mapping table, dividing the task into sub-queues and configuring heterogeneous computing resource areas, combining dedicated and general thread pools for task computation, and dynamically allocating resources based on complexity and priority.

Benefits of technology

It achieves accurate quantitative assessment of computational task complexity and adaptive resource matching, improving resource utilization and computational efficiency, and avoiding resource waste and blockage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121210145B_ABST
    Figure CN121210145B_ABST
Patent Text Reader

Abstract

The application discloses an AI-based pension treatment dynamic multi-thread generation method and device and a medium, relates to the technical field of computer information processing, and comprises the following steps: receiving a batch pension treatment calculation request, obtaining a to-be-calculated personnel queue and corresponding associated feature data according to the batch pension treatment calculation request; constructing an AI prediction model, inputting the associated feature data into the AI prediction model for data analysis, and generating a classification result mapping table; dividing the to-be-calculated personnel queue into task sub-queues according to the complexity level in the classification result mapping table, formulating corresponding calculation resource quotas based on the priority of each task sub-queue, and integrating the calculation resource quotas of the task sub-queues to form a heterogeneous task grouping scheme. Through the construction of the AI prediction model, intelligent analysis is performed on the associated feature data, and a classification result mapping table is generated, so that accurate quantitative evaluation and automatic grading of the complexity of batch calculation tasks are realized, and the defect that the calculation strength of a task cannot be effectively identified is overcome.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer information processing technology, and in particular to an AI-based method for dynamically generating multi-threaded pension benefits. Background Technology

[0002] In the field of pension security informatization, the application of artificial intelligence technology is gradually evolving from assisting decision-making in single business scenarios to intelligent services that integrate multi-source data. In recent years, thanks to improved computing power and optimized algorithm models, explorations have emerged in using machine learning methods for predictive analysis of pension benefit calculations. These methods typically integrate multi-dimensional features such as insured individuals' personal accounts, historical contributions, and wage income to construct predictive models to assist in benefit calculations. Related technological developments focus on improving the accuracy of individual benefit predictions and attempt to initially divide batch tasks by introducing parallel computing concepts, demonstrating the deepening application of data-driven and intelligent computing in social security services.

[0003] Existing methods have shortcomings. At the task scheduling level, scheduling mechanisms based on simple queues or static priorities lack the ability to dynamically perceive the inherent complexity of computational tasks. They cannot effectively distinguish the differences in computational intensity caused by factors such as the length of insurance coverage, the complexity of account structures, and the diversity of applicable policies. This can easily lead to disorderly competition for high-performance computing resources, causing computationally intensive tasks to block the processing pipeline. In addition, at the resource allocation level, the homogeneous computing resource allocation model is difficult to achieve precise matching with task complexity. It cannot allocate suitable lightweight computing units for lightweight computing tasks, nor can it dynamically allocate high-performance computing cores and large-capacity memory resources for complex tasks that require a large amount of historical data backtracking and policy rule matching, resulting in low throughput performance for batch computing. Summary of the Invention

[0004] In view of the aforementioned existing problems, the present invention is proposed.

[0005] Therefore, this invention provides an AI-based dynamic multi-threaded method for generating pension benefits to solve the problems of low resource utilization and insufficient batch computing throughput.

[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:

[0007] In a first aspect, the present invention provides an AI-based dynamic multi-threaded method for generating pension benefits, comprising: receiving a batch pension benefit calculation request; obtaining a queue of personnel to be calculated and corresponding associated feature data based on the batch pension benefit calculation request; constructing an AI prediction model; inputting the associated feature data into the AI ​​prediction model for data analysis; generating a classification result mapping table; dividing the queue of personnel to be calculated into task sub-queues according to the complexity level in the classification result mapping table; formulating corresponding computing resource quotas based on the priority of each task sub-queue; integrating the computing resource quotas of each task sub-queue into a heterogeneous task grouping scheme; configuring heterogeneous computing resource areas for task sub-queues of different priorities according to the heterogeneous task grouping scheme; driving the heterogeneous computing resource areas and the bound task sub-queues to perform pension benefit calculations to generate a preliminary benefit result set; and verifying and correcting the preliminary benefit result set based on a historical benefit feature database to generate a complete batch pension benefit calculation result.

[0008] As a preferred embodiment of the AI-based dynamic multi-threaded generation method for pension benefits described in this invention, the steps of receiving batch pension benefit calculation requests and obtaining the queue of individuals to be calculated and their corresponding associated feature data based on the batch pension benefit calculation requests are as follows:

[0009] Receive and parse batch pension benefit calculation requests issued by the task scheduler, and generate a set of personnel identifiers;

[0010] Build a business database, query the business database based on the personnel identifier set, and generate a queue of personnel to be calculated and the corresponding associated feature data.

[0011] As a preferred embodiment of the AI-based dynamic multi-threaded generation method for pension benefits described in this invention, the steps of constructing an AI prediction model, inputting associated feature data into the AI ​​prediction model for data analysis, and generating a classification result mapping table are as follows.

[0012] Building an AI prediction model based on a Transformer encoder;

[0013] The associated feature data is input into the AI ​​prediction model, and the AI ​​prediction model calculates and outputs the complexity score of each person to be calculated through the prediction process.

[0014] The complexity scores are mapped to complexity levels based on a preset complexity scoring threshold range. Each person to be calculated is associated with the corresponding complexity level, and a classification result mapping table is generated.

[0015] As a preferred embodiment of the AI-based dynamic multi-threaded generation method for pension benefits described in this invention, the specific steps for dividing the queue of personnel to be calculated into task sub-queues according to the complexity level in the classification result mapping table are as follows:

[0016] Based on the different complexity levels in the classification result mapping table, the queue of personnel to be calculated is divided into multiple task sub-queues, and each task sub-queue corresponds to a unique complexity level;

[0017] The priority of each task subqueue is assigned according to its complexity level.

[0018] As a preferred embodiment of the AI-based dynamic multi-threaded generation method for pension benefits described in this invention, the specific steps are as follows: First, based on the priority of each task sub-queue, corresponding computing resource quotas are determined; then, the computing resource quotas of each task sub-queue are integrated to form a heterogeneous task grouping scheme.

[0019] Based on the priority of each task sub-queue, the corresponding computing resource quota is determined by the proportional allocation method.

[0020] Integrate all task subqueues and their corresponding computing resource quotas to form a heterogeneous task grouping scheme;

[0021] The heterogeneous task grouping scheme records the mapping relationship between each task sub-queue, its corresponding priority, and computing resource quota.

[0022] As a preferred embodiment of the AI-based dynamic multi-threaded generation method for pension benefits described in this invention, the specific steps for configuring heterogeneous computing resource areas for task sub-queues of different priorities according to a heterogeneous task grouping scheme are as follows:

[0023] Heterogeneous computing resource areas are created for task subqueues of different priorities in a heterogeneous task grouping scheme using resource allocation methods.

[0024] The heterogeneous computing resource area includes a dedicated thread pool and a general-purpose thread pool;

[0025] Allocate corresponding temporary storage areas for dedicated thread pools and general thread pools.

[0026] As a preferred embodiment of the AI-based dynamic multi-threaded method for generating pension benefits according to the present invention, the specific steps for driving the heterogeneous computing resource area and the bound task sub-queue to perform pension benefit calculations and generate a preliminary benefit result set are as follows.

[0027] Based on the priority of each task sub-queue, each task sub-queue is bound to the corresponding dedicated thread pool and general thread pool respectively;

[0028] The dedicated thread pool and the general thread pool are driven to perform parallel computing to generate the amount of salary payable for each person in the current period, and the amount of salary payable for each person in the current period is temporarily stored in the corresponding temporary storage area;

[0029] Once all task subqueues have been calculated, all calculation results are aggregated from the corresponding temporary storage area to generate a preliminary treatment result set.

[0030] As a preferred embodiment of the AI-based dynamic multi-threaded generation method for pension benefits described in this invention, the specific steps for verifying and correcting the preliminary benefit result set based on a historical benefit feature database to generate complete batch pension benefit calculation results are as follows.

[0031] Load the historical benefits feature database, and perform matching analysis between the preliminary benefits result set and the historical benefits feature database to generate a set of abnormal record markers and correction suggestions;

[0032] By using the abnormal record markers and correction suggestion set, correction operations are performed on the abnormal records in the preliminary treatment result set to generate the corrected treatment result set;

[0033] The revised benefit result set is merged with the normal records in the preliminary benefit result set to generate a complete batch pension benefit calculation result.

[0034] In a second aspect, the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, it implements any step of the AI-based dynamic multi-threaded method for generating pension benefits as described in the first aspect of the present invention.

[0035] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the AI-based dynamic multi-threaded method for generating pension benefits as described in the first aspect of the present invention.

[0036] The beneficial effects of this invention are as follows: By constructing an AI prediction model to intelligently analyze associated feature data and generate a classification result mapping table, it achieves accurate quantitative evaluation and automatic classification of the complexity of batch computing tasks, overcoming the defect of not being able to effectively identify the computing intensity of tasks, and laying a data foundation for subsequent accurate resource scheduling; by constructing a heterogeneous task grouping scheme and dynamically configuring a heterogeneous computing resource area that combines dedicated thread pools and general thread pools for task sub-queues of different priorities, it achieves adaptive matching of computing resources and task complexity, effectively solving the problems of high-performance resource waste and inefficient blocking caused by homogeneous resource allocation. Attached Figure Description

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

[0038] Figure 1 This is a flowchart of an AI-based dynamic multi-threaded method for generating pension benefits.

[0039] Figure 2 A flowchart for generating a classification result mapping table.

[0040] Figure 3 A flowchart for integrating and generating heterogeneous task grouping schemes.

[0041] Figure 4 A flowchart for generating complete batch pension benefit calculation results. Detailed Implementation

[0042] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0043] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0044] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.

[0045] Reference Figures 1-4 This is one embodiment of the present invention, which provides an AI-based dynamic multi-threaded method for generating pension benefits, including the following steps:

[0046] S1. Receive batch pension benefit calculation requests, obtain the queue of people to be calculated and the corresponding related feature data according to the batch pension benefit calculation requests; build an AI prediction model, input the related feature data into the AI ​​prediction model for data analysis, and generate a classification result mapping table.

[0047] S1.1 Receive the batch pension benefit calculation request sent by the task scheduler, and obtain the queue of people to be calculated and the corresponding associated feature data through the business database query.

[0048] It should be noted that business data such as enrollment registration, payment declaration, salary declaration, benefit verification, and policy maintenance are obtained from multiple channels including social security agencies, employers, and individual declarations. Based on the business data, a main personnel table, individual account table, social security history table, salary income table, policy parameter table, request batch table, batch pension benefit calculation result table, and exception record table are established in the MySQL database. The business database is constructed using a composite index based on personnel identifier, policy number, and calculation cycle.

[0049] After receiving the batch pension benefit calculation request from the task scheduler, the system first verifies the required elements such as batch number, timestamp, calculation period, policy number, and personnel scope, and parses out the personnel identifier set. Then, it queries the business database based on the personnel identifier set and the calculation period to generate a queue of personnel to be calculated, and removes missing fields and fields that are not within the calculation period range according to the personnel identifier.

[0050] Based on the queue of personnel to be calculated, the business database is used to retrieve the associated feature data, including personal account data, social security historical data, and salary income data, one by one according to the personnel identifier; the associated feature data is merged with the personnel identifier and the calculation period as the alignment key to generate a queue of personnel to be calculated and the corresponding associated feature data, which are sorted according to the order of batch pension benefit calculation requests.

[0051] S1.2 Build an AI prediction model based on the Transformer encoder;

[0052] It should be noted that the Transformer encoder is used as a hierarchical skeleton, and multiple coding blocks are stacked with the same configuration (meaning that the number of heads, hidden dimensions, activation types, layer normalization positions, and random deactivation insertion positions of multiple coding blocks are completely consistent, and the coding blocks do not share parameters). Each coding block contains a multi-head self-attention sub-layer and a feedforward sub-layer. Random deactivation is added between multiple coding blocks to suppress overfitting. A sequence convergence layer is set at the top of the stacked coding blocks. The sequence convergence layer is essentially a fixed convergence node that converges the entire sequence output by the top coding block and produces a single representation. It is constructed by combining the input interface, the sequence convergence operator, and the output interface. The input interface is connected to the top coding block, and the output interface is connected to the two-level projection head to output a single scalar complexity score. The multiple coding blocks, the sequence convergence layer, and the two-level projection head are integrated to complete the construction of the AI ​​prediction model.

[0053] Extract historically completed batch pension benefit calculation records from the business database, and align individual account data, social security historical data, and wage income data according to personnel identification and calculation cycle; define the segmented calculation cycle based on the policy effective boundary alignment method, and form a training set with batch pension benefit calculation records whose calculation cycle is shorter than the segmented calculation cycle, and form a validation set with batch pension benefit calculation records whose calculation cycle is greater than or equal to the segmented calculation cycle.

[0054] Set the batch size of the training set input and the maximum number of training epochs, use mean squared error as the loss function, and select Adam as the optimizer; input the associated feature data of batch size from the training set into the AI ​​prediction model to calculate the complexity score, expressed as follows:

[0055] ;

[0056] in, Indicates the complexity score; This represents an element-wise nonlinear activation function; This represents a sequence convergence operator used to output a single scalar; A mapping function representing the stacked coded blocks; Represents associated feature data; This represents the weight matrix of the first-level projection; This represents the bias vector of the first-order projection; This represents the weight matrix of the second-level projection; This represents the bias vector of the second-order projection;

[0057] The mean squared error is calculated based on the true labels of the training set, and the expression is as follows:

[0058] ;

[0059] in, Indicates mean square error; This represents the total number of samples in the training set; This represents the sample index, with values ​​ranging from 1 to... ; Indicates the first Complexity score for each sample; Indicates the first The true complexity score of each sample.

[0060] After each training round, the complexity score and validation mean squared error are calculated using the validation set. If the validation mean squared error does not improve or reaches the maximum training round in multiple consecutive training rounds, the AI ​​prediction model parameters at this time are taken as the optimal parameters, and the training of the AI ​​prediction model is completed.

[0061] S1.3 Input the associated feature data into the AI ​​prediction model, calculate and output the complexity score of each person to be calculated through the prediction process of the AI ​​prediction model; map the complexity score to a complexity level according to the preset complexity score threshold range, associate each person to be calculated with the corresponding complexity level, and generate a classification result mapping table.

[0062] It should be noted that, according to the order of personnel in the batch pension benefit calculation request, the associated feature data is input into the AI ​​prediction model, entering the multi-head self-attention sublayer of the first coding block, and the output is a weighted sequence representation. The sequence representation is summed with the associated feature data when entering the first coding block and layer normalization is performed, and the output is a stable sequence. The stable sequence is input into the feedforward sublayer, and the output is a transformed sequence after linear dimensionality increase, nonlinear transformation and linear dimensionality reduction. The transformed sequence is summed with the stable sequence and layer normalization is performed, and the output is the final sequence of the first coding block. The second coding block takes the final sequence of the first coding block as input and generates the weighted sequence representation, stable sequence, transformed sequence and the final sequence of the current coding block in the same order. Subsequent coding blocks inherit the final sequence of the previous coding block and output in the same order until the final sequence of the last coding block is obtained. The sequence convergence layer takes the final sequence of the last coding block as input and outputs a single representation. The two-level projection maps the single representation to intermediate representations in turn, obtains the activation representation through nonlinear transformation, and then maps it to a single scalar, which is the complexity score of the corresponding personnel.

[0063] The complexity score threshold is defined based on the complexity score distribution of historically completed batch pension benefit calculation records: First, all historical complexity scores obtained through AI prediction models are extracted from historically completed batch pension benefit calculation records, retaining historical complexity score records that are consistent with business standards, successfully executed, and without any supplementary records; the historical complexity score records are sorted in ascending order, each historical complexity score is numbered, and the "proportion of the scores up to this point" is calculated to form a cumulative distribution of scores; the cumulative distribution of scores is connected in ascending order to form a cumulative distribution curve, the slope of the cumulative distribution curve is calculated to form a slope sequence, the median of the slope sequence is used as the slope baseline, and the median absolute deviation of the slope sequence is used as the fluctuation amplitude. Find the point on the curve where the slope first does not fall below the slope baseline and fluctuation range from left to right. This is the lower limit of the low-level score, i.e., the lower limit of the complexity scoring threshold, for example, 0.35. Find the point to the right where the slope last does not fall below the slope baseline and fluctuation range. This is the upper limit of the medium-level score, i.e., the upper limit of the complexity scoring threshold, for example, 0.70. The range of values ​​for the lower and upper limits of the complexity scoring threshold is used as the complexity scoring threshold. An example range is 0.35 to 0.70. If the lower limit of the complexity scoring threshold is lower than 0.35, the low-level score will be judged too strictly, resulting in excessive consumption of resource quotas and a backlog of ordinary tasks. If the upper limit of the complexity scoring threshold is higher than 0.70, the judgment will be too lenient, resulting in decreased quality stability and reduced cost efficiency.

[0064] Each complexity score is compared with a complexity score threshold within an interval. Complexity scores below the lower limit of the complexity score threshold are recorded as the lowest level, complexity scores within the complexity score threshold are recorded as the middle level, and complexity scores above the upper limit of the complexity score threshold are recorded as the highest level. The complexity scores are associated with the complexity levels according to personnel identification and payout cycle to generate a classification result mapping table.

[0065] S2. Based on the complexity level in the classification result mapping table, divide the queue of personnel to be calculated into task sub-queues, and formulate corresponding computing resource quotas based on the priority of each task sub-queue. Integrate the computing resource quotas of each task sub-queue to form a heterogeneous task grouping scheme.

[0066] S2.1. Based on the different complexity levels in the classification result mapping table, the queue of personnel to be calculated is divided into multiple task sub-queues, and each task sub-queue corresponds to a unique complexity level.

[0067] It should be noted that the classification result mapping table is read and traversed row by row according to the personnel identifier order in the batch pension benefit calculation request; duplicates are removed using personnel identifier and calculation period as index keys, and only the latest valid data under the same index key is retained; valid data refers to multiple data entries with the same personnel identifier and the same calculation period appearing in the classification result mapping table, and the new and old data are determined according to the timestamp, the data with the latest timestamp is retained, and the other entries with the same index key are removed;

[0068] Create three task subqueues: a low-level task subqueue, a medium-level task subqueue, and a high-level task subqueue.

[0069] Valid data is assigned to the corresponding task subqueue according to its complexity level: low-complexity data is assigned to the low-complexity task subqueue, medium-complexity data is assigned to the medium-complexity task subqueue, and high-complexity data is assigned to the high-complexity task subqueue.

[0070] S2.2. Assign priority to each task sub-queue according to its complexity level;

[0071] It should be noted that each task subqueue is assigned a specific and unique priority number and priority weight according to its complexity level: the high-level task subqueue is set to priority number 3 and priority weight 3; the medium-level task subqueue is set to priority number 2 and priority weight 2; and the low-level task subqueue is set to priority number 1 and priority weight 1.

[0072] When assigning values, only the complexity level is used as the basis, without introducing other judgment conditions. At the same time, priority number and priority weight are written as fixed attributes on each task sub-queue.

[0073] Priority numbers and priority weights are defined based on the ordered mapping rule of complexity levels: they are uniformly numbered according to the same monotonic relationship that "the higher the complexity, the greater the priority number and priority weight"; the values ​​are chosen because "3, 2 and 1" are a set of the smallest positive integers, which can provide a clear, monotonic and unambiguous order relationship among the three priorities.

[0074] S2.3. Based on the priority of each task sub-queue, formulate the corresponding computing resource quota using the proportional allocation method.

[0075] It should be noted that the sum of the priority weights of each task sub-queue is calculated, and a corresponding target quota is generated based on the priority weight of each task sub-queue and the sum of the priority weights. The target quota, complexity level, priority number, and priority weight of each task sub-queue are used as the computing resource quota for the corresponding task sub-queue. The expression for the target quota is as follows:

[0076] ;

[0077] in, Indicates the first The target quota for each task subqueue; Indicates the first Priority weights for each task subqueue; Indicates the total number of task subqueues; This represents the index of the task subqueue, with a value ranging from 1 to... ; It represents the total amount of computing resources, defined based on the sum of all available computing resources, including CPU, memory, and I / O bandwidth, etc. This represents the summation index of the task queue, used to sum the task sub-queues that participated in the allocation one by one at the index. The value range is 1 to 1. ; Indicates from the first The priority weights of the task sub-queues are summed starting from the beginning, and... .

[0078] S2.4 Integrate all task sub-queues and their corresponding computing resource quotas to form a heterogeneous task grouping scheme.

[0079] It should be noted that, based on the priority number, complexity level, and computing resource quota of each task sub-queue, the task sub-queues are matched with the corresponding computing resource quotas in the order of personnel identification; according to the complexity level, priority number, and computing resource quota size, it is ensured that the resource allocation of high-priority and high-level task sub-queues is given priority, and the task sub-queues and their corresponding computing resource quotas are integrated to form a heterogeneous task grouping scheme.

[0080] It should also be noted that this solution divides tasks into sub-queues based on complexity levels and allocates resources using complexity scores and priority weights. This ensures that each task sub-queue receives computing resources commensurate with its complexity, guarantees that high-complexity tasks are executed first, improves resource utilization efficiency, avoids unnecessary resource waste, reduces the impact of low-priority tasks on high-priority tasks, improves the overall task processing speed and resource utilization, and solves problems such as insufficient processing of complex tasks and uneven resource allocation.

[0081] S3. Configure heterogeneous computing resource areas for task subqueues of different priorities according to the heterogeneous task grouping scheme; drive the heterogeneous computing resource areas and the bound task subqueues to perform pension benefit calculations and generate a preliminary benefit result set.

[0082] S3.1. Create dedicated thread pools and general thread pools for task sub-queues of different priorities in the heterogeneous task grouping scheme through resource allocation methods, and allocate corresponding temporary storage areas for each thread pool.

[0083] It should be noted that, by using the computing resource quotas corresponding to the high-level task sub-queues in the heterogeneous task grouping scheme, the upper limit of the number of tasks to be executed simultaneously and the upper limit of the allowed number of queues are determined. The upper limit of the number of tasks and the upper limit of the number of queues are used as the concurrency scale and task queue capacity of the dedicated thread pool. A continuous thread identifier interval is allocated, and thread objects are initialized one by one according to the concurrency scale. A unified task acquisition entry is set when the thread is created, so that the thread only obtains tasks from the high-level task queue. After the thread object is initialized, an independent task queue is established for the dedicated thread pool to store the pension benefit calculation tasks to be executed in the high-level task sub-queues. The task queue is associated with the thread objects one by one, so that tasks can be retrieved from the corresponding task queues for execution. A temporary storage area is allocated for the dedicated thread pool according to the computing volume of the high-level tasks, and the temporary storage area is registered together with the task queue of the dedicated thread pool to ensure that each running task can occupy a unique intermediate storage location.

[0084] Read the computing resource quotas of the medium-level and low-level task subqueues, merge the concurrency requirements of the medium-level and low-level task subqueues to generate the total concurrency scale, allocate thread identifier ranges, initialize thread objects, and create task queues for the medium-level and low-level task subqueues in the same way as the dedicated thread pool, and bind the task queues to all thread objects; allocate a temporary storage area for the general thread pool with a capacity larger than that of the dedicated thread pool; and record the names, concurrency scales, task queue capacities, temporary storage area locations, and acceptable task subqueue ranges of both the dedicated thread pool and the general thread pool in a unified manner.

[0085] S3.2. Based on the priority of each task sub-queue, bind each task sub-queue to the corresponding dedicated thread pool and general thread pool respectively.

[0086] It should be noted that, based on the priority of the task sub-queues, high-level task sub-queues are bound to a dedicated thread pool. The dedicated thread pool has stronger resource guarantees and processing capabilities, and is used to prioritize the processing of high-level task sub-queues, ensuring that high-level task sub-queues can be completed in a shorter time. Low-level and medium-level task sub-queues are bound to a general thread pool. The general thread pool can handle a larger number of tasks, but its resources are relatively limited, making it suitable for handling simpler tasks.

[0087] S3.3, drive the dedicated thread pool and the general thread pool to perform parallel computing, generate the amount of salary payable for each person in the current period, and temporarily store the amount of salary payable for each person in the corresponding temporary storage area;

[0088] It should be noted that when starting a dedicated thread pool and a general thread pool, the pension calculation tasks in the corresponding level's task sub-queue are written into the task queue of the corresponding thread pool in the order of personnel identification. After the thread is awakened, a pension calculation task is taken out from the task queue, the calculation is completed according to the pension calculation logic, and the pension calculation result is written into the temporary storage area corresponding to the thread pool, and recorded in a unified manner with the personnel identification and payment cycle of the current pension calculation task.

[0089] During the execution of the two thread pools, if the task queue is empty, the thread enters a waiting state; if the corresponding temporary storage area is completely written, the current pension calculation task is marked as completed. The calculation ends when all pension calculation tasks in both thread pools are completed. The expression for pension calculation is:

[0090] ;

[0091] in, This indicates that the pension calculation results are ultimately written to the corresponding temporary storage area by each task sub-queue; This indicates the minimum payment standard, used as a safety net. This refers to basic pension benefits; This refers to individual pension accounts; This indicates transitional treatment; This indicates the pension that needs to be retroactively paid; This indicates the maximum amount that can be issued, used to cap the amount.

[0092] S3.4 After all the task subqueues have been calculated, all calculation results are aggregated from the corresponding temporary storage area to generate a preliminary treatment result set.

[0093] It should be noted that after all task subqueues have completed their calculations, the pension benefit calculation results are read one by one from the temporary storage areas corresponding to the dedicated thread pool and the general thread pool. Each pension benefit calculation result is merged in order of personnel identification and payment cycle to ensure that each pension benefit calculation result corresponds to the correct personnel identification and payment cycle. If a pension benefit calculation result is abnormal or missing, it is marked and recorded in the exception list for tracking and processing. All valid pension benefit calculation results are summarized to form a preliminary benefit result set.

[0094] It should also be noted that this solution allocates dedicated and general thread pools to task sub-queues based on complexity and priority, and provides a temporary storage area for each thread pool. This allows for the rational allocation of computing resources according to task priority, with high-priority tasks receiving stronger resource guarantees and low-priority tasks being processed in the general thread pool. This avoids resource waste and backlog of high-priority tasks, improving the efficiency and accuracy of task processing. By marking the calculation results of each task and recording an anomaly list, it ensures that anomalies in the calculation results can be tracked and handled in a timely manner, avoiding the need for manual intervention and improving processing efficiency and result accuracy. The resulting preliminary result set ensures that the calculation results of all tasks can be summarized in an orderly and accurate manner.

[0095] S4. Verify and correct the preliminary benefit result set based on the historical benefit feature database, and generate complete batch pension benefit calculation results.

[0096] S4.1 Load the historical benefits feature database, and perform matching analysis between the preliminary benefits result set and the historical benefits feature database to generate a set of abnormal record markers and correction suggestions.

[0097] It should be noted that by collecting the pension benefit calculation results from previous years, including the pension calculation results for each insured person under different calculation cycles, related personal account data, social security payment records, wage income data, and policy change records, etc., and classifying and archiving them according to personnel identification, calculation cycle, and policy version, a historical benefit feature database is formed.

[0098] According to the personnel identification and calculation cycle, each pension benefit calculation result in the preliminary benefit result set is matched and analyzed with the historical data in the historical benefit feature database. The benefit deviation between the historical pension benefit calculation result and the current pension benefit calculation result of the current personnel in the historical data is calculated. The benefit deviation is compared with the deviation threshold. When the absolute value of the benefit deviation is greater than the deviation threshold, an abnormal record mark is generated for the current pension benefit calculation result. The abnormal deviations of all pension benefit calculation results are traversed to generate multiple abnormal record marks.

[0099] The deviation threshold is defined based on the distribution characteristics of historical pension benefit calculation results: Pension benefit calculation results consistent with the current business caliber are selected from the historical benefit feature database, retaining only those with consistent personnel identification, calculation cycle, policy version, and complete amount fields. These historical pension benefit calculation results are then sorted by amount from smallest to largest, and the mean of this group of historical pension benefit calculation results is calculated and recorded as the reference amount. The standard deviation of this group of historical pension benefit calculation results relative to the reference amount is then calculated. The product of the standard deviation and 3 is used as the deviation threshold under this caliber. The value is determined based on the following: if it exceeds three times the standard deviation, it will reduce abnormal records and increase the false negative rate; if it does not exceed three times the standard deviation, it will lead to oversensitivity to abnormal records and increase the false positive rate.

[0100] For each abnormal record, if the pension benefit calculation result exceeds the corresponding historical pension benefit calculation result, a correction suggestion is generated: "Revert the current pension benefit calculation result to the historical pension benefit calculation result"; if the pension benefit calculation result does not exceed the corresponding historical pension benefit calculation result, a correction suggestion is generated: "Upgrade the current pension benefit calculation result to the historical pension benefit calculation result"; the correction suggestions corresponding to each abnormal record are integrated to form a set of correction suggestions.

[0101] S4.2. Perform correction operations on the abnormal records in the preliminary treatment result set by using the abnormal record marking and correction suggestion set to generate the corrected treatment result set.

[0102] It should be noted that, according to the personnel identification and calculation cycle, the pension calculation results with generated abnormal record tags are located one by one in the preliminary benefit result set. The corresponding set of correction suggestions is read. If the correction suggestion is "to revert the current pension calculation result to the historical pension calculation result", the amount field of the current pension calculation result is directly overwritten with the historical pension calculation result, while keeping auxiliary fields such as personnel identification, calculation cycle, complexity level, and task subqueue name unchanged. If the correction suggestion is "to upgrade the current pension calculation result to the historical pension calculation result", the amount field of the current pension calculation result is supplemented to make up the difference, and the amount difference is recorded for subsequent traceability. If the same pension calculation result corresponds to multiple abnormal record tags, the correction is performed in the order in which the abnormal record tags are generated, and the correction generated later overwrites the correction generated earlier. After completing the correction for all abnormal record tags, the corrected benefit result set is formed.

[0103] S4.3. Merge the corrected benefit result set with the normal records in the preliminary benefit result set to generate complete batch pension benefit calculation results.

[0104] It should be noted that the revised benefit result set is merged with the normal records in the initial benefit result set according to personnel identification and payment cycle, ensuring that each normal record corresponds one-to-one with the revised record, and maintaining consistency of auxiliary fields such as personnel identification, payment cycle, complexity level, and task sub-queue name during the merging process; for normal records, no amount adjustment is made, only the pension benefit calculation result and related information are retained; for revised records, the revised amount is merged with other fields to ensure that the revised pension benefit calculation result is correctly recorded; the merged complete batch pension benefit calculation result includes the calculation results for all personnel identification and payment cycle.

[0105] It should also be noted that normal records refer to pension benefit calculation result entries in the preliminary benefit result set that, after matching analysis, do not exceed the deviation threshold, do not generate abnormal record markers, and whose amounts have not been changed; corrected records refer to pension benefit calculation result entries that have generated abnormal record markers and completed amount adjustments according to correction suggestions.

[0106] This embodiment also provides a computer device applicable to the AI-based dynamic multi-threaded generation method for pension benefits, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the AI-based dynamic multi-threaded generation method for pension benefits as proposed in the above embodiment.

[0107] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.

[0108] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements the AI-based dynamic multi-threaded method for generating pension benefits as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0109] In summary, this invention achieves accurate quantitative assessment and automatic grading of the complexity of batch computing tasks by constructing an AI prediction model to intelligently analyze associated feature data and generate a classification result mapping table. This overcomes the deficiency of being unable to effectively identify the computational intensity of tasks and lays a data foundation for subsequent precise resource scheduling. Furthermore, by constructing a heterogeneous task grouping scheme and dynamically configuring a heterogeneous computing resource area that combines dedicated thread pools and general thread pools for task sub-queues of different priorities, this invention achieves adaptive matching between computing resources and task complexity, effectively solving the problems of high-performance resource waste and inefficient blocking caused by homogeneous resource allocation.

[0110] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A method for dynamically generating pension benefits using AI in a multi-threaded manner, characterized in that: include, The system receives batch pension benefit calculation requests and obtains the queue of individuals to be calculated and their corresponding related feature data based on these requests. It constructs an AI prediction model by extracting historically completed batch pension benefit calculation records from the business database, aligning personal account data, social security historical data, and wage income data according to personnel identification and calculation cycle. Based on the policy effective boundary alignment method, it defines a segmented calculation cycle, forming a training set with calculation cycles shorter than the segmented calculation cycle, and a validation set with calculation cycles greater than or equal to the segmented calculation cycle. It sets the batch size and maximum training epochs for the training set input, uses mean squared error as the loss function, and selects Adam as the optimizer. It then inputs the related feature data of the batch size from the training set into the AI ​​prediction model to calculate the complexity score, expressed as follows: ; in, Indicates the complexity score; This represents an element-wise nonlinear activation function; This represents a sequence convergence operator used to output a single scalar; A mapping function representing the stacked coded blocks; Represents associated feature data; This represents the weight matrix of the first-level projection; This represents the bias vector of the first-order projection; This represents the weight matrix of the second-level projection; This represents the bias vector of the second-order projection; The associated feature data is input into the AI ​​prediction model for data analysis, generating a classification result mapping table. The specific steps are as follows. Building an AI prediction model based on a Transformer encoder; The associated feature data is input into the AI ​​prediction model, and the AI ​​prediction model calculates and outputs the complexity score of each person to be calculated through the prediction process. The complexity score is mapped to a complexity level based on the preset complexity score threshold range, and each person to be calculated is associated with the corresponding complexity level to generate a classification result mapping table. Based on the complexity level in the classification result mapping table, the queue of personnel to be calculated is divided into task sub-queues, and corresponding computing resource quotas are formulated based on the priority of each task sub-queue. The computing resource quotas of each task sub-queue are integrated to form a heterogeneous task grouping scheme. Configure heterogeneous computing resource areas for task subqueues of different priorities according to the heterogeneous task grouping scheme; drive the heterogeneous computing resource areas and the bound task subqueues to perform pension benefit calculations and generate a preliminary benefit result set; The preliminary benefit result set is verified and corrected based on the historical benefit feature database to generate complete batch pension benefit calculation results.

2. The AI-based dynamic multi-threaded method for generating pension benefits as described in claim 1, characterized in that: The steps for receiving batch pension benefit calculation requests and obtaining the queue of individuals to be calculated and their corresponding associated feature data based on these requests are as follows: Receive and parse batch pension benefit calculation requests issued by the task scheduler, and generate a set of personnel identifiers; Build a business database, query the business database based on the personnel identifier set, and generate a queue of personnel to be calculated and the corresponding associated feature data.

3. The AI-based dynamic multi-threaded method for generating pension benefits as described in claim 1, characterized in that: The process of dividing the queue of personnel to be calculated into task sub-queues based on the complexity level in the classification result mapping table is as follows: Based on the different complexity levels in the classification result mapping table, the queue of personnel to be calculated is divided into multiple task sub-queues, and each task sub-queue corresponds to a unique complexity level; The priority of each task subqueue is assigned according to its complexity level.

4. The AI-based dynamic multi-threaded method for generating pension benefits as described in claim 3, characterized in that: The specific steps for determining corresponding computing resource quotas based on the priority of each task sub-queue and integrating these quotas into a heterogeneous task grouping scheme are as follows: Based on the priority of each task sub-queue, the corresponding computing resource quota is determined by the proportional allocation method. Integrate all task subqueues and their corresponding computing resource quotas to form a heterogeneous task grouping scheme; The heterogeneous task grouping scheme records the mapping relationship between each task sub-queue, its corresponding priority, and computing resource quota.

5. The AI-based dynamic multi-threaded method for generating pension benefits as described in claim 4, characterized in that: The specific steps for configuring heterogeneous computing resource areas for task sub-queues of different priorities according to the heterogeneous task grouping scheme are as follows: Heterogeneous computing resource areas are created for task subqueues of different priorities in a heterogeneous task grouping scheme using resource allocation methods. The heterogeneous computing resource area includes a dedicated thread pool and a general-purpose thread pool; Allocate corresponding temporary storage areas for dedicated thread pools and general thread pools.

6. The AI-based dynamic multi-threaded method for generating pension benefits as described in claim 5, characterized in that: The process involves driving the heterogeneous computing resource area and its bound task sub-queues to perform pension benefit calculations and generate a preliminary benefit result set. The specific steps are as follows. Based on the priority of each task sub-queue, each task sub-queue is bound to the corresponding dedicated thread pool and general thread pool respectively; The dedicated thread pool and the general thread pool are driven to perform parallel computing to generate the amount of salary payable for each person in the current period, and the amount of salary payable for each person in the current period is temporarily stored in the corresponding temporary storage area; Once all task subqueues have been calculated, all calculation results are aggregated from the corresponding temporary storage area to generate a preliminary treatment result set.

7. The AI-based dynamic multi-threaded method for generating pension benefits as described in claim 6, characterized in that: The process of verifying and correcting the preliminary benefit result set based on the historical benefit feature database to generate complete batch pension benefit calculation results involves the following steps: Load the historical benefits feature database, and perform matching analysis between the preliminary benefits result set and the historical benefits feature database to generate a set of abnormal record markers and correction suggestions; By using the abnormal record markers and correction suggestion set, correction operations are performed on the abnormal records in the preliminary treatment result set to generate the corrected treatment result set; The revised benefit result set is merged with the normal records in the preliminary benefit result set to generate a complete batch pension benefit calculation result.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the AI-based dynamic multi-threaded generation method for pension benefits as described in any one of claims 1 to 7.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the AI-based dynamic multi-threaded generation method for pension benefits as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Heterogeneous resource intelligent allocation scheduling method and system based on deep learning

    CN119883648A

  • Electric power enterprise intelligent collaborative office method and system based on artificial intelligence

    CN120047113A