Quote cluster management method, transaction system and storage medium

By introducing a distributed collaborative server to use temporary nodes to determine the operating status of the transaction system, the problem of increasing the system load when judging the operating status of the transaction system is solved, and the accuracy of the reporting status is achieved without increasing the load is achieved. Survived and optimized system performance.

CN114493860BActive Publication Date: 2025-01-10SHANGHAI FUDAN KINGSTAR COMPUTER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111575653.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-21
Publication Date
2025-01-10
Estimated Expiration
2041-12-21

AI Technical Summary

Technical Problem

In the trading system, it is difficult for the prior art to determine the operating status of the operating transaction cluster without increasing the system load, especially because the heartbeat mechanism needs to time stamp each business request, resulting in increased system burden and traceability The burden of sexually writing documents increases.

Method used

Introduce a distributed collaborative server to characterize the survival status of the quotation by creating and deleting temporary nodes corresponding to the quotation, replace the traditional heartbeat mechanism, use the existence of temporary nodes to determine whether the quotation is alive, and use the cluster service module and The quotation management module generates and updates seat lists and cluster policies for order processing.

Benefits of technology

Effectively judging the survival status of the quotation without increasing the load of the trading system, reducing the useless load brought by the heartbeat mechanism and improving the reliability and efficiency of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114493860B_ABST
    Figure CN114493860B_ABST
Patent Text Reader

Abstract

The present application is applicable to the field of Internet technology, and provides a quotation cluster management method, a trading system and a storage medium. The method is applied to a trading system, and the trading system includes multiple quotation clusters and distributed collaborative servers. Each quotation cluster includes all quotations belonging to the same exchange. The method includes: when a first quotation establishes a connection with a distributed collaborative server, the distributed collaborative server creates a first temporary node corresponding to the first quotation; when the first quotation is disconnected from the distributed collaborative server and reaches a preset time, the distributed collaborative server deletes the first temporary node, and the existence of the first temporary node indicates that the first quotation is in a surviving state, and the non-existence of the first temporary node indicates that the first quotation is in a non-surviving state. The survival state of the quotation is characterized by creating and deleting a temporary node corresponding to the quotation in the distributed collaborative server, and while judging the survival state of the quotation, no useless load is brought to the trading system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of Internet technology, and in particular, relates to a quotation cluster management method, a transaction system and a storage medium. Background Art

[0002] In the trading system, the module responsible for sending orders to the exchange is called an offer, and each offer will set up an exchange seat. The offer seat is an important resource, so it is necessary to make full use of the offer seat resources. In the trading system, the offers belonging to the same exchange are usually clustered into offer clusters, and algorithms are used to ensure that the number of orders sent to the exchange by each offer belonging to the same exchange is almost equal, so that the seat resources can be fully utilized.

[0003] In the trading system, the module that sends orders to the offer is called the trading core. The trading core needs to know the status of the offer at any time in order to decide whether to send an order to it. When judging the status of the offer, it is not enough to only look at the status of the offer process. The current common practice is to use a heartbeat mechanism, that is, the offer sends a heartbeat packet to the trading core at a fixed time. If the heartbeat packet is broken, it means that there is a problem with the offer. At this time, the trading core will no longer send orders to the offer. In the trading system, the heartbeat mechanism is used in that the trading core records the timestamp of the heartbeat packet when it receives it. When receiving a business request such as an order, the timestamp of the order request is compared with the timestamp of the recorded heartbeat packet to determine whether the heartbeat has timed out.

[0004] In a trading system, the offer usually sends a heartbeat packet to the trading core through a fault-tolerant bus. The trading core is a fault-tolerant structure, that is, the trading core for the same batch of customers will include two nodes, the main trading core and the backup trading core, and the processing results of the two nodes for the same request message should be consistent. If the timestamp is generated by the trading core when receiving the information, then the processing results will inevitably be inconsistent. Therefore, in a trading system that uses a heartbeat mechanism to determine the survival status of an offer, the fault-tolerant bus needs to timestamp the heartbeat packet while timestamping the order business request. Since orders account for the vast majority of business requests, it is equivalent to the bus needing to timestamp each business request message. Modern trading systems have high requirements for latency, so it is hoped that operations such as adding timestamps to each business request can be avoided. In addition, the fault-tolerant bus is usually the source of input messages for the trading system. In order to ensure traceability, the message will be written to a file, and the heartbeat packet entering the bus will increase the burden of the system writing files. Therefore, in a trading system, how to determine the survival of an offer in an offer cluster without increasing the load of the trading system has become a technical problem that needs to be solved urgently. Summary of the invention

