A computer system based on neural network model

By building a dynamic encryption and decryption system based on neural network model in a computer system, the data security risk problem caused by relying on fixed encryption algorithms and keys in the prior art is solved, and a high-complexity and unpredictable encryption method is realized, which significantly improves the security of data.

CN119577817BActive Publication Date: 2025-05-23SOUTH CHINA UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510138891.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-08
Publication Date
2025-05-23
Estimated Expiration
2045-02-08

AI Technical Summary

Technical Problem

When transmitting and storing sensitive data, existing computer systems rely on fixed encryption algorithms and keys, which are easily cracked by attackers by analyzing data rules, resulting in data leakage and security risks.

Method used

Using a computer system based on neural network model, data features are extracted from historical encrypted data through feature extraction modules, a dynamic encryption and decryption model based on decision tree algorithm is constructed, and the preset neural network model is optimized to generate high-complexity and unpredictable encryption methods, and the model parameters and structural information are encrypted and stored in the blockchain network.

Benefits of technology

It effectively reduces the security risks of data, increases the difficulty of attackers to obtain encrypted data rules, and ensures the security of the target neural network model and encryption method.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119577817B_ABST
    Figure CN119577817B_ABST
Patent Text Reader

Abstract

The present invention application provides a computer system based on a neural network model, including a feature extraction module, a model construction module, an optimization module, a storage module, and a target data encryption module; the feature extraction module extracts data features from historical encrypted data; the model construction module constructs a dynamic encryption and decryption model based on a decision tree algorithm; the optimization module optimizes the preset neural network model through the output of the dynamic encryption and decryption model to obtain a target neural network model; the storage module splits the target neural network model into several sub-models, encrypts the model parameters and structural information of the sub-models, and obtains encrypted data; the target data encryption module obtains and decrypts the encrypted data to obtain decrypted data; and the target neural network model is assembled and used to encrypt the target data. The present invention application can generate a highly complex and unpredictable encryption method for encrypting target data, which can effectively reduce the security risk of data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer data processing, and in particular to a computer system based on a neural network model. Background Art

[0002] In the actual application scenarios of computer systems, when it comes to the transmission and storage of sensitive data, how to encrypt data is a key issue. Traditional data encryption algorithms rely on fixed encryption algorithms and keys. However, these encryption algorithms and keys often follow relatively fixed rules or laws. Therefore, attackers can analyze a large amount of encrypted data and mine the rules or laws followed by the algorithm or key to find data vulnerabilities in the computer system, and then obtain the required information through brute force. Therefore, existing computer systems that rely on fixed encryption algorithms or keys still have security risks such as data leakage. Summary of the invention

[0003] The present invention application provides a computer system based on a neural network model, which can solve the technical problem of how to reduce the security risk of data.

[0004] In order to solve the above technical problems, the present invention provides a computer system based on a neural network model, including a feature extraction module, a model construction module, an optimization module, a storage module, a target data encryption module and multiple computing nodes; wherein,

[0005] The feature extraction module is used to obtain historical encryption data of several encryption algorithms and several encryption keys, and extract data features from the historical encryption data;

[0006] The model building module is used to build a dynamic encryption and decryption model based on a decision tree algorithm based on the data features;

[0007] The optimization module is used to optimize the preset neural network model through the output of the dynamic encryption and decryption model to obtain the target neural network model;

[0008] The storage module is used to split the target neural network model into several sub-models, encrypt the model parameters and structural information of each sub-model, obtain encrypted data, and store the encrypted data in the blockchain network; and randomly store each sub-model on at least two of the computing nodes;

[0009] The target data encryption module is used to obtain and respond to the target data to be encrypted, access the blockchain network, obtain and decrypt the encrypted data from the blockchain network, and obtain decrypted data; access the multiple computing nodes to obtain each sub-model, and then assemble the target neural network model; and encrypt the target data through the decrypted data and the synthesized target neural network model.

[0010] As a preferred solution, the model building module builds a dynamic encryption and decryption model based on a decision tree algorithm based on the data features, including:

[0011] The model building module selects a number of risk factors from the data features; the types of risk factors include data sensitivity, access frequency and user authority;

[0012] Based on the decision tree C5 algorithm, the risk factors are divided by information gain ratio, thereby recursively constructing a decision tree model;

[0013] According to the leaf nodes of the decision tree model and the risk factor combinations on the branch paths, a plurality of encryption and decryption mapping relationships output by the decision tree model are obtained;

[0014] Iteratively updating the decision tree model through the risk factor, and performing a ten-fold cross validation on the decision tree model during the iterative updating process, and adaptively adjusting the encryption strength and granularity of the data according to a number of encryption and decryption mapping relationships output by the decision tree model;

[0015] The updated encryption / decryption mapping relationship model is determined as the dynamic encryption / decryption model.

[0016] As a preferred solution, the preset neural network model includes five hidden layers, each hidden layer includes 128, 256, 512, 256 and 128 nodes respectively, and the preset neural network model adopts a ReLU activation function.

[0017] As a preferred solution, the optimization module optimizes the preset neural network model through the output of the dynamic encryption and decryption model to obtain the target neural network model, including:

[0018] The optimization module optimizes the preset neural network model based on the output of the dynamic encryption and decryption model and in combination with an adaptive genetic algorithm;

[0019] When the preset neural network model meets the preset convergence condition, obtaining the target neural network model;

[0020] Wherein, the crossover probability configuration of the adaptive genetic algorithm is:

[0021] ;

[0022] Among them, P c is the crossover probability, is the upper bound of the crossover probability, is the lower bound of the crossover probability, is the maximum fitness value in the population, f avg is the average fitness value in the population, c 0 is a preset constant;

[0023] The mutation probability configuration of the adaptive genetic algorithm is:

[0024] ;

[0025] Among them, P m is the mutation probability, is the upper bound of the mutation probability, is the lower bound of the mutation probability, f m is the fitness value of the mutant individual.

[0026] As a preferred solution, the target data encryption module accesses the multiple computing nodes to obtain each sub-model, and then assembles the target neural network model, including:

[0027] The target data encryption module accesses the multiple computing nodes according to a preset secure multi-party computing protocol to obtain each sub-model;

[0028] Through secret sharing technology, multi-threaded secure calculations are implemented for each sub-model, and the initial neural network model is assembled based on the calculation results;

[0029] A consensus mechanism is used to verify the integrity of the initial neural network model. When the verification passes, the number of network layers and the size of the convolution kernel of the initial neural network model are dynamically adjusted to obtain the target neural network model.

[0030] As a preferred solution, the target data encryption module assembles an initial neural network model based on the calculation results, including:

[0031] The target data encryption module obtains the key parameter change trend of the calculation result through time series anomaly detection;

[0032] A preset model abnormal behavior feature library is queried to detect abnormal behavior patterns of the key parameter change trends, and when the detection passes, the calculation results are assembled into the initial neural network model.

[0033] As a preferred solution, the storage module encrypts the model parameters and structure information of each sub-model to obtain encrypted data, including:

[0034] The storage module performs hierarchical aggregation conversion processing on the model parameters and structural information of each sub-model to obtain a vector sequence;

[0035] Reconstructing the vector sequence through a preset encoder and decoder to obtain a reconstructed sequence and a reconstruction error; the reconstruction error is less than a preset error threshold;

[0036] Analyzing the vector sequence, the reconstruction sequence and the reconstruction error to obtain a vector feature sequence;

[0037] The vector feature sequence is detected, and when no abnormal vector feature is detected, the reconstructed sequence is subjected to hierarchical aggregation inverse conversion processing to obtain encrypted data.

[0038] As a preferred solution, the target data encryption module obtains and decrypts the encrypted data from the blockchain network to obtain the decrypted data, including:

[0039] The target data encryption module obtains encrypted data from the blockchain network, decrypts the encrypted data using the vector feature sequence, and obtains decrypted data.

[0040] As a preferred solution, the feature extraction module obtains historical encryption data of several encryption algorithms and several encryption keys, and extracts data features from the historical encryption data, including:

[0041] The feature extraction module randomly extracts a number of sample data from the historical encryption database, each sample data including at least one encryption algorithm and at least one encryption key;

[0042] The Apriori association rule algorithm is used to mine frequent item sets and association rules in the sample data based on preset support and confidence, so as to obtain the data features.

[0043] As a preferred solution, the feature extraction module randomly extracts a number of sample data from the historical encryption database, including:

[0044] The feature extraction module randomly arranges the sample data in the historical encryption database to obtain a sample sequence;

[0045] According to the order of the sample sequence, the sample sequence is divided into a plurality of sample sets; wherein the sample data in the same sample set adopt at least one same encryption algorithm;

[0046] Obtaining the number of samples in each sample set and the first position number of the sample in the sample sequence; extracting a number of random samples from the sample set;

[0047] Traversing the target set, comparing the first position number of the random sample with a plurality of second position numbers where the random sample is located in the target set;

[0048] When the first position number is less than the minimum value of the multiple second position numbers, the random sample is drawn; when the first position number is greater than or equal to the maximum value of the multiple second position numbers, the position of the random sample in the sample set is updated according to the sample quantity.

[0049] As a preferred solution, the target data encryption module implements encryption of the target data through the decrypted data and the synthesized target neural network model, including:

[0050] The target data encryption module calls the decrypted data and the synthesized target neural network model;

[0051] The target data to be encrypted is input into the synthesized target neural network model, and the output result of the synthesized target neural network model is verified by the decrypted data. When the verification passes, the encryption of the target data is realized.

[0052] Accordingly, the present invention also provides a data processing method based on a neural network model, comprising:

[0053] Acquire historical encryption data of several encryption algorithms and several encryption keys, and extract data features from the historical encryption data;

[0054] Based on the data features, a dynamic encryption and decryption model based on a decision tree algorithm is constructed;

[0055] Optimizing the preset neural network model through the output of the dynamic encryption and decryption model to obtain the target neural network model;

[0056] Splitting the target neural network model into several sub-models, encrypting the model parameters and structural information of each sub-model to obtain encrypted data, and storing the encrypted data in the blockchain network; randomly storing each sub-model on at least two of the computing nodes;

[0057] Obtain and respond to the target data to be encrypted, access the blockchain network, obtain and decrypt the encrypted data from the blockchain network, and obtain decrypted data; access the multiple computing nodes to obtain each sub-model, and then assemble the target neural network model; and encrypt the target data through the decrypted data and the synthesized target neural network model.

[0058] As a preferred solution, the dynamic encryption and decryption model based on the decision tree algorithm is constructed based on the data features, including:

[0059] Selecting a number of risk factors from the data features; the types of risk factors include data sensitivity, access frequency, and user authority;

[0060] Based on the decision tree C5 algorithm, the risk factors are divided by information gain ratio, thereby recursively constructing a decision tree model;

[0061] According to the leaf nodes of the decision tree model and the risk factor combinations on the branch paths, a plurality of encryption and decryption mapping relationships output by the decision tree model are obtained;

[0062] Iteratively updating the decision tree model through the risk factor, and performing a ten-fold cross validation on the decision tree model during the iterative updating process, and adaptively adjusting the encryption strength and granularity of the data according to a number of encryption and decryption mapping relationships output by the decision tree model;

[0063] The updated encryption / decryption mapping relationship model is determined as the dynamic encryption / decryption model.

[0064] As a preferred solution, the preset neural network model includes five hidden layers, each hidden layer includes 128, 256, 512, 256 and 128 nodes respectively, and the preset neural network model adopts a ReLU activation function.

[0065] As a preferred solution, the output of the dynamic encryption and decryption model is used to optimize the preset neural network model to obtain the target neural network model, including:

[0066] Based on the output of the dynamic encryption and decryption model, and in combination with an adaptive genetic algorithm, the preset neural network model is optimized;

[0067] When the preset neural network model meets the preset convergence condition, obtaining the target neural network model;

[0068] Wherein, the crossover probability configuration of the adaptive genetic algorithm is:

[0069] ;

[0070] Among them, P c is the crossover probability, is the upper bound of the crossover probability, is the lower bound of the crossover probability, is the maximum fitness value in the population, f avg is the average fitness value in the population, c 0 is a preset constant;

[0071] The mutation probability configuration of the adaptive genetic algorithm is:

[0072] ;

[0073] Among them, P m is the mutation probability, is the upper bound of the mutation probability, is the lower bound of the mutation probability, f m is the fitness value of the mutant individual.

[0074] As a preferred solution, accessing the multiple computing nodes to obtain each sub-model and then assembling the target neural network model includes:

[0075] According to a preset secure multi-party computing protocol, access the multiple computing nodes to obtain each sub-model;

[0076] Through secret sharing technology, multi-threaded secure calculations are implemented for each sub-model, and the initial neural network model is assembled based on the calculation results;

[0077] A consensus mechanism is used to verify the integrity of the initial neural network model. When the verification passes, the number of network layers and the size of the convolution kernel of the initial neural network model are dynamically adjusted to obtain the target neural network model.

[0078] As a preferred solution, the initial neural network model is assembled based on the calculation results, including:

[0079] By detecting anomalies in time series, the changing trends of key parameters of the calculation results are obtained;

[0080] A preset model abnormal behavior feature library is queried to detect abnormal behavior patterns of the key parameter change trends, and when the detection passes, the calculation results are assembled into the initial neural network model.

[0081] As a preferred solution, the method of encrypting the model parameters and structural information of each sub-model to obtain encrypted data includes:

[0082] Perform hierarchical aggregation transformation on the model parameters and structural information of each sub-model to obtain a vector sequence;

[0083] Reconstructing the vector sequence through a preset encoder and decoder to obtain a reconstructed sequence and a reconstruction error; the reconstruction error is less than a preset error threshold;

[0084] Analyzing the vector sequence, the reconstruction sequence and the reconstruction error to obtain a vector feature sequence;

[0085] The vector feature sequence is detected, and when no abnormal vector feature is detected, the reconstructed sequence is subjected to layered aggregation inverse conversion processing to obtain encrypted data.

[0086] As a preferred solution, the step of obtaining and decrypting the encrypted data from the blockchain network to obtain the decrypted data includes:

[0087] The encrypted data is obtained from the blockchain network, and the encrypted data is decrypted using the vector feature sequence to obtain the decrypted data.

[0088] As a preferred solution, the step of obtaining historical encryption data of a plurality of encryption algorithms and a plurality of encryption keys, and extracting data features from the historical encryption data includes:

[0089] Randomly extract a number of sample data from the historical encryption database, each sample data contains at least one encryption algorithm and at least one encryption key;

[0090] The Apriori association rule algorithm is used to mine frequent item sets and association rules in the sample data based on preset support and confidence, so as to obtain the data features.

[0091] As a preferred solution, the method of randomly extracting a number of sample data from the historical encryption database includes:

[0092] Randomly arranging the sample data in the historical encryption database to obtain a sample sequence;

[0093] According to the order of the sample sequence, the sample sequence is divided into a plurality of sample sets; wherein the sample data in the same sample set adopt at least one same encryption algorithm;

[0094] Obtaining the number of samples in each sample set and the first position number of the sample in the sample sequence; extracting a number of random samples from the sample set;

[0095] Traversing the target set, comparing the first position number of the random sample with a plurality of second position numbers where the random sample is located in the target set;

[0096] When the first position number is less than the minimum value of the multiple second position numbers, the random sample is drawn; when the first position number is greater than or equal to the maximum value of the multiple second position numbers, the position of the random sample in the sample set is updated according to the sample quantity.

[0097] As a preferred solution, the encryption of the target data is achieved through the decrypted data and the synthesized target neural network model, including:

[0098] Calling the decrypted data and the synthesized target neural network model;

[0099] The target data to be encrypted is input into the synthesized target neural network model, and the output result of the synthesized target neural network model is verified by the decrypted data. When the verification passes, the encryption of the target data is realized.

[0100] Compared with the prior art, the present invention has the following beneficial effects:

[0101] The present invention application provides a computer system based on a neural network model, including a feature extraction module, a model construction module, an optimization module, a storage module, a target data encryption module and multiple computing nodes; wherein the feature extraction module is used to obtain historical encrypted data of several encryption algorithms and several encryption keys, and extract data features from the historical encrypted data; the model construction module is used to construct a dynamic encryption and decryption model based on a decision tree algorithm based on the data features; the optimization module is used to optimize the preset neural network model through the output of the dynamic encryption and decryption model to obtain a target neural network model; the storage module is used to split the target neural network model into several sub-models, encrypt the model parameters and structural information of each sub-model, obtain encrypted data, and store the encrypted data in a blockchain network; each sub-model is randomly stored on at least two of the computing nodes; the target data encryption module is used to obtain and respond to the target data to be encrypted, access the blockchain network, obtain and decrypt the encrypted data from the blockchain network, and obtain decrypted data; access the multiple computing nodes to obtain each sub-model, and then assemble the target neural network model; and encrypt the target data through the decrypted data and the synthesized target neural network model. The present invention application is implemented by extracting data features from historical encrypted data, constructing a dynamic encryption and decryption model based on a decision tree algorithm, obtaining a mapping relationship between encryption and decryption, and using the output of the dynamic encryption and decryption model to optimize the preset neural network model to obtain a target neural network model, so that the target neural network model can learn the mapping relationship between data encryption and decryption, and generate a highly complex and unpredictable encryption method for encrypting target data. The difficulty for attackers to obtain the rules of encrypted data is greatly increased, and the security risk of data can be effectively reduced; in addition, the present application splits the target neural network model into several sub-models, encrypts the model parameters and structural information of each sub-model, and stores the encrypted data in the blockchain network, and randomly stores each sub-model on at least two computing nodes, so that the information of the target neural network model is not easily obtained by attackers, and it is difficult to tamper with the target neural network model. When the target data needs to be encrypted, the target neural network model and its decrypted data are called again, which can further ensure the security of the target neural network model and the encryption method. BRIEF DESCRIPTION OF THE DRAWINGS

