Computer network protocol data set construction method based on protocol deduction system

By constructing a computer network protocol data set based on the protocol deduction system, the problems of low classification accuracy and lack of key features in the existing technology are solved, and higher-quality data set construction and feature characterization are achieved.

CN118869833AActive Publication Date: 2024-10-29XIDIAN UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411061358.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-05
Publication Date
2024-10-29
Estimated Expiration
2044-08-05

AI Technical Summary

Technical Problem

The classification accuracy of computer network protocol data sets in the existing technology is low and the data representation of key features is lacking, mainly because the composition rules between protocols are not considered during data expansion and the manual annotation method fails to fully extract the key features of the data.

Method used

Using a method based on the protocol deduction system, by obtaining the expression images and symbol sequences of the computer network protocol, a standardized Latex structure symbol sequence and feature matrix are constructed, and the feature matrix is ​​modified and expanded according to the protocol combination expansion rules, combined with the word frequency of the symbols and inverse document frequencies to calculate a weight matrix to form a high-quality protocol data set.

Benefits of technology

It significantly improves the classification accuracy of the data set, effectively extracts and characterizes the key features of the protocol, and improves the construction quality of the data set.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118869833A_ABST
    Figure CN118869833A_ABST
Patent Text Reader

Abstract

The invention provides a method for constructing a computer network protocol data set based on a protocol deduction system. The method comprises the following implementation steps: acquiring a computer network protocol sample set and a standardized Latex structure symbol sequence of each computer network protocol; constructing a feature matrix of the standard Latex structure symbol sequence; classifying the sample set of the computer network protocol; expanding the protocol basic data set; and obtaining a construction result of the data set. When the protocol basic data set is expanded, the characteristic matrix is expanded and the feasibility is judged based on the protocol combination expansion rule in the protocol deduction system, so that the rationality and reliability of the expanded protocol in structure are ensured, the expansion effect is good, and the classification precision of the constructed data set is improved; in the stage of obtaining the construction result of the data set, the weight is distributed to each symbol in the feature matrix by calculating the word frequency and the inverse document frequency of each symbol, and the data representation of key features in the data set is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of artificial intelligence and data processing technology, and relates to a data set construction method, and specifically to a computer network protocol data set construction method based on a protocol deduction system, which can be applied to network security, network protocol development and testing, artificial intelligence, finance, the Internet of Things and other fields. Background Art

[0002] Computer network protocols are a set of rules, standards, and conventions established for data communication, defining how data is transmitted between network devices, including the format of data, transmission methods, error detection and correction, and the steps for connecting and disconnecting. Computer network protocols manage the end-to-end process of timely, secure, and managed data or network communications. They can be built into hardware or software, and the use of each network relies on network protocols for communication and connection. As the basis for understanding, designing, and maintaining computer network systems, computer network protocols play a vital role in global communication platforms, business applications and e-commerce, cloud computing, and big data.

[0003] A dataset is a set of structured data used for a specific task, which contains samples, features, and labels. A computer network protocol dataset is a dataset specifically used to store and analyze network protocols. It usually contains protocol samples, key features of protocols, and protocol labels that record protocol-related properties. With computer network protocol datasets, developers and researchers can perform protocol security analysis, protocol performance analysis, and develop and optimize protocols by training relevant protocol models.

[0004] The process of building a dataset usually includes data collection, data cleaning, data labeling, data segmentation, data enhancement, and data storage. Data collection can come from public data sources, web crawling, sensors, or user input. Data cleaning involves handling missing values ​​and noise as well as standardization. Data labeling can be done manually, automatically, or through crowdsourcing. Data segmentation is to divide data into training sets, validation sets, and test sets. Data enhancement refers to various transformations on data to improve the generalization ability of the model. Finally, the data is stored in a suitable format such as CSV or JSON.

