Risk control system based on staged multi-thread processing

By introducing a staged multi-threading mechanism and multiple processing units into the risk control system, the performance bottleneck of the existing risk control system in high concurrency scenarios is solved, and more efficient risk control processing and throughput is achieved.

CN119863245APending Publication Date: 2025-04-22JIANGSU SECURITIES
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411835787.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-04-22

AI Technical Summary

Technical Problem

Existing risk control systems are prone to accumulation of risk control requests in high concurrency scenarios, and cannot effectively utilize the multi-core processing technology of modern computers, resulting in limited processing performance and throughput.

Method used

A risk control system based on staged multi-threaded processing is designed, and the phased parallel processing of risk control requests is achieved through phased parallel processing module and five processing units (data pre-checksum filling unit, split data unit, calculation data preparation unit, factor parallel calculation and aggregation unit, and risk control verification unit).

Benefits of technology

On the basis of ensuring transaction fairness, the risk control processing speed and throughput are improved, which significantly improves the overall performance of the risk control system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119863245A_ABST
    Figure CN119863245A_ABST
Patent Text Reader

Abstract

The invention discloses a risk control system based on staged multi-thread processing, and the system comprises a receiving module which is used for receiving different risk control requests and transmitting the different risk control requests to a staged parallel processing module one by one; the staged parallel processing module is used for performing staged parallel processing on the different risk control requests received one by one to sequentially obtain risk control results of the different risk control requests; the staged parallel processing module comprises a thread queue assembly sub-module and five processing units; the five processing units are respectively a data pre-checking and filling unit, a data splitting unit, a calculation data preparation unit, a factor parallel calculation and aggregation unit and a risk control checking unit; the five processing units are assembled with independent thread queues and are used for simultaneously processing different risk control requests in different stages; and the thread queue assembling sub-module is used for assembling threads and queues in the five processing units. According to the invention, on the basis of ensuring transaction fairness and risk control result calculation accuracy, the risk control processing speed and throughput are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of risk control in securities trading systems, and in particular to a risk control system based on phased multi-threaded processing. Background Art

[0002] In the context of the digital transformation of brokerage businesses, all brokerage businesses have been built into automated trading systems, and with the explosive growth of business, trading varieties, trading models, trading volumes and trading amounts have increased significantly. This brings up a question: how to control the risks brought by the exchange. In the era of non-automated trading, risk control is often calculated manually by traders. This method is slow and prone to errors, and it is also impossible to calculate more complex risk indicators. Therefore, there is a special risk control system, that is, a risk control system, which controls the risks of transactions in a programmed way.

[0003] The current risk control system extracts the transaction element information in the risk control request issued by the user, and then calculates an indicator value according to the corresponding indicator calculation rule expression configured in the risk control rule, and then compares this indicator value with the threshold configured in the risk control rule. If the threshold is exceeded, the risk control is triggered and the risk control result is returned as failed. If the threshold is not reached, the risk control result is returned as passed.

[0004] Since the risk control in the brokerage transaction chain must ensure the fairness of the transaction, that is, the risk control request that arrives first must first calculate and verify the risk control index, and the risk control request that arrives later must calculate and verify the risk control index later. The order of precedence will also affect the results of some aggregate risk control, so ensuring the order is a condition that the risk control system must meet.

[0005] In order to process all received risk control requests in the order in which they are received, the existing risk control system uses a single thread to process risk control requests. However, single-thread processing greatly limits the processing performance and throughput of the risk control service. In high-concurrency scenarios, it is very easy for risk control requests to pile up, and it is also impossible to effectively utilize the multi-core processing technology of modern computers.

[0006] In order to solve the above problems, we must design a risk control system that can both improve throughput and ensure transaction fairness. Summary of the invention

[0007] The purpose of the present invention is to provide a risk control system based on phased multi-threaded processing, which can not only process different risk control requests in sequence according to the order of receipt, but also process different risk control requests at the same time, thereby improving the risk control processing speed and throughput while ensuring transaction fairness.