[0102] Figure 1 : A structural diagram of an embodiment of a computer system based on a neural network model provided in the present application.

[0103] Figure 2 : A flow chart of an embodiment of a data processing method based on a neural network model provided in the present application. DETAILED DESCRIPTION

[0104] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions 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.

[0105] Embodiment 1

[0106] Please refer to Figure 1 , Figure 1 A computer system 100 based on a neural network model provided for the present invention comprises a feature extraction module 101, a model construction module 102, an optimization module 103, a storage module 104, a target data encryption module 105 and a plurality of computing nodes; wherein the feature extraction module 101 is used to obtain historical encrypted data of a plurality of encryption algorithms and a plurality of encryption keys, and extract data features from the historical encrypted data; the model construction module 102 is used to construct a dynamic encryption and decryption model based on a decision tree algorithm based on the data features; the optimization module 103 is used to optimize a preset neural network model through the output of the dynamic encryption and decryption model to obtain a target neural network model; The storage module 104 is used to split the target neural network model into several sub-models, encrypt the model parameters and structural information of each sub-model, obtain encrypted data, and store the encrypted data in the blockchain network; randomly store each sub-model on at least two of the computing nodes; the target data encryption module 105 is used to obtain and respond to the target data to be encrypted, access the blockchain network, obtain and decrypt the encrypted data from the blockchain network, and obtain decrypted data; access the multiple computing nodes to obtain each sub-model, and then assemble the target neural network model; and encrypt the target data through the decrypted data and the synthesized target neural network model.

[0107] In this embodiment, the computer system 100 based on the neural network model can be applied to computer devices, including but not limited to smart phones, laptops, tablet computers, desktop computers, and devices connected to physical servers and cloud servers.

[0108] In the feature extraction module 101, the historical encryption data may be a plurality of sample data, each of which contains at least one encryption algorithm and at least one encryption key, and the sample data may be randomly extracted from the historical encryption database. These sample data may be used to analyze the historical encryption algorithm and encryption key, extract some data features or rules, and provide learning for the decision tree algorithm model.

[0109] In a preferred embodiment, the feature extraction module 101 obtains historical encryption data of several encryption algorithms and several encryption keys, and extracts data features from the historical encryption data, including:

[0110] The feature extraction module 101 randomly extracts a number of sample data from the historical encryption database, and each sample data contains at least one encryption algorithm and at least one encryption key.

[0111] The Apriori association rule algorithm is used to mine frequent item sets and association rules in the sample data based on preset support and confidence, and obtain the data features. Frequent item sets refer to item sets with a large number of occurrences, such as item sets with a number of occurrences greater than or equal to a preset number.

[0112] For example, 10,000 sample data can be randomly extracted from the historical encrypted database, and the above-mentioned Apriori association rule algorithm can be used to set the minimum support and minimum confidence, to mine the frequent item sets and association rules in the sample data, and to discover the key features of data leakage, such as the presence of sensitive keywords "ID number" and "bank card number" in the data content.

[0113] Among them, support can represent the frequency of occurrence of a certain item set in a data set, that is, the ratio of the number of times the item set appears in the data set to the total number of transactions. Support is used to measure the frequency of occurrence of a given item set and reflect the universality of the rule.

[0114] Confidence refers to the probability of an association rule appearing under certain conditions. Specifically, if an item set X appears, the probability that item set Y also appears is the confidence, which can reflect the credibility of the rule.

[0115] Support and confidence are usually used in association rule mining to discover the association between different item sets in a data set. This application mines frequent item sets and association rules in sample data through preset support and confidence to extract data features.

[0116] Furthermore, for a specific sample data extraction method, the feature extraction module 101 randomly extracts a number of sample data from the historical encryption database, including:

[0117] The feature extraction module 101 randomly arranges the sample data in the historical encryption database to obtain a sample sequence;

[0118] According to the order of the sample sequence, the sample sequence is divided into a plurality of sample sets (for example, n sample sets, each sample set is A1 to An in sequence); wherein the sample data in the same sample set adopts at least one same encryption algorithm;

[0119] Obtain the number of samples in each sample set and the first position number of the sample in the sample sequence (for example, the first position number of sample ai1 in the sequence is X(ai1)); extract a number of random samples from the sample set;

[0120] Traversing the target set, comparing the first position number of the random sample with a plurality of second position numbers (such as X(axy)) where the random sample is located in the target set;

[0121] When the first position number X (ai1) is less than the minimum value of the multiple second position numbers X (axy) (the random sample may appear multiple times in the target set, so the minimum value is used in this embodiment), the random sample is extracted; when the first position number X (ai1) is greater than or equal to the maximum value of the multiple second position numbers X (axy), the position of the random sample in the sample set is updated according to the sample quantity.

[0122] For the scenario of extracting m samples from a total of N samples, the sample extraction method of the prior art is mainly to directly extract without dividing into blocks. For each extraction, if the current sample is a new sample, the number of extraction results is increased by 1 and the next extraction is performed. If the current sample is the previously extracted sample, the number of extraction results remains unchanged and the next round of extraction is performed. In addition, since N>>m and the pseudo-randomness of the underlying computer causes the extraction collision number to not converge, the repetition rate of the extracted samples will be high. This embodiment solves the problem that the sample extraction method in the prior art is prone to taking a long time, thereby achieving the purpose of reducing the time consumption on the basis of reducing the repetition rate of the extracted samples. In addition, since the sample extraction method of this embodiment is sampling without replacement, this can reduce the number of sample extractions, further improve sampling efficiency, and reduce sampling time.

[0123] In a preferred embodiment, for the above-mentioned model building module 102, the model building module 102 builds a dynamic encryption and decryption model based on a decision tree algorithm based on the data features, including:

[0124] The model building module 102 selects several risk factors from the data features; the types of risk factors include but are not limited to data sensitivity, access frequency and user authority, etc.;

[0125] Based on the decision tree C5 algorithm, the risk factors are divided by information gain ratio, thereby recursively constructing a decision tree model;

[0126] According to the leaf nodes of the decision tree model and the risk factor combinations on the branch paths, a plurality of encryption and decryption mapping relationships output by the decision tree model are obtained;

[0127] Iteratively updating the decision tree model through the risk factor, and performing a ten-fold cross validation on the decision tree model during the iterative updating process, and adaptively adjusting the encryption strength and granularity of the data according to a number of encryption and decryption mapping relationships output by the decision tree model;

[0128] The updated encryption / decryption mapping relationship model is determined as the dynamic encryption / decryption model, and the accuracy of the obtained dynamic encryption / decryption model can reach more than 95%.

[0129] The output of the dynamic encryption and decryption model can be used to dynamically generate the mapping relationship between encryption and decryption, and further form a dynamic encryption and decryption scheme in subsequent steps. For example, for different data to be encrypted, after evaluating their risk factors, the encryption scheme is matched through regular expressions. For example, for data with a high security level, the AES-256 encryption algorithm is used, and the key length is 256 bits; for data with a medium security level, the AES-128 encryption algorithm is used, and the key length is 128 bits; for data with a low security level, the DES encryption algorithm is used, and the key length is 56 bits.

[0130] It should be noted that this implementation method is only a preliminary generation of an encryption scheme. However, in order to prevent attackers from obtaining the rules of the encryption algorithm by analyzing the encrypted data, it is necessary to further utilize the output of the dynamic encryption and decryption model to optimize the preset neural network model and obtain the target neural network model, thereby further increasing the complexity and unpredictability of the encryption method.

[0131] In a preferred embodiment, in order to achieve the security requirements of dynamic encryption, the preset neural network model may include five hidden layers, each hidden layer includes 128, 256, 512, 256 and 128 nodes respectively, and the preset neural network model adopts the ReLU activation function.

[0132] The optimization module 103 optimizes the preset neural network model through the output of the dynamic encryption and decryption model to obtain the target neural network model, including:

[0133] The optimization module 103 optimizes the preset neural network model based on the output of the dynamic encryption and decryption model and in combination with an adaptive genetic algorithm.

[0134] When the preset neural network model meets the preset convergence condition, the target neural network model is obtained.

[0135] Among them, the population size, evolutionary generations, crossover probability and mutation probability of the adaptive genetic algorithm can be set according to needs; the fitness function can be a weighted sum of the encryption strength and computational efficiency of the model.

[0136] Exemplarily, the crossover probability of the adaptive genetic algorithm is configured as:

[0137] ;

[0138] Among them, P c is the crossover probability, is the upper bound of the crossover probability, is the lower bound of the crossover probability, is the maximum fitness value in the population, f avg is the average fitness value in the population, c 0 is a preset constant.

[0139] The mutation probability configuration of the adaptive genetic algorithm is:

[0140] ;

[0141] Among them, P m is the mutation probability, is the upper bound of the mutation probability, is the lower bound of the mutation probability, f m is the fitness value of the mutant individual.

[0142] The configuration of the crossover probability and the mutation probability in this implementation mode has its value range further optimized, which can further meet the dynamic encryption requirements of this application.

[0143] In some preferred embodiments, after the storage module 104 splits the target neural network model into several sub-models, the storage module 104 encrypts the model parameters and structure information of each sub-model to obtain encrypted data, including:

[0144] The storage module 104 performs hierarchical aggregation conversion processing on the model parameters and structural information of each sub-model to obtain a vector sequence;

[0145] Reconstructing the vector sequence through a preset encoder Encoder and a decoder Decoder to obtain a reconstructed sequence and a reconstruction error; wherein the reconstruction error is less than a preset error threshold;

[0146] Analyzing the vector sequence, the reconstruction sequence and the reconstruction error to obtain a vector feature sequence;

[0147] The vector feature sequence is detected, and when no abnormal vector feature is detected, the reconstructed sequence is subjected to hierarchical aggregation inverse conversion processing to obtain encrypted data.

[0148] In this preferred embodiment, by analyzing the vector sequence, the reconstruction sequence and the reconstruction error, a vector feature sequence is obtained, and the vector feature sequence can be used to determine whether the sub-model has been tampered with and to trace the attacker; further, the vector feature sequence is detected, and when no abnormal vector feature is detected, it is determined that the sub-model has not been tampered with, and the reconstruction sequence is subjected to hierarchical aggregation inverse conversion processing to obtain encrypted data, which is stored in the blockchain network, thereby avoiding risks such as single point leakage while utilizing the tamper-proof characteristics of the blockchain.

