Nothing Special   »   [go: up one dir, main page]

CN112330456B - Ultra-low-delay hardware acceleration market data stream analysis system - Google Patents

Ultra-low-delay hardware acceleration market data stream analysis system Download PDF

Info

Publication number
CN112330456B
CN112330456B CN202011359241.7A CN202011359241A CN112330456B CN 112330456 B CN112330456 B CN 112330456B CN 202011359241 A CN202011359241 A CN 202011359241A CN 112330456 B CN112330456 B CN 112330456B
Authority
CN
China
Prior art keywords
fields
market data
processing
parsing
market
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011359241.7A
Other languages
Chinese (zh)
Other versions
CN112330456A (en
Inventor
刘力政
崔建军
许文波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Tegao Information Technology Co ltd
Original Assignee
Shanghai Tegao Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Tegao Information Technology Co ltd filed Critical Shanghai Tegao Information Technology Co ltd
Priority to CN202011359241.7A priority Critical patent/CN112330456B/en
Publication of CN112330456A publication Critical patent/CN112330456A/en
Application granted granted Critical
Publication of CN112330456B publication Critical patent/CN112330456B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Finance (AREA)
  • Software Systems (AREA)
  • Accounting & Taxation (AREA)
  • General Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明公开了一种超低延时硬件加速行情数据流解析系统,包括总线接口、FPGA加速卡和主服务器,所述FPGA加速卡用于从所述总线接口获取行情数据信息并将所述行情数据信息经过解析处理后传送至所述主服务器;所述FPGA加速卡包括PHY物理模块、MAC模块、UDP/IP解析模块和相应的存储区,所述PHY物理模块用于接收在在指定周期内由所述总线接口传送的行情数据信息并将所述行情数据信息传送至所述MAC模块,所述MAC模块用于对获取的行情数据信息进行CRC32校验后将其传送至UDP/IP解析模块。本发明提供了一种超低延时硬件加速行情数据流解析系统,将CPU的重负载解析任务迁移至FPGA专用硬件处理,进行电路层次的并行操作优化,降低CPU负载,实现行情通讯和解码的整体加速。

The present invention discloses an ultra-low latency hardware accelerated market data stream parsing system, including a bus interface, an FPGA acceleration card and a main server, wherein the FPGA acceleration card is used to obtain market data information from the bus interface and transmit the market data information to the main server after parsing; the FPGA acceleration card includes a PHY physical module, a MAC module, a UDP/IP parsing module and a corresponding storage area, wherein the PHY physical module is used to receive the market data information transmitted by the bus interface within a specified period and transmit the market data information to the MAC module, wherein the MAC module is used to perform a CRC32 check on the acquired market data information and transmit it to the UDP/IP parsing module. The present invention provides an ultra-low latency hardware accelerated market data stream parsing system, which migrates the heavy load parsing tasks of the CPU to the FPGA dedicated hardware processing, performs circuit-level parallel operation optimization, reduces the CPU load, and realizes the overall acceleration of market communication and decoding.

Description

一种超低延时硬件加速行情数据流解析系统An ultra-low latency hardware-accelerated market data stream analysis system

技术领域Technical Field

本发明涉及信息处理技术领域,具体为一种超低延时硬件加速行情数据流解析系统。The present invention relates to the field of information processing technology, and in particular to an ultra-low latency hardware accelerated market data stream parsing system.

背景技术Background Art

对于瞬息万变的证券交易市场,即时的行情信息是交易系统的基础。快速获取行情信息可以给市场参与者提供更宽裕的交易决策时间窗口,交易者获取的行情信息延时越低,往往意味着越多的交易机会和越大的决策空间。传统的基于软件的行情信息系统,信息的解析一般经过网络层数据获取、协议层数据解析、应用层数据处理等过程,在操作系统和协议层面,存在毫秒级别的上下文切换和软件处理延时,由于操作系统的进程调度和CPU主频的动态调整机制,这种延时还具备一定的不确定性。For the ever-changing securities trading market, real-time market information is the foundation of the trading system. Rapid acquisition of market information can provide market participants with a more ample time window for trading decisions. The lower the latency of market information obtained by traders, the more trading opportunities and the greater the decision-making space. In traditional software-based market information systems, information analysis generally goes through processes such as network layer data acquisition, protocol layer data analysis, and application layer data processing. At the operating system and protocol level, there are millisecond-level context switching and software processing delays. Due to the operating system's process scheduling and the dynamic adjustment mechanism of the CPU main frequency, this delay also has a certain degree of uncertainty.

FAST(FIX Adapted forStreaming,适流FIX)是2005年全球金融企业联盟组织FPL提出的一种面向消息流的压缩、编码和传输方法。主要是利用消息流中先后传到的消息之间字段数据的逻辑联系压缩需要传送的数据内容,针对不同类型的二进制字段进行高效的二进制编码使得压缩率提高,传输数据大小降低。但对于下游用户来说,开发解码程序有一定的难度。目前的行情解析,主要依赖于基于传统服务器CPU的软解析模式,通过调用mFAST、openFAST进行FAST码流的解码。由于FAST数据的流式排布特征,数据前后相关性大,很难利用CPU的多线程实现处理并行化。同时,CPU相对固定的处理模式,无法提供底层更细颗粒度的操作调度,所以FAST的软解码延时较高,对CPU的负载占用较大,乃是现有行情解析系统的痛点所在。FAST (FIX Adapted for Streaming) is a compression, encoding and transmission method for message streams proposed by FPL, a global financial enterprise alliance organization, in 2005. It mainly uses the logical connection between the field data of the messages transmitted successively in the message stream to compress the data content to be transmitted, and performs efficient binary encoding for different types of binary fields to improve the compression rate and reduce the size of the transmitted data. However, for downstream users, it is difficult to develop a decoding program. The current market analysis mainly relies on the soft analysis mode based on the traditional server CPU, and decodes the FAST code stream by calling mFAST and openFAST. Due to the streaming arrangement characteristics of FAST data, the data has a large correlation before and after, and it is difficult to use the multi-threading of the CPU to achieve parallel processing. At the same time, the relatively fixed processing mode of the CPU cannot provide a more fine-grained operation scheduling at the bottom layer, so the soft decoding delay of FAST is high, and the CPU load is large, which is the pain point of the existing market analysis system.

针对上海证券交易所的行情发布系统,行情数据流需要跨过多层的协议才能到达物理通信端口,这些层主要由网络通信和STEP-FAST数据流交换协议组成,我国金融信息行业的交易所行情数据目前主要采用STEP(Securities Trading Exchange Protocol)协议,并基于国际主流金融信息交换标准的FIX(Financial Information eXchange protocol)协议,根据行情数据的流式处理特征,进行了FAST(FIX Adapted For Streaming)编码压缩。一方面,该协议定义了各种字段和运算符,用于标识特定的股票及其定价。另一方面,FAST编码带来的流式数据压缩机制,可大幅减少带宽,但也显著增加了数据解析的复杂度。For the quotation publishing system of the Shanghai Stock Exchange, the quotation data stream needs to cross multiple layers of protocols to reach the physical communication port. These layers are mainly composed of network communication and STEP-FAST data stream exchange protocol. The exchange quotation data of my country's financial information industry currently mainly adopts the STEP (Securities Trading Exchange Protocol) protocol, and is based on the FIX (Financial Information eXchange protocol) protocol, which is the international mainstream financial information exchange standard. According to the streaming processing characteristics of the quotation data, FAST (FIX Adapted For Streaming) encoding compression is performed. On the one hand, the protocol defines various fields and operators for identifying specific stocks and their pricing. On the other hand, the streaming data compression mechanism brought by FAST encoding can greatly reduce bandwidth, but it also significantly increases the complexity of data parsing.

发明内容Summary of the invention

本发明的目的在于提供了一种超低延时硬件加速行情数据流解析系统,将CPU的重负载解析任务迁移至FPGA专用硬件处理,进行电路层次的并行操作优化,降低CPU负载,实现行情通讯和解码的整体加速。The purpose of the present invention is to provide an ultra-low latency hardware accelerated market data stream parsing system, which migrates the heavy-load parsing tasks of the CPU to FPGA dedicated hardware processing, optimizes parallel operations at the circuit level, reduces the CPU load, and achieves overall acceleration of market communication and decoding.

为实现上述目的,本发明提供如下技术方案:一种超低延时硬件加速行情数据流解析系统,包括总线接口、FPGA加速卡和主服务器,所述FPGA加速卡用于从所述总线接口获取行情数据信息并将所述行情数据信息经过解析处理后传送至所述主服务器;To achieve the above object, the present invention provides the following technical solutions: an ultra-low latency hardware accelerated market data stream parsing system, comprising a bus interface, an FPGA accelerator card and a main server, wherein the FPGA accelerator card is used to obtain market data information from the bus interface and transmit the market data information to the main server after parsing;

所述FPGA加速卡包括PHY物理模块、MAC模块、UDP/IP解析模块和相应的存储区,所述PHY物理模块用于接收在在指定周期内由所述总线接口传送的行情数据信息并将所述行情数据信息传送至所述MAC模块,所述MAC模块用于对获取的行情数据信息进行CRC32校验后将其传送至UDP/IP解析模块,所述UDP/IP解析模块对校验后的行情数据信息进行通信解析处理后生成原始数据;The FPGA acceleration card includes a PHY physical module, a MAC module, a UDP/IP parsing module and a corresponding storage area, wherein the PHY physical module is used to receive the market data information transmitted by the bus interface within a specified period and transmit the market data information to the MAC module, wherein the MAC module is used to perform CRC32 verification on the acquired market data information and transmit it to the UDP/IP parsing module, wherein the UDP/IP parsing module performs communication parsing processing on the verified market data information and generates original data;

所述FPGA加速卡还包括STEP硬件解析器、FAST硬件解析器和CPU模块,所述CPU模块用于向所述STEP硬件解析器和FAST硬件解析器发送控制指令,所述STEP硬件解析器用于获取所述原始数据并将所述原始数据进行分割处理和编码处理后生成传输字段以发往相应的存储区进行缓存;The FPGA accelerator card further includes a STEP hardware parser, a FAST hardware parser and a CPU module, wherein the CPU module is used to send control instructions to the STEP hardware parser and the FAST hardware parser, and the STEP hardware parser is used to obtain the original data and perform segmentation and encoding processing on the original data to generate transmission fields to be sent to corresponding storage areas for caching;

所述FAST硬件解析器用于从相应的存储区并行调用所述传输字段并将所述传输字段进行并行FAST协议解析处理和重组解析处理后生成解析行情信息,以将所述解析行情信息发送至所述主服务器。The FAST hardware parser is used to call the transmission fields from the corresponding storage area in parallel and perform parallel FAST protocol parsing and reorganization parsing on the transmission fields to generate parsed market information, so as to send the parsed market information to the main server.

优选的,所述STEP硬件解析器包括第一处理电路,所述第一处理电路包括停止位检测单元和字段分割单元;Preferably, the STEP hardware parser comprises a first processing circuit, wherein the first processing circuit comprises a stop bit detection unit and a field segmentation unit;

所述停止位检测单元用于识别停止字节并将若干停止字节在该原始数据中的位序传送至字段分割单元;The stop bit detection unit is used to identify the stop byte and transmit the bit sequence of several stop bytes in the original data to the field segmentation unit;

所述字段分割单元用于根据若干所述停止字节的所处位序将原始数据分割成若干字段。The field segmentation unit is used to segment the original data into a plurality of fields according to the position sequence of the plurality of stop bytes.

优选的,所述第一处理电路还包括特定字符检测单元和编码处理单元,所述编码处理单元包括若干编码处理子单元;Preferably, the first processing circuit further comprises a specific character detection unit and a coding processing unit, and the coding processing unit comprises a plurality of coding processing sub-units;

所述特定字符检测单元依次接收由所述字段分割单元传送过来的若干字段,所述特定字符检测单元用于检测所述字段内是否存在标识字符,并将含有相应标识字符的字段发送至相应的编码处理子单元;The specific character detection unit sequentially receives a plurality of fields transmitted by the field segmentation unit, and is used to detect whether there is an identification character in the field, and sends the field containing the corresponding identification character to the corresponding encoding processing subunit;

所述编码处理子单元用于对相应的字段进行编码处理以减少相应字段的存储占用。The encoding processing subunit is used to perform encoding processing on the corresponding fields to reduce the storage occupation of the corresponding fields.

优选的,所述特定字符检测单元还用于将其接收到的所述字段中包含的标识字符按时间先后次序依次发送至CPU模块,所述CPU模块配置有重构策略,所述重构策略为根据其接收到的标识字符的时间先后次序构建字段重构序列。Preferably, the specific character detection unit is also used to send the identification characters contained in the received field to the CPU module in chronological order, and the CPU module is configured with a reconstruction strategy, which constructs a field reconstruction sequence according to the chronological order of the identification characters received.

优选的,所述编码处理子单元按照CPU模块发送的第一处理指令对相应的字段进行编码处理以减少相应字段的存储占用并将生成若干传输字段发送至相应的缓存区进行缓存。Preferably, the encoding processing subunit performs encoding processing on the corresponding fields according to the first processing instruction sent by the CPU module to reduce the storage occupancy of the corresponding fields and generates several transmission fields and sends them to the corresponding buffer area for caching.

优选的,所述第一处理指令包括删除字段中包含的停止字节和标识字符。Preferably, the first processing instruction comprises deleting the stop byte and the identification character contained in the field.

优选的,所述FAST硬件解析器包括第二处理电路,所述第二处理电路包括FSAT协议解码处理单元和重组解码处理单元,所述FSAT协议解码处理单元包括若干与相应的存储区分别连接的解码算子单元,若干所述解码算子单元并行从若干相应的所述存储区获取所述传输字段并对所述传输字段进行FAST协议解析处理以生成若干重组字段,所述重组解码处理单元并行接收若干所述重组字段,并按照CPU模块发送的第二处理指令,将若干所述重组字段依据所述字段重构序列进行顺序重组生成解析行情信息。Preferably, the FAST hardware parser includes a second processing circuit, the second processing circuit includes a FSAT protocol decoding processing unit and a reorganization decoding processing unit, the FSAT protocol decoding processing unit includes a plurality of decoding operator units respectively connected to corresponding storage areas, the plurality of decoding operator units obtain the transmission fields from a plurality of corresponding storage areas in parallel and perform FAST protocol parsing processing on the transmission fields to generate a plurality of reorganization fields, the reorganization decoding processing unit receives a plurality of the reorganized fields in parallel, and according to a second processing instruction sent by the CPU module, sequentially reorganizes the plurality of the reorganized fields according to the field reconstruction sequence to generate parsed market information.

优选的,所述第二处理指令包括将若干所述重组字段在其首位处依次添加停止bit位和相应的标识bit位生成解码字段,按照所述字段重构序列对若干解码字段进行排序。Preferably, the second processing instruction includes sequentially adding a stop bit and a corresponding identification bit at the first position of the plurality of reorganized fields to generate a decoding field, and sorting the plurality of decoding fields according to the field reconstruction sequence.

优选的,所述行情数据信息包括逐笔信息,所述停止位检测单元以1byte为检测单位对原始数据进行检测,在单个时钟周期内完成每个检测单位内最高bit位检测,当最高bit位为1时,该所属字节为停止字节。Preferably, the market data information includes transaction-by-transaction information, and the stop bit detection unit detects the original data in 1 byte as the detection unit, and completes the highest bit detection in each detection unit in a single clock cycle. When the highest bit is 1, the byte to which it belongs is a stop byte.

优选的,所述行情数据信息包括行情快照信息,所述停止位检测单元以4byte为检测单位对原始数据进行检测,在单个时钟周期内完成每个检测单位内最高bit位检测,当最高bit位为1时,该所属字节为停止字节。经过数据调查,上海证券交易所的行情发布系统中的行情快照信息中的每个字段均以4个字节为倍数,故将该实施例下的检测单位设置为4byte,可以提升处理速度。Preferably, the market data information includes market snapshot information, and the stop bit detection unit detects the original data with 4 bytes as the detection unit, completes the highest bit detection in each detection unit in a single clock cycle, and when the highest bit is 1, the byte is the stop byte. After data investigation, each field in the market snapshot information in the market release system of the Shanghai Stock Exchange is a multiple of 4 bytes, so the detection unit in this embodiment is set to 4 bytes, which can improve the processing speed.

与现有技术相比,本发明的有益效果是:Compared with the prior art, the present invention has the following beneficial effects:

本发明基于FPGA设计了一套对STEP-FAST数据流交换协议进行解析处理的硬件系统,STEP硬件解析器根据字段类型的不同对字段进行分割,对字段进行分割后便于对类型相同的字段进行分类,然后通过硬件电路设计进行集中高效的解析处理,FAST硬件解析器对分割后的数据进行并行解码,将CPU的重负载解析任务迁移至FPGA专用硬件处理,进行电路层次的并行操作优化,降低CPU负载,解码延时可低至33ns,实现了行情通讯和解码的整体加速。The present invention designs a hardware system for parsing the STEP-FAST data stream exchange protocol based on FPGA. The STEP hardware parser divides the fields according to different field types. After the fields are divided, it is convenient to classify the fields of the same type, and then centralized and efficient parsing processing is performed through hardware circuit design. The FAST hardware parser decodes the divided data in parallel, migrates the heavy-load parsing tasks of the CPU to the FPGA dedicated hardware processing, optimizes the parallel operation at the circuit level, reduces the CPU load, and the decoding delay can be as low as 33ns, realizing the overall acceleration of market communication and decoding.

本发明的FAST硬件解析器包括若干对相应的字段相匹配的解码算子单元,用于对相应的字段进行FAST协议解析处理;并且FPGA加速卡还包括CPU模块,CPU模块用于向STEP硬件解析器和FAST硬件解析器发送控制指令,STEP硬件解析器的编码处理子单元按照CPU模块发送的第一处理指令对相应的字段进行编码处理以减少相应字段的存储占用。CPU模块配置有重构策略,重构策略为根据其接收到的标识字符的时间先后次序构建字段重构序列,FAST硬件解析器的重组解码处理单元并行接收重组字段,并按照CPU模块发送的第二处理指令,将若干重组字段依据字段重构序列进行顺序重组生成解析行情信息。The FAST hardware parser of the present invention includes a plurality of decoding operator units matching corresponding fields, which are used to perform FAST protocol parsing processing on the corresponding fields; and the FPGA accelerator card also includes a CPU module, which is used to send control instructions to the STEP hardware parser and the FAST hardware parser, and the encoding processing subunit of the STEP hardware parser encodes the corresponding fields according to the first processing instruction sent by the CPU module to reduce the storage occupation of the corresponding fields. The CPU module is configured with a reconstruction strategy, which is to construct a field reconstruction sequence according to the time sequence of the identification characters received by it, and the reorganization decoding processing unit of the FAST hardware parser receives the reorganized fields in parallel, and according to the second processing instruction sent by the CPU module, sequentially reorganizes the plurality of reorganized fields according to the field reconstruction sequence to generate parsed market information.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1为本发明一种超低延时硬件加速行情数据流解析系统的电路连接框图示意图;FIG1 is a schematic diagram of a circuit connection block diagram of an ultra-low latency hardware accelerated market data stream analysis system according to the present invention;

图2为本发明一种超低延时硬件加速行情数据流解析系统中PHY物理模块和MAC模块的连接图;FIG2 is a connection diagram of a PHY physical module and a MAC module in an ultra-low latency hardware accelerated market data stream analysis system of the present invention;

图3为本发明一种超低延时硬件加速行情数据流解析系统中STEP硬件解析器的内部电路连接示意图;3 is a schematic diagram of the internal circuit connections of a STEP hardware parser in an ultra-low latency hardware accelerated market data stream parsing system according to the present invention;

图4为本发明一种超低延时硬件加速行情数据流解析系统中FAST硬件解析器的内部电路连接示意图;4 is a schematic diagram of the internal circuit connections of a FAST hardware parser in an ultra-low latency hardware accelerated market data stream parsing system according to the present invention;

图5为本发明一种超低延时硬件加速行情数据流解析系统中FAST数据流的编码特征结构图。FIG5 is a diagram showing the encoding characteristic structure of a FAST data stream in an ultra-low latency hardware accelerated market data stream parsing system according to the present invention.

具体实施方式DETAILED DESCRIPTION

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

如图1所示,本发明提供的第一种实施例,一种超低延时硬件加速行情数据流解析系统,包括总线接口、FPGA加速卡和主服务器,所述FPGA加速卡用于从所述总线接口获取行情数据信息并将所述行情数据信息经过解析处理后传送至所述主服务器;所述FPGA加速卡包括PHY物理模块、MAC模块、UDP/IP解析模块和相应的存储区,所述PHY物理模块用于接收在在指定周期内由所述总线接口传送的行情数据信息并将所述行情数据信息传送至所述MAC模块,所述MAC模块用于对获取的行情数据信息进行CRC32校验后将其传送至UDP/IP解析模块,所述UDP/IP解析模块对校验后的行情数据信息进行通信解析处理后生成原始数据。As shown in FIG1 , the first embodiment provided by the present invention is an ultra-low latency hardware accelerated market data stream parsing system, comprising a bus interface, an FPGA acceleration card and a main server, wherein the FPGA acceleration card is used to obtain market data information from the bus interface and transmit the market data information to the main server after parsing; the FPGA acceleration card comprises a PHY physical module, a MAC module, a UDP/IP parsing module and a corresponding storage area, wherein the PHY physical module is used to receive the market data information transmitted by the bus interface within a specified period and transmit the market data information to the MAC module, wherein the MAC module is used to perform CRC32 check on the obtained market data information and transmit it to the UDP/IP parsing module, wherein the UDP/IP parsing module performs communication parsing on the verified market data information and generates original data.

本发明在FPGA加速卡连接高速万兆以太网接口QSFP总线接口,物理层采用Xilinx公司提供的PHY IP,MAC层采用Xilinx公司的万兆以太网MAC IP实现传输协议的CRC32校验码的填充与检测,并通过verilog定制设计了UDP/IP协议解析电路;所述FPGA加速卡还包括STEP硬件解析器、FAST硬件解析器和CPU模块,所述CPU模块用于向所述STEP硬件解析器和FAST硬件解析器发送控制指令,所述STEP硬件解析器用于获取所述原始数据并将所述原始数据进行分割处理和编码处理后生成传输字段以发往相应的存储区进行缓存;In the present invention, a high-speed 10 Gigabit Ethernet interface QSFP bus interface is connected to an FPGA acceleration card, a PHY IP provided by Xilinx is used in the physical layer, and a 10 Gigabit Ethernet MAC IP of Xilinx is used in the MAC layer to implement the filling and detection of the CRC32 check code of the transmission protocol, and a UDP/IP protocol parsing circuit is customized and designed through Verilog; the FPGA acceleration card also includes a STEP hardware parser, a FAST hardware parser and a CPU module, the CPU module is used to send control instructions to the STEP hardware parser and the FAST hardware parser, and the STEP hardware parser is used to obtain the original data and generate a transmission field after segmenting and encoding the original data to send it to a corresponding storage area for caching;

所述FAST硬件解析器用于从相应的存储区并行调用所述传输字段并将所述传输字段进行并行FAST协议解析处理和重组解析处理后生成解析行情信息,以将所述解析行情信息发送至所述主服务器。The FAST hardware parser is used to call the transmission fields from the corresponding storage area in parallel and perform parallel FAST protocol parsing and reorganization parsing on the transmission fields to generate parsed market information, so as to send the parsed market information to the main server.

如图2所示,数据流模拟电路信号经由高速串行接口SERDES,配合PHY IP,实现了对电信号的接收端时钟恢复/发送预加重、编解码、通道绑定、数据缓存等,解析出的数字信号数据,将通过XGMII接口和MAC模块进行数据传递,对发送的数据帧进行编码。本发明中设计的以太网高速通信电路中采用了64-bit位宽的单速率XGMII总线接口和全双工10Gbit/s的以太网媒体控制器,支持万兆以太网数据的前导码过滤与增加、CRC校验码的填充与验证,以太数据帧长最小为64byte,最大为1518byte。发送端在传输数据之前,MAC控制器会先发送7byte的同步码和1byte的帧首定界符,并在1帧传送结束时填充4byte的CRC32校验码,如果数据长度小于46byte,则会自动在数据字段填充PAD字符,即补0。在接收端,MAC层去掉前导码和帧首定界符,并对帧进行CRC32校验。MAC层获取的数据将进一步经过UDP/IP解析模块的解析处理,最终转化为实际的Raw Data(原始数据)。但是通信接口获取到Raw Data,仍然不是能直接读取的行情信息,必须遵循行情信息编解码的规范加以解析,本发明即在FPGA上实现了相应的硬件解析器。As shown in Figure 2, the data stream simulation circuit signal is transmitted through the high-speed serial interface SERDES, in conjunction with the PHY IP, to achieve the receiving end clock recovery/transmission pre-emphasis, encoding and decoding, channel bonding, data caching, etc. of the electrical signal. The parsed digital signal data will be transmitted through the XGMII interface and the MAC module to encode the transmitted data frame. The Ethernet high-speed communication circuit designed in the present invention adopts a 64-bit single-rate XGMII bus interface and a full-duplex 10Gbit/s Ethernet media controller, supports the preamble filtering and addition of 10 Gigabit Ethernet data, and the filling and verification of the CRC check code. The minimum Ethernet data frame length is 64 bytes and the maximum is 1518 bytes. Before the transmitting end transmits data, the MAC controller will first send a 7-byte synchronization code and a 1-byte frame delimiter, and fill a 4-byte CRC32 check code at the end of 1 frame transmission. If the data length is less than 46 bytes, the PAD character will be automatically filled in the data field, that is, 0 is filled. At the receiving end, the MAC layer removes the preamble and frame delimiter, and performs a CRC32 check on the frame. The data obtained by the MAC layer will be further parsed by the UDP/IP parsing module and finally converted into actual Raw Data. However, the Raw Data obtained by the communication interface is still not market information that can be directly read. It must be parsed in accordance with the market information encoding and decoding specifications. The present invention implements the corresponding hardware parser on the FPGA.

如图3所示,所述STEP硬件解析器包括第一处理电路,所述第一处理电路包括停止位检测单元和字段分割单元;所述停止位检测单元用于识别停止字节并将若干停止字节在该原始数据中的位序传送至字段分割单元;所述字段分割单元用于根据若干所述停止字节的所处位序将原始数据分割成若干字段。所述第一处理电路还包括特定字符检测单元和编码处理单元,所述编码处理单元包括若干编码处理子单元;所述特定字符检测单元依次接收由所述字段分割单元传送过来的若干字段,所述特定字符检测单元用于检测所述字段内是否存在标识字符,并将含有相应标识字符的字段发送至相应的编码处理子单元;所述编码处理子单元用于对相应的字段进行编码处理以减少相应字段的存储占用;所述特定字符检测单元还用于将其接收到的所述字段中包含的标识字符按时间先后次序依次发送至CPU模块,所述CPU模块配置有重构策略,所述重构策略为根据其接收到的标识字符的时间先后次序构建字段重构序列;所述编码处理子单元按照CPU模块发送的第一处理指令对相应的字段进行编码处理以减少相应字段的存储占用并将生成若干传输字段发送至相应的缓存区进行缓存。STEP硬件解析器根据字段类型的不同对字段进行分割,对字段进行分割后便于对类型相同的字段进行分类以及进行后续的解码处理,然后通过硬件电路设计进行集中高效的解析处理,并且,通过设置编码处理子单元对相应的字段进行编码处理以减少相应字段的存储占用,减少了后续解析处理过程的数据操作量,提高了解析速度;FAST硬件解析器对分割后的数据进行并行解码,将CPU的重负载解析任务迁移至FPGA专用硬件处理,进行电路层次的并行操作优化,降低CPU负载,解码延时可低至33ns,实现了行情通讯和解码的整体加速。As shown in Figure 3, the STEP hardware parser includes a first processing circuit, which includes a stop bit detection unit and a field segmentation unit; the stop bit detection unit is used to identify the stop byte and transmit the position sequence of several stop bytes in the original data to the field segmentation unit; the field segmentation unit is used to segment the original data into several fields according to the position sequence of several stop bytes. The first processing circuit also includes a specific character detection unit and an encoding processing unit, and the encoding processing unit includes a plurality of encoding processing sub-units; the specific character detection unit sequentially receives a plurality of fields transmitted by the field segmentation unit, and the specific character detection unit is used to detect whether there is an identification character in the field, and send the field containing the corresponding identification character to the corresponding encoding processing sub-unit; the encoding processing sub-unit is used to encode the corresponding field to reduce the storage occupancy of the corresponding field; the specific character detection unit is also used to send the identification characters contained in the received field to the CPU module in chronological order, and the CPU module is configured with a reconstruction strategy, and the reconstruction strategy is to construct a field reconstruction sequence according to the chronological order of the identification characters received; the encoding processing sub-unit encodes the corresponding field according to the first processing instruction sent by the CPU module to reduce the storage occupancy of the corresponding field and sends the generated plurality of transmission fields to the corresponding cache area for caching. The STEP hardware parser divides the fields according to the different field types. After the fields are divided, it is convenient to classify the fields of the same type and perform subsequent decoding processing. Then, centralized and efficient parsing processing is performed through hardware circuit design. In addition, the corresponding fields are encoded by setting the encoding processing subunit to reduce the storage occupancy of the corresponding fields, reduce the amount of data operations in the subsequent parsing process, and improve the parsing speed; the FAST hardware parser decodes the segmented data in parallel, migrates the heavy-load parsing tasks of the CPU to the FPGA dedicated hardware processing, optimizes parallel operations at the circuit level, reduces the CPU load, and the decoding delay can be as low as 33ns, realizing the overall acceleration of market communication and decoding.

本发明提供的STEP硬件解析器的第一种实施例,STEP协议采用tag=value,将FAST编码的数据流附加额外信息进行了封装,可提供交易行情之外的业务会话信息。为了最大程度降低行情数据解析的延时,采用verilog定制设计了STEP协议的硬件解析器,该解析器模块每个周期从AXI总线获取经由网口传递来的64-bit数据段,64-bit的数据段将以8-bit为单位进行处理,通过检测“=“和SOH的ASCII码,自动判定当前数据段所属的tag或value属性,并发往指定的缓存空间,留待后续的信息读取或进一步的FAST解码。In the first embodiment of the STEP hardware parser provided by the present invention, the STEP protocol uses tag=value to encapsulate the FAST-encoded data stream with additional information, which can provide business session information other than trading market information. In order to minimize the delay of market data parsing, a hardware parser of the STEP protocol is custom designed using Verilog. The parser module obtains a 64-bit data segment transmitted from the AXI bus via the network port in each cycle. The 64-bit data segment will be processed in units of 8-bit. By detecting the ASCII code of "=" and SOH, the tag or value attribute of the current data segment is automatically determined, and sent to the specified cache space for subsequent information reading or further FAST decoding.

本发明中编码处理子单元按照CPU模块发送的第一处理指令对相应的字段进行编码处理包括但不限于以下三种处理编码压缩方式:In the present invention, the encoding processing subunit performs encoding processing on the corresponding field according to the first processing instruction sent by the CPU module, including but not limited to the following three processing encoding compression methods:

1)定义template减少重复出现的Tag数据,特定类别的数据往往格式相对固定,一般由一组相对通用的Tag组成,比如行情快照、逐笔、指数等信息,因此,可以将特定组的Tag转换为一套收发双方共同约定的template模版来解析数据,在双方都获得数据解析模版的情况下,码流无需再保存Tag信息,而只需要按照模版定义的字段顺序和操作组织数据,从而省去了Tag数据的传输。1) Define templates to reduce repeated Tag data. Specific categories of data often have relatively fixed formats and are generally composed of a group of relatively common Tags, such as market snapshots, tick-by-tick, index and other information. Therefore, a specific group of Tags can be converted into a set of templates agreed upon by both the sender and the receiver to parse the data. When both parties obtain the data parsing template, the code stream no longer needs to save the Tag information, but only needs to organize the data according to the field order and operation defined by the template, thereby eliminating the need to transmit the Tag data.

