A programmed transaction instruction scheduling system and method in a multitasking concurrent state

By binding signal validity periods, implementing dynamic priority, and using dual-channel closed-loop feedback adjustment, the problems of expired signal retention and uneven resource allocation in algorithmic trading systems have been solved, achieving efficient signal processing and resource optimization, and improving system stability and resource utilization.

CN123157376APending Publication Date: 2026-11-24深圳市索度科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611361672.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-03
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Existing algorithmic trading order scheduling systems suffer from problems such as expired signal retention, uneven resource allocation, insufficient identification of duplicate signals, and inability of scheduling strategies to adapt under high-frequency market conditions. These issues lead to increased computational latency, low resource utilization, and frequent invalid orders.

Method used

By employing a signal validity period binding mechanism, a dynamic priority evaluation model, signal redundancy determination, and a dual-channel closed-loop feedback adjustment mechanism, expired signals can be actively discarded, dynamically prioritized, and adaptively allocated to resources. This enables the accurate identification of duplicate signals and the optimization of instruction generation and delivery processes.

Benefits of technology

It effectively reduces computational latency, improves the utilization rate of computing resources, reduces invalid delegation, ensures the timeliness and system stability throughout the signal's lifecycle, and reduces system maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123157376A_ABST
    Figure CN123157376A_ABST
Patent Text Reader

Abstract

This invention relates to the field of quantitative trading technology, specifically to a programmatic trading instruction scheduling system and method under multi-task concurrent conditions, comprising the following steps: S1, receiving multi-source heterogeneous real-time market data streams, parsing the target code field, market timestamp field, and data source channel identifier field in each data frame, and splitting the market data stream into several concurrent computation tasks according to the indicator calculation dependency topology. This invention uses a signal validity period binding mechanism to actively discard expired signals during the task registration stage, preventing invalid signals from ineffectively occupying computation threads and memory bandwidth. By binding the validity decay rate constant in the dynamic priority evaluation model to the half-life of the signal validity period, the scheduling priority of a signal naturally decays to half of its initial value when it reaches its validity period, achieving automatic degradation of the priority of expired signals and effectively reducing computation latency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of quantitative trading technology, specifically to a programmatic trading instruction scheduling system and method under multi-task concurrent conditions. Background Technology

[0002] With the rapid development of electronic and algorithmic trading technologies in the financial market, quantitative trading systems have become the core infrastructure for institutional investors and high-frequency trading participants. Algorithmic trading systems receive multi-source heterogeneous market data streams in real time through market gateways, perform parallel calculations on the market data using multiple indicators to generate trading signals, and encapsulate the trading signals into instruction messages and send them to the exchange execution interface in an orderly manner. As the frequency of market data pushes increases and the complexity of trading strategies increases, the technical pressure faced by the system in areas such as concurrent task scheduling, multi-indicator computing power allocation, trading signal deduplication verification, and instruction timing control continues to increase, placing more stringent requirements on computational latency, order validity, and computing resource utilization.

[0003] However, existing algorithmic trading order scheduling technologies suffer from several drawbacks. Current systems typically employ first-in-first-out (FIFO) or static priority scheduling strategies for concurrent tasks, lacking a signal validity management mechanism tied to the market data refresh cycle. When market refresh frequencies are high, a large number of expired signals remain in the task queue, continuously consuming computation threads and memory bandwidth. This delays the scheduling of valid signals, and orders generated after expired signals participate in computation lose their timeliness, resulting in invalid orders. Furthermore, in existing multi-indicator parallel calculations, there is a lack of dynamic detection and priority coordination for computational resource conflicts between tasks. When multiple tasks simultaneously compete for the same computation thread or memory bandwidth, resource allocation relies solely on static configuration and cannot be adjusted based on real-time conflict intensity, causing some threads to remain continuously overloaded while others remain idle. The existing trading signal duplication detection methods suffer from low efficiency. They typically rely solely on the numerical similarity of the signal content, failing to incorporate a data source channel identifier dimension. This makes it difficult to effectively identify situations where the same market event arrives repeatedly through different physical channels due to multiple market data pushes, gateway redundancy backups, and network retransmissions. This leads to missed detection of duplicate signals from the same source or misjudgment of independent signals from different sources as duplicates, resulting in duplicate orders or loss of valid signals. Furthermore, existing systems generally employ open-loop control for task scheduling and instruction issuance. Scheduling parameters are fixed during initialization and do not adjust with changes in operational status. When signal duplication rates increase due to market fluctuations, scheduling strategies cannot adaptively reduce concurrency conflicts. When congestion occurs at the trading execution interface, causing acknowledgment timeouts, the system also cannot automatically reduce message density, further exacerbating interface overload. Therefore, we provide a programmatic trading instruction scheduling system and method for multi-task concurrent operation. Summary of the Invention

[0004] In view of the above-mentioned shortcomings of the existing technology, the first objective of the present invention is to provide a programmatic trading instruction scheduling system and method under multi-task concurrent state, so as to solve the problems in the background technology.

[0005] To achieve the above objectives, the present invention provides the following technical solution:

[0006] A programmatic trading instruction scheduling system and method under multi-task concurrent state, comprising the following steps:

[0007] S1. Receive multi-source heterogeneous real-time market data streams, parse the target code field, market timestamp field, and data source channel identifier field in each data frame, and split the market data stream into several concurrent computing tasks according to the indicator calculation dependency topology; each concurrent computing task is bound to a signal validity period when it is registered to the distributed task queue; for expired tasks whose registration time has exceeded the signal validity period, they are directly discarded and do not enter the scheduling sequence.

