Optimization method for explaining and judging network attack information based on CoT driving
Through the CoT-driven network attack information interpretation and evaluation method, multi-model generation and iterative optimization algorithms are used to solve the problem that traditional algorithms are difficult to interpret unknown attack information, and efficient and accurate interpretation and adaptability are achieved, reducing costs and resource investment .
Patent Information
- Application Number
- CN202410989072.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2044-07-23
AI Technical Summary
Traditional cyber attack information interpretation algorithms are difficult to effectively interpret unknown attack information, lack universality and applicability, and cannot process complex contexts and implicit information. Moreover, the large model has insufficient information integrity and semantic accuracy control, resulting in explanation accuracy and Format consistency problem.
Using the CoT-driven network attack information interpretation and evaluation method, by formulating input templates, using multiple large models to generate explanations and perform multi-dimensional spatial vector coding, combining information correction, semantic accuracy and deviation control and rule template matching algorithms, the composite similarity is constructed Judgment criteria, iteratively optimize output to ensure the completeness and accuracy of explanations.
Improve the ability to interpret unknown cyber attack information, reduce custom vocabulary interference, enhance context understanding and context processing capabilities, generate diverse and accurate explanations, adapt to new attack information, eliminate frequent updates of models, save research and development and Operation and maintenance costs.
Smart Images

