Network packet processing method

By immediately checking and processing a single checksum of market data in network packets in high-frequency transactions on the receiving end, the problem of low processing efficiency under traditional protocols is solved, and the effect of rapid utilization of market data is achieved.

CN119696801APending Publication Date: 2025-03-25CHROMA ATE (SUZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311227401.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-22
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

In high-frequency trading, the traditional user datagram protocol causes the receiver to wait for the entire network packet to be received and passed before processing the market data within the application category, resulting in poor processing efficiency and being unable to quickly utilize the market data.

Method used

A network packet processing method is proposed. After receiving the first market data in the file header category and application category, the receiver immediately checks the single checksum of the first market data. If the inspection is passed, the first market data will be processed immediately and the subsequent market data will be continued.

Benefits of technology

By immediately processing complete market data, the processing speed of multiple market data in network packets has been significantly accelerated, and the rapid utilization of multiple market data in application categories is achieved in high-frequency trading.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119696801A_ABST
    Figure CN119696801A_ABST
Patent Text Reader

Abstract

The invention provides a network packet processing method which is applied to a high-frequency transaction system, a network packet comprises a file header category, an application category and an inspection category, and the application category at least comprises first market data and second market data. The network packet processing method comprises the following steps of: receiving a file header category in a network packet by a receiving end; receiving, by a receiving end, first market data in the application category; checking a first single checksum in the first market information data by the receiving end, wherein the first single checksum is used for checking the integrity of the first market information data; and after the first single check sum passes the check, the receiving end processes the first market data. Wherein the check category comprises a whole checksum, and the whole checksum is used for judging the integrity of the network packet.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to a network packet processing method, and more particularly to a network packet processing method that can quickly utilize data within an application category. Background Art

[0002] When transmitting network packets, the commonly used communication protocols are the Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP). Those with general knowledge in the relevant technical field should know that because the User Datagram Protocol does not guarantee the correctness of the content of the network packet, in order to confirm that the received network packet is a valid network packet, the User Datagram Protocol will wait until the entire network packet is received and the received network packet is confirmed to be a valid network packet before processing the data in the network packet. For example, the bytes in the network packet can have multiple bytes, corresponding to different categories, such as the header category, the application category, and the check category. In practice, the receiving end will wait until the entire network packet (file header category, application category, and check category) is received, and then determine whether the checksum in the check category is correct to determine whether the integrity of the network packet is complete. When the receiving end determines that the network packet is complete, it will process the data in the network packet that belongs to the application category.

[0003] However, with the development of high-frequency trading, when the traditional user datagram protocol is used to transmit network packets between the exchange end and the receiving end of the broker, there may be problems with poor processing efficiency. For example, suppose a network packet transmitted by the exchange end contains multiple market data, and the receiving end of the broker must wait until all the market data is received, and the checksum in the check category in the network packet must also pass the check before it can process the multiple market data in the application category. From the above, it can be seen that because the receiving end of the broker has to wait for the integrity of the network packet to be checked, it is unable to quickly process the market data in the network packet, resulting in the user being unable to obtain the most real-time market data and affecting the progress of high-frequency trading. Therefore, the industry needs a new network packet processing method that can improve the traditional user datagram protocol to reduce the waiting time for checking the integrity of the network packet. Summary of the invention

[0004] In order to solve the above-mentioned technical problems, the main purpose of this application is to provide a network packet processing method, which improves the traditional user datagram protocol, so that multiple market data within the application category can be quickly utilized in high-frequency trading.

[0005] The present application proposes a network packet processing method, which is applied to a high-frequency trading system, wherein the network packet includes a file header category, an application category, and an inspection category, and the application category includes at least a first market data and a second market data. The network packet processing method includes the following steps: a receiving end receives a file header category in a network packet; a receiving end receives a first market data in an application category; a receiving end checks a first single checksum in the first market data, and the first single checksum is used to check the integrity of the first market data; after the first single checksum passes the check, the receiving end processes the first market data. The inspection category includes a whole checksum, and the whole checksum is used to determine the integrity of the network packet.

[0006] In some embodiments, the first market data and the second market data may be respectively associated with different market data provided by the exchange. In addition, the receiving end may determine whether the network packet is transmitted from the exchange based on the file header type.

[0007] In some embodiments, when the receiving end determines that all bytes belonging to the first market data have been completely received according to the first single checksum, the receiving end can determine that the first single checksum has passed the check. In addition, after the first single checksum has passed the check, the receiving end can further receive the second market data in the application category in sequence. In addition, the receiving end can be a field programmable gate array (FPGA).

[0008] In summary, the network packet processing method provided by the present application can not only check the integrity of the entire network packet according to the traditional user datagram protocol, but also immediately process the market data with integrity within the application category, so that multiple market data within the application category can be quickly utilized in high-frequency trading.

[0009] The details of other effects and embodiments of the present application are described below with reference to the drawings. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0011] Figure 1 is a functional block diagram of a high-frequency trading system using a network packet processing method according to an embodiment of the present application;

[0012] Figure 2 This is a schematic diagram of traditional network packet processing;

[0013] Figure 3 is a schematic diagram of network packet processing according to an embodiment of the present application;

[0014] Figure 4 is a schematic diagram of network packet processing according to another embodiment of the present application;

[0015] Figure 5 It is a flowchart of the steps of a network packet processing method according to an embodiment of the present application.

[0016] Explanation of symbols

[0017] 1: High-frequency trading system 10: Exchange end

[0018] 12: Receiving end 100: File header category

[0019] 120: Application category 140: Inspection category

[0020] D1: First market data D2: Second market data

[0021] D3: The third market data D4: The fourth market data DETAILED DESCRIPTION

[0022] The positional relationships described in the following embodiments include: up, down, left and right. Unless otherwise specified, they are all based on the directions in which the components are drawn in the drawings.

[0023] Please also read Figure 1 , Figure 2 and Figure 3 , Figure 1 It is a functional block diagram of a high-frequency trading system applying a network packet processing method according to an embodiment of the present application. Figure 2 This is a diagram of traditional network packet processing. Figure 31 is a schematic diagram of network packet processing according to an embodiment of the present application. As shown in the figure, the high-frequency trading system 1 includes an exchange terminal 10 and a receiving terminal 12 of a brokerage firm. The exchange terminal 10 may be a host of the exchange, and the receiving terminal 12 may be a computer for risk verification, a field programmable gate array (FPGA), or other devices that can be used for calculations. Generally speaking, the exchange terminal 10 and the receiving terminal 12 of the brokerage firm transmit market data using the user datagram protocol (UDP), and the bytes belonging to the market data are in the application category of the network packet. However, when the exchange terminal 10 transmits a large amount of market data in a network packet, the receiving terminal 12 of the brokerage firm needs to wait for the entire network packet (file header category 100, application category 120, and check category 140) to be received, and check the checksum (entire transaction checksum) in the check category 140 of the network packet to determine that the integrity of the network packet is complete before processing the large amount of market data in the application category 120. Although the contents of the network packets are guaranteed to be complete, the receiving end 12 of the brokerage firm cannot quickly transmit the received market data or perform subsequent processing.

[0024] by Figure 2 For example, according to the traditional UDP architecture, the receiving end 12 will sequentially receive the file header category 100 and application category 120 of the network packet, and use the last one or more bytes of the network packet as the inspection category 140. However, since the application category 120 of a network packet may include a number of consecutive market data (such as market data D1-D4), the traditional receiving end 12 will wait until all the market data are received before processing the market data in the order of reception. Figure 3 For example, the present application improves the traditional user datagram protocol architecture. Although the receiving end 12 still receives the file header category 100 and the application category 120 of the network packet in sequence, after the first market data D1 in the application category 120 is received, the checksum (first single checksum) in the first market data D1 is directly checked. Here, since the file header category 100 indicates the basic data and source of the network packet, the receiving end 12 can determine that the network packet is provided by the known exchange end 10 based on the file header category 100.

[0025] Then, when the checksum in the first market data D1 is correct, it means that all bytes of the first market data D1 have been completely received, and the broker's receiving end 12 can directly process (for example, transmit, calculate or apply other applications) the first market data D1 that has been completely received, without waiting for all bytes of the network packet to be received. In one example, after the first single checksum passes the check, when the broker's receiving end 12 performs subsequent processing on the first market data D1, the broker's receiving end 12 can also continue to receive the next market data (for example, the second market data D2). Figure 3 It can be seen that the processing of the first market data D1 and the receiving of the second market data D2 can be performed simultaneously, thereby greatly reducing the time for the market data to wait for processing. Of course, this embodiment does not limit the time point at which the receiving end 12 of the broker performs subsequent processing on the first market data D1. A person with ordinary knowledge in the relevant technical field should understand that as long as the receiving end 12 of the broker can process the first market data D1 before receiving the inspection category 140 of the network packet, it is actually more efficient than the traditional user datagram protocol architecture.

[0026] On the other hand, if a single checksum corresponding to a certain market data is incorrect, the network packet processing method of the present application can also skip the incorrect market data and directly process other market data. Figure 1 and Figure 4 , Figure 4This is a schematic diagram of network packet processing according to another embodiment of the present application. As shown in the figure, after the single checksums corresponding to the first market data D1, the second market data D2 and the third market data D3 are successively checked, the receiving end 12 of the brokerage can not only immediately process the first market data D1, the second market data D2 and the third market data D3, but also continue to receive the fourth market data D4 in the application category 120. Assuming that the checksum (the fourth single checksum) in the fourth market data D4 is incorrect, the receiving end 12 of the brokerage will determine that the fourth market data D4 is not completely received, and will not process the bytes corresponding to the fourth market data D4. At the same time, because the network packet is still being received, the receiving end 12 of the brokerage will still wait to receive the bytes of the check category 140, and determine whether the entire network packet has been completely received based on the checksum (the entire checksum) in the check category 140. From the above, it can be seen that the traditional user datagram protocol architecture judges the integrity of the entire network packet. When the bytes of the fourth market data D4 are not received completely, other completely received market data will not be used. In other words, since the traditional user datagram protocol checks the integrity of the entire network packet at once, more bits are checked, which means that incompleteness is more likely to occur. In contrast, the network packet processing method of the present application will find incomplete market data (such as the fourth market data D4 mentioned above) and directly skip the incomplete market data, but at the same time will process other complete market data in advance, which is obviously able to more effectively utilize the valid content in the network packet.

[0027] It is worth mentioning that, since the network packet processing method of the present application is an improvement on the traditional user datagram protocol, it will actually check the entire checksum in the inspection category of the network packet to determine the integrity of the entire network packet. For example, in the above example, one of the market data is incomplete (such as the second market data D2 mentioned above), the network packet processing method of the present application will also find that the entire network packet is incomplete when the entire checksum in the inspection category is finally checked. The present application can continue to use the processing mechanism of the traditional user datagram protocol, for example, to obtain the missing market data from subsequent network packets, which will not be elaborated in this embodiment. In addition, although the network packet processing method of the present application can be applied to general computers, it may not be able to parse multiple market data in the application category separately due to the limitations of the operating system, and corresponding settings or changes need to be made first. In contrast, field programmable gate arrays (FPGAs) have fewer restrictions and higher flexibility in use.

[0028] To further illustrate the network packet processing method provided by this application, please refer to Figures 1 to 5 , Figure 51 is a flowchart of the steps of the network packet processing method according to an embodiment of the present application. As shown in the figure, in step S20, the receiving end 12 receives the file header category 100 in the network packet. In step S22, the receiving end 12 receives the first market data D1 in the application category 120. In step S24, the receiving end 12 checks the first single checksum in the first market data D1. In step S26, after the first single checksum passes the check, the receiving end 12 processes the first market data D1. The details of the above step flow have been described in the aforementioned embodiment and will not be repeated here.

[0029] In summary, the network packet processing method provided by the present application will determine the integrity of multiple market data in the application category one by one, and immediately process the market data with integrity in the application category. Therefore, the network packet processing method provided by the present application can significantly speed up the processing speed of multiple market data in the network packet, so that multiple market data in the application category can be quickly used in high-frequency trading. In addition, the network packet processing method provided by the present application will still check the integrity of the entire network packet according to the traditional user datagram protocol, and can also ensure that the network packet can be correctly transmitted.

[0030] The embodiments and / or implementation methods described above are only used to illustrate the preferred embodiments and / or implementation methods for realizing the technology of the present application, and are not intended to limit the implementation methods of the technology of the present application in any form. Any technical personnel in this field may make slight changes or modifications to other equivalent embodiments without departing from the scope of the technical means disclosed in the content of the present application, but they should still be regarded as technologies or embodiments that are essentially the same as the present application.

Claims

1. A network packet processing method, applied to a high-frequency trading system, wherein a network packet includes a file header category, an application category and a check category, and the application category includes at least a first market data and a second market data, characterized in that: The network packet processing method comprises: Receiving a header type in the network packet from a receiving end; The receiving end receives the first market data in the application category; The receiving end checks a first single checksum in the first market data, where the first single checksum is used to check the integrity of the first market data; and After the first single transaction verification is passed, the receiving end processes the first market data; The inspection category includes a whole checksum, which is used to determine the integrity of the network packet.

2. The network packet processing method according to claim 1, characterized in that: The first market data and the second market data are respectively associated with different market data provided by an exchange.

3. The network packet processing method according to claim 2, characterized in that: The receiving end determines whether the network packet is transmitted from the switch end according to the file header type.

4. The network packet processing method according to claim 1, characterized in that: When the receiving end determines that all bytes belonging to the first market data have been completely received according to the first single checksum, the receiving end determines that the first single checksum has passed the inspection.

5. The network packet processing method according to claim 1, characterized in that: After the first single checksum passes the inspection, the receiving end further sequentially receives the second market data in the application category.

6. The network packet processing method according to claim 1, characterized in that: The receiving end is a field programmable logic gate array.