Transaction processing method and device, equipment and storage medium

By obtaining the frequency limit statistics time and maximum number of requests of the transaction request interface in the transaction processing system, the push time of the quantitative strategy execution message is determined and pushed to the policy execution end, the problem of insufficient server processing capabilities under high concurrent requests is solved, and the success rate of transaction requests and the stability of the system is improved.

CN119941251APending Publication Date: 2025-05-06FUTU NETWORK TECH (SHENZHEN) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411740334.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

In the transaction scenario of high concurrent requests, the server's processing capacity is limited, resulting in a reduced success rate of frequent request attacks and responses, affecting the virtual resource transaction process and user experience.

Method used

By obtaining the frequency limit statistics time and maximum number of requests of the transaction request interface, the message push time of the quantitative strategy execution message is determined, and the quantitative strategy execution message is pushed to the policy execution end at that time to trigger the execution of the quantitative trading strategy.

Benefits of technology

It reduces the load pressure of transaction processing, improves the success rate of transaction requests, avoids frequent attacks faced by servers due to high concurrent requests, and ensures the stability and user experience of the transaction process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119941251A_ABST
    Figure CN119941251A_ABST
Patent Text Reader

Abstract

The invention provides a transaction processing method and device, equipment and a storage medium, and the method comprises the steps: obtaining the limited frequency statistical duration of a transaction request interface and the maximum request number of the transaction request interface in the limited frequency statistical duration in response to a triggering operation for a first quantitative transaction strategy; determining the actual request number of the transaction request interface within the limited frequency statistical duration before the current moment; according to the maximum request number and the actual request number corresponding to the transaction request interface, determining a message pushing moment of a quantitative strategy execution message, the quantitative strategy execution message being used for triggering execution of a first quantitative transaction strategy; and in response to the arrival of the message pushing moment, pushing the quantitative strategy execution message to a strategy execution end, so that the strategy execution end executes the first quantitative transaction strategy. The load pressure of transaction processing can be reduced, and the success rate of transaction requests can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a transaction processing method, apparatus, device, and storage medium. Background Art

[0002] Currently, virtual resource transactions are often conducted through servers. For example, a terminal device can send various transaction requests to the server, such as order placement, order modification, and position closing requests. Alternatively, the server can push execution signals for quantitative trading strategies to the terminal device, controlling the terminal device to execute the quantitative trading strategy, thereby completing the transaction of virtual resources.

[0003] However, the server's processing capacity is limited. In a transaction scenario with high concurrent requests, not only will the server face attacks from frequent requests, but the success rate of request responses will also be reduced, thus affecting the transaction process of virtual resources and user experience. Summary of the Invention

[0004] The present application provides a transaction processing method, apparatus, device, and storage medium, which can reduce the load pressure of transaction processing and improve the success rate of transaction requests.

[0005] In the first aspect, the present application provides a transaction processing method, which includes: in response to a trigger operation for a first quantitative trading strategy, obtaining the frequency limit statistical time of the transaction request interface, and the maximum number of requests of the transaction request interface within the frequency limit statistical time; determining the actual number of requests of the transaction request interface within the frequency limit statistical time before the current moment; determining the message push time of the quantitative strategy execution message based on the maximum number of requests and the actual number of requests corresponding to the transaction request interface, the quantitative strategy execution message is used to trigger the execution of the first quantitative trading strategy; in response to arriving at the message push time, pushing the quantitative strategy execution message to the strategy execution end, so that the strategy execution end executes the first quantitative trading strategy.

[0006] In the second aspect, the present application provides a transaction processing device, including: a first acquisition module, used to obtain the frequency limit statistical time of the transaction request interface and the maximum number of requests of the transaction request interface within the frequency limit statistical time in response to the trigger operation for the first quantitative trading strategy; a first determination module, used to determine the actual number of requests of the transaction request interface within the frequency limit statistical time before the current moment; a second determination module, used to determine the message push time of the quantitative strategy execution message based on the maximum number of requests and the actual number of requests corresponding to the transaction request interface, the quantitative strategy execution message is used to trigger the execution of the first quantitative trading strategy; a push module, used to push the quantitative strategy execution message to the strategy execution end in response to the arrival of the message push time, so that the strategy execution end executes the first quantitative trading strategy.

[0007] In a third aspect, the present application provides an electronic device comprising: a processor and a memory, the memory being used to store a computer program, the processor being used to call and run the computer program stored in the memory to execute the method as in the first aspect or its various implementations.

[0008] In a fourth aspect, the present application provides a computer-readable storage medium for storing a computer program, wherein the computer program enables a computer to execute the method in the first aspect or its various implementations.

[0009] In a fifth aspect, the present application provides a computer program product, comprising computer program instructions, which enable a computer to execute the method in the first aspect or its various implementations.

[0010] In a sixth aspect, the present application provides a computer program, which enables a computer to execute the method in the first aspect or its various implementations.

[0011] Through the technical solution of the present application, the electronic device can determine the message push time of the quantitative strategy execution message based on the actual number of requests and the maximum number of requests received within the frequency limit period of the transaction request interface, and thus push the quantitative strategy execution message according to the time to execute the quantitative trading strategy through the strategy execution end. In this process, the execution time of the quantitative trading strategy is determined based on the actual number of requests and the maximum number of requests of the transaction request interface within the frequency limit period, that is, the load situation of the transaction request interface is taken into account. Therefore, the server can be avoided from being attacked by frequent requests in transaction scenarios with high concurrency requests, and the load pressure of transaction processing can be reduced, thereby ensuring the response success rate of the request. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for describing the embodiments.

[0013] Figure 1 A schematic diagram of an application scenario provided in an embodiment of the present application;

[0014] Figure 2 A flowchart of a transaction processing method provided in an embodiment of the present application;

[0015] Figure 3 A schematic diagram of a transaction processing method provided in an embodiment of the present application;

[0016] Figure 4 A schematic diagram of a transaction processing device 400 provided in an embodiment of the present application;

[0017] Figure 5 A schematic diagram of an electronic device 500 provided in an embodiment of the present application. DETAILED DESCRIPTION

[0018] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.

[0019] As mentioned above, since the processing capacity of the server is limited, in a transaction scenario with high concurrent requests, the server will face attacks from frequent requests and the success rate of request responses will also be reduced.

[0020] In order to solve the above technical problems, the inventive concept of this application is: based on the actual number of requests and the maximum number of requests received within the frequency limit of the trading request interface, the message push time of the quantitative strategy execution message is determined, and the quantitative strategy execution message is pushed according to this time to trigger the strategy execution end to execute the quantitative trading strategy.

[0021] It should be understood that the technical solution of this application can be applied to the following scenarios, but is not limited to:

[0022] In one embodiment, the present application can be applied to trading scenarios of virtual resources, specifically to execution scenarios of quantitative trading strategies for stocks, futures, or options.

[0023] Alternatively, the present application can also be applied to non-transactional scenarios where a device obtains and responds to multiple requests. For example, it can be applied to scenarios where a server obtains and responds to multiple requests sent by a terminal device for displaying page content, but is not limited to this.

[0024] In one embodiment, Figure 1 As shown, the application scenario may include a terminal device 110 and a server 120, and the terminal device 110 and the server 120 may be connected via a wired network or a wireless network.