2)数据操作和数据类型定义增加了Value数据的存储开销。此方法主要利用了数据上下文的相关性来减少不必要的数据存储,包括但不限于Value数据中可能存在的:数据当前值相教前值保持不变、当前值相教前值差值较小、不定长数据等情形。根据数据的前后关联和Value值实际长度,便只需记录历史数据、变化情况、有效数据等相对精简的信息,即可通过反演操作恢复原始数据,能够极大地降低数据码流的存储开销。2) Data operations and data type definitions increase the storage overhead of Value data. This method mainly uses the relevance of data context to reduce unnecessary data storage, including but not limited to the following situations that may exist in Value data: the current value of the data remains unchanged from the previous value, the difference between the current value and the previous value is small, and there is data of indefinite length. According to the previous and subsequent associations of the data and the actual length of the Value, it is only necessary to record relatively concise information such as historical data, changes, and valid data, and the original data can be restored through inversion operations, which can greatly reduce the storage overhead of the data code stream.

3)用单bit停止位替代<SOH>分隔符。FIX中<SOH>分隔符的使用将导致每个字段无可避免的会附加1byte的存储占用,FAST编码将字段的分隔改由byte数据的最高bit位来体现,能够进一步优化码流的压缩比。3) Use a single stop bit instead of the <SOH> delimiter. The use of the <SOH> delimiter in FIX will inevitably cause each field to take up 1 byte of storage. FAST encoding changes the field separation to the highest bit of the byte data, which can further optimize the compression ratio of the code stream.