[0005] The embodiments of the present application provide an offer cluster management method, a trading system and a storage medium, which can solve the technical problem of determining the survival of offers in an offer cluster without increasing the load of the trading system in the existing trading system.

[0006] In a first aspect, an embodiment of the present application provides a quotation cluster management method, which is applied to a trading system, wherein the trading system includes multiple quotation clusters and a distributed collaborative server, wherein each quotation cluster includes all quotations belonging to the same exchange; the method includes:

[0007] When the first offer establishes a connection with the distributed collaborative server, the distributed collaborative server creates a first temporary node corresponding to the first offer;

[0008] When the first offer is disconnected from the distributed collaborative server and a preset time period is reached, the distributed collaborative server deletes the first temporary node. The existence of the first temporary node indicates that the first offer is in a live state, and the non-existence of the first temporary node indicates that the first offer is in a non-live state.

[0009] In the above-mentioned quotation cluster management method, the first quotation can be any one of the multiple quotation clusters. When the first quotation establishes a connection with the distributed collaborative server, the distributed collaborative server establishes a corresponding first temporary node. When the first quotation is disconnected from the distributed collaborative server and reaches a preset time, the distributed collaborative server deletes the first temporary node, and the existence of the first temporary node is used to indicate whether the first quotation is alive. The survival status of the quotation is indicated by creating and deleting a temporary node corresponding to the quotation in the distributed collaborative server. When the trading system uses the above-mentioned method instead of the heartbeat mechanism to determine the survival status of the quotation, it can well determine the survival of the quotation without bringing useless load to the trading system.

[0010] In a possible implementation manner of the first aspect, the trading system further includes a cluster service module and an offer management module, and the method further includes:

[0011] The cluster service module obtains change information of all temporary nodes in the distributed collaborative server, and obtains a first seat list of a first target exchange according to the change information, wherein the first target exchange is an exchange where the temporary node has changed, and the first seat list includes seat statuses of all surviving offers of the first target exchange, and the seat statuses of the surviving offers include seat availability status or seat unavailability status;

[0012] The cluster service module sends the first seat list to the offer management module;

[0013] The offer management module generates a first cluster strategy corresponding to the first target exchange according to the first seat list, wherein the first cluster strategy is used for order processing for each active offer of the first target exchange, where the active offer is a surviving offer in a seat available state.

[0014] In a possible implementation manner of the first aspect, the method further includes: the offer management module sending the first cluster strategy to each of the active offers of the first target exchange.

[0015] In a possible implementation manner of the first aspect, the method further includes:

[0016] The second offer obtains the seat status of the second offer;

[0017] If the seat status changes, the second offer sends the seat information of the second offer to the offer management module, wherein the seat information indicates whether the seat corresponding to the second offer is available;

[0018] The offer management module updates a second cluster strategy of a second target exchange to which the second offer belongs according to the seat information, and the second cluster strategy is used for order processing of each active offer of the second target exchange.

[0019] In a possible implementation manner of the first aspect, the method further includes:

[0020] The offer management module sends the second cluster strategy to each of the active offers of the second target exchange.

[0021] In a possible implementation manner of the first aspect, the transaction system further includes a transaction core, and the method further includes:

[0022] The trading core receives order information, where the order information includes an order number of a first order and identification information of a target exchange to which the first order belongs;

[0023] The trading core sends the order information to all target active quotations according to the identification information, where the target active quotations are active quotations corresponding to the target exchange;

[0024] Each of the target active offers determines a processing result according to the order number and the cluster strategy of the target exchange, and sends the processing result to the target exchange.

[0025] Exemplarily, the cluster strategy of the target exchange includes the number of active seats corresponding to the target exchange and the order filter ID of each active seat in the target exchange, wherein the active seats correspond one-to-one to the active quotations corresponding to the target exchange, the number of active seats N is a positive integer and N≥1, and the order filter ID corresponding to the Mth active seat is M-1, wherein M is any positive integer from 1 to N;

[0026] Each of the target active offers determines a processing result according to the order number and the cluster strategy of the target exchange, including:

[0027] For each target activity offer, the order number is modulo the number of activity seats to obtain a remainder;

[0028] Each of the target activity offers compares the remainder with the order filter ID corresponding to the target activity offer;

[0029] If the remainder is the same as the order filter ID corresponding to the target active offer, each of the target active offers processes the first order to obtain the processing result.

[0030] In a second aspect, an embodiment of the present application provides a trading system, including multiple quotation clusters, a distributed collaborative server and a trading core, wherein each quotation cluster includes all quotations belonging to the same exchange;

[0031] The trading core is used to distribute orders to all offers in the multiple offer clusters;

[0032] The distributed collaborative server is used to manage the survival status of all quotations;

[0033] Wherein, when a first offer establishes a connection with the distributed collaborative server, the distributed collaborative server creates a first temporary node corresponding to the first offer, and the first offer is one of the multiple offer clusters;

[0034] When the first offer is disconnected from the distributed collaborative server and a preset time period is reached, the distributed collaborative server deletes the first temporary node. The existence of the first temporary node indicates that the first offer is in a live state, and the non-existence of the first temporary node indicates that the first offer is in a non-live state.

[0035] In a possible implementation manner of the second aspect, the trading system further includes a cluster service module and an offer management module.

[0036] The cluster service module is used to obtain change information of all temporary nodes in the distributed collaborative server, and obtain a first seat list of a first target exchange according to the change information, wherein the first target exchange is an exchange where the temporary node has changed, and the first seat list includes the seat status of all surviving offers of the first target exchange, and the seat status of the surviving offers includes a seat available status or a seat unavailable status;

[0037] The cluster service module is further used to send the first seat list to the offer management module;

[0038] The offer management module is used to generate a first cluster strategy corresponding to the first target exchange according to the first seat list, and the first cluster strategy is used to process orders for each active offer of the first target exchange, where the active offer is a surviving offer in a seat available state.

[0039] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, including: the computer-readable storage medium stores a computer program, characterized in that when the computer program is executed by a processor, the quotation cluster management method described in any one of the first aspects above is implemented.

[0040] It can be understood that the beneficial effects of the second to third aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0042] Figure 1 It is a structural diagram of a trading system provided by an embodiment of the present application;

[0043] Figure 2 It is an interaction diagram of a method for managing the survival status of an offer in a method for managing an offer cluster provided in an embodiment of the present application;

[0044] Figure 3 It is an interaction diagram of a cluster strategy management method in a quotation cluster management method provided in an embodiment of the present application;

[0045] Figure 4 It is an interaction diagram of an order processing method in a quotation cluster management method provided in an embodiment of the present application;

[0046] Figure 5 It is a schematic diagram of a bus provided in an embodiment of the present application sending messages to different active bids in the same bid cluster. DETAILED DESCRIPTION

[0047] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0048] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0049] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0050] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0051] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0052] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0053] In current trading systems, the offer usually sends a heartbeat packet to the trading core through a fault-tolerant bus. The trading core checks whether the heartbeat packet has timed out to determine the survival status of the offer. In this method, the fault-tolerant bus needs to timestamp each heartbeat packet. This method of determining the survival of an offer mainly has the following problems:

[0054] First, if the fault-tolerant bus is to timestamp each heartbeat packet, it will greatly increase the burden on the system. On the other hand, since the fault-tolerant bus is the source of the transaction system input, in order to ensure traceability, the message will be written to the file, and the heartbeat packet into the bus will increase the burden of the transaction system to write files.

[0055] The embodiment of the present application aims to find a new offer cluster management method for judging the survival of an offer that can replace the heartbeat mechanism.

[0056] The bid cluster management method provided in the embodiment of the present application manages the bid survival status in the bid cluster by adding a distributed collaborative server in the trading system. Figure 1 As shown, it is a structural diagram of a trading system provided in an embodiment of the present application, including multiple quotation clusters, distributed collaborative servers and a trading core, wherein each quotation cluster includes all quotations belonging to the same exchange.

[0057] Some terms involved in this application are explained below.

[0058] An offer refers to the module in the trading system that is responsible for sending orders to the exchange. Each offer will set up an exchange seat. A seat refers to the rights and interests held in the exchange (such as the right to trade in the exchange). Each seat has a channel connected to the corresponding exchange.

[0059] A surviving offer is one that has no failures.

[0060] Active offers refer to offers that can be processed and whose corresponding seat status is seat available.

[0061] The seat availability status means that the quotation corresponding to the seat is connected to the exchange and the exchange is in an open state.

[0062] The seat unavailable status means that the quotation corresponding to the seat is connected to the exchange and the exchange is closed, or the quotation is disconnected from the exchange.

[0063] The trading core is a module that sends orders to quotations, and is used to distribute orders to all quotations in multiple quotation clusters.

[0064] Distributed collaborative servers (e.g. Figure 1 Zookeeper) is a server cluster for managing the survival status of an offer provided in an embodiment of the present application. The distributed collaborative server can characterize whether the offer is alive by creating a temporary node. For example, for Offer 1, if there is a temporary node corresponding to Offer 1 in the distributed collaborative server, it characterizes that Offer 1 is in a survival state. If there is no temporary node corresponding to Offer 1 in the distributed collaborative server, it characterizes that Offer 1 is in a non-survival state. By introducing a distributed collaborative server into the trading system, the distributed collaborative server creates and deletes temporary nodes corresponding to the offer to characterize the survival status of the offer, replacing the traditional heartbeat mechanism for judging the survival status of the offer, so that the trading system can well judge the survival of the offer while reducing the useless load brought to the trading system by the heartbeat mechanism.

[0065] Optional, such as Figure 1 As shown, the trading system in the embodiment of the present application may also include a cluster service module and a quotation management module.

[0066] The cluster service module is used to determine the exchange to which the offer with the survival status change belongs, and send all the surviving offers and their seat status of the exchange to the offer management module.

[0067] The offer management module is used to generate a cluster strategy for the transaction based on all surviving offers and their seat statuses of the exchange.

[0068] Optional, such as Figure 1 As shown, the trading system also includes a bus, and the trading core distributes orders to multiple quotation clusters through the bus. The bus in the embodiment of the present application needs to have the characteristics of fault tolerance, order, persistence, etc.

[0069] In the embodiment of the present application, the distributed collaborative server, the offer management module and the cluster service module can be separate server clusters added to the existing trading system. The offer management module and the cluster service module can also be functional modules integrated on the distributed collaborative server cluster. In addition, the offer management module and the cluster service module can also be functional modules added to the server cluster of the existing trading system. No specific limitation is made here.

[0070] Figure 1 Only part of the trading system structure is shown in Figure 1 In addition to the parts shown in FIG. 1 , the trading system also includes a trading client, a trading front-end that connects the trading client and the trading core, etc. Figure 1 The number of various parts shown in the figure, such as the transaction core, quotation cluster, quotation management module, cluster service module, and distributed collaborative server Zookeeper, is only for illustration. In actual applications, they can be set as needed, so as to facilitate the increase or decrease of the number of various parts as the business changes. And the number of each part (such as the transaction core) can generally be configured online.

[0071] The following is an example of a practical application. Figure 1 The specific settings of different parts in.

[0072] In actual applications, the number of trading cores is configured according to needs. Generally speaking, the number of trading cores is related to the number of customers, and one trading core generally corresponds to tens of thousands of customers. In addition, two trading cores with exactly the same functions will be set up for the same group of customers in the trading system. The two trading cores with exactly the same functions include the main trading core and the backup trading core; and the main trading core and the backup trading core are set up on two different servers, which can ensure the normal operation of the system in the event of an emergency, thereby improving the fault tolerance of the trading system. For example, when the server where the main trading core is located fails, since the backup trading core is set up on another server, the backup trading core can still work normally, ensuring that the orders of the corresponding group of customers can be distributed to multiple quotation clusters.

[0073] In actual applications, the number of quotation clusters is related to the number of exchanges actually connected to the trading system, and each quotation cluster corresponds to one exchange. For example, based on the consideration of fault tolerance of the trading system, quotation clusters corresponding to the same exchange are separately set on two or more servers.

[0074] The distributed collaborative server zookeeper in the embodiment of the present application is an open source server. In actual applications, a zookeeper cluster is set up and generally includes an odd number, such as 3, 5, 7, etc.

[0075] In order to ensure the fault tolerance of the trading system, the offer management module may include a main offer management module and a backup offer management module, and they are located on two different servers. The cluster service module may include a main offer management module and a backup offer management module, and they are located on two different servers.

[0076] For example, since the quotation management module has a relatively large load, it can be set up on two servers separately. The cluster management module is less complex and can be set up on two servers separately or installed on two distributed collaborative servers.

[0077] In actual applications, orders in the trading core are obtained from the trading receiving end, which can be a trading terminal or a program developed by an API (Application Programming Interface).

[0078] Exemplarily, the trading terminal may be a terminal installed with trading software (such as stock trading software, etc.), and the terminal may be a mobile phone, a tablet computer or a computer, etc. Exemplarily, the order may include the order number, the exchange name, the transaction type and the transaction price, etc.

[0079] In the embodiment, a transaction front module is also provided between the transaction terminal and the transaction core. The transaction front module is between the peripheral subsystems of the transaction system and the transaction core. Each peripheral transaction subsystem is connected to the transaction front module through a network. The transaction front module is a bridge between the transaction subsystem and the transaction core, forwarding data between the two parties and encrypting the data to ensure information security. For example, the peripheral transaction subsystem can be a transaction terminal, a technical service system, a trader terminal, etc.

[0080] Based on the trading system provided by the present application, the present application provides a quotation cluster management method, which can be divided into a quotation survival status management method, a cluster strategy management method, and an order processing method.

[0081] Figure 2 This is a flowchart of an embodiment of a method for managing an offer cluster provided in an embodiment of the present application, and mainly describes a method for managing the survival status of an offer by taking the first offer in an offer cluster as an example. Figure 2 , the method comprising:

[0082] Step S210: When the first offer establishes a connection with the distributed collaborative server, the distributed collaborative server creates a first temporary node corresponding to the first offer.

[0083] For example, when the first offer establishes a connection with the distributed collaborative server, the distributed collaborative server will create a non-permanent znode (i.e., the first temporary node) under the / reports path. Temporary node znodes are stored in a tree-like manner, and the path of the znode contains information such as the exchange, exchange channel, seat number, and seat ID.

[0084] Step S220: When the first offer is disconnected from the distributed collaborative server and the preset time period is reached, the distributed collaborative server deletes the first temporary node. The existence of the first temporary node indicates that the first offer is in a live state, and the non-existence of the first temporary node indicates that the first offer is in a non-live state.

[0085] The method for managing the survival status of an offer in the above-mentioned embodiment creates and deletes temporary nodes corresponding to the offer in the distributed collaborative server to characterize the survival status of the offer; the judgment method only needs to monitor the temporary nodes in the distributed server to judge which offers have changed in survival status, and therefore will not bring excessive load to the trading system.

[0086] Figure 3 The flowchart of an embodiment of a quotation cluster management method provided in the embodiment of the present application mainly relates to a cluster strategy management method. Figure 3 , the method comprising:

[0087] Step S310: The cluster service module obtains the change information of all temporary nodes in the distributed collaborative server, and obtains the first seat list of the first target exchange according to the change information.

[0088] Among them, the first target exchange is the exchange where the temporary node changes, and the first seat list includes the seat status of all surviving offers of the first target exchange, and the seat status of the surviving offers includes a seat available status or a seat unavailable status.

[0089] In an embodiment, the change information of a temporary node may be the creation of a new temporary node or the deletion of an existing temporary node. The cluster service module monitors the newly added or deleted temporary nodes in the distributed collaborative server, determines the first target exchange to which the changed temporary node belongs, and sends the first seat list status corresponding to the first target exchange to the offer management module. The first target exchange is any exchange where the temporary node in the distributed collaborative server changes, that is, any exchange where the offer survival status of the first target exchange changes.

[0090] In the embodiment, the first seat list mainly indicates whether the seat status of all surviving offers in the corresponding first target exchange is in the seat available state. A surviving offer refers to an offer that is connected to the distributed collaborative server; and the seat status refers to whether the seat corresponding to the offer is available: when the surviving offer is in the seat available state, the surviving offer is an active offer, and the active offer can receive and process orders; when the surviving offer is in the seat unavailable state, the surviving offer is an inactive offer, and the inactive offer cannot receive and process orders.

[0091] Step S320: The cluster service module sends the first seat list to the offer management module.

[0092] Step S330: The offer management module generates a first cluster strategy corresponding to the first target exchange according to the first seat list. The first cluster strategy is used for order processing for each active offer of the first target exchange. The active offer is a surviving offer in a seat available state.

[0093] In the embodiment, the cluster strategy is the basis for processing received orders for all active offers in the offer cluster, and the first cluster strategy corresponds to the first offer cluster of the first target exchange. The first offer cluster allocates all received orders to each active offer in the first offer cluster based on the first cluster strategy. Exemplarily, in general, in order to make full use of the seat resources of the offer and ensure the balanced load of the offer, the orders belonging to the first target exchange need to be evenly allocated to each active offer in the first offer cluster.

[0094] In the above embodiment, the trading system introduces a cluster service module and an offer management module. The cluster service module and the first offer send the information required to generate the first cluster strategy to the centralized offer management module, and the offer management module generates a cluster strategy using the obtained information. The cluster service module monitors the change information of all temporary nodes in the distributed collaborative server, so that it can timely determine which offers have changed their survival status based on the change information; the first seat list describes the seat status of each surviving offer, and while judging the survival status of the offer, it also judges whether each surviving offer is available; the offer management module generates the first cluster strategy based on the first list information, so that each offer that is in a surviving state and has an available seat can process orders according to the first cluster strategy; so that the seats in the offer cluster can be adjusted in time to ensure the load balancing of active offers.

[0095] Optionally, the quotation cluster management method further includes a method for determining seat status, and the determination method includes:

[0096] Second Offer Get the seat status of the second offer.

[0097] If the seat status changes, the second offer sends the seat information of the second offer to the offer management module, wherein the seat information indicates whether the seat corresponding to the second offer is available.

[0098] The offer management module updates the second cluster strategy of the second target exchange to which the second offer belongs according to the seat information, and the second cluster strategy is used for order processing of each active offer of the second target exchange.

[0099] In the embodiment, the second offer is any one of the multiple offer clusters, the seat information indicates whether the seat corresponding to the second offer is available, and the exchange to which the second offer belongs is the second target exchange. When the seat status of the second offer changes, the second offer sends the seat information of the second offer to the offer management module; the offer management module updates the second cluster strategy of the second target exchange according to the received seat information. The second cluster strategy is the basis for processing orders for each active offer in the second offer cluster corresponding to the second target exchange. The trading system in the above embodiment monitors the seat status of each offer, and when the seat status changes, the offer management module can timely update the cluster strategy of the corresponding exchange, so as to monitor the offers that are actually in the seat available state in the corresponding exchange, thereby ensuring the timeliness of the cluster strategy.

[0100] Optionally, the quotation cluster management method further includes: the quotation management module sending the cluster strategy to each active quotation of the corresponding exchange.

[0101] In the embodiment, each exchange has a corresponding cluster strategy (for example, the first cluster strategy of the first target exchange in the embodiment, the second cluster strategy of the second target exchange, etc.), and the offer management module sends the cluster strategy to all active offers of the corresponding exchange after obtaining the cluster strategy.

[0102] Figure 4 The flowchart of an embodiment of a quotation cluster management method provided in the embodiment of the present application mainly relates to an order processing method, such as Figure 4 As shown, taking the first order as an example, the process of processing the first order according to the cluster strategy for all active quotations in the exchange to which the first order belongs is explained, wherein the first order is any order among all orders belonging to the target exchange; the target exchange is any exchange among all exchanges. The order processing method includes:

[0103] Step S410: The trading core receives order information, where the order information includes the order number of the first order and identification information of the target exchange to which the first order belongs.

[0104] In the embodiment, the identification information refers to information that can distinguish the specific exchanges to which different orders belong, for example, the exchange name or exchange code can be used as the identification information.

[0105] For example, the order information may also include the exchange name, transaction type, transaction price, etc.

[0106] Step S420: Each target active offer receives order information from the trading core according to the identification information. The target active offer is an active offer corresponding to the target exchange.

[0107] Exemplarily, the trading core sends each order information to the bus, and the bus sends the order information to each target active offer by multicasting.

[0108] Optionally, the message types of order information belonging to different exchanges are different, and each target active offer can receive order information of the message type corresponding to the target exchange. In this case, the identification information is the message type of the order information. Among them, the trading core sends the order to the bus with a specific message type, and the message types of orders belonging to different exchanges are different; such a setting makes it possible for the bus to directly send the order message to the specific offer cluster corresponding to the exchange without having to disassemble the message message after receiving the order message.

[0109] Step S430: Each target active offer determines a processing result according to the order number and the cluster strategy of the target exchange, and sends the processing result to the target exchange.

[0110] In the embodiment, the processing result refers to the target active offer, which refers to the processing performed on the first order before sending the first order to the target exchange, and the processing result ultimately enables the first order to be received by the target exchange.

[0111] Generally speaking, there are two ways for the target active quotation to connect to the exchange. The first is API (Application Programming Interface). In this case, the active quotation needs to fill the business message information of the trading system (such as the order information of the first order) into the API parameters; the other is to provide application layer protocol specifications. In this case, the active quotation needs to convert the business message information of the trading system (such as the order information of the first order) into application layer protocol data specified by the target exchange.

[0112] Optionally, the cluster strategy of the target exchange includes the number of active seats corresponding to the target exchange and the order filter ID of each active seat in the target exchange, where the active seats correspond one-to-one to the active quotations corresponding to the target exchange, the number of active seats N is a positive integer and N≥1, and the order filter ID corresponding to the Mth active seat is M-1, where M is any positive integer from 1 to N.

[0113] Exemplarily, as shown in Table 1, the cluster strategy may include the exchange name corresponding to the cluster strategy, the number of active seats in the exchange, the seat name of each active seat, and the order filter ID of each active seat. The order numbers of all orders belonging to the same exchange are a series of consecutive positive integers.

[0114] Table 1

[0115] Exchange Name The number of surviving seats in this exchange is N Seat 1 Name Seat 1 order filter ID is 0 Seat 2 Name Seat 2 order filter ID is 1 Seat 3 Name Seat 3 order filter ID is 2 ... Seat N Name Seat N order filter ID is N-1

[0116] In step S430, each target active offer determines a processing result according to the order number and the cluster strategy of the target exchange, including:

[0117] For each target activity offer, the order number and the number of activity seats are multiplied to obtain the remainder;

[0118] Each target activity offer compares the remainder with the order filter ID corresponding to the target activity offer;

[0119] If the remainder is the same as the order filter ID corresponding to the target active offer, each of the target active offers processes the first order to obtain the processing result.

[0120] In the embodiment, each target active offer will receive all order information of the target exchange to which it belongs, and each target active offer determines whether to process the order according to its corresponding order filter ID and the order number in the order information.

[0121] In the above embodiment, each target active offer is processed by calculating the remainder of the order number and the number of active seats in the corresponding cluster strategy, and selectively processing the first order whose remainder is the same as the order filter ID. In this way, all orders belonging to the same exchange can be evenly distributed among multiple active seats, so that multiple active offers corresponding to multiple active seats are load balanced.

[0122] Optionally, both the trading core and the offer management module send messages to active offers in the offer cluster via the bus. After receiving the order information sent by the trading core and the cluster strategy sent by the offer management module, the bus first queues the received order information and cluster strategy according to the receiving time, and then sends them to the corresponding offer cluster.

[0123] Figure 5 The following is a schematic diagram of the bus sending messages to different active bidders in the same bidder cluster. Figure 5 As shown, offer a and offer b are two active offers in the same offer cluster. The bus sends messages to the two active offers through multicast. The order information sent by the trading core and the cluster strategy information sent by the offer stock management module are queued in the bus and then sent to the corresponding offers. Figure 5 As shown, before receiving cluster strategy 1, Offer a and Offer b are processed according to the previous cluster strategy Order 1 and Order 2; Offer a and Offer b must be processed, and Offer a and Offer b will process Order 3 according to Cluster Strategy 1; after receiving Cluster Strategy 2, Offer a and Offer b will screen and process Order 4 according to Cluster Strategy 2.

[0124] Based on the above embodiment, the bus ensures that the messages received by all active offers in an offer cluster are sorted first, so that the order processing strategies of all offers in the same offer cluster at any time are consistent.

[0125] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0126] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0127] An embodiment of the present application provides a computer program product. When the computer program product runs on a server, the server can implement the steps in the above-mentioned method embodiments when executing the computer program product.

[0128] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: being able to carry the computer program code to any entity or device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a disk or an optical disk.

[0129] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

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

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