[0008] S2. For each concurrent computation task in the distributed task queue that is in the waiting-to-be-scheduled state, the scheduling priority score is calculated in real time according to the dynamic priority evaluation model. The computation thread resources are allocated according to the priority score to drive the parallel execution of each indicator computation task and output the original transaction signal set. The timeliness decay rate constant of each task in the dynamic priority evaluation model is determined by the corresponding signal validity period, so that the signal timeliness decay factor decays to half of the initial value when the signal validity period is reached.

[0009] S3. Perform a repetitive trigger check on each signal in the original transaction signal set, mark the signals that are confirmed to be repetitive triggers as suppressed, and calculate the ratio of the number of suppressed signals to the total number of original signals in the current feedback period as the signal redundancy rate.

[0010] S4. Encapsulate the verified valid signal into a transaction instruction message and issue it according to the global monotonically increasing sequence number and sliding timing window; start the receipt waiting timer for the issued instruction. If no confirmation receipt is received within the preset receipt waiting time, mark it as timeout and calculate the receipt timeout rate in the current feedback cycle.

[0011] S5. Perform dual-channel closed-loop feedback adjustment: The computation-side feedback channel dynamically adjusts the ratio of the timeliness weight coefficient and the queue load weight coefficient in the dynamic priority evaluation model based on the signal redundancy rate; the distribution-side feedback channel adjusts the splitting granularity of the concurrent operation task and the window duration of the sliding timing window based on the acknowledgment timeout rate; the write interfaces of the computation-side feedback channel and the distribution-side feedback channel are isolated from each other; the dual-channel closed-loop feedback adjustment is performed with a fixed feedback period, which is an integer fraction of the signal validity period.

[0012] The present invention is further configured such that the signal validity period, the time decay rate constant, the time normalization window parameter in the signal repeatability determination, the window duration of the sliding timing window, and the receipt waiting time satisfy the following numerical linkage constraints:

[0013] Let the data refresh period for the market data product corresponding to the i-th concurrent processing task be . The duration of the signal validity period , It is a positive integer ranging from 2 to 5;

[0014] The time-degradation rate constant ;

[0015] Time normalization window parameter in signal repeatability determination function , It is a positive integer ranging from 1 to 2;

[0016] The window duration of the sliding timing window is the minimum message processing interval of the transaction execution interface. times, The value is a positive integer ranging from 1 to 3; the receipt waiting time is the duration of the sliding timing window. times, It is a positive integer ranging from 2 to 3.

[0017] The present invention is further configured such that, in step S2, the dynamic priority evaluation model determines the scheduling priority score of each concurrent operation task through the following priority calculation function:

[0018]

[0019] in, Let be the scheduling priority score of the i-th task at time t; This is the constant of the aging decay rate; The time interval from the moment the signal was generated to the current scheduling moment; This represents the current percentage of computing resources being used. A set of concurrent tasks that have conflicting computing resources; This refers to the conflict weighting coefficient. This is a quantified value for the intensity of the conflict. This represents the total number of tasks currently pending. Here is the regularization constant; and These are the timeliness weighting coefficient and the queue load weighting coefficient, respectively, satisfying... Its adjustment rules are as follows: , ;in As the benchmark value for timeliness weighting, For feedback gain coefficient, The signal redundancy rate of the previous feedback cycle. The duration of the fixed feedback period; the feedback gain coefficient κ satisfies the closed-loop convergence condition determined based on the signal validity period and the feedback period duration: .

[0020] The present invention is further configured such that, in step S3, the repeated triggering verification is implemented by the following signal repeatability determination function:

[0021]

[0022] in, This is a measure of signal repeatability. and It is a feature state vector; and For data source channel identification; These are source pointer functions; These are the weighting coefficients for channels of the same origin; This is the time decay rate parameter; The absolute time difference between the triggering moments; For time-normalized window parameters; and This is the intermediate feature vector for index calculation; The feature difference weighting coefficient; in the signal repeatability determination function, the weighting term of the same source channel. The computational position is located after the cosine distance term and before the time decay exponent term, so that the time decay factor is applied uniformly after the cosine distance term and the cosine distance term together form a composite distance quantity; when Less than the preset duplicate detection threshold When the signal is determined to be a repetitive trigger from the same source, a suppression flag is applied to the signal that arrives later.

[0023] The present invention is further configured such that step S4 also includes a linkage mechanism between the receipt state machine and the instruction freeze:

[0024] The code of each target maintains an instruction state machine including idle state, pending confirmation state, timeout state and frozen state; when the number of consecutive resends reaches the preset resend limit and no confirmation is received, the instruction state machine switches to the frozen state;

[0025] In the frozen state, dual linkage control is performed: on the issuing side, the subsequent instruction messages of the target code are suspended from entering the sliding timing window; on the calculation side, the scheduling priority score of the concurrent operation task corresponding to the target code is multiplied by a preset decay factor.

[0026] The conditions for releasing the frozen state include: receiving a manual unfreezing command, or the freezing duration reaching the preset freezing timeout period and no acknowledgment timeout record appearing within K consecutive feedback cycles.

[0027] The present invention is further configured such that, in step S5, the adjustment logic of the feed-downside feedback channel includes:

[0028] When the acknowledgment timeout rate exceeds the preset timeout rate alarm threshold within M consecutive feedback cycles, the granularity of the splitting of the indicator calculation dependency topology graph is switched from the first granularity to the second granularity. The merging rule for the second granularity is as follows: multiple consecutive branchless subtasks on the same indicator dependency chain are merged into a coarse-grained composite task. After merging, the subtasks within each composite task are executed serially, and different composite tasks are executed in parallel. At the same time, the window duration of the sliding timing window is extended to the original duration. times.

[0029] The present invention is further configured to include: a market data access module, used to parse multi-source heterogeneous real-time market data streams, split them into concurrent computing tasks according to the indicator calculation dependency topology, bind the validity period of signals and discard expired tasks;