[0008] In order to achieve the above object, the present invention adopts the following technical solutions: The present invention provides a risk control system based on phased multi-threaded processing, comprising: A receiving module, which is used to receive different risk control requests and send them one by one to the phased parallel processing module; A phased parallel processing module is used to perform phased parallel processing on different risk control requests received one by one, and obtain risk control results of different risk control requests in sequence; the phased parallel processing module includes a thread queue assembly submodule and five processing units; the five processing units are: a data pre-verification and filling unit, a data splitting unit, a calculation data preparation unit, a factor parallel calculation and aggregation unit, and a risk control verification unit; the five processing units are all equipped with independent threads and queues for simultaneously processing different risk control requests at different stages; the thread queue assembly submodule is used for assembling threads and queues in the five processing units.

[0009] Optionally, the data pre-checking and filling unit includes: The pre-verification subunit is used to pre-verify the required risk control elements in the risk control request and transmit the pre-verified data to the filling subunit; The filling subunit is used to receive the data after successful pre-verification and call the risk control factor dependency data for filling to obtain the first-stage output data.

[0010] Optionally, the split data unit includes: The judging subunit is used to receive the output data of the first stage and judge the type of the bid in the output data of the first stage. When the type of the bid is a combined bid, the output data of the first stage is transmitted to the splitting subunit; when the type of the bid is a single bid, the output data of the first stage is directly output as the output data of the second stage; The splitting subunit is used to receive the first-stage output data transmitted by the judging subunit, and split the first-stage output data according to the corresponding information of the combined bid, so as to obtain the second-stage output data.

[0011] Optionally, the calculation data preparation unit includes: The query subunit is used to receive the output data of the second stage and confirm the indicators to be calculated based on the risk control factors; The preparation subunit is used to call the calculation dependency data of each factor corresponding to the indicator from the memory according to the indicator confirmed by the query subunit; The merging subunit is used to merge the output data of the second stage with the indicators and the calculation dependent data of each factor corresponding to the indicators, and output the output data of the third stage.

[0012] Optionally, the factor parallel calculation and aggregation unit includes: The factor parallel calculation subunit is used to perform multi-threaded parallel calculation on each factor according to the calculation data of each factor corresponding to the indicators in the output data of the third stage, obtain the value of each factor and transmit it to the aggregation subunit; The aggregation subunit is used to aggregate the values ​​of various factors according to the indicator calculation formula to obtain the risk control indicator value, which is the output data of the fourth stage.

[0013] Optionally, the risk control verification unit includes: The threshold selection subunit is used to configure the risk control threshold according to the risk control rules and transmit it to the verification subunit; The verification subunit is used to compare the output data of the fourth stage, namely the risk control index value, with the risk control threshold to obtain the risk control result.

[0014] Optionally, the thread queue assembly submodule includes: an assembler and a thread queue unit; the thread queue unit includes multiple different types of thread queue models; the assembler configures corresponding types of thread queue models from the thread queue unit according to the processing scenarios of the five processing units, and assembles them into corresponding processing units.

[0015] Optionally, the multiple different types of thread queue models include: a single-thread queue model, a lock-free queue thread model, a priority lock-free queue thread model and a Disruptor thread queue model.

[0016] Compared with the prior art, the present invention has the following beneficial effects: The present invention provides a risk control system based on staged multi-threaded processing, in which a staged parallel processing module includes five processing units, each processing unit is configured with an independent thread and queue, so that different processing units can process different risk control requests at the same time; by performing staged parallel processing on different risk control requests received one by one, risk control results of different risk control requests are obtained in sequence; on the basis of ensuring transaction fairness, the risk control processing speed and throughput are improved.