[0025] The terminal device 110 is installed with a client application for virtual resource trading. The server 120 is the server for this application and provides multiple transaction request interfaces that can be called by the corresponding client to implement the corresponding transaction functions. Specifically, the terminal device 110 can be installed with a client, which includes a client front end and a client back end. The client front end provides an interactive interface for users to build and select quantitative trading strategies and receive trigger operations for triggering the execution of quantitative trading strategies. The client back end can serve as the strategy execution end of the quantitative trading strategy, actually sending transaction requests to the transaction request interface of the server 120 to actually execute the quantitative trading strategy. After receiving the trigger operation for the quantitative trading strategy, the client front end can determine the message push time of the quantitative strategy execution message used to trigger the execution of the quantitative trading strategy based on the actual number of requests sent to the corresponding transaction request interface of the server 120 and the maximum number of requests that can be tolerated within the frequency limit period, and thus push the quantitative strategy execution message to the client back end (i.e., the strategy execution end) according to the message push time, so that the client back end can send the corresponding transaction request to the corresponding transaction request interface of the server 120 based on the strategy logic in the quantitative trading strategy (specifically, the transaction request can be a request for placing an order, changing an order, canceling an order, reversing, transferring a position, etc., and the transaction request interface can be a transaction request interface such as an order placing transaction request interface, an order changing transaction request interface, an order canceling transaction request interface, a reversing transaction request interface, a position transferring transaction request interface, etc.) to realize the transactions involved in the quantitative trading strategy.

[0026] The server 120 may be a single server, a server cluster consisting of multiple servers, or a cloud platform control center, but is not limited thereto. The terminal device 110 may be a mobile phone, a tablet computer, a laptop computer, or a desktop computer, but is not limited thereto.

[0027] It should be noted that Figure 1 The terminal devices and servers in the description are merely exemplary. Specifically, other numbers or types of terminal devices or servers may also be included.

[0028] After introducing the application scenarios of the embodiments of the present application, the technical solutions of the present application will be described in detail below:

[0029] Figure 2 This is a flow chart of a transaction processing method provided in an embodiment of the present application. The method can be executed by the terminal device 110 in the above application scenario, but is not limited thereto. Figure 2 As shown, the method may include the following steps:

[0030] S210: In response to a trigger operation for the first quantitative trading strategy, obtaining a frequency limit statistical duration of the transaction request interface and a maximum number of requests for the transaction request interface within the frequency limit statistical duration;

[0031] S220: Determine the actual number of requests for the transaction request interface within the frequency-limited statistical period before the current moment;

[0032] S230: Determine a push time for a quantitative strategy execution message based on the maximum number of requests and the actual number of requests corresponding to the transaction request interface, where the quantitative strategy execution message is used to trigger execution of the first quantitative trading strategy;

[0033] S240: In response to reaching the message push time, push the quantitative strategy execution message to the strategy execution terminal, so that the strategy execution terminal executes the first quantitative trading strategy.

[0034] In one embodiment, in conjunction with the above-mentioned application scenario, the client installed on the terminal device includes a client front-end and a client back-end. The client front-end can display a visual interactive interface, and the user can trigger the first quantitative trading strategy based on the visual interactive interface. Then, the client front-end can receive the trigger operation and, in response to the trigger operation, execute the above-mentioned S210. It should be noted that this trigger operation is used to trigger the client front-end to determine the frequency of sending corresponding requests to the corresponding transaction request interface of the server and then determine the message push time of the quantitative strategy execution message. It does not directly trigger the strategy execution end, i.e., the client back-end, to execute the first quantitative trading strategy. The quantitative strategy execution message is used to trigger the strategy execution end to execute the first quantitative trading strategy.

[0035] For example, assuming the strategy logic of a quantitative trading strategy is: when the technical indicators of the trading object specified in the quantitative trading strategy meet the preset conditions, an order operation for the trading object is executed. Taking the quantitative trading strategy as a moving average golden cross opening strategy as an example, when the moving average of the trading object specified in the quantitative trading strategy meets the golden cross within a certain period, a buy order operation for the trading object is executed, thereby helping investors better seize trading opportunities, achieve more accurate and efficient trading operations, and improve trading efficiency and speed. Among them, investors can define the strategy logic of the preset quantitative trading strategy based on the visual interactive interface provided by the client front end. That is, investors can directly specify the preset trading conditions and the trading instructions to be executed after the preset trading conditions are met based on the visual interactive interface provided by the client front end; when the corresponding quantitative trading strategy is executed and the specified preset trading conditions are met, the strategy execution terminal can automatically trigger trading instructions such as buy or sell, and send a corresponding trading request to the corresponding trading request interface of the server based on the trading instruction to realize the transaction.

[0036] Specifically, the client front end can determine the message push time of the quantitative strategy execution message used to trigger the client back end, i.e., the strategy execution end, to execute the first quantitative trading strategy according to the above S210-S230 for the triggering operation of the first quantitative trading strategy; and when the message push time is reached, the quantitative strategy execution message is pushed to the strategy execution end; then, the strategy execution end can execute the first quantitative trading strategy. Specifically, the strategy execution end executes the first quantitative trading strategy by sending a transaction request to the transaction request interface corresponding to the server (specifically, it can be the server corresponding to the client) based on the strategy logic in the first quantitative trading strategy. Among them, after receiving a trigger operation for the first quantitative trading strategy, the message push time of the quantitative strategy execution message used to trigger the execution of the first quantitative trading strategy is determined based on the actual number of requests for the trading request interface involved in the first quantitative trading strategy within a certain frequency-limited statistical period, thereby controlling the actual execution time of each execution when the same quantitative trading strategy is executed multiple times, or the actual execution time of each quantitative trading strategy when multiple different quantitative trading strategies are triggered to be executed sequentially or simultaneously. In addition, the call interval time of calling the same trading request interface when the same quantitative trading strategy is executed multiple times is controlled, or the call interval time of calling the same trading request interface when multiple different quantitative trading strategies are executed simultaneously or sequentially. That is, the frequency limit of calling the trading request interface between different quantitative trading strategies or different execution rounds of the same quantitative strategy is implemented to avoid the problem of server overload and reduced response success rate caused by high concurrent calls to the trading request interface. It can be understood that this type of inter-round frequency limit can be a first type of frequency limit strategy for the trading request interface, which will be introduced in subsequent embodiments.

[0037] In addition, the execution process of an execution round of a quantitative trading strategy often involves multiple calls to the same transaction request interface. Similarly, the frequency of calls to the transaction request interface within an execution round can be limited to avoid the problem of server overload and reduced response success rate due to high concurrency calls to the transaction request interface. It can be understood that this type of intra-round frequency limit can be a second type of frequency limit strategy for the transaction request interface, which will be introduced in subsequent embodiments.

[0038] In order to facilitate the distinction between the two types of frequency limiting strategies involved in this application (the first type is the frequency limiting strategy corresponding to S210-240, that is, the frequency limiting strategy before the first quantitative trading strategy is executed, which is the frequency limiting strategy for the message push moment of the quantitative strategy execution message; the second type is the frequency limiting strategy during the execution of the first quantitative trading strategy, that is, the frequency limiting strategy when the transaction request interface is triggered to respond to the transaction request), this application divides the execution of the first quantitative trading strategy into two stages: the inter-round stage and the intra-round stage. Among them, in the inter-round stage, the execution conditions of the quantitative trading strategy have not been met, and the logic defined by the quantitative trading strategy will not be executed, corresponding to the first type of frequency limiting strategy; in the intra-round stage, the logic defined by the quantitative trading strategy will be executed. When a new K-line appears in the market involved in the quantitative trading strategy, a certain time interval or a specific time is reached, it can enter the intra-round stage, which corresponds to the second type of frequency limiting strategy.

[0039] For example, taking a quantitative trading strategy as an example, assuming that when the quantitative trading strategy is executed, stock A will be bought and stock B will be shorted, then the interval between the two order trading requests corresponding to buying stock A and shorting stock B is called the intra-round interval in the intra-round stage; when the quantitative trading strategy is triggered again the next time, stock A is bought again and stock B is shorted, then the interval between the order trading request for buying stock A and the previous order trading request for shorting stock B is called the inter-round interval in the inter-round stage.

[0040] It is understandable that if multiple order placement / modification / cancellation operations are required during a round of quantitative trading strategy operation, the multiple trading requests corresponding to each order placement / modification / cancellation operation can be controlled to be issued simultaneously or the issuance interval is less than the first issuance interval threshold and greater than the second issuance interval threshold. This is because if the interval between similar trading requests is increased during the round, that is, the interval between similar trading requests is greater than the first issuance interval threshold, for example, if you wait for a few seconds after the first order before placing the second order, this larger interval may cause the second order to not be placed at the best price used for the first order, resulting in the quantitative trading strategy's returns not reaching expectations. If the interval between similar trading requests is less than the second issuance interval threshold, the frequency of sending similar trading requests will be too high, which will in turn cause a large load on the risk control system and may cause request processing failure.

[0041] However, the logical relationship between multiple rounds of quantitative trading strategies is not very close. Therefore, the time corresponding to the inter-round stage can be controlled to be less than the stage time threshold to extend the time corresponding to the intra-round stage, thereby increasing the number of effective trading requests in one round of quantitative trading strategies, making the operation process of quantitative trading strategies smoother and avoiding the impact of the first type of frequency limiting strategy.

[0042] In the above process, the calling frequency of the transaction request interface during the execution of the quantitative trading strategy can be divided into two stages for control, so that the calling of the transaction request interface can be guaranteed during the entire process of executing the quantitative trading strategy without the user's perception and without affecting the server load pressure, thereby improving the execution success rate of the quantitative trading strategy.

[0043] In addition, this application does not limit the specific types and quantities of transaction request interfaces and transaction requests. For example, in response to a trigger operation for a first quantitative trading strategy, the client can obtain the frequency limit duration and maximum request quantity of one or more transaction request interfaces.

[0044] Among them, the above-mentioned transaction request interface can be a transaction request interface involved in executing the first quantitative trading strategy. For example, if the execution of the first quantitative trading strategy involves one or more operations such as placing an order, changing an order, canceling an order, reversing a position, and transferring a position, then the above-mentioned transaction request interface can be one or more corresponding interfaces among the order transaction request interface, the order change transaction request interface, the order cancellation transaction request interface, the reversing a position transaction request interface, and the position transfer transaction request interface; accordingly, the transaction request corresponding to the transaction request interface can be: one or more corresponding requests among the order request, the order change request, the order cancellation request, the reversing a position request, and the position transfer request.

[0045] The frequency limit statistics duration refers to the duration for counting the number of requests corresponding to the transaction request interface; the maximum number of requests refers to the concurrency that the transaction request interface corresponding to the server can withstand within the frequency limit statistics duration.

[0046] In one embodiment, the frequency-limited statistical duration of a transaction request interface and the maximum number of requests received by the transaction request interface within the frequency-limited statistical duration can be obtained by: obtaining the first historical transaction request received by the transaction request interface within a first historical time period; and determining the frequency-limited statistical duration and the maximum number of requests based on the first historical time period and the first historical transaction request. The maximum number of requests received by the transaction request interface within the frequency-limited statistical duration refers to the maximum number of transaction requests that the transaction request interface can receive within the frequency-limited statistical duration under a preset load. The first historical time period can be the past day, week, or month.

[0047] Specifically, the client may first construct a first distribution chart and a second distribution chart for a plurality of first historical transaction requests within a first historical time period at the hourly, minutely, or secondly level, wherein the abscissa of the first distribution chart represents the first historical time period divided at the hourly, minutely, or secondly level, the ordinate of the first distribution chart represents the number of first historical transaction requests within the first historical time period after the division, and the second distribution chart represents the plurality of first historical transaction requests distributed according to time. The client may then identify a preset number of peaks in the first distribution chart. The client may then determine a preset percentage (e.g., the preset percentage is 80%) and, based on the second distribution chart, determine the distribution time periods corresponding to the preset percentage of first historical transaction requests in the first historical transaction requests corresponding to each of the preset number of peaks in the second distribution chart, thereby obtaining the peak time periods corresponding to each of the preset number of peaks (e.g., the preset percentage of first historical transaction requests may be any consecutive historical transaction requests among all first historical transaction requests under the corresponding peak, specifically, the first preset percentage of first historical transaction requests in the first historical transaction requests under the corresponding peak, in chronological order from earliest to latest). Transaction requests, but not limited to these.); then, a frequency-limited statistical duration can be determined based on the peak time periods corresponding to the preset number of peaks (for example, the average, maximum, minimum, or median of the durations of the peak time periods corresponding to the preset number of peaks can be determined as the frequency-limited statistical duration); then, the number of first historical transaction requests corresponding to the preset number of peaks within the frequency-limited statistical duration can be determined based on the second distribution chart to obtain the number of peak requests corresponding to each of the preset number of peaks (for example, the first historical transaction request corresponding to a peak within the frequency-limited statistical duration can be any consecutive historical transaction request within the frequency-limited statistical duration among all first historical transaction requests under the corresponding peak, specifically, can be the first historical transaction request within the frequency-limited statistical duration in a preset percentage of the first historical transaction requests under the corresponding peak, in chronological order from earliest to latest, but not limited to this); then, a maximum number of requests for the transaction request interface can be determined based on the number of peak requests corresponding to each of the preset number of peaks (for example, the average, maximum, minimum, or median of the number of peak requests corresponding to each of the preset number of peaks can be determined as the maximum number of requests for the transaction request interface).

[0048] The frequency limit statistics duration or maximum number of requests for different transaction request interfaces can be the same or different, and this application does not impose any restrictions on this. For example, the frequency limit duration of each of the multiple transaction request interfaces can be 30 seconds; the maximum number of requests within the frequency limit statistics duration (for example, 30 seconds) for the order transaction request interface is 15 (i.e., the maximum frequency limit is 15 times every 30 seconds), and the maximum number of requests within the frequency limit statistics duration (for example, 30 seconds) for the order modification transaction request interface is 20 (i.e., the maximum frequency limit is 20 times every 30 seconds).

[0049] Among them, the current moment refers to the time point when the trigger operation is received; the actual number of requests refers to the number of requests actually received by the transaction request interface corresponding to the server within the frequency-limited statistical duration. After receiving the trigger operation for the first quantitative trading strategy, in response to the trigger operation, the trigger time of the trigger operation, that is, the current moment, is used as the starting moment for counting the actual number of requests received by the transaction request interface, and the frequency-limited statistical duration is used as the statistical duration for counting the actual number of requests received by the transaction request interface. The statistical period is determined, and the actual number of requests of the transaction request interface within the statistical period is obtained. Figure 3 For example, the frequency limit of a certain transaction request interface is 30 seconds. When a trigger operation for a quantitative trading strategy is received, the trigger time of the trigger operation, that is, the current time, is used as the starting time for counting the actual number of requests. The actual number of requests in the past 30 seconds starting from the current time is counted, which is a total of 10 transaction requests.

[0050] The first type of frequency limiting strategy is introduced below.

[0051] In one embodiment, the above S230 may include: determining a request quantity threshold according to a maximum request quantity; and determining a message push time according to an actual request quantity and the request quantity threshold.

[0052] For example, determining the request quantity threshold based on the maximum request quantity may include: determining a threshold percentage; and determining the request quantity threshold as the product of the threshold percentage and the maximum request quantity. For example, the threshold percentage may be 50%, but is not limited thereto.

[0053] Exemplarily, determining the message push time based on the actual number of requests and the request number threshold includes: determining the message push time based on the difference between the actual number of requests and the request number threshold. Specifically, if the actual number of requests is less than or equal to the request number threshold, the current time is determined as the message push time; if the actual number of requests is greater than the request number threshold, the message push time is determined based on the time interval between the time when the transaction request interface received the last number of requests before the current time and the current time, as well as the frequency limit statistics duration.

[0054] Specifically, the following describes the above process in two cases, depending on whether there is one or more transaction request interfaces:

[0055] In case 1, the number of transaction request interfaces is one. S230 may include: determining a request number threshold based on the maximum number of requests; if the actual number of requests is less than or equal to the request number threshold, determining the current time as the message push time; if the actual number of requests is greater than the request number threshold, obtaining a first time interval between the time when the transaction request interface receives a first transaction request and the current time, where the first transaction request is the last number of requests received by the transaction request interface before the current time; obtaining a first rest time based on the frequency limit statistics duration and the first time interval; and determining the message push time based on the current time and the first rest time.

[0056] The difference between the frequency-limited statistical duration and the first time interval may be calculated as the first rest duration.

[0057] The first quantity may be a request quantity threshold, but is not limited thereto.

[0058] For example, assuming that before the current moment, the transaction request interface has received 10 transaction requests in descending order of transaction request reception time: transaction request 1, transaction request 2, transaction request 3, transaction request 4, transaction request 5, transaction request 6, transaction request 7, transaction request 8, transaction request 9, and transaction request 10. If the first quantity is 7, then it can be determined that the first transaction request is transaction request 4, that is, the 7th transaction request from the last in descending order of transaction request reception time.

[0059] The message push time may be determined as the time of the first rest period from the current moment to the current moment.

[0060] Case 2: There are multiple transaction request interfaces. S230 may include: determining, based on the maximum request counts of each of the multiple transaction request interfaces, request quantity thresholds corresponding to each of the multiple maximum request counts; if the actual request counts of each of the multiple transaction request interfaces are less than or equal to the corresponding request quantity thresholds, determining the current moment as the message push moment; if the actual request count corresponding to at least one target transaction request interface among the multiple transaction request interfaces is greater than the corresponding request quantity threshold, obtaining a second time interval between the time when the target transaction request interface receives a second transaction request and the current moment, where the second transaction request is the second-to-last number of requests received by the target transaction request interface before the current moment; calculating the maximum value of the difference between the frequency limit statistical duration and at least one second time interval to obtain a second rest duration; and determining the message push time based on the current moment and the second rest duration.

[0061] For example, the message push time may be determined to be a time that is the second rest time from the current time. The second number may be a corresponding request number threshold.

[0062] Alternatively, if, among the actual request quantities of each of the multiple transaction request interfaces, a first part of the actual request quantities is less than or equal to the corresponding request quantity threshold, and a second part of the actual request quantities is greater than the corresponding request quantity threshold, then for any target transaction request interface among the multiple transaction request interfaces, obtain the second time interval between the time when the target transaction request interface receives the second transaction request and the current time, wherein the second transaction request is the second-to-last number of requests received by the target transaction request interface before the current time; calculate the maximum value of the difference between the frequency limit statistical time and the multiple second time intervals to obtain the second rest time; and determine the message push time based on the current time and the second rest time.

[0063] The current moment in the above content may be the moment when the triggering operation for the first quantitative trading strategy is received.

[0064] In one embodiment, Figure 3 As shown, taking a trading request interface as an example, assuming that the frequency limit statistics time is 30 seconds, the maximum number of requests is 15, the request number threshold is 7 which is half of the maximum number of requests rounded down, and the first number is 7; the actual number of requests in the past 30 seconds starting from the current moment when the trigger operation for the first quantitative trading strategy is received is counted. If the actual number of requests is less than or equal to 7, the current moment is determined to be the message push moment, that is, the quantitative strategy execution message is directly pushed to the strategy execution end at the current moment, so that the strategy execution end executes the first quantitative trading strategy. If the number of actual requests in the past 30 seconds starting from the current moment when the trigger operation for the first quantitative trading strategy is received is greater than 7, the seventh-to-last trading request can be determined from the trading requests received by the trading request interface before the current moment, and the time interval between the request time of the seventh-to-last trading request and the current moment (e.g., x seconds) can be obtained; then, the difference between the frequency limit statistical time of 30 seconds and the time interval of x seconds can be determined as the rest time (i.e., (30-x) seconds); thereafter, the moment (30-x) seconds after the current moment can be determined as the message push moment, and the quantitative strategy execution message can be pushed to the strategy execution end at the message push moment, so that the strategy execution end executes the first quantitative trading strategy.

[0065] In one embodiment, taking multiple transaction request interfaces (including an order transaction request interface and an order modification transaction request interface) as an example, it is assumed that the frequency limit statistics time of the order transaction request interface and the order modification transaction request interface are both 30 seconds, and the maximum request quantity is 15 and 20 respectively; the request quantity thresholds of the order transaction request interface and the order modification transaction request interface are respectively half of the corresponding maximum request quantity, rounded down to the integer value: 7 and 10, the second quantity corresponding to the order transaction request interface is 7, and the second quantity corresponding to the order modification transaction request interface is 10; statistics are collected within the past 30 seconds starting from the current time when the trigger operation of the first quantitative trading strategy is received, and the actual request quantity of the order transaction request received by the order transaction interface and the change order request quantity are calculated. The actual number of order modification requests received by the order transaction interface. If the actual number of order transaction requests received by the order transaction interface is 10, and the actual number of order modification requests received by the order modification interface is 15, it can be determined that the actual number of requests of the order transaction request interface and the order modification transaction request interface are both greater than the corresponding request number threshold; then, the corresponding second-to-last order transaction request, that is, the seventh-to-last order transaction request, can be determined from the order transaction requests received by the order transaction request interface before the current time, and the time interval between the request time of the seventh-to-last order transaction request and the current time (such as x1 second) can be obtained. At the same time, the corresponding second-to-last order transaction request, that is, the seventh-to-last order transaction request, can be obtained from the order transaction requests received by the order modification interface before the current time. Among the order modification transaction requests received, determine the corresponding second-to-last order modification transaction request, that is, the tenth-to-last order modification transaction request, and obtain the time interval between the request time of the tenth-to-last order modification transaction request and the current time (such as x2 seconds); then, determine the difference between the frequency limit statistical time of 30 seconds and the time interval x1 second as the first candidate rest time (that is, (30-x1) seconds), and determine the difference between the frequency limit statistical time of 30 seconds and the time interval x2 seconds as the second candidate rest time (that is, (30-x2) seconds). Finally, determine the maximum value from the first candidate rest time and the second candidate rest time as the second rest time. Assuming that the second candidate rest time (that is, (30-x2) seconds) is the maximum value, the time interval from the current time (30 -x2) seconds later is the message push time; for example, the time interval between the last request of the request quantity threshold (i.e., the 7th last request) received by the order transaction request interface before the current time and the current time is 22 seconds, and the difference between the frequency limit statistics time of 30 seconds and the time interval of 22 seconds is determined to be the rest time of 8 seconds. The time interval between the last request of the request quantity threshold (i.e., the 10th last request) received by the order transaction request interface before the current time and the current time is 16 seconds, and the difference between the frequency limit statistics time of 30 seconds and the time interval of 16 seconds is determined to be the rest time of 14 seconds. It can be determined that the maximum value of the above two rest time periods is 14 seconds, and the time 14 seconds after the current time can be determined as the message push time.

[0066] In the above process, the request number threshold is first determined based on the maximum number of requests, and the message push time is then determined based on the actual number of requests and the request number threshold. This ensures that the number of requests within the frequency-limited statistical period does not exceed the maximum number of requests, while maintaining a high level of concurrent processing capability for trading requests. In other words, the frequency of sending quantitative strategy execution messages, which trigger the execution of quantitative trading strategies, can be adjusted based on the number and frequency of previously sent trading requests. For example, if a quantitative strategy execution message is originally sent every 3 seconds, when the frequency of trading requests is too high, it may take 15 seconds or more to send the next quantitative strategy execution message. This limits the frequent execution of quantitative trading strategies and achieves the purpose of reducing the frequency of calls to the trading request interface during quantitative trading strategy execution. The execution of quantitative trading strategies is triggered by the push of quantitative strategy execution messages, that is, the quantitative trading strategy will not be executed until the strategy execution terminal receives the quantitative strategy execution message. Therefore, it can protect the server's corresponding trading request interface from frequent request attacks, avoid investors frequently encountering request overclocking errors, ensure the success rate of trading interface request calls, achieve a balance between server load pressure and request success rate, and achieve maximum resource utilization efficiency.

[0067] In one embodiment, in combination with the above embodiment, in response to a trigger operation for a second quantitative trading strategy during execution of a first quantitative trading strategy by a strategy execution end (the content corresponding to the trigger operation is similar to the trigger operation for the first quantitative trading strategy), a message push time of a quantitative strategy execution message of the second quantitative trading strategy is determined, and the earliest time is the message push time of a quantitative strategy execution message of the first quantitative trading strategy.

[0068] For example, assuming that the client backend, that is, the strategy execution end, needs to execute the second quantitative trading strategy at the same time during the execution of the first quantitative trading strategy, the strategy execution end can obtain the trigger operation for the second quantitative trading strategy and determine that the number of transaction requests sent to the transaction request interface within the corresponding frequency limit statistical time of 30 seconds when executing the first quantitative trading strategy at this time is 15 times, that is, the actual number of requests is 15 times. If, combined with the above content, it is determined that the message push time of the quantitative strategy execution message of the first quantitative trading strategy is 10 seconds after the current time, then the message push time of the quantitative strategy execution message of the second quantitative trading strategy can be determined to be 10 seconds after the current time at the earliest. In other words, the second quantitative trading strategy will be executed at the earliest 10 seconds after the current time.

[0069] In the above process, when multiple quantitative trading strategies are executed / triggered at the same time, the strategy execution end can calculate the number of requests for each of the transaction request interfaces involved in the multiple quantitative trading strategies. When any quantitative trading strategy needs to wait for execution, the other quantitative trading strategies are also controlled to wait for execution, thereby further reducing the load pressure of transaction processing and ensuring the success rate of request response.

[0070] The second type of frequency limiting strategy is introduced below.

[0071] In combination with the above content, it can be understood that the process of sending a transaction request to the transaction request interface and the transaction request interface processing the transaction request both belong to one round of execution of the quantitative trading strategy. That is to say, triggering the transaction request interface to obtain and respond to the transaction request belongs to the intra-round stage and is carried out after the quantitative strategy execution message triggers the strategy execution end to execute the quantitative trading strategy. This application introduces this in the following embodiments.

[0072] In one embodiment, after the quantitative strategy execution message is pushed to the strategy execution terminal in response to the arrival of the message push time, the strategy execution terminal can obtain the third transaction request to be sent to the transaction request interface when executing the first quantitative trading strategy; thereafter, it can obtain the historical sending time of sending the historical transaction request to the transaction request interface; then, based on the time interval between the current time and the historical sending time, the sending time of the third transaction request is determined, and in response to the arrival of the sending time of the third transaction request, the third transaction request is sent.

[0073] Specifically, if the time interval between the current time and the historical sending time is greater than or equal to a preset time interval threshold, a third transaction request is sent to the transaction request interface, thereby determining the current time as the sending time of the first transaction request. If the time interval between the current time and the historical sending time is less than the time interval threshold, the request sending time for the third transaction request is determined based on the historical sending time and the time interval threshold. In response to reaching the request sending time, the third transaction request is sent to the transaction request interface, instructing the server to execute the corresponding transaction operation according to the transaction request.

[0074] Illustratively, the historical transaction request may be the previous transaction request received by the transaction request interface before the third transaction request is received. In other words, the historical transaction request may be the previous transaction request sent before the third transaction request is sent to the transaction request interface.

[0075] Exemplarily, the above time interval threshold represents the minimum interval between the sending times of two adjacent transaction requests sent to the same transaction request interface, and may be, for example, 200 milliseconds.

[0076] Exemplarily, the policy execution terminal may first store the third transaction request in a delay request module. The delay request module may be a storage unit, such as, but not limited to, a message queue. Simultaneously, the delay request module may also record the sending time of each transaction request stored in the delay request module to compare the time interval between the current time and the historical sending time. The policy execution terminal may then determine the sending time of the third transaction request based on the time interval between the historical sending time and the current time recorded by the delay request module. If the time interval between the current time and the historical sending time is greater than or equal to a preset time interval threshold, the delay request module may send the third transaction request to the transaction request interface, i.e., the third transaction request in the delay request module may be sent to the transaction request interface. If the time interval between the current time and the historical sending time is less than the time interval threshold, the request sending time of the third transaction request may be determined based on the historical sending time and the time interval threshold. In response to reaching the request sending time, the delay request module may send the third transaction request to the transaction request interface, i.e., the third transaction request in the delay request module may be sent to the transaction request interface.

[0077] Furthermore, when storing transaction request sending times, the deferred request module may only store the sending time of the third transaction request and the historical sending time of the previous transaction request corresponding to the third transaction request, thereby conserving storage space. Furthermore, after the third transaction request is sent to the transaction request interface, the historical sending time stored in the deferred request module may be updated to the sending time of the third transaction request.

[0078] Illustratively, determining the request sending time for the third transaction request based on the historical sending time and the time interval threshold includes: calculating the time interval threshold and the difference between the current time and the historical sending time to obtain a waiting difference; and determining the request sending time for the third transaction request to be a time at least the waiting difference away from the current time. For example, if the time interval between the current time and the historical sending time is less than the time interval threshold of 200 milliseconds, the third transaction request will not be sent to the transaction request interface until the time interval between the current time and the historical sending time is greater than or equal to 200 milliseconds.

[0079] In the above process, the strategy execution end can control the load of the transaction request interface in processing transaction requests by controlling the time interval between two adjacent transaction requests that need to be sent to the same transaction request interface, thereby protecting server resources, avoiding server downtime, and improving the success rate of transaction request processing.

[0080] In one embodiment, after the quantitative strategy execution message is pushed to the strategy execution terminal in response to the arrival of the message push time, the strategy execution terminal may obtain the third trading request to be sent to the trading request interface when executing the first quantitative trading strategy; thereafter, the historical sending time of sending the historical trading request to the trading request interface may be obtained; and then, the sending time of the third trading request is determined based on the historical sending time and the historical sending cycle of the historical trading request, wherein the historical trading request may be the first n trading requests received by the trading request interface before the third trading request is received by the trading request interface, that is, the historical trading request may be the first n trading requests sent before the third trading request is sent to the trading request interface, where n is greater than or equal to 3; the historical sending time of the historical trading request refers to the sending time corresponding to each trading request in the historical trading request; and the historical sending cycle of the historical trading request refers to the duration from the sending time of the first trading request to the sending time of the last trading request in the historical trading request; in response to the arrival of the sending time of the third trading request, the third trading request is sent.

[0081] Specifically, after obtaining the historical sending time and the historical sending period of the historical transaction request, the historical sending frequency of the historical transaction request can be determined based on the historical sending period and the number of requests corresponding to the historical transaction request. The current request sending interval corresponding to the third transaction request can be obtained based on the average time interval between the historical sending time of the historical transaction request and the current time, the historical sending frequency, and the average time interval. The sending time of the third transaction request can then be determined based on the current time of the third transaction request and the current request sending interval.

[0082] The current request sending interval corresponding to the third transaction request can be found in the sending time rule table based on the historical sending frequency and the mean time interval. The sending time rule table records different values ​​of the current request sending interval when the historical sending frequency and the mean time interval correspond to different values. It can be understood that the greater the historical sending frequency, the greater the current request sending interval, and the smaller the mean time interval, the greater the current request sending interval. Furthermore, the current request sending interval can be determined by the following formula (1):

[0083]

[0084] Among them, Int represents the current request sending interval, f represents the historical sending frequency, represents the mean of the time interval, and α and β are the preset weight values.

