Market data processing method, system and computer readable medium

By processing transaction information and order book information in market data differently, efficient resource utilization is achieved, solving the problems of excessive resource demand and high cost in existing technologies, and improving the performance and efficiency of market data processing.

CN116150219BActive Publication Date: 2026-06-23SHENZHEN LONGBU TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN LONGBU TECHNOLOGY CO LTD
Filing Date
2023-02-27
Publication Date
2026-06-23

Smart Images

  • Figure CN116150219B_ABST
    Figure CN116150219B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a kind of market data processing method, system and computer readable medium, in which according to the characteristics of two different types of data in market data, different ways are used for targeted differential processing, for the transaction information therein, data processing equipment obtains transaction information from data source equipment full amount, writes into database after processing the transaction information to save, for portal equipment to obtain and push to user at any time, and for the order book information therein, it is not full amount acquisition, but the form of subscription is used to establish long connection by portal equipment and the data source equipment, when obtaining the market subscription request of user, it is obtained and pushed from data source equipment through long connection. Therefore, the processing amount and transmission amount of market data as a whole are reduced, the demand for computing resources and bandwidth resources can be reduced, and the cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of information technology, and in particular to a market data processing method, system, and computer-readable medium. Background Technology

[0002] In the field of financial information analysis and processing, market data is a crucial analytical basis. Changes in market data can promptly reflect market changes, thereby influencing investors' investment behavior. Financial information platforms often need to acquire real-time market data for various financial instruments and promptly push this data to users so that they can stay informed about market fluctuations. In existing market data processing solutions, to ensure the completeness of market information, all market data is typically accessed in its entirety. The system retrieves all market data for each instrument from the data source and provides this data to users when needed. However, the sheer volume of market data generated by the entire financial market results in enormous computational and bandwidth resource consumption during processing, leading to excessively high overall costs and making it difficult to achieve a good balance between performance and cost. Summary of the Invention

[0003] One objective of this application is to provide a market data processing method, system, and computer-readable medium to address the problems of excessive resource requirements and high costs associated with existing systems.

[0004] To achieve the above objectives, embodiments of this application provide a market data processing method, wherein the market data includes transaction information and order book information, and the method includes:

[0005] The data processing device acquires all transaction information from the data source device, processes the transaction information, and writes it into the database for storage.

[0006] The input device establishes a long-term connection with the data source device;

[0007] When the entry device receives a market data subscription request from the client device for a target object, it queries the market data of the target object in the memory of the entry device.

[0008] If the market data of the target object is not found, the entry device obtains the latest market information and subsequent changes of the target object from the data source device through the long connection and writes it into the memory, obtains the latest transaction information and subsequent changes of the target object from the database and writes it into the content, and continuously pushes the market information and transaction information of the target object to the client device.

[0009] If the market data of the target object is found, the entry device pushes the latest market information, transaction information and subsequent changes of the target object to the client device.

[0010] Furthermore, the method also includes:

[0011] After the entry device writes the order book information and transaction information of the target object into the memory, it generates a time tag. The time tag is reset when the entry device receives a market data subscription request for the target object.

[0012] When the time tag exceeds the preset time, the entry device stops acquiring subsequent changes in order book information and transaction information, and deletes the order book information and transaction information of the target object from the memory.

[0013] Furthermore, the method also includes:

[0014] When the client device ends its subscription to the target object, the entry device stops pushing the target object's market information and transaction information to the client device.

[0015] Furthermore, the data source device includes a relay service device and a data center device that interacts with the relay service device;

[0016] The data processing equipment obtains all transaction information from the data source equipment, including:

[0017] The data processing equipment obtains all transaction information from the data center equipment through the relay service equipment;

[0018] The entry device establishes a long-term connection with the data source device, including:

[0019] Establish a long-term connection between the entry equipment and the transfer service equipment;

[0020] The entry device obtains the latest betting information and its subsequent changes for the target object from the data source device via the long connection, including:

[0021] The entry device interacts with the relay service device through the long connection, and obtains the latest market information and subsequent changes of the target object from the data center device through the relay service device.

[0022] Furthermore, the data center equipment includes at least two sets, with the other set providing service when one set of data center equipment is unable to provide service.

[0023] Furthermore, the method also includes:

[0024] When any entry device and relay service device have a subscription interaction relationship regarding a target object, the relay service device and the data center device establish a subscription interaction relationship regarding the target object. The subscription interaction relationship includes: after the entry device receives a market data subscription request from the client device regarding the target object, it interacts with the relay service device through the long connection, and obtains the latest market information and subsequent changes of the target object from the data center device through the relay service device.

[0025] When all entry devices terminate their subscription interaction with the relay service devices regarding the target object, the relay service devices terminate their subscription interaction with the data center devices regarding the target object.

[0026] Furthermore, the method also includes:

[0027] After the market closes, the entry device acquires all order book information and persists the order book information. At the same time, it terminates all subscription interaction relationships between the entry device and the relay service device, as well as between the relay service device and the data provider device, and re-establishes the subscription interaction relationships after the start of the new trading day.

[0028] Based on another aspect of this application, a market data processing system is also provided, the system comprising:

[0029] A data processing device is used to acquire all transaction information from the data source device, process the transaction information, and write it into a database for storage.

[0030] A database is used to retrieve and store transaction information from the data processing device;

[0031] An entry device is used to establish a long connection with the data source device. When a client device receives a market data subscription request for a target object, the entry device queries the market data of the target object in its memory. If the market data of the target object is not found, the entry device obtains the latest order book information and its subsequent changes for the target object from the data source device through the long connection and writes it into its memory. It also obtains the latest transaction information and its subsequent changes for the target object from the database and writes it into its content. The entry device continuously pushes the order book information and transaction information of the target object to the client device. If the market data of the target object is found, the entry device pushes the latest order book information, transaction information, and its subsequent changes for the target object to the client device.

[0032] Some embodiments of this application also provide a market data processing system, wherein the system includes a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein when the computer program instructions are executed by the processor, the system is triggered to execute the aforementioned market data processing method.

[0033] Other embodiments of this application also provide a computer-readable medium having computer program instructions stored thereon, which can be executed by a processor to implement the market data processing method described above.

[0034] In a market data processing scheme provided in this application embodiment, the data processing device obtains all transaction information from the data source device, processes the transaction information, and writes it into a database for storage. An entry device establishes a long connection with the data source device. When the entry device receives a market data subscription request from a client device for a target object, it queries the market data of the target object in its memory. If the market data of the target object is not found, the entry device obtains the latest order book information and subsequent changes of the target object from the data source device through the long connection and writes it into its memory. It also obtains the latest transaction information and subsequent changes of the target object from the database and writes it into its content, continuously pushing the order book information and transaction information of the target object to the client device. If the market data of the target object is found, the entry device pushes the latest order book information, transaction information, and subsequent changes of the target object to the client device. This solution employs differentiated processing methods based on the characteristics of two different types of market data. For transaction information, the data processing device obtains all transaction information from the data source device, processes it, and writes it into a database for storage, allowing the entry device to access and push it to users at any time. For order book information, however, it does not obtain all of it. Instead, the entry device establishes a long-term connection with the data source device through a subscription mechanism, only obtaining and pushing the information from the data source device when a user requests a market data subscription. This reduces the overall processing and transmission volume of market data, decreasing the demand for computing and bandwidth resources and lowering costs. Attached Figure Description

[0035] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:

[0036] Figure 1 A schematic diagram of the processing flow of a market data processing method provided in an embodiment of this application;

[0037] Figure 2This is a schematic diagram illustrating the interactive process when implementing real-time market data subscription using the solution of this application embodiment;

[0038] Figure 3 This is a schematic diagram of the overall process of real-time market data subscription in an embodiment of this application;

[0039] The same or similar reference numerals in the accompanying drawings represent the same or similar parts. Detailed Implementation

[0040] The present application will now be described in further detail with reference to the accompanying drawings.

[0041] In a typical configuration of this application, the terminal and the service network devices each include one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0042] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0043] Computer-readable media include permanent and non-permanent, removable and non-removable media, which can store information by any method or technology. Information can be computer program instructions, data structures, program devices, 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 technologies, read-only optical disc (CD-ROM), digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.

[0044] This application provides a market data processing method. Based on the characteristics of two different types of market data, this method employs different processing methods. For transaction information, the data processing device obtains all transaction information from the data source device, processes it, and writes it into a database for storage, allowing the entry device to access and push it to users at any time. For order book information, however, it does not obtain all of it. Instead, the entry device establishes a long-term connection with the data source device through a subscription mechanism. It only obtains and pushes the information from the data source device via this long-term connection when a user requests a market data subscription. This reduces the overall processing and transmission volume of market data, thereby reducing the demand for computing and bandwidth resources and lowering costs.

[0045] In practical scenarios, the execution subject of this method can be a user device, a network device, or a device composed of user devices and network devices integrated through a network, or it can be an application running on the aforementioned devices. The user device includes, but is not limited to, various terminal devices such as computers, mobile phones, and tablets; the network device includes, but is not limited to, network hosts, single network servers, multiple network server sets, or cloud computing-based computer sets. Here, the cloud consists of a large number of hosts or network servers based on cloud computing, where cloud computing is a type of distributed computing, consisting of a virtual computer composed of a group of loosely coupled computer sets.

[0046] Figure 1 This application illustrates a processing flow of a market data processing method according to an embodiment of the present application. The method involves data interaction between a data source device, a data processing device, a database, an entry device, and a client device, and specifically may include the following interaction process:

[0047] Step S101: The data processing device obtains all transaction information from the data source device.

[0048] In step S102, the data processing device processes the transaction information and writes it into the database for storage. The transaction information is a type of market data, representing relevant information at the time of an actual transaction. For example, in options trading, the actual quantity of the underlying asset delivered, the trading parties, and the transaction price at the time of a transaction constitute the transaction information. Due to the importance of transaction information in finance and securities, complete transaction information is required for calculating candlestick charts, price movements, and analyzing fund flows. Therefore, every piece of transaction information is crucial. This embodiment employs full transmission and storage of transaction information to ensure the integrity of this important information.

[0049] The specific processing of transaction information by the data processing equipment can be set according to the actual needs of the application scenario. For example, it can be simple data cleaning, such as adjusting data format and removing invalid data, or it can include additional information generated based on the basic content, such as generating specific data related to the candlestick chart based on the existing transaction records of a certain target on that day. After completing the relevant processing, the obtained transaction information can be written into the database for storage. In some embodiments of this application, the data source device can be a server corresponding to a third-party data service, which may be deployed in a third-party physical data center or in the cloud. The database is the database in the system of this solution, and its corresponding server can be deployed in the cloud, adopting an overall hybrid cloud deployment scheme.

[0050] Step S103: The entry device and the data source device can establish a long connection in advance. This long connection allows the entry device to quickly obtain order book information from the data source device when needed, without performing any data processing, thus saving its own computing resources. The order book information mainly refers to information related to unexecuted orders submitted by users regarding a specific asset. For example, if a user wants to buy n quantities of commodity options a at price XX, this order, submitted by the user and not yet executed, represents the buy order book information. Similarly, if another user wants to sell m quantities of stock b at price YY, this order, submitted by the user and not yet executed, represents the sell order book information. Since order book information is less important for market analysis than transaction information in real-world scenarios, the solution in this application does not use full transmission and storage of order book information. Instead, it obtains the information from the data source device through a pre-established long connection only when the user subscribes.

[0051] Furthermore, in some embodiments of this application, the long connection may be a long connection using the QUIC (Quick UDP Internet Connection) protocol, which has lower connection latency and better security compared to the TCP protocol.

[0052] In step S104, when the entry device receives a market data subscription request from the client device for the target object, it queries the market data of the target object in the memory of the entry device. If the market data of the target object is not found, proceed to step S105; if the market data of the target object is found, proceed to step S106.

[0053] The target object refers to the asset the user wants to subscribe to and view, such as a stock, a fund, or an option product. When a user sends a subscription request for a specific target object through their client device, it indicates that the user needs to view market data for that asset within a certain period to understand market changes. For example, when a user opens a securities trading app on their phone and selects to view the details of a specific stock, or opens their watchlist to view the current market data of multiple stocks, the phone will send a subscription request for the corresponding stock to the entry device.

[0054] The entry device, as described in this solution, directly interacts with the client device and provides data query services. By pre-writing a portion of the target's market data into memory, the entry device can directly read market data from memory and push it to the user's client device upon receiving a user's market data subscription request. This approach offers a faster response time compared to writing market data to other persistent storage or directly querying from a third-party database in real time. However, caching the entire data into memory would consume enormous amounts of memory resources. Therefore, this solution combines memory with persistent databases and real-time queries from third-party data source devices, ensuring efficient querying of certain targets while minimizing overall resource consumption.

[0055] In real-world scenarios, the entry device may not store market data for any particular asset in its memory during initialization. When it receives market data subscription requests, it can retrieve order book information and transaction information from the data source device and the database respectively, and write them into memory. When it receives another market data subscription request for the same asset, it can retrieve the data from memory.

[0056] When the entry device obtains market information and transaction information, it specifically adopts the method of step S105: the entry device obtains the latest market information and its subsequent changes of the target object from the data source device through the long connection and writes it into the memory, and at the same time obtains the latest transaction information and its subsequent changes of the target object from the database and writes it into the content.

[0057] The latest order book information and transaction information refers to the current order book situation or a snapshot of the transaction prices, such as the latest buy and sell orders and the latest transaction prices. The subsequent change information refers to the order book information or transaction information after a period of time changes with the actual trading market. This allows the memory of the entry device to be continuously updated with the latest order book information and transaction information over time, and then, by executing step S106, the subsequent changes in market data are continuously pushed to the client device.

[0058] In some embodiments of this application, to further conserve memory resources, the market data in memory can be dynamically loaded. That is, after the entry device writes the order book information and transaction information of the target object into the memory, it can generate a time stamp. This time stamp can be used to mark how long the order book information and transaction information of a certain target have not been queried by a user since they were written into memory. For example, if the order book information and transaction information of a certain stock are written into memory at time t and continue to be updated with subsequent changes, a time stamp T=0 can be generated for that stock at time t. When no user queries the market data of that stock for 10 seconds from time t, the time stamp changes to T=10. When the entry device receives a market data subscription request for that stock from the client device, since the entry device will first query the market data of that stock from memory, the time stamp T will be reset, updated to T=0, and then increment again from 0.

[0059] In practical scenarios, to avoid the waste of memory resources caused by prolonged storage of market data for unpopular targets with few queries, a preset time N can be set. When this time exceeds the preset time, the entry device will clear the market data for that target object from memory, stop acquiring subsequent changes in order book and transaction information, and simultaneously delete the order book and transaction information of the target object from memory. This solves the problem of slow response time when directly querying persistent data and saves memory resources. Compared to existing solutions, it can improve response speed by 20-50ms and save a significant amount of memory resources.

[0060] In step S106, the entry device pushes the latest order book information, transaction information, and subsequent changes of the target object to the client device. Furthermore, the entry device will stop pushing the order book information and transaction information of the target object to the client device when the client device ends its subscription to the target object; that is, when the user no longer subscribes to the target object, the push of subsequent changes in order book information and transaction information will cease.

[0061] After the market closes, the entry device can acquire all order book information and persist it. In real-world scenarios, upstream services such as data source devices may clean up order book information after the trading day ends, and data in memory cannot be recovered if a restart occurs (due to an anomaly or a new version release). To avoid this, the entry device can perform unified processing of the order book information after the market closes, persisting this data.

[0062] In some embodiments of this application, the data source device may include a relay service device and a data center device that interacts with the relay service device. The relay service device is responsible for providing data interaction services between the data center device and the entry device or data processing device. Thus, when the data processing device obtains full transaction information from the data source device, it does so through the relay service device. When the entry device establishes a long connection with the data source device, it establishes a long connection with the relay service device, not directly with the data source device. In this case, when the entry device obtains the latest odds information and subsequent changes of the target object from the data source device through the long connection, the interaction service is actually provided by the data relay device. That is, the entry device interacts with the relay service device through the long connection, and obtains the latest odds information and subsequent changes of the target object from the data center device via the relay service device.

[0063] In some embodiments of this application, when a subscription interaction relationship regarding a target object exists between any entry device and a relay service device, the relay service device establishes a subscription interaction relationship regarding the target object with the data center device. This subscription interaction relationship comprises two parts: the subscription interaction relationship between the entry device and the relay service device refers to the process whereby, after receiving a market data subscription request from a client device for the target object, the entry device interacts with the relay service device via the long connection to request the latest market data and subsequent changes of the target object. The subscription interaction relationship between the relay service device and the data center device refers to the process where, after the entry device subscribes to the relay service device, the relay service device obtains the latest market data and subsequent changes of the target object from the data center device.

[0064] Since maintaining the subscription interaction relationship requires a certain amount of bandwidth and computing resources, when all entry devices terminate the subscription interaction relationship with the relay service device regarding the target object, the relay service device and the data center device can also terminate the subscription interaction relationship with the target object at the same time. This can release subscription information, reduce the amount of data interaction between the subscription objects, thereby reducing the dedicated line consumption between the relay service device and the data center device, and reducing the consumption of computing resources of the relay service device.

[0065] In this scenario, after the market closes, the entry device, in addition to acquiring all order book information and persisting it, can simultaneously terminate all subscription interactions between the entry device and the relay service device, as well as between the relay service device and the data provider device, and re-establish these subscription interactions at the start of the new trading day. This also reduces the dedicated line consumption between the relay service device and the data center equipment, thereby lowering the computing resource consumption of the relay service device.

[0066] The data center equipment includes at least two sets to provide high availability services for data. When one set of data center equipment is unable to provide services, the other set of data center equipment can provide services, thereby improving the availability of the entire system.

[0067] Figure 2 This diagram illustrates the interactive flow of real-time market data subscription using the scheme described in this application. The entire interaction process includes the following main entities: a client device, a gateway device, a data processor device, a repeater device, a database, and data center devices IDC A and IDC B. Each data center device includes a depth agent for processing order book information and a trade agent for processing transaction information. After the system starts, the data processor subscribes to all transaction information from the trade agent in IDC A through the repeater, processes it, and stores it in the database for subsequent querying. This process involves steps 7, 8, 9, and 10. The gateway and repeater establish a long-lived connection using the QUIC protocol without performing any data processing, thus saving computational resources.

[0068] When the client executes step 1 and sends a market data subscription request to the gateway for a certain asset, the gateway first determines whether the asset is in the gateway's memory. If it is, it directly returns the corresponding snapshot data (i.e., the real-time market data at the current moment) through step 13, and continuously pushes subsequent change information of the market data of the asset to the client until the client ends the subscription.

[0069] If the gateway does not have market data for the target in its memory, the gateway retrieves the order book information and transaction information for the market data through steps 2 and 11, respectively. When retrieving transaction information, since the database always retrieves and stores all transaction information, the gateway can obtain the latest transaction information and subsequent changes through steps 11 and 12, and then return it to the client through step 13, continuously pushing subsequent changes. When retrieving order book information, the gateway executes step 2 to request the repeater through a pre-established long connection. After receiving the request from step 2, the repeater subscribes to the latest order book information and its subsequent changes through step 3 to the depth agent in data center IDC A, which specializes in handling order book information. Then, through steps 4, 5, and 13, the data is returned to the client device via the repeater and gateway path, and subsequent changes are pushed. Furthermore, since the data center equipment includes two groups, IDC A and IDC B, a high-availability solution can be provided. When IDC A is unavailable, it can automatically switch to IDC B to provide the corresponding service.

[0070] Figure 3 The diagram illustrates the overall process of subscribing to real-time market data. The relay equipment in the diagram is the relay service equipment in this solution, the data providing equipment is the data center equipment in this solution, and db is the database in this solution.

[0071] After the scheme begins execution, the entry device periodically checks the targets subscribed to by client devices to determine if any have timed out. If a target has timed out (meaning the client device has not requested the target for more than a preset time), the entry device clears the market information for that target from its memory and then terminates the subscription interaction with the relay device. If the relay device has downstream subscriptions (meaning it has also established a subscription interaction relationship with the downstream data provider for that target), this subscription interaction relationship will also be terminated at this time. If no targets have timed out, the normal subscription process continues, and the exchange of subscribed market information continues.

[0072] Meanwhile, if the entry device receives a request from a client device to query market data for a target, it will check its memory for relevant market information. If found, it will directly return a snapshot of the relevant market data and push subsequent change information based on the subscription relationship. If no market information for the target is found in memory, it needs to determine whether it is currently within a specific time period, which could be the opening time of the indicator's trading market. If it is not within this specific time period, the entry device can query the target's price snapshot and order book from the database. If it is within this specific time period, the entry device can query the price snapshot from the database, while the database can continuously obtain the latest price information by subscribing to the relay device. Simultaneously, the entry device can query and subscribe to the target's order book information from the relay device, while the relay device can query and subscribe to the order book information from the data source.

[0073] Based on another aspect of this application, embodiments of this application also provide a market data processing system, which includes at least a data processing device, a database, and an entry device. The data processing device is used to acquire all transaction information from a data source device, process the transaction information, and write it into the database for storage. The database is used to acquire and store transaction information from the data processing device. The entry device is used to establish a long connection with the data source device, and when it receives a market data subscription request from a client device for a target object, it queries the market data of the target object in its memory; if the market data of the target object is not found, it acquires the latest order book information and subsequent changes of the target object from the data source device through the long connection and writes it into its memory, acquires the latest transaction information and subsequent changes of the target object from the database and writes it into its content, and continuously pushes the order book information and transaction information of the target object to the client device; if the market data of the target object is found, it pushes the latest order book information, transaction information, and subsequent changes of the target object to the client device.

[0074] In addition, this application embodiment also provides another market data processing system, which includes a memory for storing computer program instructions and a processor for executing computer program instructions, wherein when the computer program instructions are executed by the processor, the device is triggered to execute the aforementioned market data processing method.

[0075] In particular, the methods and / or embodiments in this application can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowchart. When the computer program is executed by a processing unit, it performs the functions defined in the methods of this application.

[0076] It should be noted that the computer-readable medium described in this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0077] In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, capable of transmitting, propagating, or transmitting a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wireline, optical fiber, RF, etc., or any suitable combination thereof.

[0078] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0079] The flowcharts or block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of devices, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-specific system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0080] In another aspect, this application also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The aforementioned computer-readable medium carries one or more computer program instructions, which may be executed by a processor to implement the methods and / or technical solutions of the various embodiments of this application.

[0081] It should be noted that this application can be implemented in software and / or a combination of software and hardware, for example, using an application-specific integrated circuit (ASIC), a general-purpose computer, or any other similar hardware device. In some embodiments, the software program of this application can be executed by a processor to implement the steps or functions described above. Similarly, the software program of this application (including related data structures) can be stored in a computer-readable recording medium, such as RAM memory, magnetic or optical drives, floppy disks, and similar devices. Furthermore, some steps or functions of this application can be implemented in hardware, for example, as circuitry that cooperates with a processor to perform the various steps or functions.

[0082] It will be apparent to those skilled in the art that this application is not limited to the details of the exemplary embodiments described above, and that this application can be implemented in other specific forms without departing from the spirit or essential characteristics of this application. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of this application is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within this application. No reference numerals in the claims should be construed as limiting the scope of the claims. Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in the apparatus claims may also be implemented by a single unit or device in software or hardware. The terms "first," "second," etc., are used to indicate names and do not indicate any particular order.

Claims