[0017] The present invention provides a risk control system based on phased multi-threaded processing. Since the parallel calculations of factors will not affect each other, the factor parallel calculation subunits in the system adopt multi-threaded parallel calculations. After all the parallel calculations of factors are completed, the aggregation index calculation is performed, which further improves the system performance without affecting the sequentiality, that is, the fairness of the transaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 The figure is a block diagram of a wind control system with multi-threaded processing in stages in one embodiment of the present invention; Figure 2 The figure shows a flowchart of the time flow of three risk control request processing based on the risk control system in one embodiment of the present invention; Figure 3 The figure is a flowchart of a factor parallel calculation and aggregation unit in one embodiment of the present invention; Figure 4 Shown is a schematic diagram of a single-thread queue model in an embodiment of the present invention; Figure 5 The figure is a schematic diagram of a lock-free queue thread model in an embodiment of the present invention; Figure 6 The figure shows the Disruptor thread queue model in one embodiment of the present invention. DETAILED DESCRIPTION

[0019] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of the present invention. Example 1

[0020] like Figure 1 As shown, the embodiment of the present invention introduces a risk control system based on staged multi-threaded processing, including: A receiving module, which is used to receive different risk control requests and send them one by one to the phased parallel processing module; A phased parallel processing module is used to perform phased parallel processing on different risk control requests received one by one, and obtain risk control results of different risk control requests in sequence; the phased parallel processing module includes a thread queue assembly submodule and five processing units; the five processing units are: a data pre-verification and filling unit, a data splitting unit, a calculation data preparation unit, a factor parallel calculation and aggregation unit, and a risk control verification unit; the five processing units are all equipped with independent threads and queues for simultaneously processing different risk control requests at different stages; the thread queue assembly submodule is used for assembling threads and queues in the five processing units.

[0021] The present invention provides a risk control system based on staged multi-threaded processing, in which a staged parallel processing module includes five processing units, each processing unit is configured with an independent thread and queue, so that different processing units can process different risk control requests at the same time; by performing staged parallel processing on different risk control requests received one by one, risk control results of different risk control requests are obtained in sequence; on the basis of ensuring transaction fairness, the risk control processing speed and throughput are improved.

[0022] In this embodiment, the data pre-verification and filling unit includes: a pre-verification sub-unit and a filling sub-unit connected in sequence; the pre-verification sub-unit is used to pre-verify the required risk control elements in the risk control request, and transmit the data after successful pre-verification to the filling sub-unit; the filling sub-unit is used to accept the data after successful pre-verification and call the risk control element dependent data for filling, so as to obtain the first stage output data, that is, the output data of the data pre-verification and filling unit.

[0023] Specifically, various mandatory elements in the risk control request need to be pre-verified by the verification sub-unit. If the mandatory elements are not filled in, the risk control request will be directly rejected; if filled in, the filling sub-unit will be used to fill in the elements, obtain the dependency information of each element through memory call, and fill in the data in the risk control request that has passed the pre-verification; among them, the mandatory elements include: transaction subject, exchange name, order quantity, trading account, etc.; for some non-mandatory fields and information, such as: transaction subject type, yesterday's closing price of the transaction subject, account-bound transaction channel information, the filling sub-unit will automatically fill in or fill in the default value.

[0024] In this embodiment, the splitting data unit includes: a judgment subunit and a splitting subunit connected in sequence; the judgment subunit is used to receive the first-stage output data and judge the type of the winning bid in the first-stage output data. When the type of the bid is a combination bid, the first-stage output data is transmitted to the splitting subunit; when the type of the bid is a single bid, the first-stage output data is directly output as the second-stage output data; the splitting subunit is used to receive the first-stage output data transmitted by the judgment subunit, and split the first-stage output data according to the corresponding information of the winning bid in the combination bid to obtain the second-stage output data, that is, the output data of the splitting data unit.