优选的,所述第一处理指令包括删除字段中包含的停止字节和标识字符。Preferably, the first processing instruction comprises deleting the stop byte and the identification character contained in the field.

如图4所示,所述FAST硬件解析器包括第二处理电路,所述第二处理电路包括FSAT协议解码处理单元和重组解码处理单元,所述FSAT协议解码处理单元包括若干与相应的存储区分别连接的解码算子单元,若干所述解码算子单元并行从若干相应的所述存储区获取所述传输字段并对所述传输字段进行FAST协议解析处理以生成若干重组字段,所述重组解码处理单元并行接收若干所述重组字段,并按照CPU模块发送的第二处理指令,将若干所述重组字段依据所述字段重构序列进行顺序重组生成解析行情信息。所述第二处理指令包括将若干所述重组字段在其首位处依次添加停止bit位和相应的标识bit位生成解码字段,按照所述字段重构序列对若干解码字段进行排序。As shown in FIG4 , the FAST hardware parser includes a second processing circuit, the second processing circuit includes a FSAT protocol decoding processing unit and a reorganization decoding processing unit, the FSAT protocol decoding processing unit includes a number of decoding operator units respectively connected to corresponding storage areas, the number of decoding operator units obtain the transmission fields from the number of corresponding storage areas in parallel and perform FAST protocol parsing processing on the transmission fields to generate a number of reorganized fields, the reorganization decoding processing unit receives the number of reorganized fields in parallel, and according to the second processing instruction sent by the CPU module, the number of reorganized fields are sequentially reorganized according to the field reconstruction sequence to generate parsed market information. The second processing instruction includes sequentially adding stop bits and corresponding identification bits to the first positions of the number of reorganized fields to generate decoding fields, and sorting the number of decoding fields according to the field reconstruction sequence.

