Conditional single invocation method, apparatus, device, and storage medium
By introducing a combined conditional order detail table into the conditional order system, the execution order is determined based on the strategy type and condition details, which solves the problem of cumbersome operation in the traditional conditional order system and achieves more efficient conditional order invocation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN KINGDOM TECH
- Filing Date
- 2023-08-30
- Publication Date
- 2026-05-05
AI Technical Summary
In traditional conditional order systems, storing conditional orders in a policy delegation table and triggering delegations is a cumbersome process, resulting in low execution efficiency.
Upon receiving a delegate trigger instruction, the system iterates through the main strategy delegate table to obtain the main delegate number, queries the corresponding combined condition sheet in the combined condition sheet details table, determines the execution order based on the strategy type and condition details, performs the delegate invocation, and saves the log record.
By combining the relationships between conditional statements, the application scenarios of conditional statements are enriched, cumbersome operations are reduced, and execution efficiency is improved.
Smart Images

Figure CN117216104B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a conditional single call method, apparatus, device, and storage medium. Background Technology
[0002] A conditional order is a type of strategy order supported in trading services. It allows users to preset certain conditions, and the order is triggered when those conditions are met. In the financial field, conditional orders can support various conditions, such as fixed-price buy / sell, stop-loss / take-profit, buy on rebound, sell on pullback, and price fluctuation limits.
[0003] In traditional conditional order systems, all conditional orders are typically stored in a strategy order table. When a condition is met, the order is triggered. However, to implement scenarios such as buying first and then selling later, a buy conditional order must be created first, and a sell conditional order must be created after the purchase is successful. This operation is cumbersome and results in low execution efficiency.
[0004] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention
[0005] The main objective of this invention is to provide a conditional order invocation method, apparatus, device, and storage medium, aiming to solve the technical problem of low execution efficiency caused by the cumbersome operation of storing conditional orders in a policy delegation table and triggering delegation in traditional conditional order systems.
[0006] To achieve the above objectives, the present invention provides a conditional single call method, the method comprising the following steps:
[0007] Upon receiving a delegate trigger instruction, the strategy delegate main table is traversed according to the delegate trigger instruction to obtain the main delegate number corresponding to the delegate trigger instruction.
[0008] The combined condition sheet corresponding to the authorization trigger instruction is obtained by querying the combined condition sheet details table based on the main authorization number.
[0009] The combined condition sheet is delegated to obtain a flow record of the call process, and the flow record is saved to the delegate flow table.
[0010] Optionally, the step of delegating the combined conditional statement to obtain a transaction log of the calling process and saving the transaction log to the delegated transaction log table includes:
[0011] Extract the strategy type and condition details of the combined condition sheet, wherein the strategy type includes parent-child type and mutual exclusion type;
[0012] The execution order of the delegated triggering instruction is determined according to the strategy type.
[0013] According to the condition details and the execution order, the combined condition sheet is delegated and invoked to obtain the invocation process log, and the log is saved to the delegate log table.
[0014] Optionally, when the strategy type is a parent-child type, determining the execution order of the delegated triggering instruction according to the strategy type includes:
[0015] The parent and child condition sheets of the combined condition sheet are determined based on the parent-child type.
[0016] The parent-child execution order corresponding to the delegate triggering instruction is determined based on the parent condition sheet and the child condition sheet;
[0017] Accordingly, the step of delegating the combined condition sheet according to the condition details and the execution order, obtaining the call process log, and saving the log to the delegate log table includes:
[0018] According to the parent-child execution order, the parent condition sheet and child condition sheet are delegated to the condition details to obtain the call process log, and the log is saved to the delegate log table.
[0019] Optionally, the step of delegating calls to the parent and child condition sheets according to the parent-child execution order and the condition details, obtaining a flow record of the call process, and saving the flow record to the delegation flow table includes:
[0020] Determine whether the parent conditional statement generates a parent transaction record according to the parent-child execution order;
[0021] When the parent conditional statement generates a parent transaction record, the child conditional statement is delegated to the condition details to obtain the child transaction record of the calling process, and the child transaction record and the parent transaction record are saved to the delegated transaction table.
[0022] Optionally, when the strategy type is a mutual exclusion type, determining the execution order of the delegate triggering instruction according to the strategy type includes:
[0023] Determine the mutual exclusion condition sheets in the combined condition sheets according to the mutual exclusion type;
[0024] The mutual exclusion execution order corresponding to the delegate triggering instruction is determined based on the mutual exclusion condition sheet.
[0025] Accordingly, the step of delegating the combined condition sheet according to the condition details and the execution order, obtaining the call process log, and saving the log to the delegate log table includes:
[0026] According to the mutually exclusive execution order, the mutually exclusive condition sheet is delegated to the condition details to obtain the call process log, and the log is saved to the delegate log table.
[0027] Optionally, the step of delegating the mutual exclusion condition sheet according to the condition details in the mutual exclusion execution order, obtaining a pipeline record of the call process, and saving the pipeline record to the delegation pipeline table includes:
[0028] Determine whether there are mutually exclusive transaction records in the mutually exclusive condition sheet based on the condition details;
[0029] When a mutual exclusion log record exists in the mutual exclusion condition sheet, the delegate call of the delegate trigger instruction is canceled according to the mutual exclusion execution order, and the mutual exclusion log record is saved to the delegate log table.
[0030] Optionally, the combined conditional form details table stores the condition details, trigger conditions, and strategy types of the combined conditional forms.
[0031] Furthermore, to achieve the above objectives, the present invention also proposes a conditional single call device, the device comprising:
[0032] The number acquisition module is used to traverse the strategy delegate main table according to the delegate trigger instruction when a delegate trigger instruction is received, and obtain the main delegate number corresponding to the delegate trigger instruction.
[0033] The conditional order combination module is used to query the combination conditional order details table based on the main entrustment number to obtain the combination conditional order corresponding to the entrustment trigger instruction.
[0034] The delegated invocation module is used to delegate invocation of the combined condition sheet, obtain the invocation process log, and save the log to the delegated log table.
[0035] Furthermore, to achieve the above objectives, the present invention also proposes a conditional single call device, the device comprising: a memory, a processor, and a conditional single call program stored in the memory and executable on the processor, the conditional single call program being configured to implement the steps of the conditional single call method as described above.
[0036] In addition, to achieve the above objectives, the present invention also proposes a storage medium storing a conditional single call program, which, when executed by a processor, implements the steps of the conditional single call method as described above.
[0037] Upon receiving a delegate trigger instruction, this invention iterates through the strategy delegate master table according to the instruction to obtain the master delegate number corresponding to the instruction. Then, it queries the combined conditional sheet details table based on the master delegate number to obtain the combined conditional sheet corresponding to the instruction. Finally, it invokes the combined conditional sheet, obtains a flow record of the invocation process, and saves this flow record to the delegate flow table. Because this invention uses combined conditional sheets, different conditional sheets can be linked together, eliminating isolated operations and greatly enriching the application scenarios of conditional sheets. It also reduces the cumbersome operations of traditional single conditional sheets, thereby improving execution efficiency. Attached Figure Description
[0038] Figure 1 This is a schematic diagram of the structure of the conditional call device in the hardware operating environment involved in the embodiments of the present invention;
[0039] Figure 2 This is a flowchart illustrating the first embodiment of the conditional statement invocation method of the present invention;
[0040] Figure 3 This is a schematic diagram illustrating the correspondence between the strategy delegate master table and the delegate transaction table in the original conditional form system in the first embodiment of the conditional form invocation method of the present invention.
[0041] Figure 4 This is a schematic diagram illustrating the strategy types in the original conditional form system in the first embodiment of the conditional form invocation method of the present invention;
[0042] Figure 5 This is a schematic diagram illustrating the correspondence between the combined conditional sheet detail tables in the first embodiment of the conditional sheet invocation method of the present invention;
[0043] Figure 6 This is a flowchart illustrating the second embodiment of the conditional statement invocation method of the present invention;
[0044] Figure 7 This is a structural block diagram of the first embodiment of the conditional call device of the present invention.
[0045] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0046] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.
[0047] Reference Figure 1 , Figure 1 This is a schematic diagram of the structure of the conditional call device in the hardware operating environment involved in the embodiments of the present invention.
[0048] like Figure 1As shown, the conditional call device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wireless-Fidelity (Wi-Fi) interface). The memory 1005 may be high-speed random access memory (RAM) or stable non-volatile memory (NVM), such as a disk drive. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001.
[0049] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on the conditional call device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0050] like Figure 1 As shown, the memory 1005, which serves as a storage medium, may include an operating system, a network communication module, a user interface module, and a conditional call program.
[0051] exist Figure 1 In the conditional order calling device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the conditional order calling device of the present invention can be set in the conditional order calling device, and the conditional order calling device calls the conditional order calling program stored in the memory 1005 through the processor 1001 and executes the conditional order calling method provided in the embodiment of the present invention.
[0052] This invention provides a conditional single call method, referring to... Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the conditional statement invocation method of the present invention.
[0053] It should be noted that conditional orders refer to a type of strategy order supported by the trading service platform. These orders can be pre-set to meet certain conditions, triggering the order upon fulfillment. The trading service platform is a strategy service platform responsible for handling the business logic of order placement, cancellation, and execution. Currently, the trading service platform supports various conditional orders such as fixed-price buy / sell, stop-loss / take-profit, buy on rebound, sell on pullback, and price fluctuation conditional orders. Data relationships are as follows... Figure 3 As shown, Figure 3 This is a schematic diagram illustrating the correspondence between the policy delegate master table and the delegate transaction table in the original conditional order system in the first embodiment of the conditional order invocation method of the present invention. (See figure.)
[0054] 1. The COS_ORDER (strategy order master table) is used to store the details of the conditional order, such as the trigger condition, order price and quantity.
[0055] 2. The COS_SUB_ORDER (order log table) table is used to store the specific transaction records after a conditional order is triggered, and to synchronize the order status, such as completed or cancelled.
[0056] 3. If the COS_ORDER delegate is triggered, a COS_SUB_ORDER transaction record will be generated. There is a one-to-one relationship between the data in the main table of the triggered strategy delegate and the data in the delegate transaction record table.
[0057] For example, the following table extracts key information from the fields of the Commission Information (COS_ORDER) table for explanation:
[0058]
[0059] As shown in the table above, each COS_ORDER record corresponds to a conditional order, such as a buy / sell order, stop-loss or take-profit order. All conditional orders in the conditional order system are stored in the COS_ORDER table. However, this structure has a drawback: it cannot express complex strategy structures. For example, if multiple conditional orders need to be linked together to implement a scenario such as buying first and then selling, it is generally necessary to create a buy conditional order, and then create a sell conditional order after the purchase is successful. This method is cumbersome and the two conditional orders cannot form an organic connection.
[0060] This invention proposes a conditional order invocation method to address this pain point, which can establish the relationship between conditional orders and enrich the application scenarios of conditional orders.
[0061] In this embodiment, the conditional single call method includes the following steps:
[0062] Step S10: Upon receiving a delegate trigger instruction, traverse the policy delegate main table according to the delegate trigger instruction to obtain the main delegate number corresponding to the delegate trigger instruction.
[0063] Step S20: Query the combined condition sheet details table according to the main entrustment number to obtain the combined condition sheet corresponding to the entrustment trigger instruction.
[0064] It should be noted that the executing entity of the method in this embodiment can be a computing service device with data query and conditional order delegation functions, such as a personal computer or a server, or other electronic devices capable of performing the same or similar functions, such as the aforementioned conditional order delegation device. This embodiment does not limit this. Here, the aforementioned conditional order delegation device (hereinafter referred to as the delegation device) will be used to specifically describe this embodiment and the following embodiments.
[0065] Understandably, a conditional order is a trading instruction that specifies certain conditions to trigger the execution of an order when setting up a conditional order. A conditional order is a special type of trading instruction that allows investors to set conditions in the market, and when these conditions are met, the system will automatically execute the corresponding trading operation.
[0066] It should be noted that the combined conditional order details table is used to store the details of combined conditional orders, such as trigger conditions, order price and quantity, and also saves the position and relationship of a certain combined conditional order sub-order in the whole combined conditional order structure.
[0067] It should be understood that a combined conditional order is a type of strategy order supported by the trading service, which can combine two or more conditional orders of different types. A combined conditional order can combine two or more conditional orders. For example, conditional orders can support two types of relationships: parent-child and mutual exclusion. A parent-child relationship means that the parent conditional order must be triggered before the child conditional order can be triggered; a mutual exclusion relationship means that triggering one conditional order will automatically cancel the other conditional orders; or other methods, which are not limited in this embodiment.
[0068] It should be understood that the strategy order master table is used to store the details of conditional orders, such as trigger conditions, order prices, and quantities. The master order number is the number corresponding to the conditional order in the strategy order master table. One COS_ORDER (strategy order) data corresponds to multiple COS_COMBINED_ORDER (combined conditional order details) data. As long as the master order number of the COS_ORDER is available, all conditional order details can be retrieved.
[0069] In its implementation, when a conditional order invocation device receives a commission trigger instruction, it iterates through the strategy commission master table according to the instruction to obtain the master commission number corresponding to the instruction. Then, it queries the combined conditional order details table based on the master commission number to obtain the combined conditional order and its details corresponding to the instruction. The combined conditional order details table allows different conditional orders to be linked together, moving beyond isolated operations. This enables strategies such as buy-first-sell-later arbitrage and portfolio rebalancing, greatly enriching the application scenarios of conditional orders.
[0070] Step S30: Delegate the combined condition sheet to obtain the call process log and save the log to the delegate log table.
[0071] In the specific implementation, after the combined conditional order is delegated, the transaction record of the calling process is obtained, the specific transaction record after the conditional order triggers the delegation is stored, and the order status, such as completed or cancelled, is synchronized.
[0072] Furthermore, considering the scalability of the combined conditional order detail table, the combined conditional order detail table in this embodiment stores the condition details, trigger conditions, and strategy types of the combined conditional order. This architecture of the combined conditional order detail table improves scalability, reduces coupling, and facilitates future expansion with new functionalities.
[0073] For ease of understanding, the execution process of the original conditional order system is used as an example, but this does not limit the scope of this solution. (Reference) Figure 4 , Figure 4 This is a schematic diagram illustrating the strategy types in the original conditional order system in the first embodiment of the conditional order invocation method of the present invention. For example... Figure 4As shown, in the original system, COS_ORDER was used to represent only a specific conditional order type, such as fixed-price buy / sell or rebound buy, and its detailed data was directly stored in the COS_ORDER table. In the new system, however, this table's responsibility shifts to representing an abstract combination of conditional orders, such as buy-first-sell or portfolio rebalancing, and it no longer stores specific detailed data. Specific conditional order details, such as trigger conditions and buy / sell prices, are handled by the new COS_COMBINED_ORDER table. For example, using the ATTR_CODE field to describe the strategy type, the ATTR_CODE field in the original COS_ORDER table represented the specific conditional order type (fixed-price buy / sell, rebound buy, price change, etc.). Under the new architecture, the ATTR_CODE field of the COS_ORDER table is used to indicate what kind of conditional order combination it is (such as buy first and sell later, rebalancing, etc.), while the ATTR_CODE field of the COS_COMBINED_ORDER table takes over the original responsibilities of the ATTR_CODE field of the COS_ORDER table to indicate the specific conditional order type (such as fixed-price buy and sell, rebound buy, etc.).
[0074] In this embodiment, the conditional statement invocation method will extract the existing strategy delegation master table from... Figure 3 The architectural relationship becomes Figure 5 The architectural relationship, Figure 5 This is a schematic diagram illustrating the correspondence between the combined conditional statement detail tables in the first embodiment of the conditional statement invocation method of the present invention. For example... Figure 5 As shown:
[0075] 1. The COS_ORDER (strategy delegate main table) is no longer used to store the details of the conditional order, but is used as a whole to identify the entire combined conditional order strategy itself.
[0076] 2. The COS_COMBINED_ORDER (Combined Condition Order Details Table) not only stores the details of combined condition orders, such as trigger conditions, order price, and quantity, but also saves the position and relationships of a specific combined condition order sub-order within the overall combined condition order structure. It has a one-to-many relationship with the COS_ORDER (Strategy Order Master Table).
[0077] 3. The COS_SUB_ORDER (order log) is used to store the specific transaction records after a conditional order is triggered, and to synchronize the order status, such as completed or cancelled. It corresponds one-to-one with the COS_COMBINED_ORDER data. One COS_ORDER (strategy order) record corresponds to multiple COS_COMBINED_ORDER (combined conditional order details) records. By using the main order number in the COS_ORDER, all conditional order details can be retrieved.
[0078] In this embodiment, when the conditional order invocation device receives a commission trigger instruction, it iterates through the strategy commission master table according to the commission trigger instruction to obtain the master commission number corresponding to the commission trigger instruction. Then, it queries the combined conditional order detail table according to the master commission number to obtain the combined conditional order and conditional order details corresponding to the commission trigger instruction. The combined conditional order detail table allows different conditional orders to be linked, eliminating isolated operations and enabling strategies such as buy-first-sell-later arbitrage and portfolio rebalancing, greatly enriching the application scenarios of conditional orders. Finally, after invoking the combined conditional order, the device obtains the transaction record of the invocation process, stores the specific transaction record after the conditional order is triggered, and synchronizes the order status, such as completed or cancelled. Because this embodiment uses combined conditional orders to link different conditional orders, eliminating isolated operations, it greatly enriches the application scenarios of conditional orders, reduces the cumbersome operations of traditional single conditional orders, and thus improves execution efficiency.
[0079] refer to Figure 6 , Figure 6 This is a flowchart illustrating the second embodiment of the conditional statement invocation method of the present invention.
[0080] Based on the first embodiment described above, in this embodiment, considering the association relationship of the conditional sheet, step S30 includes:
[0081] Step S31: Extract the strategy type and condition details of the combined condition sheet. The strategy type includes parent-child type and mutual exclusion type.
[0082] Step S32: Determine the execution order corresponding to the delegate triggering instruction based on the strategy type.
[0083] Step S33: Delegate the combined condition sheet according to the execution order based on the condition details, obtain the flow record of the calling process, and save the flow record to the delegate flow table.
[0084] It's important to note that strategy types are classifications or categories used in the investment and trading field to describe different investment or trading strategies. Examples include trend-following strategies, parent-child strategies, and mutually exclusive strategies. A parent-child strategy means that the parent conditional order must be triggered before the child conditional order can be triggered; a mutually exclusive strategy means that triggering one conditional order will automatically cancel the others.
[0085] Understandably, the condition details are the specific details of the trigger conditions defined and configured when setting up a condition sheet.
[0086] In the specific implementation, the strategy type and condition details of the combined conditional statement are extracted. The strategy type includes parent-child type and mutual exclusion type. The execution order corresponding to the delegate triggering instruction is determined according to the strategy type. The combined conditional statement is then delegated and invoked according to the execution order based on the condition details, obtaining a pipeline record of the invocation process, and saving the pipeline record to the delegate pipeline table. This allows different conditional statements to be linked together, rather than operating in isolation, thus improving the efficiency of conditional statement invocation.
[0087] Furthermore, when the strategy type is a parent-child type, step S32 in this embodiment includes: determining the parent conditional sheet and child conditional sheet of the combined conditional sheet according to the parent-child type; and determining the parent-child execution order corresponding to the delegate triggering instruction based on the parent conditional sheet and the child conditional sheet.
[0088] Accordingly, step S33 includes: according to the parent-child execution order, delegating the parent condition sheet and child condition sheet to the condition details, obtaining the flow record of the calling process, and saving the flow record to the delegation flow table.
[0089] In the implementation, one COS_ORDER (strategy delegation) data corresponds to multiple COS_COMBINED_ORDER (combined conditional order details) data, and the two are linked by ORDER_NO. The relationship between different conditional order details is linked through the SERIAL and PARENT_SERIAL fields of the COS_COMBINED_ORDER table. For example, a buy-then-sell combined conditional order (parent-child type) is generated by one COS_ORDER data (ATTR_CODE specifies the strategy type, indicating that it is a parent-child combined conditional order). According to the execution order of the parent and child, the parent and child conditional orders are delegated to according to the condition details, obtaining a log record of the call process, and the log record is saved to the delegation log table.
[0090] Furthermore, in this embodiment, the process of delegating calls to the parent and child conditional sheets according to the condition details in the parent-child execution order to obtain a call log record and saving the log record to the delegated log table includes: determining whether the parent conditional sheet generates a parent log record according to the parent-child execution order; when the parent conditional sheet generates a parent log record, delegating calls to the child conditional sheet according to the condition details to obtain a child log record of the call process, and saving the child log record and the parent log record to the delegated log table.
[0091] In a specific implementation, for example, the parent and child conditional orders consist of two COS_COMBINED_ORDER data entries. The first data entry has SERIAL as 1 and PARENT_SERIAL as 0 (representing the root level with no parent), and stores the details of the buy conditional order. The second data entry has SERIAL as 2 and PARENT_SERIAL as 1 (indicating that the parent is a buy conditional order, and monitoring will only begin after the buy conditional order is successfully executed), and stores the details of the sell conditional order.
[0092] Furthermore, when the strategy type is a mutual exclusion type, step S32 in this embodiment includes: determining the mutual exclusion condition sheet in the combined condition sheet according to the mutual exclusion type; and determining the mutual exclusion execution order corresponding to the delegate triggering instruction based on the mutual exclusion condition sheet.
[0093] Accordingly, step S33 includes: according to the mutual exclusion execution order, delegating the mutual exclusion condition sheet according to the condition details, obtaining the flow record of the calling process, and saving the flow record to the delegation flow table.
[0094] In the implementation, one COS_ORDER (strategy delegation) record corresponds to multiple COS_COMBINED_ORDER (combined conditional order details) records, and the two are linked by ORDER_NO. The relationship between different conditional order details is linked through the SERIAL and PARENT_SERIAL fields of the COS_COMBINED_ORDER table. For example, a mutually exclusive combined conditional order (mutually exclusive relationship) also consists of one COS_ORDER record (but corresponding to a different ATTR_CODE than the parent and child combined conditional orders) and two COS_COMBINED_ORDER records. The first record has SERIAL set to 1 and PARENT_SERIAL set to 0 (representing the root level, no parent), and stores the details of this conditional order; the second record has SERIAL set to 2 and PARENT_SERIAL set to 0 (representing the root level, no parent), and stores the details of the sold conditional order.
[0095] Furthermore, in this embodiment, the process of delegating the mutual exclusion condition sheet according to the condition details in the mutual exclusion execution order to obtain a pipeline record of the call process, and saving the pipeline record to the delegate pipeline table, includes: determining whether there is a mutual exclusion pipeline record in the mutual exclusion condition sheet according to the condition details; when there is a mutual exclusion pipeline record in the mutual exclusion condition sheet, canceling the delegate call of the delegate trigger instruction according to the mutual exclusion execution order, and saving the mutual exclusion pipeline record to the delegate pipeline table.
[0096] Understandably, the existence of a mutual exclusion log entry in the mutual exclusion conditional sheet can be determined based on the condition details. If a mutual exclusion log entry exists in the mutual exclusion conditional sheet, the delegate call of the delegate trigger instruction can be directly cancelled to avoid invalid calls and improve the efficiency and accuracy of conditional sheet calls. The details of each strategy are expressed through data in the COS_COMBINED_ORDER table; the two dimensions complement each other, greatly increasing the richness and flexibility of strategy expression.
[0097] This embodiment extracts the strategy type and condition details of the combined conditional statement. The strategy type includes parent-child type and mutual exclusion type. The execution order corresponding to the delegate triggering instruction is determined based on the strategy type. The combined conditional statement is then invoked according to the execution order based on the condition details, obtaining a pipeline record of the invocation process, and saving the pipeline record to a delegate pipeline table. This allows different conditional statements to be linked, rather than operating in isolation, improving the efficiency of conditional statement invocation. Simultaneously, the two dimensions complement each other, greatly increasing the richness and flexibility of strategy expression.
[0098] Furthermore, this embodiment of the invention also proposes a storage medium storing a conditional single call program, which, when executed by a processor, implements the steps of the conditional single call method as described above.
[0099] Reference Figure 7 , Figure 7 This is a structural block diagram of the first embodiment of the conditional call device of the present invention.
[0100] like Figure 7 As shown, the conditional single call device proposed in this embodiment of the invention includes:
[0101] The number acquisition module 701 is used to traverse the strategy delegate main table according to the delegate trigger instruction when a delegate trigger instruction is received, and obtain the main delegate number corresponding to the delegate trigger instruction.
[0102] The conditional order combination module 702 is used to query the combination conditional order details table according to the main entrustment number to obtain the combination conditional order corresponding to the entrustment trigger instruction.
[0103] The delegated invocation module 703 is used to delegate the invocation of the combined condition sheet, obtain the invocation process log, and save the log to the delegated log table.
[0104] In this embodiment, when the conditional order invocation device receives a commission trigger instruction, it iterates through the strategy commission master table according to the commission trigger instruction to obtain the master commission number corresponding to the commission trigger instruction. Then, it queries the combined conditional order detail table according to the master commission number to obtain the combined conditional order and conditional order details corresponding to the commission trigger instruction. The combined conditional order detail table allows different conditional orders to be linked, eliminating isolated operations and enabling strategies such as buy-first-sell-later arbitrage and portfolio rebalancing, greatly enriching the application scenarios of conditional orders. Finally, after invoking the combined conditional order, the device obtains the transaction record of the invocation process, stores the specific transaction record after the conditional order is triggered, and synchronizes the order status, such as completed or cancelled. Because this embodiment uses combined conditional orders to link different conditional orders, eliminating isolated operations, it greatly enriches the application scenarios of conditional orders, reduces the cumbersome operations of traditional single conditional orders, and thus improves execution efficiency.
[0105] Based on the first embodiment of the conditional single call device of the present invention, a second embodiment of the conditional single call device of the present invention is proposed.
[0106] In this embodiment, the delegate invocation module 703 is further configured to extract the strategy type and condition details of the combined condition sheet, wherein the strategy type includes parent-child type and mutual exclusion type; determine the execution order corresponding to the delegate trigger instruction according to the strategy type; perform delegate invocation on the combined condition sheet according to the execution order based on the condition details, obtain the flow record of the invocation process, and save the flow record to the delegate flow table.
[0107] Furthermore, when the strategy type is a parent-child type, the delegate invocation module 703 is also used to determine the parent conditional sheet and child conditional sheet of the combined conditional sheet according to the parent-child type; and to determine the parent-child execution order corresponding to the delegate triggering instruction based on the parent conditional sheet and the child conditional sheet;
[0108] Accordingly, according to the parent-child execution order, the parent condition sheet and child condition sheet are delegated to the condition details to obtain the call process log, and the log is saved to the delegate log table.
[0109] Furthermore, the delegated invocation module 703 is also used to determine whether the parent conditional sheet generates a parent transaction record according to the parent-child execution order; when the parent conditional sheet generates a parent transaction record, the delegated invocation is performed on the child conditional sheet according to the condition details to obtain the child transaction record of the invocation process, and the child transaction record and the parent transaction record are saved to the delegated transaction table.
[0110] Furthermore, when the strategy type is a mutual exclusion type, the delegate invocation module 703 is also used to determine the mutual exclusion condition sheet in the combined condition sheet according to the mutual exclusion type; and to determine the mutual exclusion execution order corresponding to the delegate trigger instruction based on the mutual exclusion condition sheet;
[0111] Accordingly, according to the mutually exclusive execution order, the mutually exclusive condition sheet is delegated to the condition details to obtain the call process log, and the log is saved to the delegate log table.
[0112] Furthermore, the delegate invocation module 703 is also used to determine whether there is a mutual exclusion flow record in the mutual exclusion condition sheet according to the condition details; when there is a mutual exclusion flow record in the mutual exclusion condition sheet, the delegate invocation of the delegate trigger instruction is canceled according to the mutual exclusion execution order, and the mutual exclusion flow record is saved to the delegate flow table.
[0113] Furthermore, the combined conditional form details table stores the condition details, trigger conditions, and strategy types of the combined conditional forms.
[0114] Other embodiments or specific implementations of the conditional call device of the present invention can be found in the above-described method embodiments, and will not be repeated here.
[0115] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0116] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0117] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory / random access memory, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0118] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A conditional single call method, characterized in that, The conditional statement invocation method includes: Upon receiving a commission trigger instruction, the strategy commission master table is traversed according to the commission trigger instruction to obtain the master commission number corresponding to the commission trigger instruction. The strategy commission master table stores the trigger conditions, commission prices and quantities of various conditional orders. The master commission number is the number corresponding to various conditional orders in the strategy commission master table. One strategy commission data corresponds to multiple combination conditional order details. The combined condition sheet corresponding to the authorization trigger instruction is obtained by querying the combined condition sheet details table based on the main authorization number. The combined conditional statement is delegated to obtain a transaction log of the calling process, and the transaction log is saved to the delegate transaction log table. The step of delegating the combined conditional statement to obtain a transaction log of the calling process and saving the transaction log to the delegated transaction log table includes: Extract the strategy type and condition details of the combined conditional order. The strategy type includes parent-child type and mutual exclusion type. The parent-child type means that the parent conditional order must be triggered before the child conditional order can be triggered. The mutual exclusion type means that after one conditional order is triggered, other conditional orders will be automatically canceled. When the strategy type is parent-child type, the parent conditional sheet and child conditional sheet of the combined conditional sheet are determined according to the parent-child type; the parent-child execution order corresponding to the delegate trigger instruction is determined based on the parent conditional sheet and child conditional sheet; according to the parent-child execution order, the parent conditional sheet and child conditional sheet are delegated to the conditional sheet according to the condition details, the call process flow record is obtained, and the flow record is saved to the delegate flow table; And / or, when the strategy type is a mutual exclusion type, determine the mutual exclusion conditional in the combined conditional sheet according to the mutual exclusion type; determine the mutual exclusion execution order corresponding to the delegate trigger instruction based on the mutual exclusion conditional; according to the mutual exclusion execution order, perform delegate invocation on the mutual exclusion conditional according to the condition details, obtain the pipeline record of the invocation process, and save the pipeline record to the delegate pipeline table.
2. The conditional single call method as described in claim 1, characterized in that, The process involves delegating calls to the parent and child condition sheets according to the parent-child execution order and the condition details, obtaining a flow record of the call process, and saving the flow record to the delegation flow table, including: Determine whether the parent conditional statement generates a parent transaction record according to the parent-child execution order; When the parent conditional statement generates a parent transaction record, the child conditional statement is delegated to the condition details to obtain the child transaction record of the calling process, and the child transaction record and the parent transaction record are saved to the delegated transaction table.
3. The conditional single call method as described in claim 1, characterized in that, The step of delegating the mutual exclusion condition sheet according to the mutual exclusion execution order and the condition details, obtaining a flow record of the call process, and saving the flow record to the delegation flow table includes: Determine whether there are mutually exclusive transaction records in the mutually exclusive condition sheet based on the condition details; When a mutual exclusion log record exists in the mutual exclusion condition sheet, the delegate call of the delegate trigger instruction is canceled according to the mutual exclusion execution order, and the mutual exclusion log record is saved to the delegate log table.
4. The conditional single call method as described in any one of claims 1-3, characterized in that, The combined conditional form details table stores the condition details, trigger conditions, and strategy types of the combined conditional forms.
5. A conditional single call apparatus, wherein the conditional single call apparatus executes the conditional single call method as described in claim 1, characterized in that, The device includes: The number acquisition module is used to traverse the strategy delegate main table according to the delegate trigger instruction when a delegate trigger instruction is received, and obtain the main delegate number corresponding to the delegate trigger instruction. The conditional order combination module is used to query the combination conditional order details table based on the main entrustment number to obtain the combination conditional order corresponding to the entrustment trigger instruction. The delegated invocation module is used to delegate invocation of the combined condition sheet, obtain the invocation process log, and save the log to the delegated log table.
6. A conditional call device, characterized in that, The device includes: a memory, a processor, and a conditional single call program stored in the memory and executable on the processor, the conditional single call program being configured to implement the steps of the conditional single call method as described in any one of claims 1 to 4.
7. A storage medium, characterized in that, The storage medium stores a conditional single call program, which, when executed by a processor, implements the steps of the conditional single call method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Combined ordering method, device and system and computer readable storage medium
CN114358928A
Loan combination rule configuration method and device, equipment and medium
CN114897606A