Visual protocol analysis device
By providing a visualized protocol analysis device in the field of network communication, the adjustment and repeated testing of new agreements or protocols in existing technologies have been solved, and rapid and efficient protocol data coding and decoding are realized, and data security and scalability have been improved. Essence
Patent Information
- Application Number
- CN202411495988.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-01-28
AI Technical Summary
When handling new protocols or protocol modifications, the prior art requires a lot of adjustments and repeated testing, making it difficult to ensure the accuracy, stability, and data security of the functional modules.
Provide a visualized protocol parsing device, including user login module, visualization protocol editing module, protocol packaging/analysis code generation module, business packaging/analysis library generation module, protocol packaging/analysis library module, entered the protocol data through the human -computer interaction interface, Automatically generate an agreement packaging or parsing code, and form a dynamic library that can be used by the upper -level business through the compiler.
Realize the data coding and decoding of protocols quickly and efficiently, reduce development and test costs, improve data security and scalability, allow non -professional developers to easily operate, and simplify the agreement packaging and analytical process.
Smart Images

Figure CN119383233A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of network communication, and in particular to a visual protocol parsing device. Background Art
[0002] At present, commonly used protocol data encapsulation / parsing is usually based on current business, organizing software developers to directly refer to relevant protocol documents for development, and almost reorganizing design, coding and testing from the bottom up.
[0003] When faced with new protocols or protocol modifications, a lot of adjustments and repeated tests are required, which is not only time-consuming and labor-intensive, but also makes it difficult to ensure the accuracy and stability of functional modules and the security of data. Summary of the invention
[0004] In view of the deficiencies in the prior art, the present invention provides a visual protocol parsing device that can meet application requirements such as protocol data encoding and decoding.
[0005] The technical solution of the present invention to solve the above technical problems is as follows:
[0006] A visual protocol parsing device comprises a user login module, a visual protocol editing module, a protocol encapsulation / parsing code generation module, a business encapsulation / parsing library generation module, and a protocol encapsulation / parsing library module, wherein each module is connected in sequence;
[0007] The user login module is used for user login access verification and control to limit illegal access;
[0008] The visual protocol editing module is used to enter the corresponding data elements and formats according to the protocol provisions;
[0009] The protocol encapsulation / parsing code generation module is used to automatically translate the data elements and formats entered by the user into source code;
[0010] The business encapsulation / parsing library generation module is used to provide encoding and decoding business functions for various data elements, and supports encoding or decoding of data in units of whole bytes or bits;
[0011] The protocol encapsulation / parsing library module is used to compile the source code to form a dynamic link library that can be used by upper-layer services or for secondary development.
[0012] Furthermore, it includes a general data encoding and decoding library module, which is used to provide various data encoding and decoding functions;
[0013] The business encapsulation / parsing library generation module calls the general data encoding and decoding library module, and the protocol encapsulation / parsing code generation module references the general data encoding and decoding library module.
[0014] Further, it includes a data security and encryption module, which is used to provide encryption of data in the user data protocol data format to ensure the security of access data;
[0015] User login module access control data security and encryption module, visual protocol editing module access data security and encryption module.
[0016] Further, including a tree protocol data format module, a data security and encryption module encrypts / decrypts the tree protocol data format module;
[0017] The tree-shaped protocol data format module is used to store the protocol data and data element information entered by the user.
[0018] Furthermore, the tree protocol data format module adopts a Json / Xml file storage protocol structure.
[0019] Furthermore, it includes a user information and access record module, and a data security and encryption module to encrypt / decrypt the user information and access record module.
[0020] Furthermore, it includes a software component module and a protocol encapsulation / analysis library module through secondary development of the software component module.
[0021] Furthermore, it includes a general data encapsulation and analysis software module, and a protocol encapsulation / analysis library module is developed through secondary development of the general data encapsulation and analysis software module.
[0022] In summary, compared with the prior art, the above technical solution has the following beneficial effects:
[0023] (1) According to the characteristics of the information interaction data format, the characteristics of the data elements, and the data encoding / decoding process, the present invention proposes a complete solution consisting of a user login module, a visual protocol editing module, a protocol encapsulation / analysis code generation module, a business encapsulation / analysis library generation module, a tree-shaped protocol data format module, a universal data encoding and decoding library, and a data security and encryption module;
[0024] (2) The visual protocol editing proposed by the present invention represents the data elements of the protocol by fields, and the user can enter the information of each field of the protocol through the human-computer interaction interface. Even non-professional software developers can easily master it, and the operation is simple and targeted;
[0025] (3) The present invention proposes to use Json / Xml file storage protocol structure to perform hierarchical and layered management on the protocol structure, and provide the upper and lower level and same level element relationships of each node in the Json / Xml structure, which can clearly and accurately represent the parallel relationship, nested relationship, and association relationship within the protocol;
[0026] (4) The present invention can automatically generate protocol encapsulation or parsing code according to the above-mentioned types of data through the protocol entered through the human-computer interaction interface;
[0027] (5) The present invention uses a compiler to compile the protocol encapsulation / parsing code to form a dynamic library that can be used by upper-layer services. Other developers can directly use the dynamic library for secondary development without further adjustment or testing, thereby achieving fast and efficient results.
[0028] (6) The encoding library proposed in the present invention can encode / decode various data types and can encode / decode various data types in units of whole bytes / bits; it can provide a stable and reliable API interface to the business encapsulation / parsing library to complete the corresponding data encapsulation / parsing component functions, and can expand the general data encoding and decoding library as needed to meet the needs of the upper-layer encapsulation / parsing business;
[0029] (7) Solve the internal structure relationship of protocol data by setting data grouping, data type identification, and data length, such as: block division, parallelization, nesting, association, etc.;
[0030] (8) The present invention can complete the entire process of data visualization protocol editing, automatic generation of protocol encapsulation / parsing code, and automatic generation of business encapsulation / parsing library in units of whole bytes / bits to meet the needs of the current complex data encoding and decoding environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 is a schematic diagram of a device according to an embodiment of the present invention;
[0032] Figure 2 This is a diagram of the internal message organization structure of a Json / Xml file in an embodiment of the present invention;
[0033] Figure 3 This is a diagram of the visual protocol editing software in an embodiment of the present invention. DETAILED DESCRIPTION
[0034] The principles and features of the present invention are described below in conjunction with all the accompanying drawings. The examples given are only used to explain the present invention and are not used to limit the scope of the present invention.
[0035] The embodiment of the invention discloses a visual protocol parsing device.
[0036] Reference Figure 1 , a visual protocol parsing device, can meet the application requirements of protocol data encoding, decoding, etc. The present invention proposes a complete set of solutions based on the characteristics of information interaction data format, the characteristics of data elements, and the processing flow of data encoding / decoding.
[0037] It reduces costs and solves the problem that when processing information interaction data, software developers need to encapsulate / parse business data and write a lot of code. It also solves the problem that after coding is completed, software testers are still required to perform unit testing, functional testing, performance testing, etc. on related modules, which takes up a lot of development and testing time and consumes high costs.
[0038] It improves security and solves the problem that software developers need to code according to protocol documents and software testers also need to design test cases according to protocol documents for testing. There are many links involved, and important protocol information may be leaked during the circulation process, causing security problems.
[0039] It enhances scalability and solves the current protocol encapsulation / parsing. When faced with new protocols or protocol changes, redesign is often required, which may require a lot of modifications from the bottom-level coding or will face a series of problems such as repeated development and testing.
[0040] The present invention represents the data elements of the protocol by fields, and the user can enter the information of each field of the protocol through the human-computer interaction interface. Even non-professional software developers can easily master it, and the operation is simple and targeted. A visual protocol parsing device includes a user login module, a visual protocol editing module, a protocol encapsulation / parsing code generation module, a business encapsulation / parsing library generation module, and a protocol encapsulation / parsing library module, and each module is connected in sequence.
[0041] Among them, the user login module is used for user login access verification and control to limit illegal access.
[0042] Among them, the visual protocol editing module is used to enter the corresponding data elements and formats according to the protocol provisions.
[0043] The protocol encapsulation / analysis code generation module is used to automatically translate the data elements and formats entered by the user into source code. The protocol entered through the human-computer interaction interface automatically generates protocol encapsulation or parsing code according to various types of data.
[0044] The business encapsulation / parsing library generation module is used to provide encoding and decoding business functions for various data elements, and supports encoding or decoding of data in units of whole bytes or bits. The compiler is used to compile the protocol encapsulation / parsing code to form a dynamic library that can be used by upper-layer services. Other developers can directly use the dynamic library for secondary development without further adjustment or testing.
[0045] The protocol encapsulation / parsing library module is used to compile the source code to form a dynamic link library that can be used by upper-layer services or for secondary development.
[0046] It also includes a general data encoding and decoding library module, which is used to provide various data encoding and decoding functions. The business encapsulation / analysis library generation module calls the general data encoding and decoding library module, and the protocol encapsulation / analysis code generation module references the general data encoding and decoding library module.
[0047] The general data encoding and decoding library proposed therein can encode / decode various data types, and can encode / decode various data types in units of whole bytes / bits; it can provide a stable and reliable API interface to the business encapsulation / parsing library, complete the corresponding data encapsulation / parsing component functions, and can expand the general data encoding and decoding library as needed to meet the needs of upper-level encapsulation / parsing services.
[0048] The entire process of data visualization protocol editing, automatic generation of protocol encapsulation / parsing code, and automatic generation of business encapsulation / parsing library is completed in units of whole bytes / bits to meet the needs of the current complex data encoding and decoding environment.
[0049] It also includes a data security and encryption module, which is used to provide encryption of user data protocol data format data to ensure the security of access data. User login module access control data security and encryption module, visual protocol editing module access data security and encryption module.
[0050] It also includes a tree protocol data format module, a data security and encryption module to encrypt / decrypt the tree protocol data format module. In order to ensure data security, the encryption storage and user access authority control method of the tree protocol data format file is preferred.
[0051] Among them, the tree-shaped protocol data format module is used to store the protocol data and data element information entered by the user. The tree-shaped protocol data format module preferably adopts the Json / Xml file storage protocol structure. The present invention proposes to adopt the Json / Xml file storage protocol structure, perform hierarchical and layered management on the protocol structure, and provide the upper and lower level and same level element relationships of each node in the Json / Xml structure, which can clearly and accurately represent the parallel relationship, nested relationship, and associated relationship within the protocol. By setting data grouping, data type identification, and data length, the internal structural relationship of the protocol data is solved, such as: block, parallel, nested, associated, etc.
[0052] It also includes a user information and access record module, and a data security and encryption module to encrypt / decrypt the user information and access record module.
[0053] It also includes a software component module, a protocol encapsulation / analysis library module and a software component module through secondary development.
[0054] It also includes a general data encapsulation and analysis software module, and a protocol encapsulation / analysis library module is developed through secondary development of the general data encapsulation and analysis software module.
[0055] Combining the above method with practice, a set of visual general protocol encapsulation / parsing software method device is given, which consists of a user login module, a visual protocol editing module, a protocol encapsulation / parsing code generation module, a business encapsulation / parsing library generation module, a tree protocol data format module, a general data encoding and decoding library, and a data security and encryption module. It can automatically generate a business encapsulation / parsing dynamic library based on the protocol format edited by the user through a visual interface.
[0056] Software engineers can use the business encapsulation / parsing library for secondary development, such as: for use by upper-level businesses, or to develop general data encapsulation and parsing software tools.
[0057] The implementation steps of a visual protocol analysis device according to an embodiment of the present invention are as follows:
[0058] (I) User login module
[0059] By obtaining the stored user name, password, key and other information for comparison and verification, the login access results and operation records are encrypted and stored.
[0060] (II) Visual protocol editing module
[0061] Users can edit (add / delete / modify) protocol data, edit (add / delete / modify) protocol fields, and change (move up / down) field structure and position. A field can be a data element or a block of data elements.
[0062] (1) The information of data elements includes: element name, element ID, internal number, classification, type, length (bits), identifier, and remarks;
[0063] (2) Supported data types include: character type (char), Boolean type (bool / BOOL), integer type (short / int / long / long long), floating point type (float / double), string type (char* / char[]), unsigned type (unsigned char / unsigned short / unsigned int / unsigned long), etc.;
[0064] (3) Ability to enter message data structure with bytes or bits as the minimum unit;
[0065] (4) A code capable of displaying the data elements of the message;
[0066] (5) Defines the internal data structure of DATA, GROUP, GROUP_FLAG, STRUCT, ARRAY, and ARRAY_NUM to distinguish data elements, as follows:
[0067] (a) DATA: represents data. The data types corresponding to the smallest unit include character type (char), Boolean type (bool / BOOL), integer type (short / int / long / long long), floating point type (float / double), string type (char* / char[]), unsigned type (unsigned char / unsigned short / unsigned int / unsigned long), etc.
[0068] (b) GROUP: represents a data block composed of multiple data elements with related relationships;
[0069] (c) GROUP_FLAG (Group Flag): Indicates the available flag of the group data block. During protocol encapsulation / parsing, this field can be used to determine whether the group data content is used / existed;
[0070] (d) STRUCT (structure): represents a structure composed of multiple data elements, corresponding to the struct structure;
[0071] (e) ARRAY: indicates that data (DATA) / structure (STRUCT) appears in the form of an array;
[0072] (f) ARRAY_NUM (array length): the length of the ARRAY structure (number of loops), and the corresponding internal message organization structure of the Json / Xml file is as follows Figure 2 shown.
[0073] (III) Protocol encapsulation / analysis code generation module
[0074] According to the Json / Xml file, the protocol is translated into code that can be recognized by the compiler. Through the information and classification of each data element defined by the visual protocol editing module, it is parsed / encapsulated according to data type processing and logical combination.
[0075] (IV) Business encapsulation / analysis library generation module and protocol encapsulation / analysis library module
[0076] The business encapsulation / parsing library is a target file. The compiler compiles according to the protocol encapsulation / parsing code to generate a directly usable function library, which contains data encapsulation and data parsing related services. Users can use the business encapsulation / parsing library to conduct secondary development and use conveniently and quickly.
[0077] (V) General data encoding and decoding library module
[0078] The general data encoding and decoding library mainly provides interface files to the protocol encapsulation / analysis code generation module, including the specific implementation of various data encoding, decoding logic, and functions in DATA (data); there is no need to repeatedly write complicated encoding / decoding logic inside the protocol encapsulation / analysis code generation module, and it can be done by simply introducing a dynamic library. After the business encapsulation / analysis library is generated, the general data encoding and decoding library can be used by the business encapsulation / analysis library to directly provide data encoding and decoding functions.
[0079] (VI) Data security and encryption module, user information and access record module, and tree protocol data format module
[0080] User information, user access records, etc. are encrypted / decrypted through encryption algorithms, and tree-shaped protocol data format (Json / Xml) data formed by visual protocol editing is encrypted / decrypted to ensure data security.
[0081] (VII) Secondary development software component modules and general data packaging and analysis software modules
[0082] Users can develop software components by using business encapsulation / parsing libraries and general data encoding and decoding libraries to complete corresponding businesses, and can also develop corresponding general data encapsulation and parsing software.
[0083] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A visual protocol analysis device, characterized in that: It includes a user login module, a visual protocol editing module, a protocol encapsulation / parsing code generation module, a business encapsulation / parsing library generation module, and a protocol encapsulation / parsing library module, and each module is connected in sequence; The user login module is used for user login access verification and control to limit illegal access; The visual protocol editing module is used to enter the corresponding data elements and formats according to the protocol provisions; The protocol encapsulation / parsing code generation module is used to automatically translate the data elements and formats entered by the user into source code; The business encapsulation / parsing library generation module is used to provide encoding and decoding business functions for various data elements, and supports encoding or decoding of data in units of whole bytes or bits; The protocol encapsulation / parsing library module is used to compile the source code to form a dynamic link library that can be used by upper-layer services or for secondary development.
2. The visual protocol analysis device according to claim 1, characterized in that: It includes a general data encoding and decoding library module, which is used to provide various data encoding and decoding functions; The business encapsulation / parsing library generation module calls the general data encoding and decoding library module, and the protocol encapsulation / parsing code generation module references the general data encoding and decoding library module.
3. The visual protocol analysis device according to claim 1, characterized in that: Including data security and encryption module, which is used to provide encryption of user data protocol data format to ensure the security of access data User login module access control data security and encryption module, visual protocol editing module access data security and encryption module.
4. The visual protocol analysis device according to claim 3, characterized in that: It includes a tree protocol data format module, a data security and encryption module to encrypt / decrypt the tree protocol data format module; The tree-shaped protocol data format module is used to store the protocol data and data element information entered by the user.
5. The visual protocol analysis device according to claim 4, characterized in that: The tree protocol data format module adopts the Json / Xml file storage protocol structure.
6. The visual protocol analysis device according to claim 3, characterized in that: It includes a user information and access record module, and a data security and encryption module to encrypt / decrypt user information and access record modules.
7. The visual protocol analysis device according to claim 1, characterized in that: It includes software component module, protocol encapsulation / analysis library module and software component module through secondary development.
8. The visual protocol analysis device according to claim 1, characterized in that: Including general data encapsulation and analysis software module, protocol encapsulation / analysis library module through secondary development of general data encapsulation and analysis software module.
Citation Information
Patent Citations
Communication data protocol construction and deconstruction system and method
CN104767729A
Method and device for generating dynamic link library
CN111221532A
Network protocol data checking method and device
CN112799673A
Data processing method and device, equipment, storage medium and product
CN114356341A
Reinforcement learning model construction method and system
CN115456150A