[0005] Tongfang Knowledge Network Digital Publishing Technology Co., Ltd. and Tongfang Knowledge Network (Beijing) Technology Co., Ltd. proposed a method for constructing a corpus dataset of an academic large model in their patent application "Method, device, equipment and medium for constructing a corpus dataset of an academic large model" (patent application number: CN202311738155.0, application publication number: CN117851562A). The method includes: formulating construction rules for a corpus dataset of an academic large model; extracting massive corpus data according to the data extraction requirements; preprocessing the massive corpus data according to the data processing rules to obtain processed corpus data; and preprocessing the processed corpus data according to the manual annotation standards. The corpus data after manual annotation is performed to obtain the annotated corpus data; the annotated corpus data is classified according to the task type to obtain multiple task type scenario basic data sets; each task type scenario basic data set is expanded to form a task type scenario data set. The invention ensures the accuracy and applicability of the output academic document, but because the automatic construction and expansion method is adopted during data expansion, the composition rules between data are not considered, the expansion effect is poor, and the classification accuracy of the constructed data set is low; the data cannot be fully extracted by the manual annotation method, which leads to the lack of data representation of key features in the constructed data set. Summary of the invention

[0006] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and propose a data set construction method for a computer network protocol to solve the technical problems of low data set classification accuracy and lack of data representation of key features in the prior art.

[0007] To achieve the above object, the technical solution adopted by the present invention includes the following steps:

[0008] (1) Obtain a sample set of computer network protocols:

[0009] Get the expression images, symbol sequences and security attributes of M computer network protocols, and use the security attributes as labels of expression images. Then, the expression images, their labels and symbol sequences form a sample set D. sample , where M ≥ 600;

[0010] (2) Obtain the standardized Latex structure symbol sequence for each computer network protocol:

[0011] Segment the symbol sequence of the mth computer network protocol, and convert the lexical unit list including variable names, operators, separators and brackets obtained by segmentation into a symbol tree, and then recursively parse each symbol tree to obtain a standardized Latex structure symbol sequence;

[0012] (3) Construct the feature matrix of standardized Latex structure symbol sequence:

[0013] Divide the mth group of standardized Latex structure symbol sequences into N protocol events, each of which contains four elements: subject, action, message, and key, and construct an event matrix with a dimension of N×4, with N rows and four elements as columns. Then fill 0s in the empty positions of the event matrix whose dimension is less than H×4, and obtain a feature matrix with a dimension of H×4, where 1≤N≤100, H>100;

[0014] (4) Classify the sample set of computer network protocols:

[0015] According to the security attribute, the sample set D sample The M expression images in the image are divided into F categories, and the protocol basic data sets consisting of each category of expression images and their corresponding standardized Latex structure symbol sequences, feature matrices and image labels are obtained to obtain F protocol basic data sets;

[0016] (5) Expand the protocol basic data set:

[0017] The proportion of the number of f-th protocols in the protocol combination expansion rule based on the protocol deduction system f and the preset threshold Y satisfies P f <Y, modify some elements of each feature matrix in the protocol basic data set, and add the modified feature matrix with multiple encryption problems and random numbers to the corresponding protocol basic data set, while discarding the infeasible feature matrix, so as to expand the F protocol basic data sets and obtain F protocol data sets including R feature matrices, where 0.1≤Y≤0.2, R≥1000;

[0018] (6) Obtain the construction results of the dataset:

[0019] Calculate the initial weight value of each symbol in the B symbols contained in each of the four elements of each feature matrix in each protocol data set And Modify it according to the result of ascending sorting in the corresponding elements to obtain a weight matrix W with a dimension of H×4 Protocol , and then combine the F protocol data sets to obtain a computer network protocol data set containing R groups of protocol feature matrices, security attribute labels and corresponding weight matrices, where B≤100.

[0020] Compared with the prior art, the present invention has the following advantages:

[0021] First, based on the protocol combination expansion rules in the protocol deduction system, the present invention modifies some elements of each feature matrix in the protocol basic data set whose number of protocols accounts for less than a preset threshold, and adds the modified feature matrix that is feasible for multiple encryption problems and random numbers to the corresponding protocol basic data set, while discarding the non-feasible feature matrix to achieve the expansion of each protocol basic data set, fully considering the composition rules between protocols, and has a good expansion effect. Compared with the prior art, it effectively improves the classification accuracy of the constructed data set.

[0022] Second, in the stage of obtaining the construction results of the data set, the present invention assigns weights to each symbol based on the word frequency and inverse document frequency of each symbol in the four elements to obtain a weight matrix. The weight matrix can better reflect the importance of different protocol events, and then extract the key features of the protocol data, effectively improving the data representation of the key features in the data set. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 It is a flow chart for implementing the present invention. DETAILED DESCRIPTION

[0024] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0025] Reference Figure 1 , the present invention comprises the following steps:

[0026] Step 1) Obtain a sample set of computer network protocols:

[0027] Get the expression images, symbol sequences and security attributes of M computer network protocols, and use the security attributes as labels of expression images. Then, the expression images, their labels and symbol sequences form a sample set D. sample , where,M≥600, and the security properties include protocol security, vulnerability, and defective steps;

[0028] Step 2) Get the standardized Latex structure symbol sequence for each computer network protocol:

[0029] Segment the symbol sequence of the mth computer network protocol, and convert the lexical unit list including variable names, operators, separators and brackets obtained by segmentation into a symbol tree, and then recursively parse each symbol tree to obtain a standardized Latex structure symbol sequence;

[0030] The symbol tree includes a root node for storing the start and end marks of the sequence, a plurality of parent nodes equal to the number of operators included in the symbol sequence in the computer network protocol, and child nodes equal to the number and number of brackets, separators and variable names included in the symbol sequence in the computer network protocol;

[0031] Recursively parse each symbol tree to obtain a standardized Latex structure symbol sequence. The implementation steps are:

[0032] Step 2a) Initialize a stack S for tracking node matching and a list listinfo for collecting information fragments, and the root node of the symbol tree is the current node;

[0033] Step 2b) Push the data stored in the root node into the stack S, and move the current node to the position of the leftmost child node;

[0034] Step 2c) Determine whether the current node has a child node. If so, push the data stored in the current node into the stack S and move the current node to the position of the leftmost child node, and execute step 2c). Otherwise, execute step 2d);

[0035] Step 2d) Store the data stored in the current node into the list listinfo, and determine whether the current node has a right sibling node. If so, move the current node to the position of the right sibling node and execute step 2c), otherwise execute step 2e);

[0036] Step 2e) Extract the contents stored in the list listinfo according to the protocol dictionary D, convert them into standardized symbols and store them in the standardized symbol sequence S std In the process, determine whether the data stored in the parent node of the current node is the same as the data at the top of the stack S. If so, store the data stored in the parent node of the current node into the standardized symbol sequence S. std In the process, the top element of the stack is popped and step 2f) is executed. Otherwise, the current node is moved to the right sibling node of the parent node of the current node and step 2c) is executed, wherein the symbol dictionary D is used to uniformly record different symbolic representations of the same protocol information;

[0037] Step 2f) Determine whether the stack S is empty. If so, obtain the standardized Latex structure symbol sequence after recursive parsing of each symbol tree. Otherwise, move the current node to the right sibling node of the parent node of the current node and execute step 2c);

[0038] Step 3) Construct the feature matrix of the standardized Latex structure symbol sequence:

[0039] Divide the mth group of standardized Latex structure symbol sequences into N protocol events. Each protocol event indicates that the protocol subject has completed an atomic protocol action, such as sending or receiving a message, encrypting a message. Each protocol event contains four elements: subject, action, message, and key. Construct an event matrix with N rows and four elements as columns and a dimension of N×4. Then fill 0 in the empty positions of the event matrix whose dimension is less than H×4 to obtain a feature matrix with a dimension of H×4, where the size of N is related to the complexity of the protocol, 1≤N≤100, H>100.

[0040] Step 4) Classify the sample set of computer network protocols:

[0041] According to the security attribute, the sample set D sample The M expression images in the image are divided into F categories, and the protocol basic data sets consisting of each category of expression images and their corresponding standardized Latex structure symbol sequences, feature matrices and image labels are obtained to obtain F protocol basic data sets;

[0042] According to the security attribute, the sample set D sample The M expression images in the image are divided into F classes. The division method is: sample The M expression images in the image are divided into images of secure protocols and images of non-secure protocols, wherein the images of non-secure protocols are divided into F-1 categories according to the vulnerable attack types;

[0043] Step 5) Expand the protocol basic data set:

[0044] The proportion of the number of f-th protocols in the protocol combination expansion rule based on the protocol deduction system f and the preset threshold Y satisfies P f <Y, modify some elements of each feature matrix in the protocol basic data set, and add the modified feature matrix with multiple encryption problems and random numbers to the corresponding protocol basic data set, while discarding the infeasible feature matrix, so as to expand the F protocol basic data sets and obtain F protocol data sets including R feature matrices, where 0.1≤Y≤0.2, R≥1000;