硬件实现的操作算子是FAST解码的关键部件,这些操作算子包括但不限于存在图的字段选择、数据移位、计算、复制、尾部更新、字节向量计数、Sequence字段循环控制等算子,该解码算子单元可以运行在较高的时钟频率,并且在1-2个时钟周期内即可完成对应算子操作(计数和循环控制操作除外)。所有算子模块的控制信号,可均由微指令统一整合加以控制,为解码提供了足够的硬件调度灵活性。The hardware-implemented operators are key components of FAST decoding. These operators include, but are not limited to, field selection, data shifting, calculation, copying, tail update, byte vector counting, sequence field loop control, etc. The decoding operator unit can run at a higher clock frequency and complete the corresponding operator operation within 1-2 clock cycles (except counting and loop control operations). The control signals of all operator modules can be uniformly integrated and controlled by microinstructions, providing sufficient hardware scheduling flexibility for decoding.

CPU模块配置有重构策略,重构策略为根据其接收到的标识字符的时间先后次序构建字段重构序列,一方面保证了解析流程的顺序,另一方面仍提高了硬件算子处理的并行度,可进一步提升硬件解析性能。The CPU module is configured with a reconstruction strategy, which builds a field reconstruction sequence according to the chronological order of the identification characters it receives. On the one hand, it ensures the order of the parsing process, and on the other hand, it still improves the parallelism of hardware operator processing, which can further improve the hardware parsing performance.