[0030] The concurrent task scheduling module includes a priority calculation subunit and a resource allocation subunit. The priority calculation subunit executes a dynamic priority evaluation model and has an independent weight update interface.

[0031] The signal verification and deduplication module includes a repeatability calculation unit and a redundancy rate statistics unit. The repeatability calculation unit executes a signal repeatability determination function, and the redundancy rate statistics unit outputs the signal redundancy rate.

[0032] The instruction timing control and issuance module includes a sliding timing window control unit and a receipt state machine unit. The sliding timing window control unit is equipped with an independent window duration interface, and the receipt state machine unit outputs the receipt timeout rate.

[0033] The closed-loop feedback adjustment module is provided with a calculation-side feedback input port and a distribution-side feedback input port. The calculation-side feedback input port writes the allocation data only through the weight update interface, and the distribution-side feedback input port writes the control data only through the granularity control interface of the task splitting unit and the window duration interface. The weight update interface, granularity control interface and window duration interface are isolated from each other in physical address space.

[0034] The present invention is further configured such that: the concurrent task scheduling module further includes a load migration unit, configured to migrate low-priority tasks on high-load threads to idle threads within a single scheduling cycle, while keeping the remaining duration of the task's signal validity period and its dependencies unchanged during the migration process.

[0035] The present invention is further configured such that the closed-loop feedback adjustment module includes:

[0036] The computational side feedback submodule verifies the current feedback gain coefficient before writing in each feedback cycle. Does the closed-loop convergence condition meet? If not, then... Clamped to the upper bound of the stability region Then perform the weight calculation;

[0037] The side feedback submodule sends switching and extension commands through the granularity control interface and window duration interface when the receipt timeout rate exceeds the alarm threshold.

[0038] The write ports of the computation-side feedback submodule and the distribution-side feedback submodule correspond to different physical address ranges.

[0039] The present invention is further configured such that: when the computer program is executed by the processor, it implements the programmatic trading instruction scheduling method in a multi-task concurrent state as described in any one of claims 1 to 6.

[0040] Beneficial effects

[0041] Compared with known public technologies, the technical solution provided by this invention has the following beneficial effects:

[0042] 1. This invention employs a signal validity period binding mechanism to proactively discard expired signals during the task registration phase, preventing invalid signals from unnecessarily occupying computing threads and memory bandwidth. By binding the validity decay rate constant in the dynamic priority evaluation model to the half-life of the signal validity period, the scheduling priority of a signal naturally decays to half of its initial value when it reaches its validity period, achieving automatic degradation of the priority of expired signals and effectively reducing computational latency. Furthermore, by introducing the data source channel identifier in the signal repetition determination function and designing a specific computational position for the weighted item of the same source channel, it accurately identifies repeated arrivals of the same market event caused by multiple market data pushes, gateway redundancy backups, or network retransmissions, suppressing them before instruction generation and significantly reducing the number of invalid order messages.

[0043] 2. This invention employs a dual-channel closed-loop feedback adjustment mechanism. The computational side adjusts the scheduling weight allocation based on the signal redundancy rate, while the sending side adjusts the splitting granularity and window duration based on the receipt timeout rate. Each channel manages a segment without overstepping boundaries, enabling the system to adaptively adjust when the signal repetition rate fluctuates or the interface is congested. This optimizes computational resource usage and reduces the frequency of invalid delegates. Through a full-link timeliness constraint chain, the time parameters of each stage from the data refresh cycle to the receipt confirmation are uniformly derived in integer multiples, ensuring that the entire lifecycle of the signal is under unified timeliness control and avoiding signal expiration or misjudgment caused by mismatched time parameters in each stage.

[0044] 3. This invention divides the system into five independent modules: market data access, concurrent task scheduling, signal verification and deduplication, instruction timing control and issuance, and closed-loop feedback adjustment. Each module is connected by clearly defined input and output ports, achieving functional decoupling and independent maintenance. In the closed-loop feedback adjustment module, the write ports on the calculation side and the issuance side correspond to different physical address ranges, eliminating cross-write conflicts between the two-channel adjustment operations at the hardware level and improving system stability. Through the load migration unit, the thread load rate is detected at the end of each scheduling cycle, and low-priority tasks on high-load threads are automatically migrated to idle threads. During the migration process, the remaining validity period of the signal remains unchanged, achieving dynamic balancing of computing resources while ensuring signal timeliness and optimizing the overall utilization of multi-core processors.

[0045] 4. This invention uses a feedback gain clamping mechanism to check whether the feedback gain coefficient meets the closed-loop convergence condition before writing in each feedback cycle. If it does not meet the condition, it automatically clamps to the upper bound of the stable domain. This eliminates scheduling weight oscillations caused by excessive feedback gain from the engineering execution level, ensuring stable convergence of the closed-loop system under various operating conditions. The configuration data is permanently stored in a computer-readable storage medium, enabling the system to have hot parameter update capabilities. When changing trading instruments or adjusting market data sources, only the configuration data needs to be updated to complete the adaptation, reducing system maintenance costs. Attached Figure Description

[0046] Figure 1 This is a schematic diagram of the overall process of a programmatic trading instruction scheduling system and method under multi-task concurrent state according to the present invention;

[0047] Figure 2 This is a schematic diagram of the overall system architecture of a programmatic trading instruction scheduling system and method under multi-task concurrent state according to the present invention;

[0048] Figure 3 This is a schematic diagram of the end-to-end time constraint chain of a programmatic trading instruction scheduling system and method under multi-task concurrent state according to the present invention;

[0049] Figure 4This is a schematic diagram of the dual-channel closed-loop feedback and state machine linkage of a programmatic trading instruction scheduling system and method under multi-task concurrent state according to the present invention. Detailed Implementation

