CN112734583A - Multithreading parallel computing method for life insurance actuarial model - Google Patents
Multithreading parallel computing method for life insurance actuarial model Download PDFInfo
- Publication number
- CN112734583A CN112734583A CN202110054321.XA CN202110054321A CN112734583A CN 112734583 A CN112734583 A CN 112734583A CN 202110054321 A CN202110054321 A CN 202110054321A CN 112734583 A CN112734583 A CN 112734583A
- Authority
- CN
- China
- Prior art keywords
- computing
- thread
- calculation
- life insurance
- data block
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000004364 calculation method Methods 0.000 title claims abstract description 73
- 238000011156 evaluation Methods 0.000 claims abstract description 23
- 238000000034 method Methods 0.000 claims abstract description 11
- 238000012544 monitoring process Methods 0.000 claims description 3
- 230000034994 death Effects 0.000 description 4
- 231100000517 death Toxicity 0.000 description 4
- 238000012502 risk assessment Methods 0.000 description 3
- 238000013210 evaluation model Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000001010 compromised effect Effects 0.000 description 1
- 239000000470 constituent Substances 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 238000013178 mathematical model Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/08—Insurance
Landscapes
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Finance (AREA)
- Engineering & Computer Science (AREA)
- Development Economics (AREA)
- Economics (AREA)
- Marketing (AREA)
- Strategic Management (AREA)
- Technology Law (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
Abstract
The invention discloses a multithreading parallel computing method of a life insurance actuarial model. The method comprises the following steps: setting a plurality of computing threads, and copying all computing modules of the life insurance actuarial model to each computing thread; after the life insurance actuatedlodel starts to operate, inputting a data block with the number of records not exceeding a set threshold value for each calculation thread from an evaluation database; new data blocks are entered for each computing thread that completes the task of entering data block computations until all records in the evaluation database have been processed. The invention can obviously reduce the time consumption difference of different calculation threads for completing all calculation tasks, thereby reducing the waiting time for result summarization and improving the running speed of the life insurance actuarial model.
Description
Technical Field
The invention belongs to the technical field of life insurance actuarial, and particularly relates to a multi-thread parallel computing method of a life insurance actuarial model.
Background
The life insurance actuarial evaluation work needs to be carried out by using a life insurance actuarial model. The life insurance actuarial model for the life insurance evaluation work is a mathematical model which quantitatively describes various cash flows, liabilities, repayment capacity costs, profits, and the reduction values of the cash flows and the profits of the insurance company including premium and claim expenses and the like in the future by using actuarial and statistical professional methods on the basis of products sold by the insurance company. The actuarial model is generally composed of a series of calculation modules, and the most important basic constituent unit of each calculation module is a time series, such as the number of deaths per unit time period in the future, the expected death claim amount, the daily management cost of an insurance company, and the like. A actuarial model is typically made up of tens to hundreds of computing modules, containing thousands to tens of thousands of time series.
When a specific life insurance assessment work is carried out, the assessment personnel butt the life insurance actuarial model to the assessment database of the company. The database contains information on all the valid policies of the company, typically hundreds of thousands to millions of records. For each record, the actuarial evaluation model will calculate the results of all involved calculation modules. For the calculation modules needing to be output, the actuarial evaluation model can aggregate the calculation results. Due to the fact that a plurality of calculation modules are involved, the calculation is complex, the data size is large, the time consumption of the life risk assessment process is long, and the longest time can reach dozens of hours or even hundreds of hours. Therefore, in the prior art, a plurality of computing threads are generally adopted to run in parallel to reduce the operation time. For example, the evaluation database is divided into a plurality of sub-databases, and they are respectively connected to different computing threads. Although the method can effectively improve the calculation speed, certain problems exist, for example, because the number of data records of each sub-database and the complexity of prediction for the records are different, the time consumption for each calculation thread to complete the calculation task is different, sometimes the time consumption difference may be large, and final result summarization needs to be performed after the calculation tasks of all threads are completed, so that the overall speed of life risk assessment is influenced by waiting for one or two calculation threads consuming a lot of time.
Disclosure of Invention
In order to solve the problems in the prior art, the invention provides a multi-thread parallel computing method of a life insurance actuarial model.
In order to achieve the purpose, the invention adopts the following technical scheme:
a life insurance actuarial model multithread parallel computing method comprises the following steps:
step 1, setting a plurality of computing threads, and copying all computing modules of a life insurance actuarial model to each computing thread;
step 2, after the life insurance actuarial model starts to operate, inputting a data block with the number of records not exceeding a set threshold value for each calculation thread from an evaluation database;
and 3, inputting a new data block for each calculation thread which finishes the calculation task of the input data block until all records in the evaluation database are processed.
Compared with the prior art, the invention has the following beneficial effects:
according to the invention, a plurality of calculation threads are arranged, a data block with the number of records not exceeding a set threshold value is input for each calculation thread from the evaluation database, a new data block is input for each calculation thread for completing the calculation task of the input data block until all records in the evaluation database are processed, so that the time consumption difference of completing all calculation tasks by different calculation threads is obviously reduced, the waiting time for result summarization is reduced, and the running speed of the life insurance actuarial model is improved.
Drawings
Fig. 1 is a flowchart of a multi-thread parallel computing method of a life insurance actuarial model according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings.
The embodiment of the invention provides a multithreading parallel computing method of a life insurance actuarial model, a flow chart is shown in figure 1, and the method comprises the following steps:
s101, setting a plurality of computing threads, and copying all computing modules of the life insurance actuarial model to each computing thread;
s102, after the life insurance actuarial model starts to operate, inputting a data block with the number of records not exceeding a set threshold value for each calculation thread from an evaluation database;
and S103, inputting a new data block for each calculation thread completing the calculation task of the input data block until all records in the evaluation database are processed.
In this embodiment, step S101 is mainly used to set up a plurality of computing threads, and copy all computing modules of the life insurance actuarial model to each computing thread. All the calculation modules are copied to each calculation thread, mainly considering that for most calculation data points, all the calculation modules are needed in the calculation process. Of course, there are few cases, such as when a product has not been delivered by death, and the calculation process does not use the calculation module for the delivery by death. However, this embodiment copies all of the compute modules onto each thread, considering that it is difficult to determine whether a thread will be assigned to a data point for a particular product, and the copy process for the compute modules does not incur much resource overhead.
In this embodiment, step S102 is mainly used to input one data block for each computing thread. The data block contains a small number of data records, colloquially referred to as small data blocks, from the evaluation database, which are small in number (less than a set threshold). The assessment database contains all the information of the valid policy, typically hundreds of thousands to millions of records. The prior art divides the evaluation database into a plurality of sub-databases and connects them to different computing threads, respectively. The method has the problem that the time consumption for each calculation thread to complete the calculation task is different even if the same number of data records are allocated to each sub-database because the calculation complexity of the data records for different products is different. Sometimes, the difference in the length of the consumed time may be large, which may affect the overall speed of the life risk assessment by waiting for one or two long computing threads. For this reason, in the embodiment, only one small data block is input to each calculation thread each time, and each calculation thread inputs a new small data block after completing the calculation of inputting the small data block until completing the calculation of all the data records in the evaluation database. The maximum waiting time after the mechanism is adopted is less than the time Tm for completing the calculation of one small data block by one calculation thread with the slowest calculation speed, and the calculation thread just starts the calculation of a new data block corresponding to the worst condition that other calculation threads complete the calculation. Since the data size of the small data block is small, Tm is also small and latency will be greatly reduced. If only from the standpoint of minimizing latency, the smaller the data block (the fewer the number of data records contained), the better; however, when the data block is too small, the data block needs to be input frequently for each computing thread, thereby affecting the operation speed to a certain extent, and therefore the data block size should be compromised. In this embodiment, for the sake of processing simplicity, each data block may contain the same number of data records; of course, each data block may contain different numbers of data records according to actual conditions.
In the present embodiment, step S103 is mainly used to input a new data block for each computing thread that completes the task of inputting a data block computation. Since a data block contains a small number of records, each computing thread quickly performs the task of computing a data block, requiring new data blocks to be continuously entered for them until all records in the evaluation database have been processed.
As an alternative embodiment, the S102 further includes: starting a thread for storing a certain number of said data blocks obtained from the evaluation database into a buffer and inputting a data block from the buffer for each calculation thread.
The embodiment provides a technical scheme for improving the operation speed by setting a cache area for storing data blocks. Since the number of records contained in the evaluation database is huge and takes up a large storage space, the evaluation database is generally stored on a hard disk in the form of a database file. It is known that the speed of data read/write on a hard disk is significantly slower than that of data read/write on a memory. Therefore, in order to increase the operation speed, in this embodiment, a memory buffer is provided instead of directly reading data blocks from the evaluation database and inputting the data blocks to the computing thread, a separate thread is started, a certain number of data blocks read from the evaluation database are stored in the buffer, and then the data blocks are read from the buffer and input to the computing thread.
As an alternative embodiment, the method further comprises: and monitoring the consumed time of each computing thread for completing the computation of one data block in real time, and automatically adjusting the number of records contained in the data block input to each computing thread according to the consumed time to ensure that the consumed time of each computing thread is approximately equal.
The embodiment provides a technical scheme for automatically adjusting the size of a data block. As mentioned above, since the data records of different products have different calculation complexity, even if each data block contains the same number of data records, the time taken by each calculation thread to complete the calculation task of one data block is different. In order to further reduce the waiting time, the embodiment appropriately reduces the number of records contained in the input data block for the calculation thread with longer time consumption by monitoring the time consumption of completing the calculation of one data block by each calculation thread in real time; for the calculation thread with shorter time consumption, the number of records contained in the data block input by the calculation thread is properly increased, so that the time consumption of all the calculation threads tends to be equal.
The above description is only for the purpose of illustrating a few embodiments of the present invention, and should not be taken as limiting the scope of the present invention, in which all equivalent changes, modifications, or equivalent scaling-up or down, etc. made in accordance with the spirit of the present invention should be considered as falling within the scope of the present invention.
Claims (3)
1. A life insurance actuarial model multithread parallel computing method is characterized by comprising the following steps:
step 1, setting a plurality of computing threads, and copying all computing modules of a life insurance actuarial model to each computing thread;
step 2, after the life insurance actuarial model starts to operate, inputting a data block with the number of records not exceeding a set threshold value for each calculation thread from an evaluation database;
and 3, inputting a new data block for each calculation thread which finishes the calculation task of the input data block until all records in the evaluation database are processed.
2. The life insurance actuarial model multithread parallel computing method according to claim 1, wherein the step 2 further comprises: starting a thread for storing a certain number of said data blocks obtained from the evaluation database into a buffer and inputting a data block from the buffer for each calculation thread.
3. The life insurance actuarial model multithread parallel computing method according to claim 1, wherein the method further comprises: and monitoring the consumed time of each computing thread for completing a data block computing task in real time, and automatically adjusting the number of records contained in the data block input to each computing thread according to the consumed time so as to approximately equalize the consumed time of each computing thread.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110054321.XA CN112734583A (en) | 2021-01-15 | 2021-01-15 | Multithreading parallel computing method for life insurance actuarial model |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110054321.XA CN112734583A (en) | 2021-01-15 | 2021-01-15 | Multithreading parallel computing method for life insurance actuarial model |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112734583A true CN112734583A (en) | 2021-04-30 |
Family
ID=75591621
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110054321.XA Pending CN112734583A (en) | 2021-01-15 | 2021-01-15 | Multithreading parallel computing method for life insurance actuarial model |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112734583A (en) |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120159124A1 (en) * | 2010-12-15 | 2012-06-21 | Chevron U.S.A. Inc. | Method and system for computational acceleration of seismic data processing |
CN103838552A (en) * | 2014-03-18 | 2014-06-04 | 北京邮电大学 | System and method for processing multi-core parallel assembly line signals of 4G broadband communication system |
CN104572106A (en) * | 2015-01-12 | 2015-04-29 | 浪潮电子信息产业股份有限公司 | Parallel program development method for processing large-scale data based on small memory |
CN104714850A (en) * | 2015-03-02 | 2015-06-17 | 心医国际数字医疗系统(大连)有限公司 | Heterogeneous joint account balance method based on OPENCL |
CN105824780A (en) * | 2016-04-01 | 2016-08-03 | 浪潮电子信息产业股份有限公司 | Parallel development method based on single machine and multiple FPGA |
CN105844530A (en) * | 2016-03-24 | 2016-08-10 | 深圳市前海安测信息技术有限公司 | Actuarial studying method and actuarial studying system based on health management |
CN106528893A (en) * | 2016-12-26 | 2017-03-22 | 北京奇虎科技有限公司 | Data synchronization method and device |
CN106991011A (en) * | 2017-03-30 | 2017-07-28 | 武汉大学 | It is a kind of for big data task handle it is parallel and cooperate with the method optimized based on CPU multithreadings and many granularities of GPU |
CN110187970A (en) * | 2019-05-30 | 2019-08-30 | 北京理工大学 | A kind of distributed big data parallel calculating method based on Hadoop MapReduce |
CN110187969A (en) * | 2019-05-30 | 2019-08-30 | 北京理工大学 | A kind of distributed big data parallel calculating method based on GPU |
CN111651267A (en) * | 2020-05-06 | 2020-09-11 | 京东数字科技控股有限公司 | Method and device for performing performance consumption optimization analysis on parallel operation |
-
2021
- 2021-01-15 CN CN202110054321.XA patent/CN112734583A/en active Pending
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120159124A1 (en) * | 2010-12-15 | 2012-06-21 | Chevron U.S.A. Inc. | Method and system for computational acceleration of seismic data processing |
CN103838552A (en) * | 2014-03-18 | 2014-06-04 | 北京邮电大学 | System and method for processing multi-core parallel assembly line signals of 4G broadband communication system |
CN104572106A (en) * | 2015-01-12 | 2015-04-29 | 浪潮电子信息产业股份有限公司 | Parallel program development method for processing large-scale data based on small memory |
CN104714850A (en) * | 2015-03-02 | 2015-06-17 | 心医国际数字医疗系统(大连)有限公司 | Heterogeneous joint account balance method based on OPENCL |
CN105844530A (en) * | 2016-03-24 | 2016-08-10 | 深圳市前海安测信息技术有限公司 | Actuarial studying method and actuarial studying system based on health management |
CN105824780A (en) * | 2016-04-01 | 2016-08-03 | 浪潮电子信息产业股份有限公司 | Parallel development method based on single machine and multiple FPGA |
CN106528893A (en) * | 2016-12-26 | 2017-03-22 | 北京奇虎科技有限公司 | Data synchronization method and device |
CN106991011A (en) * | 2017-03-30 | 2017-07-28 | 武汉大学 | It is a kind of for big data task handle it is parallel and cooperate with the method optimized based on CPU multithreadings and many granularities of GPU |
CN110187970A (en) * | 2019-05-30 | 2019-08-30 | 北京理工大学 | A kind of distributed big data parallel calculating method based on Hadoop MapReduce |
CN110187969A (en) * | 2019-05-30 | 2019-08-30 | 北京理工大学 | A kind of distributed big data parallel calculating method based on GPU |
CN111651267A (en) * | 2020-05-06 | 2020-09-11 | 京东数字科技控股有限公司 | Method and device for performing performance consumption optimization analysis on parallel operation |
Non-Patent Citations (1)
Title |
---|
李秀滢;吉晨昊;段晓毅;周长春;: "GPU上SM4算法并行实现", 信息网络安全, no. 06, 6 July 2020 (2020-07-06) * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2637112B1 (en) | Online reorganization of hybrid in-memory databases | |
US9031826B2 (en) | Method and apparatus for simulating operation in a data processing system | |
US20100138391A1 (en) | Management method, management program and management apparatus of database | |
US8452724B2 (en) | Techniques for creating reports using cached data | |
CN107273302A (en) | The method, apparatus and system of management work load memory distribution | |
CN111381970B (en) | Cluster task resource allocation method and device, computer device and storage medium | |
CN107665219B (en) | Log management method and device | |
US8428986B2 (en) | Return on investment analysis tool for storage systems | |
US20220215010A1 (en) | Optimizing database performance through intelligent data partitioning orchestration | |
US20220343198A1 (en) | Systems and methods for determining data criticality based on causal evaluation | |
WO2023077823A1 (en) | Slow query alarm method, electronic device, and storage medium | |
CN113342834A (en) | Method for solving historical data change in big data system | |
CN106201918B (en) | A kind of method and system based on big data quantity and extensive caching quick release | |
CN105630706B (en) | Intelligent memory block replacement method, system and computer readable storage medium | |
Lange et al. | Offline and Online Algorithms for SSD Management | |
US12050866B2 (en) | Maintenance of a data glossary | |
CN112734583A (en) | Multithreading parallel computing method for life insurance actuarial model | |
US20150347233A1 (en) | System and method for dynamic collection of system management data in a mainframe computing environment | |
CN1804908A (en) | Data storage system for tax controlled cash register | |
CN111581253A (en) | Real-time detection method and system based on anti-fraud model | |
CN110597830B (en) | Real-time index generation method and system, electronic equipment and storage medium | |
EP3974955B1 (en) | Endurance and serviceability in solid state drives | |
CN114266242A (en) | Work order data processing method and device, server and readable storage medium | |
CN110704488B (en) | Method for managing data and corresponding system, computer device and medium | |
WO2022227210A1 (en) | Vehicle owner replacement evaluation method and system, and electronic device and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |