Tunnel traffic association method and device based on noise reduction model
By removing network noise and confusion noise in tunnel traffic through a method based on the noise reduction model, the accuracy and speed of tunnel traffic correlation are improved, the problem of low correlation accuracy in the existing technology is solved, and more accurate abnormal network behavior tracking is achieved.
Patent Information
- Application Number
- CN202311587077.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-24
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2043-11-24
AI Technical Summary
The accuracy of tunnel traffic correlation in the existing technology is not high, making it difficult to accurately track abnormal network behavior in a mixed network environment, especially in CDN and public cloud networks. The existing method is based on statistical distance and is easily affected by slight network noise, resulting in Correlation accuracy decreases.
Using a method based on the noise reduction model, the network noise and confusion noise are removed through the pre-trained coding layer, and the associated sample relationship of the tunnel traffic is learned. The first coding layer is used to remove the network noise, and the second coding layer is used to remove the confusion noise, thereby improving the correlation. Accuracy.
It improves the accuracy of tunnel traffic correlation, enhances the correlation effect in complex noise scenarios, reduces traffic observation time, improves correlation speed, and can more accurately determine the communication relationship between tunnel entrance and exit nodes.
Smart Images

Figure CN118869520A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of network flow measurement and analysis, and in particular to a method and device for correlating tunnel flow based on a noise reduction model. Background Art
[0002] Tunnel technology is one of the common means to protect user privacy, especially multi-hop tunnels, which can effectively hide user behavior and protect user privacy. However, tunnel services are often abused for network attacks, information theft and other activities due to their privacy protection characteristics. Therefore, determining the hidden communication relationships in tunnel services and tracking and tracing abnormal network behaviors are of great significance to maintaining network security.
[0003] As more and more tunnel nodes are built on public network services such as CDN and public cloud, abnormal network behaviors are mixed with normal network traffic, which brings great challenges to tracing. Since most tunnel services adopt strong encryption measures, it is not realistic to analyze the data source based on content; the method of tracing traffic hop by hop requires the associator to have a large number of node resources, which is also difficult to do in real scenarios. Therefore, at this stage, only traffic correlation technology can achieve the goal of confirming communication relationships under limited conditions. Traffic correlation is the process of mapping the tunnel entry node flow to the exit node flow related to it (belonging to the same communication session), using content-independent features, and is completed only at both ends of the tunnel.
[0004] The current traffic correlation methods are mainly based on statistical distance methods, which regard statistical distance as an indicator to measure the correlation between two flows. Common indicators include cosine distance, Pearson coefficient, mutual information, etc. Each data flow is abstracted as a vector that describes its morphological characteristics (such as packet direction sequence, packet size sequence, packet interval sequence, etc.), and then the similarity is calculated using the calculation formula of the corresponding indicator. The statistical distance-based method only captures shallow external features, and slight network noise will significantly change the vector representation of the data flow, affecting the correlation accuracy. Summary of the invention
[0005] The present invention provides a tunnel flow correlation method and device based on a noise reduction model, which are used to solve the defect of low tunnel flow correlation accuracy in the prior art.
[0006] The present invention provides a tunnel flow correlation method based on a noise reduction model, comprising:
[0007] Acquire multiple ingress node flows and multiple egress node flows of a pre-established network tunnel; wherein the network tunnel is used by a client to access a corresponding network;
[0008] Determine at least one candidate inlet node flow corresponding to each outlet node flow, and input each of the outlet node flows into a pre-trained noise reduction model to sequentially perform network noise and confusion noise removal on the outlet node flows to obtain a mapped inlet node flow;
[0009] Calculating statistical distances between the mapping entry node flow and at least one candidate entry node flow respectively, screening the candidate entry node flows according to the statistical distances, and taking the candidate entry node flow corresponding to the smallest statistical distance as the target entry node flow associated with the exit node flow;
[0010] Among them, the denoising model is used to learn the mapping relationship between the associated sample input node flow and the sample output node flow; the denoising model includes: a first encoding layer and a second encoding layer, the first encoding layer is used to remove network noise, and the second encoding layer is used to remove confusion noise, so as to restore the input output node flow to the corresponding mapping input node flow.
[0011] According to a method for associating tunnel traffic provided by the present invention, a plurality of ingress node flows and a plurality of egress node flows of the network tunnel are obtained, comprising:
[0012] At each ingress node, the data packet size sequence and the corresponding data packet time sequence of the ingress node data flow are counted; a first time window is defined, and a cumulative calculation is performed based on the data packet size sequence corresponding to the data packet time sequence in each first time window to obtain the cumulative transmission volume of the ingress data flow in each first time window, and the cumulative transmission volume sequence of the ingress data flow in multiple first time windows is used as the ingress node flow;
[0013] At each egress node, the data packet size sequence and the corresponding data packet time series of the egress node data flow are counted; a second time window is defined, and a cumulative calculation is performed based on the data packet size sequence corresponding to the data packet time series in each second time window to obtain the cumulative transmission volume of the egress data flow in each second time window, and the cumulative transmission volume sequence of the ingress data flow in multiple second time windows is used as the egress node flow.
[0014] According to a method for associating tunnel traffic provided by the present invention, the associated sample inlet node flow and sample outlet node flow include: a first sample inlet node flow and a first sample outlet node flow containing network noise, and a second sample inlet node flow and a second sample outlet node flow containing network noise and confusion noise;
[0015] The training method of the denoising model includes:
[0016] Inputting the first sample inlet node flow and the first sample outlet node flow containing network noise as training data into the first coding layer to be trained to obtain a trained first coding layer;
[0017] The second sample inlet node flow and the second sample outlet node flow containing network noise and confusion noise are sequentially input into the trained first coding layer and the second coding layer to be trained as training data to obtain the trained second coding layer.
[0018] According to a method for associating tunnel traffic provided by the present invention, a first sample inlet node flow and a first sample outlet node flow containing network noise are input as training data into a first coding layer to be trained to obtain a trained first coding layer, comprising:
[0019] Taking the first sample outlet node flow containing network noise as input, and taking the first sample inlet node flow as an optimization target to be fitted;
[0020] The first sample entry node stream and the first sample exit node stream are input into the first coding layer to be trained, and the optimal parameter set of the first coding layer is determined by minimizing the square difference loss between the output of the first coding layer and the first sample entry node stream to obtain a trained first coding layer.
[0021] According to a method for associating tunnel traffic provided by the present invention, a second sample inlet node flow and a second sample outlet node flow containing network noise and confusion noise are sequentially input as training data into the trained first coding layer and the second coding layer to be trained to obtain the trained second coding layer, comprising:
[0022] Inputting the second sample exit node stream containing network noise and confusion noise into the trained first coding layer to obtain the second sample exit node stream with network noise removed;
[0023] Taking the second sample exit node stream after removing network noise as input, taking the second sample entry node stream as the optimization target to be fitted, and inputting the second sample entry node stream and the second sample exit node stream after removing network noise into the second coding layer to be trained;
[0024] By minimizing the squared difference loss between the output of the second coding layer and the second sample inlet node flow, an optimal parameter set of the second coding layer is determined to obtain a trained second coding layer.
[0025] According to a method for associating tunnel traffic provided by the present invention, each of the exit node flows is input into a pre-trained noise reduction model to sequentially remove network noise and confusion noise from the exit node flows to obtain a mapped entry node flow, including:
[0026] Input each of the exit node streams into the first coding layer to remove network noise, and obtain a corresponding noise-reduced exit node stream;
[0027] Each of the noise reduction outlet node streams is input into the second coding layer to remove the aliasing noise, thereby obtaining the mapping inlet node stream.
[0028] The present invention also provides a tunnel flow correlation device based on a noise reduction model, comprising:
[0029] A node flow acquisition module, used to acquire multiple ingress node flows and multiple egress node flows of a pre-established network tunnel; wherein the network tunnel is used by a client to access a corresponding network;
[0030] A denoising processing module, used to determine at least one candidate inlet node flow corresponding to each outlet node flow, and input each of the outlet node flows into a pre-trained denoising model to sequentially perform network noise and confusion noise removal processing on the outlet node flows to obtain a mapped inlet node flow;
[0031] A node flow screening module, used to respectively calculate the statistical distance between the mapping entry node flow and at least one candidate entry node flow, screen the candidate entry node flows according to the statistical distance, and use the candidate entry node flow corresponding to the smallest statistical distance as the target entry node flow associated with the exit node flow;
[0032] Among them, the denoising model is used to learn the mapping relationship between the associated sample input node flow and the sample output node flow; the denoising model includes: a first encoding layer and a second encoding layer, the first encoding layer is used to remove network noise, and the second encoding layer is used to remove confusion noise, so as to restore the input output node flow to the corresponding mapping input node flow.
[0033] According to an association device for tunnel traffic provided by the present invention, the noise reduction processing module is specifically used to: input each of the exit node streams into the first coding layer to remove network noise, and obtain the corresponding noise-reduced exit node stream; input each of the noise-reduced exit node streams into the second coding layer to remove confusion noise, and obtain the mapping entry node stream.
[0034] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any of the above-mentioned tunnel flow correlation methods based on the noise reduction model are implemented.
[0035] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-described tunnel flow correlation methods based on a noise reduction model.
[0036] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the steps of any of the above-mentioned tunnel flow correlation methods based on the noise reduction model are implemented.
[0037] The tunnel traffic association method and device based on the noise reduction model provided by the present invention, when obtaining the entry node flow and the exit node flow, determine at least one candidate entry node flow corresponding to each exit node flow, then remove the network noise and confusion noise from the exit node flow to obtain the mapped entry node flow, and then determine the target entry node flow associated with the exit node flow from at least one candidate entry node flow. Since the confusion noise is generated in the traffic initiation stage and the network noise is generated in the traffic transmission stage, different types of noise are removed through different coding layers. Compared with the existing method, the accuracy of the association result can be improved.
[0038] Secondly, the embodiment of the present invention defines the first time window and the second time window as units to respectively count the cumulative transmission volume of the ingress data flow and the cumulative transmission volume of the egress data flow. The granularity is independent of how many data packets are contained in the data flow and the order in which these data packets arrive. Therefore, in the case of packet loss, reassembly, retransmission, etc., its characterization of the cumulative transmission volume of the data flow is more stable than the characterization based on data packets. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0040] Figure 1 It is one of the flow charts of the tunnel flow correlation method based on the noise reduction model provided in the embodiment of the present invention;
[0041] Figure 2 is a schematic diagram of tunnel traffic provided by an embodiment of the present invention;
[0042] Figure 3 This is the second flow chart of the tunnel flow correlation method based on the noise reduction model provided in the embodiment of the present invention;
[0043] Figure 4 It is one of the flowcharts of the training method of the denoising model provided in the embodiment of the present invention;
[0044] Figure 5 This is a second flow chart of the method for training a denoising model provided by an embodiment of the present invention;
[0045] Figure 6 This is a third flow chart of the method for training a denoising model provided by an embodiment of the present invention;
[0046] Figure 7 It is a structural schematic diagram of a tunnel flow correlation device based on a noise reduction model provided in an embodiment of the present invention;
[0047] Figure 8 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0049] Combine the following Figure 1-Figure 7 The present invention describes a tunnel flow correlation method and device based on a noise reduction model according to an embodiment of the present invention.
[0050] The embodiment of the present invention discloses a tunnel flow correlation method based on a noise reduction model, see Figure 1 ,include:
[0051] Step 101: Acquire multiple ingress node flows and multiple egress node flows of a pre-established network tunnel; wherein the network tunnel is used for a client to access a corresponding network.
[0052] It should be explained that a network tunnel is a method of transmitting data between networks through an internetwork infrastructure. Through a network tunnel, a client can access network services. In this embodiment, a network tunnel can be simply understood as a path from an entry node to an exit node. Correspondingly, there is an entry node flow at the entry node and an exit node flow at the exit node.
[0053] In this embodiment, an automated script is used to generate and capture a network tunnel entry node flow for accessing a specific website on the client side, and a tunnel exit node flow is captured at a rear exit of the network tunnel.
[0054] In a network tunnel, there are multiple ingress node flows and egress node flows. It is possible that one ingress node flow is associated with multiple egress node flows, or it is possible that multiple ingress node flows are associated with one egress node flow. The purpose of the embodiment of the present invention is to find the most relevant one-to-one relationship among the many-to-one relationships.
[0055] Specifically, the embodiment of the present invention takes an example where an egress node flow is associated with multiple ingress node flows. When each egress node flow has multiple candidate ingress node flows with associated relationships, the ingress node flow with the most associated relationship is determined as the target ingress node flow, thereby determining that the ingress node flow and the egress node flow belong to the same communication session. Figure 2 , Figure 2 In the example, a network tunnel is formed between host A, host B, host C and host D, host E, and host F. For host F as an egress node, the ingress nodes associated with it include host A, host B, and host C, namely (A, F), (B, F), and (C, F). Through the method of this embodiment, the ingress node (host A) that is most associated with the egress node (host F) can be determined.
[0056] Of course, the method of this embodiment is also applicable to the case where one inlet node flow is associated with multiple outlet node flows. Since the processing steps are basically the same, this embodiment will not repeat the method of selecting the target outlet node flow most associated with the inlet node flow from multiple outlet node flows.
[0057] Step 102: determine at least one candidate inlet node flow corresponding to each outlet node flow, and input each of the outlet node flows into a pre-trained noise reduction model to sequentially perform network noise and confusion noise removal processing on the outlet node flows to obtain a mapped inlet node flow.
[0058] Among them, the denoising model is used to learn the mapping relationship between the associated sample input node flow and the sample output node flow; the denoising model includes: a first encoding layer and a second encoding layer, the first encoding layer is used to remove network noise, and the second encoding layer is used to remove confusion noise, so as to restore the input output node flow to the corresponding mapping input node flow.
[0059] Specifically, the sample inlet node flow and the sample outlet node flow in this embodiment include a first sample inlet node flow and a first sample outlet node flow of network noise as a non-confused node flow sequence pair, and a second sample inlet node flow and a second sample outlet node flow including network noise and confounded noise as a confounded node flow sequence pair, and the first encoding layer and the second encoding layer are trained with the non-confused node flow sequence and the confounded node flow sequence, respectively.
[0060] When constructing training data, a sequence pair consisting of two associated entry node flows and an exit node flow is used as a positive sample sequence pair. In addition, a part of the entry node flows is selected separately, and 99 unrelated exit node flows are randomly assigned to each entry node flow to form a negative sample sequence pair, simulating the situation where the traffic generated by the communication relationship to be traced accounts for 1% of the total traffic captured at the gateway.
[0061] During training, the loss function used corresponds to the statistical distance method used for subsequent association operations: if the Euclidean distance is used to determine the similarity of two node flows, the square error function is set as the loss function of the pre-processing denoising model. Similarly, if the cosine distance is used to determine the similarity of two node flows, the cosine similarity function is set as the loss function of the pre-processing denoising model; if the information entropy is used to determine the similarity of two node flows, the mutual information function is set as the loss function of the pre-processing denoising model.
[0062] Specifically, step 102 includes: inputting each of the export node streams into the first coding layer to remove network noise, and obtaining a corresponding noise reduction export node stream; inputting each of the noise reduction export node streams into the second coding layer to remove confusion noise, and obtaining the mapping entry node stream.
[0063] The obfuscation noise in this embodiment is generated in the traffic initiation stage, and the network noise is generated in the traffic transmission stage. Therefore, this embodiment uses the first coding layer and the second coding layer of the denoising model to denoise the egress node flow in stages, and the coding layers of different layers are responsible for fitting different types of noise. Compared with the existing method of directly training an end-to-end neural network model, the phased denoising has higher correlation accuracy on obfuscated traffic, and requires shorter flow observation time and faster correlation speed on non-obfuscated traffic.
[0064] Step 103, respectively calculating the statistical distance between the mapping inlet node flow and at least one candidate inlet node flow, screening the candidate inlet node flows according to the statistical distance, and taking the candidate inlet node flow corresponding to the smallest statistical distance as the target inlet node flow associated with the outlet node flow.
[0065] In this embodiment, the statistical distance can be achieved by calculating the Euclidean distance, cosine similarity or mutual information. The statistical distance can be used to describe the degree of association between two node flows.
[0066] In this embodiment, the egress node flow is converted into a mapping ingress node flow, and then the statistical distance between the mapping ingress node flow and at least one candidate ingress node flow is calculated, which can enhance the similarity of related node flows and ensure the association effect in scenarios with complex network noise.
[0067] The tunnel traffic association method and device based on the noise reduction model provided by the embodiment of the present invention, when the entry node flow and the exit node flow are obtained, determine at least one candidate entry node flow corresponding to each exit node flow, then remove the network noise and confusion noise from the exit node flow to obtain a mapped entry node flow, and then determine the target entry node flow associated with the exit node flow from at least one candidate entry node flow. Since the confusion noise is generated in the traffic initiation stage and the network noise is generated in the traffic transmission stage, different types of noise are removed through different coding layers. Compared with the existing method, the accuracy of the association result can be improved.
[0068] Before step 101, the method further includes: filtering the data packets of the data flow of the ingress node and the data packets of the data flow of the egress node, filtering out data packets without actual load such as TCP confirmation packets, filtering out retransmission packets such as TCP Retransmission and Dup ACK, etc. The filtered data packets are aggregated into a unidirectional data flow in the uplink or downlink direction according to the five-tuple information to obtain a data flow set.
[0069] The five-tuple information refers to the source IP address, the destination IP address, the source port number, the destination port number, and the transport layer protocol.
[0070] Data flows with too short lengths are filtered out from the obtained data flow set, that is, the inlet node data flow and the outlet node data flow are obtained.
[0071] Further, see Figure 3 , step 101 comprises:
[0072] 301. At each ingress node, count the data packet size sequence and the corresponding data packet time series of the ingress node data flow; define a first time window, and perform cumulative calculation based on the data packet size sequence corresponding to the data packet time series in each first time window to obtain the cumulative transmission volume of the ingress data flow in each first time window, and use the cumulative transmission volume sequence of the ingress data flow in multiple first time windows as the ingress node flow.
[0073] Specifically, assume that the packet size sequence of a data flow at a certain ingress node is pkt_size and the packet time sequence is pkt_interval. Perform cumulative calculations on the two sequences respectively, that is, add each element value to the previous element value in order to obtain new sequences pkt_size′ and pkt_interval′. The two new sequences have such a correlation: at the time pkt_interval′[i], the data flow has transmitted pkt_size′[i] bytes.
[0074] Then, define a fixed first time window win_size. At the end of each first time window, count the total number of bytes that have been transmitted in this data stream. Suppose the data stream has transmitted f(x*win_size) bytes at time x*win_size, then f(x*win_size) = pkt_size′[i], where pkt_interval′[i] ≤ x*win_size < pkt_interval′[i + 1], and so on until the cumulative transmission volume sequence reaches a predetermined length.
[0075] For example, taking the number of bytes transmitted per 5 ms as 10, the resulting ingress node stream can be [10, 20, 30, 40, 50…, 200].
[0076] Furthermore, after obtaining the cumulative transmission volume sequence of the ingress data stream, perform a normalization operation on the cumulative transmission volume sequence of the ingress data stream. Replace each sequence value in the sequence with the percentage of the data transmission volume at a certain moment in the total volume, which can better fit the data volume burst during the transmission process. Generally speaking, the former pays more attention to the absolute growth trend of the data volume change, while the latter focuses on the relative growth trend, that is, the change in the data growth rate.
[0077] 302. At each egress node, count the packet size sequence of the egress node data stream and the corresponding packet time sequence; define a second time window, and perform cumulative calculation according to the packet size sequence corresponding to the packet time sequence within each second time window to obtain the cumulative transmission volume of the egress data stream within each second time window. Use the cumulative transmission volume sequences of the ingress data stream within multiple second time windows as the egress node stream.
[0078] The specific method for obtaining the egress node stream is basically the same as the specific method for obtaining the ingress node stream, and thus will not be elaborated in this embodiment.
[0079] Through steps 301 to 302, the embodiments of the present invention respectively count the cumulative transmission volume of the ingress data stream and the cumulative transmission volume of the egress data stream by defining the first time window and the second time window as units. This granularity is independent of the number of data packets contained in the data stream and the arrival order of these data packets. Therefore, in the case of packet loss, recombination, retransmission, etc., compared with the characterization in terms of data packets, the characterization of the cumulative transmission volume of the data stream is more stable.
[0080] Furthermore, referring to Figure 4 , the training method of the noise reduction model in this embodiment includes:
[0081] 401. Input the first sample ingress node stream and the first sample egress node stream containing network noise into the first encoding layer to be trained to obtain a trained first encoding layer.
[0082] Specifically, see Figure 5 , step 401 comprises:
[0083] 501. Taking the first sample exit node flow containing network noise as input, and taking the first sample entry node flow as an optimization target to be fitted.
[0084] 502. Input the first sample input node flow and the first sample output node flow into the first coding layer to be trained, and determine the optimal parameter set of the first coding layer by minimizing the square difference loss between the output of the first coding layer and the first sample input node flow to obtain a trained first coding layer.
[0085] In order to solve the problem that network noise affects the correlation effect, this method regards the first sample inlet node flow as a noise-free traffic sample, and regards the first sample outlet node flow as a sample inlet node flow mixed with network noise. In the first coding layer, the first sample outlet node flow is used as input, and the first sample inlet node flow related to it is used as output, so that the first coding layer obtains the mapping relationship from the first sample outlet node flow to the first sample inlet node flow on the training data. After the first coding layer is trained, the process of converting from input to output according to the learned mapping relationship is actually the process of denoising the outlet node flow and making it closer to the inlet node flow form.
[0086] Specifically, the denoising process of the autoencoder network is shown in formula (1).
[0087] ω a =argmin θ ∑ (α,β)∈NO (α-De(En(β,θ),θ T )) 2 (1)
[0088] Among them, θ represents the parameter set of the model that minimizes the value of the entire formula. That is, when the distance value represented by the formula is optimized to the minimum, θ at this moment is the optimal parameter set ω a θ T It represents the transpose of the parameter matrix θ. Here, it means that the parameters of function De are obtained by transposing the parameters of function En, which means that the encoding and decoding process is symmetric.
[0089] ω a Represents the first encoding layer Encoder A Parameter set, NO represents the set of non-obfuscated data stream sequence pairs, and the function De / En represents the first encoding layer Encoder A The decoding / encoding process.
[0090] After obtaining the associated first sample inlet node stream and the first sample outlet node stream, a set of data stream sequence pairs in the form of (α, β) is formed. Use it to train the first encoding layer Encoder A During training, the first sample outlet node flow β is regarded as the input with noise, and the first sample inlet node flow α is the optimization target to be fitted. By minimizing the first encoding layer Encoder A The squared difference loss between the output and the optimization target is used to determine the optimal parameter set of the first coding layer to obtain a trained first coding layer.
[0091] 402. Input the second sample inlet node flow and the second sample outlet node flow containing network noise and confusion noise as training data into the trained first coding layer and the second coding layer to be trained in sequence to obtain a trained second coding layer.
[0092] When training the second encoding layer, you can first use the first encoding layer Encoder A Remove the network noise from the second sample node stream sequence pair, and then use the second sample node stream sequence pair with the network noise removed to train the second encoding layer Encoder B . In this way, the second encoding layer Encoder B It is possible to fit only the aliasing noise.
[0093] Specifically, see Figure 6 , step 402 includes:
[0094] 601. Input a second sample export node stream containing network noise and confusion noise into the trained first coding layer to obtain a second sample export node stream with the network noise removed.
[0095] Specifically, the second sample exit node flow after removing network noise is obtained by referring to the following formula (2):
[0096] δ′=De(En(δ,ω a ),ω a T ) (2)
[0097] Where δ is the second sample exit node flow of the aliased noise;
[0098] δ′ is the second sample exit node flow after removing network noise;
[0099] ω a Represents the first encoding layer Encoder A The parameter set of
[0100] After δ is encoded En and decoded De by the first encoding layer, a second sample output node stream δ′ is generated with network noise removed.
[0101] 602. Taking the second sample output node stream after removing network noise as input, taking the second sample input node stream as the optimization target to be fitted, and inputting the second sample input node stream and the second sample output node stream after removing network noise into the second coding layer to be trained.
[0102] 603. Determine an optimal parameter set of the second coding layer by minimizing the square difference loss between the output of the second coding layer and the second sample inlet node flow to obtain a trained second coding layer.
[0103] Specifically, the second coding layer refers to the following formula (3):
[0104] ω b =argmin θ ∑ (γ,δ)∈O (γ-De(En(δ′,θ),θ T )) 2 (3)
[0105] Among them, ω b Represents the second encoding layer Encoder B O represents the set of node flows used for training, γ represents the second sample entry node flow, δ′ represents the second sample exit node flow after removing network noise, and θ represents the set of parameters of the model that minimizes the value of the entire formula, that is, when the distance value represented by the formula is optimized to the minimum, θ at this moment is the optimal parameter set ω. b θ T It represents the transpose of the parameter matrix θ. Here, it means that the parameters of function De are obtained by transposing the parameters of function En, which means that the encoding and decoding process is symmetric.
[0106] After training, the output effects of the first and second encoding layers must be tested. During the test phase, the non-obfuscated node streams and the obfuscated node streams can be distinguished. For the non-obfuscated node stream sequence pairs to be tested, only the Encoder A Obfuscation noise is processed; the obfuscated node stream sequence pair to be tested needs to pass through Encoder A and Encoder B The removal of confusion noise and network noise.
[0107] The processed confused node flow sequence pair can use the traditional statistical distance method to calculate the similarity of the two node flows in the sequence pair to determine whether they are associated, and then determine the training effect of the first encoding layer and the second encoding layer.
[0108] Through the method of this embodiment, experiments have proved that for non-obfuscated node flows, this method and the existing traffic association method based on convolutional neural networks can achieve a true positive rate of more than 90%, while the false positive rate is controlled within 10 -2 The following is the result of the above analysis: to achieve the same effect, the cumulative sequence length of the time-sharing bytes used by this method is 200, and combined with the time window size of 0.05s, it can be concluded that the required flow observation length is 10 seconds; while the existing methods need to observe 300 data packets in each node flow. Depending on the data set, it takes 11 to 64 seconds to observe 300 data packets. Therefore, this method can use more short data flows for faster flow association. For the obfuscated node flow, the true accuracy of this method is better than the existing convolutional neural network method.
[0109] The following is a description of a tunnel flow correlation device based on a noise reduction model provided in an embodiment of the present invention. The tunnel flow correlation device based on a noise reduction model described below and the tunnel flow correlation method based on a noise reduction model described above can refer to each other.
[0110] The embodiment of the present invention provides a tunnel flow correlation device based on a noise reduction model, see Figure 7 ,include:
[0111] The node flow acquisition module 701 is used to acquire multiple ingress node flows and multiple egress node flows of a pre-established network tunnel; wherein the network tunnel is used by the client to access the corresponding network;
[0112] A noise reduction processing module 702 is used to determine at least one candidate inlet node flow corresponding to each outlet node flow, and input each of the outlet node flows into a pre-trained noise reduction model to sequentially perform network noise and confusion noise removal processing on the outlet node flows to obtain a mapped inlet node flow;
[0113] A node flow screening module 703 is used to respectively calculate the statistical distance between the mapping entry node flow and at least one candidate entry node flow, screen the candidate entry node flows according to the statistical distance, and use the candidate entry node flow corresponding to the smallest statistical distance as the target entry node flow associated with the exit node flow;
[0114] Among them, the denoising model is used to learn the mapping relationship between the associated sample input node flow and the sample output node flow; the denoising model includes: a first encoding layer and a second encoding layer, the first encoding layer is used to remove network noise, and the second encoding layer is used to remove confusion noise, so as to restore the input output node flow to the corresponding mapping input node flow.
[0115] Optionally, the node flow acquisition module 701 is specifically used for:
[0116] At each ingress node, the data packet size sequence and the corresponding data packet time sequence of the ingress node data flow are counted; a first time window is defined, and a cumulative calculation is performed based on the data packet size sequence corresponding to the data packet time sequence in each first time window to obtain the cumulative transmission volume of the ingress data flow in each first time window, and the cumulative transmission volume sequence of the ingress data flow in multiple first time windows is used as the ingress node flow;
[0117] At each egress node, the data packet size sequence and the corresponding data packet time series of the egress node data flow are counted; a second time window is defined, and a cumulative calculation is performed based on the data packet size sequence corresponding to the data packet time series in each second time window to obtain the cumulative transmission volume of the egress data flow in each second time window, and the cumulative transmission volume sequence of the ingress data flow in multiple second time windows is used as the egress node flow.
[0118] Optionally, the device further comprises: a model training module, configured to input the first sample inlet node flow and the first sample outlet node flow containing network noise as training data into the first coding layer to be trained, so as to obtain a trained first coding layer;
[0119] The second sample inlet node flow and the second sample outlet node flow containing network noise and confusion noise are sequentially input into the trained first coding layer and the second coding layer to be trained as training data to obtain the trained second coding layer.
[0120] Optionally, the model training module is specifically used to: take the first sample exit node flow containing network noise as input, and take the first sample entry node flow as an optimization target to be fitted;
[0121] The first sample entry node stream and the first sample exit node stream are input into the first coding layer to be trained, and the optimal parameter set of the first coding layer is determined by minimizing the square difference loss between the output of the first coding layer and the first sample entry node stream to obtain a trained first coding layer.
[0122] Optionally, the model training module is specifically used to: input the second sample export node stream containing network noise and confusion noise into the trained first coding layer to obtain the second sample export node stream with the network noise removed;
[0123] Taking the second sample exit node stream after removing network noise as input, taking the second sample entry node stream as the optimization target to be fitted, and inputting the second sample entry node stream and the second sample exit node stream after removing network noise into the second coding layer to be trained;
[0124] By minimizing the squared difference loss between the output of the second coding layer and the second sample inlet node flow, an optimal parameter set of the second coding layer is determined to obtain a trained second coding layer.
[0125] Optionally, the noise reduction processing module 702 is specifically used to: input each of the output node streams into the first coding layer to remove network noise, and obtain a corresponding noise reduction output node stream; input each of the noise reduction output node streams into the second coding layer to remove confusion noise, and obtain the mapping input node stream.
[0126] The tunnel traffic association device based on the noise reduction model provided by the embodiment of the present invention determines at least one candidate entry node flow corresponding to each exit node flow when the entry node flow and the exit node flow are obtained, and then removes the network noise and confusion noise from the exit node flow to obtain a mapped entry node flow, and then determines the target entry node flow associated with the exit node flow from at least one candidate entry node flow. Since the confusion noise is generated in the traffic initiation stage and the network noise is generated in the traffic transmission stage, different types of noise are removed through different coding layers. Compared with the existing method, the accuracy of the association result can be improved.
[0127] Figure 8 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 8 As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication interface 820 and the memory 830 communicate with each other through the communication bus 840. The processor 810 may call the logic instructions in the memory 830 to execute the tunnel traffic association method based on the noise reduction model, including: obtaining multiple inlet node flows and multiple outlet node flows of a pre-established network tunnel; wherein the network tunnel is used for the client to access the corresponding network; determining at least one candidate inlet node flow corresponding to each outlet node flow, inputting each of the outlet node flows into the pre-trained noise reduction model, so as to sequentially perform network noise and confusion noise removal processing on the outlet node flow to obtain a mapping inlet node flow; respectively calculating the statistical distance between the mapping inlet node flow and at least one candidate inlet node flow, screening the candidate inlet node flow according to the statistical distance, and taking the candidate inlet node flow corresponding to the smallest statistical distance as the target inlet node flow associated with the outlet node flow.
[0128] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0129] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the tunnel traffic association method based on the noise reduction model provided by the above methods, including: obtaining multiple entry node flows and multiple exit node flows of a pre-established network tunnel; wherein the network tunnel is used for the client to access the corresponding network; determining at least one candidate entry node flow corresponding to each exit node flow, and inputting each of the exit node flows into a pre-trained noise reduction model to remove network noise and confusion noise from the exit node flow in turn to obtain a mapped entry node flow; respectively calculating the statistical distance between the mapped entry node flow and at least one candidate entry node flow, screening the candidate entry node flow according to the statistical distance, and taking the candidate entry node flow corresponding to the smallest statistical distance as the target entry node flow associated with the exit node flow.
[0130] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the tunnel traffic association method based on the noise reduction model provided by the above-mentioned methods, including: obtaining multiple entry node flows and multiple exit node flows of a pre-established network tunnel; wherein the network tunnel is used for a client to access a corresponding network; determining at least one candidate entry node flow corresponding to each exit node flow, and inputting each of the exit node flows into a pre-trained noise reduction model to sequentially perform network noise and confusion noise removal processing on the exit node flows to obtain a mapped entry node flow; respectively calculating the statistical distance between the mapped entry node flow and at least one candidate entry node flow, screening the candidate entry node flows according to the statistical distance, and taking the candidate entry node flow corresponding to the smallest statistical distance as the target entry node flow associated with the exit node flow.
[0131] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0132] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0133] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A tunnel flow correlation method based on a noise reduction model, characterized in that: include: Acquire multiple ingress node flows and multiple egress node flows of a pre-established network tunnel; wherein the network tunnel is used by a client to access a corresponding network; Determine at least one candidate inlet node flow corresponding to each outlet node flow, and input each of the outlet node flows into a pre-trained noise reduction model to sequentially perform network noise and confusion noise removal on the outlet node flows to obtain a mapped inlet node flow; Calculating statistical distances between the mapping entry node flow and at least one candidate entry node flow respectively, screening the candidate entry node flows according to the statistical distances, and taking the candidate entry node flow corresponding to the smallest statistical distance as the target entry node flow associated with the exit node flow; Among them, the denoising model is used to learn the mapping relationship between the associated sample input node flow and the sample output node flow; the denoising model includes: a first encoding layer and a second encoding layer, the first encoding layer is used to remove network noise, and the second encoding layer is used to remove confusion noise, so as to restore the input output node flow to the corresponding mapping input node flow.
2. The tunnel flow correlation method according to claim 1, characterized in that: Acquiring a plurality of ingress node flows and a plurality of egress node flows of the network tunnel, including: At each ingress node, the data packet size sequence and the corresponding data packet time sequence of the ingress node data flow are counted; a first time window is defined, and a cumulative calculation is performed based on the data packet size sequence corresponding to the data packet time sequence in each first time window to obtain the cumulative transmission volume of the ingress data flow in each first time window, and the cumulative transmission volume sequence of the ingress data flow in multiple first time windows is used as the ingress node flow; At each egress node, the data packet size sequence and the corresponding data packet time series of the egress node data flow are counted; a second time window is defined, and a cumulative calculation is performed based on the data packet size sequence corresponding to the data packet time series in each second time window to obtain the cumulative transmission volume of the egress data flow in each second time window, and the cumulative transmission volume sequence of the ingress data flow in multiple second time windows is used as the egress node flow.
3. The tunnel traffic correlation method according to claim 1, characterized in that: The associated sample inlet node stream and sample outlet node stream include: a first sample inlet node stream and a first sample outlet node stream containing network noise, and a second sample inlet node stream and a second sample outlet node stream containing network noise and confusion noise; The training method of the denoising model includes: Inputting the first sample inlet node flow and the first sample outlet node flow containing network noise as training data into the first coding layer to be trained to obtain a trained first coding layer; The second sample inlet node flow and the second sample outlet node flow containing network noise and confusion noise are sequentially input into the trained first coding layer and the second coding layer to be trained as training data to obtain the trained second coding layer.
4. The tunnel flow correlation method according to claim 3, characterized in that: Inputting the first sample inlet node flow and the first sample outlet node flow containing network noise as training data into the first coding layer to be trained to obtain the trained first coding layer, including: Taking the first sample outlet node flow containing network noise as input, and taking the first sample inlet node flow as an optimization target to be fitted; The first sample entry node stream and the first sample exit node stream are input into the first coding layer to be trained, and the optimal parameter set of the first coding layer is determined by minimizing the square difference loss between the output of the first coding layer and the first sample entry node stream to obtain a trained first coding layer.
5. The tunnel traffic correlation method according to claim 3, characterized in that: Inputting the second sample inlet node flow and the second sample outlet node flow containing network noise and confusion noise as training data into the trained first coding layer and the second coding layer to be trained in sequence to obtain the trained second coding layer, including: Inputting the second sample exit node stream containing network noise and confusion noise into the trained first coding layer to obtain the second sample exit node stream with network noise removed; Taking the second sample exit node stream after removing network noise as input, taking the second sample entry node stream as the optimization target to be fitted, and inputting the second sample entry node stream and the second sample exit node stream after removing network noise into the second coding layer to be trained; By minimizing the squared difference loss between the output of the second coding layer and the second sample inlet node flow, an optimal parameter set of the second coding layer is determined to obtain a trained second coding layer.
6. The tunnel traffic correlation method according to claim 1, characterized in that: Each of the exit node flows is input into a pre-trained noise reduction model to sequentially remove network noise and confusion noise from the exit node flows to obtain a mapping entry node flow, including: Input each of the exit node streams into the first coding layer to remove network noise, and obtain a corresponding noise-reduced exit node stream; Each of the noise reduction outlet node streams is input into the second coding layer to remove the aliasing noise, thereby obtaining the mapping inlet node stream.
7. A tunnel flow correlation device based on a noise reduction model, characterized in that: include: A node flow acquisition module, used to acquire multiple ingress node flows and multiple egress node flows of a pre-established network tunnel; wherein the network tunnel is used by a client to access a corresponding network; A denoising processing module, used to determine at least one candidate inlet node flow corresponding to each outlet node flow, and input each of the outlet node flows into a pre-trained denoising model to sequentially perform network noise and confusion noise removal processing on the outlet node flows to obtain a mapped inlet node flow; A node flow screening module, used to respectively calculate the statistical distance between the mapping entry node flow and at least one candidate entry node flow, screen the candidate entry node flows according to the statistical distance, and use the candidate entry node flow corresponding to the smallest statistical distance as the target entry node flow associated with the exit node flow; Among them, the denoising model is used to learn the mapping relationship between the associated sample input node flow and the sample output node flow; the denoising model includes: a first encoding layer and a second encoding layer, the first encoding layer is used to remove network noise, and the second encoding layer is used to remove confusion noise, so as to restore the input output node flow to the corresponding mapping input node flow.
8. The tunnel flow correlation device according to claim 7, characterized in that: The noise reduction processing module is specifically used for: Input each of the exit node streams into the first coding layer to remove network noise, and obtain a corresponding noise-reduced exit node stream; Each of the noise reduction outlet node streams is input into the second coding layer to remove the aliasing noise, thereby obtaining the mapping inlet node stream.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the tunnel flow correlation method based on the noise reduction model as described in any one of claims 1 to 6 are implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the tunnel flow correlation method based on the noise reduction model as described in any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Anonymous service flow association identification method and system nested in encryption tunnel
CN111224940A
Dark web encrypted traffic classification method based on incomplete supervision
CN115134176A
Tunnel network anomaly identification method based on cloud edge collaboration
CN116055413A
Fingerprinting application traffic in a network
US20210006471A1