[0050] To make the technical problems, technical solutions, and beneficial effects of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the described embodiments are only a part of the embodiments of this application, not all of them. The specific embodiments described herein are only used to explain the invention and are not intended to limit the invention. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0051] It should be further noted that the accompanying drawings and embodiments of the present invention mainly describe the concept of the present invention. Based on this concept, some specific forms and arrangements of connection relationships, positional relationships, power mechanisms, power supply systems, hydraulic systems and control systems may not be fully described. However, under the premise that those skilled in the art understand the concept of the present invention, they can implement the above-mentioned specific forms and arrangements in a well-known manner.

[0052] When a component is referred to as "fixed to" or "set on" another component, it can be directly on or indirectly on that other component. When a component is referred to as "connected to" another component, it can be directly connected to or indirectly connected to that other component.

[0053] The directional terms "inner" and "outer" refer to the inner and outer contours of each component itself. The terms "length," "width," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the present invention.

[0054] For ease of description, spatial relative terms such as "above," "on top of," "on the upper surface of," "above," etc., are used herein to describe the spatial positional relationship of a device or feature as shown in the figure to other devices or features. It should be understood that spatial relative terms are intended to encompass different orientations in use or operation besides the orientation of the device as described in the figure. For example, if the device in the figure is inverted, a device described as "above" or "on top of" other devices or structures would subsequently be positioned as "below" or "under" other devices or structures. Thus, the exemplary term "above" can include both "above" and "below." The device may also be positioned in other different ways, and the spatial relative descriptions used herein will be interpreted accordingly.

[0055] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, and "several" means one or more, unless otherwise explicitly specified.

[0056] The present invention will now describe a programmatic trading instruction scheduling system and method under multi-task concurrent state.

[0057] Example 1

[0058] like Figure 1-4 As shown, the present invention provides a technical solution: a programmatic trading instruction scheduling system and method under multi-task concurrent state, comprising the following steps:

[0059] S1. Receive multi-source heterogeneous real-time market data streams, parse the target code field, market timestamp field, and data source channel identifier field in each data frame, and split the market data stream into several concurrent computing tasks based on the indicator calculation dependency topology. Each concurrent computing task binds a signal validity period when registering to the distributed task queue. For expired tasks whose registration time has exceeded the signal validity period, they are directly discarded and do not enter the scheduling sequence.

[0060] S2. For each concurrent computation task in the distributed task queue that is in the waiting-to-be-scheduled state, the scheduling priority score is calculated in real time according to the dynamic priority evaluation model. The computation thread resources are allocated according to the priority score to drive the parallel execution of each indicator computation task and output the original transaction signal set. The timeliness decay rate constant of each task in the dynamic priority evaluation model is determined by the corresponding signal validity period, so that the signal timeliness decay factor decays to half of the initial value when the signal validity period is reached.

[0061] S3. Perform a repetitive trigger check on each signal in the original trading signal set, mark the signals that are confirmed to be repetitive triggers as suppressed, and calculate the ratio of the number of suppressed signals to the total number of original signals in the current feedback period as the signal redundancy rate.

[0062] S4. Encapsulate the verified valid signal into a transaction instruction message and issue it according to the global monotonically increasing sequence number and sliding timing window; start the receipt waiting timer for the issued instruction. If no confirmation receipt is received within the preset receipt waiting time, mark it as timeout and calculate the receipt timeout rate in the current feedback cycle.

[0063] S5. Perform dual-channel closed-loop feedback adjustment: The computation-side feedback channel dynamically adjusts the ratio of timeliness weight coefficient and queue load weight coefficient in the dynamic priority evaluation model based on the signal redundancy rate; the distribution-side feedback channel adjusts the splitting granularity of concurrent computing tasks and the window duration of the sliding timing window based on the acknowledgment timeout rate; the write interfaces of the computation-side feedback channel and the distribution-side feedback channel are isolated from each other; the dual-channel closed-loop feedback adjustment is performed with a fixed feedback period, which is an integer fraction of the signal validity period.

[0064] The signal validity period, the time decay rate constant, the time normalization window parameter in signal repeatability determination, the window duration of the sliding timing window, and the acknowledgment waiting time satisfy the following numerical linkage constraints:

[0065] Let the data refresh period for the market data product corresponding to the i-th concurrent processing task be . The signal validity period is... , It is a positive integer ranging from 2 to 5;

[0066] Age decay rate constant ;

[0067] Time normalization window parameter in signal repeatability determination function , It is a positive integer ranging from 1 to 2;

[0068] The window duration of the sliding timing window is equal to the minimum message processing interval of the transaction execution interface. times, The value is a positive integer ranging from 1 to 3; the receipt waiting time is the duration of the sliding timing window. times, It is a positive integer ranging from 2 to 3;

[0069] In step S2, the dynamic priority evaluation model determines the scheduling priority score of each concurrent operation task using the following priority calculation function:

[0070]

[0071] in, Let be the scheduling priority score of the i-th task at time t; This is the constant of the aging decay rate; The time interval from the moment the signal was generated to the current scheduling moment; This represents the current percentage of computing resources being used. A set of concurrent tasks that have conflicting computing resources; This refers to the conflict weighting coefficient. This is a quantified value for the intensity of the conflict. This represents the total number of tasks currently pending. Here is the regularization constant; and These are the timeliness weighting coefficient and the queue load weighting coefficient, respectively, satisfying... Its adjustment rules are as follows: , ;in As the benchmark value for timeliness weighting, For feedback gain coefficient, This represents the signal redundancy rate of the previous feedback cycle. The feedback period is fixed in duration; the feedback gain coefficient κ satisfies the closed-loop convergence condition determined by the signal validity period and the feedback period duration: ;