[0025] Specifically, the judgment subunit is first used to judge the type of the target, whether it is a combination target or a single target; if the target element in the risk control request is a combination target, such as: a basket of interbank current bonds, it represents a group of single current bond tradable targets, then trading this combination target is actually trading this group of current bond tradable targets. Since the data pre-verification and filling unit only verifies and fills the relevant information of the combination target, but the risk control calculation is for each single current bond target, the split subunit is used to split the combination target and the corresponding information to obtain the list data, and each list item represents a single current bond target and its corresponding data; for a single target, that is, there is only one data in the list data of the risk control request that does not need to be split.

[0026] In this embodiment, the calculation data preparation unit includes: a connected query subunit and a preparation subunit, and a merging subunit; the query subunit is used to accept the second-stage output data and confirm the indicators to be calculated based on the risk control factors; the preparation subunit is used to call the calculation dependency data of each factor corresponding to the indicator from the memory according to the indicator confirmed by the query subunit; the merging subunit is used to merge the second-stage output data with the indicator and the calculation dependency data of each factor corresponding to the indicator, and output the third-stage output data, that is, the output data of the calculation data preparation unit.

[0027] Specifically, the processing of the calculation data preparation unit is to prepare data for the subsequent parallel calculation of factors, so it is necessary to confirm the indicators and prepare the data required for calculating the factors through the query sub-unit and the preparation sub-unit, and combine the subject in the risk control request through the merging unit to finally obtain the following: cumulative position (the cumulative position value calculated and saved in the memory before the subject + trading account dimension is obtained), cumulative DVBP value (the cumulative DVBP value calculated and saved in the memory before the subject + trading account dimension is obtained), cumulative liability position (the cumulative liability position value calculated and saved in the memory before the subject + trading account dimension is obtained), etc.

[0028] like Figure 3 As shown, in this embodiment, the factor parallel calculation and aggregation unit includes: a factor parallel calculation sub-unit and an aggregation sub-unit connected in sequence; a factor parallel calculation sub-unit, which is used to perform multi-threaded parallel calculation on each factor according to the calculation data of each factor corresponding to the indicator in the third stage output data, obtain each factor value and transmit it to the aggregation sub-unit; the aggregation sub-unit is used to perform aggregation calculation on each factor value according to the indicator calculation formula to obtain the risk control indicator value, that is, the fourth stage output data.

[0029] Specifically, we first calculate various factors based on the data required for calculation and the elements in the risk control request. Since the factor is the smallest calculation unit, there is no mutual influence between factors. Therefore, we use multi-threading technology when calculating factors in parallel to speed up the overall calculation speed of risk control. For example: bond full price factor = bond net price + bond accrued interest; stock price deviation factor = latest transaction price * deviation (%), where the latest transaction price and deviation (%) are both data obtained in the calculation data preparation unit; among them, the factor parallel calculation uses the Completable Future mechanism, and after waiting for all factors to be calculated in parallel, the factors are aggregated and calculated through the aggregation unit to become a comparable risk control indicator value. For example: the risk control indicator needs to aggregate factors a, b, c, and d, and the calculation formula is (a+b) / (cd); the four factors a, b, c, and d are first calculated in parallel to improve performance. After the four factors are calculated in parallel, the converged indicator is calculated, and the risk control converged indicator = (a+b) / (cd).

[0030] In this embodiment, the risk control verification unit includes: a threshold selection subunit and a verification subunit connected in sequence; the threshold selection subunit is used to configure the risk control threshold according to the risk control rule and transmit it to the verification subunit; the verification subunit is used to compare the output data of the fourth stage, that is, the risk control index value, with the risk control threshold to obtain the risk control result, that is, whether the risk control passes or fails; In this embodiment, the thread queue assembly submodule includes: an assembler and a thread queue unit; the thread queue unit includes multiple different types of thread queue models; the assembler configures the corresponding types of thread queue models from the thread queue unit according to the processing scenarios of the five processing units, and assembles them into the corresponding processing units. The thread queue unit includes a single thread queue model, a lock-free queue thread model, a priority lock-free queue thread model, and a Disruptor thread queue model.