[0085] In one embodiment, when the strategy execution terminal executes the first quantitative trading strategy, it can call a combination function interface to implement calls to multiple transaction request interfaces, thereby meeting the situation where multiple calls to multiple transaction request interfaces, such as the order placement transaction request interface and the order cancellation transaction request interface, are required in trading scenarios such as liquidation and full order cancellation. This can improve the calling efficiency of the transaction request interface and reduce the time interval between the processing of multiple different types of transaction requests. This can ensure that the quantitative trading strategy is executed in accordance with the timeliness requirements and efficiently execute the quantitative trading strategy. Specifically, the call to the combination function interface can trigger multiple and / or cyclic calls to multiple transaction request interfaces involved in the trading account information applied by the first quantitative trading strategy. This application will introduce this in the following content.

[0086] Specifically, the strategy execution end may obtain a call request for the combined function interface when executing the first quantitative trading strategy; then, based on the call request and the trading account information applied to the first quantitative trading strategy, the strategy execution end may obtain associated transaction requests to be sent to each of the multiple transaction request interfaces, wherein, for any transaction request interface, the associated transaction requests of the transaction request interface include all transaction requests that actually call the transaction request interface when the combined function interface is called once during the execution of the first quantitative trading strategy; then, the strategy execution end may process the corresponding associated transaction requests based on the maximum request quantity of each of the multiple transaction request interfaces and the first request quantity of the corresponding associated transaction requests (the first request quantity is the quantity of associated transaction requests to be sent to the transaction request interface).

[0087] Exemplarily, after obtaining a call request for the combined function interface, the strategy execution end may parse the call request and determine the trading operation information indicated by the call request. The trading operation information includes at least one of the following, but is not limited to: a trading operation type (e.g., buy, sell, liquidation, order cancellation, etc.), a virtual resource identifier, a trading operation quantity (i.e., the number of trading operations under the above trading operation type for the virtual resource corresponding to the virtual resource identifier), and a trading price parameter (e.g., market price, limit price). Next, the trading account information applied by the first quantitative trading strategy may be obtained. The trading account information includes at least one of the following, but is not limited to: account position information, account order information (specifically, information about in-transit orders of the account, in-transit orders refer to orders that have been submitted but not yet executed). Then, specific trading account information may be determined from the trading account information based on the trading operation information. Finally, based on the specific trading account information and the trading operation information, multiple trading request interfaces that need to be called and the associated trading requests to be sent to each of the multiple trading request interfaces are determined.

[0088] For example, assuming that the account position information in the trading account information includes 16 position record information for virtual resource 1, and the account order information in the trading account information includes 17 in-transit order record information for virtual resource 2, if the transaction operation information indicated by the call request is "clearance, virtual resource 1, market price", then it can be determined that the specific trading account information is 16 position record information for virtual resource 1, and based on the position record information and the transaction operation information, it is determined that the transaction request interface to be called is the order transaction request interface, and it is determined that the associated transaction request to be sent to the order transaction request interface is an order transaction request and the quantity is 16; thereafter, virtual resource 1 can be cleared at the market price through the order transaction request interface. If the transaction operation information indicated by the call request is "cancel order, virtual resource 2", 17 in-transit order record information for virtual resource 2 of the specific transaction account information can be determined, and based on the in-transit order record information and the transaction operation information, it is determined that the transaction request interface that needs to be called is the order cancellation transaction request interface, and the associated transaction request cancellation transaction request to be sent to the order cancellation transaction request interface is determined, where the number of the order cancellation transaction requests is 17.

[0089] Exemplarily, the processing of the corresponding related transaction requests according to the respective maximum request quantities of the multiple transaction request interfaces and the first request quantity of the corresponding related transaction requests includes, but is not limited to, the following three methods:

[0090] Method 1: for any target transaction request interface among multiple transaction request interfaces, count the first request number of related transaction requests corresponding to the target transaction request interface within the corresponding frequency-limited statistical period; in response to the first request number being less than or equal to the maximum request number of the target transaction request interface, trigger the target transaction request interface to execute the first request number of related transaction requests; in response to the first request number being greater than the maximum request number of the target transaction request interface, trigger the target transaction request interface to execute the first maximum request number of related transaction requests among the first request number of related transaction requests; trigger the target transaction request interface to return a failure to execute other related transaction requests except the first maximum request number of related transaction requests among the first request number of related transaction requests.

[0091] For example, assuming that the order transaction request interface can process a maximum of 15 order requests within the frequency limit statistics time of 30 seconds, that is, the maximum number of requests is 15. If 16 positions need to be closed when executing the first quantitative trading strategy, that is, 16 order requests are required, then in method one, the strategy execution end can trigger the order transaction request interface to execute the first 15 of the 16 related transaction requests (i.e., order requests), and trigger the order transaction request interface, that is, send the corresponding order transaction request to the order transaction request interface to instruct the server to execute the corresponding order operation according to the order transaction request, and return a failure to execute the last related transaction request among the 16 related transaction requests. Afterwards, the strategy execution end can obtain the error message and notify the investment institution to process the failed related transaction request.

[0092] Method 2: For any target transaction request interface among multiple transaction request interfaces, calculate the ratio of the corresponding frequency limit statistical time to the maximum number of requests of the target transaction request interface to obtain the request processing interval; based on the request sending time interval between every two related transaction requests in the related transaction requests to be sent to the target transaction request interface as the request processing interval, send the corresponding related transaction requests to the target transaction request interface in sequence, trigger the target transaction request interface, and execute the corresponding related transaction requests.

[0093] For example, assuming that the order transaction request interface can process a maximum of 15 order requests within the frequency limit statistics period of 30 seconds, that is, the maximum number of requests is 15, then in method 2, the strategy execution end can determine that the ratio of the frequency limit statistics period of 30 seconds to the maximum number of requests of 15 is 2, and the request processing interval is 2 seconds. Then, the strategy execution end can send an order request to the order transaction request interface every 2 seconds. Therefore, it can be determined that the order request received by the order transaction request interface within the frequency limit statistics period of 30 seconds is less than the maximum number of requests of 15, and the frequency limit for the order transaction request interface will not be triggered.

[0094] Method three, for any target transaction request interface among multiple transaction request interfaces, count the first request number of related transaction requests corresponding to the target transaction request interface within the corresponding frequency limit statistical period; in response to the first request number being less than or equal to the maximum request number of the target transaction request interface, trigger the target transaction request interface to execute the first request number of related transaction requests; in response to the third request number being greater than the maximum request number of the target transaction request interface, trigger the target transaction request interface to execute the first maximum request number of related transaction requests among the first request number of related transaction requests; in response to the time of reaching the frequency limit statistical period after the execution of the previous maximum request number of related transaction requests, trigger the target transaction request interface to execute the other related transaction requests among the first request number of related transaction requests except the first maximum request number of related transaction requests.

[0095] For example, assuming that the order transaction request interface can process a maximum of 15 order requests within the frequency limit statistics period of 30 seconds, that is, the maximum number of requests is 15, if 16 positions need to be closed when executing the first quantitative trading strategy, that is, 16 order requests are required, then in method three, the strategy execution end can trigger the order transaction request interface to first execute the first 15 of the 16 related transaction requests (i.e., order requests); and after waiting for the frequency limit statistics period of 30 seconds, or after the execution of the first 15 related transaction requests ends, trigger the order transaction request interface to execute the last of the 16 related transaction requests.

[0096] It should be noted that all the above technical solutions can be combined in any way to form optional embodiments of the present application, and will not be described in detail here.

[0097] It should be noted that in the specific implementation of this application, relevant data such as trading operation information, trading account information, quantitative trading strategies, etc. are involved. When the embodiments of this application are applied to specific products or technologies, user permission, consent or authorization must be obtained, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0098] Figure 4 This is a schematic diagram of a transaction processing device 400 provided in an embodiment of the present application. Figure 4 As shown, the device 400 includes: a first acquisition module 401, a first determination module 402, a second determination module 403, a push module 404, a second acquisition module 405, a third acquisition module 406, a first sending module 407, a fourth acquisition module 408, a fifth acquisition module 409, a first statistics module 410, an execution return module 411, a sixth acquisition module 412, a seventh acquisition module 413, a first calculation module 414, a sending control module 415, an eighth acquisition module 416, a ninth acquisition module 417, a second statistics module 418 and a trigger execution module 419.

[0099] In one embodiment, a first acquisition module 401 is used to obtain the frequency limit statistical time of the transaction request interface and the maximum number of requests of the transaction request interface within the frequency limit statistical time in response to a trigger operation for the first quantitative trading strategy; a first determination module 402 is used to determine the actual number of requests of the transaction request interface within the frequency limit statistical time before the current moment; a second determination module 403 is used to determine the message push time of the quantitative strategy execution message based on the maximum number of requests and the actual number of requests corresponding to the transaction request interface, and the quantitative strategy execution message is used to trigger the execution of the first quantitative trading strategy; a push module 404 is used to push the quantitative strategy execution message to the strategy execution end in response to arriving at the message push time, so that the strategy execution end executes the first quantitative trading strategy.

[0100] In one embodiment, the second determination module 403 is specifically used to: determine a request number threshold based on the maximum request number; if the actual request number is less than or equal to the request number threshold, determine the current moment as the message push moment; if the actual request number is greater than the request number threshold, obtain a first time interval between the moment when the transaction request interface receives the first transaction request and the current moment, wherein the first transaction request is the last number of requests received by the transaction request interface before the current moment; calculate the difference between the frequency limit statistical duration and the first time interval to obtain a first rest duration; and determine the message push time based on the current moment and the first rest duration.

[0101] In one embodiment, the second determination module 403 is specifically used to: determine the request quantity threshold corresponding to each of the multiple maximum request quantities based on the respective maximum request quantities of the multiple transaction request interfaces; if the actual request quantity of each of the multiple transaction request interfaces is less than or equal to the corresponding request quantity threshold, determine the current moment as the message push moment; if the actual request quantity corresponding to at least one target transaction request interface among the multiple transaction request interfaces is greater than the corresponding request quantity threshold, obtain a second time interval between the moment when the target transaction request interface receives the second transaction request and the current moment, wherein the second transaction request is the second to last number of requests received by the target transaction request interface before the current moment; calculate the maximum value of the difference between the frequency limit statistical time duration and at least one second time interval to obtain a second rest time duration; and determine the message push time based on the current moment and the second rest time duration.

[0102] In one embodiment, the second acquisition module 405 is configured to: acquire, through the strategy execution terminal, a third transaction request to be sent to the transaction request interface when executing the first quantitative trading strategy; the third acquisition module 406 is configured to: acquire a historical sending time of sending a historical transaction request to the transaction request interface; the first sending module 407 is configured to: send the third transaction request to the transaction request interface if the time interval between the current time and the historical sending time is greater than or equal to a preset time interval threshold; if the time interval between the current time and the historical sending time is less than the time interval threshold, determine a request sending time for the third transaction request based on the historical sending time and the time interval threshold; and send the third transaction request to the transaction request interface in response to reaching the request sending time.

[0103] In one embodiment, a fourth acquisition module 408 is configured to: acquire, through a strategy execution terminal, a call request for a combination function interface when executing a first quantitative trading strategy; a fifth acquisition module 409 is configured to: acquire, based on the call request and the trading account information applied by the first quantitative trading strategy, associated transaction requests to be sent to each of the multiple transaction request interfaces; a first statistics module 410 is configured to: for any target transaction request interface among the multiple transaction request interfaces, count the first number of associated transaction requests corresponding to the target transaction request interface within the corresponding frequency-limited statistics period; an execution return module 411 is configured to: in response to the first number of requests being greater than the maximum number of requests of the target transaction request interface, trigger the target transaction request interface to execute the first maximum number of associated transaction requests among the first number of associated transaction requests; and trigger the target transaction request interface to return a failure to execute the other associated transaction requests except the first maximum number of associated transaction requests among the first number of associated transaction requests.

[0104] In one embodiment, the sixth acquisition module 412 is configured to: acquire, through the strategy execution terminal, a call request for the combination function interface when executing the first quantitative trading strategy; the seventh acquisition module 413 is configured to: acquire, based on the call request and the trading account information applied by the first quantitative trading strategy, the associated transaction request to be sent to each of the multiple transaction request interfaces; the first calculation module 414 is configured to: calculate, for any target transaction request interface among the multiple transaction request interfaces, the ratio of the corresponding frequency limit statistical duration to the maximum number of requests of the target transaction request interface to obtain a request processing interval; and the sending control module 415 is configured to: send corresponding associated transaction requests to the target transaction request interface in sequence, based on the time interval between the sending of each two associated transaction requests among the associated transaction requests to be sent to the target transaction request interface as the request processing interval, trigger the target transaction request interface, and execute the corresponding associated transaction requests.

[0105] In one embodiment, an eighth acquisition module 416 is configured to: acquire, through a strategy execution terminal, a call request for a combination function interface when executing a first quantitative trading strategy; a ninth acquisition module 417 is configured to: acquire, based on the call request and the trading account information applied by the first quantitative trading strategy, associated transaction requests to be sent to each of the multiple transaction request interfaces; a second statistics module 418 is configured to: count, for any target transaction request interface among the multiple transaction request interfaces, the first number of associated transaction requests corresponding to the target transaction request interface within the corresponding frequency-limited statistics duration; a triggering execution module 419 is configured to: in response to the third request number being greater than the maximum request number of the target transaction request interface, trigger the target transaction request interface to execute the first maximum number of associated transaction requests among the first number of associated transaction requests; and in response to reaching the frequency-limited statistics duration after the execution of the first maximum number of associated transaction requests, trigger the target transaction request interface to execute the remaining associated transaction requests among the first number of associated transaction requests except for the first maximum number of associated transaction requests.

[0106] It should be understood that the device embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, they will not be described here. Specifically, Figure 4 The device 400 shown can execute the above method embodiments, and the aforementioned and other operations and / or functions of each module in the device 400 are respectively for implementing the corresponding processes in the above methods. For the sake of brevity, they are not repeated here.

[0107] The above describes the device 400 of the embodiment of the present application from the perspective of functional modules in conjunction with the accompanying drawings. It should be understood that the functional module can be implemented in hardware form, can be implemented by instructions in software form, and can also be implemented by a combination of hardware and software modules. Specifically, the steps of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and / or software form instructions in the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. Optionally, the software module can be located in a mature storage medium in the art such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps in the above method embodiment in conjunction with its hardware.

[0108] Figure 5 A schematic diagram of an electronic device 500 provided in an embodiment of the present application.

[0109] like Figure 5 As shown, the electronic device 500 may include:

[0110] The memory 510 and the processor 520 are configured to store computer programs and transmit the program code to the processor 520. In other words, the processor 520 can call and run the computer program from the memory 510 to implement the method in the embodiment of the present application.

[0111] For example, the processor 520 may be configured to execute the above method embodiments according to instructions in the computer program.

[0112] In some embodiments of the present application, the processor 520 may include but is not limited to:

[0113] General-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.

[0114] In some embodiments of the present application, the memory 510 includes but is not limited to:

[0115] Volatile memory and / or non-volatile memory. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory may be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DR RAM).

[0116] In some embodiments of the present application, the computer program may be divided into one or more modules, which are stored in the memory 510 and executed by the processor 520 to implement the method provided by the present application. The one or more modules may be a series of computer program instruction segments capable of implementing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device.

[0117] like Figure 5 As shown, the electronic device may further include:

[0118] The transceiver 530 may be connected to the processor 520 or the memory 510 .

[0119] The processor 520 may control the transceiver 530 to communicate with other devices. Specifically, it may send information or data to other devices or receive information or data sent by other devices. The transceiver 530 may include a transmitter and a receiver. The transceiver 530 may further include an antenna, which may be one or more.

[0120] It should be understood that the various components in the electronic device are connected via a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus and a status signal bus.

