+

CN111614651A - Low-delay TDS protocol analysis method based on FPGA - Google Patents

Low-delay TDS protocol analysis method based on FPGA Download PDF

Info

Publication number
CN111614651A
CN111614651A CN202010407637.8A CN202010407637A CN111614651A CN 111614651 A CN111614651 A CN 111614651A CN 202010407637 A CN202010407637 A CN 202010407637A CN 111614651 A CN111614651 A CN 111614651A
Authority
CN
China
Prior art keywords
tds
module
type
statement
fpga
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.)
Pending
Application number
CN202010407637.8A
Other languages
Chinese (zh)
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.)
Nanjing Accelecom Information Technology Co ltd
Original Assignee
Nanjing Accelecom 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 Nanjing Accelecom Information Technology Co ltd filed Critical Nanjing Accelecom Information Technology Co ltd
Priority to CN202010407637.8A priority Critical patent/CN111614651A/en
Publication of CN111614651A publication Critical patent/CN111614651A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/253Grammatical analysis; Style critique

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

A method for analyzing a low-delay TDS protocol based on an FPGA comprises the following steps: the method comprises the following steps: the client module directly writes the transaction data that the customer sent into storage module, and after the inside TDS service end module of FPGA received the TDS request of transaction end module through integrated high-speed tcp card, according to the source TDS agreement generation TDS message flow type only label of waiting to resolve, step two: generating a statement type label corresponding to the generated TDS message stream type unique label, and checking statement validity; step three: generating grammar and lexical rules matched with the character data stream of the statement type label; step four: and converting the grammar and lexical rules into an output data stream of the corresponding table configuration type, and outputting the output data stream to the access management module for data interaction of the transaction end module to the storage module. The invention does not need a CPU to participate in scheduling and high concurrent execution, not only has high integration level, low cost and clear structure, but also saves the process of operating a database by intermediate software, thereby greatly reducing the delay of data interaction.

Description

