Method and system for supplementing market data based on DPU heterogeneous architecture
By using DPU heterogeneous architecture and streaming processing technology in high-frequency quantitative trading systems, the market data is processed and supplemented in real time, and the problems of insufficient processing speed and high delay in the existing technology are solved, and fast, accurate and orderly data processing is achieved.
Patent Information
- Application Number
- CN202411542842.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-03-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art is difficult to quickly process and fill market data in high-frequency quantitative trading systems, resulting in insufficient processing speed, high delay, and difficulty in implementing data characteristics and order-keeping.
The market data completion method based on the DPU heterogeneous architecture is adopted, and the market data flow is received and parsed at each time point through the DPU network card. The data is processed in real time using streaming processing technology, and the transaction time and contract number are separated into independent channels. Data filtering and filling are carried out based on dictionary order.
It improves data processing speed, ensures data integrity and accuracy, maintains the correct order of data, reduces system delay and resource consumption, and is suitable for high-frequency quantitative trading systems.
Smart Images

Figure CN119645975A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a market data completion method and system based on a DPU heterogeneous architecture. Background Art
[0002] With the continuous development of the financial market and the advancement of technology, quantitative investment has gradually become a mainstream investment method. Quantitative investment uses mathematical models and computer algorithms to analyze market data, formulate trading strategies, and automatically execute transactions. Compared with traditional subjective investment methods, quantitative investment has advantages such as data-driven and systematic. Especially in the field of high-frequency trading, quantitative investment relies on high-speed calculations and precise algorithms executed by trading systems to complete a large number of transactions in a very short time.
[0003] In quantitative investment, especially high-frequency quantitative trading, it is necessary to receive market data from the data source at each time point, and filter out the market data of the subscribed contract number from all the received market data at each time point, and complete the market data of the contract number that is missing in all the market data. The existing technology usually adopts software implementation solutions, which mainly rely on analyzing the missing market data after parsing all the market data at each time point. This method may lead to insufficient processing speed in high-frequency quantitative trading systems. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a market data completion method based on a DPU heterogeneous architecture to eliminate or improve one or more defects existing in the prior art.
[0005] One aspect of the present invention provides a market data completion method based on a DPU heterogeneous architecture, the method is applied to a DPU network card in a DPU heterogeneous architecture, and the steps of the method include:
[0006] Receive the market data stream sent by the data source for the first time every day, which includes the market data of all contract numbers, determine the order of the corresponding contract numbers based on the order of the market data in the market data stream sent by the data source for the first time every day, and number each contract number sequentially;
[0007] Determine the number of the subscribed contract number based on the numbering of the contract number, and sort the subscribed contract number based on the numbering of the subscribed contract number;
[0008] Receive the market data stream at each time point and parse it. For each parsed market data, compare the contract number corresponding to the market data with the contract number corresponding to the currently parsed market data in the order of the subscribed contract number based on the contract number corresponding to the market data to determine the unsubscribed contract number, subscribed contract number and missing subscription contract number;
[0009] At each point in time, the market data corresponding to the missing subscription number is supplemented, and the market data corresponding to all subscribed contract numbers is fed back to the user end.
[0010] In the above process, this solution adopts streaming processing technology, which can receive and process data in real time during the parsing process, ensuring the high speed of the processing process. By separating the transaction time and contract number into one channel, the market data sent by the data source on the same day has the same order of contract numbers, and the market data is processed separately. The system can filter and complete the data at the same time, which improves the overall data processing efficiency. This solution is suitable for high-frequency quantitative trading systems and ensures data processing speed.
[0011] In some embodiments of the present invention, the step of comparing the numbers of the contract numbers corresponding to the market data in the order of the numbers of the subscribed contract numbers with the numbers of the contract numbers corresponding to the currently parsed market data to determine the unsubscribed contract numbers, the subscribed contract numbers and the missing subscription contract numbers includes:
[0012] In the order of the subscribed contract numbers, the subscribed contract numbers are used as comparison numbers one by one, and the comparison numbers of the contract numbers corresponding to the currently parsed market data are compared with the comparison numbers to determine the unsubscribed contract numbers, subscribed contract numbers, and missing subscription contract numbers.
[0013] In some embodiments of the present invention, in the step of using the numbers of the subscribed contract numbers one by one as comparison numbers in the order of the numbers of the subscribed contract numbers, comparing the numbers of the contract numbers corresponding to the currently parsed market data with the comparison numbers, and determining the unsubscribed contract numbers, the subscribed contract numbers, and the missing subscription contract numbers, the steps include:
[0014] If the number of the contract number corresponding to the market data is smaller than the comparison number, the contract number corresponding to the market data is determined to be an unsubscribed contract number, and the market data corresponding to the contract number is discarded.
[0015] In some embodiments of the present invention, the step of using the numbers of the subscribed contract numbers one by one as comparison numbers in the order of the numbers of the subscribed contract numbers, and comparing the numbers of the contract numbers corresponding to the currently parsed market data with the comparison numbers includes:
[0016] If the number of the contract number corresponding to the market data is equal to the comparison number, the contract number corresponding to the market data is determined to be the subscribed contract number, the market data corresponding to the contract number is read, and the market data corresponding to the contract number is sent to the user end.
[0017] In some embodiments of the present invention, the step of using the numbers of the subscribed contract numbers one by one as comparison numbers in the order of the numbers of the subscribed contract numbers, and comparing the numbers of the contract numbers corresponding to the currently parsed market data with the comparison numbers includes:
[0018] If the contract number corresponding to the market data is greater than the comparison number, the contract number corresponding to the current comparison number is determined to be the missing subscription contract number, and the market data of the missing subscription contract number is completed and sent to the user end.
[0019] In some implementations of the present invention, the step of completing the missing market data of the subscription contract number includes:
[0020] Supplement the preset template data with the market data of the missing subscription contract number.
[0021] In some embodiments of the present invention, the step of using the numbers of the subscribed contract numbers one by one as comparison numbers in the order of the numbers of the subscribed contract numbers, and comparing the numbers of the contract numbers corresponding to the currently parsed market data with the comparison numbers also includes:
[0022] If the number of the contract number corresponding to the market data is greater than or equal to the comparison number, the comparison number is changed to the number of the next contract number in the sequence based on the sequence of the subscribed contract numbers.
[0023] In some implementations of the present invention, after determining that the contract number corresponding to the market data is an unsubscribed contract number, the method further includes:
[0024] After reading the market data corresponding to the contract number, the market data corresponding to the contract number is discarded.
[0025] In some embodiments of the present invention, in the step of determining the order of corresponding contract numbers based on the order of market data in the market data stream sent by the data source for the first time each day, and sequentially numbering each contract number, the contract numbers corresponding to the market data in the market data stream sent by the data source for the first time each day are sequentially numbered in an increasing order of natural numbers.
[0026] The second aspect of the present invention also provides a market data completion system based on a DPU heterogeneous architecture, the system comprising a computer device and a DPU network card, the DPU network card comprising a processor and a memory, the memory storing computer instructions, the processor being used to execute the computer instructions stored in the memory, and when the computer instructions are executed by the processor, the system implements the steps implemented by the method described above.
[0027] The third aspect of the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps implemented by the aforementioned market data completion method based on a DPU heterogeneous architecture.
[0028] Additional advantages, purposes, and features of the present invention will be described in part in the following description, and will become apparent to those skilled in the art after studying the following, or may be learned from the practice of the present invention. The purposes and other advantages of the present invention can be specifically pointed out and obtained in the specification and the accompanying drawings.
[0029] Those skilled in the art will appreciate that the objectives and advantages that can be achieved with the present invention are not limited to the above specific description, and the above and other objectives that can be achieved by the present invention will be more clearly understood from the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The drawings described herein are used to provide a further understanding of the present invention, constitute a part of this application, and do not constitute a limitation of the present invention.
[0031] Figure 1 A schematic diagram of an implementation of a method for completing market data based on a DPU heterogeneous architecture according to the present invention;
[0032] Figure 2 A schematic diagram of the dual-channel processing architecture of the present invention;
[0033] Figure 3 A schematic diagram of an implementation of a market data completion method based on a DPU heterogeneous architecture of the present invention. DETAILED DESCRIPTION
[0034] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments and the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0035] It should also be noted that, in order to avoid obscuring the present invention due to unnecessary details, only structures and / or processing steps closely related to the solutions according to the present invention are shown in the accompanying drawings, while other details that are not closely related to the present invention are omitted.
[0036] In the high-frequency quantitative trading of existing technologies, time series strategies rely on the rapid acquisition and accurate analysis of market data. Market data usually arrives in the form of time series, and trading strategies need to make real-time decisions based on this data. However, the market data sent by the exchange is not always complete, and data may be missing or delayed. Incompleteness is not a fault, usually because the contract trading corresponding to the contract number in this time slice is not active. This is also very important information for most high-frequency trading strategies, and the strategy needs to be prompted by completing the data. In order to ensure the accuracy and effectiveness of time series strategies, the system needs to have a fast completion function to complete the incomplete market data. The fast completion function is implemented through a hardware acceleration system, which can complete the missing data in a very short time to ensure the integrity and continuity of the data. This is crucial for the signal correction and decision execution of time series strategies. Through fast completion, the trading system can judge the changes in market conditions in real time, adjust the trading strategy in time, and improve the accuracy and yield of transactions.
[0037] In the existing high-frequency quantitative trading system, the scheme for judging and filling missing data based on market data mainly relies on software implementation. These software schemes usually complete the data filling through the following steps: First, the software receives real-time market data from the exchange or data provider and parses the data. The parsed data usually contains key fields such as timestamp, price, and trading volume. Next, the software performs an integrity check on the received data to determine whether there is data missing or delayed. Common methods include comparing the timestamp of the current data with the timestamp of the previous data and checking the continuity of the time series. When missing data is detected, the software will mark the missing data. The marking method is usually to record the timestamp and related information of the missing data for subsequent filling processing. Subsequently, the software generates the filling data based on the marking information of the missing data. Finally, the filled data will be stored in the database or transmitted to other modules of the trading system for use by trading strategies.
[0038] The existing processing solutions have the following defects:
[0039] 1. Inefficient processing
[0040] Existing software implementation solutions mainly rely on processing each data item after receiving all the data. This method may lead to insufficient processing speed in high-frequency quantitative trading systems. Due to the high-speed update frequency of market data, the software needs to complete the detection, marking and completion of missing data in a very short time. However, the nature of software processing limits its speed and efficiency when processing large-scale data. In addition, software-based processing usually involves multiple stages of data processing, and the processing delays at each stage may accumulate, resulting in increased delays in overall data processing.
[0041] 2. High latency
[0042] When missing data is detected, it needs to go through a marking and filling process to make the data complete, which increases the overall time of data processing. In a high-frequency trading environment, even millisecond delays may affect the timeliness and correctness of trading decisions. Existing technologies usually cannot guarantee the minimum delay between data reception and processing, which is a significant disadvantage in a highly competitive trading environment.
[0043] 3. Data features are not fully utilized
[0044] Existing filling methods such as interpolation or historical data backfilling usually do not fully utilize the intrinsic characteristics of market data, such as lexicographic order. The market data of each time slice published by the exchange is arranged in lexicographic order, which can provide additional contextual information for data filling and help to find the existence of missing data more quickly and accurately. However, current software solutions often ignore this structural feature, resulting in the inability to speed up the filling behavior.
[0045] 4. Difficulty in achieving order preservation
[0046] When pushing market data, maintaining the original order of data (i.e., lexicographic order) is crucial for executing accurate trading strategies. However, existing data completion solutions may not be able to effectively guarantee the timing and order of data when dealing with missing data, especially when encountering a large amount of consecutive missing data, which in turn affects the judgment and execution of trading algorithms.
[0047] like Figure 1 As shown, the present invention proposes a market data completion method based on DPU heterogeneous architecture. DPU (Data Processing Unit) is a processor optimized for data processing. Compared with CPU and GPU, it has higher parallel computing capability and energy efficiency. DPU adopts highly optimized hardware architecture, is specially designed and optimized for large-scale data processing tasks, can efficiently perform data-intensive tasks, and provide faster computing speed and lower latency.
[0048] DPU is responsible for data input, output, storage and calculation operations to provide high-performance and efficient data processing. DPU is widely used in artificial intelligence, machine learning, edge computing and high-performance computing. It can accelerate the training and reasoning process of neural network models, process large-scale data sets, and provide strong support for deep learning and big data analysis. In addition, DPU also has efficient network connections, packet processing accelerators and security functions such as encryption, firewalls and VPNs, making it an ideal choice for data centers and cloud computing environments.
[0049] In the specific implementation process, this solution applies the hardware acceleration system to the quantitative trading system. The hardware acceleration system can significantly improve the data processing speed, reduce system latency, and improve transaction execution efficiency through parallel computing and dedicated hardware circuits.
[0050] In a specific implementation process, the method is applied to a DPU network card in a DPU heterogeneous architecture, and the steps of the method include:
[0051] Step S100, receiving the market data stream sent by the data source for the first time every day, the market data stream sent by the data source for the first time every day includes the market data of all contract numbers, determining the order of the corresponding contract numbers based on the order of the market data in the market data stream sent by the data source for the first time every day, and sequentially numbering each contract number;
[0052] like Figure 2 As shown, in the specific implementation process, the data source continuously sends data packets containing transaction time, contract number and market data. These data packets are sent in sequence. The contract numbers of each packet may not be continuous, but they all follow the lexicographical order of increase. Specifically, this solution first receives the market data sent by the data source through the network interface, and then parses each data packet to extract the transaction time, contract number string and market data. The transaction time and contract number are separated and extracted as a separate channel to be pushed to the subsequent module, and the market data is separated and extracted as another channel to wait for the subsequent module to read.
[0053] By adopting the above solution, the transaction time and contract number are separated from the market data into two independent processing channels. This separation allows the system to specialize in different aspects of the data, improving the efficiency and flexibility of data processing. This method reduces the complexity of data processing and allows the system to increase the processing speed while maintaining data integrity. It is an innovative solution that improves the real-time and reliability of high-frequency trading systems.
[0054] Step S200, determining the number of the subscribed contract number based on the numbering of the contract number, and sorting the subscribed contract number based on the numbering of the subscribed contract number;
[0055] In the specific implementation process, users subscribe to the market data of a specific contract number. This solution only processes and reports the data of the contract number subscribed by the user. When the system is initialized, the contract number information subscribed by the user will be stored in a heterogeneous manner. The receiving module will filter the received data and only retain the data of the subscribed contract number, ignoring the data of the unsubscribed contract number. Based on the fixed exchange data format length, the unsubscribed data will be discarded, and then the next data will be read in a streaming manner.
[0056] Step S300, receiving the market data stream at each time point and parsing it. For each parsed market data, based on the number of the contract number corresponding to the market data, the subscribed contract number is compared with the number of the contract number corresponding to the currently parsed market data in the order of the number of the subscribed contract number to determine the unsubscribed contract number, the subscribed contract number and the missing subscription contract number;
[0057] In the specific implementation process, using the sorted list of contract numbers, this solution can predict and determine the next data that should be reported, so as to achieve timely completion of missing data. This lexicographical completion mechanism ensures the integrity and accuracy of the data and optimizes the real-time data processing flow.
[0058] The above scheme adopts a streaming processing method. Whenever a market data is parsed, it can be determined whether the contract number is the subscribed contract number based on the number of the contract number corresponding to the market data, and then recorded, discarded or completed. Compared with the method of parsing all the data and then analyzing the market data of the missing subscription number, it can greatly improve the processing efficiency.
[0059] Step S400, at each time point, the market data corresponding to the missing subscription number is supplemented, and the market data corresponding to all the subscribed contract numbers are fed back to the user end.
[0060] In the specific implementation process, this solution ensures that all data are sorted and reported in the lexicographic order of transaction time and contract number when processing the completed data and the actual received data. This applies not only to the original data, but also to the completed data, ensuring the continuity and logical consistency of the data flow, which is crucial for executing time series-based trading strategies. The order-preserving processing method in the present invention ensures the accurate order of data reporting and is an important improvement over the prior art.
[0061] In the above process, this solution adopts streaming processing technology, which can receive and process data in real time during the parsing process, ensuring the high speed of the processing process. By separating the transaction time and contract number into one channel, the market data sent by the data source on the same day has the same order of contract numbers, and the market data is processed separately. The system can filter and complete the data at the same time, which improves the overall data processing efficiency. This solution is suitable for high-frequency quantitative trading systems and ensures data processing speed.
[0062] like Figure 3 As shown, in some embodiments of the present invention, the step of comparing the numbers of the contract numbers corresponding to the market data based on the numbers of the contract numbers corresponding to the market data in the order of the numbers of the subscribed contract numbers with the numbers of the contract numbers corresponding to the currently parsed market data to determine the unsubscribed contract numbers, the subscribed contract numbers and the missing subscription contract numbers may include:
[0063] In the order of the subscribed contract numbers, the subscribed contract numbers are used as comparison numbers one by one, and the comparison numbers of the contract numbers corresponding to the currently parsed market data are compared with the comparison numbers to determine the unsubscribed contract numbers, subscribed contract numbers, and missing subscription contract numbers.
[0064] like Figure 3 As shown, in some embodiments of the present invention, in the order of the numbers of the subscribed contract numbers, the numbers of the subscribed contract numbers are used as comparison numbers one by one, the numbers of the contract numbers corresponding to the currently parsed market data are compared with the comparison numbers, and the step of determining the unsubscribed contract numbers, the subscribed contract numbers and the missing subscription contract numbers may include:
[0065] If the number of the contract number corresponding to the market data is smaller than the comparison number, the contract number corresponding to the market data is determined to be an unsubscribed contract number, and the market data corresponding to the contract number is discarded.
[0066] In some embodiments of the present invention, the step of using the numbers of the subscribed contract numbers one by one as comparison numbers in the order of the numbers of the subscribed contract numbers, and comparing the numbers of the contract numbers corresponding to the currently parsed market data with the comparison numbers may include:
[0067] If the number of the contract number corresponding to the market data is equal to the comparison number, the contract number corresponding to the market data is determined to be the subscribed contract number, the market data corresponding to the contract number is read, and the market data corresponding to the contract number is sent to the user end.
[0068] In some embodiments of the present invention, the step of using the numbers of the subscribed contract numbers one by one as comparison numbers in the order of the numbers of the subscribed contract numbers, and comparing the numbers of the contract numbers corresponding to the currently parsed market data with the comparison numbers may include:
[0069] If the contract number corresponding to the market data is greater than the comparison number, the contract number corresponding to the current comparison number is determined to be the missing subscription contract number, and the market data of the missing subscription contract number is completed and sent to the user end.
[0070] In some embodiments of the present invention, the step of completing the missing market data of the subscription contract number includes: completing the missing market data of the subscription contract number with preset template data.
[0071] In the specific implementation process, for a subscribed contract number, if it does not exist in the market data at a certain point in time, the data of the contract number needs to be supplemented, and the value of the supplemented market data is set to zero; specifically, since the system receives all subscribed contract numbers arranged in lexicographic order during initialization, when processing the data at each point in time, the system can infer the next reported subscription contract number for each data report. When the lexicographic order of the received contract number is greater than the contract number to be reported, the system can be informed that there is a missing subscription contract between the two. For each missing subscription contract, the system will generate a data packet containing the same transaction time and contract number, in which the market data is set to 0, that is, the template data.
[0072] In some embodiments of the present invention, the step of using the numbers of the subscribed contract numbers as comparison numbers one by one in the order of the numbers of the subscribed contract numbers, and comparing the number of the contract number corresponding to the currently parsed market data with the comparison number, further includes: if the number of the contract number corresponding to the market data is greater than or equal to the comparison number, then based on the order of the numbers of the subscribed contract numbers, changing the comparison number to the number of the next contract number in the order.
[0073] In the specific implementation process, the completion logic of this solution only relies on minimized parameters, namely the reported contract number and transaction time and the contract number and transaction time of the received new market data, avoiding additional state variables and data storage, significantly reducing the system's memory usage and processing delays, and achieving efficient data processing through streamlined logic and minimized resource requirements. This is especially important in resource-constrained trading systems, providing a highly resource-efficient solution.
[0074] In some implementations of the present invention, after determining that the contract number corresponding to the market data is an unsubscribed contract number, the method further includes:
[0075] After reading the market data corresponding to the contract number, the market data corresponding to the contract number is discarded.
[0076] In some embodiments of the present invention, in the step of determining the order of corresponding contract numbers based on the order of market data in the market data stream sent by the data source for the first time each day, and sequentially numbering each contract number, the contract numbers corresponding to the market data in the market data stream sent by the data source for the first time each day are sequentially numbered in an increasing order of natural numbers.
[0077] The beneficial effects of this program include:
[0078] 1. Limitation of data processing speed
[0079] In high-frequency quantitative trading systems, data processing speed is a key competitive advantage. Traditional systems often cannot achieve ideal processing speeds due to processing complexity or data structure limitations; the present invention uses streaming processing technology to greatly improve the speed of data processing, thereby solving the technical problem of slow data processing speed.
[0080] 2. Completeness and accuracy of market data
[0081] The integrity of market data is crucial for quantitative trading decisions. Traditional systems may not be able to effectively fill in missing or misordered data, resulting in decisions based on incomplete or inactive data. The present invention automatically detects and accurately fills in missing market data through hardware filling logic, and ensures the integrity of market data and provides information on whether the subscription contract is traded actively.
[0082] 3. Maintaining data order
[0083] For quantitative trading strategies that rely on time series analysis, data order is indispensable. When processing large amounts of data, maintaining the correct order of data is a major challenge. The order-preserving processing mechanism of the present invention ensures that all data is correctly sorted according to the lexicographical order of transaction time and contract number, effectively solving the problem of data order.
[0084] 4. Waste of system resources
[0085] In an unoptimized data processing system, processing non-target data consumes a large amount of computing and storage resources, resulting in a waste of resources; the present invention does not introduce new data for state storage during the entire processing process, thereby minimizing resource consumption.
[0086] An embodiment of the present invention also provides a market data completion system based on a DPU heterogeneous architecture, the system comprising a computer device and a DPU network card, the DPU network card comprising a processor and a memory, the memory storing computer instructions, the processor being used to execute the computer instructions stored in the memory, and when the computer instructions are executed by the processor, the system implements the steps implemented by the method described above.
[0087] The embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps implemented by the aforementioned method for completing market data based on a heterogeneous DPU architecture are implemented. The computer-readable storage medium can be a tangible storage medium, such as a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a floppy disk, a hard disk, a removable storage disk, a CD-ROM, or any other form of storage medium known in the technical field.
[0088] It should be understood by those skilled in the art that the exemplary components, systems and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software or a combination of the two. Whether it is 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 the present invention. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present invention are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link via a data signal carried in a carrier.
[0089] It should be clear that the present invention is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present invention.
[0090] In the present invention, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with features of other embodiments or replace features of other embodiments.
[0091] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the embodiments of the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for completing market data based on DPU heterogeneous architecture, characterized in that: The method is applied to a DPU network card in a DPU heterogeneous architecture, and the steps of the method include: Receive the market data stream sent by the data source for the first time every day, which includes the market data of all contract numbers, determine the order of the corresponding contract numbers based on the order of the market data in the market data stream sent by the data source for the first time every day, and number each contract number sequentially; Determine the number of the subscribed contract number based on the numbering of the contract number, and sort the subscribed contract number based on the numbering of the subscribed contract number; Receive the market data stream at each time point and parse it. For each parsed market data, compare the contract number corresponding to the market data with the contract number corresponding to the currently parsed market data in the order of the subscribed contract number based on the contract number corresponding to the market data to determine the unsubscribed contract number, subscribed contract number and missing subscription contract number; At each point in time, the market data corresponding to the missing subscription number is supplemented, and the market data corresponding to all subscribed contract numbers is fed back to the user end.
2. The method for completing market data based on DPU heterogeneous architecture according to claim 1 is characterized in that: The step of comparing the numbers of the contract numbers corresponding to the market data in the order of the numbers of the subscribed contract numbers with the numbers of the contract numbers corresponding to the currently parsed market data to determine the unsubscribed contract numbers, the subscribed contract numbers and the missing subscription contract numbers includes: In the order of the subscribed contract numbers, the subscribed contract numbers are used as comparison numbers one by one, and the comparison numbers of the contract numbers corresponding to the currently parsed market data are compared with the comparison numbers to determine the unsubscribed contract numbers, subscribed contract numbers, and missing subscription contract numbers.
3. The method for completing market data based on DPU heterogeneous architecture according to claim 2 is characterized in that: In the step of using the numbers of the subscribed contract numbers one by one as comparison numbers in the order of the numbers of the subscribed contract numbers, comparing the numbers of the contract numbers corresponding to the currently parsed market data with the comparison numbers, and determining the unsubscribed contract numbers, the subscribed contract numbers, and the missing subscription contract numbers, the following steps are included: If the number of the contract number corresponding to the market data is smaller than the comparison number, the contract number corresponding to the market data is determined to be an unsubscribed contract number, and the market data corresponding to the contract number is discarded.
4. The method for completing market data based on DPU heterogeneous architecture according to claim 2 is characterized in that: In the step of using the numbers of the subscribed contract numbers one by one as comparison numbers in the order of the numbers of the subscribed contract numbers, and comparing the numbers of the contract numbers corresponding to the currently parsed market data with the comparison numbers, the following steps are included: If the number of the contract number corresponding to the market data is equal to the comparison number, the contract number corresponding to the market data is determined to be the subscribed contract number, the market data corresponding to the contract number is read, and the market data corresponding to the contract number is sent to the user end.
5. The method for completing market data based on DPU heterogeneous architecture according to claim 2 is characterized in that: In the step of using the numbers of the subscribed contract numbers one by one as comparison numbers in the order of the numbers of the subscribed contract numbers, and comparing the numbers of the contract numbers corresponding to the currently parsed market data with the comparison numbers, the following steps are included: If the contract number corresponding to the market data is greater than the comparison number, the contract number corresponding to the current comparison number is determined to be the missing subscription contract number, and the market data of the missing subscription contract number is completed and sent to the user end.
6. The method for completing market data based on DPU heterogeneous architecture according to claim 5 is characterized in that: The step of completing the missing market data of the subscription contract number includes: Supplement the preset template data with the market data of the missing subscription contract number.
7. The method for completing market data based on DPU heterogeneous architecture according to any one of claims 2 to 6, characterized in that: In the step of using the numbers of the subscribed contract numbers one by one as comparison numbers in the order of the numbers of the subscribed contract numbers, and comparing the numbers of the contract numbers corresponding to the currently parsed market data with the comparison numbers, the following step is also included: If the number of the contract number corresponding to the market data is greater than or equal to the comparison number, the comparison number is changed to the number of the next contract number in the sequence based on the order of the subscribed contract numbers.
8. The method for completing market data based on DPU heterogeneous architecture according to claim 3 is characterized in that: After determining that the contract number corresponding to the market data is an unsubscribed contract number, the method further includes: After reading the market data corresponding to the contract number, the market data corresponding to the contract number is discarded.
9. The method for completing market data based on DPU heterogeneous architecture according to claim 1, characterized in that: In the step of determining the order of corresponding contract numbers based on the order of market data in the market data stream sent for the first time each day by the data source, and sequentially numbering each contract number, the contract numbers corresponding to the market data in the market data stream sent for the first time each day by the data source are sequentially numbered in increasing order of natural numbers.
10. A market data completion system based on DPU heterogeneous architecture, characterized in that: The system includes a computer device and a DPU network card, the DPU network card includes a processor and a memory, the memory stores computer instructions, the processor is used to execute the computer instructions stored in the memory, and when the computer instructions are executed by the processor, the system implements the steps implemented by the method as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Method and electronic equipment used for quantitative trading
CN107451876A
Financial market contract data receiving method and device
CN116962513A
Data transmission method based on DPU, DPU, electronic equipment and computer storage medium
CN118784586A
Methods and systems to quantify and index correlation risk in financial markets and risk management contracts thereon
US11080789B1
Cited By
Multi-batch consensus and serial number anchoring sequence reconstruction market data checking and supplementing method
CN122288877A