[0072] In step S3, the repeated trigger verification is implemented using the following signal repeatability determination function:

[0073]

[0074] in, This is a measure of signal repeatability. and It is a feature state vector; and For data source channel identification; These are source pointer functions; These are the weighting coefficients for channels of the same origin; This is the time decay rate parameter; The absolute time difference between the triggering moments; For time-normalized window parameters; and This is the intermediate feature vector for index calculation; These are the feature difference weighting coefficients; in the signal repeatability determination function, the weighting term for the same source channel. The operation position is located after the cosine distance term and before the time decay exponent term, so that the time decay factor is uniformly applied after the cosine distance term and the cosine distance term together form a composite distance quantity; when Less than the preset duplicate detection threshold When this occurs, it is determined that the signal constitutes a repetitive triggering from the same source, and a suppression flag is applied to the signal that arrives later.

[0075] Step S4 also includes a linkage mechanism between the receipt state machine and the instruction freeze:

[0076] Maintain an instruction state machine for each target's code, including idle state, pending confirmation state, timeout state, and frozen state; when the number of consecutive retransmissions reaches the preset retransmission limit and no confirmation is received, the instruction state machine switches to the frozen state;

[0077] In the frozen state, dual linkage control is performed: on the issuing side, the subsequent instruction messages of the target code are suspended from entering the sliding timing window; on the computing side, the scheduling priority score of the concurrent operation task corresponding to the target code is multiplied by a preset decay factor.

[0078] The conditions for lifting the freeze status include: receiving a manual unfreeze command, or the freeze duration reaching the preset freeze timeout period and no timeout record for the receipt within K consecutive feedback cycles;

[0079] In step S5, the adjustment logic of the feedback channel on the sending side includes:

[0080] When the acknowledgment timeout rate exceeds the preset timeout rate alarm threshold within M consecutive feedback cycles, the granularity of the metric calculation dependency topology graph is switched from the first granularity to the second granularity. The merging rule for the second granularity is as follows: multiple consecutive branchless subtasks on the same metric dependency chain are merged into a coarse-grained composite task. After merging, the subtasks within each composite task are executed serially, and different composite tasks are executed in parallel. At the same time, the window duration of the sliding timing window is extended to the original duration. times.

[0081] In this embodiment, by binding the signal validity period to a mechanism, expired signals are actively discarded during the task registration phase, avoiding the occupation of computation threads and memory bandwidth by expired signals, thereby reducing the consumption of invalid computational resources. By binding the validity decay rate constant to the half-life of the signal validity period in the dynamic priority evaluation model, the scheduling priority of a signal naturally decays to half of its initial value when it reaches its validity period, achieving automatic priority degradation of expired signals without manual intervention, effectively reducing computational latency. By introducing a specific computational position design for the data source channel identifier and the weighting term of the same source channel in the signal repetition determination function, the system accurately identifies repeated arrivals of the same market event caused by multiple market data pushes, gateway redundancy backups, or network retransmissions, suppressing them before the signal enters the instruction generation stage, significantly reducing the number of invalid order messages generated. Through a dual-channel closed-loop feedback adjustment mechanism, the computation-side feedback channel dynamically adjusts its settings based on the signal redundancy rate. The system employs a weighted allocation mechanism, adjusting task splitting granularity and window duration based on the receipt timeout rate in the feedback channel on the issuing side. Two feedback channels each manage a segment without overstepping boundaries, enabling the system to adaptively adjust to fluctuations in signal repetition rate or congestion at the transaction execution interface. This optimizes overall computing resource utilization and reduces the frequency of invalid orders. Furthermore, a full-link timeliness constraint chain links data refresh cycle, signal validity period, timeliness decay rate constant, time normalized window parameters, sliding timing window duration, and receipt waiting time in integer multiples. This ensures that the entire lifecycle of a signal, from entering the task queue to instruction confirmation, remains under unified timeliness control, preventing signal expiration or misjudgment caused by mismatched time parameters at different stages.

[0082] Example 2

[0083] like Figure 1-4 As shown, it includes: a market data access module, which is used to parse multi-source heterogeneous real-time market data streams, split them into concurrent computing tasks according to the indicator calculation dependency topology, bind the validity period of signals and discard expired tasks;

[0084] The concurrent task scheduling module includes a priority calculation subunit and a resource allocation subunit. The priority calculation subunit executes a dynamic priority evaluation model and has an independent weight update interface.

[0085] The signal verification and deduplication module includes a repeatability calculation unit and a redundancy rate statistics unit. The repeatability calculation unit executes the signal repeatability determination function, and the redundancy rate statistics unit outputs the signal redundancy rate.

[0086] The instruction timing control and issuance module includes a sliding timing window control unit and a receipt state machine unit. The sliding timing window control unit has an independent window duration interface, and the receipt state machine unit outputs the receipt timeout rate.

[0087] The closed-loop feedback adjustment module has a calculation-side feedback input port and a distribution-side feedback input port. The calculation-side feedback input port only writes the allocation data through the weight update interface, and the distribution-side feedback input port only writes the control data through the granularity control interface and window duration interface of the task splitting unit. The weight update interface, granularity control interface and window duration interface are isolated from each other in physical address space.

[0088] The concurrent task scheduling module also includes a load migration unit, which is configured to migrate low-priority tasks on high-load threads to idle threads within a single scheduling cycle, while keeping the remaining duration of the task's signal validity period and its dependencies unchanged during the migration process.

[0089] The closed-loop feedback adjustment module includes:

[0090] The computational side feedback submodule verifies the current feedback gain coefficient before writing in each feedback cycle. Does it meet the closed-loop convergence condition? If not, then... Clamped to the upper bound of the stability region Then perform the weight calculation;