优选的,所述行情数据信息包括逐笔信息,所述停止位检测单元以1byte为检测单位对原始数据进行检测,在单个时钟周期内完成每个检测单位内最高bit位检测,当最高bit位为1时,该所属字节为停止字节。逐笔信息也称tick信息,是整个市场上的逐笔数据,例如投资者一笔新的委托会形成一笔行情,交易所撮合一笔新的成交也会形成一笔行情,tick行情记录了市场的每一个事件的数据,是最精细和完整的数据。所以对于逐笔信息的检测单位要以最小1byte单位进行检测才能保证精准度。Preferably, the market data information includes transaction-by-transaction information, and the stop bit detection unit detects the original data with 1 byte as the detection unit, and completes the highest bit detection in each detection unit in a single clock cycle. When the highest bit is 1, the byte to which it belongs is the stop byte. Transaction-by-transaction information is also called tick information, which is transaction-by-transaction data on the entire market. For example, a new order from an investor will form a market, and a new transaction matched by an exchange will also form a market. The tick market records the data of every event in the market, which is the most detailed and complete data. Therefore, the detection unit of the transaction-by-transaction information must be detected in a minimum unit of 1 byte to ensure accuracy.

优选的,所述行情数据信息包括行情快照信息,所述停止位检测单元以4byte为检测单位对原始数据进行检测,在单个时钟周期内完成每个检测单位内最高bit位检测,当最高bit位为1时,该所属字节为停止字节。经过数据调查,上海证券交易所的行情发布系统中的行情快照信息中的每个字段均以4个字节为倍数,故将该实施例下的检测单位设置为4byte,可以保证精准度的同时提升处理速度。Preferably, the market data information includes market snapshot information, and the stop bit detection unit detects the original data with 4 bytes as the detection unit, completes the highest bit detection in each detection unit in a single clock cycle, and when the highest bit is 1, the byte is the stop byte. After data investigation, each field in the market snapshot information in the market release system of the Shanghai Stock Exchange is a multiple of 4 bytes, so the detection unit in this embodiment is set to 4 bytes, which can ensure accuracy while improving processing speed.

