Method and system for detecting encrypted traffic data in data sharing scene

By using oversampling and undersampling algorithms in data sharing scenarios to optimize the deep anomaly detection model, combining homomorphic and symmetric encryption, the rapid accuracy of encrypted data tamper detection and model training efficiency are solved, and the security of data communication is achieved and Efficient matching.

CN119276618AActive Publication Date: 2025-01-07TIANJIN NAT CYBERNET SECURITY CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411660401.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-01-07
Estimated Expiration
2044-11-20

AI Technical Summary

Technical Problem

In the data sharing scenario, it is difficult for the prior art to quickly and accurately detect whether encrypted data has been tampered with or forged, and the training model is inefficient, so it is impossible to effectively ensure the security of data communication.

Method used

The oversampling algorithm and undersampling algorithm are used to solve the data imbalance problem of training data sets, optimize the deep anomaly detection model, and aggregate the model parameters by controlling the nodes to ensure that each node uses the same detection model, and use the deep anomaly detection model to identify forgery or tampering. and ensure data security through homomorphic encryption and symmetric encryption.

Benefits of technology

It realizes rapid and accurate detection of encrypted data tampering or forgery, improves model training efficiency, ensures data communication security, can identify forgery or tampering attacks, and ensures the privacy and security of data communication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119276618A_ABST
    Figure CN119276618A_ABST
Patent Text Reader

Abstract

The invention provides a method and a system for detecting encrypted traffic data in a data sharing scene, which solve the problem of data imbalance of a training data set by using an oversampling algorithm and an undersampling algorithm, optimize a depth anomaly detection model, upload trained model parameters by nodes participating in sharing, and perform optimization aggregation by a control node, so as to improve the detection efficiency. And then the aggregated parameters are issued to each node, so that the nodes can use a model with the same detection effect, and a deep anomaly detection model is used to identify attacks such as counterfeit synthesis or tampering, thereby ensuring data communication security and efficient matching. The problem that whether encrypted data is tampered or forged cannot be quickly and accurately detected in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network security technology, and in particular to a method and system for detecting encrypted traffic data in a data sharing scenario. Background Art

[0002] In the data sharing scenario, the public channels between network nodes are prone to privacy leakage and security threats. Existing technologies usually encrypt data before transmission. How to ensure the security of encrypted data communication and quickly and accurately detect whether the encrypted data has been tampered with or forged have become urgent problems to be solved. In addition, how to improve the training efficiency of the model is also an urgent problem to be improved.

[0003] Therefore, there is an urgent need for a method and system for detecting encrypted traffic data in a targeted data sharing scenario. Summary of the invention

[0004] The purpose of the present invention is to provide a method and system for detecting encrypted traffic data in a data sharing scenario, using oversampling algorithms and undersampling algorithms to solve the problem of data imbalance in training data sets, optimize deep anomaly detection models, and the nodes participating in sharing upload trained model parameters, which are optimized and aggregated by the control node, and then the aggregated parameters are sent to each node, so that the nodes can use models with the same detection effect, and use deep anomaly detection models to identify attacks such as forgery, synthesis or tampering, thereby ensuring data communication security and efficient matching.

[0005] In a first aspect, the present application provides a method for detecting encrypted traffic data in a data sharing scenario, the method comprising:

[0006] Each common node builds and trains a deep anomaly detection model;

[0007] The deep anomaly detection model can extract key features from traffic data through structured processing. The deep anomaly detection model includes an input layer, multiple sublayers, a balanced sampling module and a neural network structure; the input layer receives multiple basic features under different sampling time windows; the multiple sublayers with different encoding dimensions encode the multiple basic features to obtain hierarchical feature representations and generate an embedding space; the balanced sampling module integrates the oversampling algorithm and the undersampling algorithm, calculates the average of features of each category, defines features with a number greater than or equal to the average as majority class features, and defines features with a number less than the average as minority class features, uses an undersampling algorithm for the majority class features, and uses an oversampling algorithm for the minority class features, summarizes the results of the oversampling algorithm and the undersampling algorithm, and inputs the results into the neural network structure; the neural network structure learns the summarized results and detects anomalies;

[0008] The deep anomaly detection model adopts the maximum marginal loss function and the multiple loss function as optimization objectives, so that traffic with similar characteristics is clustered together in the embedding space, while traffic with different characteristics is separated by a certain distance;

[0009] The control node sends the model training task to each common node, and each common node inputs its own training data set and performs training locally on the common node;

[0010] The common node obtains the parameters of the trained deep anomaly detection model, encrypts the parameters of the model using a homomorphic encryption algorithm to obtain a homomorphic ciphertext, and uses a symmetric encryption algorithm to perform secondary encryption on the homomorphic ciphertext. The key of the homomorphic encryption algorithm is only shared between the common nodes participating in the model training, and the symmetric encryption key is shared between the common nodes and the control nodes participating in the model aggregation. At the same time, different symmetric encryption keys are used for communication between the common nodes and the control nodes.

[0011] The common node uploads the parameters of the trained deep anomaly detection model to the control node, which performs optimization aggregation, and then the control node sends the aggregation results to each common node to unify the model parameters of each common node;

[0012] Ordinary nodes clean, filter and standardize the traffic data uploaded by users, and then use the local deep anomaly detection model with unified parameters to identify whether the traffic data is abnormal. If it is abnormal, the distribution characteristics of the traffic data are analyzed through inference attacks, and then the location of synthetic tampering is inferred, and the true identity of the attacker is guessed through the pseudo-identity information carried in the traffic data;

[0013] The identification result, including the synthetically tampered location and the guessed real identity of the attacker, is output and provided to the user.

[0014] In a second aspect, the present application provides a system for detecting encrypted traffic data in a data sharing scenario, the system comprising: a common node, a control node, a deep anomaly detection model, and an output unit;

[0015] Each common node is used to build and train the deep anomaly detection model;

[0016] The deep anomaly detection model is used to extract key features from traffic data through structured processing. The deep anomaly detection model includes an input layer, multiple sublayers, a balanced sampling module and a neural network structure; the input layer receives multiple basic features under different sampling time windows; the multiple sublayers with different encoding dimensions encode the multiple basic features to obtain hierarchical feature representations and generate an embedding space; the balanced sampling module integrates the oversampling algorithm and the undersampling algorithm, calculates the average of features of each category, defines features with a number greater than or equal to the average as majority class features, and defines features with a number less than the average as minority class features, uses an undersampling algorithm for the majority class features, and uses an oversampling algorithm for the minority class features, summarizes the results of the oversampling algorithm and the undersampling algorithm, and inputs the results into the neural network structure; the neural network structure learns the summarized results and detects anomalies;

[0017] The deep anomaly detection model adopts the maximum marginal loss function and the multiple loss function as optimization objectives, so that traffic with similar characteristics is clustered together in the embedding space, while traffic with different characteristics is separated by a certain distance;

[0018] The control node is used to send the model training task to each common node, and each common node inputs its own training data set and performs training locally on the common node;

[0019] The common nodes are also used to obtain the parameters of the trained deep anomaly detection model, encrypt the parameters of the model using a homomorphic encryption algorithm to obtain a homomorphic ciphertext, and use a symmetric encryption algorithm to perform secondary encryption on the homomorphic ciphertext. The key of the homomorphic encryption algorithm is only shared between the common nodes participating in the model training, and the symmetric encryption key is shared between the common nodes and the control nodes participating in the model aggregation. At the same time, different symmetric encryption keys are used for communication between the common nodes and the control nodes.

[0020] The common node uploads the parameters of the trained deep anomaly detection model to the control node, which performs optimization aggregation, and then the control node sends the aggregation results to each common node to unify the model parameters of each common node;

[0021] Ordinary nodes clean, filter and standardize the traffic data uploaded by users, and then use the local deep anomaly detection model with unified parameters to identify whether the traffic data is abnormal. If it is abnormal, the distribution characteristics of the traffic data are analyzed through inference attacks, and then the location of synthetic tampering is inferred, and the true identity of the attacker is guessed through the pseudo-identity information carried in the traffic data;

[0022] The output unit is used to output the identification result, including: the synthetically tampered position and the guessed real identity of the attacker, and provide it to the user.

[0023] In a third aspect, the present application provides a system for detecting encrypted traffic data in a data sharing scenario, the system comprising: a processor and a memory:

[0024] The memory is used to store program codes and transmit the program codes to the processor;

[0025] The processor is configured to execute any one of various possible methods of the first aspect according to instructions in the program code.

[0026] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store program code, and the program code is used to be executed by a processor to implement any of the various possible methods of the first aspect.

[0027] Beneficial Effects

[0028] The present invention provides a method and system for detecting encrypted traffic data in a data sharing scenario. By using an oversampling algorithm and an undersampling algorithm, the problem of data imbalance in a training data set is solved, a deep anomaly detection model is optimized, and nodes participating in sharing upload trained model parameters, which are optimized and aggregated by a control node, and then the aggregated parameters are sent to each node, so that the nodes can use a model with the same detection effect, and use a deep anomaly detection model to identify attacks such as forgery, synthesis or tampering, thereby ensuring data communication security and efficient matching, and overcoming the problem that the prior art cannot quickly and accurately detect whether encrypted data has been tampered with or forged.

[0029] The present invention has the following advantages and effects:

[0030] Use oversampling and undersampling algorithms to solve the problem of data imbalance in training data sets;

[0031] The control node performs optimization aggregation and then sends the aggregated parameters to each node, so that the nodes can use the model with the same detection effect;

[0032] It can identify attacks such as forgery, synthesis or tampering, thereby ensuring data communication security and efficient matching. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0034] Figure 1 It is a flow chart of the method for detecting encrypted traffic data in a data sharing scenario of the present invention;

[0035] Figure 2 This is an architecture diagram of a system for detecting encrypted traffic data in a data sharing scenario according to the present invention. DETAILED DESCRIPTION

[0036] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby making a clearer and more definite definition of the protection scope of the present invention.

[0037] Figure 1 A general flow chart of a method for detecting encrypted traffic data in a data sharing scenario provided by this application, the method comprising:

[0038] Each common node builds and trains a deep anomaly detection model;

[0039] The deep anomaly detection model can extract key features from traffic data through structured processing. The deep anomaly detection model includes an input layer, multiple sublayers, a balanced sampling module and a neural network structure; the input layer receives multiple basic features under different sampling time windows; the multiple sublayers with different encoding dimensions encode the multiple basic features to obtain hierarchical feature representations and generate an embedding space; the balanced sampling module integrates the oversampling algorithm and the undersampling algorithm, calculates the average of features of each category, defines features with a number greater than or equal to the average as majority class features, and defines features with a number less than the average as minority class features, uses an undersampling algorithm for the majority class features, and uses an oversampling algorithm for the minority class features, summarizes the results of the oversampling algorithm and the undersampling algorithm, and inputs the results into the neural network structure; the neural network structure learns the summarized results and detects anomalies;

[0040] The deep anomaly detection model adopts the maximum marginal loss function and the multiple loss function as optimization objectives, so that traffic with similar characteristics is clustered together in the embedding space, while traffic with different characteristics is separated by a certain distance;

[0041] The control node sends the model training task to each common node, and each common node inputs its own training data set and performs training locally on the common node;

[0042] The common node obtains the parameters of the trained deep anomaly detection model, encrypts the parameters of the model using a homomorphic encryption algorithm to obtain a homomorphic ciphertext, and uses a symmetric encryption algorithm to perform secondary encryption on the homomorphic ciphertext. The key of the homomorphic encryption algorithm is only shared between the common nodes participating in the model training, and the symmetric encryption key is shared between the common nodes and the control nodes participating in the model aggregation. At the same time, different symmetric encryption keys are used for communication between the common nodes and the control nodes.

[0043] The common node uploads the parameters of the trained deep anomaly detection model to the control node, which performs optimization aggregation, and then the control node sends the aggregation results to each common node to unify the model parameters of each common node;

[0044] Ordinary nodes clean, filter and standardize the traffic data uploaded by users, and then use the local deep anomaly detection model with unified parameters to identify whether the traffic data is abnormal. If it is abnormal, the distribution characteristics of the traffic data are analyzed through inference attacks, and then the location of synthetic tampering is inferred, and the true identity of the attacker is guessed through the pseudo-identity information carried in the traffic data;

[0045] The identification result, including the synthetically tampered location and the guessed real identity of the attacker, is output and provided to the user.

[0046] As an emerging basic technology of artificial intelligence, the control node (or centralized server) sends the training tasks to each ordinary node (or participant). The control node is only responsible for model parameter aggregation. Through this "data available but invisible" method, it ensures the privacy and security of data during exchange and makes full use of the computing power of ordinary nodes to train the model.

[0047] The encrypted data does not need to be sent to the control node. The ordinary nodes are trained locally. The ordinary nodes upload the model parameters to the control node. The control node performs optimization aggregation and then sends the aggregation results to each ordinary node without decryption.

[0048] In some preferred embodiments, the sublayer uses a regularization method to prevent the model from overfitting.

[0049] In some preferred embodiments, the identifying whether the traffic data is abnormal includes: comparing the label of the received traffic data with the label obtained locally based on the characteristic analysis of the traffic data, determining whether the data packet has been synthetically tampered with, and discarding the traffic data if it is determined to have been synthetically tampered with.

[0050] Figure 2The architecture diagram of the system for detecting encrypted traffic data in a data sharing scenario provided by the present application, the system comprising: a common node, a control node, a deep anomaly detection model and an output unit;

[0051] Each common node is used to build and train the deep anomaly detection model;

[0052] The deep anomaly detection model is used to extract key features from traffic data through structured processing. The deep anomaly detection model includes an input layer, multiple sublayers, a balanced sampling module and a neural network structure; the input layer receives multiple basic features under different sampling time windows; the multiple sublayers with different encoding dimensions encode the multiple basic features to obtain hierarchical feature representations and generate an embedding space; the balanced sampling module integrates the oversampling algorithm and the undersampling algorithm, calculates the average of features of each category, defines features with a number greater than or equal to the average as majority class features, and defines features with a number less than the average as minority class features, uses an undersampling algorithm for the majority class features, and uses an oversampling algorithm for the minority class features, summarizes the results of the oversampling algorithm and the undersampling algorithm, and inputs the results into the neural network structure; the neural network structure learns the summarized results and detects anomalies;

[0053] The deep anomaly detection model adopts the maximum marginal loss function and the multiple loss function as optimization objectives, so that traffic with similar characteristics is clustered together in the embedding space, while traffic with different characteristics is separated by a certain distance;

[0054] The control node is used to send the model training task to each common node, and each common node inputs its own training data set and performs training locally on the common node;

[0055] The common nodes are also used to obtain the parameters of the trained deep anomaly detection model, encrypt the parameters of the model using a homomorphic encryption algorithm to obtain a homomorphic ciphertext, and use a symmetric encryption algorithm to perform secondary encryption on the homomorphic ciphertext. The key of the homomorphic encryption algorithm is only shared between the common nodes participating in the model training, and the symmetric encryption key is shared between the common nodes and the control nodes participating in the model aggregation. At the same time, different symmetric encryption keys are used for communication between the common nodes and the control nodes.

[0056] The common node uploads the parameters of the trained deep anomaly detection model to the control node, which performs optimization aggregation, and then the control node sends the aggregation results to each common node to unify the model parameters of each common node;

[0057] Ordinary nodes clean, filter and standardize the traffic data uploaded by users, and then use the local deep anomaly detection model with unified parameters to identify whether the traffic data is abnormal. If it is abnormal, the distribution characteristics of the traffic data are analyzed through inference attacks, and then the location of synthetic tampering is inferred, and the true identity of the attacker is guessed through the pseudo-identity information carried in the traffic data;

[0058] The output unit is used to output the identification result, including: the synthetically tampered position and the guessed real identity of the attacker, and provide it to the user.

[0059] The present application provides a system for detecting encrypted traffic data in a data sharing scenario, the system comprising: a processor and a memory:

[0060] The memory is used to store program codes and transmit the program codes to the processor;

[0061] The processor is used to execute the method described in any one of all embodiments of the first aspect according to the instructions in the program code.

[0062] The present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store program code, and the program code is used to be executed by a processor to implement the method described in any one of all the embodiments of the first aspect.

[0063] In a specific implementation, the present invention further provides a computer storage medium, wherein the computer storage medium may store a program, and when the program is executed, the program may include some or all of the steps in each embodiment of the present invention. The storage medium may be a disk, an optical disk, a read-only storage memory (abbreviated as: ROM) or a random access memory (abbreviated as: RAM), etc.

[0064] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention or some parts of the embodiments.

[0065] The same and similar parts between the various embodiments of this specification can be referred to each other. In particular, for the embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.

[0066] The above-described embodiments of the present invention do not limit the protection scope of the present invention.

Claims

1. A method for detecting encrypted traffic data in a data sharing scenario, characterized in that: The method comprises: Each common node builds and trains a deep anomaly detection model; The deep anomaly detection model can extract key features from traffic data through structured processing. The deep anomaly detection model includes an input layer, multiple sublayers, a balanced sampling module and a neural network structure; the input layer receives multiple basic features under different sampling time windows; the multiple sublayers with different encoding dimensions encode the multiple basic features to obtain hierarchical feature representations and generate an embedding space; the balanced sampling module integrates the oversampling algorithm and the undersampling algorithm, calculates the average of features of each category, defines features with a number greater than or equal to the average as majority class features, and defines features with a number less than the average as minority class features, uses an undersampling algorithm for the majority class features, and uses an oversampling algorithm for the minority class features, summarizes the results of the oversampling algorithm and the undersampling algorithm, and inputs the results into the neural network structure; the neural network structure learns the summarized results and detects anomalies; The deep anomaly detection model adopts the maximum marginal loss function and the multiple loss function as optimization objectives, so that traffic with similar characteristics is clustered together in the embedding space, while traffic with different characteristics is separated by a certain distance; The control node sends the model training task to each common node, and each common node inputs its own training data set and performs training locally on the common node; The common node obtains the parameters of the trained deep anomaly detection model, encrypts the parameters of the model using a homomorphic encryption algorithm to obtain a homomorphic ciphertext, and uses a symmetric encryption algorithm to perform secondary encryption on the homomorphic ciphertext. The key of the homomorphic encryption algorithm is only shared between the common nodes participating in the model training, and the symmetric encryption key is shared between the common nodes and the control nodes participating in the model aggregation. At the same time, different symmetric encryption keys are used for communication between the common nodes and the control nodes. The common node uploads the parameters of the trained deep anomaly detection model to the control node, which performs optimization aggregation, and then the control node sends the aggregation results to each common node to unify the model parameters of each common node; Ordinary nodes clean, filter and standardize the traffic data uploaded by users, and then use the local deep anomaly detection model with unified parameters to identify whether the traffic data is abnormal. If it is abnormal, the distribution characteristics of the traffic data are analyzed through inference attacks, and then the location of synthetic tampering is inferred, and the true identity of the attacker is guessed through the pseudo-identity information carried in the traffic data; The identification result, including the synthetically tampered location and the guessed real identity of the attacker, is output and provided to the user.

2. The method according to claim 1, characterized in that: The sublayer adopts a regularization method to prevent the model from overfitting.

3. The method according to claim 1, characterized in that: The identifying whether the traffic data is abnormal includes: comparing the label of the received traffic data with the label obtained locally based on the characteristic analysis of the traffic data, determining whether the data packet is synthetically tampered with, and discarding the traffic data if it is determined to be synthetically tampered with.

4. A system for detecting encrypted traffic data in a data sharing scenario, characterized in that: The system includes: a common node, a control node, a deep anomaly detection model and an output unit; Each common node is used to build and train the deep anomaly detection model; The deep anomaly detection model is used to extract key features from traffic data through structured processing. The deep anomaly detection model includes an input layer, multiple sublayers, a balanced sampling module and a neural network structure; the input layer receives multiple basic features under different sampling time windows; the multiple sublayers with different encoding dimensions encode the multiple basic features to obtain hierarchical feature representations and generate an embedding space; the balanced sampling module integrates the oversampling algorithm and the undersampling algorithm, calculates the average of features of each category, defines features with a number greater than or equal to the average as majority class features, and defines features with a number less than the average as minority class features, uses an undersampling algorithm for the majority class features, and uses an oversampling algorithm for the minority class features, summarizes the results of the oversampling algorithm and the undersampling algorithm, and inputs the results into the neural network structure; the neural network structure learns the summarized results and detects anomalies; The deep anomaly detection model adopts the maximum marginal loss function and the multiple loss function as optimization objectives, so that traffic with similar characteristics is clustered together in the embedding space, while traffic with different characteristics is separated by a certain distance; The control node is used to send the model training task to each common node, and each common node inputs its own training data set and performs training locally on the common node; The common nodes are also used to obtain the parameters of the trained deep anomaly detection model, encrypt the parameters of the model using a homomorphic encryption algorithm to obtain a homomorphic ciphertext, and use a symmetric encryption algorithm to perform secondary encryption on the homomorphic ciphertext. The key of the homomorphic encryption algorithm is only shared between the common nodes participating in the model training, and the symmetric encryption key is shared between the common nodes and the control nodes participating in the model aggregation. At the same time, different symmetric encryption keys are used for communication between the common nodes and the control nodes. The common node uploads the parameters of the trained deep anomaly detection model to the control node, which performs optimization aggregation, and then the control node sends the aggregation results to each common node to unify the model parameters of each common node; Ordinary nodes clean, filter and standardize the traffic data uploaded by users, and then use the local deep anomaly detection model with unified parameters to identify whether the traffic data is abnormal. If it is abnormal, the distribution characteristics of the traffic data are analyzed through inference attacks, and then the location of synthetic tampering is inferred, and the true identity of the attacker is guessed through the pseudo-identity information carried in the traffic data; The output unit is used to output the identification result, including: the synthetically tampered position and the guessed real identity of the attacker, and provide it to the user.

5. A system for detecting encrypted traffic data in a data sharing scenario, characterized in that: The system comprises: a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the method according to any one of claims 1 to 3 according to the instructions in the program code.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store program codes, and the program codes are used to be executed by a processor to implement the method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Vehicle networking abnormal flow detection method based on adaptive federated learning

    CN117807496A

  • Task processing method, device and system and medium

    CN118133985A

  • Method and system for detecting network hidden attack

    CN119276619A

  • Method and system for preventing data from being tampered in data sharing scene

    CN119520101A