[0091] The side feedback submodule sends switching and extension commands through the granular control interface and window duration interface when the acknowledgment timeout rate exceeds the alarm threshold.

[0092] The write ports of the computation-side feedback submodule and the distribution-side feedback submodule correspond to different physical address ranges;

[0093] When a computer program is executed by a processor, it implements a programmatic trading instruction scheduling method in a multi-task concurrent state as described in any one of claims 1 to 6.

[0094] In this embodiment, the system is divided into five independent modules: a market data access module, a concurrent task scheduling module, a signal verification and deduplication module, an instruction timing control and issuance module, and a closed-loop feedback adjustment module. These modules are connected via clearly defined input / output ports, achieving functional decoupling and independent maintenance. In the closed-loop feedback adjustment module, the write ports of the computation-side feedback submodule and the issuance-side feedback submodule correspond to different physical address ranges. There is no address overlap at the hardware level, ensuring that the adjustment operations of the two channels do not generate cross-write conflicts within any feedback cycle, thus improving the stability and reliability of the system. Through the load migration unit in the concurrent task scheduling module, the load rate of each computation thread is detected at the end of each scheduling cycle. When a thread exceeds the high load threshold for two consecutive cycles, the lowest priority task on that thread is automatically migrated to an idle thread, while maintaining the remaining signal validity period during the migration process. This ensures that the migration operation does not cause the task to exceed its bound signal validity period, thereby achieving dynamic balancing of computational resources while ensuring signal timeliness and optimizing the overall utilization of the multi-core processor. The feedback gain clamping in the computation-side feedback submodule further enhances the system's performance. The mechanism verifies whether the current feedback gain coefficient meets the closed-loop convergence condition determined by the signal validity period and feedback cycle duration before writing each feedback cycle. If not, it automatically clamps the feedback gain coefficient to the upper bound of the stable domain before performing weight calculation. This eliminates scheduling weight oscillations and periodic disorder of task sequences caused by excessive feedback gain from an engineering execution perspective, ensuring stable convergence of the closed-loop feedback system under various market fluctuation conditions. Through the configuration data (including the indicator calculation dependency topology diagram, data refresh cycle parameters of each market instrument, signal validity period configuration table, feedback gain coefficient and closed-loop convergence condition parameters, repetition judgment threshold and time normalization window parameters) permanently stored in a computer-readable storage medium, the system has the ability to quickly deploy and hot update parameters. When changing trading instruments or adjusting market data sources, only the configuration data in the storage medium needs to be updated to complete the adaptation, reducing system maintenance costs.

[0095] Working principle:

[0096] like Figure 1-4As shown, in practical use, the present invention receives multi-source heterogeneous real-time market data streams from the market data gateway via the market data access module. The data frame parsing unit parses each frame of market data, extracting the target code field, market timestamp field, and data source channel identifier field. The task splitting unit, based on a pre-built indicator calculation dependency topology graph, splits the parsed market data stream into several concurrent computation tasks. During the splitting process, indicator computation nodes without computational dependencies are divided into independent tasks within the same concurrent execution group to achieve parallel processing. For indicator computation nodes with upstream and downstream computational dependencies, a directed acyclic task chain is established according to the dependency order, and tasks are enqueued sequentially according to the topology sorting result. Each concurrent computation task is bound to a signal validity period when registered to the distributed task queue. This duration is based on the corresponding market data. The data refresh cycle for each product is derived according to a predetermined integer multiple relationship. For expired tasks whose registration time has exceeded the signal validity period, the system directly discards them without entering the scheduling sequence, thus eliminating the invalid occupation of computing resources by expired signals from the source. Each concurrent operation task entering the scheduling sequence is assigned a scheduling priority score in real time by the priority calculation subunit based on the dynamic priority evaluation model. This model integrates four dimensions—signal timeliness decay, computing resource occupation ratio, computing power conflict intensity, and queue congestion degree—into a single priority scalar. The timeliness decay rate constant is strictly bound to the signal validity period through a half-life relationship, ensuring that the signal's timeliness contribution decays to exactly half of its initial value when it reaches its validity period. The resource allocation subunit allocates computing thread resources in descending order of priority score, driving the parallel execution of each indicator operation task and outputting the original trading signal set.

[0097] After the original trading signal set is output, it enters the signal verification and deduplication module. The signal feature extraction unit encodes the target code, trigger indicator type, trigger direction, and trigger price of each signal into a feature state vector of a unified dimension. The event source identifier inheritance unit passes the data source channel identifier extracted during market data frame parsing to the corresponding signal. This is used to identify situations where the same market event arrives repeatedly through different physical channels due to multiple market data pushes, gateway redundancy backups, or network retransmissions. The repetition calculation unit executes the signal repetition determination function. In this function, the same-source channel weighting term is located at a specific operation position after the cosine distance term and before the time decay exponent term. Together with the cosine distance, it forms a composite distance quantity and then applies a time decay factor. This ensures that the similarity weighting effect of the same-source channels decays synchronously as the time difference increases, preventing signals from the same source but with a large time interval from being misjudged as repetitions, and also preventing signals from different sources but with similar times from being misjudged as non-repetitions. When the redundancy metric value is lower than the preset repetition judgment threshold, it is determined that the same source repetition is triggered. The signal that arrives later is marked with a suppression flag to prevent it from entering the instruction generation stage. The redundancy rate statistics unit counts the proportion of suppressed signals in each feedback cycle and outputs the signal redundancy rate. The valid signals that have been verified enter the instruction timing control and delivery module. The message encapsulation and numbering unit encapsulates them into transaction instruction messages and assigns a globally monotonically increasing sequence number. After the sliding timing window control unit limits the maximum number of concurrent messages of the same target code in a single window cycle, they are sent to the transaction execution interface in an orderly manner. The acknowledgment state machine unit maintains an instruction state machine for each target code, which includes four states: idle state, pending confirmation state, timeout state, and frozen state. An acknowledgment waiting timer is started for the issued instruction. If no acknowledgment is received after the timeout, a retransmission is triggered. If the continuous retransmission reaches the upper limit, it enters the frozen state. In the frozen state, the dual linkage control of instruction suspension on the issuing side and priority decay on the calculation side is executed simultaneously.