整体行情解析延时测试:Overall market analysis delay test:

测试数据以上海证券交易所level1行情的一条step数据为例。测试的STEP包数据长度为1515Byte,其中包括98byte的STEP头、181byte的FIX头、1221byte的20条FAST消息,以及8byte的FIX尾和7byte的Step尾。VDE重复发该条STEP包,测得软硬件解码的平均解码延时如表1所示:The test data takes a step data of Shanghai Stock Exchange level 1 quotation as an example. The length of the STEP packet data tested is 1515 bytes, including a 98-byte STEP header, a 181-byte FIX header, 1221-byte 20 FAST messages, and an 8-byte FIX tail and a 7-byte Step tail. VDE repeatedly sends the STEP packet, and the average decoding delay of software and hardware decoding is shown in Table 1:

表1:FAST解码软硬件方案处理性能对比Table 1: FAST decoding software and hardware solution processing performance comparison

软件解码Software decoding 硬件解码Hardware decoding 示例STEP数据平均:217usSample STEP data average: 217us 示例STEP数据平均:14usSample STEP data average: 14us

其中软件解码部分的延时在150us-250us,时间有波动,取决于CPU负载;硬件解码延时相比于软件解码缩短了10倍以上。The delay of the software decoding part is 150us-250us, and the time fluctuates depending on the CPU load; the hardware decoding delay is shortened by more than 10 times compared to software decoding.

穿透延时测试:Penetration delay test:

对FPGA加速卡上实现的网络通信和行情流解码的穿透延时进行了评估测试,穿透延时从数据到达FPGA端的以太网口接收开始计算,截止到FPGA端以太网口开始发出经过STEP-FAST解码得到的行情数据,包含了FPGA端硬件实现的的以太网接收、数据解码和以太网发送三部分,各部分具体延时测试结果如表2所示。测试结果显示,FPGA端的行情穿透延时可低至847ns。The penetration delay of network communication and market flow decoding implemented on the FPGA accelerator card was evaluated and tested. The penetration delay is calculated from the time when the data arrives at the Ethernet port on the FPGA side and ends when the Ethernet port on the FPGA side starts to send the market data obtained through STEP-FAST decoding. It includes three parts: Ethernet reception, data decoding, and Ethernet transmission implemented by the hardware on the FPGA side. The specific delay test results of each part are shown in Table 2. The test results show that the market penetration delay on the FPGA side can be as low as 847ns.

表2:基于FPGA的硬件行情解析方案穿透延时测试Table 2: FPGA-based hardware market analysis solution penetration delay test

工作原理:本发明基于FPGA设计了一套对STEP-FAST数据流交换协议进行解析处理的硬件系统,STEP硬件解析器根据字段类型的不同对字段进行分割,对字段进行分割后便于对类型相同的字段进行分类,然后通过硬件电路设计进行集中高效的解析处理,FAST硬件解析器对分割后的数据进行并行解码,将CPU的重负载解析任务迁移至FPGA专用硬件处理,进行电路层次的并行操作优化,降低CPU负载,解码延时可低至33ns,实现了行情通讯和解码的整体加速。该FAST硬件解析器还包括若干对相应的字段相匹配的解码算子单元,用于对相应的字段进行FAST协议解析处理;并且FPGA加速卡还包括CPU模块,CPU模块用于向STEP硬件解析器和FAST硬件解析器发送控制指令,STEP硬件解析器的编码处理子单元按照CPU模块发送的第一处理指令对相应的字段进行编码处理以减少相应字段的存储占用。CPU模块配置有重构策略,重构策略为根据其接收到的标识字符的时间先后次序构建字段重构序列,FAST硬件解析器的重组解码处理单元并行接收重组字段,并按照CPU模块发送的第二处理指令,将若干重组字段依据字段重构序列进行顺序重组生成解析行情信息并传送至主服务器以完成在指定周期内的行情数据解析过程。Working principle: The present invention designs a hardware system for parsing and processing the STEP-FAST data stream exchange protocol based on FPGA. The STEP hardware parser divides the fields according to the different field types. After the fields are divided, it is convenient to classify the fields of the same type, and then the hardware circuit design is used for centralized and efficient parsing and processing. The FAST hardware parser decodes the divided data in parallel, migrates the heavy-load parsing task of the CPU to the FPGA dedicated hardware processing, optimizes the parallel operation at the circuit level, reduces the CPU load, and the decoding delay can be as low as 33ns, realizing the overall acceleration of market communication and decoding. The FAST hardware parser also includes a number of decoding operator units that match the corresponding fields, which are used to perform FAST protocol parsing and processing on the corresponding fields; and the FPGA acceleration card also includes a CPU module, which is used to send control instructions to the STEP hardware parser and the FAST hardware parser. The encoding processing subunit of the STEP hardware parser encodes the corresponding fields according to the first processing instruction sent by the CPU module to reduce the storage occupancy of the corresponding fields. The CPU module is configured with a reconstruction strategy, which is to construct a field reconstruction sequence according to the chronological order of the identification characters it receives. The reorganization decoding processing unit of the FAST hardware parser receives the reorganized fields in parallel, and according to the second processing instruction sent by the CPU module, sequentially reorganizes several reorganized fields according to the field reconstruction sequence to generate parsed market information and transmit it to the main server to complete the market data parsing process within the specified period.

对于本领域技术人员而言,显然本发明不限于上述示范性实施例的细节,而且在不背离本发明的精神或基本特征的情况下,能够以其他的具体形式实现本发明。因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本发明的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化囊括在本发明内。不应将权利要求中的任何附图标记视为限制所涉及的权利要求。It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.

Claims (7)

1. The ultra-low-delay hardware acceleration quotation data flow analysis system is characterized by comprising a bus interface, an FPGA acceleration card and a main server, wherein the FPGA acceleration card is used for acquiring quotation data information from the bus interface and transmitting the quotation data information to the main server after analysis processing;
The FPGA acceleration card comprises a PHY physical module, an MAC module, a UDP/IP analysis module and a corresponding storage area, wherein the PHY physical module is used for receiving market data information transmitted by the bus interface in a specified period and transmitting the market data information to the MAC module, the MAC module is used for performing CRC32 check on the acquired market data information and transmitting the acquired market data information to the UDP/IP analysis module, and the UDP/IP analysis module is used for performing communication analysis processing on the checked market data information to generate original data;
The FPGA acceleration card further comprises an STEP hardware analyzer, a FAST hardware analyzer and a CPU module, wherein the CPU module is used for sending control instructions to the STEP hardware analyzer and the FAST hardware analyzer, and the STEP hardware analyzer is used for acquiring the original data, performing segmentation processing and encoding processing on the original data, generating a transmission field, and sending the transmission field to a corresponding storage area for caching;
The FAST hardware parser is configured to call the transmission field in parallel from a corresponding storage area, and generate parsing market information after performing parallel FAST protocol parsing and reorganization parsing on the transmission field, so as to send the parsing market information to the main server;
the STEP hardware analyzer comprises a first processing circuit, wherein the first processing circuit comprises a stop bit detection unit and a field segmentation unit;
The stop bit detection unit is used for identifying stop bytes and transmitting the bit sequences of a plurality of stop bytes in the original data to the field segmentation unit;
The field segmentation unit is used for segmenting the original data into a plurality of fields according to the bit sequences of a plurality of stop bytes;
The first processing circuit further comprises a specific character detection unit and an encoding processing unit, wherein the encoding processing unit comprises a plurality of encoding processing subunits;
the specific character detection unit sequentially receives the fields transmitted by the field segmentation unit, and is used for detecting whether identification characters exist in the fields or not and transmitting the fields containing the corresponding identification characters to the corresponding coding processing subunit;
The coding processing subunit is used for coding the corresponding field so as to reduce the memory occupation of the corresponding field;
The specific character detection unit is further configured to sequentially send the identification characters contained in the received fields to the CPU module according to the time sequence, and the CPU module is configured with a reconstruction policy, where the reconstruction policy constructs a field reconstruction sequence according to the time sequence of the received identification characters.
2. The ultra-low latency hardware accelerated market data stream parsing system according to claim 1, wherein: the encoding processing subunit encodes the corresponding fields according to the first processing instruction sent by the CPU module so as to reduce the memory occupation of the corresponding fields and send the generated transmission fields to the corresponding buffer areas for buffering.
3. The ultra-low latency hardware accelerated market data stream parsing system according to claim 2, wherein: the first processing instruction includes a stop byte and an identification character contained in a delete field.
4. An ultra-low latency hardware accelerated market data stream parsing system according to claim 3, wherein: the FAST hardware parser comprises a second processing circuit, the second processing circuit comprises an FSAT protocol decoding processing unit and a reorganization decoding processing unit, the FSAT protocol decoding processing unit comprises a plurality of decoding operator units which are respectively connected with corresponding storage areas, the decoding operator units acquire transmission fields from the corresponding storage areas in parallel and carry out FAST protocol parsing processing on the transmission fields to generate a plurality of reorganization fields, the reorganization decoding processing unit receives the reorganization fields in parallel and reorganizes the reorganization fields in sequence according to a second processing instruction sent by the CPU module to generate analysis quotation information.
5. The ultra-low latency hardware accelerated market data stream parsing system according to claim 4, wherein: the second processing instruction comprises the steps of sequentially adding stop bit bits and corresponding identification bit bits to a plurality of reorganization fields at the first bit position to generate decoding fields, and sequencing the plurality of decoding fields according to the field reorganization sequence.
6. An ultra-low latency hardware accelerated market data flow resolution system according to any of claims 1-5, wherein: the market data information comprises the information of each stroke, the stop bit detection unit detects the original data by taking 1byte as a detection unit, the detection of the highest bit in each detection unit is completed in a single clock period, and when the highest bit is 1, the byte is the stop byte.
7. An ultra-low latency hardware accelerated market data flow resolution system according to any of claims 1-5, wherein: the market data information comprises market snapshot information, the stop bit detection unit detects original data by taking 4byte as a detection unit, the detection of the highest bit in each detection unit is completed in a single clock period, and when the highest bit is 1, the byte is a stop byte.
CN202011359241.7A 2020-11-27 2020-11-27 Ultra-low-delay hardware acceleration market data stream analysis system Active CN112330456B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011359241.7A CN112330456B (en) 2020-11-27 2020-11-27 Ultra-low-delay hardware acceleration market data stream analysis system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011359241.7A CN112330456B (en) 2020-11-27 2020-11-27 Ultra-low-delay hardware acceleration market data stream analysis system