1. A method for processing market data, characterized in that, The market data includes transaction information and order book information. The transaction information is relevant to the actual execution of a transaction, and the order book information is relevant to unexecuted orders submitted by users regarding a specific asset. The data source devices include relay service equipment and data center equipment that interacts with the relay service equipment. The method includes: The data processing equipment obtains all transaction information from the data center equipment through the relay service equipment, processes the transaction information, and writes it into the database for storage. Establish a long-term connection between the entry equipment and the transfer service equipment; When the entry device receives a market data subscription request from the client device for a target object, it queries the market data of the target object in the memory of the entry device. If the market data of the target object is not found, the entry device interacts with the relay service device through the long connection, obtains the latest market information and subsequent changes of the target object from the data center device through the relay service device and writes it into the memory, obtains the latest transaction information and subsequent changes of the target object from the database and writes it into the memory, and continuously pushes the market information and transaction information of the target object to the client device. If the market data of the target object is found, the entry device pushes the latest market information, transaction information and subsequent changes of the target object to the client device. After the entry device writes the order book information and transaction information of the target object into the memory, it generates a time tag. The time tag is reset when the entry device receives a market data subscription request for the target object. When the time tag exceeds the preset time, the entry device stops acquiring subsequent changes in order book information and transaction information, and deletes the order book information and transaction information of the target object from the memory; When any entry device and relay service device have a subscription interaction relationship regarding a target object, the relay service device and the data center device establish a subscription interaction relationship regarding the target object. The subscription interaction relationship includes: after the entry device receives a market data subscription request from the client device regarding the target object, it interacts with the relay service device through the long connection, and obtains the latest market information and subsequent changes of the target object from the data center device through the relay service device. When all entry devices terminate their subscription interaction with the relay service devices regarding the target object, the relay service devices terminate their subscription interaction with the data center devices regarding the target object.

2. The method according to claim 1, characterized in that, The method further includes: When the client device ends its subscription to the target object, the entry device stops pushing the target object's market information and transaction information to the client device.

3. The method according to claim 1, characterized in that, The data center equipment includes at least two sets, and when one set of data center equipment is unable to provide services, the other set of data center equipment provides services.

4. The method according to claim 1, characterized in that, The method further includes: After the market closes, the entry device acquires all order book information and persists the order book information. At the same time, it terminates all subscription interaction relationships between the entry device and the relay service device, as well as between the relay service device and the data center device, and re-establishes the subscription interaction relationships after the start of the new trading day.

5. A market data processing system, characterized in that, The market data includes transaction information and order book information. The transaction information is relevant to the actual execution of a transaction, and the order book information is relevant to unexecuted orders submitted by users for a specific asset. The data source devices include relay service equipment and data center equipment that interacts with the relay service equipment. The system includes: The data processing equipment is used to obtain all transaction information from the data center equipment through the relay service equipment, process the transaction information, and write it into the database for storage. A database is used to retrieve and store transaction information from the data processing device; An entry device establishes a long-term connection with a relay service device. Upon receiving a market data subscription request from a client device for a target object, the entry device queries the market data of the target object in its memory. If the market data of the target object is not found, the entry device interacts with the relay service device through the long-term connection. The relay service device retrieves the latest order book information and subsequent changes of the target object from the data center device and writes them into the memory. It also retrieves the latest transaction information and subsequent changes of the target object from the database and writes them into the memory. The entry device continuously pushes the order book information and transaction information of the target object to the client device. If the market data of the target object is found, the entry device pushes the latest order book information, transaction information, and subsequent changes of the target object to the client device. After writing the order book information and transaction information of the target object into the memory, a time stamp is generated. The time stamp is reset when the entry device receives a market data subscription request for the target object. When the time stamp exceeds a preset time, the acquisition of subsequent changes in order book information and transaction information is stopped, and the order book information and transaction information of the target object are deleted from the memory. When any entry device and relay service device have a subscription interaction relationship regarding a target object, the relay service device and the data center device establish a subscription interaction relationship regarding the target object. The subscription interaction relationship includes: after the entry device receives a market data subscription request from the client device regarding the target object, it interacts with the relay service device through the long connection, and obtains the latest market information and subsequent changes of the target object from the data center device through the relay service device. When all entry devices terminate their subscription interaction with the relay service devices regarding the target object, the relay service devices terminate their subscription interaction with the data center devices regarding the target object.

6. A market data processing system, wherein, The system includes a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein when the computer program instructions are executed by the processor, the system is triggered to perform the method of any one of claims 1 to 4.

7. A computer-readable medium having stored thereon computer program instructions that can be executed by a processor to implement the method as described in any one of claims 1 to 4.