Low-delay TDS protocol analysis method based on FPGA
Technical Field
The invention relates to the technical field of TDS (time domain synchronous analysis) analysis applied to financial transaction systems of securities, stocks and the like, in particular to a low-delay TDS protocol analysis method based on an FPGA (field programmable gate array).
Background
With the development of the global market, more and more users participate in financial transactions such as stock and stock, the data volume is larger and larger, and the requirement on the access time of the transaction data is higher and higher. Data in current financial transactions of securities, stocks and the like are interacted in a database mode, transaction data of a client side are transmitted to a database through a network, a trading exchange side scans the database to obtain and update the database, the database is basically accessed in a software-based mode, software is required to be executed through a CPU of a host no matter through a shared memory or an optical network, no matter how much flow is, and great delay exists in view of the limitations of a software system and a CPU architecture; and when the amount of data to be processed increases sharply, the delay of data access also increases sharply at this time because the number of messages processed by the CPU is limited. The access of the database firstly needs to rapidly analyze the TDS protocol, while the analysis operation of the software is a time-consuming process, and the time of each execution is consumed not only in the analysis logic but also in the CPU scheduling and the protocol data access; the various time consumptions above all directly or indirectly affect the interaction of transaction data.
Disclosure of Invention
1. The technical problem to be solved is as follows:
the existing financial transaction data interaction of securities, stocks and the like has large delay.
2. The technical scheme is as follows:
in order to solve the above problems, a method for analyzing a low-delay TDS protocol based on an FPGA includes the following steps: the method comprises the following steps: the client module directly writes the transaction data that the customer sent into storage module, and after the inside TDS service end module of FPGA received the TDS request of transaction end module through integrated high-speed tcp card, according to the source TDS agreement generation TDS message flow type only label of waiting to resolve, step two: generating a statement type label corresponding to the TDS message stream type unique label generated in the step one according to the TDS message stream type unique label generated in the step one, and checking statement validity; step three: generating grammar and lexical rules matched with the character data stream according to the statement type labels in the step two; step four: and converting the grammar and lexical rules into an output data stream of the corresponding table configuration type according to the third step, and outputting the output data stream to the access management module for data interaction of the transaction terminal module to the storage module.
In step one, the unique label of the message flow is SQL message flow or RPC message flow.
In the first step, in the TDS server module, the TDS to be analyzed is processed inside the FPGA according to a data stream single clock cycle.
If the message type does not exist, the current message stream is discarded.
In step two, the statement type tag is a TOKEN statement or a PARAMETER statement.
In the second step, the statement type label analysis is processed in parallel according to a single clock cycle.
In step two, if the result of checking the validity is illegal, the current message flow is discarded.
The grammar and lexical rules include length.
The grammar and lexical rules are generated in the FPGA.
The data streams are transferred in parallel to a plurality of memory modules in a single clock cycle.
3. Has the advantages that:
the invention provides a low-delay TDS protocol analysis method based on FPGA aiming at the defect of large delay in the prior art, compared with the prior serial execution based on a software analysis mode, more required components, high cost, large power consumption and high delay, and compared with the prior software database which basically has microsecond-level delay, the invention combines the technical characteristics of high concurrency and low delay of FPGA chip processing, fully exerts the advantages of parallel processing, analyzes all steps and is executed in parallel, not only has low delay and can reach nanosecond-level delay of an FPGA system clock, but also has fewer required components, low cost and small power consumption.
Drawings
Fig. 1 is a TDS access overall framework schematic.
Fig. 2 is a TDS protocol parsing flow.
Detailed Description
The present invention will be described in detail below with reference to the accompanying drawings.
As shown in fig. 1 and fig. 2, the present invention provides a method for analyzing a low delay TDS protocol based on an FPGA, which includes the following steps: the method comprises the following steps: the client module directly writes transaction Data sent by a client into the storage module, and after receiving a TDS (distributed Data Stream) request of the transaction end module through an integrated high-speed tcp card, the FPGA (field programmable Gate Array) server module generates a TDS message Stream type unique label according to a source TDS protocol to be analyzed.
The client module directly writes the transaction data sent by the client into the storage module without intermediate conversion steps.
The message stream unique label is SQL (Structured Query Language) message stream or RPC (Remote Procedure Call) message stream.
the tcp received data is directly sent to the TDS server module, single clock cycle processing is carried out in the FPGA according to data flow, SQL and RPC messages can be analyzed in parallel, the whole packet of data is not required to be stored in an array or a queue in software operation, then the data is fetched according to a time slice fetching instruction and decoded, then analysis is carried out, and the current message flow is discarded under the condition that the message type is not stored. The delay is reduced to some extent.
Step two: generating a TDS message stream type unique label according to the source TDS protocol to be analyzed according to the first step to generate a corresponding statement type label, and checking statement validity.
The statement type tag is a TOKEN statement or a PARAMETER statement. Statement analyses such as TOKEN statements or PARAMETER statements are processed in parallel according to a single clock cycle, and the whole packet of data is not required to be stored into an array or a queue firstly in software operation and then processed in series according to time slices. The delay is reduced, and the TOKEN statement or PARAMETER statement is checked for validity, and if the TOKEN statement or PARAMETER statement is not legal, the current message flow is discarded, so that the delay is further reduced.
Step three: and generating grammar and lexical rules matched with the character data stream according to the statement type label in the step two.
The grammar and lexical rules include length. The grammar and the lexical rules are generated in parallel in the FPGA, do not need to be executed through a host CPU, are not limited by the limitations of a software system and a CPU architecture, and reduce the delay.
Step four: and converting the grammar and lexical rules into an output data stream of the corresponding table configuration type according to the third step, and outputting the output data stream to the access management module for data interaction of the transaction terminal module to the storage module.
Be equipped with the access management module between TDS server module and storage module, access management module be used for managing the memory block to interact with TSD server module.
The data streams are transferred in parallel to a plurality of memory modules in a single clock cycle.
The detailed description of the invention shows that compared with the existing serial execution based on a software analysis mode, the invention has the advantages of more required components, high cost, large power consumption and high delay, and compared with the existing software database which basically has microsecond-level delay, the invention combines the technical characteristics of high concurrency and low delay of FPGA chip processing, fully exerts the advantages of parallel processing, analyzes each step and executes in parallel, has low delay, can achieve nanosecond-level delay of an FPGA system clock, and has less required components, low cost and low power consumption.
Although the present invention has been described with reference to the preferred embodiments, it should be understood that various changes and modifications can be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A method for analyzing a low-delay TDS protocol based on an FPGA comprises the following steps: the method comprises the following steps: the client module directly writes the transaction data that the customer sent into storage module, and after the inside TDS service end module of FPGA received the TDS request of transaction end module through integrated high-speed tcp card, according to the source TDS agreement generation TDS message flow type only label of waiting to resolve, step two: generating a corresponding statement type label according to the TDS message stream type unique label generated in the step one, and checking the legality of the statement type label; step three: generating grammar and lexical rules matched with the character data stream according to the statement type labels in the step two; step four: and converting the grammar and lexical rules into an output data stream of the corresponding table configuration type according to the third step, and outputting the output data stream to the access management module for data interaction of the transaction terminal module to the storage module.
2. The method of claim 1, wherein: in step one, the unique label of the message flow is SQL message flow or RPC message flow.
3. The method of claim 1, wherein: in the first step, in the TDS server module, the TDS to be analyzed is processed inside the FPGA according to a data stream single clock cycle.
4. A method as claimed in claim 1, 2 or 3, characterized by: if the message type does not exist, the current message stream is discarded.
5. The method of claim 1, wherein: in step two, the statement type tag is a TOKEN statement or a PARAMETER statement.
6. The method of claim 1, wherein; in the second step, the statement type label analysis is processed in parallel according to a single clock cycle.
7. The method of claim 1, 5 or 6, wherein; in step two, if the result of checking the validity is illegal, the current message flow is discarded.
8. The method of claim 1, wherein: the grammar and lexical rules include length.
9. The method of claim 1 or 8, wherein: the grammar and lexical rules are generated in the FPGA.
10. The method of claim 1, wherein: the data streams are transferred in parallel to a plurality of memory modules in a single clock cycle.
CN202010407637.8A 2020-05-14 2020-05-14 Low-delay TDS protocol analysis method based on FPGA Pending CN111614651A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010407637.8A CN111614651A (en) 2020-05-14 2020-05-14 Low-delay TDS protocol analysis method based on FPGA

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010407637.8A CN111614651A (en) 2020-05-14 2020-05-14 Low-delay TDS protocol analysis method based on FPGA