Figure CN119030744A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of network security, and in particular relates to an optimization method for network attack information interpretation and evaluation based on CoT drive, and specifically provides an efficient optimization method for network attack information interpretation and evaluation. Background Art
[0002] With the increasing number of unknown types of cyber attacks in our lives, traditional interpretation algorithms can no longer explain them well. The optimization method based on CoT-driven interpretation and judgment of cyber attack information has shown its unique advantages. By utilizing the CoT analysis capabilities of large models and the deep integration of cyber attack scenarios, this method has shown innovative advantages. It not only enhances the ability to interpret unknown cyber attack information, but also opens up a new path for intelligent interpretation of unknown cyber attacks. At present, the data set for interpretation of cyber attack information is relatively scarce due to the difficulty of collection and the emergence of new types of attacks, such as fileless attacks of advanced persistent threats APT and SolarWinds supply chain attacks. The training effect of traditional security detection algorithms in interpreting these cyber attack information is not ideal.
[0003] Traditional network attack information interpretation algorithms mainly interpret known attack information, but cannot effectively interpret the large amount of unknown network attack information that emerges in daily network life. These traditional algorithms often rely on designing rules or features for different types of attack information, which are limited to static interpretation of keyword fixed pattern matching, and are difficult to have universality and applicability, and the workload is huge. Although the vocabulary of traditional methods can query known network security terms, it cannot identify "custom" words and non-fixed fields. These non-standard words are difficult to quantify and parse in a standard way, which can easily mislead traditional network security attack information interpretation algorithms and reduce the accuracy of interpretation. In addition, traditional methods have difficulty in capturing complex contexts and implicit information, and cannot fully understand the intentions and motivations behind attack information. Building and maintaining a huge keyword library and corresponding rules requires a lot of human resources, and the rules or features need to be adjusted manually, which will reduce the quality of interpretation of the emerging network attack information.
[0004] CoT shows good adaptability and versatility in interpreting "custom" and "non-standard" words in different types of attack information and network attack traffic, and can handle various complex attack behaviors and situations. Compared with traditional algorithms, CoT has excellent contextual understanding and the ability to handle complex contexts, and can put forward security risks and protection suggestions exposed by current attack information in a humanized way. CoT is not limited by the static interpretation of traditional algorithms for fixed keyword pattern matching. Its diverse and expressive text makes the interpretation of network attack information more vivid and intuitive. This generative interpretation is very friendly for non-professional operation and maintenance personnel to understand large amounts of complex network attack information, and it greatly reduces R&D and operation and maintenance costs. Due to its strong generalization ability and iterative correction and learning, CoT can better adapt to new attack information without frequent updates of models or algorithms.
[0005] However, the answers generated by CoT have some shortcomings in some aspects: First, in terms of information completeness and standardization, although the generated explanations are diverse and expressive, they may sometimes fail to fully cover all relevant important key information points, especially when the attack technology is novel or complex, it is easy to miss key details. Secondly, in terms of the control of semantic accuracy and deviation, when dealing with special vocabulary or more complex attack methods, the large model may misunderstand the context, resulting in the output of explanations that are inconsistent with the semantics of the original attack information, such as normal activities being misjudged as attack behaviors. At the same time, due to the limitations or imbalance of training data, or due to over-generalization, the large model may ignore special circumstances in specific situations, and have a biased understanding of certain attack behaviors, resulting in the inaccuracy of the answers it generates in key details; thirdly, in terms of rule consistency issues, the diversity of the large model CoT may cause it to ignore the importance of organizing key information according to preset templates, which may lead to inconsistency and confusion in the output format, especially involving standardized reports or scenarios that require highly structured information. Therefore, this has increased the difficulty of the operation and maintenance personnel in understanding and operating the rapid response to information to a certain extent. Summary of the invention
[0006] In order to solve the problems of the prior art, the present invention proposes an optimization method for network attack information interpretation and judgment based on CoT drive, which can effectively solve the problems of unknown network attack information interpretation, efficient screening and judgment of optimal interpretation, etc.
[0007] The present invention is implemented by the following technical solution: an optimization method for interpreting and judging network attack information based on CoT drive, the steps of which are:
[0008] Step 1: Specify prompt as the selected model M n (n=1,2,3...) input template;
[0009] Divide the dataset D into k groups of datasets d based on every 10 attack samples k , Y k =(E i * ,A i * ) as the golden label, setting a high-quality prompt: <Y k ,Q> as the input for selecting different models;
[0010] Among them, Y k ∈d k , k=1,2,3...; E i * A is the CoT standard interpretation part of the i-th attack information; i * is the standard answer part of the i-th attack information; Q is the new network attack information.
[0011] Step 2: Through model M n The CoT capability obtains the text answer corresponding to the model output (E i ,A i ), where i=1,2,3...,E i For the explanation part of CoT, A i For the final answer part;
[0012] Select Model M n (n=1,2,3,4...), input prompt to model M in sequence n , we get the model M n The text answer (E i ,A i ), where E i Denoted as the explanation part of CoT, A i The specific method for the final answer is:
[0013] prompt is input to model M1 (chatgpt), output (E1, A1); input to model M2 (Wen Xin Yi Yan), output (E2, A2); input to model M3 (Zhi Pu Qing Yan), output (E3, A3); input to model M4 (Tong Yi Qian Wen), output (E4, A4); and so on. prompt is input to model M n , output (E i ,A i ).
[0014] Step 3 For each model M n Generated (E i ,A i) text, encoded by the all-MiniLM-L6-v2 model to generate a multidimensional space vector encoding V i (i=1,2,3...);
[0015] Each model M n Generated (E i ,A i ) all belong to the category of text. In order to input these texts as variables into the composite similarity judgment standard function, the all-MiniLM-L6-v2 model is used to encode the text and generate a spatial encoding vector V that can be understood by the computer. i (i=1,2,3...), the encoding calculation formula is as follows:
[0016] V i =Encode all-MiniLM (E i ,A i )
[0017]
[0018] in:
[0019] V i The multi-dimensional space vector encoding of (Ei, Ai) generated by the model Mn after Encoding;
[0020] V * The gold label Y~(E * ,A * )The multidimensional space vector encoding output after Encode.
[0021] Step 4: Adaptive iterative detection algorithm function pair (E i ,A i ) performs iterative retrieval and completion of information integrity to obtain a matching score S km ;
[0022] Adaptive iterative detection algorithm S through information correction km (V i ,V * ), calculate the ratio of the number of times the specified feature appears together to the total number of times it is mentioned, measure the matching degree of the feature in the two texts, and retrieve and complete the information completeness of (Ei, Ai) in an iterative manner until the maximum number of iterations is reached or all features f have been retrieved, the iteration ends;
[0023] Calculate the matching score S km , the specific calculation formula is as follows:
[0024]
[0025] in,
[0026] F is a feature set list of the adaptive iterative detection algorithm with information correction, including attack time, attack IP, attack port, and attack type;
[0027] N match (V i ,V * ,f) indicates that V i and V * The number of co-occurrences of feature f(f∈F) in ;
[0028] N total (V i ,f),N total (V * ,f) respectively represent the i and V * The total number of mentions of feature f in .
[0029] Step 5: Calculate the model M through the control algorithm of semantic accuracy and deviation n Output (E i ,A i ) and the gold label Y~(E * ,A * ) semantic similarity, and obtain the matching score S sm ;
[0030] The model M is calculated by the control algorithm of semantic accuracy and deviation n Output (E i ,A i ) and the gold label Y~(E * ,A * ) to obtain the semantic similarity score S sm (V i ,V * ).
[0031] First, determine the representative vocabulary list or phrases of the features after preprocessing. For a certain feature, use the pre-trained word embedding model to calculate the average semantic similarity score between the text given by the model and the gold label on the feature. Then take the weighted average of all features in the feature set as the overall semantic similarity score: The specific calculation formula is as follows:
[0032]
[0033] in,
[0034] T is a set of fuzzy semantic features, including ip, time, port, protocol, intent, where feature ≠ keyword;
[0035] and are respectively the representative vocabulary lists of feature t in V i and V * ;
[0036] denotes the average semantic similarity score between vocabulary w and all relevant vocabularies of feature t in V * ;
[0037] λ t is the semantic weight of feature t, which is used to adjust the relative importance of different features in semantic similarity calculation.
[0038] Step 6 calculates the template matching degree between (E n , A i ) output by model M through a similarity algorithm based on rule-template matching and the golden label Y~(E i , A * ) provided by dataset D to obtain a matching score S * . Set a threshold g3, where g3 is the threshold of the similarity algorithm based on rule-template matching. If S tm < g3, then let model M tm regenerate (E n , A i ) with reference to the golden label Y template; i )
[0039] Calculate the number or proportion of matching templates between (E n , A i ) output by model M and the golden label Y~(E i , A * ) provided by dataset D through a similarity algorithm based on rule-template matching, and take the weighted average of all feature template matching scores as the overall template matching score to obtain a matching score S * . Set a threshold g3. If S tm < g3, then let model M tm regenerate (E n , A i ) with reference to the template of the golden label Y; i )
[0040] The specific calculation formula is as follows:
[0041]
[0042] where
[0043] is the characteristic f in V i and V * The number or proportion of matching templates in
[0044] μ f is the template matching weight of feature f, which is used to adjust the relative importance of different features in template matching;
[0045] C is the expression template of feature f.
[0046] Step 7: The composite similarity evaluation criteria are constructed by using the adaptive iterative detection algorithm with information correction, the control algorithm for semantic accuracy and deviation, and the similarity algorithm based on rule template matching to obtain the model M. n The output and the golden label Y~(E * ,A * )'s total score S i (i=1,2,3...);
[0047] Firstly, the composite similarity evaluation criteria are jointly constructed by the adaptive iterative detection algorithm with information correction, the control algorithm of semantic accuracy and deviation, and the similarity algorithm based on rule template matching to obtain the model M. n The output and the golden label Y~(E * ,A * )'s total score S i (i=1,2,3...).
[0048] The specific calculation formula is as follows:
[0049] S i =W km S km (V i ,V * )+W sm S sm (V i ,V * )+W tm S tm (V i ,V * )
[0050] in,
[0051] S i is the composite similarity evaluation score;
[0052] W km , W sm , W tmThey are respectively the adaptive iterative detection based on information correction, the control of semantic accuracy and deviation, and the weight based on rule template matching, which reflect the relative importance of each matching method in the overall similarity evaluation and satisfy:
[0053] W km +W sm +W tm =1
[0054] Step 8 determines whether Si exceeds the threshold G. G is the threshold for judging whether the overall composite similarity evaluation score S i meets the ideal requirements. If S i <G, repeat steps 5-7 for a new round of iteration. If the number of iterations > 5, or there exists S i >G, the iteration ends;
[0055] Set the threshold G and determine whether the composite similarity evaluation score S i exceeds the threshold G. If S i <G (converges), repeat the adaptive iterative detection with information correction, the control of semantic accuracy and deviation, and the similarity iteration process based on rule template matching respectively. If the number of iterations > 5, or there exists S i >G, the iteration ends.
[0056] Step 9 starts the horizontal comparison between models M n and calculates the difference d n between the scores S i of models M i . If d i converges to the threshold g, where g is the threshold for describing the horizontal comparison between models M n , at this time, the (E n ) generated by each model M i , A i ) tends to be stable and the accuracy reaches the peak. At this time, the (E max ), A i , A i ) corresponding to the highest score S
[0057] Perform a horizontal comparison of the composite similarity evaluation scores between models M n , that is, calculate the difference d n between the interpretation scores S i of models M i for the same attack information;
[0058] Set the threshold g. If d i >g ∪ d i <g, at this time, the (E i ), Ai ) volatility is quite different, so the standard historical data set is used as a reference input to the model M n For correction; if d i Converge to the threshold g, then it is determined that each model M n Generated (E i ,A i ) tends to a stable state, and all models M n The accuracy reaches its peak, at which point the model with the highest score S max The corresponding (E i ,A i ) is output as a reliable standard answer and presented to the user.
[0059] The beneficial effect created by the present invention is: an optimization method for interpreting and judging network attack information driven by CoT is proposed. The method uses the CoT capability of a large model to interpret network attack information, and selects the optimal interpretation to display to operation and maintenance personnel. This enables non-network security professionals to effectively handle a large number of unknown attacks in daily network life, including situations where the type is unknown and key information is unknown. This method reduces the interference of custom and non-standard vocabulary on interpretation, while having excellent context understanding and context processing capabilities, and can specifically propose hidden dangers and protective measures exposed by current attack information. On the other hand, CoT can generate diverse and expressive texts, and is not limited by the static interpretation of fixed pattern matching of traditional algorithms. The method has a strong generalization ability, and through continuous iterative correction and learning, it can better adapt to new attack information without the need to frequently update models or algorithms. Doing so not only saves R&D costs, but also reduces resource investment requirements. It only needs to ensure that high-quality sample data is input to obtain ideal output. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 The overall process of the present invention is as follows;
[0061] Figure 2 This is a framework diagram of the composite similarity evaluation standard. DETAILED DESCRIPTION
[0062] The optimization method for explaining and judging network attack information based on CoT includes the following steps:
[0063] The present invention is described in detail with reference to the accompanying drawings.
[0064] The network attack information interpretation optimization algorithm process is as follows Figure 1 As shown, it includes the specific algorithm details process:
[0065] 1. Set up the input template.
[0066] (1) Divide the dataset D into k groups of datasets d based on every 10 attack samples. k , Y k =(E i * ,A i * ) as a gold label.
[0067] (2) Set prompt: <Y k , Q>
[0068] in,
[0069] Y k ∈d k , k = 1, 2, 3, ...;
[0070] E i * The CoT standard interpretation part of the i-th attack information;
[0071] A i * is the standard answer part of the i-th attack information;
[0072] Q is new network attack information.
[0073] 2. Select model M n (n=1,2,3,4...), input prompt to model M in sequence n , we get the model M n Output through CoT (E i ,A i ).
[0074] prompt is input to model M1 (chatgpt), output (E1, A1);
[0075] Prompt inputs to model M2 (Wen Xin Yi Yan), outputs (E2, A2);
[0076] Prompt inputs to model M3 (Zhipu Qingyan), output (E3, A3);
[0077] prompt is input to model M4 (Tongyi Qianwen), and output is (E4, A4); ......
[0079] prompt input to model M n , output (E i ,A i ).
[0080] in,
[0081] E iIt is indicated as the explanation part of CoT;
[0082] A i This is the final answer part.
[0083] 3. Text encoding
[0084] Each model M n Generated (E i ,A i ) all belong to the text category. In order to use them as variables to be input into the composite similarity evaluation standard function, they need to be encoded through the all-MiniLM-L6-v2 model to generate a computer-understandable spatial encoding vector V i (i=1,2,3...), the encoding calculation formula is as follows:
[0085] V i =Encode all-MiniLM (E i ,A i )
[0086] V * =Encode all-MiniLM (E * ,A * )
[0087] in:
[0088] V i For model M n Generated (E i ,A i ) The multidimensional space vector encoding output after Encode;
[0089] V * The gold label Y~(E * ,A * ) The multidimensional space vector encoding output after Encode;
[0090] 4. Adaptive iterative detection algorithm with information correction.
[0091] (1) First, the adaptive iterative detection algorithm S is corrected by information km (V i ,V * ), calculate the ratio of the number of times a specified feature appears together to the total number of times it is mentioned, and measure the degree of matching of the feature in the two texts.
[0092] (2) Iterate the (E i ,A i) retrieves and completes the information integrity until the maximum number of iterations is reached or all features f have been retrieved, and the iteration ends.
[0093] (3) Calculate the matching score S km , the specific calculation formula is as follows:
[0094]
[0095] in,
[0096] F is a list of feature sets (such as attack time, attack IP, attack port, etc.);
[0097] N match (V i ,V * ,f) indicates that V i and V * The number of co-occurrences of feature f(f∈F) in ;
[0098] N total (V i ,f),N total (V * ,f) respectively represent the i and V * The total number of mentions of feature f in .
[0099] 5. Semantic Precision and Deviation Control Algorithm
[0100] (1) Calculate the model M through the control algorithm of semantic accuracy and deviation n Output (E i ,A i ) and the gold label Y~(E * ,A * ) to obtain the semantic similarity score S sm (V i ,V * ).
[0101] (2) Determine a representative vocabulary list or phrase about the feature after preprocessing. For a certain feature, use the pre-trained word embedding model to calculate the average semantic similarity score between the text given by the model and the gold label on the feature, and then take the weighted average of all features in the feature set as the overall semantic similarity score. The specific calculation formula is as follows:
[0102]
[0103] in,
[0104] T is a set of fuzzy semantic features ({ip, time, port, protocol, intent}), (feature ≠ keyword, same semantics)
[0105] and are respectively the representative vocabulary lists of feature t in V i and V * The average semantic similarity score of the word w and the feature t with all relevant words in V
[0106] denotes (calculated using a pre-trained word embedding model) * in all relevant words
[0107] λ t is the semantic weight of feature t, used to adjust the relative importance of different features in semantic similarity calculation.
[0108] 6. Similarity algorithm based on rule-template matching.
[0109] (1) Calculate the number or proportion of the matching templates of (E n , A i ) output by the model M through the similarity algorithm based on rule-template matching and the golden label Y~(E i , A * ) provided by the dataset D, and take the weighted average of all feature template matching scores as the overall template matching score to obtain the matching score S * (V tm , V i , V * ). Set the threshold g3. If S tm < g3, then let the model M n regenerate (E i , A i ) with reference to the template of the golden label Y;
[0110] (2) The specific calculation formula is as follows:
[0111]
[0112] where
[0113] is the number or proportion of the matching templates of feature f in V i and V * ;
[0114] μ f is the template matching weight of feature f, used to adjust the relative importance of different features in template matching;
[0115] C is the expression template of feature f, such as "attack IP: X", "attack time: YY-MM-DD", etc.
[0116] 7. Construct a composite similarity evaluation criterion.
[0117] (1) Jointly construct a composite similarity evaluation criterion through an adaptive iterative detection algorithm for information correction, a control algorithm for semantic accuracy and deviation, and a similarity algorithm based on rule template matching to obtain the output of model M n and the total evaluation score S * , A * ) of the gold label Y~(E i (i = 1, 2, 3...).
[0118] (2) The specific calculation formula is as follows:
[0119] S i = W km S km (V i , V * ) + W sm S sm (V i , V * ) + W tm S tm (V i , V * )
[0120] Among them,
[0121] S i is the composite similarity evaluation score;
[0122] W km , W sm , W tm are the weights of the adaptive iterative detection for information correction, the control of semantic accuracy and deviation, and the rule template matching respectively, reflecting the relative importance of each matching method in the overall similarity evaluation, and satisfying:
[0123] W km + W sm + W tm = 1
[0124] 8. Iteration end condition.
[0125] First, set a threshold G, and judge whether the composite similarity evaluation score S i exceeds the threshold G. If S i < G (convergence), then repeat the iterative processes of information integrity, semantic similarity, and rule template matching respectively. If the number of iterations > 5, or there is S i > G, then the iteration ends.
[0126] 9. Horizontal level comparison.
[0127] (1) Conduct a horizontal level comparison of the composite similarity evaluation scores between models M n , that is, calculate the difference d n between the interpretation scores S i of model M i for the same attack information;
[0128] (2) Set a threshold g. If d i > g ∪ d i < g, at this time, the fluctuation differences of the outputs (E i , A i ) of different models are relatively large. Use the standard historical data set as a reference input to model M n for correction; if d i converges to the threshold g, it is considered that at this time, the (E n , A i ) generated by each model M i tends to a stable state, and the accuracy of all models M n reaches the peak. Finally, take the (E max ) corresponding to S i , A i ) as the reliable standard answer and output it to show to the user.
Claims
1. An optimization method for network attack information interpretation and evaluation based on CoT, characterized in that: The steps are: Step 1: Specify prompt as the selected model M n (n=1,2,3...) input template; Step 2: Through model M n The CoT capability obtains the text answer corresponding to the model output (E i ,A i ), where i=1,2,3...,E i For the explanation part of CoT, A i For the final answer part; Step 3 For each model M n Generated (E i ,A i ) text, encoded by the all-MiniLM-L6-v2 model to generate a multidimensional space vector encoding V i (i=1,2,3...); Step 4: Adaptive iterative detection algorithm function pair (E i ,A i ) performs iterative retrieval and completion of information integrity to obtain a matching score S km ; Step 5: Calculate the model M through the control algorithm of semantic accuracy and deviation n Output (E i ,A i ) and the gold label Y~(E * ,A * ) semantic similarity, and obtain the matching score S sm ; Step 6 calculates model M through a similarity algorithm based on rule template matching n The output of (E i , A i ) and the template matching degree of the gold label Y~(E * , A * ) provided by the dataset D are obtained to get the matching score S tm , set a threshold g3, where g3 is the threshold of the similarity algorithm based on rule template matching. If S tm < g3, then let model M n regenerate (E i , A i ) with reference to the gold label Y template; Step 7: The composite similarity evaluation criteria are constructed by using the adaptive iterative detection algorithm with information correction, the control algorithm for semantic accuracy and deviation, and the similarity algorithm based on rule template matching to obtain the model M. n The output and the golden label Y~(E * ,A * )'s total score S i (i=1,2,3...); Step 8 determines whether S i exceeds a threshold G, where G is a threshold for determining whether the overall composite similarity evaluation score S i meets the ideal requirements. If S i < G, repeat steps 5-7 for a new round of iteration. If the number of iterations > 5, or there exists S i > G, the iteration ends; Step 9: Start Model M n Horizontal comparison between the two, calculation model M n Score S i The difference between i , if d i Converges to the threshold g, which is used to describe the model M n The threshold for horizontal comparison between models M n Generated (E i ,A i ) tends to be stable, and the accuracy reaches a peak. At this time, the model with the highest score S max The corresponding (E i ,A i ) is taken as the most reliable answer and is finally output as the standard answer and presented to the user.
2. According to claim 1, a CoT-driven network attack information interpretation and evaluation optimization method is characterized in that: In the step 1, the specific method is: Divide the dataset D into k groups of datasets d based on every 10 attack samples k , Y k =(E i * ,A i * ) as the golden label, setting a high-quality prompt: <Y k ,Q> as the input for selecting different models; Among them, Y k ∈d k , k=1,2,3...; E i * A is the CoT standard interpretation part of the i-th attack information; i * is the standard answer part of the i-th attack information; Q is the new network attack information.
3. According to claim 1, a CoT-driven network attack information interpretation and evaluation optimization method is characterized in that: In the step 2, the specific method is: Select Model M n (n=1,2,3,4...), input prompt to model M in sequence n , we get the model M n The text answer (E i ,A i ), where E i Denoted as the explanation part of CoT, A i The specific method for the final answer is as follows: prompt is input to model M1 (chatgpt), output (E1, A1); input to model M2 (Wen Xin Yi Yan), output (E2, A2); input to model M3 (Zhi Pu Qing Yan), output (E3, A3); input to model M4 (Tong Yi Qian Wen), output (E4, A4); and so on. prompt is input to model M n , output (E i ,A i ).
4. According to claim 1, a CoT-driven network attack information interpretation and evaluation optimization method is characterized in that: In the step 3, the specific method is: Each model M n Generated (E i ,A i ) all belong to the category of text. In order to input these texts as variables into the composite similarity judgment standard function, the all-MiniLM-L6-v2 model is used to encode the text and generate a spatial encoding vector V that can be understood by the computer. i (i=1,2,3...), the encoding calculation formula is as follows: V i =Encode all-MiniLM (E i ,A i ) V * =Encode all-MiniLM (E * ,A * ) in: V i For model M n Generated (E i ,A i ) The multidimensional space vector encoding output after Encode; V * The gold label Y~(E * ,A * )The multidimensional space vector encoding output after Encode.
5. According to claim 1, a CoT-driven network attack information interpretation and evaluation optimization method is characterized in that: In the step 4, the specific method is: Adaptive iterative detection algorithm S through information correction km (V i ,V * ), calculate the ratio of the number of times a specified feature appears together to the total number of times it is mentioned, measure the matching degree of the feature in the two texts, and iterate (E i ,A i ) performs information integrity retrieval and completion until the maximum number of iterations is reached or all features f have been retrieved, and the iteration ends; Calculate the matching score S km , the specific calculation formula is as follows: in, F is a feature set list of the adaptive iterative detection algorithm with information correction, including attack time, attack IP, attack port, and attack type; N match (V i ,V * ,f) indicates that V i and V * The number of co-occurrences of feature f(f∈F) in ; N total (V i ,f),N total (V * ,f) respectively represent the i and V * The total number of mentions of feature f in .
6. According to claim 1, a CoT-driven network attack information interpretation and evaluation optimization method is characterized in that: In the step 5, the specific method is: The model M is calculated by the control algorithm of semantic accuracy and deviation n Output (E i ,A i ) and the semantic similarity between the golden label Y~(E*,A*) given in the dataset D, and the semantic similarity score S is obtained sm (V i ,V * ). First, determine the representative vocabulary list or phrases of the features after preprocessing. For a certain feature, use the pre-trained word embedding model to calculate the average semantic similarity score between the text given by the model and the gold label on the feature. Then take the weighted average of all features in the feature set as the overall semantic similarity score: The specific calculation formula is as follows: in, T is a set of fuzzy semantic features, including ip, time, port, protocol, intent, and features ≠ keywords; and V i and V * A list of representative words for feature t in ; Represents the vocabulary w and feature t in V * The average semantic similarity score of all related words in ; λ t is the semantic weight of feature t, which is used to adjust the relative importance of different features in the calculation of semantic similarity.
7. According to claim 1, a CoT-driven network attack information interpretation and evaluation optimization method is characterized in that: In the step 6, the specific method is: Calculate model M through a similarity algorithm based on rule template matching n The output of (E i , A i ) and the number or proportion of matching templates of the gold label Y~(E provided by the dataset D * , A * ) Take the weighted average of all feature template matching scores as the overall template matching score to obtain the matching score S tm , Set the threshold g3. If S tm < g3, then let model M n Regenerate (E i , A i ) with reference to the template of the gold label Y; The specific calculation formula is as follows: in, is the characteristic f in V i and V * The number or proportion of matching templates in μ f is the template matching weight of feature f, which is used to adjust the relative importance of different features in template matching; C is the expression template of feature f.
8. The optimization method for network attack information interpretation and evaluation based on CoT drive according to claim 1 is characterized in that: In the step 7, the specific method is: Firstly, the composite similarity evaluation criteria are jointly constructed by the adaptive iterative detection algorithm with information correction, the control algorithm of semantic accuracy and deviation, and the similarity algorithm based on rule template matching to obtain the model M. n The output and the golden label Y~(E * ,A * )'s total score S i (i=1,2,3...). The specific calculation formula is as follows: S i =W km S km (V i ,V * )+W sm S sm (V i ,V * )+W tm S tm (V i ,V * ) in, S i is the composite similarity evaluation score; W km , W sm , W tm They are adaptive iterative detection based on information correction, control of semantic accuracy and deviation, and weight based on rule template matching, which reflects the relative importance of each matching method in the overall similarity evaluation and meets the following requirements: IN km +W sm +W tm =1。 9. The optimization method for network attack information interpretation and evaluation based on CoT drive according to claim 1 is characterized in that: In the step 8, the specific method is: Set the threshold G and judge the composite similarity evaluation score S i Whether it exceeds the threshold G. If S i < G (convergence), then repeat the adaptive iterative detection of information correction, the control of semantic accuracy and deviation, and the similarity iteration process based on rule template matching respectively. If the number of iterations > 5, or there exists S i > G, then the iteration ends.
10. The optimization method for network attack information interpretation and evaluation based on CoT drive according to claim 1, characterized in that: In the step 9, the specific method is: Carry out model M n The horizontal comparison of the composite similarity evaluation scores between n Explanation score S for the same attack information i The difference between i ; Set a threshold g. If d i > g ∪ d i < g, at this time, the fluctuation differences of the (E i , A i ) output by different models are relatively large. Use the standard historical data set as a reference and input it to model M n for correction; if d i converges to the threshold g, then it is determined that at this time, each model M n generates the (E i , A i ) tends to a stable state, and the accuracy of all models M n reaches the peak value. At this time, the (E max corresponding to the highest score S i , A i ) of the model with the highest score is output as a reliable standard answer and presented to the user.
Citation Information
Patent Citations
Privacy-preserving machine learning
US20200242466A1
Method and apparatus for automatically generating inference questions and answers
WO2021184311A1