[0149] In some preferred technical solutions, the target data encryption module 105 accesses the multiple computing nodes to obtain each sub-model, and then assembles the target neural network model, including:

[0150] The target data encryption module 105 accesses the multiple computing nodes according to a preset secure multi-party computing protocol to obtain each sub-model;

[0151] Through secret sharing technology, multi-threaded secure computing (or secure multi-party computing protocol) is implemented for each sub-model, and the initial neural network model is assembled based on the computing results;

[0152] A consensus mechanism is used to verify the integrity of the initial neural network model (for example, the SHA-256 secure hash algorithm is selected to calculate the hash value of the model's key path, and compared with a preset benchmark hash value. If the two are inconsistent (the hash value difference is greater than 5%), the model is determined to be tampered with). When the verification passes, the number of network layers and the size of the convolution kernel of the initial neural network model are dynamically adjusted to obtain a target neural network model that meets the requirements of the application scenario.

[0153] Preferably, the target data encryption module 105 assembles an initial neural network model based on the calculation results, including:

[0154] The target data encryption module 105 obtains the key parameter change trend of the calculation result through time series anomaly detection;

[0155] A preset model abnormal behavior feature library is queried to detect abnormal behavior patterns of the key parameter change trends, and when the detection passes (i.e., when no abnormal behavior patterns are detected), the calculation results are assembled into the initial neural network model.

[0156] Further, the target data encryption module 105 can access and obtain encrypted data from the blockchain network through a smart contract, and decrypt the encrypted data using the vector feature sequence (the vector feature sequence can be obtained from other channels outside the blockchain network and acts like a key) to obtain decrypted data.

[0157] Moreover, the target data encryption module 105 invokes the decrypted data and the synthesized target neural network model; inputs the target data to be encrypted into the synthesized target neural network model, and verifies the output result of the synthesized target neural network model through the decrypted data. When the verification passes, the encryption of the target data is achieved. The decrypted data can cooperate with the synthesized target neural network model to achieve complete and perfect encryption of the target data. The encryption method has characteristics such as high complexity, unpredictability, and difficulty in cracking. It is difficult for an attacker to analyze the encrypted data, learn the rules or laws of the encryption method, and the cracking difficulty is greatly improved.

[0158] Correspondingly, referring to Figure 2 , the present invention application also provides a data processing method based on a neural network model, including steps S201 to S205. Among them, each step is described in detail as follows:

[0159] Step S201, obtain historical encrypted data of a number of encryption algorithms and a number of encryption keys, and extract data features from the historical encrypted data;

[0160] Step S202, based on the data features, construct a dynamic encryption and decryption model based on the decision tree algorithm;

[0161] Step S203, optimize a preset neural network model through the output of the dynamic encryption and decryption model to obtain a target neural network model;

[0162] Step S204, split the target neural network model into a number of sub-models, encrypt the model parameters and structure information of each sub-model to obtain encrypted data, and store the encrypted data in the blockchain network; randomly store each sub-model on at least two of the computing nodes;

[0163] Step S205, obtain and respond to the target data to be encrypted, access the blockchain network, obtain and decrypt the encrypted data from the blockchain network to obtain decrypted data; access the multiple computing nodes to obtain each sub-model, and then assemble to obtain the target neural network model; and through the decrypted data and the synthesized target neural network model, achieve the encryption of the target data.

[0164] As a preferred solution, the constructing a dynamic encryption and decryption model based on the decision tree algorithm based on the data features includes:

[0165] Selecting a number of risk factors from the data features; the types of risk factors include data sensitivity, access frequency, and user authority;

[0166] Based on the decision tree C5 algorithm, the risk factors are divided by information gain ratio, thereby recursively constructing a decision tree model;

[0167] According to the leaf nodes of the decision tree model and the risk factor combinations on the branch paths, a plurality of encryption and decryption mapping relationships output by the decision tree model are obtained;

[0168] Iteratively updating the decision tree model through the risk factor, and performing a ten-fold cross validation on the decision tree model during the iterative updating process, and adaptively adjusting the encryption strength and granularity of the data according to a number of encryption and decryption mapping relationships output by the decision tree model;

[0169] The updated encryption / decryption mapping relationship model is determined as the dynamic encryption / decryption model.

[0170] As a preferred solution, the preset neural network model includes five hidden layers, each hidden layer includes 128, 256, 512, 256 and 128 nodes respectively, and the preset neural network model adopts a ReLU activation function.

[0171] As a preferred solution, the output of the dynamic encryption and decryption model is used to optimize the preset neural network model to obtain the target neural network model, including:

[0172] Based on the output of the dynamic encryption and decryption model, and in combination with an adaptive genetic algorithm, the preset neural network model is optimized;

[0173] When the preset neural network model meets the preset convergence condition, obtaining the target neural network model;

[0174] Wherein, the crossover probability configuration of the adaptive genetic algorithm is:

[0175] ;

[0176] Among them, P c is the crossover probability, is the upper bound of the crossover probability, is the lower bound of the crossover probability, is the maximum fitness value in the population, f avg is the average fitness value in the population, c 0 is a preset constant;

[0177] The mutation probability configuration of the adaptive genetic algorithm is:

[0178] ;

[0179] Among them, P m is the mutation probability, is the upper bound of the mutation probability, is the lower bound of the mutation probability, f m is the fitness value of the mutant individual.

[0180] As a preferred solution, accessing the multiple computing nodes to obtain each sub-model and then assembling the target neural network model includes:

[0181] According to a preset secure multi-party computing protocol, access the multiple computing nodes to obtain each sub-model;

[0182] Through secret sharing technology, multi-threaded secure calculations are implemented for each sub-model, and the initial neural network model is assembled based on the calculation results;

[0183] A consensus mechanism is used to verify the integrity of the initial neural network model. When the verification passes, the number of network layers and the size of the convolution kernel of the initial neural network model are dynamically adjusted to obtain the target neural network model.

[0184] As a preferred solution, the initial neural network model is assembled based on the calculation results, including:

[0185] By detecting anomalies in time series, the changing trends of key parameters of the calculation results are obtained;

[0186] A preset model abnormal behavior feature library is queried to detect abnormal behavior patterns of the key parameter change trends, and when the detection passes, the calculation results are assembled into the initial neural network model.

[0187] As a preferred solution, the method of encrypting the model parameters and structural information of each sub-model to obtain encrypted data includes:

[0188] Perform hierarchical aggregation transformation on the model parameters and structural information of each sub-model to obtain a vector sequence;

[0189] Reconstructing the vector sequence through a preset encoder and decoder to obtain a reconstructed sequence and a reconstruction error; the reconstruction error is less than a preset error threshold;

[0190] Analyzing the vector sequence, the reconstruction sequence and the reconstruction error to obtain a vector feature sequence;

[0191] The vector feature sequence is detected, and when no abnormal vector feature is detected, the reconstructed sequence is subjected to hierarchical aggregation inverse conversion processing to obtain encrypted data.

[0192] As a preferred solution, the step of obtaining and decrypting the encrypted data from the blockchain network to obtain the decrypted data includes:

[0193] The encrypted data is obtained from the blockchain network, and the encrypted data is decrypted using the vector feature sequence to obtain the decrypted data.

[0194] As a preferred solution, the step of obtaining historical encryption data of a plurality of encryption algorithms and a plurality of encryption keys, and extracting data features from the historical encryption data includes:

[0195] Randomly extract a number of sample data from the historical encryption database, each sample data contains at least one encryption algorithm and at least one encryption key;

[0196] The Apriori association rule algorithm is used to mine frequent item sets and association rules in the sample data based on preset support and confidence, so as to obtain the data features.

[0197] As a preferred solution, the method of randomly extracting a number of sample data from the historical encryption database includes:

[0198] Randomly arranging the sample data in the historical encryption database to obtain a sample sequence;

[0199] According to the order of the sample sequence, the sample sequence is divided into a plurality of sample sets; wherein the sample data in the same sample set adopt at least one same encryption algorithm;

[0200] Obtaining the number of samples in each sample set and the first position number of the sample in the sample sequence; extracting a number of random samples from the sample set;

[0201] Traversing the target set, comparing the first position number of the random sample with a plurality of second position numbers where the random sample is located in the target set;

[0202] When the first position number is less than the minimum value of the multiple second position numbers, the random sample is drawn; when the first position number is greater than or equal to the maximum value of the multiple second position numbers, the position of the random sample in the sample set is updated according to the sample quantity.

[0203] As a preferred solution, the encryption of the target data is achieved through the decrypted data and the synthesized target neural network model, including:

[0204] Calling the decrypted data and the synthesized target neural network model;

[0205] The target data to be encrypted is input into the synthesized target neural network model, and the output result of the synthesized target neural network model is verified by the decrypted data. When the verification passes, the encryption of the target data is realized.

[0206] Compared with the prior art, the present invention has the following beneficial effects:

[0207] The present invention application provides a computer system based on a neural network model, including a feature extraction module, a model construction module, an optimization module, a storage module, a target data encryption module and multiple computing nodes; wherein the feature extraction module is used to obtain historical encrypted data of several encryption algorithms and several encryption keys, and extract data features from the historical encrypted data; the model construction module is used to construct a dynamic encryption and decryption model based on a decision tree algorithm based on the data features; the optimization module is used to optimize the preset neural network model through the output of the dynamic encryption and decryption model to obtain a target neural network model; the storage module is used to split the target neural network model into several sub-models, encrypt the model parameters and structural information of each sub-model, obtain encrypted data, and store the encrypted data in a blockchain network; each sub-model is randomly stored on at least two of the computing nodes; the target data encryption module is used to obtain and respond to the target data to be encrypted, access the blockchain network, obtain and decrypt the encrypted data from the blockchain network, and obtain decrypted data; access the multiple computing nodes to obtain each sub-model, and then assemble the target neural network model; and encrypt the target data through the decrypted data and the synthesized target neural network model. The present invention application is implemented by extracting data features from historical encrypted data, constructing a dynamic encryption and decryption model based on a decision tree algorithm, obtaining a mapping relationship between encryption and decryption, and using the output of the dynamic encryption and decryption model to optimize the preset neural network model to obtain a target neural network model, so that the target neural network model can learn the mapping relationship between data encryption and decryption, and generate a highly complex and unpredictable encryption method for encrypting target data. The difficulty for attackers to obtain the rules of encrypted data is greatly increased, and the security risk of data can be effectively reduced; in addition, the present application splits the target neural network model into several sub-models, encrypts the model parameters and structural information of each sub-model, and stores the encrypted data in the blockchain network, and randomly stores each sub-model on at least two computing nodes, so that the information of the target neural network model is not easily obtained by attackers, and it is difficult to tamper with the target neural network model. When the target data needs to be encrypted, the target neural network model and its decrypted data are called again, which can further ensure the security of the target neural network model and the encryption method.

[0208] The specific embodiments described above further elaborate on the object, technical solution and beneficial effects of the present invention. It should be understood that the above description is only for the specific embodiments of the present invention and is not used to limit the protection scope of the present invention. In particular, for those skilled in the art, any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A computer system based on a neural network model, characterized in that: It includes a feature extraction module, a model building module, an optimization module, a storage module, a target data encryption module and multiple computing nodes; among them, The feature extraction module is used to obtain historical encryption data of several encryption algorithms and several encryption keys, and extract data features from the historical encryption data; The model building module is used to build a dynamic encryption and decryption model based on a decision tree algorithm based on the data features; The optimization module is used to optimize the preset neural network model through the output of the dynamic encryption and decryption model to obtain the target neural network model; The storage module is used to split the target neural network model into several sub-models, encrypt the model parameters and structural information of each sub-model, obtain encrypted data, and store the encrypted data in the blockchain network; and randomly store each sub-model on at least two of the computing nodes; The target data encryption module is used to obtain and respond to the target data to be encrypted, access the blockchain network, obtain and decrypt the encrypted data from the blockchain network, and obtain decrypted data; access the multiple computing nodes to obtain each sub-model, and then assemble the target neural network model; and encrypt the target data through the decrypted data and the synthesized target neural network model; The model building module builds a dynamic encryption and decryption model based on a decision tree algorithm based on the data features, including: The model building module selects a number of risk factors from the data features; the types of risk factors include data sensitivity, access frequency and user authority; Based on the decision tree C5 algorithm, the risk factors are divided by information gain ratio, thereby recursively constructing a decision tree model; According to the leaf nodes of the decision tree model and the risk factor combinations on the branch paths, a plurality of encryption and decryption mapping relationships output by the decision tree model are obtained; Iteratively updating the decision tree model through the risk factor, and performing a ten-fold cross validation on the decision tree model during the iterative updating process, and adaptively adjusting the encryption strength and granularity of the data according to a number of encryption and decryption mapping relationships output by the decision tree model; Determine the updated encryption / decryption mapping relationship model as the dynamic encryption / decryption model; The target data encryption module accesses the multiple computing nodes to obtain each sub-model, and then assembles the target neural network model, including: The target data encryption module accesses the multiple computing nodes according to a preset secure multi-party computing protocol to obtain each sub-model; Through secret sharing technology, multi-threaded secure calculations are implemented for each sub-model, and the initial neural network model is assembled based on the calculation results; A consensus mechanism is used to verify the integrity of the initial neural network model. When the verification passes, the number of network layers and the size of the convolution kernel of the initial neural network model are dynamically adjusted to obtain the target neural network model.

2. A computer system based on a neural network model as claimed in claim 1, characterized in that: The preset neural network model includes five hidden layers, each hidden layer includes 128, 256, 512, 256 and 128 nodes respectively, and the preset neural network model adopts the ReLU activation function.

3. A computer system based on a neural network model as claimed in claim 2, characterized in that: The optimization module optimizes the preset neural network model through the output of the dynamic encryption and decryption model to obtain the target neural network model, including: The optimization module optimizes the preset neural network model based on the output of the dynamic encryption and decryption model and in combination with an adaptive genetic algorithm; When the preset neural network model meets the preset convergence condition, obtaining the target neural network model; Wherein, the crossover probability configuration of the adaptive genetic algorithm is: ; Among them, P c is the crossover probability, is the upper bound of the crossover probability, is the lower bound of the crossover probability, f max is the maximum fitness value in the population, f avg is the average fitness value in the population, c0 is a preset constant; The mutation probability configuration of the adaptive genetic algorithm is: ; Among them, P m is the mutation probability, is the upper bound of the mutation probability, is the lower bound of the mutation probability, f m is the fitness value of the mutant individual.

4. A computer system based on a neural network model as claimed in claim 3, characterized in that: The target data encryption module assembles an initial neural network model based on the calculation results, including: The target data encryption module obtains the key parameter change trend of the calculation result through time series anomaly detection; A preset model abnormal behavior feature library is queried to detect abnormal behavior patterns of the key parameter change trends, and when the detection passes, the calculation results are assembled into the initial neural network model.

5. A computer system based on a neural network model as claimed in claim 1, characterized in that: The storage module encrypts the model parameters and structure information of each sub-model to obtain encrypted data, including: The storage module performs hierarchical aggregation conversion processing on the model parameters and structural information of each sub-model to obtain a vector sequence; Reconstructing the vector sequence through a preset encoder and decoder to obtain a reconstructed sequence and a reconstruction error; the reconstruction error is less than a preset error threshold; Analyzing the vector sequence, the reconstruction sequence and the reconstruction error to obtain a vector feature sequence; The vector feature sequence is detected, and when no abnormal vector feature is detected, the reconstructed sequence is subjected to layered aggregation inverse conversion processing to obtain encrypted data.

6. A computer system based on a neural network model as claimed in claim 5, characterized in that: The target data encryption module obtains and decrypts the encrypted data from the blockchain network to obtain decrypted data, including: The target data encryption module obtains encrypted data from the blockchain network, decrypts the encrypted data using the vector feature sequence, and obtains decrypted data.

7. A computer system based on a neural network model as claimed in claim 1, characterized in that: The feature extraction module obtains historical encryption data of several encryption algorithms and several encryption keys, and extracts data features from the historical encryption data, including: The feature extraction module randomly extracts a number of sample data from the historical encryption database, each sample data including at least one encryption algorithm and at least one encryption key; The Apriori association rule algorithm is used to mine frequent item sets and association rules in the sample data based on preset support and confidence, so as to obtain the data features.

8. A computer system based on a neural network model as claimed in claim 1, characterized in that: The target data encryption module implements encryption of the target data through the decrypted data and the synthesized target neural network model, including: The target data encryption module calls the decrypted data and the synthesized target neural network model; The target data to be encrypted is input into the synthesized target neural network model, and the output result of the synthesized target neural network model is verified by the decrypted data. When the verification passes, the encryption of the target data is realized.

Citation Information

Patent Citations

  • Decision tree model training method and device based on block chain and homomorphic encryption

    CN111966753A

  • Data processing method and device, and electronic apparatus

    WO2021000561A1