[0132] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0133] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A quotation cluster management method, applied to a trading system, characterized in that: The trading system includes a plurality of quotation clusters and a distributed collaborative server, wherein each quotation cluster includes all quotations belonging to the same exchange; the method includes: When the first offer establishes a connection with the distributed collaborative server, the distributed collaborative server creates a first temporary node corresponding to the first offer; When the first offer is disconnected from the distributed collaborative server and a preset time period is reached, the distributed collaborative server deletes the first temporary node, the existence of the first temporary node indicates that the first offer is in a live state, and the non-existence of the first temporary node indicates that the first offer is in a non-live state; The trading system further includes a cluster service module and an offer management module, and the method further includes: The cluster service module obtains change information of all temporary nodes in the distributed collaborative server, and obtains a first seat list of a first target exchange according to the change information, wherein the first target exchange is an exchange where the temporary node has changed, and the first seat list includes seat statuses of all surviving offers of the first target exchange, and the seat statuses of the surviving offers include seat availability status or seat unavailability status; The cluster service module sends the first seat list to the offer management module; The offer management module generates a first cluster strategy corresponding to the first target exchange according to the first seat list, wherein the first cluster strategy is used for order processing for each active offer of the first target exchange, wherein the active offer is a surviving offer in a seat available state.

2. The method according to claim 1, characterized in that The method further comprises: The offer management module sends the first cluster strategy to each active offer of the first target exchange.

3. The method according to claim 1, characterized in that: The method further comprises: The second offer obtains the seat status of the second offer; If the seat status changes, the second offer sends the seat information of the second offer to the offer management module, wherein the seat information indicates whether the seat corresponding to the second offer is available; The offer management module updates a second cluster strategy of a second target exchange to which the second offer belongs according to the seat information, and the second cluster strategy is used for order processing of each active offer of the second target exchange.

4. The method according to claim 3, characterized in that The method further comprises: The offer management module sends the second cluster strategy to each active offer of the second target exchange.

5. The method according to any one of claims 1 to 4, characterized in that: The trading system further includes a trading core, and the method further includes: The trading core receives order information, where the order information includes an order number of a first order and identification information of a target exchange to which the first order belongs; Each target active offer receives the order information from the trading core according to the identification information, and the target active offer is an active offer corresponding to the target exchange; Each of the target active offers determines a processing result according to the order number and the cluster strategy of the target exchange, and sends the processing result to the target exchange.

6. The method according to claim 5, characterized in that The cluster strategy of the target exchange includes the number of active seats corresponding to the target exchange and the order filter ID of each active seat in the target exchange, wherein the active seats correspond one-to-one to the active quotations corresponding to the target exchange, the number of active seats N is a positive integer and N≥1, and the order filter ID corresponding to the Mth active seat is M-1, wherein M is any positive integer from 1 to N; Each of the target active offers determines a processing result according to the order number and the cluster strategy of the target exchange, including: For each target activity offer, the order number is modulo the number of activity seats to obtain a remainder; Each of the target activity offers compares the remainder with the order filter ID corresponding to the target activity offer; If the remainder is the same as the order filter ID corresponding to the target active offer, each of the target active offers processes the first order to obtain the processing result.

7. A trading system, characterized in that: It includes multiple quotation clusters, distributed collaborative servers and trading cores, wherein each quotation cluster includes all quotations belonging to the same exchange; The trading core is used to distribute orders to all offers in the multiple offer clusters; The distributed collaborative server is used to manage the survival status of all quotations; Wherein, when a first offer establishes a connection with the distributed collaborative server, the distributed collaborative server creates a first temporary node corresponding to the first offer, and the first offer is one of the multiple offer clusters; When the first offer is disconnected from the distributed collaborative server and a preset time period is reached, the distributed collaborative server deletes the first temporary node, the existence of the first temporary node indicates that the first offer is in a live state, and the non-existence of the first temporary node indicates that the first offer is in a non-live state; The trading system also includes a cluster service module and an offer management module, wherein: The cluster service module is used to obtain change information of all temporary nodes in the distributed collaborative server, and obtain a first seat list of a first target exchange according to the change information, wherein the first target exchange is an exchange where the temporary node has changed, and the first seat list includes the seat status of all surviving offers of the first target exchange, and the seat status of the surviving offers includes a seat available status or a seat unavailable status; The cluster service module is further used to send the first seat list to the offer management module; The offer management module is used to generate a first cluster strategy corresponding to the first target exchange according to the first seat list, and the first cluster strategy is used to process orders for each active offer of the first target exchange, where the active offer is a surviving offer in a seat available state.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.