[0098] During continuous system operation, the closed-loop feedback adjustment module performs dual-channel closed-loop feedback adjustment at a fixed feedback cycle. It calculates the redundancy rate of the received signal in the side feedback channel and verifies whether the current feedback gain coefficient meets the closed-loop convergence condition determined based on the signal validity period and feedback cycle duration. If not, the feedback gain coefficient is clamped to the upper bound of the stability region. Subsequently, based on the signal redundancy rate, the ratio of the timeliness weight coefficient and the queue load weight coefficient in the dynamic priority evaluation model is dynamically adjusted. This causes the scheduling to shift towards queue load balancing when repeated signals increase, reducing the probability of repeated triggering caused by concurrent conflicts. The module also issues the side feedback channel receipt timeout rate. When the receipt timeout rate exceeds a preset alarm threshold for multiple consecutive feedback cycles, the transaction execution interface is determined to be congested. A granularity switching command is then sent to the task splitting unit to switch the splitting granularity from the first granularity to the second granularity. This invention reduces the total number of concurrent tasks by merging continuous, branchless subtasks on the same metric dependency chain into coarse-grained composite tasks. Simultaneously, it sends window expansion instructions to the sliding timing window control unit to reduce message density per unit time. The write interfaces of the computation-side feedback channel and the distribution-side feedback channel are physically isolated to ensure that adjustment operations in either channel do not cause cross-write conflicts during any feedback cycle. Through the synergistic effect of the aforementioned end-to-end time constraint chain and dual-channel closed-loop feedback, this invention achieves reduced computational latency, fewer invalid orders, and optimized computational resource usage throughout the entire lifecycle of a signal from entering the task queue to instruction confirmation. This effectively solves the computer system technical problems of concurrent market data computation latency, multi-metric computational power conflicts, duplicate signal-driven order placement, and congestion in the add-position task queue in algorithmic trading scenarios.

[0099] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

[0100] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments according to this application. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0101] Unless otherwise specifically stated, the relative arrangement, numerical expressions, and values ​​of the components and steps described in these embodiments do not limit the scope of this application. It should also be understood that, for ease of description, the dimensions of the various parts shown in the drawings are not drawn to actual scale. Techniques, methods, and devices known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and devices should be considered part of the specification. In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values. It should be noted that similar reference numerals and letters in the following drawings denote similar items; therefore, once an item is defined in one drawing, it need not be further discussed in subsequent drawings.

Claims

1. A method for scheduling programmatic trading instructions under multi-task concurrent conditions, characterized in that, Includes the following steps: S1. Receive multi-source heterogeneous real-time market data streams, parse the target code field, market timestamp field, and data source channel identifier field in each data frame, and split the market data stream into several concurrent computing tasks according to the indicator calculation dependency topology; each concurrent computing task is bound to a signal validity period when it is registered to the distributed task queue; for expired tasks whose registration time has exceeded the signal validity period, they are directly discarded and do not enter the scheduling sequence. S2. For each concurrent computation task in the distributed task queue that is in the waiting-to-be-scheduled state, the scheduling priority score is calculated in real time according to the dynamic priority evaluation model. The computation thread resources are allocated according to the priority score to drive the parallel execution of each indicator computation task and output the original transaction signal set. The timeliness decay rate constant of each task in the dynamic priority evaluation model is determined by the corresponding signal validity period, so that the signal timeliness decay factor decays to half of the initial value when the signal validity period is reached. S3. Perform a repetitive trigger check on each signal in the original transaction signal set, mark the signals that are confirmed to be repetitive triggers as suppressed, and calculate the ratio of the number of suppressed signals to the total number of original signals in the current feedback period as the signal redundancy rate. S4. Encapsulate the verified valid signal into a transaction instruction message and send it out according to the global monotonically increasing sequence number and the sliding timing window. If a confirmation receipt is not received within the preset confirmation receipt waiting time after an instruction has been issued, it is marked as a timeout state, and the confirmation receipt timeout rate in the current feedback cycle is calculated. S5. Perform dual-channel closed-loop feedback adjustment: The calculation-side feedback channel dynamically adjusts the ratio of the timeliness weight coefficient and the queue load weight coefficient in the dynamic priority evaluation model based on the signal redundancy rate. The sending-side feedback channel adjusts the granularity of the concurrent computation task splitting and the window duration of the sliding timing window based on the acknowledgment timeout rate; the write interfaces of the computation-side feedback channel and the sending-side feedback channel are isolated from each other; the dual-channel closed-loop feedback adjustment is executed with a fixed feedback period, which is an integer fraction of the signal validity period.

2. The method for scheduling programmatic trading instructions in a multi-task concurrent state according to claim 1, characterized in that: The signal validity period, the time decay rate constant, the time normalization window parameter in the signal repeatability determination, the window duration of the sliding timing window, and the receipt waiting time satisfy the following numerical linkage constraints: Let the data refresh period for the market data product corresponding to the i-th concurrent processing task be . The duration of the signal validity period , It is a positive integer ranging from 2 to 5; The time-degradation rate constant ; Time normalization window parameter in signal repeatability determination function , It is a positive integer ranging from 1 to 2; The window duration of the sliding timing window is the minimum message processing interval of the transaction execution interface. times, The value is a positive integer ranging from 1 to 3; the receipt waiting time is the duration of the sliding timing window. times, It is a positive integer ranging from 2 to 3.