Publications (2)

Publication Number Publication Date
CN112330456A CN112330456A (en) 2021-02-05
CN112330456B true CN112330456B (en) 2024-10-29

Family

ID=74308228

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011359241.7A Active CN112330456B (en) 2020-11-27 2020-11-27 Ultra-low-delay hardware acceleration market data stream analysis system

Country Status (1)

Country Link
CN (1) CN112330456B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112989675B (en) * 2021-04-20 2021-09-14 北京智芯仿真科技有限公司 Coarse grain parallel iteration method and device for integrated circuit interlayer coupling instant update
CN113691532B (en) * 2021-08-24 2023-11-28 中科亿海微电子科技(苏州)有限公司 Parallel analysis method and device for tera-megaphone communication data based on FAST protocol
CN114143119B (en) * 2021-11-25 2024-05-07 上海金融期货信息技术有限公司 Market low-delay interface device based on FPGA
CN114138582B (en) * 2021-12-08 2023-06-16 中科亿海微电子科技(苏州)有限公司 FPGA-based financial acceleration card decoding penetration delay measurement system and method
CN115086454B (en) * 2022-07-21 2022-12-09 北京金橙子科技股份有限公司 Method, system and storage medium for self-adaptive galvanometer control signal interface
CN115460085A (en) * 2022-08-20 2022-12-09 西安翔腾微电子科技有限公司 Ethernet protocol acceleration circuit and method
CN115174698B (en) * 2022-09-07 2022-12-13 深圳华锐分布式技术股份有限公司 Market data decoding method, device, equipment and medium based on table entry index
CN115344527B (en) * 2022-10-18 2023-01-13 上海特高信息技术有限公司 High-speed market data caching method based on FPGA
CN116074408A (en) * 2022-12-14 2023-05-05 恒生电子股份有限公司 Quotation data recovery method and device
CN118250355B (en) * 2024-05-23 2024-07-23 上海特高信息技术有限公司 Analysis method for analyzing and monitoring heterogeneous system by market data based on FPGA

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20030080443A (en) * 2002-04-08 2003-10-17 (주) 위즈네트 Internet protocol system using hardware protocol processing logic and the parallel data processing method using the same
US8788512B2 (en) * 2012-05-23 2014-07-22 International Business Machines Corporation Generating data feed specific parser circuits
CN111147462A (en) * 2019-12-17 2020-05-12 苏州浪潮智能科技有限公司 FPGA-based step protocol analysis method, system, terminal and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
FPGA技术在沪深行情加速的应用;交易技术前沿;交易技术前沿;20190331(第2019年第1期);50-52 *

Also Published As

Publication number Publication date
CN112330456A (en) 2021-02-05

Similar Documents

Publication Publication Date Title
CN112330456B (en) Ultra-low-delay hardware acceleration market data stream analysis system
CN108988991B (en) Bandwidth Adaptive Serial Data Transmission System
US10043220B2 (en) Method, device and storage medium for data processing
CN101277272A (en) A Realization Method of Massive Broadcasting Data Storage
US8885480B2 (en) Packet priority in a network processor
CN111723059B (en) Data compression method and device, terminal equipment and storage medium
US8130826B2 (en) Systems and methods for preparing network data for analysis
CN111400229A (en) A serial communication system and serial communication method with adaptive baud rate
CN112291041A (en) Data decoding device and method based on FPGA
CN114338439B (en) Universal network flow analysis device and method
CN109547157B (en) Ten-trillion network controller supporting time-triggered Ethernet and control method
CN112017049B (en) Security quotation forwarding system and method
CN114143119A (en) Market condition low-delay interface device based on FPGA
WO2025025858A1 (en) Image data transmission method and apparatus, device, and medium
CN113220607A (en) Data processing method based on FIFO
CN109120604B (en) Data verification method based on packet sequencing IP hidden channel
CN108881306B (en) Encrypted flow analysis defense method based on data packet size sequence
CN114157716B (en) Block chain-based data processing method and device and electronic equipment
US8289996B2 (en) Multi-purpose PDU container for delineating PDU datagrams and PDU datagram attributes in an 8B/10B coded system
CN113242253A (en) Rapid processing method under security quotation monitoring mode
US11979479B1 (en) Packet sorting and reassembly circuit module
US20240273086A1 (en) High speed data packet pcap capture and storage with error detection-correction
CN117520260A (en) FPGA-based template securities trading quotation analysis system
CN114710480B (en) A readout electronic data processing method and system
US20240205122A9 (en) High speed data packet pcap capture and storage with error detection-correction

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant