Financial product pending order processing method and device

Through the node search method of the pending order linked list and binary heap queue, the problems of low order processing speed and accuracy are solved, fast and accurate order processing is achieved, and the order processing efficiency is improved.

CN115936875BActive Publication Date: 2025-09-12INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211674056.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-26
Publication Date
2025-09-12
Estimated Expiration
2042-12-26

AI Technical Summary

Technical Problem

The existing technology has a slow order processing speed and low accuracy, resulting in low order processing efficiency.

Method used

A node search method based on a pending order linked list and a binary heap queue is used to determine the target node by judging whether the price range of the current node is consistent with the standard price, and to-be-processed orders are processed based on the target node and the standard price.

Benefits of technology

It improves the speed and accuracy of order processing, reduces the number of comparisons between benchmark prices and order information, and significantly improves the overall order processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115936875B_ABST
    Figure CN115936875B_ABST
Patent Text Reader

Abstract

The present invention provides a method and device for processing pending orders for financial products, particularly relating to the financial field. The method comprises: determining a pending order linked list based on current product type information and current price comparison direction, the pending order linked list comprising k levels; determining the kth node in the pending order linked list as the current node; and repeatedly performing a node search step based on the pending order linked list until a target node corresponding to a preset standard price is determined; and based on the target node and the standard price, determining multiple pending orders corresponding to a target pending order binary heap queue of the target node and pending orders in the pending order binary heap queues of multiple corresponding nodes in the pending order linked list as pending orders to be processed, and processing the pending orders. The present invention can improve the speed and accuracy of pending order processing, thereby improving the efficiency of pending order processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of pending order processing, in particular to the financial field, and more particularly to a method and device for processing pending orders of financial products. Background Art

[0002] In relevant financial scenarios, clients often place pending orders, and relevant institutions will, at the appropriate time, execute corresponding buy or sell transactions based on these orders. Order processing involves scanning the corresponding order details based on the corresponding real-time benchmark price (which can be understood as the standard price) and processing the orders within the corresponding price range.

[0003] In existing order processing, the primary method for obtaining corresponding orders is to match them using corresponding data query statements. However, this method requires frequent comparisons between the benchmark price and each submitted order. Furthermore, data query statements struggle to fully match indexes and are prone to table backtracking. Consequently, order retrieval takes a long time and is difficult to accurately and comprehensively match the expected orders. This results in slower order retrieval and lower accuracy, which in turn leads to slower and less accurate order processing overall.

[0004] In summary, the existing technology has the problem that the speed of pending order processing is slow and the accuracy is low, which is not conducive to improving the efficiency of pending order processing. Summary of the Invention

[0005] One object of the present invention is to provide a method for processing pending orders for financial products to address the problem in the prior art of slow pending order processing and low accuracy, which hinders efficiency in pending order processing. Another object of the present invention is to provide an apparatus for processing pending orders for financial products. A further object of the present invention is to provide a computer device. A further object of the present invention is to provide a readable medium.

[0006] To achieve the above objectives, one aspect of the present invention discloses a method for processing pending orders for financial products, the method comprising:

[0007] Determine a corresponding order list based on the current product type information and the current price comparison direction, wherein the order list includes k levels;

[0008] The kth node in the pending order linked list is determined as the current node. Based on the pending order linked list, the node search step is repeatedly performed until a target node corresponding to a preset standard price is determined. The node search step includes: determining whether a price range of a pending order binary heap queue corresponding to the current node is consistent with the standard price. If so, the current node is determined as the target node; if not, determining whether the standard price is greater than an upper limit of the price range. If so, the last node among the k nodes after the current node is determined as the current node. If not, the node before the current node is determined as the current node.

[0009] Based on the target node and the standard price, multiple orders in the target order binary heap queue of the target node corresponding to the current price comparison direction and all orders in the order binary heap queues of multiple nodes in the order linked list corresponding to the current price comparison direction are determined as pending orders, and the pending orders are processed.

[0010] Optionally, determining a corresponding pending order list based on current product type information and current price comparison direction includes:

[0011] According to the current product type information, obtain product pending order type information and product property type information;

[0012] The corresponding order list is determined based on the product order type information, product nature type information and current price comparison direction; wherein the order of multiple nodes in the order list is in ascending order according to the lower limit or upper limit of the corresponding price range.

[0013] Optionally, determining whether the price range of the order binary heap queue corresponding to the current node is consistent with the standard price includes:

[0014] Determining whether the standard price is greater than a lower limit of the price range and less than or equal to an upper limit of the price range, wherein the price ranges corresponding to the multiple nodes in the pending order list do not intersect;

[0015] If so, determining the current node as the target node;

[0016] If not, determine whether the standard price is greater than the upper limit of the price range. If so, use the last node among the last k nodes of the current node as the current node. If not, use the node before the current node as the current node.

[0017] Optionally, based on the target node and the standard price, determining multiple orders in the target order binary heap queue of the target node corresponding to the current price comparison direction and all orders in the order binary heap queues of multiple nodes in the order linked list corresponding to the current price comparison direction as pending orders includes:

[0018] Determining target order prices for multiple orders in the target order binary heap queue;

[0019] When the current price comparison direction is a profit-taking buy or a stop-loss sell, based on the target order binary stack queue of the target node, all orders in the target order binary stack queue whose target order prices are greater than or equal to the standard price and all orders in the order binary stack queues of all nodes after the target node in the order linked list are determined as pending orders;

[0020] When the current price comparison direction is stop-loss buying or profit-selling, based on the target order binary stack queue of the target node, all orders in the target order binary stack queue whose corresponding target order price is less than the standard price and all orders in the order binary stack queues of all nodes before the target node in the order linked list are determined as pending orders.

[0021] Optionally, the target order binary heap queue based on the target node determines as pending orders the orders corresponding to target order prices greater than or equal to the standard price in the target order binary heap queue and all orders in the order binary heap queues of all nodes after the target node in the order linked list. This includes:

[0022] Based on the target order binary heap queue, repeatedly performing the first popping step until the target order price of the order corresponding to the top element of the target order binary heap queue is less than the standard price, wherein the first popping step includes: popping the top element of the target order binary heap queue to obtain a popped order;

[0023] All the orders that have been placed out of the order stack and all the orders in the order binary stack queue of all nodes after the target node in the order linked list are determined as pending orders; wherein, the target order binary stack queue is a maximum stack queue.

[0024] Optionally, the target order binary heap queue based on the target node determines as pending orders the orders corresponding to target order prices less than the standard price in the target order binary heap queue and all orders in the order binary heap queues of all nodes before the target node in the order linked list. This includes:

[0025] Based on the target order binary heap queue, repeatedly performing the second popping step until the target order price of the order corresponding to the top element of the target order binary heap queue is greater than or equal to the standard price, wherein the second popping step includes: popping the top element of the target order binary heap queue to obtain a popped order;

[0026] All the orders that have been placed out of the order stack and all the orders in the order binary heap queue of all nodes before the target node in the order linked list are determined as pending orders; wherein, the target order binary heap queue is a minimum heap queue.

[0027] Optionally, further including:

[0028] After processing the pending orders, all pending orders are cleared.

[0029] Optionally, determining the kth node in the pending order linked list as the current node includes:

[0030] The kth level of the pending order linked list is used as the current level, and the node pointed to by the head pointer of the current level is determined as the current node.

[0031] Optionally, taking the last node among the k nodes after the current node as the current node includes:

[0032] The node pointed to by the pointer of the current node corresponding to the current level is determined as the updated current node.

[0033] Optionally, taking the previous node of the current node as the current node includes:

[0034] The previous level of the current level is used as the updated current level, and the node to which the pointer pointing to the current node corresponding to the updated current level belongs is determined as the updated current node.

[0035] Optionally, further including:

[0036] Before determining the corresponding order list,

[0037] Based on multiple optional product type information, a preset risk measurement model and a preset number of queues, multiple price ranges corresponding to the optional product type information are obtained, and based on the multiple price ranges and pending orders, corresponding multiple pending order linked lists are formed.

[0038] Optionally, obtaining multiple price ranges corresponding to the optional product type information based on multiple optional product type information, a preset risk measurement model, and a preset number of queues includes:

[0039] Obtaining estimated normal distribution information corresponding to the optional product type information based on the product information corresponding to the optional product type information and the risk measurement model;

[0040] Based on the estimated normal distribution information and the number of queues, the corresponding price range is obtained; wherein, the estimated normal distribution information includes multiple estimated product prices corresponding to the optional product type information, and the estimated product prices corresponding to the optional product type information have the same probability of falling into the corresponding different price ranges, and the price ranges correspond one-to-one to the pending order binary heap queues, and the pending order binary heap queues correspond one-to-one to the nodes in the pending order linked list.

[0041] In order to achieve the above objectives, another aspect of the present invention discloses a device for processing pending orders of financial products, the device comprising:

[0042] A linked list positioning module is used to determine the corresponding pending order linked list based on the current product type information and the current price comparison direction, wherein the pending order linked list includes k levels;

[0043] A node search module is configured to determine the kth node in the pending order linked list as the current node, and repeatedly perform node search steps based on the pending order linked list until a target node corresponding to a preset standard price is determined, wherein the node search steps include: determining whether a price range of a pending order binary heap queue corresponding to the current node is consistent with the standard price; if so, determining the current node as the target node; if not, determining whether the standard price is greater than an upper limit of the price range; if so, determining the last node among the k nodes after the current node as the current node; if not, determining the node immediately preceding the current node as the current node;

[0044] The pending order processing module is used to determine, based on the target node and the standard price, multiple pending orders in the target pending order binary heap queue of the target node corresponding to the current price comparison direction and all pending orders in the pending order binary heap queue of multiple nodes corresponding to the current price comparison direction in the pending order linked list as pending orders to be processed, and process the pending orders.

[0045] The present invention also discloses a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the method described above is implemented when the processor executes the program.

[0046] The present invention also discloses a computer-readable medium on which a computer program is stored. When the program is executed by a processor, the method described above is implemented.

