A method and system for synchronizing data between trusted DCS terminals
By combining long and short-term memory networks, random forest models and blockchain technology, dual anomaly detection and encryption verification of data synchronization are solved, and the security and credibility problems of the data synchronization process in the existing technology are achieved, and efficient and secure data synchronization is achieved.
Patent Information
- Application Number
- CN202410974524.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-07-19
AI Technical Summary
The existing data synchronization technology has risks such as single point of failure, data leakage and privacy violations, which is difficult to meet the data synchronization needs in a highly trusted environment, and lacks trustworthy verification and comprehensive analysis of the data synchronization process.
Dual anomaly detection model based on long and short-term memory networks and random forest models are used for dual anomaly detection, data encryption and verification are combined with blockchain technology, sensitive data are protected using local differential privacy algorithms, and trustworthy evaluation is performed through graph neural networks.
End-to-end synchronization verification, analysis and optimization are realized, the security, reliability and efficiency of data synchronization are improved, and the privacy protection of data and the credibility of the synchronization process are ensured.
Smart Images

Figure CN119155305B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a method and system for synchronizing data between trusted DCS terminals. Background Art
[0002] With the widespread application of distributed systems and cloud computing, data synchronization has become a key technology to ensure data consistency and real-time performance between different terminals. Especially in the fields of industrial control, financial transactions, and the Internet of Things, data synchronization between terminals has strict requirements on system reliability, security, and efficiency.
[0003] Existing data synchronization technologies mainly adopt a centralized architecture and rely on third-party servers for data transmission, storage, and coordination. There are risks such as single point failure, data leakage, and privacy violation, which makes it difficult to meet the data synchronization needs in a high-trust environment. At the same time, existing data synchronization methods are usually based on simple file transfer or database replication, lacking trusted verification and comprehensive analysis of the data synchronization process;
[0004] At present, there have been some studies and practices on applying blockchain to data synchronization at home and abroad, but most of the existing solutions focus on the storage and verification of synchronized data, lacking behavioral analysis and evaluation feedback of the synchronization process. How to build a comprehensive trusted data synchronization framework based on blockchain to achieve end-to-end synchronization verification, analysis and optimization is still a problem that needs to be solved urgently.
[0005] Therefore, a solution is urgently needed to solve the problems existing in the prior art. Summary of the invention
[0006] The embodiments of the present invention provide a method and system for synchronizing data between trusted DCS terminals, which can at least solve some of the problems existing in the prior art.
[0007] A first aspect of an embodiment of the present invention provides a method for synchronizing data between trusted DCS terminals, comprising:
[0008] The server receives a data synchronization request containing multiple types of information sent by the first terminal, combines the anomaly detection model based on the long short-term memory network, comprehensively analyzes the historical behavior data and device fingerprint features corresponding to the first terminal, generates a corresponding double anomaly detection result, and combines the random forest model to judge the rationality of the timestamp data corresponding to the first terminal. If it is reasonable, the server obtains the public key from the blockchain network, encrypts it in combination with the homomorphic encryption algorithm, and obtains the first verification information and multiple second verification information;
[0009] The server performs sensitivity analysis on the data to be synchronized by using a sensitive data identification model to generate a sensitive data subset and a non-sensitive data subset, performs perturbation processing on the sensitive data subset in combination with a local differential privacy algorithm to generate an unordered sensitive data subset, encrypts the unordered sensitive data subset and the non-sensitive data subset to generate ciphertext data, encapsulates the ciphertext data and the first verification information and the second verification information to obtain a data synchronization message, and sends the message to the target terminal through a secure channel;
[0010] The target terminal obtains the first verification information and the second verification information by decrypting with the private key and the first terminal public key, and uploads the decryption result to the blockchain network for verification. According to the verification result, the target terminal performs deduplication detection and shared decryption through the data deduplication model to obtain the data to be synchronized, synchronizes the data to be synchronized and generates a synchronization completion certificate, which is uploaded to the blockchain network. The server analyzes the data synchronization status through a trusted assessment model based on a graph neural network, generates a synchronization analysis report and sends it to the first terminal.
[0011] In an optional embodiment,
[0012] The server receives a data synchronization request containing multiple types of information sent by the first terminal, and combines the anomaly detection model based on the long short-term memory network to comprehensively analyze the historical behavior data and device fingerprint features corresponding to the first terminal, and generates corresponding dual anomaly detection results including:
[0013] The server receives, through a network connection, a data synchronization request including multiple types of information sent by the first terminal, wherein the data synchronization request includes a unique identifier corresponding to the first terminal, a unique identifier corresponding to the target terminal, data to be synchronized, historical behavior of the first terminal, a device fingerprint feature of the first terminal, and a first timestamp, wherein the first timestamp corresponds to a time point when the data synchronization request is initiated;
[0014] The server loads a pre-trained anomaly detection model based on a long short-term memory network, and inputs the historical behavior data corresponding to the first terminal as a time series into the anomaly detection model. The anomaly detection model generates a temporal dependency relationship and a normal behavior pattern by extracting the behavior features in the historical behavior data. The server extracts the behavior data per unit time before the first terminal sends data synchronization and adds it to the anomaly detection model. By comparing it with the normal behavior pattern, a request anomaly score is generated, and the request anomaly score is compared with a preset anomaly score threshold. If the request anomaly score is greater than the anomaly score threshold, the current data synchronization request is considered to be an abnormal behavior and synchronization is not performed.
[0015] The server obtains the historical device fingerprint features corresponding to the first terminal from the historical behavior data, and compares the device fingerprint features corresponding to the current data synchronization request. If they are the same, it is considered that the identity authentication is passed; otherwise, it is considered that the identity authentication is not passed and the synchronization is canceled;
[0016] The device fingerprint feature verification results and the behavior pattern verification results are combined to generate corresponding dual anomaly detection results.
[0017] In an optional embodiment,
[0018] The rationality of the timestamp data corresponding to the first terminal is judged in combination with the random forest model. If it is reasonable, the server obtains the public key from the blockchain network, encrypts it in combination with the homomorphic encryption algorithm, and obtains the first verification information and the plurality of second verification information including:
[0019] According to the double anomaly detection result, determine whether the behavior pattern verification and the device fingerprint feature verification are passed. If all are passed, add the timestamp corresponding to the historical data synchronization request corresponding to the first terminal to the preset random forest model, the random forest model predicts and generates a prediction result, compares the prediction result with the real label of the timestamp corresponding to the historical data synchronization request, updates the hyperparameters of the random forest model according to the real label, and repeats the update until the preset maximum number of updates is reached to obtain a trained random forest model;
[0020] The first timestamp corresponding to the current data synchronization request is added to the trained random forest model, and the random forest model performs prediction, generates a rationality score, and determines whether the current timestamp is reasonable in combination with a rationality threshold. If it is reasonable, it is retained; if it is unreasonable, the current data synchronization request is discarded;
[0021] For the data synchronization request corresponding to the reserved timestamp, the server establishes a network connection through the pre-configured blockchain network address and access point, passes identity authentication and constructs a public key query request according to the first terminal identifier and the target terminal identifier in the data synchronization request, and the blockchain node retrieves the corresponding public key information according to the public key query request, packages the public key information and generates corresponding information and sends it to the server, thereby obtaining the public key corresponding to the first terminal;
[0022] Based on the public key, plaintext operations are performed in combination with a homomorphic encryption algorithm to generate first verification information in ciphertext form. Based on the first verification information, for each target terminal, corresponding second verification information is generated through a homomorphic encryption algorithm. The first verification information and multiple second verification information are added as additional fields to the data synchronization request.
[0023] In an optional embodiment,
[0024] The server performs sensitivity analysis on the data to be synchronized by using a sensitive data identification model to generate a sensitive data subset and a non-sensitive data subset, performs perturbation processing on the sensitive data subset in combination with a local differential privacy algorithm to generate an unordered sensitive data subset, encrypts the unordered sensitive data subset and the non-sensitive data subset to generate ciphertext data, encapsulates the ciphertext data and the first verification information and the second verification information to obtain a data synchronization message, and sends the message to the target terminal through a secure channel, including:
[0025] Adding an initial recognition model on the server, setting a word embedding layer and multiple parallel convolutional layers and adding an attention layer, a fully connected layer and an output layer after the convolutional layer to obtain the sensitive data recognition model;
[0026] A training data set with annotations is randomly generated according to the data to be synchronized, elements in the training data set are added to the sensitive data recognition model, each input element is converted into a word embedding vector through a word embedding layer, local features in the word embedding vector are extracted through a convolution layer, the local features are weighted summed in combination with an attention mechanism, and global mapping is performed through a fully connected layer to obtain a predicted probability distribution of the sensitive data category corresponding to the current element, the predicted probability distribution is compared with the annotation information of the current element, a loss value is determined in combination with a cross entropy loss function, hyperparameters of the sensitive data recognition model are updated according to the loss value, and the update is repeated until the model converges;
[0027] Using the updated sensitive data identification model to perform sensitivity analysis on the data to be synchronized, and dividing the data to be synchronized into sensitive data subsets and non-sensitive data subsets according to the analysis results;
[0028] Generate a privacy budget parameter based on a local differential privacy algorithm, for each element in the sensitive data subset, build a probability transfer matrix in combination with the abnormal category, the amount of data and the privacy budget parameter, perturb the data to be synchronized based on the probability transfer matrix and generate the disordered sensitive data subset;
[0029] The unordered sensitive data subset and the non-sensitive data subset are encrypted using symmetric keys respectively to generate ciphertext data, the ciphertext data are packaged together with the pre-acquired first verification information and multiple second verification information and encapsulated into the data synchronization request to obtain a data synchronization message, and the data synchronization message is sent to the target terminal through a secure channel.
[0030] In an optional embodiment,
[0031] For each element in the sensitive data subset, a probability transfer matrix is constructed by combining the anomaly category, the amount of data, and the privacy budget parameter as shown in the following formula:
[0032]
[0033] in, Represents an element in the probability transfer matrix, and the kth category will take the value v i Transfer to value v j The probability of Indicates that the value in the kth category is v i The number of elements, ε k represents the privacy budget parameter of the kth category, q() represents the utility function, and m represents the maximum number of values in the sensitive data subset. Indicates that the value in the kth category is v l The number of elements.
[0034] In an optional embodiment,
[0035] The target terminal obtains the first verification information and the second verification information by decrypting with the private key and the first terminal public key, and uploads the decryption result to the blockchain network for verification. According to the verification result, the target terminal performs deduplication detection and shares decryption through the data deduplication model, and obtains the data to be synchronized, including:
[0036] After receiving the data synchronization message, the target terminal obtains the corresponding private key and the public key of the first terminal and decrypts the first verification information by combining the obtained private key through an asymmetric encryption algorithm, and decrypts the second verification information by using the obtained public key to obtain the first verification information and the second verification information in plain text;
[0037] Select a verification platform according to the verification information format and use the first verification information and the second verification information in plain text as parameters, call the verification smart contract of the verification platform, wherein the verification smart contract includes a verification algorithm and a verification rule, executes the verification algorithm and the verification rule, and generates verification results of the first verification information and the second verification information;
[0038] Determine whether the verification is passed according to the verification result. If it is passed, perform a repeatability check on the data to be synchronized, extract the feature vector corresponding to the data to be synchronized and compare it with the local feature vector. If the identical feature vectors exceed 50%, it is considered to be duplicate data and the data to be synchronized is deleted. Otherwise, it is considered to be new data and saved.
[0039] For the newly added data, the decryption key is divided into multiple sub-keys by the server and held by the first terminal, the server and the target terminal respectively. The target terminal obtains the decryption key through key exchange and decrypts the ciphertext data to obtain the data to be synchronized.
[0040] In an optional embodiment,
[0041] Synchronizing the data to be synchronized and generating a synchronization completion certificate, uploading it to the blockchain network, the server analyzing the data synchronization status through a trusted evaluation model based on a graph neural network, generating a synchronization analysis report and sending it to the first terminal includes:
[0042] A batch synchronization strategy is selected according to business needs. The data to be synchronized is divided into multiple batches according to the batch synchronization strategy and synchronized. The data synchronization is completed and a synchronization completion certificate is generated. The synchronization completion certificate includes an identity identifier, a hash value and summary information of the synchronized data, a digital signature of the target terminal, and a synchronization completion timestamp. The blockchain network receives the synchronization completion certificate uploaded by the target terminal and adds it to an empty block and appends the block to the blockchain.
[0043] Based on the synchronization completion certificate, the server uses the public key of the target terminal to decrypt the digital signature of the target terminal in the synchronization completion certificate and obtains a first hash digest, recalculates the hash digest in the synchronization completion certificate and compares it with the first hash digest, and passes the digital signature verification if they are the same;
[0044] For the synchronization completion certificate verified by the digital signature, decompose the synchronization completion certificate and obtain the timestamps of the synchronization start and the synchronization end in each batch, and abstract the data synchronization process into a directed weighted graph according to the timestamps, wherein the nodes represent the terminals and the edges represent the synchronization relationships;
[0045] The embedded representation of each node in the directed weighted graph is obtained through a preset trusted assessment model. For each node, neighbor information is aggregated and the hidden state of the current node is updated. Forward reasoning is performed on the graph data based on the hidden state to obtain the trusted embedded representation corresponding to each node. A trusted embedding assessment is performed on the node corresponding to the target terminal to obtain a credibility score. If the credibility score is greater than a preset credibility threshold, the synchronization completion credential corresponding to the target terminal is considered to be credible, and a synchronization analysis report is generated and sent to the first terminal.
[0046] A second aspect of an embodiment of the present invention provides a trusted DCS terminal data synchronization system, including:
[0047] The first unit is used for the server to receive a data synchronization request containing multiple types of information sent by the first terminal, combine the anomaly detection model based on the long short-term memory network, comprehensively analyze the historical behavior data and device fingerprint characteristics corresponding to the first terminal, generate the corresponding double anomaly detection result, and combine the random forest model to judge the rationality of the timestamp data corresponding to the first terminal. If it is reasonable, the server obtains the public key from the blockchain network, encrypts it in combination with the homomorphic encryption algorithm, and obtains the first verification information and multiple second verification information;
[0048] The second unit is used for the server to perform sensitivity analysis on the data to be synchronized through a sensitive data identification model, generate a sensitive data subset and a non-sensitive data subset, perform perturbation processing on the sensitive data subset in combination with a local differential privacy algorithm, generate an unordered sensitive data subset, encrypt the unordered sensitive data subset and the non-sensitive data subset, generate ciphertext data, encapsulate the ciphertext data and the first verification information and the second verification information to obtain a data synchronization message, and send the message to the target terminal through a secure channel;
[0049] The third unit is used for the target terminal to obtain the first verification information and the second verification information by decrypting through the private key and the first terminal public key, and to upload the decryption result to the blockchain network for verification. According to the verification result, the target terminal performs deduplication detection and shared decryption through the data deduplication model to obtain the data to be synchronized, synchronizes the data to be synchronized and generates a synchronization completion certificate, which is uploaded to the blockchain network. The server analyzes the data synchronization status through a trusted assessment model based on a graph neural network, generates a synchronization analysis report, and sends it to the first terminal.
[0050] According to a third aspect of the embodiments of the present invention,
[0051] An electronic device is provided, comprising:
[0052] processor;
[0053] a memory for storing processor-executable instructions;
[0054] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0055] A fourth aspect of the embodiments of the present invention is:
[0056] A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the aforementioned method is implemented.
[0057] In the present invention, the rationality of timestamp data is judged by the random forest model, and the authenticity and timeliness of the request are further verified, thereby improving the security and reliability of data synchronization. Differential privacy protection ensures that while obtaining data analysis results, individual sensitive information will not be leaked, effectively balancing the needs of data utilization and privacy protection. The received data to be synchronized is deduplicated through the data deduplication model, and duplicate and redundant data are identified and deleted, which significantly reduces the storage and transmission overhead of data, ensures the effective utilization of storage and bandwidth resources, and improves the efficiency and scalability of data synchronization. It is particularly suitable for scenarios with massive heterogeneous data synchronization. The decentralization, consensus mechanism and encrypted links of blockchain ensure the authenticity, integrity and non-tamperability of synchronization credentials. Through a trusted evaluation model based on graph neural networks, various indicators and behavior patterns in the data synchronization process are analyzed, and a synchronization analysis report is automatically generated. It can intelligently identify abnormal behaviors, performance bottlenecks and optimization opportunities in the synchronization process, and provide decision support and optimization suggestions for administrators. In summary, the present invention constructs a set of safe, efficient and intelligent heterogeneous data synchronization solutions. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 A flow chart of a method for synchronizing data between trusted DCS terminals according to an embodiment of the present invention;
[0059] Figure 2 The present invention is a structural diagram of a trusted DCS terminal data synchronization system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0060] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0061] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0062] Figure 1 Schematic diagram of the process of the embodiment of the present invention, such as Figure 1 As shown, the method for synchronizing data between trusted DCS terminals includes:
[0063] S1. The server receives a data synchronization request containing multiple types of information sent by the first terminal, combines the anomaly detection model based on the long short-term memory network, comprehensively analyzes the historical behavior data and device fingerprint characteristics corresponding to the first terminal, generates a corresponding double anomaly detection result, and combines the random forest model to judge the rationality of the timestamp data corresponding to the first terminal. If it is reasonable, the server obtains the public key from the blockchain network, encrypts it in combination with the homomorphic encryption algorithm, and obtains the first verification information and multiple second verification information;
[0064] The data synchronization request refers to a request sent by a terminal device (first terminal) to the server, requesting to synchronize its local data with the data of multiple target terminals. The long short-term memory network is a special recurrent neural network structure used to process and predict time-based sequence data. The historical behavior data is data that records the operating behavior and interaction mode of the terminal device in the past period of time. The device fingerprint feature refers to the hardware and software feature information of the terminal device, including but not limited to hardware configuration (such as CPU, memory, etc.), system parameters (such as operating system version, installed software, etc.) and network information (such as IP address, MAC address, etc.). The homomorphic encryption is an encryption method that allows specific mathematical operations to be performed on ciphertext while still obtaining correct results after decryption. The public key is part of asymmetric encryption and is used to encrypt data or verify digital signatures.
[0065] In an optional embodiment,
[0066] The server receives a data synchronization request containing multiple types of information sent by the first terminal, and combines the anomaly detection model based on the long short-term memory network to comprehensively analyze the historical behavior data and device fingerprint features corresponding to the first terminal, and generates corresponding dual anomaly detection results including:
[0067] The server receives, through a network connection, a data synchronization request including multiple types of information sent by the first terminal, wherein the data synchronization request includes a unique identifier corresponding to the first terminal, a unique identifier corresponding to the target terminal, data to be synchronized, historical behavior of the first terminal, a device fingerprint feature of the first terminal, and a first timestamp, wherein the first timestamp corresponds to a time point when the data synchronization request is initiated;
[0068] The server loads a pre-trained anomaly detection model based on a long short-term memory network, and inputs the historical behavior data corresponding to the first terminal as a time series into the anomaly detection model. The anomaly detection model generates a temporal dependency relationship and a normal behavior pattern by extracting the behavior features in the historical behavior data. The server extracts the behavior data per unit time before the first terminal sends data synchronization and adds it to the anomaly detection model. By comparing it with the normal behavior pattern, a request anomaly score is generated, and the request anomaly score is compared with a preset anomaly score threshold. If the request anomaly score is greater than the anomaly score threshold, the current data synchronization request is considered to be an abnormal behavior and synchronization is not performed.
[0069] The server obtains the historical device fingerprint features corresponding to the first terminal from the historical behavior data, and compares the device fingerprint features corresponding to the current data synchronization request. If they are the same, it is considered that the identity authentication is passed; otherwise, it is considered that the identity authentication is not passed and the synchronization is canceled;
[0070] The device fingerprint feature verification results and the behavior pattern verification results are combined to generate corresponding dual anomaly detection results.
[0071] The unique identifier is a mark used to uniquely identify an object or entity, the temporal dependency refers to the mutual dependence and influence of data or events in a time series, the normal behavior pattern refers to the pattern and characteristics used to describe normal behavior established by analyzing and learning a large amount of normal behavior data, and the request anomaly score refers to the score used to measure the degree of request abnormality calculated by analyzing and evaluating the behavior data and other features in the data synchronization request.
[0072] The server receives the data synchronization request sent by the first terminal through a network connection, loads a pre-trained anomaly detection model, and the model is built based on a long short-term memory (LSTM) network. The server inputs the historical behavior data of the first terminal into the anomaly detection model as a time series, extracts the behavior features contained therein by analyzing the historical behavior data, generates a temporal dependency relationship reflecting the normal behavior pattern, extracts the behavior data of the first terminal within a period of time (such as several minutes or hours) before the current data synchronization request is issued, and adds it to the anomaly detection model. The model compares this latest behavior data with the previously learned normal behavior pattern, evaluates the degree of difference between the current behavior and the typical performance, and generates a request anomaly score. The higher the anomaly score, the more serious the deviation of the current behavior from the normal pattern;
[0073] The server compares the request anomaly score with a preset anomaly score threshold. If the anomaly score exceeds the threshold, the current data synchronization request is considered abnormal behavior, which may involve the risk of malicious or illegal operations. The server rejects the synchronization request. If the anomaly score does not exceed the threshold, the current request behavior is considered normal and subsequent data synchronization is allowed.
[0074] The server obtains the device fingerprint feature submitted by the first terminal at a certain time in the past from the historical behavior data of the first terminal, and compares it with the device fingerprint feature attached to the current data synchronization request. The device fingerprint feature usually includes a series of device-specific information such as hardware configuration, system parameters, network properties, etc., which can be used to verify the true identity of the device. The device fingerprint features at two time points are compared. If they are completely consistent, it is considered that the current request is indeed issued by the legitimate first terminal and has passed the identity authentication. If there is a difference, it is suspected that the source of the request is suspicious, the identity authentication fails, and the server immediately terminates the data synchronization;
[0075] The server combines the verification results of the above two dimensions to obtain a comprehensive double anomaly detection result. If both the behavior pattern verification and the device fingerprint verification pass, the current data synchronization request is considered to be credible and synchronization is allowed. If either the behavior pattern verification or the device fingerprint verification fails, the request is considered suspicious and belongs to abnormal behavior, and synchronization is rejected. Based on the double anomaly detection result, the server returns a corresponding response message to the first terminal to inform it whether the synchronization request is accepted. If the request passes the verification, the server continues to perform subsequent data synchronization operations. If the request is judged to be abnormal, the server records the event and recommends that the first terminal perform further identity confirmation or behavior explanation.
[0076] In this embodiment, by strictly checking the behavior patterns and identity authentication of the requesting terminal, potential malicious requests are effectively identified and filtered out, and illegal terminals are prevented from forging identities or initiating data synchronization with the help of abnormal behavior patterns, thereby protecting the system from security threats such as data theft and tampering. The tasks of anomaly detection and identity authentication are centralized on the server side for processing, which reduces the computing and storage pressure of the terminal device. By setting parameters such as the anomaly score threshold, the server can adjust the strictness of anomaly detection according to actual needs, and can strike a balance between security and convenience. In summary, this embodiment significantly improves the security, reliability, and intelligence level of the data synchronization process through dual anomaly detection on the server side, and achieves long-term security protection and performance optimization.
[0077] In an optional embodiment,
[0078] The rationality of the timestamp data corresponding to the first terminal is judged in combination with the random forest model. If it is reasonable, the server obtains the public key from the blockchain network, encrypts it in combination with the homomorphic encryption algorithm, and obtains the first verification information and the plurality of second verification information including:
[0079] According to the double anomaly detection result, determine whether the behavior pattern verification and the device fingerprint feature verification are passed. If all are passed, add the timestamp corresponding to the historical data synchronization request corresponding to the first terminal to the preset random forest model, the random forest model predicts and generates a prediction result, compares the prediction result with the real label of the timestamp corresponding to the historical data synchronization request, updates the hyperparameters of the random forest model according to the real label, and repeats the update until the preset maximum number of updates is reached to obtain a trained random forest model;
[0080] The first timestamp corresponding to the current data synchronization request is added to the trained random forest model, and the random forest model performs prediction, generates a rationality score, and determines whether the current timestamp is reasonable in combination with a rationality threshold. If it is reasonable, it is retained; if it is unreasonable, the current data synchronization request is discarded;
[0081] For the data synchronization request corresponding to the reserved timestamp, the server establishes a network connection through the pre-configured blockchain network address and access point, passes identity authentication and constructs a public key query request according to the first terminal identifier and the target terminal identifier in the data synchronization request, and the blockchain node retrieves the corresponding public key information according to the public key query request, packages the public key information and generates corresponding information and sends it to the server, thereby obtaining the public key corresponding to the first terminal;
[0082] Based on the public key, plaintext operations are performed in combination with a homomorphic encryption algorithm to generate first verification information in ciphertext form. Based on the first verification information, for each target terminal, corresponding second verification information is generated through a homomorphic encryption algorithm. The first verification information and multiple second verification information are added as additional fields to the data synchronization request.
[0083] The rationality score is a score obtained after a rationality check of information such as the timestamp of the data or request, and is used to measure whether the timestamp or other parameters in the request conform to normal conditions or expected patterns. The blockchain network address is a unique identifier used to identify an account or node in the blockchain network. The public key query request refers to a request sent by the server to the blockchain network to obtain the public key of a specific terminal. The plaintext operation refers to various calculations or operations performed on unencrypted data (i.e., plaintext).
[0084] Based on the results of the dual anomaly detection, the server determines whether the data synchronization request has passed the behavior pattern verification and device fingerprint feature verification. Only when both verifications are passed, the request is considered credible and enters the subsequent processing flow;
[0085] For requests that pass double verification, the server adds the timestamp corresponding to the previous historical data synchronization request of the first terminal to a preset random forest model. The random forest model predicts the newly added timestamp and generates a prediction result. The server compares the prediction result of the random forest model with the true label of the timestamp, wherein the true label indicates whether the historical request is actually reasonable, which can be obtained based on manual annotation or other verification methods. The server adjusts and updates the hyperparameters of the random forest model based on the feedback of the true label, and repeats the prediction and hyperparameter update until the preset maximum number of updates is reached to obtain a trained model.
[0086] The server adds the first timestamp of the current data synchronization request to the trained random forest model and lets the model predict it. The random forest model generates a rationality score, which indicates the rationality of the current timestamp. The server compares the score with the preset rationality threshold. If the score is greater than or equal to the threshold, the current timestamp is considered to be reasonable and the request will be retained. If the score is less than the threshold, the current timestamp is considered to be suspicious and the request will be discarded.
[0087] For requests that pass the timestamp rationality check, the server establishes a connection with the blockchain node through the pre-configured blockchain network address and access point. The server constructs a public key query request based on the first terminal identifier and the target terminal identifier in the data synchronization request, and sends it to the blockchain node. After receiving the public key query request, the blockchain node retrieves the public key information related to the first terminal and the target terminal in the blockchain account book. The blockchain node packages the retrieved public key information, generates a corresponding response message, and sends it to the server. The server extracts the public key corresponding to the first terminal from the response message;
[0088] Based on the public key of the first terminal and in combination with the homomorphic encryption algorithm, the server performs encryption operations on the plaintext content in the data synchronization request to generate first verification information in ciphertext form. For each target terminal in the data synchronization request, the server uses the homomorphic encryption algorithm to generate a corresponding second verification information based on the first verification information, wherein the second verification information is based on the first verification information and is encrypted twice for the identities and public keys of different target terminals. The server adds the first verification information and the second verification information corresponding to all target terminals as additional fields to the original data synchronization request to form an enhanced, ciphertext-protected synchronization request. The server sends the enhanced data synchronization request to the target terminal and waits for subsequent synchronization confirmation and completion process.
[0089] In this embodiment, the random forest model can capture the complex patterns of timestamp distribution, has a stronger ability to recognize abnormal or forged timestamps, and effectively reduces the false alarm and missed alarm rates. By continuously feeding new timestamp data back to the random forest model and training and adjusting it according to the real labels, the model can adaptively learn the changing trend of timestamp distribution, adapt to different application scenarios and data characteristics, and help maintain stability and reliability. By using the public key of the terminal to homomorphically encrypt the plaintext content and generate verification information in ciphertext form, sensitive information in the data synchronization process is effectively protected to prevent man-in-the-middle attacks and data leakage. On the basis of generating the first verification information, the corresponding second verification information is generated for each target terminal, realizing a multi-granularity data synchronization verification mechanism, which helps to ensure the target accuracy and privacy protection of data synchronization. In summary, this embodiment simplifies the implementation complexity of the terminal, provides a scalable security mechanism, supports post-audit and analysis, and provides an efficient, intelligent and reliable solution for ensuring data synchronization security in distributed systems.
[0090] S2. The server performs sensitivity analysis on the data to be synchronized by using a sensitive data identification model to generate a sensitive data subset and a non-sensitive data subset, performs perturbation processing on the sensitive data subset in combination with a local differential privacy algorithm to generate an unordered sensitive data subset, encrypts the unordered sensitive data subset and the non-sensitive data subset to generate ciphertext data, encapsulates the ciphertext data and the first verification information and the second verification information to obtain a data synchronization message, and sends the message to the target terminal through a secure channel;
[0091] The sensitivity analysis is the process of evaluating the responsiveness of a system or model to input changes. The sensitive data subset refers to a part of the data set that contains sensitive information. The local differential privacy algorithm is a method of protecting data privacy by randomly perturbing the data at the data source to ensure the privacy of each data point. The perturbation processing is to add random noise to the data to hide the specific value of the original data. The unordered sensitive data subset refers to the originally ordered sensitive data that is disrupted and disturbed after the perturbation processing to form an unordered data set. The data synchronization message is a communication message used to synchronize data in a multi-terminal system. The secure channel is a communication path that ensures that data is not intercepted, tampered with or eavesdropped during transmission.
[0092] In an optional embodiment,
[0093] The server performs sensitivity analysis on the data to be synchronized by using a sensitive data identification model to generate a sensitive data subset and a non-sensitive data subset, performs perturbation processing on the sensitive data subset in combination with a local differential privacy algorithm to generate an unordered sensitive data subset, encrypts the unordered sensitive data subset and the non-sensitive data subset to generate ciphertext data, encapsulates the ciphertext data and the first verification information and the second verification information to obtain a data synchronization message, and sends the message to the target terminal through a secure channel, including:
[0094] Adding an initial recognition model on the server, setting a word embedding layer and multiple parallel convolutional layers and adding an attention layer, a fully connected layer and an output layer after the convolutional layer to obtain the sensitive data recognition model;
[0095] A training data set with annotations is randomly generated according to the data to be synchronized, elements in the training data set are added to the sensitive data recognition model, each input element is converted into a word embedding vector through a word embedding layer, local features in the word embedding vector are extracted through a convolution layer, the local features are weighted summed in combination with an attention mechanism, and global mapping is performed through a fully connected layer to obtain a predicted probability distribution of the sensitive data category corresponding to the current element, the predicted probability distribution is compared with the annotation information of the current element, a loss value is determined in combination with a cross entropy loss function, hyperparameters of the sensitive data recognition model are updated according to the loss value, and the update is repeated until the model converges;
[0096] Using the updated sensitive data identification model to perform sensitivity analysis on the data to be synchronized, and dividing the data to be synchronized into sensitive data subsets and non-sensitive data subsets according to the analysis results;
[0097] Generate a privacy budget parameter based on a local differential privacy algorithm, for each element in the sensitive data subset, build a probability transfer matrix in combination with the abnormal category, the amount of data and the privacy budget parameter, perturb the data to be synchronized based on the probability transfer matrix and generate the disordered sensitive data subset;
[0098] The unordered sensitive data subset and the non-sensitive data subset are encrypted using symmetric keys respectively to generate ciphertext data, the ciphertext data are packaged together with the pre-acquired first verification information and multiple second verification information and encapsulated into the data synchronization request to obtain a data synchronization message, and the data synchronization message is sent to the target terminal through a secure channel.
[0099] The initial recognition model is a basic model in a machine learning or deep learning system, used to preliminarily identify or classify input data. The word embedding layer is a layer in a neural network model, used to map discrete vocabulary to a continuous vector space. The global mapping is a method of converting local features or data into a global representation. The privacy budget parameter is a parameter used to control the strength of privacy protection in a differential privacy algorithm. The probability transfer matrix is a matrix used to describe the probability of a system transitioning between different states.
[0100] The server initializes a sensitive data recognition model, including a word embedding layer, multiple parallel convolutional layers, an attention layer, a fully connected layer, and an output layer. The server randomly generates a batch of training samples with sensitive / non-sensitive annotations based on the data set to be synchronized. The server inputs the generated training samples into the sensitive data recognition model one by one. The word embedding layer converts each input sample into a word embedding vector of fixed length. The convolutional layer extracts local features from the word embedding vector. Each convolution kernel focuses on different semantic information. The attention layer performs weighted summation on the local features extracted by the convolutional layer to highlight key features and weaken noise features. The fully connected layer performs nonlinear transformation and dimensionality adjustment on the output of the attention layer and maps it to the category space. The output layer generates the predicted probability that the current sample belongs to each category (sensitive / non-sensitive) based on the results of the fully connected layer.
[0101] The server compares the predicted probability distribution output by the model with the true annotation of the current training sample, calculates the difference between the two based on the cross entropy loss function, and obtains the loss value. Based on the calculated loss value, the server uses the optimization algorithm to adjust and update the parameters of the sensitive data recognition model to reduce the prediction error, and repeats the training until the model converges;
[0102] The server uses the trained sensitive data recognition model to scan and predict the data to be synchronized one by one, judge the sensitivity of each data element, and divide the data to be synchronized into sensitive data subsets and non-sensitive data subsets based on the prediction results;
[0103] For sensitive data subsets, the server introduces the local differential privacy (LDP) mechanism to generate a privacy budget parameter. For each element in the sensitive subset, a customized probability transfer matrix is constructed according to its anomaly category, data size, and privacy budget parameter. The probability transfer matrix is used to randomly perturb the value of the sensitive element to generate an unordered sensitive data subset with privacy protection.
[0104] Use a pre-generated or negotiated symmetric key to encrypt the two subsets, convert the plaintext into ciphertext, and package the encrypted ciphertext data together with the previously generated first verification information and multiple second verification information to form a complete data synchronization request. The server sends the packaged data synchronization request to the target terminal through a secure channel to complete the data synchronization initiation process.
[0105] In this embodiment, by constructing a deep learning model including components such as a word embedding layer, a convolutional layer, and an attention layer, the semantic features and contextual information in the data are fully mined to achieve accurate identification of sensitive data, which helps to accurately identify sensitive data and reduce false positive and false negative rates. A symmetric encryption algorithm is used to encrypt sensitive and non-sensitive data to ensure the confidentiality of data during transmission and storage, and to protect the integrity and consistency of the data. In summary, this embodiment significantly improves the intelligence, security, and reliability of the data synchronization process by introducing deep learning technologies such as sensitive data identification, local differential privacy protection, and data encryption.
[0106] In an optional embodiment,
[0107] For each element in the sensitive data subset, a probability transfer matrix is constructed by combining the anomaly category, the amount of data, and the privacy budget parameter as shown in the following formula:
[0108]
[0109] in, Represents an element in the probability transfer matrix, and the kth category will take the value v i Transfer to value v j The probability of Indicates that the value in the kth category is v i The number of elements, ε k represents the privacy budget parameter of the kth category, q() represents the utility function, and m represents the maximum number of values in the sensitive data subset. Indicates that the value in the kth category is v l The number of elements.
[0110] In this embodiment, independent probability transfer matrices are constructed for different anomaly categories, and differentiated privacy protection strategies can be provided according to the sensitivity of the category and the data distribution, which helps to achieve a better balance between privacy security and data utility. By adjusting the privacy budget parameters, the trade-off between privacy protection and data utility can be flexibly controlled to meet the privacy compliance requirements in different scenarios. The exponential mechanism can optimize the effect of random disturbances, while satisfying differential privacy, while minimizing the damage to data utility. In summary, this embodiment retains the useful information of the data to the maximum extent while protecting data privacy, and provides a high-quality data foundation for subsequent data analysis and mining.
[0111] S3. The target terminal obtains the first verification information and the second verification information by decrypting with the private key and the first terminal public key, and uploads the decryption result to the blockchain network for verification. According to the verification result, the target terminal performs deduplication detection and shared decryption through the data deduplication model to obtain the data to be synchronized, synchronizes the data to be synchronized and generates a synchronization completion certificate, which is uploaded to the blockchain network. The server analyzes the data synchronization status through a trusted assessment model based on a graph neural network, generates a synchronization analysis report and sends it to the first terminal.
[0112] The authentication refers to verifying the authenticity and integrity of an object or information. The data deduplication model is an algorithm and technology used to detect and delete duplicate data in a data set. The shared decryption is a cryptographic technology that allows multiple participants to jointly decrypt an encrypted message without any single participant being able to decrypt the information alone. The synchronization completion certificate is a certificate used to confirm that the data synchronization operation has been successfully completed. The synchronization analysis report is a detailed record and analysis of the data synchronization process and results.
[0113] In an optional embodiment,
[0114] The target terminal obtains the first verification information and the second verification information by decrypting with the private key and the first terminal public key, and uploads the decryption result to the blockchain network for verification. According to the verification result, the target terminal performs deduplication detection and shares decryption through the data deduplication model, and obtains the data to be synchronized, including:
[0115] After receiving the data synchronization message, the target terminal obtains the corresponding private key and the public key of the first terminal and decrypts the first verification information by combining the obtained private key through an asymmetric encryption algorithm, and decrypts the second verification information by using the obtained public key to obtain the first verification information and the second verification information in plain text;
[0116] Select a verification platform according to the verification information format and use the first verification information and the second verification information in plain text as parameters, call the verification smart contract of the verification platform, wherein the verification smart contract includes a verification algorithm and a verification rule, executes the verification algorithm and the verification rule, and generates verification results of the first verification information and the second verification information;
[0117] Determine whether the verification is passed according to the verification result. If it is passed, perform a repeatability check on the data to be synchronized, extract the feature vector corresponding to the data to be synchronized and compare it with the local feature vector. If the identical feature vectors exceed 50%, it is considered to be duplicate data and the data to be synchronized is deleted. Otherwise, it is considered to be new data and saved.
[0118] For the newly added data, the decryption key is divided into multiple sub-keys by the server and held by the first terminal, the server and the target terminal respectively. The target terminal obtains the decryption key through key exchange and decrypts the ciphertext data to obtain the data to be synchronized.
[0119] The verification platform is a platform for verifying and authenticating various data and transactions, usually based on blockchain or other distributed ledger technologies. The verification smart contract is an automatically executed contract deployed on the blockchain, specifically used for the verification process of data and transactions.
[0120] After receiving the data synchronization message sent by the server, the target terminal first obtains its own private key and the public key of the first terminal from the local storage or key management system. The target terminal uses an asymmetric encryption algorithm (such as RSA, ECC, etc.) to decrypt the first verification information in the data synchronization message using the obtained private key. The private key decryption ensures that only the target terminal can obtain the plain text content of the first verification information. The target terminal uses the obtained public key of the first terminal to decrypt the second verification information in the data synchronization message. After decryption, the target terminal obtains the first verification information and the second verification information in plain text for subsequent authentication and integrity verification.
[0121] The target terminal selects a suitable verification platform according to the format and content of the verification information, wherein the verification platform can be a decentralized application based on blockchain or a traditional centralized verification service. The target terminal uses the first verification information and the second verification information in plain text as parameters and calls the verification smart contract provided by the verification platform. During the execution of the verification smart contract, the first verification information and the second verification information are comprehensively checked and verified according to the built-in verification algorithm and verification rules. The verification smart contract outputs the verification results of the first verification information and the second verification information, indicating whether they have passed the verification and whether they meet the expected format and content. If the verification result shows that the verification fails, the data synchronization request is considered invalid or tampered with, and the target terminal refuses to accept the request and does not perform subsequent processing. If the verification result shows that the verification passes, the target terminal performs duplication detection on the received data to be synchronized to avoid data redundancy and repeated storage;
[0122] During the duplication detection process, the target terminal extracts feature vectors of the data to be synchronized, such as hash values and keywords, and compares the extracted feature vectors with feature vectors of the local existing data. If it is found that the identical feature vectors exceed 50%, it is considered that the data to be synchronized and the local data are highly repeated. At this time, the target terminal deletes the data to be synchronized and does not save it. If the identical feature vectors do not exceed 50%, it is considered that the data to be synchronized is newly added data, and the target terminal saves it to the local database or file system.
[0123] For newly added data to be synchronized, the server divides the key required for decryption into multiple sub-keys and distributes them to the first terminal, the server itself and the target terminal respectively. The target terminal obtains the complete decryption key through a secure key exchange protocol with the first terminal and the server. The target terminal uses the obtained decryption key to decrypt the ciphertext of the newly added data and restore the original plaintext of the data to be synchronized.
[0124] In this embodiment, through asymmetric encryption and decryption of the first verification information and the second verification information, the target terminal verifies the authenticity and integrity of the data synchronization message, significantly improving the security and reliability of the data synchronization process. The smart contract encapsulates predefined verification algorithms and rules to ensure the fairness, transparency and non-tamperability of the verification process, thereby improving the credibility of data synchronization. The key is divided into multiple sub-keys, which are held by the first terminal, the server and the target terminal respectively, effectively reducing the risk of single point leakage. The key exchange protocol utilizes the irreversibility of mathematical problems (such as discrete logarithm problems) to ensure that the key will not be stolen or cracked during the exchange process, greatly simplifying the key distribution process and improving communication efficiency. In summary, this embodiment comprehensively guarantees the security, reliability, efficiency and privacy protection of the data synchronization process, and provides a reliable, efficient and flexible solution for achieving end-to-end secure data synchronization.
[0125] In an optional embodiment,
[0126] Synchronizing the data to be synchronized and generating a synchronization completion certificate, uploading it to the blockchain network, the server analyzing the data synchronization status through a trusted evaluation model based on a graph neural network, generating a synchronization analysis report and sending it to the first terminal includes:
[0127] A batch synchronization strategy is selected according to business needs. The data to be synchronized is divided into multiple batches according to the batch synchronization strategy and synchronized. The data synchronization is completed and a synchronization completion certificate is generated. The synchronization completion certificate includes an identity identifier, a hash value and summary information of the synchronized data, a digital signature of the target terminal, and a synchronization completion timestamp. The blockchain network receives the synchronization completion certificate uploaded by the target terminal and adds it to an empty block and appends the block to the blockchain.
[0128] Based on the synchronization completion certificate, the server uses the public key of the target terminal to decrypt the digital signature of the target terminal in the synchronization completion certificate and obtains a first hash digest, recalculates the hash digest in the synchronization completion certificate and compares it with the first hash digest, and passes the digital signature verification if they are the same;
[0129] For the synchronization completion certificate verified by the digital signature, decompose the synchronization completion certificate and obtain the timestamps of the synchronization start and the synchronization end in each batch, and abstract the data synchronization process into a directed weighted graph according to the timestamps, wherein the nodes represent the terminals and the edges represent the synchronization relationships;
[0130] The embedded representation of each node in the directed weighted graph is obtained through a preset trusted assessment model. For each node, neighbor information is aggregated and the hidden state of the current node is updated. Forward reasoning is performed on the graph data based on the hidden state to obtain the trusted embedded representation corresponding to each node. A trusted embedding assessment is performed on the node corresponding to the target terminal to obtain a credibility score. If the credibility score is greater than a preset credibility threshold, the synchronization completion credential corresponding to the target terminal is considered to be credible, and a synchronization analysis report is generated and sent to the first terminal.
[0131] The batch synchronization strategy is a strategy for data synchronization, which divides a large amount of data into multiple small batches for synchronization to improve efficiency and reliability. The hash summary is a fixed-length string generated after processing the input data through a hash function, which serves as the unique identifier of the data. The directed weighted graph is a graph structure in which each edge has a direction and a weight. The embedded representation is a representation method that maps high-dimensional sparse data to a low-dimensional dense space, which is commonly used in fields such as natural language processing and recommendation systems. The forward reasoning refers to the process of calculating layer by layer from the input layer to the output layer in a neural network to obtain the final prediction result. The trusted embedded representation is an embedded representation generated under the premise of ensuring data privacy and security. The trusted embedded evaluation evaluates the generated embedded representation to verify its performance in terms of privacy protection, security and data representation effect.
[0132] The server selects a suitable batch synchronization strategy based on business needs. The batch synchronization strategy can be formulated based on factors such as data volume, priority, and time interval. The purpose is to divide a large amount of data to be synchronized into multiple manageable batches to improve synchronization efficiency and reliability.
[0133] The server divides the data to be synchronized into multiple batches according to the selected batch synchronization strategy. Each batch contains a part of the data to be synchronized. The size and number of the batches depend on the specific strategy. The server synchronizes the data of each batch separately and sends it to the target terminal. After receiving the synchronized data of each batch, the target terminal performs necessary verification and processing and integrates the data into the local system. When the synchronization of all batches of data is completed, the target terminal generates a synchronization completion certificate, wherein the synchronization completion certificate contains the identity, the hash value of the synchronized data, the digital signature of the target terminal and the synchronization completion timestamp. The target terminal uploads the generated synchronization completion certificate to the blockchain network. After receiving the certificate, the blockchain network adds it to a new empty block and appends the block to the end of the blockchain.
[0134] The server obtains the synchronization completion certificate in the blockchain network and starts to verify the certificate. The server uses the public key of the target terminal to decrypt the digital signature of the target terminal in the synchronization completion certificate to obtain a first hash digest. The server recalculates the hash digest for other information of the synchronization completion certificate (such as identity identification, hash value and summary information of synchronization data, synchronization completion timestamp, etc.) to obtain a second hash digest. The second hash digest is compared with the first hash digest. If the two are the same, it means that the content of the synchronization completion certificate has not been tampered with and the digital signature verification has passed. If the two are different, it means that the certificate may have been tampered with and the digital signature verification has failed.
[0135] For the synchronization completion certificate verified by the digital signature, the server further analyzes its content, evaluates the credibility of the target terminal, extracts the synchronization start timestamp and synchronization end timestamp of each batch from the synchronization completion certificate, and abstracts the data synchronization process into a directed weighted graph based on the timestamp information. In this graph, the nodes represent the terminals involved in the synchronization, and the edges represent the synchronization relationship between the terminals. The weights of the edges can be defined according to factors such as the synchronization time and the amount of data. The server uses a pre-designed trusted evaluation model to analyze the directed weighted graph. For each node in the graph (i.e., each terminal), the model first aggregates the information of its neighboring nodes and updates the hidden state of the current node. Based on the updated hidden state, the model performs forward reasoning on the graph data to obtain The trusted embedding representation of each node is extracted, and the trusted embedding representation of the node corresponding to the target terminal is extracted and scored using a preset evaluation function to obtain a credibility score. The credibility score is compared with a preset credibility threshold. If the credibility score is greater than or equal to the threshold, the target terminal is considered to be trustworthy and the synchronization completion certificate submitted by it is authentic and trustworthy. If the credibility score is less than the threshold, the credibility of the target terminal is considered to be low, and the synchronization completion certificate submitted by it needs further verification or processing. For trusted target terminals, the server generates a data synchronization analysis report, summarizing the process, results, performance indicators and other information of data synchronization, and sends the generated synchronization analysis report to the first terminal (i.e., the initiator of data synchronization) for review and archiving.
[0136] In this embodiment, by storing the synchronization completion certificate in the blockchain network, the authenticity and non-tamperability of the certificate are ensured by utilizing the decentralization, consensus mechanism and encrypted link characteristics of the blockchain. The server uses a trusted assessment model to perform a credibility assessment on the target terminal. By analyzing factors such as timestamps and data volume during the data synchronization process, a directed weighted graph is constructed to represent the synchronization relationship between terminals, which helps to identify potential malicious nodes or abnormal behaviors, and provides an intelligent risk prevention mechanism for the server. The synchronization process and results are presented in a visual manner to help administrators quickly understand the execution of synchronization tasks and discover potential problems and bottlenecks. In summary, this embodiment provides important technical support for building a reliable, efficient and intelligent data synchronization mechanism, and has broad application value for scenarios that require data sharing and collaboration across institutions and systems.
[0137] Figure 2 FIG. 1 is a schematic diagram of a structure of a trusted DCS terminal data synchronization system according to an embodiment of the present invention. Figure 2 As shown, the system comprises:
[0138] The first unit is used for the server to receive a data synchronization request containing multiple types of information sent by the first terminal, combine the anomaly detection model based on the long short-term memory network, comprehensively analyze the historical behavior data and device fingerprint characteristics corresponding to the first terminal, generate the corresponding double anomaly detection result, and combine the random forest model to judge the rationality of the timestamp data corresponding to the first terminal. If it is reasonable, the server obtains the public key from the blockchain network, encrypts it in combination with the homomorphic encryption algorithm, and obtains the first verification information and multiple second verification information;
[0139] The second unit is used for the server to perform sensitivity analysis on the data to be synchronized through a sensitive data identification model, generate a sensitive data subset and a non-sensitive data subset, perform perturbation processing on the sensitive data subset in combination with a local differential privacy algorithm, generate an unordered sensitive data subset, encrypt the unordered sensitive data subset and the non-sensitive data subset, generate ciphertext data, encapsulate the ciphertext data and the first verification information and the second verification information to obtain a data synchronization message, and send the message to the target terminal through a secure channel;
[0140] The third unit is used for the target terminal to obtain the first verification information and the second verification information by decrypting through the private key and the first terminal public key, and to upload the decryption result to the blockchain network for verification. According to the verification result, the target terminal performs deduplication detection and shared decryption through the data deduplication model to obtain the data to be synchronized, synchronizes the data to be synchronized and generates a synchronization completion certificate, which is uploaded to the blockchain network. The server analyzes the data synchronization status through a trusted assessment model based on a graph neural network, generates a synchronization analysis report, and sends it to the first terminal.
[0141] According to a third aspect of the embodiments of the present invention,
[0142] An electronic device is provided, comprising:
[0143] processor;
[0144] a memory for storing processor-executable instructions;
[0145] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0146] A fourth aspect of the embodiments of the present invention is:
[0147] A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the aforementioned method is implemented.
[0148] The present invention may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present invention.
[0149] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for data synchronization between trusted DCS terminals, characterized in that: include: The server receives a data synchronization request containing multiple types of information sent by the first terminal, combines the anomaly detection model based on the long short-term memory network, comprehensively analyzes the historical behavior data and device fingerprint features corresponding to the first terminal, generates a corresponding double anomaly detection result, and combines the random forest model to judge the rationality of the timestamp data corresponding to the first terminal. If it is reasonable, the server obtains the public key from the blockchain network, encrypts it in combination with the homomorphic encryption algorithm, and obtains the first verification information and multiple second verification information; The server performs sensitivity analysis on the data to be synchronized by using a sensitive data identification model to generate a sensitive data subset and a non-sensitive data subset, performs perturbation processing on the sensitive data subset in combination with a local differential privacy algorithm to generate an unordered sensitive data subset, encrypts the unordered sensitive data subset and the non-sensitive data subset to generate ciphertext data, encapsulates the ciphertext data and the first verification information and the second verification information to obtain a data synchronization message, and sends the message to the target terminal through a secure channel; The target terminal obtains the first verification information and the second verification information by decrypting with the private key and the first terminal public key, and uploads the decryption result to the blockchain network for verification. According to the verification result, the target terminal performs deduplication detection and shared decryption through the data deduplication model to obtain the data to be synchronized, synchronizes the data to be synchronized and generates a synchronization completion certificate, which is uploaded to the blockchain network. The server analyzes the data synchronization status through a trusted assessment model based on a graph neural network, generates a synchronization analysis report and sends it to the first terminal.
2. The method according to claim 1, characterized in that The server receives a data synchronization request containing multiple types of information sent by the first terminal, and combines the anomaly detection model based on the long short-term memory network to comprehensively analyze the historical behavior data and device fingerprint features corresponding to the first terminal, and generates corresponding dual anomaly detection results including: The server receives, through a network connection, a data synchronization request including multiple types of information sent by the first terminal, wherein the data synchronization request includes a unique identifier corresponding to the first terminal, a unique identifier corresponding to the target terminal, data to be synchronized, historical behavior of the first terminal, a device fingerprint feature of the first terminal, and a first timestamp, wherein the first timestamp corresponds to a time point when the data synchronization request is initiated; The server loads a pre-trained anomaly detection model based on a long short-term memory network, and inputs the historical behavior data corresponding to the first terminal as a time series into the anomaly detection model. The anomaly detection model generates a temporal dependency relationship and a normal behavior pattern by extracting the behavior features in the historical behavior data. The server extracts the behavior data per unit time before the first terminal sends data synchronization and adds it to the anomaly detection model. By comparing it with the normal behavior pattern, a request anomaly score is generated, and the request anomaly score is compared with a preset anomaly score threshold. If the request anomaly score is greater than the anomaly score threshold, the current data synchronization request is considered to be an abnormal behavior and synchronization is not performed. The server obtains the historical device fingerprint features corresponding to the first terminal from the historical behavior data, and compares the device fingerprint features corresponding to the current data synchronization request. If they are the same, it is considered that the identity authentication is passed; otherwise, it is considered that the identity authentication is not passed and the synchronization is canceled; The device fingerprint feature verification results and the behavior pattern verification results are combined to generate corresponding dual anomaly detection results.
3. The method according to claim 1, characterized in that The rationality of the timestamp data corresponding to the first terminal is judged in combination with the random forest model. If it is reasonable, the server obtains the public key from the blockchain network, encrypts it in combination with the homomorphic encryption algorithm, and obtains the first verification information and the plurality of second verification information including: According to the double anomaly detection result, determine whether the behavior pattern verification and the device fingerprint feature verification are passed. If all are passed, add the timestamp corresponding to the historical data synchronization request corresponding to the first terminal to the preset random forest model, the random forest model predicts and generates a prediction result, compares the prediction result with the real label of the timestamp corresponding to the historical data synchronization request, updates the hyperparameters of the random forest model according to the real label, and repeats the update until the preset maximum number of updates is reached to obtain a trained random forest model; The first timestamp corresponding to the current data synchronization request is added to the trained random forest model, and the random forest model performs prediction, generates a rationality score, and determines whether the current timestamp is reasonable in combination with a rationality threshold. If it is reasonable, it is retained; if it is unreasonable, the current data synchronization request is discarded; For the data synchronization request corresponding to the reserved timestamp, the server establishes a network connection through the pre-configured blockchain network address and access point, passes identity authentication and constructs a public key query request according to the first terminal identifier and the target terminal identifier in the data synchronization request, and the blockchain node retrieves the corresponding public key information according to the public key query request, packages the public key information and generates corresponding information and sends it to the server, thereby obtaining the public key corresponding to the first terminal; Based on the public key, plaintext operations are performed in combination with a homomorphic encryption algorithm to generate first verification information in ciphertext form. Based on the first verification information, for each target terminal, corresponding second verification information is generated through a homomorphic encryption algorithm. The first verification information and multiple second verification information are added as additional fields to the data synchronization request.
4. The method according to claim 1, characterized in that: The server performs sensitivity analysis on the data to be synchronized by using a sensitive data identification model to generate a sensitive data subset and a non-sensitive data subset, performs perturbation processing on the sensitive data subset in combination with a local differential privacy algorithm to generate an unordered sensitive data subset, encrypts the unordered sensitive data subset and the non-sensitive data subset to generate ciphertext data, encapsulates the ciphertext data and the first verification information and the second verification information to obtain a data synchronization message, and sends the message to the target terminal through a secure channel, including: Adding an initial recognition model on the server, setting a word embedding layer and multiple parallel convolutional layers and adding an attention layer, a fully connected layer and an output layer after the convolutional layer to obtain the sensitive data recognition model; A training data set with annotations is randomly generated according to the data to be synchronized, elements in the training data set are added to the sensitive data recognition model, each input element is converted into a word embedding vector through a word embedding layer, local features in the word embedding vector are extracted through a convolution layer, the local features are weighted summed in combination with an attention mechanism, and global mapping is performed through a fully connected layer to obtain a predicted probability distribution of the sensitive data category corresponding to the current element, the predicted probability distribution is compared with the annotation information of the current element, a loss value is determined in combination with a cross entropy loss function, hyperparameters of the sensitive data recognition model are updated according to the loss value, and the update is repeated until the model converges; Using the updated sensitive data identification model to perform sensitivity analysis on the data to be synchronized, and dividing the data to be synchronized into sensitive data subsets and non-sensitive data subsets according to the analysis results; Generate a privacy budget parameter based on a local differential privacy algorithm, for each element in the sensitive data subset, build a probability transfer matrix in combination with the abnormal category, the amount of data and the privacy budget parameter, perturb the data to be synchronized based on the probability transfer matrix and generate the disordered sensitive data subset; The unordered sensitive data subset and the non-sensitive data subset are encrypted using symmetric keys respectively to generate ciphertext data, the ciphertext data are packaged together with the pre-acquired first verification information and multiple second verification information and encapsulated into the data synchronization request to obtain a data synchronization message, and the data synchronization message is sent to the target terminal through a secure channel.
5. The method according to claim 4, characterized in that For each element in the sensitive data subset, the probability transfer matrix is constructed by combining the abnormal category, the amount of data and the privacy budget parameter as shown in the following formula: in, Represents an element in the probability transfer matrix, and the kth category will take the value v i Transfer to value v j The probability of Indicates that the value in the kth category is v i The number of elements, ε k represents the privacy budget parameter of the kth category, q() represents the utility function, and m represents the maximum number of values in the sensitive data subset. Indicates that the value in the kth category is v l The number of elements.
6. The method according to claim 1, characterized in that The target terminal obtains the first verification information and the second verification information by decrypting with the private key and the first terminal public key, and uploads the decryption result to the blockchain network for verification. According to the verification result, the target terminal performs deduplication detection and shares decryption through the data deduplication model, and obtains the data to be synchronized, including: After receiving the data synchronization message, the target terminal obtains the corresponding private key and the public key of the first terminal and decrypts the first verification information by combining the obtained private key through an asymmetric encryption algorithm, and decrypts the second verification information by using the obtained public key to obtain the first verification information and the second verification information in plain text; Select a verification platform according to the verification information format and use the first verification information and the second verification information in plain text as parameters, call the verification smart contract of the verification platform, wherein the verification smart contract includes a verification algorithm and a verification rule, executes the verification algorithm and the verification rule, and generates verification results of the first verification information and the second verification information; Determine whether the verification is passed according to the verification result. If it is passed, perform a repeatability check on the data to be synchronized, extract the feature vector corresponding to the data to be synchronized and compare it with the local feature vector. If the identical feature vectors exceed 50%, it is considered to be duplicate data and the data to be synchronized is deleted. Otherwise, it is considered to be new data and saved. For the newly added data, the decryption key is divided into multiple sub-keys by the server and held by the first terminal, the server and the target terminal respectively. The target terminal obtains the decryption key through key exchange and decrypts the ciphertext data to obtain the data to be synchronized.
7. The method according to claim 1, characterized in that Synchronizing the data to be synchronized and generating a synchronization completion certificate, uploading it to the blockchain network, the server analyzing the data synchronization status through a trusted evaluation model based on a graph neural network, generating a synchronization analysis report and sending it to the first terminal includes: A batch synchronization strategy is selected according to business needs. The data to be synchronized is divided into multiple batches according to the batch synchronization strategy and synchronized. The data synchronization is completed and a synchronization completion certificate is generated. The synchronization completion certificate includes an identity identifier, a hash value and summary information of the synchronized data, a digital signature of the target terminal, and a synchronization completion timestamp. The blockchain network receives the synchronization completion certificate uploaded by the target terminal and adds it to an empty block and appends the block to the blockchain. Based on the synchronization completion certificate, the server uses the public key of the target terminal to decrypt the digital signature of the target terminal in the synchronization completion certificate and obtains a first hash digest, recalculates the hash digest in the synchronization completion certificate and compares it with the first hash digest, and passes the digital signature verification if they are the same; For the synchronization completion certificate verified by the digital signature, decompose the synchronization completion certificate and obtain the timestamps of the synchronization start and the synchronization end in each batch, and abstract the data synchronization process into a directed weighted graph according to the timestamps, wherein the nodes represent the terminals and the edges represent the synchronization relationships; The embedded representation of each node in the directed weighted graph is obtained through a preset trusted assessment model. For each node, neighbor information is aggregated and the hidden state of the current node is updated. Forward reasoning is performed on the graph data based on the hidden state to obtain the trusted embedded representation corresponding to each node. A trusted embedding assessment is performed on the node corresponding to the target terminal to obtain a credibility score. If the credibility score is greater than a preset credibility threshold, the synchronization completion credential corresponding to the target terminal is considered to be credible, and a synchronization analysis report is generated and sent to the first terminal.
8. A trusted DCS terminal data synchronization system, used to implement the method described in any one of claims 1 to 7, characterized in that: include: The first unit is used for the server to receive a data synchronization request containing multiple types of information sent by the first terminal, combine the anomaly detection model based on the long short-term memory network, comprehensively analyze the historical behavior data and device fingerprint characteristics corresponding to the first terminal, generate the corresponding double anomaly detection result, and combine the random forest model to judge the rationality of the timestamp data corresponding to the first terminal. If it is reasonable, the server obtains the public key from the blockchain network, encrypts it in combination with the homomorphic encryption algorithm, and obtains the first verification information and multiple second verification information; The second unit is used for the server to perform sensitivity analysis on the data to be synchronized through a sensitive data identification model, generate a sensitive data subset and a non-sensitive data subset, perform perturbation processing on the sensitive data subset in combination with a local differential privacy algorithm, generate an unordered sensitive data subset, encrypt the unordered sensitive data subset and the non-sensitive data subset, generate ciphertext data, encapsulate the ciphertext data and the first verification information and the second verification information to obtain a data synchronization message, and send the message to the target terminal through a secure channel; The third unit is used for the target terminal to obtain the first verification information and the second verification information by decrypting through the private key and the first terminal public key, and to upload the decryption result to the blockchain network for verification. According to the verification result, the target terminal performs deduplication detection and shared decryption through the data deduplication model to obtain the data to be synchronized, synchronizes the data to be synchronized and generates a synchronization completion certificate, which is uploaded to the blockchain network. The server analyzes the data synchronization status through a trusted assessment model based on a graph neural network, generates a synchronization analysis report, and sends it to the first terminal.
9. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method described in any one of claims 1 to 7.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Lightweight recyclable block chain storage method and device
CN114065283A
Block chain data privacy protection and sharing method based on zero knowledge proof
CN114143080A
Cited By
Offline file automatic encryption synchronization method and system
CN121723491A