Method and system for preventing data from being tampered in data sharing scene
By using deep anomaly detection model and encryption algorithm in data sharing scenarios, the problem of data tampering and forgery attacks in data sharing scenarios is solved, and the secure and efficient matching of data communication is achieved.
Patent Information
- Application Number
- CN202411660400.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-11-20
AI Technical Summary
In data sharing scenarios, data between network nodes may face attacks such as forgery and synthesis, tampering, etc., resulting in privacy leakage and security threats. It is difficult for the existing technology to ensure the secure and efficient matching of data communication in lightweight network scenarios.
The deep anomaly detection model is adopted to extract key features from traffic data through structured processing, combine oversampling and undersampling algorithms to solve the data imbalance problem, and optimize the model to identify attacks of forged synthesis or tampering. The model parameters are encrypted using homomorphic encryption and symmetric encryption algorithms to ensure the security of data communication.
Effectively identify and prevent data tampering and forgery attacks, ensure the secure and efficient matching of data communication, and solve the privacy leakage and security threats brought about by public channels in the prior art.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network security technology, and in particular to a method and system for preventing data tampering in a data sharing scenario. Background Art
[0002] In the data sharing scenario, the data shared between network nodes may face attacks such as forgery, synthesis, and tampering. Due to its public channels, it is easy to cause privacy leakage and security threats. How to ensure data communication security and efficient matching in lightweight network scenarios has become an urgent problem 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 preventing data tampering in targeted data sharing scenarios. Summary of the invention
[0004] The purpose of the present invention is to provide a method and system for data tamper prevention 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 share trained model parameters between nodes participating in sharing, so that 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 preventing data tampering in a data sharing scenario, the method comprising:
[0006] Input training dataset, build and train 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] 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, wherein the key of the homomorphic encryption algorithm is only shared between ordinary nodes participating in model training, and the symmetric encryption key is shared between ordinary nodes and control nodes participating in model aggregation, and different symmetric encryption keys are used for communication between ordinary nodes and control nodes;
[0010] The common nodes share the secondary encrypted ciphertext, thereby obtaining the parameters of the trained deep anomaly detection model;
[0011] Ordinary nodes clean, filter and standardize the traffic data uploaded by users, and then transmit it to the deep anomaly detection model 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 synthetically tampered location is inferred, and the true identity of the attacker is guessed through the pseudo-identity information carried in the traffic data;
[0012] The identification result, including the synthetically tampered location and the guessed real identity of the attacker, is output and provided to the user.
[0013] In a second aspect, the present application provides a system for data tamper prevention in a data sharing scenario, the system comprising: a model building unit, a deep anomaly detection model, an encryption unit, a common node, and an output unit;
[0014] A model building unit, used to input a training data set, build and train a deep anomaly detection model;
[0015] 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;
[0016] 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;
[0017] An encryption unit, 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 perform secondary encryption on the homomorphic ciphertext using a symmetric encryption algorithm, wherein the key of the homomorphic encryption algorithm is only shared between common nodes participating in model training, and the symmetric encryption key is shared between common nodes and control nodes participating in model aggregation, and different symmetric encryption keys are used for communication between common nodes and control nodes;
[0018] The common nodes are used to share the twice-encrypted ciphertext between common nodes, thereby obtaining the parameters of the trained deep anomaly detection model;
[0019] The common node is also used to clean, filter and standardize the traffic data uploaded by the user, and then transmit it to the deep anomaly detection model to identify whether the traffic data is abnormal. If it is abnormal, the distribution characteristics of the traffic data are analyzed by inference attack, and then the synthetically tampered location is inferred, and the real identity of the attacker is guessed through the pseudo-identity information carried in the traffic data;
[0020] 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.
[0021] In a third aspect, the present application provides a system for preventing data tampering in a data sharing scenario, the system comprising: a processor and a memory:
[0022] The memory is used to store program code and transmit the program code to the processor;
[0023] The processor is configured to execute any one of various possible methods of the first aspect according to instructions in the program code.
[0024] 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.
[0025] Beneficial Effects
[0026] The present invention provides a method and system for data tamper prevention 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 the trained model parameters are shared between the nodes participating in the sharing, so that the nodes can use models with the same detection effect, and use the 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 public channels in the prior art are prone to privacy leakage and security threats.
[0027] The present invention has the following advantages and effects:
[0028] Use oversampling and undersampling algorithms to solve the problem of data imbalance in training data sets;
[0029] It can identify attacks such as forgery, synthesis or tampering, thereby ensuring data communication security and efficient matching. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] 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.
[0031] Figure 1 It is a flow chart of the method for data tamper prevention in the data sharing scenario of the present invention;
[0032] Figure 2 This is an architecture diagram of the system for preventing data tampering in the data sharing scenario of the present invention. DETAILED DESCRIPTION
[0033] 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.
[0034] Figure 1 A general flow chart of a method for data tamper prevention in a data sharing scenario provided by this application, the method comprising:
[0035] Input training dataset, build and train deep anomaly detection model;
[0036] 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;
[0037] 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;
[0038] 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, wherein the key of the homomorphic encryption algorithm is only shared between ordinary nodes participating in model training, and the symmetric encryption key is shared between ordinary nodes and control nodes participating in model aggregation, and different symmetric encryption keys are used for communication between ordinary nodes and control nodes;
[0039] The common nodes share the secondary encrypted ciphertext, thereby obtaining the parameters of the trained deep anomaly detection model;
[0040] Ordinary nodes clean, filter and standardize the traffic data uploaded by users, and then transmit it to the deep anomaly detection model 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 synthetically tampered location is inferred, and the true identity of the attacker is guessed through the pseudo-identity information carried in the traffic data;
[0041] The identification result, including the synthetically tampered location and the guessed real identity of the attacker, is output and provided to the user.
[0042] In some preferred embodiments, the sublayer uses a regularization method to prevent the model from overfitting.
[0043] 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.
[0044] Figure 2 The architecture diagram of the system for data tamper prevention in the data sharing scenario provided by the present application, the system comprising: a model building unit, a deep anomaly detection model, an encryption unit, a common node and an output unit;
[0045] A model building unit, used to input a training data set, build and train a deep anomaly detection model;
[0046] 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;
[0047] 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;
[0048] An encryption unit, 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 perform secondary encryption on the homomorphic ciphertext using a symmetric encryption algorithm, wherein the key of the homomorphic encryption algorithm is only shared between common nodes participating in model training, and the symmetric encryption key is shared between common nodes and control nodes participating in model aggregation, and different symmetric encryption keys are used for communication between common nodes and control nodes;
[0049] The common nodes are used to share the twice-encrypted ciphertext between common nodes, thereby obtaining the parameters of the trained deep anomaly detection model;
[0050] The common node is also used to clean, filter and standardize the traffic data uploaded by the user, and then transmit it to the deep anomaly detection model to identify whether the traffic data is abnormal. If it is abnormal, the distribution characteristics of the traffic data are analyzed by inference attack, and then the synthetically tampered location is inferred, and the real identity of the attacker is guessed through the pseudo-identity information carried in the traffic data;
[0051] 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.
[0052] The present application provides a system for preventing data tampering in a data sharing scenario, the system comprising: a processor and a memory:
[0053] The memory is used to store program code and transmit the program code to the processor;
[0054] 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.
[0055] 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.
[0056] 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.
[0057] 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.
[0058] 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.
[0059] The above-described embodiments of the present invention do not limit the protection scope of the present invention.
Claims
1. A method for preventing data tampering in a data sharing scenario, characterized in that: The method comprises: Input training dataset, build and train 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; 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, wherein the key of the homomorphic encryption algorithm is only shared between ordinary nodes participating in model training, and the symmetric encryption key is shared between ordinary nodes and control nodes participating in model aggregation, and different symmetric encryption keys are used for communication between ordinary nodes and control nodes; The common nodes share the secondary encrypted ciphertext, thereby obtaining the parameters of the trained deep anomaly detection model; Ordinary nodes clean, filter and standardize the traffic data uploaded by users, and then transmit it to the deep anomaly detection model 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 synthetically tampered location 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 preventing data tampering in a data sharing scenario, characterized in that: The system comprises: a model building unit, a deep anomaly detection model, an encryption unit, a common node and an output unit; A model building unit, used to input a training data set, build and train a 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; An encryption unit, 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 perform secondary encryption on the homomorphic ciphertext using a symmetric encryption algorithm, wherein the key of the homomorphic encryption algorithm is only shared between common nodes participating in model training, and the symmetric encryption key is shared between common nodes and control nodes participating in model aggregation, and different symmetric encryption keys are used for communication between common nodes and control nodes; The common nodes are used to share the twice-encrypted ciphertext between common nodes, thereby obtaining the parameters of the trained deep anomaly detection model; The common node is also used to clean, filter and standardize the traffic data uploaded by the user, and then transmit it to the deep anomaly detection model to identify whether the traffic data is abnormal. If it is abnormal, the distribution characteristics of the traffic data are analyzed by inference attack, and then the synthetically tampered location is inferred, and the real 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 preventing data tampering 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
Unmanned aerial vehicle attack prediction method and system based on bidirectional long-short-term memory model
CN114710782A
Federal learning privacy protection method based on block chain
CN115795518A
Network intrusion positioning system based on artificial intelligence
CN118041699A
Cited By
Method and system for detecting encrypted traffic data in data sharing scene
CN119276618A
Method and system for detecting encrypted traffic data in data sharing scenarios
CN119276618B