Method and system for preventing data tampering in data sharing scenarios

By using oversampling and undersampling algorithms to optimize the deep anomaly detection model in data sharing scenarios, and combining encryption technology to identify and prevent data tampering, the problems of forgery, synthesis and tampering attacks in data sharing are solved, ensuring data communication security and model efficiency.

CN119520101BActive Publication Date: 2025-09-23TIANJIN NAT CYBERNET SECURITY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411660400.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-09-23
Estimated Expiration
2044-11-20

AI Technical Summary

Technical Problem

In data sharing scenarios, data between network nodes are exposed to forgery, synthesis, and tampering attacks, leading to privacy leaks and security threats, and imbalanced training data sets affect model efficiency.

Method used

Oversampling and undersampling algorithms are used to optimize the deep anomaly detection model, model parameters are protected through homomorphic encryption and symmetric encryption, trained models are shared between nodes, and the deep anomaly detection model is used to identify forged synthesis or tampering attacks.

Benefits of technology

It achieves the security and efficient matching of data communication, identifies and prevents data tampering, improves the detection effect of the model, and prevents privacy leakage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119520101B_ABST
    Figure CN119520101B_ABST
Patent Text Reader

Abstract

The present invention provides a method and system for data tamper prevention in a data sharing scenario. By using oversampling and undersampling algorithms, the problem of data imbalance in the training data set is solved, the 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. The deep anomaly detection model is used 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.
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 preventing data tampering in a data sharing scenario. Background Art

[0002] In data sharing scenarios, data shared between network nodes may be vulnerable to attacks such as forgery, synthesis, and tampering. Due to its public channels, it is prone to privacy leaks and security threats. Ensuring secure data communication and efficient matching in lightweight network scenarios has become an urgent problem to be solved. Improving model training efficiency is also a pressing issue.