[0031] Specifically, the single-thread queue model, that is, the single-thread single-queue worker thread queue model is as follows Figure 4 As shown in the figure, after receiving the external message, the service receiving module converts it into an internal event and throws it to a single-threaded, single-queue thread pool, which processes them one by one in the order they are received. This thread queue model is the simplest and least error-prone, because it is a single-threaded, single-queue processing logic, so the message events received in sequence will also wait in the queue for processing in turn, and all message events are executed in sequence.

[0032] Specifically, the lock-free queue thread model, such as Figure 5 As shown; 1) If the event sorting function is not required, use the Multi Producer Single Consumer Linked Queue high-performance lock-free queue. The underlying layer of this lock-free queue uses the compare-and-swap (CAS) principle to achieve thread-safe lock-free enqueue and dequeue processing.

[0033] 2) If you need to support the event sorting function, we have developed a lock-free queue NonBlocking Priority Queue that can sort events. This lock-free queue uses ConcurrentSkipListSet. The Concurrent SkipListSet queue can be thread-safe to enter and exit the queue, and uses the skip list data structure to sort the event priority. The skip list is a simplified version of the red-black tree under the condition of thread safety, which can realize message sorting and meet the requirements of thread safety.

[0034] Specifically, the Disruptor thread queue model, such as Figure 6 As shown in the figure, the Disruptor thread queue model is a lock-free high-performance ring queue thread model that we have also encapsulated into a worker thread queue model to meet the scenario where event sorting is not required and only low latency is pursued; the Disruptor thread group is actually a group of Disruptors, each Disruptor has only one thread, and the event is routed to a fixed Disruptor based on the hash consistency of the event key, so that event entry and exit are lock-free, and the events of the same Disruptor are also executed in sequence. The performance of the Disruptor is more powerful, but because it cannot support event processing sorting by priority, we can use the Disruptor thread group queue model in scenarios where event priority sorting is not required.

[0035] The above thread queue models are configured as lock-free queue thread model instances in this system.

[0036] In summary, based on the sequential processing of the above five processing units, namely, the data pre-checking and filling unit, the data splitting unit, the calculation data preparation unit, the factor parallel calculation and aggregation unit and the risk control check unit, the risk control result of a single risk control request can be obtained; Since the five processing units are configured with their own thread queues, a single processing unit can immediately process the next risk control request after processing one risk control request, thereby improving the risk control processing speed and throughput while ensuring transaction fairness. Example 2

[0037] Based on the risk control system based on staged multi-threaded processing provided in this embodiment, assuming that the process of processing a single risk control request is divided into n stages with equal execution time, and the execution time of each stage is t, then the processing time of the entire process is n*t; assuming that there are m risk control requests, if a single thread of the existing risk control system is used to process them, the total time for serial processing of all risk control requests is m*(n*t); if a risk control system based on staged multi-threaded processing provided by the present invention is used to perform staged parallel processing, then the processing time of two risk control requests is n*t+t, and the processing time of three risk control requests is n*t+2*t, such as Figure 2 As shown in the figure, it is a flowchart of the processing time of three risk control requests. The processing time of m risk control requests is n*t+(m-1)t. If m is infinite, the processing time of the staged multi-threaded system is 1 / n of the processing time of the single-threaded serial system, which significantly improves the overall processing speed and throughput of risk control. Example 3

[0038] In this embodiment, a factor parallel calculation subunit in a risk control system based on staged multi-threaded processing adopts multi-threaded parallel calculation. There are n factors to be calculated, and the time for parallel calculation of each factor is t1, t2...tn, the total time for serial calculation of factors is t1+t2+...+tn. The total time for parallel calculation of factors is Max {t1, t2, ...tn}. Max{t1, t2, ...tn}<(t1+t2+...+tn). Therefore, factor parallel computing can reduce the computing time. Improve the performance of the entire risk control system. Example 4