[0121] The present application also provides a computer storage medium having a computer program stored thereon, which, when executed by a computer, enables the computer to perform the method of the above-mentioned method embodiment. In other words, the present application also provides a computer program product containing instructions, which, when executed by a computer, enables the computer to perform the method of the above-mentioned method embodiment.

[0122] When software is used to implement, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instruction is loaded and executed on a computer, the computer can be made to perform the corresponding flow in each method in the embodiment of the present application, generate the function that each method in the embodiment of the present application can realize in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instruction can be stored in a computer-readable storage medium, or transmitted from a computer-readable storage medium to another computer-readable storage medium. For example, the computer instruction can be transmitted from a website, computer, server, or data center by wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) mode to another website, computer, server, or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital video disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).

[0123] Those skilled in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0124] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules is merely a logical function division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0125] Modules described as separate components may or may not be physically separate, and components displayed as modules may or may not be physical modules, that is, they may be located in one place or distributed across multiple network elements. Some or all of the modules may be selected based on actual needs to achieve the purpose of the present embodiment. For example, the functional modules in the various embodiments of the present application may be integrated into a processing module, each module may exist physically separately, or two or more modules may be integrated into a single module.

Claims

1. A transaction processing method, characterized in that: include: In response to a trigger operation for the first quantitative trading strategy, obtaining a frequency limit statistical duration of a trading request interface and a maximum number of requests of the trading request interface within the frequency limit statistical duration; Determine the actual number of requests of the transaction request interface within the frequency-limited statistical time period before the current moment; Determine, according to the maximum number of requests and the actual number of requests corresponding to the transaction request interface, a message push time of a quantitative strategy execution message, wherein the quantitative strategy execution message is used to trigger the execution of a first quantitative trading strategy; In response to reaching the message pushing time, the quantitative strategy execution message is pushed to the strategy execution end, so that the strategy execution end executes the first quantitative trading strategy.

2. The method according to claim 1, characterized in that The step of determining the message push time of the quantitative strategy execution message according to the maximum request quantity and the actual request quantity corresponding to the transaction request interface includes: Determining a request quantity threshold according to the maximum request quantity; If the actual number of requests is less than or equal to the request number threshold, determining the current time as the message push time; If the actual number of requests is greater than the request number threshold, obtaining a first time interval between the time when the transaction request interface receives the first transaction request and the current time, wherein the first transaction request is the last number of requests received by the transaction request interface before the current time; Obtaining a first rest duration according to the frequency-limited statistical duration and the first time interval; The message push time is determined according to the current time and the first rest period.

3. The method according to claim 1, characterized in that The step of determining the message push time of the quantitative strategy execution message according to the maximum request quantity and the actual request quantity corresponding to the transaction request interface includes: Determining, according to each of the maximum request quantities of the multiple transaction request interfaces, request quantity thresholds corresponding to each of the multiple maximum request quantities; If the actual request quantities of each of the plurality of transaction request interfaces are less than or equal to the corresponding request quantity threshold, determining the current time as the message push time; If the actual number of requests corresponding to at least one target transaction request interface among the multiple transaction request interfaces is greater than the corresponding request number threshold, obtain the second time interval between the time when the target transaction request interface receives the second transaction request and the current time, wherein the second transaction request is the second to last number of requests received by the target transaction request interface before the current time; calculate the maximum value of the difference between the frequency limit statistical time duration and at least one of the second time intervals to obtain the second rest time duration; determine the message push time according to the current time and the second rest time duration.

4. The method according to claim 1, characterized in that After the response to reaching the message push time, the quantitative strategy execution message is pushed to the strategy execution end, the method further includes: Acquiring, through the strategy execution terminal, a third transaction request to be sent to the transaction request interface when executing the first quantitative transaction strategy; Obtain the historical sending time of sending the historical transaction request to the transaction request interface; If the time interval between the current time and the historical sending time is greater than or equal to a preset time interval threshold, sending the third transaction request to the transaction request interface; If the time interval between the current time and the historical sending time is less than the time interval threshold, determining the request sending time of the third transaction request according to the historical sending time and the time interval threshold; In response to reaching the request sending time, sending the third transaction request to the transaction request interface.

5. The method according to any one of claims 1 to 4, characterized in that: After the response to reaching the message push time, the quantitative strategy execution message is pushed to the strategy execution end, the method further includes: Obtaining, through the strategy execution end, a call request for a combination function interface when executing the first quantitative trading strategy; According to the call request and the trading account information applied by the first quantitative trading strategy, obtaining the associated trading requests to be sent to each of the plurality of trading request interfaces; For any target transaction request interface among the multiple transaction request interfaces, counting the number of first requests of the associated transaction requests corresponding to the target transaction request interface within the corresponding frequency-limited statistical time period; In response to the first request quantity being greater than the maximum request quantity of the target transaction request interface, triggering the target transaction request interface to execute the first maximum request quantity of associated transaction requests among the first request quantity of associated transaction requests; The target transaction request interface is triggered, and a return is returned indicating that the execution of other associated transaction requests except the associated transaction requests of the first requested number of associated transaction requests of the maximum requested number of associated transaction requests has failed.

6. The method according to any one of claims 1 to 4, characterized in that: After the response to reaching the message push time, the quantitative strategy execution message is pushed to the strategy execution end, the method further includes: Acquire, through the strategy execution end, a call request for a combination function interface when executing the first quantitative trading strategy; According to the call request and the trading account information applied by the first quantitative trading strategy, obtaining the associated trading requests to be sent to each of the plurality of trading request interfaces; For any target transaction request interface among the multiple transaction request interfaces, calculate the ratio of the corresponding frequency limit statistical duration to the maximum number of requests of the target transaction request interface to obtain a request processing interval; Based on the request sending time interval between every two associated transaction requests in the associated transaction requests to be sent to the target transaction request interface as the request processing interval, the corresponding associated transaction requests are sent to the target transaction request interface in sequence, the target transaction request interface is triggered, and the corresponding associated transaction requests are executed.

7. The method according to any one of claims 1 to 4, characterized in that: After the response to reaching the message push time, the quantitative strategy execution message is pushed to the strategy execution end, the method further includes: Acquire, through the strategy execution end, a call request for a combination function interface when executing the first quantitative trading strategy; According to the call request and the trading account information applied by the first quantitative trading strategy, obtaining the associated trading requests to be sent to each of the plurality of trading request interfaces; For any target transaction request interface among the multiple transaction request interfaces, counting the number of first requests of the associated transaction requests corresponding to the target transaction request interface within the corresponding frequency-limited statistical time period; In response to the first request quantity being greater than the maximum request quantity of the target easy request interface, triggering the target transaction request interface to execute the first maximum request quantity of associated transaction requests among the first request quantity of associated transaction requests; In response to reaching the time of the frequency limit statistics length after executing the previous maximum number of related transaction requests, triggering the target transaction request interface to execute other related transaction requests among the first number of related transaction requests except the previous maximum number of related transaction requests.

8. A transaction processing device, characterized in that: include: A first acquisition module is used to obtain, in response to a trigger operation for a first quantitative trading strategy, a frequency limit statistical duration of a transaction request interface and a maximum number of requests of the transaction request interface within the frequency limit statistical duration; A first determination module is used to determine the actual number of requests of the transaction request interface within the frequency-limited statistical time period before the current moment; A second determination module is used to determine a message push time of a quantitative strategy execution message according to the maximum request quantity and the actual request quantity corresponding to the transaction request interface, wherein the quantitative strategy execution message is used to trigger the execution of the first quantitative trading strategy; The push module is used to push the quantitative strategy execution message to the strategy execution end in response to reaching the message push time, so that the strategy execution end executes the first quantitative trading strategy.

9. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to perform the method of any one of claims 1 to 7 by executing the executable instructions.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Transaction processing method and apparatus, device and storage medium

    WO2026113885A1