[0045] The protocol deduction system introduces that most protocols can be expanded sequentially or in parallel by multiple security components. Based on the protocol combination expansion rules, a new protocol can be obtained by changing one or more components of the protocol without changing the security properties of the protocol.

[0046] The proportion of the number of agreements f , the calculation formula is:

[0047]

[0048] Among them, M f represents the number of protocols in the fth protocol basic data set;

[0049] The modified characteristic matrix where multiple encryption problems and random numbers are feasible means that there are no multiple encryption problems that make data difficult to interpret or analyze and the random numbers satisfy randomness;

[0050] Step 6) Get the construction result of the dataset:

[0051] Calculate the initial weight value of each symbol in the B symbols contained in each of the four elements of each feature matrix in each protocol data set And Modify it according to the result of ascending sorting in the corresponding elements to obtain a weight matrix W with a dimension of H×4 Protocol , and then combine the F protocol data sets to obtain a computer network protocol data set containing R groups of protocol feature matrices, security attribute labels and corresponding weight matrices, where B≤100;

[0052] The initial weight value of each symbol The calculation formula is:

[0053]

[0054]

[0055]

[0056] in, represents the frequency of the bth symbol in the R feature matrices, Indicates the proportion of the number of feature matrices of the bth symbol in the R feature matrices, a b,r is the number of times the bth symbol appears in the rth feature matrix, |{r:t b ∈d r}| represents the number of characteristic matrices containing the bth symbol;

[0057] All the amplified weight values ​​in each element are processed in ascending order and recombined, specifically:

[0058] Step 6a) Take k as the magnification factor Amplify and get the amplified weight value and will Split into two parts: integer and decimal, where k ≥ 100;

[0059] Step 6b) sort the amplified weight values ​​of the subject, action, message, and key in ascending order of integer digits, and determine whether there are weight values ​​with the same integer digits. If so, sort them in ascending order of decimal digits;

[0060] Step 6c) Determine whether the subject, action, message, and key parts have the same integer digits. If so, add 1 to the integer digit of the corresponding value with the larger decimal digit until there are no weight values ​​with the same integer digits in each part. Otherwise, execute step 6d)

[0061] Step 6d) Combine the integer digits of the subject, action, message, and key after processing to obtain a weight matrix W with a dimension of H×4 protocol .

Claims

1. A method for constructing a computer network protocol data set based on a protocol deduction system, characterized in that: The steps include: (1) Obtain a sample set of computer network protocols: Get the expression images, symbol sequences and security attributes of M computer network protocols, and use the security attributes as labels of expression images. Then, the expression images, their labels and symbol sequences form a sample set D. sample , where M ≥ 600; (2) Obtain the standardized Latex structure symbol sequence for each computer network protocol: Segment the symbol sequence of the mth computer network protocol, and convert the lexical unit list including variable names, operators, separators and brackets obtained by segmentation into a symbol tree, and then recursively parse each symbol tree to obtain a standardized Latex structure symbol sequence; (3) Construct the feature matrix of standardized Latex structure symbol sequence: Divide the mth group of standardized Latex structure symbol sequences into N protocol events, each of which contains four elements: subject, action, message, and key, and construct an event matrix with a dimension of N×4, with N rows and four elements as columns. Then fill 0s in the empty positions of the event matrix whose dimension is less than H×4, and obtain a feature matrix with a dimension of H×4, where 1≤N≤100, H>100; (4) Classify the sample set of computer network protocols: According to the security attribute, the sample set D sample The M expression images in the image are divided into F categories, and the protocol basic data sets consisting of each category of expression images and their corresponding standardized Latex structure symbol sequences, feature matrices and image labels are obtained to obtain F protocol basic data sets; (5) Expand the protocol basic data set: The proportion of the number of f-th protocols in the protocol combination expansion rule based on the protocol deduction system f and the preset threshold Y satisfies P f <Y, modify some elements of each feature matrix in the protocol basic data set, and add the modified feature matrix with multiple encryption problems and random numbers to the corresponding protocol basic data set, while discarding the infeasible feature matrix, so as to expand the F protocol basic data sets and obtain F protocol data sets including R feature matrices, where 0.1≤Y≤0.2, R≥1000; (6) Obtain the construction results of the dataset: Calculate the initial weight value of each symbol in the B symbols contained in each of the four elements of each feature matrix in each protocol data set And Modify it according to the result of ascending sorting in the corresponding elements to obtain a weight matrix W with a dimension of H×4 Protocol , and then combine the F protocol data sets to obtain a computer network protocol data set containing R groups of protocol feature matrices, security attribute labels and corresponding weight matrices, where B≤100.