[0039] This embodiment provides a computer-readable storage medium, which stores data required for computer program calculations and maintains the real-time nature of the stored data by subscribing to data updates in real time. When the computer program is executed, a risk control system based on staged multi-threaded processing as described in claim embodiment 1 is implemented.

[0040] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0041] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0042] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0043] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the enlightenment of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the purpose of the present invention and the claims, which all fall within the protection of the present invention.

Claims

1. A risk control system based on phased multi-threaded processing, characterized in that: include: A receiving module, which is used to receive different risk control requests and send them one by one to the phased parallel processing module; A phased parallel processing module is used to perform phased parallel processing on different risk control requests received one by one, and obtain risk control results of different risk control requests in sequence; the phased parallel processing module includes a thread queue assembly submodule and five processing units; the five processing units are: a data pre-verification and filling unit, a data splitting unit, a calculation data preparation unit, a factor parallel calculation and aggregation unit, and a risk control verification unit; the five processing units are all equipped with independent threads and queues for simultaneously processing different risk control requests at different stages; the thread queue assembly submodule is used for assembling threads and queues in the five processing units.

2. The risk control system based on phased multi-threaded processing according to claim 1 is characterized in that: The data pre-checking and filling unit comprises: The pre-verification subunit is used to pre-verify the required risk control elements in the risk control request and transmit the pre-verified data to the filling subunit; The filling subunit is used to receive the data after successful pre-verification and call the risk control factor dependency data for filling to obtain the first-stage output data.

3. The risk control system based on phased multi-threaded processing according to claim 2 is characterized in that: The split data unit includes: The judging subunit is used to receive the output data of the first stage and judge the type of the bid in the output data of the first stage. When the type of the bid is a combined bid, the output data of the first stage is transmitted to the splitting subunit; when the type of the bid is a single bid, the output data of the first stage is directly output as the output data of the second stage; The splitting subunit is used to receive the first-stage output data transmitted by the judging subunit, and split the first-stage output data according to the corresponding information of the combined bid, so as to obtain the second-stage output data.

4. The risk control system based on phased multi-threaded processing according to claim 3 is characterized in that: The calculation data preparation unit comprises: The query subunit is used to receive the output data of the second stage and confirm the indicators to be calculated based on the risk control factors; The preparation subunit is used to call the calculation dependency data of each factor corresponding to the indicator from the memory according to the indicator confirmed by the query subunit; The merging subunit is used to merge the output data of the second stage with the indicators and the calculation dependent data of each factor corresponding to the indicators, and output the output data of the third stage.

5. The risk control system based on phased multi-threaded processing according to claim 4 is characterized in that: The factor parallel calculation and aggregation unit includes: The factor parallel calculation subunit is used to perform multi-threaded parallel calculation on each factor according to the calculation data of each factor corresponding to the indicators in the output data of the third stage, obtain the value of each factor and transmit it to the aggregation subunit; The aggregation subunit is used to aggregate the values ​​of various factors according to the indicator calculation formula to obtain the risk control indicator value, which is the output data of the fourth stage.

6. The risk control system based on phased multi-threaded processing according to claim 5 is characterized in that: The risk control verification unit includes: The threshold selection subunit is used to configure the risk control threshold according to the risk control rules and transmit it to the verification subunit; The verification subunit is used to compare the output data of the fourth stage, namely the risk control index value, with the risk control threshold to obtain the risk control result.

7. The risk control system based on phased multi-threaded processing according to claim 6 is characterized in that: The thread queue assembly submodule includes: an assembler and a thread queue unit; the thread queue unit includes a plurality of different types of thread queue models; the assembler configures corresponding types of thread queue models from the thread queue unit according to the processing scenarios of the five processing units, and assembles them into the corresponding processing units.

8. The risk control system based on phased multi-threaded processing according to claim 7 is characterized in that: The multiple different types of thread queue models include: a single thread queue model, a lock-free queue thread model, a priority lock-free queue thread model and a Disruptor thread queue model.