[0047] The financial product pending order processing method and device provided by the present invention determine the corresponding pending order chain list based on the current product type information and the current price comparison direction, wherein the pending order chain list includes k levels, can fully consider the law that the pending order nature is closely related to its product type information and the pending order price comparison direction, accurately locate the pending order chain list containing the pending order information of the corresponding nature, thereby making reasonable pending order range limitations for the subsequent accurate acquisition of expected pending orders, and improving the speed and accuracy of the overall pending order processing; by determining the kth node in the pending order chain list as the current node, based on the pending order chain list, repeatedly executing the node search step until the target node corresponding to the preset standard price is determined, the node search step includes: judging whether the price range of the pending order binary heap queue corresponding to the current node is consistent with the standard price, if so, determining the current node as the target node; if not, judging whether the standard price is greater than the upper limit of the price range, if so, taking the last node among the k nodes after the current node as the current node, if not, taking the previous node of the current node as The current node can help reduce the number of times the standard price and price range are compared, so that the target node that accurately corresponds to the standard price and represents the boundary of the pending order range can be located more quickly, thereby further quickly and accurately narrowing the corresponding target pending order range, facilitating the rapid and accurate positioning of the corresponding pending order, reducing the number of comparisons, and thus improving the speed and accuracy of the overall pending order processing; by determining, based on the target node and the standard price, multiple pending orders in the target pending order binary heap queue corresponding to the current price comparison direction and all pending orders in the pending order binary heap queue of multiple nodes corresponding to the current price comparison direction in the pending order linked list as pending orders, and processing the pending orders, it is possible to more finely start from the target node representing the boundary of the pending order range and multiple other nodes in the linked list corresponding to the corresponding comparison direction and boundary range, and specifically and accurately determine the pending orders corresponding to the standard price and comparison direction. Since the corresponding node range in the linked list has been pre-delineated, the speed of obtaining pending orders can be greatly improved, thereby improving the speed and accuracy of the overall pending order processing.

[0048] The financial product pending order processing method and device provided by the present invention can be based on the relevant algorithm search principle, and with the range positioning method based on node clustering, significantly reduces the number and time of comparing the benchmark price and related pending order information when obtaining the corresponding pending order. There is no need to compare the benchmark price with each existing pending order, and overcomes the problems of poor mobility of data query statements, inability to fully match indexes and poor comprehensiveness, and achieves accurate acquisition of pending orders that are consistent with the expected comparison direction and the current benchmark price, thereby improving the speed and accuracy of the overall pending order processing.

[0049] In summary, the method and device for processing financial product pending orders provided by the present invention can improve the speed and accuracy of pending order processing, thereby improving the efficiency of pending order processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0051] Figure 1 A schematic diagram showing a flow chart of a method for processing a pending order of a financial product according to an embodiment of the present invention;

[0052] Figure 2 A schematic diagram showing an optional step of determining a corresponding order list according to an embodiment of the present invention is shown;

[0053] Figure 3 A schematic diagram showing an optional step of determining pending orders according to an embodiment of the present invention is shown;

[0054] Figure 4 A schematic diagram showing another optional step of determining pending orders according to an embodiment of the present invention is shown;

[0055] Figure 5 A schematic diagram showing an optional order linked list according to an embodiment of the present invention is shown;

[0056] Figure 6 A schematic diagram of a module of a financial product pending order processing device according to an embodiment of the present invention is shown;

[0057] Figure 7 A schematic diagram showing the structure of a computer device suitable for implementing an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0058] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0059] The terms “first,” “second,” etc. used herein do not particularly refer to an order or sequence, nor are they used to limit the present invention. They are only used to distinguish elements or operations described with the same technical terms.

[0060] The words “include,” “including,” “have,” “contain,” etc. used in this document are open-ended terms, meaning including but not limited to.

[0061] As used herein, "and / or" includes any and all combinations of the items mentioned.

[0062] It should be noted that the acquisition, storage, use, and processing of data in the technical solution of the present invention are in compliance with the relevant provisions of national laws and regulations.

[0063] It should be noted that the method and device for processing pending orders of financial products disclosed in this application can be used in the financial field, and can also be used in any field other than the financial field. The application field of the method and device for processing pending orders of financial products disclosed in this application is not limited.

[0064] The embodiment of the present invention discloses a method for processing a pending order of a financial product. Figure 1 As shown, the method specifically includes the following steps:

[0065] S101: Determine a corresponding pending order list based on current product type information and current price comparison direction, wherein the pending order list includes k levels.

[0066] S102: Determine the kth node in the pending order list as the current node, and repeat the node search step based on the pending order list until the target node corresponding to the preset standard price is determined. The node search step includes: judging whether the price range of the pending order binary heap queue corresponding to the current node is consistent with the standard price. If so, determine the current node as the target node; if not, judge whether the standard price is greater than the upper limit of the price range. If so, determine the last node among the next k nodes of the current node as the current node. If not, determine the previous node of the current node as the current node.

[0067] S103: Based on the target node and the standard price, multiple orders in the target order binary heap queue of the target node corresponding to the current price comparison direction and all orders in the order binary heap queues of multiple nodes in the order linked list corresponding to the current price comparison direction are determined as pending orders, and the pending orders are processed.

[0068] Exemplarily, the pending order may be, but is not limited to, a matching pending order or a market maker pending order, preferably a market maker pending order. The relevant scenario of the pending order may be, but is not limited to, a customer placing an order with a relevant financial institution. When the future middle price (standard price) of a certain financial product meets the buy or sell price corresponding to the order, the transaction processing or amount processing corresponding to the pending order is completed, thereby automatically helping the customer to buy or sell. It should be noted that the nature of the pending order and the specific related financial scenarios can be determined by those skilled in the art according to actual circumstances. The above description is only an example and does not constitute a limitation.

[0069] For example, the standard price may be, but is not limited to, the benchmark price of a relevant financial product obtained by the corresponding financial institution from the relevant market or market maker. The relevant institution may also add a corresponding bid or ask spread to the benchmark price to form the bid and ask prices for customers, thereby achieving profitability. Accordingly, the standard price in embodiments of the present invention may be, but is not limited to, the aforementioned benchmark price or the price obtained by adding the corresponding spread to the benchmark price, preferably the benchmark price. It should be noted that the nature and source of the standard price can be determined by those skilled in the art based on actual circumstances, and the above description is merely illustrative and does not constitute a limitation.

[0070] For example, the meanings and properties of terms such as pending order and standard price in the embodiments of the present invention can be reflected in the existing pending order execution mechanism or pending order trading scenario, and will not be further elaborated here.

[0071] Exemplarily, the method for processing pending orders of financial products according to an embodiment of the present invention, its related execution logic (except the logic for processing the pending orders) can be set to, but not limited to, a corresponding cache (for example, it can be, but not limited to, redis) for implementation, and the cache can be, but not limited to, a cache of a related pending order transaction processing cluster. In this way, the speed of acquiring and screening the overall financial product pending orders can be further improved by taking advantage of the low cache load and the ability to process quickly, and compared with the prior art method that requires frequent reading of related databases, the decoupling can be improved, thereby further improving the overall efficiency. It should be noted that the setting method of the relevant execution logic can be determined by those skilled in the art according to actual conditions, and the above description is only an example and does not constitute a limitation thereto.

[0072] Exemplarily, the number of nodes in the order list is an integer multiple of K. It should be noted that the number of nodes in the order list can be determined by those skilled in the art according to actual conditions, and the above description is only an example and does not constitute a limitation thereto.

[0073] For example, the pending order may be in the form of, but not limited to, order information, including, but not limited to, the customer's desired upper and lower price limits, order product information, and auxiliary information. It should be noted that the specific content of the pending order can be determined by those skilled in the art based on actual circumstances, and the above description is merely an example and does not constitute a limitation.

[0074] For example, the sources of pending orders in embodiments of the present invention may be, but are not limited to, existing core processing clusters for pending orders. Accordingly, the overall pending orders may be acquired and processed at regular intervals, specifically for orders between the current and previous time points. It should be noted that the business sources and processing times of pending orders can be determined by those skilled in the art based on actual circumstances, and the above description is for illustrative purposes only and does not constitute a limitation.

[0075] Preferably, one pending order may correspond to one pending order number, which facilitates identification and information parsing of a specific pending order.

[0076] For example, the processing of pending orders may include, but is not limited to, performing corresponding transaction processing on the pending orders based on the customer's intended transaction direction (which may include, but is not limited to, buy or sell), such as closing the pending orders and performing a series of other operations. It should be noted that the specific implementation of processing pending orders can be determined by those skilled in the art based on actual circumstances, and the above description is merely illustrative and does not constitute a limitation.

[0077] Preferably, after the pending order is processed, the status information related to the pending order may also be updated to improve the timeliness of the relevant information and facilitate the coordination of the overall work.

[0078] Preferably, the extraction and movement of pending orders can be achieved through but not limited to methods or functions such as Array.Copy (this method is a static method with multiple overloaded versions, which can specify the index at which the copying and storage starts, as well as the elements to be copied). Correspondingly, the obtained pending orders can be moved to the corresponding pending order processing cluster for pending order processing.

[0079] The financial product pending order processing method and device provided by the present invention determine the corresponding pending order chain list based on the current product type information and the current price comparison direction, wherein the pending order chain list includes k levels, can fully consider the law that the pending order nature is closely related to its product type information and the pending order price comparison direction, accurately locate the pending order chain list containing the pending order information of the corresponding nature, thereby making reasonable pending order range limitations for the subsequent accurate acquisition of expected pending orders, and improving the speed and accuracy of the overall pending order processing; by determining the kth node in the pending order chain list as the current node, based on the pending order chain list, repeatedly executing the node search step until the target node corresponding to the preset standard price is determined, the node search step includes: judging whether the price range of the pending order binary heap queue corresponding to the current node is consistent with the standard price, if so, determining the current node as the target node; if not, judging whether the standard price is greater than the upper limit of the price range, if so, taking the last node among the k nodes after the current node as the current node, if not, taking the previous node of the current node as The current node can help reduce the number of times the standard price and price range are compared, so that the target node that accurately corresponds to the standard price and represents the boundary of the pending order range can be located more quickly, thereby further quickly and accurately narrowing the corresponding target pending order range, facilitating the rapid and accurate positioning of the corresponding pending order, reducing the number of comparisons, and thus improving the speed and accuracy of the overall pending order processing; by determining, based on the target node and the standard price, multiple pending orders in the target pending order binary heap queue corresponding to the current price comparison direction and all pending orders in the pending order binary heap queue of multiple nodes corresponding to the current price comparison direction in the pending order linked list as pending orders, and processing the pending orders, it is possible to more finely start from the target node representing the boundary of the pending order range and multiple other nodes in the linked list corresponding to the corresponding comparison direction and boundary range, and specifically and accurately determine the pending orders corresponding to the standard price and comparison direction. Since the corresponding node range in the linked list has been pre-delineated, the speed of obtaining pending orders can be greatly improved, thereby improving the speed and accuracy of the overall pending order processing.