2. The method according to claim 1, characterized in that The security properties described in step (1) include protocol security, vulnerabilities, and defect steps.

3. The method according to claim 1, characterized in that: The symbol tree described in step (2) includes a root node for storing the start and end marks of the sequence, a plurality of parent nodes equal to the number of operators contained in the symbol sequence in the computer network protocol, and child nodes equal to the number of brackets, separators and variable names contained in the symbol sequence in the computer network protocol.

4. The method according to claim 3, characterized in that The steps for recursively parsing each symbol tree in step (2) to obtain a standardized Latex structure symbol sequence are as follows: (2a) Initialize the stack S for tracking node matching and the list listinfo for collecting information fragments. The root node of the symbol tree is the current node. (2b) Push the data stored in the root node into stack S, and move the current node to the position of the leftmost child node; (2c) Determine whether the current node has a child node. If so, push the data stored in the current node into stack S, move the current node to the position of the leftmost child node, and execute step (2c). Otherwise, execute step (2d). (2d) Store the data stored in the current node into the list listinfo, and determine whether the current node has a right sibling node. If so, move the current node to the position of the right sibling node and execute step (2c); otherwise, execute step (2e); (2e) Extract the contents stored in the list listinfo according to the protocol dictionary D, convert them into standardized symbols and store them in the standardized symbol sequence S std In the process, determine whether the data stored in the parent node of the current node is the same as the data at the top of the stack S. If so, store the data stored in the parent node of the current node into the standardized symbol sequence S. std In the process, the top element of the stack is popped and step (2f) is executed. Otherwise, the current node is moved to the right sibling node of the parent node of the current node and step (2c) is executed, wherein the symbol dictionary D is used to uniformly record different symbolic representations of the same protocol information; (2f) Determine whether the stack S is empty. If so, obtain the standardized Latex structure symbol sequence after recursive parsing of each symbol tree. Otherwise, move the current node to the right sibling node of the parent node of the current node and execute step (2c).

5. The method according to claim 1, characterized in that In step (2), the sample set D is divided according to the security attribute. sample The M expression images in the image are divided into F classes. The division method is: sample The M expression images in are divided into images of secure protocols and images of non-secure protocols, where the images of non-secure protocols are divided into F-1 categories according to the vulnerable attack types.

6. The method according to claim 1, characterized in that The number of agreements described in step (4) accounts for P f , the calculation formula is: Among them, M f represents the number of protocols in the fth protocol base dataset.

7. The method according to claim 1, characterized in that The multiple encryption problems and the feasible modified characteristic matrix of random numbers described in step (5) refer to the multiple encryption problems and random numbers that do not exist and satisfy the randomness that make the data difficult to interpret or analyze.

8. The method according to claim 1, characterized in that: The initial weight value of each symbol described in step (6) The calculation formula is: in, represents the frequency of the bth symbol in the R feature matrices, Indicates the proportion of the number of feature matrices of the bth symbol in the R feature matrices, a b,r is the number of times the bth symbol appears in the rth feature matrix, |{r:t b ∈d r }| represents the number of characteristic matrices containing the bth symbol.

9. The method according to claim 1, characterized in that: The amplified weight values ​​of each element described in step (6) are processed in ascending order and recombined, specifically: (6a) With k as the magnification factor Amplify and get the amplified weight value and will Split into two parts: integer and decimal, where k ≥ 100; (6b) sorting the amplified weight values ​​of the subject, action, message, and key in ascending order of integer digits, and determining whether there are weight values ​​with the same integer digits. If so, sorting them in ascending order of decimal digits; (6c) Determine whether there are any integers in the subject, action, message, and key parts that are identical. If so, add 1 to the integer of the corresponding value with the larger decimal place until there are no integers in the parts that have the same weight value. Otherwise, execute step (6d). (6d) Combine the integer bits of the subject, action, message, and key after processing to obtain a weight matrix W with a dimension of H×4 protocol .

Citation Information

Patent Citations

  • Method and system for classifying and recognizing a plurality of protocols

    CN101605126A

  • Sparse protocol analysis system of industrial Internet of Things

    CN112134878A

  • Unknown industrial control protocol reverse analysis method and device

    CN117354207A