[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 anti-tampering in a data sharing scenario, using oversampling algorithms and undersampling algorithms to solve the problem of data imbalance in the training data set, optimize the deep anomaly detection model, and share the trained model parameters 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.

[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 the training dataset to build and train the 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 a hierarchical feature representation and generate an embedding space. The balanced sampling module integrates the oversampling algorithm and the undersampling algorithm to calculate the average of each category feature, define the features with a number greater than or equal to the average as the majority class features, and define the features with a number less than the average as the minority class features. The undersampling algorithm is used for the majority class features, and the oversampling algorithm is used for the minority class features. The results of the oversampling algorithm and the undersampling algorithm are summarized and input into the neural network structure. The neural network structure learns the summarized results and detects anomalies.

[0008] The deep anomaly detection model uses the maximum margin 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 model parameters using a homomorphic encryption algorithm to obtain a homomorphic ciphertext, and then re-encrypt the homomorphic ciphertext using a symmetric encryption algorithm. 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. At the same time, different symmetric encryption keys are used for communication between ordinary nodes and control nodes;

[0010] The ordinary nodes share the twice-encrypted ciphertext, thereby obtaining the parameters of the trained deep anomaly detection model;

[0011] Ordinary nodes clean, filter, and normalize 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 model continues to analyze the distribution characteristics of the traffic data through inference attacks, and then infers the location of synthetic tampering. In addition, the model uses the pseudo-identity information carried in the traffic data to guess the true identity of the attacker.

[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 training datasets, build and train deep anomaly detection models;

[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; multiple sublayers with different encoding dimensions encode the multiple basic features to obtain a hierarchical feature representation and generate an embedding space; the balanced sampling module integrates an oversampling algorithm and an undersampling algorithm to calculate the average of each category feature, define features with a number greater than or equal to the average as majority class features, and define features with a number less than the average as minority class features, apply an undersampling algorithm to the majority class features, and apply an oversampling algorithm to the minority class features, summarize the results of the oversampling algorithm and the undersampling algorithm, and input the results into the neural network structure; the neural network structure learns the summarized results and detects anomalies;

[0016] The deep anomaly detection model uses the maximum margin 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, which is used to obtain the parameters of the trained deep anomaly detection model, encrypt the model parameters using a homomorphic encryption algorithm to obtain a homomorphic ciphertext, and re-encrypt the homomorphic ciphertext using a symmetric encryption algorithm. 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. At the same time, different symmetric encryption keys are used for communication between ordinary 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] Ordinary nodes are also used to 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 model continues to analyze the distribution characteristics of the traffic data through inference attacks, and then infer the location of synthetic tampering. In addition, the model uses the pseudo-identity information carried in the traffic data to guess the true identity of the attacker;

[0020] The output unit is used to output the identification result, including: the synthetically tampered location 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 the 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 in 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 oversampling and undersampling algorithms, the problem of data imbalance in the training data set is solved, the 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. The deep anomaly detection model is used 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 following briefly introduces the drawings required for use in the embodiments. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0031] Figure 1 This is a flow chart of a method for preventing data tampering in a data sharing scenario according to the present invention;

[0032] Figure 2 This is an architectural diagram of the data tamper-proofing system in the data sharing scenario of the present invention. DETAILED DESCRIPTION

[0033] The preferred embodiments of the present invention are described in detail below with reference to 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 precise definition of the protection scope of the present invention.

[0034] Figure 1 This is a general flow chart of the data tamper-proofing method in the data sharing scenario provided by this application, which includes:

[0035] Input the training dataset to build and train the 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 a hierarchical feature representation and generate an embedding space. The balanced sampling module integrates the oversampling algorithm and the undersampling algorithm to calculate the average of each category feature, define the features with a number greater than or equal to the average as the majority class features, and define the features with a number less than the average as the minority class features. The undersampling algorithm is used for the majority class features, and the oversampling algorithm is used for the minority class features. The results of the oversampling algorithm and the undersampling algorithm are summarized and input into the neural network structure. The neural network structure learns the summarized results and detects anomalies.

[0037] The deep anomaly detection model uses the maximum margin 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 model parameters using a homomorphic encryption algorithm to obtain a homomorphic ciphertext, and then re-encrypt the homomorphic ciphertext using a symmetric encryption algorithm. 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. At the same time, different symmetric encryption keys are used for communication between ordinary nodes and control nodes;

[0039] The ordinary nodes share the twice-encrypted ciphertext, thereby obtaining the parameters of the trained deep anomaly detection model;

[0040] Ordinary nodes clean, filter, and normalize 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 model continues to analyze the distribution characteristics of the traffic data through inference attacks, and then infers the location of synthetic tampering. In addition, the model uses the pseudo-identity information carried in the traffic data to guess the true identity of the attacker.

[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 sub-layer adopts a regularization method to prevent the model from overfitting.

[0043] In some preferred embodiments, the identification of 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 This is an architecture diagram of the data tamper-proofing system in the data sharing scenario provided by this application. The system includes: a model building unit, a deep anomaly detection model, an encryption unit, common nodes, and an output unit;

[0045] A model building unit, used to input training datasets, build and train deep anomaly detection models;

[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; multiple sublayers with different encoding dimensions encode the multiple basic features to obtain a hierarchical feature representation and generate an embedding space; the balanced sampling module integrates an oversampling algorithm and an undersampling algorithm to calculate the average of each category feature, define features with a number greater than or equal to the average as majority class features, and define features with a number less than the average as minority class features, apply an undersampling algorithm to the majority class features, and apply an oversampling algorithm to the minority class features, summarize the results of the oversampling algorithm and the undersampling algorithm, and input the results into the neural network structure; the neural network structure learns the summarized results and detects anomalies;

[0047] The deep anomaly detection model uses the maximum margin 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, which is used to obtain the parameters of the trained deep anomaly detection model, encrypt the model parameters using a homomorphic encryption algorithm to obtain a homomorphic ciphertext, and re-encrypt the homomorphic ciphertext using a symmetric encryption algorithm. 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. At the same time, different symmetric encryption keys are used for communication between ordinary 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] Ordinary nodes are also used to 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 model continues to analyze the distribution characteristics of the traffic data through inference attacks, and then infer the location of synthetic tampering. In addition, the model uses the pseudo-identity information carried in the traffic data to guess the true identity of the attacker;

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

[0052] The present application provides a data tamper-proofing system 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 configured to execute the method described in any one of all embodiments of the first aspect according to instructions in the program code.

[0055] The present application provides a computer-readable storage medium, which is used to store program code, and the program code is used to be executed by a processor to implement any one of the methods in all 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 that, when executed, may include some or all of the steps of various embodiments of the present invention. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0057] Those skilled in the art will clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus the necessary general-purpose hardware platform. Based on this understanding, the technical solutions in the embodiments of the present invention, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments of the present invention or certain portions of the embodiments.

[0058] In particular, for the embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiments.

[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 the training dataset to build and train the 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 a hierarchical feature representation and generate an embedding space. The balanced sampling module integrates the oversampling algorithm and the undersampling algorithm to calculate the average of each category feature, define the features with a number greater than or equal to the average as the majority class features, and define the features with a number less than the average as the minority class features. The undersampling algorithm is used for the majority class features, and the oversampling algorithm is used for the minority class features. The results of the oversampling algorithm and the undersampling algorithm are summarized and input into the neural network structure. The neural network structure learns the summarized results and detects anomalies. The deep anomaly detection model uses the maximum margin 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 model parameters using a homomorphic encryption algorithm to obtain a homomorphic ciphertext, and then re-encrypt the homomorphic ciphertext using a symmetric encryption algorithm. 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. At the same time, different symmetric encryption keys are used for communication between ordinary nodes and control nodes; The ordinary nodes share the twice-encrypted ciphertext, thereby obtaining the parameters of the trained deep anomaly detection model; Ordinary nodes clean, filter, and normalize 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 model continues to analyze the distribution characteristics of the traffic data through inference attacks, and then infers the location of synthetic tampering. In addition, the model uses the pseudo-identity information carried in the traffic data to guess the true identity of the attacker. 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, wherein: The sublayer adopts a regularization method to prevent the model from overfitting.

3. The method according to claim 1, wherein: 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.

4. A data tamper-proof system in a data sharing scenario, characterized in that: The system includes: 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 training datasets, build and train deep anomaly detection models; 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; multiple sublayers with different encoding dimensions encode the multiple basic features to obtain a hierarchical feature representation and generate an embedding space; the balanced sampling module integrates an oversampling algorithm and an undersampling algorithm to calculate the average of each category feature, define features with a number greater than or equal to the average as majority class features, and define features with a number less than the average as minority class features, apply an undersampling algorithm to the majority class features, and apply an oversampling algorithm to the minority class features, summarize the results of the oversampling algorithm and the undersampling algorithm, and input the results into the neural network structure; the neural network structure learns the summarized results and detects anomalies; The deep anomaly detection model uses the maximum margin 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, which is used to obtain the parameters of the trained deep anomaly detection model, encrypt the model parameters using a homomorphic encryption algorithm to obtain a homomorphic ciphertext, and re-encrypt the homomorphic ciphertext using a symmetric encryption algorithm. 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. At the same time, different symmetric encryption keys are used for communication between ordinary 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; Ordinary nodes are also used to 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 model continues to analyze the distribution characteristics of the traffic data through inference attacks, and then infer the location of synthetic tampering. In addition, the model uses the pseudo-identity information carried in the traffic data to guess the true identity of the attacker; The output unit is used to output the identification result, including: the synthetically tampered location and the guessed real identity of the attacker, and provide it to the user.

5. A data tamper-proof system in a data sharing scenario, characterized in that: The system includes: a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is configured to implement 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 code, and the program code is 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