Publications (1)

Publication Number Publication Date
CN111614651A true CN111614651A (en) 2020-09-01

Family

ID=72205173

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010407637.8A Pending CN111614651A (en) 2020-05-14 2020-05-14 Low-delay TDS protocol analysis method based on FPGA

Country Status (1)

Country Link
CN (1) CN111614651A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107122490A (en) * 2017-05-18 2017-09-01 郑州云海信息技术有限公司 The data processing method and system of aggregate function in a kind of Querying by group
CN107193657A (en) * 2017-05-18 2017-09-22 安徽磐众信息科技有限公司 Low latency server based on SOLAFLARE network interface cards
CN110019291A (en) * 2017-09-04 2019-07-16 中国移动通信集团浙江有限公司 A kind of SQL analytic method and SQL resolver
US20190361899A1 (en) * 2017-01-16 2019-11-28 China Unionpay Co., Ltd. Statement parsing method for database statement
CN111046072A (en) * 2019-11-29 2020-04-21 浪潮(北京)电子信息产业有限公司 Data query method, system, heterogeneous computing acceleration platform and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190361899A1 (en) * 2017-01-16 2019-11-28 China Unionpay Co., Ltd. Statement parsing method for database statement
CN107122490A (en) * 2017-05-18 2017-09-01 郑州云海信息技术有限公司 The data processing method and system of aggregate function in a kind of Querying by group
CN107193657A (en) * 2017-05-18 2017-09-22 安徽磐众信息科技有限公司 Low latency server based on SOLAFLARE network interface cards
CN110019291A (en) * 2017-09-04 2019-07-16 中国移动通信集团浙江有限公司 A kind of SQL analytic method and SQL resolver
CN111046072A (en) * 2019-11-29 2020-04-21 浪潮(北京)电子信息产业有限公司 Data query method, system, heterogeneous computing acceleration platform and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
BHARAT SUKHWANI: "Database Analytics Acceleration using FPGAs", 《IEEE XPLORE》 *
苏童等: "基于CAM的数据库查询硬件加速方法", 《信息工程大学学报》 *
薛士然: "CPU不堪重负,FPGA来助阵!", 《单片机与嵌入式系统应用》 *

Similar Documents

Publication Publication Date Title
CN107093138B (en) Auction Ask-Bid System and its operation method based on distributed clog-free asynchronous message tupe
US8713049B2 (en) Support for a parameterized query/view in complex event processing
Lockwood et al. A low-latency library in FPGA hardware for high-frequency trading (HFT)
KR20180122017A (en) Efficient state machine for real-time data flow programming
CN113157734B (en) Data processing method, device and equipment based on search framework and storage medium
CN112669158B (en) Transaction system and control method and device of transaction service thereof
CN111831461A (en) A method and apparatus for processing business processes
WO2022247201A1 (en) Data query method and apparatus
CN109871502A (en) A kind of flow data canonical matching process based on Storm
CN111767304A (en) Cross-database data query method, query device and readable medium
CN113326305A (en) Method and device for processing data
Campanile et al. Adaptable parsing of real-time data streams
CN111614651A (en) Low-delay TDS protocol analysis method based on FPGA
CN115086392A (en) Data plane and switch based on heterogeneous chip
CN117251472B (en) Cross-source data processing method, device, equipment and storage medium
CN109753285B (en) XML (extensive markup language) parser and reconfigurable computing system based on FPGA (field programmable Gate array)
CN117785982A (en) An online analysis and testing method for multiple data sources in credit scenarios
CN112799713B (en) Universal configurable test pile platform
El-Hassan et al. SCBXP: An efficient hardware-based XML parsing technique
CN113988861A (en) Currency exchange method and device
CN120429478B (en) Analysis method, device and equipment for price inquiring corpus in financial industry
Chen et al. MAT: Automating Go monolithic applications transform into microservices through dependency analysis and AST
KR20200124551A (en) A conversion systsm for processing large amounts of data in a batch job
CN118503290B (en) RISINGWAVE-based real-time data stream processing method, system and equipment
CN114240511B (en) User integration processing method, device, equipment, medium and program product

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200901

RJ01 Rejection of invention patent application after publication
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载