[0080] The financial product pending order processing method and device provided by the present invention can be based on the relevant algorithm search principle, and with the range positioning method based on node clustering, significantly reduces the number and time of comparing the benchmark price and related pending order information when obtaining the corresponding pending order. There is no need to compare the benchmark price with each existing pending order, and overcomes the problems of poor mobility of data query statements, inability to fully match indexes and poor comprehensiveness, and achieves accurate acquisition of pending orders that are consistent with the expected comparison direction and the current benchmark price, thereby improving the speed and accuracy of the overall pending order processing.

[0081] In summary, the method and device for processing financial product pending orders provided by the present invention can improve the speed and accuracy of pending order processing, thereby improving the efficiency of pending order processing.

[0082] In an optional embodiment, if Figure 2 As shown, the method of determining the corresponding pending order list based on the current product type information and the current price comparison direction includes the following steps:

[0083] S201: Obtain product order type information and product property type information according to the current product type information.

[0084] S202: Determine a corresponding order list based on the product order type information, product nature type information, and current price comparison direction; wherein the order of the multiple nodes in the order list is in ascending order according to the lower limit or upper limit of the corresponding price range.

[0085] Exemplarily, step S201 may be, but is not limited to, reading the current product type information and parsing it to obtain the product order type information and product nature type information included in or corresponding to the current type information. The product order type information may be, but is not limited to, the financial business type information corresponding to the order, for example, the order type corresponding to the order type information may be, but is not limited to, "account foreign exchange", etc. The product nature type information may be, but is not limited to, information characterizing the financial nature of the product, for example, "currency A exchange for currency B", etc. The specific form of the product nature type information may be, but is not limited to, the corresponding product code, etc. The current product type information may be, but is not limited to, the product type information located by the relevant institution when the current order is obtained (the product type information corresponding to the order that the institution expects to process), for example, corresponding order acquisition and order processing are performed for a certain product type information. It should be noted that the specific implementation method of step S201, the nature and source of the current product type information, the nature of the product order type information and the nature of the product property type information, etc. can be determined by those skilled in the art according to actual conditions. The above description is only an example and does not constitute a limitation to this.

[0086] For example, the current price comparison direction can be, but is not limited to, the order trend for the relevant institution in the order-related mechanism or scenario. The current price comparison direction can be, but is not limited to, a profit-taking buy (which tends to make the standard price less than (or less than or equal to) the customer's expected transaction price lower limit for a certain order), a profit-taking sell (which tends to make the standard price greater than (or greater than or equal to) the customer's expected transaction price upper limit for a certain order), a stop-loss buy (which tends to make the standard price greater than (or greater than or equal to) the customer's expected transaction price upper limit for a certain order), and a stop-loss sell (which tends to make the standard price less than (or less than or equal to) the customer's expected transaction price lower limit for a certain order). The specific nature of the above-mentioned price comparison direction can be referenced to existing order execution mechanisms or financial order trading scenarios, and will not be elaborated here. The current price comparison direction can be, but is not limited to, the price comparison direction determined by the relevant institution when the current order is obtained. For example, the corresponding order acquisition and order processing are performed based on a certain price comparison direction (the price comparison direction that the institution expects to process the order). It should be noted that the specific nature, content and source of the current price comparison direction can be determined by those skilled in the art based on actual conditions. The above description is only an example and does not constitute a limitation to this.

[0087] Exemplarily, step S202 may be, but is not limited to, using the product order type information, product nature type information, and current price comparison direction as a comprehensive query identification basis to query or search from multiple existing order lists (which may be, but is not limited to, currently available order lists or order lists whose corresponding time nodes in the currently available order lists are within a preset time period) to determine the corresponding order list. It should be noted that the specific implementation of step S202 can be determined by those skilled in the art based on actual circumstances, and the above description is merely an example and does not constitute a limitation thereto.

[0088] For example, the order of the multiple nodes in the pending order list is in ascending order of the lower limit or upper limit of the corresponding price range, as shown in the following example:

[0089] Consider a chained order list with four main order nodes: A, B, C, and D. The lower limit of the price range corresponding to A is 4.895, the lower limit of the price range corresponding to B is 5.616, the lower limit of the price range corresponding to C is 6.108, and the lower limit of the price range corresponding to D is 6.895. Therefore, the order of the main nodes in the chained order list is A, B, C, and D. The same applies to the case where the upper limit is used as the basis.

[0090] It should be noted that the specific order of the corresponding nodes can be determined by those skilled in the art according to actual conditions. The above description is only an example and does not constitute a limitation thereto.

[0091] Through the above steps, it is possible to comprehensively consider the nature of the relevant pending order products and the nature of the pending order processing, conduct comprehensive positioning based on various related property information that can serve as identification, and quickly and accurately determine the pending order chain list that meets the acquisition requirements and records the corresponding pending order information, thereby improving the speed and accuracy of the overall pending order processing.

[0092] In an optional embodiment, determining whether the price range of the order binary heap queue corresponding to the current node is consistent with the standard price includes:

[0093] Determining whether the standard price is greater than a lower limit of the price range and less than or equal to an upper limit of the price range, wherein the price ranges corresponding to the multiple nodes in the pending order list do not intersect;

[0094] If so, determining the current node as the target node;

[0095] If not, determine whether the standard price is greater than the upper limit of the price range. If so, use the last node among the last k nodes of the current node as the current node. If not, use the node before the current node as the current node.

[0096] For example, on the basis that there is no intersection between the price ranges corresponding to multiple nodes in the order list, the upper limit of one node is equal to the lower limit of the next node. For example, if the price range corresponding to a node is (4.895, 5.616], then the price range of the next node of the node is (5.616, 6.108). It should be noted that the specific content of the price range can be determined by those skilled in the art according to actual circumstances. The above description is only an example and does not constitute a limitation thereto.

[0097] Through the above steps, the accuracy of locating nodes can be improved by refining the granularity of locating nodes to specific price ranges, thereby improving the accuracy of overall pending order acquisition and further improving the accuracy of overall pending order processing.

[0098] In an optional embodiment, based on the target node and the standard price, determining multiple orders in the target order binary heap queue of the target node corresponding to the current price comparison direction and all orders in the order binary heap queues of multiple nodes in the order linked list corresponding to the current price comparison direction as pending orders includes:

[0099] Determining target order prices for multiple orders in the target order binary heap queue;

[0100] When the current price comparison direction is a profit-taking buy or a stop-loss sell, based on the target order binary stack queue of the target node, all orders in the target order binary stack queue whose target order prices are greater than or equal to the standard price and all orders in the order binary stack queues of all nodes after the target node in the order linked list are determined as pending orders;

[0101] When the current price comparison direction is stop-loss buying or profit-selling, based on the target order binary stack queue of the target node, all orders in the target order binary stack queue whose corresponding target order price is less than the standard price and all orders in the order binary stack queues of all nodes before the target node in the order linked list are determined as pending orders.

[0102] Exemplarily, the target order prices of the multiple pending orders in the target pending order binary heap queue may be determined by, but not limited to, parsing the corresponding pending order information to obtain the corresponding pending order prices. The target order prices may be / include, but are not limited to, the lower limit price and / or upper limit price of the corresponding pending order. When the pending order is subsequently determined, the lower limit price or upper limit price is selected according to the comparison direction (since the comparison direction is used as the basis when determining the linked list, the pending order prices in the corresponding linked list nodes are generally the lower limit price or upper limit price corresponding to the comparison direction). When the comparison direction is a profit-taking buy or a stop-loss sell, the lower limit price is selected to participate in the relevant calculation processing; if the comparison direction is a profit-taking sell or a stop-loss buy, the upper limit price is selected to participate in the relevant calculation processing. It should be noted that the specific implementation method for determining the target order prices of the multiple pending orders in the target pending order binary heap queue can be determined by those skilled in the art according to actual conditions. The above description is only an example and does not constitute a limitation to this.

[0103] Through the above steps, it is possible to determine the pending orders from different price comparison directions and adopt the pending order determination method suitable for the corresponding comparison direction and relevant properties, thereby improving the overall accuracy of obtaining pending orders and thus improving the accuracy of overall pending order processing.

[0104] In an optional embodiment, if Figure 3 As shown, the target order binary heap queue based on the target node determines as pending orders the orders corresponding to the target order prices in the target order binary heap queue that are greater than or equal to the standard price and all orders in the order binary heap queues of all nodes after the target node in the order linked list. The steps include:

[0105] S301: Based on the target order binary heap queue, repeatedly execute the first de-heaping step until the target order price of the order corresponding to the top element of the target order binary heap queue is less than the standard price, wherein the first de-heaping step includes: de-heaping the top element of the target order binary heap queue to obtain a de-heaped order.

[0106] S302: Determine all the orders that have been removed from the order stack and all the orders in the order binary heap queue of all nodes after the target node in the order linked list as pending orders; wherein the target order binary heap queue is a maximum heap queue.

[0107] Exemplarily, one node corresponds to a pending order binary heap queue, and one pending order binary heap queue includes multiple pending orders with corresponding prices (if the comparison direction is profit-buying or stop-loss selling, the lower limit price of the corresponding pending order is in the corresponding price range; if the comparison direction is profit-selling or stop-loss buying, the upper limit price of the corresponding pending order is in the corresponding price range; the upper limit price and lower limit price of a certain pending order are the upper limit price and lower limit price of the expected transaction given by the customer) in the corresponding price range. Among them, the binary heap queue is an existing queue in the computer field whose element sorting conforms to a specific binary heap rule, and its properties and rules are not repeated here. It should be noted that the relevant corresponding relationship can be determined by those skilled in the art according to actual conditions. The above description is only an example and does not constitute a limitation.

[0108] Taking a max heap as an example, in a binary heap, the value of any parent element is greater than or equal to the values ​​of its left and right child elements. If the parent element's subscript in the corresponding binary heap queue is parent, then the subscript of its left child element is (2parent+1), and the subscript of its right child element is (2parent+2). Assuming n is the number of elements in the binary heap queue, the time complexity of constructing a binary heap can be, but is not limited to, O(n), and the time complexity of updating and querying it can be, but is not limited to, O(log n).

[0109] For example, performing a de-stack operation on a binary heap queue (or binary heap) is a conventional technical means in the relevant field and will not be described in detail here. In addition to extracting the element information at the top of the current queue, the de-stack operation also includes readjusting the structure of the binary heap queue to conform to the specific format or arrangement of the corresponding binary heap queue. Correspondingly, in a max heap queue, the value corresponding to the top element is the maximum value of the existing elements in the queue.

[0110] For example, a queue element corresponds to or directly represents a pending order, and its element value may be, but is not limited to, the corresponding pending order price (the lower limit price or the upper limit price, as appropriate).

[0111] For example, all nodes after the target node are as follows:

[0112] In a linked list of pending orders, there are multiple nodes in the following order: Node G, Node E, Node C, Node A, Node H, Node F, Node D, and Node B. The target node has been determined to be Node F, so all nodes after Node F include Node D and Node B. It should be noted that the properties of all nodes after the target node can be determined by those skilled in the art based on actual circumstances, and the above description is merely an example and does not constitute a limitation.

[0113] Through the above steps, when the current price comparison direction is profit-taking buying or stop-loss selling, by leveraging the advantages of the binary heap's lower computational complexity and a more refined extraction and processing process, it is possible to quickly and accurately extract the pending orders in the queue corresponding to the target node that meet the institution's processing expectations and the pending orders of other nodes in the corresponding comparison direction, thereby improving the speed and accuracy of the overall pending order processing. Among them, since the current price comparison direction is profit-taking buying or stop-loss selling, the corresponding expected pending order is a pending order with a lower limit price greater than or equal to the standard price (since the located linked list is the linked list corresponding to the comparison direction, the pending order price corresponding to the node element is the lower limit price at this time). Therefore, based on the standard price as the judgment basis, it is appropriate to directly remove the pending order elements in the binary heap queue with corresponding prices greater than or equal to the standard price to complete the pending order acquisition of the target node. Moreover, since the order of the nodes in the linked list corresponds to the overall size of their corresponding pending order prices (the corresponding pending order prices of the nodes from front to back are from small to large, which is specifically reflected in but not limited to the overall corresponding price range of the nodes from front to back from small to large, and the corresponding pending order prices in the nodes are all in the corresponding price range), then on the basis of determining the target node based on the standard price, the corresponding pending order prices of the pending orders in the nodes after the target node are definitely greater than the standard price, which is in line with the processing expectations of the institution. Therefore, it is also reasonable to determine all pending orders in the pending order binary heap queues of all nodes after the target node as pending orders.

[0114] In an optional embodiment, if Figure 4 As shown, the target order binary heap queue based on the target node determines the orders in the target order binary heap queue whose target order prices are less than the standard price and all orders in the order binary heap queues of all nodes before the target node in the order linked list as pending orders, including the following steps:

[0115] S401: Based on the target order binary heap queue, repeatedly execute the second popping step until the target order price of the order corresponding to the top element of the target order binary heap queue is greater than or equal to the standard price, wherein the second popping step includes: popping the top element of the target order binary heap queue to obtain an order that has been popped.

[0116] S402: Determine all the orders that have been removed from the order stack and all the orders in the order binary heap queue of all nodes before the target node in the order linked list as pending orders; wherein the target order binary heap queue is a minimum heap queue.

[0117] Exemplarily, one node corresponds to a pending order binary heap queue, and one pending order binary heap queue includes multiple pending orders with corresponding prices (if the comparison direction is profit-buying or stop-loss selling, the lower limit price of the corresponding pending order is in the corresponding price range; if the comparison direction is profit-selling or stop-loss buying, the upper limit price of the corresponding pending order is in the corresponding price range; the upper limit price and lower limit price of a certain pending order are the upper limit price and lower limit price of the expected transaction given by the customer) in the corresponding price range. Among them, the binary heap queue is an existing queue in the computer field whose element sorting conforms to a specific binary heap rule, and its properties and rules are not repeated here. It should be noted that the relevant corresponding relationship can be determined by those skilled in the art according to actual conditions. The above description is only an example and does not constitute a limitation.

[0118] Taking a min heap as an example, the value of any parent element is less than or equal to the values ​​of its left and right child elements. If the parent element's subscript in the corresponding binary heap queue is parent, then its left child's subscript is (2parent+1), and its right child's subscript is (2parent+2). Assuming n is the number of elements in the binary heap queue, the time complexity of constructing a binary heap can be, but is not limited to, O(n), and its time complexity of updating and querying can be, but is not limited to, O(log n).

[0119] For example, performing a de-stack operation on a binary heap queue (or binary heap) is a conventional technical means in the relevant field and will not be described in detail here. In addition to extracting the element information at the top of the current queue, the de-stack operation also includes readjusting the structure of the binary heap queue to conform to the specific format or arrangement of the corresponding binary heap queue. Correspondingly, in a minimum heap queue, the value corresponding to the top element is the minimum value of the existing elements in the queue.

[0120] For example, a queue element corresponds to or directly represents a pending order.

[0121] For example, all nodes after the target node are as follows:

[0122] In a linked list of pending orders, there are multiple nodes in the following order: Node G, Node E, Node C, Node A, Node H, Node F, Node D, and Node B. The target node has been determined to be Node F, so all nodes after Node F include Node D and Node B. It should be noted that the properties of all nodes after the target node can be determined by those skilled in the art based on actual circumstances, and the above description is merely an example and does not constitute a limitation.

[0123] Through the above steps, when the current price comparison direction is stop-loss buying or profit-selling, by leveraging the advantages of the binary heap's lower computational complexity and a more refined extraction and processing process, it is possible to quickly and accurately extract the pending orders in the queue corresponding to the target node that meet the institution's processing expectations and the pending orders of other nodes in the corresponding comparison direction, thereby improving the speed and accuracy of the overall pending order processing. Among them, since the current price comparison direction is stop-loss buying or profit-selling, the corresponding expected pending order is an order with an upper limit price less than the standard price (since the located linked list is the linked list corresponding to the comparison direction, the pending order price corresponding to the node element is the upper limit price at this time). Therefore, based on the standard price as the judgment basis, it is appropriate to directly remove the pending order elements in the binary heap queue whose corresponding price is less than the standard price to complete the pending order acquisition of the target node. Moreover, since the order of the nodes in the linked list corresponds to the overall size of their corresponding pending order prices (the corresponding pending order prices of the nodes from front to back are from small to large, which is specifically reflected in but not limited to the overall corresponding price range of the nodes from front to back from small to large, and the corresponding pending order prices in the nodes are all in the corresponding price range), then on the basis of determining the target node based on the standard price, the corresponding pending order prices of the pending orders in the nodes before the target node are definitely less than the standard price, which is in line with the processing expectations of the institution. Therefore, it is also reasonable to determine all pending orders in the pending order binary heap queues of all nodes before the target node as pending orders.

[0124] In an optional embodiment, further comprising:

[0125] After processing the pending orders, all pending orders are cleared.

[0126] Exemplarily, clearing all pending orders may include, but is not limited to, removing the order element corresponding to the pending order from the corresponding order binary heap queue. It should be noted that the specific implementation of clearing all pending orders may be determined by those skilled in the art based on actual circumstances, and the above description is merely an example and does not constitute a limitation thereto.

[0127] Through the above steps, the corresponding status of the processed pending orders can be indirectly updated more accurately, so that when the pending orders are subsequently obtained, the processing errors caused by the interference of the elements or information related to the processed pending orders will not be caused. Only the pending orders that are truly to be processed can be obtained instead of the pending orders that have been processed but the relevant records have not been cleared in time, thereby improving the accuracy and efficiency of the overall pending order processing.

[0128] In an optional implementation, determining the kth node in the pending order linked list as the current node includes:

[0129] The kth level of the pending order linked list is used as the current level, and the node pointed to by the head pointer of the current level is determined as the current node.

[0130] For example, the order list in the embodiment of the present invention may be, but is not limited to, similar to Figure 5 The multi-level skip list of the form shown. Specifically, the order list of this type of skip list has k levels. Among them:

[0131] The head pointer of the k-th level points to the k-th node of the linked list, the pointer of the k-th level corresponding to the k-th node points to the 2k-th node, the pointer of the k-th level corresponding to the 2k-th node points to the 3k-th node... and so on;

[0132] The head pointer of the k-1th level points to the k-1th node of the linked list, the pointer of the k-1th level corresponding to the k-1th node points to the kth node, the pointer of the k-1th level corresponding to the k-1th node points to the 2k-1th node, the pointer of the 2k-1th level corresponding to the k-1th node points to the 2kth node, the pointer of the 2kth node corresponding to the k-1th level points to the 3k-1th node, the pointer of the 3k-1th level corresponding to the k-1th node points to the 3kth node... and so on;

[0133] The head pointer of the k-2th level points to the k-2th node of the linked list, the pointer of the k-2th level corresponding to the k-2th node points to the k-1th node, the pointer of the k-1th level corresponding to the k-2th level points to the kth node, the pointer of the kth node corresponding to the k-2th level points to the 2k-2th node, the pointer of the 2k-2th level corresponding to the k-2th level points to the 2k-1th node, the pointer of the 2k-1th level corresponding to the k-2th level points to the 2kth node, the pointer of the 2kth node corresponding to the k-2th level points to the 3k-2th node, the pointer of the 3k-2th node corresponding to the k-2th level points to the 3k-1th node, the pointer of the 3k-1th node corresponding to the k-2th level points to the 3kth node... and so on;

[0134]

[0135] And so on

[0136] The head pointer of the first level points to the first node of the linked list. Correspondingly, in the first level, each node has a pointer to the adjacent node behind it.

[0137] Specifically, an exemplary order list is as follows: Figure 5 As shown, at this time k = 4, and the number of nodes in the order list (the number of nodes that record corresponding orders) is equal to 8, then Figure 5 As shown, the highest level of the order list is the fourth level T4, the head pointer of level T4 points to the fourth node A of the list, and the pointer of node A corresponding to level T4 points to the eighth node B;

[0138] Correspondingly, the third layer is level T3, the head pointer of level T3 points to the third node C of the linked list, the pointer of node C corresponding to level T3 points to the fourth node A, the pointer of node A corresponding to level T3 points to the seventh node D, and the pointer of node D corresponding to level T3 points to the eighth node B;

[0139] Correspondingly, the second layer is level T2, the head pointer of level T2 points to the second node E of the linked list, the pointer of node E corresponding to level T2 points to the third node C, the pointer of node C corresponding to level T2 points to the fourth node A, the pointer of node A corresponding to level T2 points to the sixth node F, the pointer of node F corresponding to level T2 points to the seventh node D, and the pointer of node D corresponding to level T2 points to the eighth node B;

[0140] Correspondingly, the first layer (the bottom layer) is layer T1, the head pointer of layer T1 points to the first node G of the linked list, the pointer of node G corresponding to layer T1 points to the second node E, the pointer of node E corresponding to layer T1 points to the third node C, the pointer of node C corresponding to layer T1 points to the fourth node A, the pointer of node A corresponding to layer T1 points to the fifth node H, the pointer of node H corresponding to layer T1 points to the sixth node F, the pointer of node F corresponding to layer T1 points to the seventh node D, and the pointer of node D corresponding to layer T1 points to the eighth node B.

[0141] It should be noted that the specific form, structure and pointer conditions of the order list can be determined by those skilled in the art according to actual conditions. The above description is only an example and does not constitute a limitation thereto.

[0142] Preferably, when the pending linked list is a multi-level skip list, the nodes representing the same binary heap queue at different levels can also be different nodes. For example, node A at level T3 and node A at level T2 can be two nodes respectively. However, both nodes also have queue positioning pointers pointing to the same corresponding binary heap queue (which can be generally understood as queue A).

[0143] Preferably, the pending linked list can also be a single-layer linked list, wherein the head pointer of the single-layer linked list points to the first node, and each node can include multiple corresponding pointers to at least point to the last node among the k nodes after the node and the previous node of the node.

[0144] For example, the kth level of the order list is used as the current level, and the node pointed to by the head pointer of the current level is determined as the current node, which can refer to but is not limited to Figure 5 ,exist Figure 5 In the order list shown, the kth level (k is 4) is level T4, so the current level is level T4, and the node pointed to by its head pointer is the fourth node in the list (node ​​A), so node A is determined as the current node. It should be noted that the specific implementation method for determining the kth level of the order list as the current level and the node pointed to by the head pointer of the current level as the current node can be determined by those skilled in the art based on actual circumstances. The above description is only an example and does not constitute a limitation.

[0145] Preferably, when the pending order linked list is a single-layer linked list, the kth node among all nodes including pending orders in the single-layer linked list may be directly determined as the current node.

[0146] Through the above steps, the relevant structural properties and traversal properties of the linked list can be fully considered, and the corresponding current node can be located more accurately and quickly based on the specific pointer, thereby improving the speed and accuracy of the overall order acquisition, and further improving the speed and accuracy of the overall order processing.

[0147] In an optional implementation, taking the last node among the k nodes after the current node as the current node includes:

[0148] The node pointed to by the pointer of the current node corresponding to the current level is determined as the updated current node.

[0149] Exemplarily, the node pointed to by the pointer of the current node corresponding to the current level is determined as the updated current node, which can refer to but is not limited to Figure 5, if the current level is level T4 and the current node is node A, then the node pointed to by the pointer of the current node corresponding to the current level is node B, and node B is determined to be the updated current node. It should be noted that the specific implementation method for determining the node pointed to by the pointer of the current node corresponding to the current level as the updated current node can be determined by those skilled in the art based on actual circumstances, and the above description is merely an example and does not constitute a limitation thereto.

[0150] Preferably, when the pending linked list is a single-layer linked list, the node in the single-layer linked list that is behind the current node and is separated from the current node by k-1 nodes may be directly used as the new current node.

[0151] For example, in this embodiment of the present invention, the standard price is no greater than the upper limit of the price range corresponding to the last node in the order list, and no less than the lower limit of the price range corresponding to the first node in the order list. It should be noted that the range of values ​​for the standard price can be determined by those skilled in the art based on actual circumstances, and the above description is merely illustrative and does not constitute a limitation.

[0152] Through the above steps, the relevant structural properties and traversal properties of the linked list can be fully considered, and the corresponding new current node can be located more accurately and quickly based on the specific pointer, thereby improving the speed and accuracy of the overall order acquisition, and further improving the speed and accuracy of the overall order processing.

[0153] In an optional implementation, taking the previous node of the current node as the current node includes:

[0154] The previous level of the current level is used as the updated current level, and the node to which the pointer pointing to the current node corresponding to the updated current level belongs is determined as the updated current node.

[0155] Exemplarily, the previous level of the current level is used as the updated current level, and the node to which the pointer pointing to the current node corresponding to the updated current level belongs is determined as the updated current node, which can refer to but is not limited to Figure 5 , if the current level is level T4 and the current node is node B, then its previous level is level T3 located below it, and the current level is re-determined to be level T3. In level T3, the node to which the pointer pointing to the current node B belongs is node D, and node D is determined as the updated current node. It should be noted that the specific implementation method of using the previous level of the current level as the updated current level and determining the node to which the pointer pointing to the current node corresponding to the updated current level belongs as the updated current node can be determined by those skilled in the art according to actual circumstances. The above description is only for example and does not constitute a limitation thereto.

[0156] Preferably, when the pending linked list is a single-layer linked list, the node in the single-layer linked list that is before the current node and adjacent to the current node can also be directly determined as the updated current node.

[0157] Through the above steps, the relevant structural properties and traversal properties of the linked list can be fully considered, and the corresponding new current node can be located more accurately and quickly based on the specific pointer, thereby improving the speed and accuracy of the overall order acquisition, and further improving the speed and accuracy of the overall order processing.

[0158] Here combined Figure 5 The linked list of pending orders shown below gives a specific example of the node search step:

[0159] The standard price is 5.802, and k = 4;

[0160] The current level is determined to be the highest level T4, and the 4th (kth) node A is located. The price range corresponding to node A is (xxx, 4.895]. It can be seen that the standard price does not match the price range corresponding to node A and is greater than the upper limit of the price range. Then jump to the 8th node B (the last node among the last k nodes relative to node A), and the price range corresponding to node B is (6.895, xxx]. It can be seen that the standard price does not match the price range corresponding to node B and is not greater than the lower limit of the price range.

[0161] Move the current level down to the third level T3, go back to node A, and then locate the seventh node D pointed to by it (the previous node of node B, whose pointer points to node B). The price range corresponding to node D is (6.108, 6.895]. It can be seen that the standard price does not match the price range corresponding to node D and is not greater than the lower limit of the price range.

[0162] Move the current level down to the second level T2, back to node A, and then locate the sixth node F pointed to by it (the previous node of node D, whose pointer points to node D). The price range corresponding to node F is (5.616, 6.108]. It can be seen that the standard price is consistent with the price range corresponding to node F, and node F is located as the target node.

[0163] Furthermore, if the linked list is a single-layer linked list, here is another specific example of the node search step:

[0164] The standard price is 5.802, and k = 4;

[0165] In the order list, the nodes corresponding to pending orders are, in order, Node G, Node E, Node C, Node A, Node H, Node F, Node D, and Node B. Node G is the first node, and the kth node, which is the current node, is Node A, the fourth node. The price range corresponding to Node A is (xxx, 4.895]. This shows that the standard price does not match the price range corresponding to Node A and is greater than the upper limit of the price range. Therefore, Node B, the last of the k nodes after Node A, is selected as the current node.

[0166] The price range corresponding to node B is (6.895, xxx]. It can be seen that the standard price does not match the price range corresponding to node B and is not greater than the lower limit of the price range. The previous node D of the current node B is used as the current node.

[0167] The price range corresponding to node D is (6.108, 6.895]. It can be seen that the standard price does not match the price range corresponding to node D and is not greater than the lower limit of the price range. The previous node F of the current node D is used as the current node.

[0168] The price range corresponding to node F is (5.616, 6.108]. It can be seen that the standard price is consistent with the price range corresponding to node D, and node F is determined as the target node.

[0169] It should be noted that the specific implementation method of node search can be determined by those skilled in the art according to actual conditions. The above description is only an example and does not constitute a limitation thereto.

[0170] For example, the number of levels k and the number of nodes corresponding to pending orders in the linked list (since one node corresponds to one pending order queue, the number of binary heap queues of pending orders corresponding to the linked list, which can be represented by n here) can be determined by those skilled in the art based on actual conditions, and the embodiment of the present invention does not impose any restrictions. Among them, the size relationship between n and k can be, but is not limited to, n>>k. Since the number of corresponding pointers for each node will increase accordingly, the larger k is, the greater the space complexity will be when the linked list is a skip list, but the time to locate the target node will be shorter. For example, Figure 5 Taking the linked list shown as an example, it takes 4 time units to find the target node F, while if k=1, it takes 6 time units. If the order queue to be located (corresponding to the target node) is in the second half of the entire linked list, the time complexity can be reduced even more. In the ideal case, it can reach log kn, but if k is only equal to 1, the time complexity will be as high as n. In practical applications, k is preferably taken as 32, which can be balanced and adjusted according to the actual space occupancy and time efficiency of the current production environment. The value of the number of order nodes n needs to be determined based on the number of relevant order histories. Generally speaking, the number of order nodes n determined is preferably such that the number of order elements in the queue corresponding to each node in the linked list is between 100 and 500. It can be seen that by repeatedly executing the node search step in the embodiment of the present invention, the time required to obtain the expected order can be greatly reduced, thereby greatly improving the speed of obtaining the expected order, and there is no need to perform frequent comparisons, and batch acquisition can be achieved, thereby improving the speed and efficiency of the overall order processing.

[0171] It should be noted that the quantitative relationship between the number of levels k and the number of nodes corresponding to the pending orders in the linked list (since one node corresponds to one pending order queue, the number of binary heap queues of pending orders corresponding to the linked list, which can be represented by n here) can be determined by technical personnel in this field according to actual conditions. The above description is only an example and does not constitute a limitation to this.

[0172] In an optional embodiment, further comprising:

[0173] Before determining the corresponding order list,

[0174] Based on multiple optional product type information, a preset risk measurement model and a preset number of queues, multiple price ranges corresponding to the optional product type information are obtained, and based on the multiple price ranges and pending orders, corresponding multiple pending order linked lists are formed.

[0175] For example, the optional product type information includes or corresponds to, but is not limited to, optional product order type information and product property type information. It should be noted that the specific content of the optional product type information can be determined by those skilled in the art based on actual circumstances, and the above description is merely an example and does not constitute a limitation thereto.

[0176] Exemplarily, the risk measurement model may be, but is not limited to, a VAR model, etc., wherein the VAR model is specifically used in the financial field and can estimate the price of each pending order product provided by each financial institution for a period of time in the future. The model can output a normal distribution graph of the price of each product for a period of time in the future through historical simulation or Monte Carlo, and can output the average value u and standard deviation δ of the distribution graph. According to the corresponding standard normal distribution probability table of the distribution graph and the configurable queue number parameter n (corresponding to the number of nodes in the subsequent generated linked list, that is, the number of pending order queues corresponding to the linked list), the interval value of each queue is obtained, and the distribution probability within each interval is 1 / n. It should be noted that the specific type and nature of the risk measurement model can be determined by those skilled in the art according to actual conditions. The above description is only an example and does not constitute a limitation.

[0177] For example, the number of queues can be determined by those skilled in the art based on actual circumstances, and the present invention does not impose any limitations thereon. The specific nature of the number of queues can be referenced, but not limited to, the description of the quantitative relationship between the number of levels k and the number of nodes corresponding to order placement in the linked list (since one node corresponds to one order placement queue, this refers to the number of binary heap queues corresponding to the linked list, represented by n), which will not be further elaborated here.

[0178] Through the above steps, existing pending orders can be sorted in advance to obtain a pending order list that accurately corresponds to product type information and price comparison direction, thereby preparing for the subsequent process of obtaining specific pending orders and performing specific processing according to institutional expectations, indirectly improving the speed and accuracy of the overall pending order processing.

[0179] In an optional embodiment, obtaining multiple price ranges corresponding to the optional product type information based on multiple optional product type information, a preset risk measurement model, and a preset number of queues includes:

[0180] Obtaining estimated normal distribution information corresponding to the optional product type information based on the product information corresponding to the optional product type information and the risk measurement model;

[0181] Based on the estimated normal distribution information and the number of queues, the corresponding price range is obtained; wherein, the estimated normal distribution information includes multiple estimated product prices corresponding to the optional product type information, and the estimated product prices corresponding to the optional product type information have the same probability of falling into the corresponding different price ranges, and the price ranges correspond one-to-one to the pending order binary heap queues, and the pending order binary heap queues correspond one-to-one to the nodes in the pending order linked list.

[0182] Exemplarily, the product information corresponding to the optional product type information and the risk measurement model are used to obtain the estimated normal distribution information corresponding to the optional product type information. This can be, but is not limited to, inputting the product information into the risk measurement model for computational processing to obtain the corresponding estimated normal distribution information. The product information includes, but is not limited to, product change information or risk factor information such as exchange rates and interest rates of the products corresponding to the optional product type information, and the estimated normal distribution information includes, but is not limited to, the estimated price normal distribution (generally, standard normal distribution u) information of the corresponding pending order products in a certain period of time in the future. It should be noted that the specific implementation method of obtaining the estimated normal distribution information corresponding to the optional product type information based on the product information corresponding to the optional product type information and the risk measurement model, the nature of the product information, and the nature of the estimated normal distribution information can be determined by those skilled in the art according to actual conditions. The above description is only an example and does not constitute a limitation.

[0183] Exemplarily, the corresponding price range is obtained based on the estimated normal distribution information and the number of queues. It can also be realized by performing relevant calculations and processing through, but not limited to, the corresponding risk measurement model. With the normal distribution information and the number of queues as input, a risk measurement model (such as a VAR model) is used to calculate the corresponding multiple price ranges. This is a general process. For details, please refer to the standard normal distribution probability table related to the VAR model, which will not be described here. Among them, the probability distribution interval corresponding to each price range is the same. It should be noted that the specific implementation method for obtaining the corresponding price range based on the estimated normal distribution information and the number of queues can be determined by those skilled in the art according to actual conditions. The above description is only an example and does not constitute a limitation.

[0184] Through the above steps, we can fully utilize the risk measurement model's ability to accurately estimate the corresponding price distribution, so that the price range corresponds to the prediction result of the risk measurement model, which is conducive to making the number of pending orders allocated to each price range more uniform when establishing the corresponding linked list based on the allocation of pending orders based on the price range, thereby making the number of pending order elements in the subsequent corresponding binary heap queue (corresponding node) more uniform, and thus indirectly reducing the complexity of calculation in the subsequent pending order acquisition process, and thus improving the overall order acquisition speed.

[0185] Correspondingly, in this scenario, since customer orders are basically placed around the middle price, whether it is the lower limit or the upper limit of the customer's expected order price, its distribution is basically consistent with the output of the corresponding risk measurement model. Therefore, the output of the risk measurement model can be directly reused for calculation to make the number of orders in each queue in the later stage as even as possible. For example, the difference in the number of orders within a certain node in the subsequent linked list will be small in the future, and no extreme value will appear.

[0186] In a preferred embodiment, the forming of corresponding multiple order chain lists based on the multiple price ranges and pending orders includes:

[0187] Determining the number of levels k based on the number of queues;

[0188] Determining expected price comparison directions corresponding to the pending orders, and determining pending orders with expected price comparison directions of profit-taking buy and stop-loss selling as a plurality of first pending orders to be inserted, and determining pending orders with expected price comparison directions of stop-loss buying or profit-taking sell as a plurality of second pending orders to be inserted;

[0189] forming a plurality of nodes corresponding to the price range, and arranging the nodes in ascending order of the lower limit or the upper limit of the corresponding price range to form a corresponding first initial order chain list, wherein the nodes of the first initial order chain list correspond to a preset first order binary heap queue, and the first order binary heap queue is a maximum heap queue;

[0190] Using the lower limit price of the first pending order as the corresponding first pending order price, and inserting the first pending order into the first pending order binary heap queue in the price range corresponding to the first pending order price in the first initial pending order linked list, thereby obtaining a pending order linked list corresponding to expected price comparison directions of profit-taking buy and stop-loss sell;

[0191] Arranging the nodes in ascending order of the lower limit or the upper limit of the corresponding price range to form a corresponding second initial order list, wherein the nodes of the second initial order list correspond to a preset second order binary heap queue, and the second order binary heap queue is a minimum heap queue;

[0192] The upper limit price of the second pending order to be inserted is used as the corresponding second pending order price, and the second pending order to be inserted is inserted into the second pending order binary heap queue in the price range corresponding to the second pending order price in the second initial pending order linked list, to obtain a pending order linked list corresponding to the expected price comparison direction of stop-loss buying or profit-selling.

[0193] For example, the specific implementation method for determining the number of levels k based on the number of queues can be determined by those skilled in the art according to actual circumstances, and the embodiments of the present invention do not limit this. The specific properties and principles can be referred to the description of the quantitative relationship between the number of levels k and the number of nodes corresponding to the order placement in the linked list in the embodiments of the present invention (since one node corresponds to one order placement queue, this is also the number of order placement binary heap queues corresponding to the linked list, which can be represented by n here), and will not be repeated here.

[0194] Exemplarily, determining the expected price comparison direction corresponding to the pending order may include, but is not limited to, parsing the pending order or related customer request information corresponding to the pending order to determine the expected price comparison direction corresponding to the pending order. The expected price comparison direction may include, but is not limited to, the price comparison direction corresponding to the customer's desired processing method for their pending order. It should be noted that the specific implementation method for determining the expected price comparison direction corresponding to the pending order and the nature of the expected price comparison direction can be determined by those skilled in the art based on actual circumstances, and the above description is merely illustrative and does not constitute a limitation thereto.

[0195] For example, the formation of multiple nodes corresponding to the price range may be, but is not limited to, forming multiple nodes corresponding to the price range by forming linked list nodes. It should be noted that the specific implementation of forming multiple nodes corresponding to the price range can be determined by those skilled in the art based on actual circumstances, and the above description is merely an example and does not constitute a limitation.

[0196] Exemplarily, the arrangement of the nodes in ascending order of the lower limit or upper limit of the corresponding price range to form the corresponding first initial order list may be, but is not limited to, arranging the nodes in ascending order of the lower limit or upper limit of the corresponding price range and then performing relevant processing to form a similar order list. Figure 5 The multi-level skip list with k levels in the structure shown is the first initial order list, or the corresponding single-level linked list is the first initial order list. When the first initial order list is a multi-level adjustment list, its structure can be, but is not limited to:

[0197] The head pointer of the k-th level points to the k-th node of the linked list, the pointer of the k-th level corresponding to the k-th node points to the 2k-th node, the pointer of the k-th level corresponding to the 2k-th node points to the 3k-th node... and so on;

[0198] The head pointer of the k-1th level points to the k-1th node of the linked list, the pointer of the k-1th level corresponding to the k-1th node points to the kth node, the pointer of the k-1th level corresponding to the k-1th node points to the 2k-1th node, the pointer of the 2k-1th level corresponding to the k-1th node points to the 2kth node, the pointer of the 2kth node corresponding to the k-1th level points to the 3k-1th node, the pointer of the 3k-1th level corresponding to the k-1th node points to the 3kth node... and so on;

[0199] The head pointer of the k-2th level points to the k-2th node of the linked list, the pointer of the k-2th level corresponding to the k-2th node points to the k-1th node, the pointer of the k-1th level corresponding to the k-2th level points to the kth node, the pointer of the kth node corresponding to the k-2th level points to the 2k-2th node, the pointer of the 2k-2th level corresponding to the k-2th level points to the 2k-1th node, the pointer of the 2k-1th level corresponding to the k-2th level points to the 2kth node, the pointer of the 2kth node corresponding to the k-2th level points to the 3k-2th node, the pointer of the 3k-2th node corresponding to the k-2th level points to the 3k-1th node, the pointer of the 3k-1th node corresponding to the k-2th level points to the 3kth node... and so on;

[0200]

[0201] And so on

[0202] The head pointer of the first level points to the first node of the linked list. Correspondingly, in the first level, each node has a pointer to the adjacent node behind it.

[0203] Among them, when the first initial pending order linked list is a single-layer linked list, its head pointer points to the first node after arrangement, and each corresponding node except the first node and the last node after arrangement includes at least a pointer to the last node among the last k nodes of the corresponding node and a pointer to the previous node of the corresponding node; and the first node after arrangement includes at least a pointer to the last node among the last k nodes after the first node, and the last node after arrangement includes at least a pointer to the previous node of the last node.

[0204] It should be noted that the specific implementation method of arranging the nodes in ascending order according to the lower limit or upper limit of the corresponding price range to form the corresponding first initial order list and the structural properties of the first initial order list can be determined by those skilled in the art based on actual conditions. The above description is only an example and does not constitute a limitation to this.

[0205] Exemplarily, the specific principle of arranging the nodes in ascending order according to the lower limit or upper limit of the corresponding price range to form the corresponding second initial order list, as well as the properties and structure of the second initial order list, can be referred to the description of the steps of arranging the nodes in ascending order according to the lower limit or upper limit of the corresponding price range to form the corresponding first initial order list in the embodiment of the present invention, which will not be repeated here.

[0206] For example, a pending order linked list corresponds to a specific product pending order type information and a specific price comparison direction.

[0207] Through the above steps, the corresponding pending order list can be formed more accurately, more meticulously and more detailed, making the hierarchical structure of the pending order list clearer and the corresponding nodes can be accurately mapped to the pending orders in the corresponding price range and arranged in the corresponding order, thereby improving the comprehensiveness, accuracy and ease of use of the formed pending order list, thereby indirectly improving the speed and accuracy of the overall pending order processing.

[0208] In a preferred embodiment, inserting the first pending order to be inserted into the first pending order binary heap queue in the price range corresponding to the first pending order price in the first initial pending order linked list includes:

[0209] Determine the kth node in the first initial order list as the first positioning node;

[0210] Repeat the step of locating the first node until the insertion of the first pending order to be inserted is completed, wherein the step of locating the first node includes: judging whether the price range of the first pending order binary stack queue corresponding to the first positioning node is consistent with the first pending order price of the first pending order to be inserted; if so, inserting the first pending order to be inserted into the first pending order binary stack queue corresponding to the first positioning node; if not, judging whether the first pending order price of the first pending order to be inserted is greater than the upper limit of the price range of the first pending order binary stack queue corresponding to the first positioning node; if so, taking the last node among the last k nodes of the first positioning node as the first positioning node; if not, taking the previous node of the first positioning node as the first positioning node.

[0211] For example, based on determining whether the binary heap queue is a minimum heap queue or a maximum heap queue, inserting corresponding data into the binary heap queue is a conventional technical means in the art and will not be described in detail here. Among them, the process of inserting the pending order into the binary heap queue not only includes filling the pending order into the corresponding binary heap queue, but also includes at least the process of the binary heap queue adjusting the order of the binary heap queue elements and the binary heap queue structure according to the price value of the pending order element after receiving the new pending order element so that it conforms to the characteristics of the binary heap structure (existing means).

[0212] Exemplarily, the specific principles of determining the kth node in the first initial order list as the first positioning node and repeating the step of locating the first node can refer to the description of the content of the specific example of the node search step in the embodiment of the present invention and determining the kth node in the order list as the current node. Based on the order list, the node search step is repeated until the target node corresponding to the preset standard price is determined. The node search step includes: judging whether the price range of the order binary heap queue corresponding to the current node is consistent with the standard price. If it is consistent, the current node is determined as the target node; if it is not consistent, judging whether the standard price is greater than the upper limit of the price range. If it is, the last node among the last k nodes of the current node is used as the current node. If it is not, the description of the step of using the previous node of the current node as the current node will not be repeated here.

[0213] Through the above steps, the speed and accuracy of locating nodes can be improved, and the corresponding orders can be quickly and accurately inserted into the appropriate nodes, thereby improving the speed and accuracy of the overall formation of the order list, and further improving the speed and accuracy of the overall order processing.

[0214] In a preferred embodiment, inserting the second pending order to be inserted into the second pending order binary heap queue in the price range corresponding to the second pending order price in the second initial pending order linked list includes:

[0215] Determine the kth node in the second initial order list as the second positioning node;

[0216] Repeat the step of locating the second node until the insertion of the second pending order to be inserted is completed, wherein the step of locating the second node includes: judging whether the price range of the second pending order binary stack queue corresponding to the second positioning node is consistent with the second pending order price of the second pending order to be inserted; if so, inserting the second pending order to be inserted into the second pending order binary stack queue corresponding to the second positioning node; if not, judging whether the second pending order price of the second pending order to be inserted is greater than the second pending order binary stack queue corresponding to the second positioning node.

[0217] The upper limit of the price range of the column, if it is greater than, the last node among the k nodes after the second positioning node is used as the 5th second positioning node, if it is not greater than, the node before the second positioning node is used as the second positioning node.

[0218] For example, based on determining whether the binary heap queue is a minimum heap queue or a maximum heap queue, inserting the corresponding data into the binary heap queue is a conventional technical means in this field, which will not be described here. Among them, the process of inserting the pending order into the binary heap queue not only includes filling the pending order into the corresponding binary heap queue, but also includes at least the binary heap queue.

[0219] The column is a process (existing means) of adjusting the order 0 of the binary heap queue element and the binary heap queue structure according to the price value of the new order element after receiving the new order element so that it conforms to the characteristics of the binary heap structure.

[0220] For example, the specific principle of determining the kth node in the second initial order list as the second positioning node and repeating the second node positioning step can refer to the description of the specific example of the node search step in the embodiment of the present invention and determining the kth node in the order list as the current node, based on

[0221] The pending order linked list repeatedly executes the node search step until the target node 5 corresponding to the preset standard price is determined. The node search step includes: judging whether the price range of the pending order binary heap queue corresponding to the current node is consistent with the standard price. If it is consistent, the current node is determined as the target node; if it is not consistent, judging whether the standard price is greater than the upper limit of the price range. If it is, the last node among the last k nodes of the current node is used as the current node. If it is not, the previous node of the current node is used as the current node. The description of the step will not be repeated here.

[0222] Through the above steps, the speed and accuracy of locating nodes can be improved, and the corresponding pending orders can be quickly and accurately inserted into the appropriate nodes, thereby improving the speed and accuracy of the overall formation of the pending order chain list, and further improving the speed and accuracy of the overall pending order processing.

[0223] Based on the same principle, the embodiment of the present invention discloses a financial product pending order processing device 600, such as Figure 6 As shown, the financial product pending order processing device 600 includes:

[0224] 5. Link list positioning module 601, used to determine the corresponding pending order link list according to the current product type information and the current price comparison direction, wherein the pending order link list includes k levels;

[0225] The node search module 602 is configured to determine the kth node in the pending order list as the current node, and repeatedly perform the node search step based on the pending order list until a target node corresponding to a preset standard price is determined. The node search step includes: determining whether the price range of the pending order binary heap queue corresponding to the current node is consistent with the standard price; if so, determining the current node as the target node; if not, determining whether the standard price is greater than the upper limit of the price range; if so, determining the last node among the k nodes after the current node as the current node; if not, determining the node immediately preceding the current node as the current node;

[0226] The pending order processing module 603 is used to determine, based on the target node and the standard price, multiple pending orders in the target pending order binary heap queue of the target node corresponding to the current price comparison direction and all pending orders in the pending order binary heap queue of multiple nodes corresponding to the current price comparison direction in the pending order linked list as pending orders to be processed, and process the pending orders.

[0227] In an optional embodiment, the linked list positioning module 601 is used to:

[0228] According to the current product type information, obtain product pending order type information and product property type information;

[0229] The corresponding order list is determined based on the product order type information, product nature type information and current price comparison direction; wherein the order of multiple nodes in the order list is in ascending order according to the lower limit or upper limit of the corresponding price range.

[0230] In an optional implementation, the node search module 602 is configured to:

[0231] Determining whether the standard price is greater than a lower limit of the price range and less than or equal to an upper limit of the price range, wherein the price ranges corresponding to the multiple nodes in the pending order list do not intersect;

[0232] If so, determining the current node as the target node;

[0233] If not, determine whether the standard price is greater than the upper limit of the price range. If so, use the last node among the last k nodes of the current node as the current node. If not, use the node before the current node as the current node.

[0234] In an optional embodiment, the pending order processing module 603 is configured to:

[0235] Determining target order prices for multiple orders in the target order binary heap queue;

[0236] When the current price comparison direction is a profit-taking buy or a stop-loss sell, based on the target order binary stack queue of the target node, all orders in the target order binary stack queue whose target order prices are greater than or equal to the standard price and all orders in the order binary stack queues of all nodes after the target node in the order linked list are determined as pending orders;

[0237] When the current price comparison direction is stop-loss buying or profit-selling, based on the target order binary stack queue of the target node, all orders in the target order binary stack queue whose corresponding target order price is less than the standard price and all orders in the order binary stack queues of all nodes before the target node in the order linked list are determined as pending orders.

[0238] In an optional embodiment, the pending order processing module 603 is configured to:

[0239] Based on the target order binary heap queue, repeatedly performing the first popping step until the target order price of the order corresponding to the top element of the target order binary heap queue is less than the standard price, wherein the first popping step includes: popping the top element of the target order binary heap queue to obtain a popped order;

[0240] All the orders that have been placed out of the order stack and all the orders in the order binary stack queue of all nodes after the target node in the order linked list are determined as pending orders; wherein, the target order binary stack queue is a maximum stack queue.

[0241] In an optional embodiment, the pending order processing module 603 is configured to:

[0242] Based on the target order binary heap queue, repeatedly performing the second popping step until the target order price of the order corresponding to the top element of the target order binary heap queue is greater than or equal to the standard price, wherein the second popping step includes: popping the top element of the target order binary heap queue to obtain a popped order;

[0243] All the orders that have been placed out of the order stack and all the orders in the order binary heap queue of all nodes before the target node in the order linked list are determined as pending orders; wherein, the target order binary heap queue is a minimum heap queue.

[0244] In an optional embodiment, the system further includes a clearing module for:

[0245] After processing the pending orders, all pending orders are cleared.

[0246] In an optional implementation, the node search module 602 is configured to:

[0247] The kth level of the pending order linked list is used as the current level, and the node pointed to by the head pointer of the current level is determined as the current node.

[0248] In an optional implementation, the node search module 602 is configured to:

[0249] The node pointed to by the pointer of the current node corresponding to the current level is determined as the updated current node.

[0250] In an optional implementation, the node search module 602 is configured to:

[0251] The previous level of the current level is used as the updated current level, and the node to which the pointer pointing to the current node corresponding to the updated current level belongs is determined as the updated current node.

[0252] In an optional embodiment, the system further includes a pending order linked list construction module, which is used to:

[0253] Before determining the corresponding order list,

[0254] Based on multiple optional product type information, a preset risk measurement model and a preset number of queues, multiple price ranges corresponding to the optional product type information are obtained, and based on the multiple price ranges and pending orders, corresponding multiple pending order linked lists are formed.

[0255] In an optional embodiment, the pending order linked list construction module is used to:

[0256] Obtaining estimated normal distribution information corresponding to the optional product type information based on the product information corresponding to the optional product type information and the risk measurement model;

[0257] Based on the estimated normal distribution information and the number of queues, the corresponding price range is obtained; wherein, the estimated normal distribution information includes multiple estimated product prices corresponding to the optional product type information, and the estimated product prices corresponding to the optional product type information have the same probability of falling into the corresponding different price ranges, and the price ranges correspond one-to-one to the pending order binary heap queues, and the pending order binary heap queues correspond one-to-one to the nodes in the pending order linked list.

[0258] In a preferred embodiment, the pending order linked list construction module is used to:

[0259] Determining the number of levels k based on the number of queues;

[0260] Determining expected price comparison directions corresponding to the pending orders, and determining pending orders with expected price comparison directions of profit-taking buy and stop-loss selling as a plurality of first pending orders to be inserted, and determining pending orders with expected price comparison directions of stop-loss buying or profit-taking sell as a plurality of second pending orders to be inserted;

[0261] forming a plurality of nodes corresponding to the price range, and arranging the nodes in ascending order of the lower limit or the upper limit of the corresponding price range to form a corresponding first initial order chain list, wherein the nodes of the first initial order chain list correspond to a preset first order binary heap queue, and the first order binary heap queue is a maximum heap queue;

[0262] Using the lower limit price of the first pending order as the corresponding first pending order price, and inserting the first pending order into the first pending order binary heap queue in the price range corresponding to the first pending order price in the first initial pending order linked list, thereby obtaining a pending order linked list corresponding to expected price comparison directions of profit-taking buy and stop-loss sell;

[0263] Arranging the nodes in ascending order of the lower limit or the upper limit of the corresponding price range to form a corresponding second initial order list, wherein the nodes of the second initial order list correspond to a preset second order binary heap queue, and the second order binary heap queue is a minimum heap queue;

[0264] The upper limit price of the second pending order to be inserted is used as the corresponding second pending order price, and the second pending order to be inserted is inserted into the second pending order binary heap queue in the price range corresponding to the second pending order price in the second initial pending order linked list, to obtain a pending order linked list corresponding to the expected price comparison direction of stop-loss buying or profit-selling.

[0265] In a preferred embodiment, the pending order linked list construction module is used to:

[0266] Determine the kth node in the first initial order list as the first positioning node;

[0267] Repeat the step of locating the first node until the insertion of the first pending order to be inserted is completed, wherein the step of locating the first node includes: judging whether the price range of the first pending order binary stack queue corresponding to the first positioning node is consistent with the first pending order price of the first pending order to be inserted; if so, inserting the first pending order to be inserted into the first pending order binary stack queue corresponding to the first positioning node; if not, judging whether the first pending order price of the first pending order to be inserted is greater than the upper limit of the price range of the first pending order binary stack queue corresponding to the first positioning node; if so, taking the last node among the last k nodes of the first positioning node as the first positioning node; if not, taking the previous node of the first positioning node as the first positioning node.

[0268] In a preferred embodiment, the pending order linked list construction module is used to:

[0269] Determine the kth node in the second initial order list as the second positioning node;

[0270] Repeat the step of locating the second node until the insertion of the second pending order to be inserted is completed, wherein the step of locating the second node includes: judging whether the price range of the second pending order binary stack queue corresponding to the second positioning node is consistent with the second pending order price of the second pending order to be inserted; if so, inserting the second pending order to be inserted into the second pending order binary stack queue corresponding to the second positioning node; if not, judging whether the second pending order price of the second pending order to be inserted is greater than the upper limit of the price range of the second pending order binary stack queue corresponding to the second positioning node; if so, taking the last node among the last k nodes of the second positioning node as the second positioning node; if not, taking the previous node of the second positioning node as the second positioning node.

[0271] Since the principle of solving the problem by the financial product pending order processing device 600 is similar to that of the above method, the implementation of the financial product pending order processing device 600 can refer to the implementation of the above method, which will not be repeated here.

[0272] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer device. Specifically, the computer device may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0273] In a typical example, a computer device specifically includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the method described above is implemented.

[0274] Reference below Figure 7 , which shows a schematic structural diagram of a computer device 700 suitable for implementing an embodiment of the present application.

[0275] like Figure 7As shown, computer device 700 includes a central processing unit (CPU) 701, which can perform various appropriate tasks and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage portion 708 into a random access memory (RAM) 703. Various programs and data required for the operation of system 700 are also stored in RAM 703. CPU 701, ROM 702, and RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to bus 704.

[0276] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, and the like; an output section 707 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 708 including devices such as a hard disk; and a communication section 709 including a network interface card such as a LAN card or a modem. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. Removable media 711, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 710 as needed, so that computer programs read therefrom can be installed in the storage section 708 as needed.

[0277] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program including program code for executing the methods illustrated in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 709 and / or installed from removable media 711.

[0278] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0279] For the convenience of description, the above devices are described as being divided into various units according to their functions. Of course, when implementing this application, the functions of each unit can be implemented in the same or multiple software and / or hardware.

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

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

[0282] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0283] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "includes a..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

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

[0285] The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communications network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0286] The various embodiments in this specification are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the description of the method embodiments.

[0287] The foregoing is merely an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.

Claims

1. A method for processing pending orders for financial products, characterized in that: include: Determine a corresponding order list based on the current product type information and the current price comparison direction, wherein the order list includes k levels; The kth node in the pending order linked list is determined as the current node. Based on the pending order linked list, the node search step is repeatedly performed until a target node corresponding to a preset standard price is determined. The node search step includes: determining whether a price range of a pending order binary heap queue corresponding to the current node is consistent with the standard price. If so, the current node is determined as the target node; if not, determining whether the standard price is greater than an upper limit of the price range. If so, the last node among the k nodes after the current node is determined as the current node. If not, the node before the current node is determined as the current node. Based on the target node and the standard price, multiple orders in the target order binary heap queue of the target node corresponding to the current price comparison direction and all orders in the order binary heap queues of multiple nodes in the order linked list corresponding to the current price comparison direction are determined as pending orders, and the pending orders are processed.

2. The method according to claim 1, characterized in that Determining the corresponding pending order list based on the current product type information and the current price comparison direction includes: According to the current product type information, obtain product pending order type information and product property type information; The corresponding order list is determined based on the product order type information, product nature type information and current price comparison direction; wherein the order of multiple nodes in the order list is in ascending order according to the lower limit or upper limit of the corresponding price range.

3. The method according to claim 1, characterized in that The determining whether the price range of the order binary heap queue corresponding to the current node is consistent with the standard price includes: Determining whether the standard price is greater than a lower limit of the price range and less than or equal to an upper limit of the price range, wherein the price ranges corresponding to the multiple nodes in the pending order list do not intersect; If so, determining the current node as the target node; If not, determine whether the standard price is greater than the upper limit of the price range. If so, use the last node among the last k nodes of the current node as the current node. If not, use the node before the current node as the current node.

4. The method according to claim 2, characterized in that The step of determining, based on the target node and the standard price, multiple orders in the target order binary heap queue of the target node corresponding to the current price comparison direction and all orders in the order binary heap queues of multiple nodes in the order linked list corresponding to the current price comparison direction as pending orders includes: Determining target order prices for multiple orders in the target order binary heap queue; When the current price comparison direction is a profit-taking buy or a stop-loss sell, based on the target order binary stack queue of the target node, all orders in the target order binary stack queue whose target order prices are greater than or equal to the standard price and all orders in the order binary stack queues of all nodes after the target node in the order linked list are determined as pending orders; When the current price comparison direction is stop-loss buying or profit-selling, based on the target order binary stack queue of the target node, all orders in the target order binary stack queue whose corresponding target order price is less than the standard price and all orders in the order binary stack queues of all nodes before the target node in the order linked list are determined as pending orders.

5. The method according to claim 4, characterized in that The target order binary heap queue based on the target node determines as pending orders the orders corresponding to target order prices greater than or equal to the standard price in the target order binary heap queue and all orders in the order binary heap queues of all nodes after the target node in the order linked list. Based on the target order binary heap queue, repeatedly performing the first popping step until the target order price of the order corresponding to the top element of the target order binary heap queue is less than the standard price, wherein the first popping step includes: popping the top element of the target order binary heap queue to obtain a popped order; All the orders that have been placed out of the order stack and all the orders in the order binary stack queue of all nodes after the target node in the order linked list are determined as pending orders; wherein, the target order binary stack queue is a maximum stack queue.

6. The method according to claim 4, characterized in that The target order binary heap queue based on the target node determines as pending orders the orders corresponding to target order prices less than the standard price in the target order binary heap queue and all orders in the order binary heap queues of all nodes before the target node in the order linked list. Based on the target order binary heap queue, repeatedly performing the second popping step until the target order price of the order corresponding to the top element of the target order binary heap queue is greater than or equal to the standard price, wherein the second popping step includes: popping the top element of the target order binary heap queue to obtain a popped order; All the orders that have been placed out of the order stack and all the orders in the order binary heap queue of all nodes before the target node in the order linked list are determined as pending orders; wherein, the target order binary heap queue is a minimum heap queue.

7. The method according to claim 1, characterized in that Further including: After processing the pending orders, all pending orders are cleared.

8. The method according to claim 1, characterized in that Determining the kth node in the pending order linked list as the current node includes: The kth level of the pending order linked list is used as the current level, and the node pointed to by the head pointer of the current level is determined as the current node.

9. The method according to claim 8, characterized in that The step of taking the last node among the k nodes following the current node as the current node includes: The node pointed to by the pointer of the current node corresponding to the current level is determined as the updated current node.

10. The method according to claim 8, characterized in that The step of taking the previous node of the current node as the current node includes: The previous level of the current level is used as the updated current level, and the node to which the pointer pointing to the current node corresponding to the updated current level belongs is determined as the updated current node.

11. The method according to claim 1, wherein Further including: Before determining the corresponding order list, Based on multiple optional product type information, a preset risk measurement model and a preset number of queues, multiple price ranges corresponding to the optional product type information are obtained, and based on the multiple price ranges and pending orders, corresponding multiple pending order linked lists are formed.

12. The method according to claim 11, characterized in that The obtaining of multiple price ranges corresponding to the optional product type information based on the multiple optional product type information, a preset risk measurement model, and a preset number of queues includes: Obtaining estimated normal distribution information corresponding to the optional product type information based on the product information corresponding to the optional product type information and the risk measurement model; Based on the estimated normal distribution information and the number of queues, the corresponding price range is obtained; wherein, the estimated normal distribution information includes multiple estimated product prices corresponding to the optional product type information, and the estimated product prices corresponding to the optional product type information have the same probability of falling into the corresponding different price ranges, and the price ranges correspond one-to-one to the pending order binary heap queues, and the pending order binary heap queues correspond one-to-one to the nodes in the pending order linked list.

13. A financial product pending order processing device, characterized in that: include: A linked list positioning module is used to determine the corresponding pending order linked list based on the current product type information and the current price comparison direction, wherein the pending order linked list includes k levels; A node search module is configured to determine the kth node in the pending order linked list as the current node, and repeatedly perform node search steps based on the pending order linked list until a target node corresponding to a preset standard price is determined, wherein the node search steps include: determining whether a price range of a pending order binary heap queue corresponding to the current node is consistent with the standard price; if so, determining the current node as the target node; if not, determining whether the standard price is greater than an upper limit of the price range; if so, determining the last node among the k nodes after the current node as the current node; if not, determining the node immediately preceding the current node as the current node; The pending order processing module is used to determine, based on the target node and the standard price, multiple pending orders in the target pending order binary heap queue of the target node corresponding to the current price comparison direction and all pending orders in the pending order binary heap queue of multiple nodes corresponding to the current price comparison direction in the pending order linked list as pending orders to be processed, and process the pending orders.

14. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method according to any one of claims 1 to 12 is implemented.

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

Citation Information

Patent Citations

  • Deal-matching method and device

    CN109409990A

  • Value judgment method and device for blockchain token

    CN111583035A