3. The method for scheduling programmatic trading instructions in a multi-task concurrent state according to claim 1, characterized in that: In step S2, the dynamic priority evaluation model determines the scheduling priority score of each concurrent operation task through the following priority calculation function: ; in, Let be the scheduling priority score of the i-th task at time t; This is the constant of the aging decay rate; The time interval from the moment the signal was generated to the current scheduling moment; This represents the current percentage of computing resources being used. A set of concurrent tasks that have conflicting computing resources; This refers to the conflict weighting coefficient. This is a quantified value for the intensity of the conflict. This represents the total number of tasks currently pending. Here is the regularization constant; and These are the timeliness weighting coefficient and the queue load weighting coefficient, respectively, satisfying... Its adjustment rules are as follows: , ;in As the benchmark value for timeliness weighting, For feedback gain coefficient, The signal redundancy rate of the previous feedback cycle. The duration of the fixed feedback period; the feedback gain coefficient κ satisfies the closed-loop convergence condition determined based on the signal validity period and the feedback period duration: .

4. The method for scheduling programmatic trading instructions in a multi-task concurrent state according to claim 1, characterized in that: In step S3, the repeated triggering verification is implemented using the following signal repeatability determination function: ; in, This is a measure of signal repeatability. and It is a feature state vector; and For data source channel identification; These are source pointer functions; These are the weighting coefficients for channels of the same origin; This is the time decay rate parameter; The absolute time difference between the triggering moments; For time-normalized window parameters; and This is the intermediate feature vector for index calculation; The feature difference weighting coefficient; in the signal repeatability determination function, the weighting term of the same source channel. The computational position is located after the cosine distance term and before the time decay exponent term, so that the time decay factor is applied uniformly after the cosine distance term and the cosine distance term together form a composite distance quantity; when Less than the preset duplicate detection threshold When the signal is determined to be a repetitive trigger from the same source, a suppression flag is applied to the signal that arrives later.

5. The method for scheduling programmatic trading instructions in a multi-task concurrent state according to claim 1, characterized in that: Step S4 also includes a linkage mechanism between the receipt state machine and the instruction freeze: The code of each target maintains an instruction state machine including idle state, pending confirmation state, timeout state and frozen state; when the number of consecutive resends reaches the preset resend limit and no confirmation is received, the instruction state machine switches to the frozen state; In the frozen state, dual linkage control is performed: on the issuing side, subsequent instruction messages of the target code are suspended from entering the sliding timing window; On the computation side, the scheduling priority score of the concurrent operation task corresponding to the target's code is multiplied by a preset decay factor; The conditions for releasing the frozen state include: receiving a manual unfreezing command, or the freezing duration reaching the preset freezing timeout period and no acknowledgment timeout record appearing within K consecutive feedback cycles.

6. The method for scheduling programmatic trading instructions in a multi-task concurrent state according to claim 1, characterized in that, In step S5, the adjustment logic of the feed-down side feedback channel includes: When the acknowledgment timeout rate exceeds the preset timeout rate alarm threshold within M consecutive feedback cycles, the granularity of the splitting of the indicator calculation dependency topology graph is switched from the first granularity to the second granularity. The merging rule for the second granularity is as follows: multiple consecutive branchless subtasks on the same indicator dependency chain are merged into a coarse-grained composite task. After merging, the subtasks within each composite task are executed serially, and different composite tasks are executed in parallel. At the same time, the window duration of the sliding timing window is extended to the original duration. times.

7. A programmatic trading instruction scheduling system under multi-task concurrent state, characterized in that, include: The market data access module is used to parse multi-source heterogeneous real-time market data streams, split them into concurrent computing tasks based on the indicator calculation dependency topology, bind the validity period of signals and discard expired tasks. The concurrent task scheduling module includes a priority calculation subunit and a resource allocation subunit. The priority calculation subunit executes a dynamic priority evaluation model and has an independent weight update interface. The signal verification and deduplication module includes a repeatability calculation unit and a redundancy rate statistics unit. The repeatability calculation unit executes a signal repeatability determination function, and the redundancy rate statistics unit outputs the signal redundancy rate. The instruction timing control and issuance module includes a sliding timing window control unit and a receipt state machine unit. The sliding timing window control unit is equipped with an independent window duration interface, and the receipt state machine unit outputs the receipt timeout rate. The closed-loop feedback adjustment module is provided with a calculation-side feedback input port and a distribution-side feedback input port. The calculation-side feedback input port writes the allocation data only through the weight update interface, and the distribution-side feedback input port writes the control data only through the granularity control interface of the task splitting unit and the window duration interface. The weight update interface, granularity control interface and window duration interface are isolated from each other in physical address space.

8. A programmatic trading instruction scheduling system under multi-task concurrent state according to claim 7, characterized in that, The concurrent task scheduling module also includes a load migration unit, configured to migrate low-priority tasks on high-load threads to idle threads within a single scheduling cycle, while keeping the remaining duration of the task's signal validity period and its dependencies unchanged during the migration process.

9. A programmatic trading instruction scheduling system under multi-task concurrent state according to claim 7, characterized in that: The closed-loop feedback adjustment module includes: The computational side feedback submodule verifies the current feedback gain coefficient before writing in each feedback cycle. Does the closed-loop convergence condition meet? If not, then... Clamped to the upper bound of the stability region Then perform the weight calculation; The side feedback submodule sends switching and extension commands through the granularity control interface and window duration interface when the receipt timeout rate exceeds the alarm threshold. The write ports of the computation-side feedback submodule and the distribution-side feedback submodule correspond to different physical address ranges.

10. 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 programmatic trading instruction scheduling method in a multi-task concurrent state as described in any one of claims 1 to 6.