WO2017128299A1 - Procédé et système permettant l'analyse syntaxique d'un message à protocoles multiples en se basant sur le mode fichier - Google Patents
Procédé et système permettant l'analyse syntaxique d'un message à protocoles multiples en se basant sur le mode fichier Download PDFInfo
- Publication number
- WO2017128299A1 WO2017128299A1 PCT/CN2016/072806 CN2016072806W WO2017128299A1 WO 2017128299 A1 WO2017128299 A1 WO 2017128299A1 CN 2016072806 W CN2016072806 W CN 2016072806W WO 2017128299 A1 WO2017128299 A1 WO 2017128299A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- file
- data
- message
- protocol
- message file
- Prior art date
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/40—Network security protocols
Definitions
- the present invention belongs to the field of data communication technologies, and in particular, to a file method based multi-protocol message parsing method and system.
- the technical problem to be solved by the present invention is to provide a file method-based multi-protocol message parsing method and system, which aims to solve the problem that it is easy to cause reception by using the robin search respective protocol in the existing single channel multi-protocol single processing mode.
- the present invention provides a method for parsing multi-protocol messages based on a file method, which includes the following steps:
- Step S1 initializing an algorithm memory resource, and initializing a data message file handle
- Step S2 reading a data stream containing various protocols from the communication port, and storing the data stream in a data buffer area in the memory;
- Step S3 reading data in the data cache area, and writing the data into a message file as a file, and cleaning up the old message file to obtain an updated message file;
- Step S4 sharing the message file to all protocol stack parsers
- step S5 steps S2-S4 are repeated until all the data is read;
- Step S6 Each protocol stack parser reads the data in the updated message file by using the allocated file handle, and determines whether the protocol message exists in the data;
- Step S7 if yes, after the processing according to the protocol, respond to the application of the message, and repeat steps S6-S7; if not, repeat steps S6-S7.
- step S3 is specifically:
- Read the data in the data cache area and use the file processing algorithm to write the data from the file write pointer to the SDRAM/RAM message file in the form of a file, and update the pointer written by the file; and clean up the old The message file gets the updated message file.
- step S6 the process of reading the data in the message file in the step S6 is specifically:
- Each protocol stack parser uses the file handle allocated by the file system, calls the file read function to read the data in the updated message file, and updates the read pointer of the protocol file handle.
- the invention also provides a file-based multi-protocol message parsing system, comprising:
- a memory initialization unit configured to initialize an algorithm memory resource, and initialize a data message file handle
- a data stream storage unit configured to read a data stream from the communication port, and store the data stream in a data cache area in the memory
- a message file writing unit configured to read data in the data buffer area, and write the data into a message file in a file form, and at the same time, clean up the old message file to obtain an updated message file;
- a message file reading unit configured to share the message file to all protocol stack parsers, and each protocol stack parser uses the allocated file handle to read data in the updated message file;
- the message file parsing unit is configured to determine whether the protocol message exists in the data, and if yes, respond to the application according to the protocol.
- message file writing unit is specifically:
- Read the data in the data cache area and use the file processing algorithm to write the data from the file write pointer to the SDRAM/RAM message file in the form of a file, and update the pointer written by the file; and clean up the old The message file gets the updated message file.
- Each protocol stack parser uses the file handle allocated by the file system, calls the file read function to read the data in the updated message file, and updates the read pointer of the protocol file handle.
- the present invention has the beneficial effects that the method and system for parsing multi-protocol messages based on the file mode are implemented by the file-sharing packet to implement multi-protocol concurrent parsing.
- Fast processing of the received cached data stream avoiding the problem of data loss caused by excessive buffering of the received buffer due to the excessive resource overhead caused by the repeated search of the respective protocols in the existing same channel multi-protocol single processing mode, reducing the cache
- the overflow probability greatly improves the response speed and efficiency.
- the file method it completely isolates the protocol application and the communication layer, making the software program more hierarchical, easy to maintain, and easy to expand.
- FIG. 1 is a flowchart of a method for parsing a multi-protocol message based on a file according to an embodiment of the present invention
- FIG. 2 is a schematic diagram of a file-based multi-protocol message parsing system according to an embodiment of the present invention.
- the main implementation idea of the present invention is that a data stream composed of data including various protocols is provided to each protocol parser in a file manner, and a data stream is cached by a file method, and each protocol parser uses a file sharing method to access a single channel.
- the protocol data stream if the protocol stack parser reads the packet data containing the protocol, the response packet is processed according to the protocol; the protocols do not interfere with each other, and the packet zero is lost, and the protocol parser is completely independent.
- Step S1 initializing an algorithm memory resource and a file algorithm parameter, and initializing a data message file handle
- Step S2 reading a data stream containing various protocols from the communication port, and storing the data stream in a data buffer area in the memory;
- Step S3 reading data in the data cache area, and writing the data into a message file as a file, and cleaning up the old message file to obtain an updated message file;
- the step S3 is specifically: reading data in the data buffer area, and using a file processing algorithm to generate a data message file that can be accessed by other protocols; specifically, the entire data stream is maintained and managed by the file information. And providing an interface for protocol access; more specifically, writing the data from the file write pointer to the SDRAM/RAM in the form of a file (Synchronous Dynamic Random Access Memory, Synchronous Dynamic Random Access Memory / Random Access Memory, random access memory) message file, and update the pointer written by the file; and follow the FIFO (First Int First) Out, first-in, first-out queue) thoughts, clean up old message files, and get updated message files.
- FIFO First Int First
- the data message file manages the file content and file length through a write pointer and a read pointer; the file length is maintained by the write pointer, and when the data stream is written to the data file, the data will be Write the data file from the write pointer and update the write pointer; when the written pointer exceeds the maximum length of the file system limit (this can adjust the maximum length according to the cached resources), the old data will be discarded through the FIFO. And update the write pointer to reduce the pressure on the cache.
- Step S4 sharing the message file to all protocol stack parsers, and each protocol stack parser that needs to access the file can access the file;
- step S5 steps S2-S4 are repeated until all the data is read;
- Step S6 Each protocol stack parser reads the data in the updated message file by using the allocated file handle, and determines whether the protocol message exists in the data;
- the method for obtaining a data stream by using multiple file stacks by means of file reading is: the data stream containing different protocols is included in the same communication channel, and multiple protocols need to extract their own protocol data messages from the data stream; specifically, first, Each protocol is applied to the filed data file requesting access.
- the data message file system allocates a file handle for each access; then, each protocol application uses the file handle information to extract the protocol that has not been accessed. The latest data stream, while updating the access information for this protocol file handle.
- each protocol stack parser uses the file handle allocated by the file system, calls the file read function to read the data in the updated message file, and updates the read pointer of the protocol file handle;
- the device analyzes the read data according to the protocol characteristics, and determines whether the file data obtained from the file has the protocol message.
- Step S7 if yes, after the processing according to the protocol, respond to the application of the message, and repeat steps S6-S7; if not, repeat steps S6-S7.
- each independent protocol can implement the respective parsing according to steps S6-S7, and complete the response of each protocol packet, so that multiple protocols can be independently parsed.
- the present invention also provides a file-based multi-protocol message parsing system, as shown in FIG. 2, including:
- the memory initialization unit 1 is configured to initialize an algorithm memory resource and initialize a data message file handle
- a data stream storage unit 2 configured to read a data stream from the communication port, and store the data stream in a data cache area in the memory;
- the message file writing unit 3 is configured to read the data in the data buffer area, and write the data into the message file as a file, and clean up the old message file to obtain the updated message file. ;
- a message file reading unit 4 configured to share the message file to all protocol stack parsers, and each protocol stack parser uses the allocated file handle to read data in the updated message file;
- the packet file parsing unit 5 is configured to determine whether the protocol packet exists in the data, and if yes, respond to the application of the packet after processing according to the protocol.
- the invention is mainly applied in the field of communication, such as data acquisition, data communication, etc.; and is particularly suitable for multiple protocol parsing of a single channel.
- the shared access is performed through the filed message to implement multi-protocol concurrent parsing, which reduces resource overhead and saves processing time, improves response speed, quickly processes received buffered data stream, reduces buffer overflow probability, and discards invalid Protocol data.
- the file method it completely isolates the protocol application and the communication layer, making the software program more hierarchical, easy to maintain, and easy to expand; each protocol can search the data stream by accessing the data file without causing data. Packets are lost; each protocol can be packaged separately, easy to extend and migrate; each protocol is independent, even when the same protocol is used by multiple applications, it can be used independently, which can better divide the software hierarchy.
Abstract
La présente invention est applicable au domaine technique des communications de données et offre un procédé d'analyse syntaxique d'un message à protocoles multiples basé sur un mode fichier, qui consiste en ce qui suit: 1. Initialiser une ressource de mémoire algorithmes et un descripteur de fichiers; 2. Lire un flux de données provenant d'un port de communication et le stocker dans une zone tampon de données dans la mémoire; 3. Lire les données dans la zone tampon de données et écrire les données dans un fichier de messages, nettoyer en même temps un ancien fichier de messages pour obtenir un fichier de messages actualisé; 4. Partager le fichier de messages avec tous les analyseurs syntaxiques de piles de protocole; 5. Répéter les étapes 2 à 4; 6. Chaque analyseur syntaxique de pile de protocoles utilise un descripteur de fichiers attribué pour lire les données dans le fichier de messages actualisé, et on détermine s'il existe un message avec le protocole dans les données; et 7. Le cas échéant, on répond à l'application du message après le traitement du message selon le protocole. Le procédé selon la présente invention permet de résoudre le problème constitué par le fait que dans le mode de traitement unique existant, la recherche de chaque protocole tour à tour provoque rapidement un débordement du tampon de réception, ce qui mène à la perte de données.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2016/072806 WO2017128299A1 (fr) | 2016-01-29 | 2016-01-29 | Procédé et système permettant l'analyse syntaxique d'un message à protocoles multiples en se basant sur le mode fichier |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2016/072806 WO2017128299A1 (fr) | 2016-01-29 | 2016-01-29 | Procédé et système permettant l'analyse syntaxique d'un message à protocoles multiples en se basant sur le mode fichier |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2017128299A1 true WO2017128299A1 (fr) | 2017-08-03 |
Family
ID=59397173
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2016/072806 WO2017128299A1 (fr) | 2016-01-29 | 2016-01-29 | Procédé et système permettant l'analyse syntaxique d'un message à protocoles multiples en se basant sur le mode fichier |
Country Status (1)
Country | Link |
---|---|
WO (1) | WO2017128299A1 (fr) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112350996A (zh) * | 2020-10-15 | 2021-02-09 | 中国船舶重工集团公司第七一六研究所 | 一种可适应协议升级的通信报文解析系统及方法 |
CN115277881A (zh) * | 2022-06-17 | 2022-11-01 | 奇安信科技集团股份有限公司 | 网络报文解析方法及装置 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040030754A1 (en) * | 2002-06-12 | 2004-02-12 | Programmable Products, Inc | High-speed file server |
CN102104541A (zh) * | 2009-12-21 | 2011-06-22 | 索乐弗莱尔通讯公司 | 报头处理引擎 |
CN102769658A (zh) * | 2011-12-06 | 2012-11-07 | 北京安天电子设备有限公司 | 网络文件还原方法及装置 |
CN103236938A (zh) * | 2013-03-27 | 2013-08-07 | 广东全通教育股份有限公司 | 一种基于缓存及异步处理技术的用户行为采集方法及系统 |
CN105743894A (zh) * | 2016-01-29 | 2016-07-06 | 瑞斯康微电子(深圳)有限公司 | 一种基于文件方式的多协议报文解析方法与系统 |
-
2016
- 2016-01-29 WO PCT/CN2016/072806 patent/WO2017128299A1/fr active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040030754A1 (en) * | 2002-06-12 | 2004-02-12 | Programmable Products, Inc | High-speed file server |
CN102104541A (zh) * | 2009-12-21 | 2011-06-22 | 索乐弗莱尔通讯公司 | 报头处理引擎 |
CN102769658A (zh) * | 2011-12-06 | 2012-11-07 | 北京安天电子设备有限公司 | 网络文件还原方法及装置 |
CN103236938A (zh) * | 2013-03-27 | 2013-08-07 | 广东全通教育股份有限公司 | 一种基于缓存及异步处理技术的用户行为采集方法及系统 |
CN105743894A (zh) * | 2016-01-29 | 2016-07-06 | 瑞斯康微电子(深圳)有限公司 | 一种基于文件方式的多协议报文解析方法与系统 |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112350996A (zh) * | 2020-10-15 | 2021-02-09 | 中国船舶重工集团公司第七一六研究所 | 一种可适应协议升级的通信报文解析系统及方法 |
CN115277881A (zh) * | 2022-06-17 | 2022-11-01 | 奇安信科技集团股份有限公司 | 网络报文解析方法及装置 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110402568B (zh) | 一种通信的方法及装置 | |
EP1581875B1 (fr) | Utilisation d'acces direct a la memoire pour effectuer des operations de base de donnees entre deux machines ou plus | |
US7320041B2 (en) | Controlling flow of data between data processing systems via a memory | |
US8949472B2 (en) | Data affinity based scheme for mapping connections to CPUs in I/O adapter | |
AU2014200239B2 (en) | System and method for multiple sender support in low latency fifo messaging using rdma | |
US7461180B2 (en) | Method and apparatus for synchronizing use of buffer descriptor entries for shared data packets in memory | |
US7409468B2 (en) | Controlling flow of data between data processing systems via a memory | |
US20110225391A1 (en) | Hash processing in a network communications processor architecture | |
US8873550B2 (en) | Task queuing in a multi-flow network processor architecture | |
JP2015512083A (ja) | 暗示的なメモリの登録のための明示的なフロー制御 | |
WO2012119420A1 (fr) | Procédé et dispositif de traitement simultané de paquets de données | |
US9274586B2 (en) | Intelligent memory interface | |
CN101063963A (zh) | 数据零拷贝文件的移动方法 | |
WO2019153702A1 (fr) | Procédé de traitement d'interruptions, appareil et serveur | |
WO2017128299A1 (fr) | Procédé et système permettant l'analyse syntaxique d'un message à protocoles multiples en se basant sur le mode fichier | |
Tianhua et al. | The design and implementation of zero-copy for linux | |
Barak et al. | Performance of the Communication Layers of TCP/IP with the Myrinet Gigabit LAN | |
JP2002084311A (ja) | パケット転送処理装置 | |
EP1971923B1 (fr) | Procedes et gestion de circulations insuffisantes de donnees et dispositif possedant des capacites de gestion de circulations insuffisantes de donnees | |
WO2012119384A1 (fr) | Procédé, dispositif et système de montage de système de fichiers | |
JP2007528078A (ja) | コヒーレンス・メッセージを合体する方法及びシステム | |
WO2022024562A1 (fr) | Système informatique distribué et parallèle | |
CN213028113U (zh) | 网络安全数据采集存储系统 | |
Schneidenbach et al. | Architecture and Implementation of the Socket Interface on Top of GAMMA | |
Tang et al. | Demostration of self-described buffer for accelerating packet forwarding on multi-core servers |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 16887183 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 16887183 Country of ref document: EP Kind code of ref document: A1 |