Data security verification method and device based on zero-knowledge proof
By optimizing the zero-knowledge proof process by combining deep learning algorithms, building a deep learning model for prediction, and using the blockchain network for distributed verification, we solve the problems of low data security verification efficiency and low intelligence in the existing technology, and achieve Efficient and intelligent data security verification.
Patent Information
- Application Number
- CN202411323937.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-09-23
AI Technical Summary
The existing data security verification methods are not efficient and have low intelligence.
By combining deep learning algorithms to optimize the process of zero knowledge proof, build a deep learning model for prediction, use the zero -knowledge certification algorithm encryption signature, and use the blockchain network to provide distributed verification.
It improves the efficiency, intelligence and accuracy of data security verification and realizes the distributed verification process.
Smart Images

Figure CN118869354B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a data security verification method and device based on zero-knowledge proof. Background Art
[0002] Zero-knowledge proof (ZKP) is a technology widely used in cryptography fields such as multi-party cloud computing, data encryption, and digital signatures. The main purpose of ZKP is to prove the fact that "the prover holds secret data" without leaking any information related to the secret data. The ZKP-based verification process in the relevant technology includes: the proving device selects a random number r from it, and calculates at least one witness based on r and sends it to the verification device; the verification device selects a challenge c with a length of L bits and sends it to the proving device; the proving device calculates the response s based on r, secret data x and c using a one-dimensional polynomial about x, and sends s to the verification device; the verification device finally completes the verification work based on s.
[0003] The existing data security verification methods have low verification efficiency and low intelligence level. Summary of the invention
[0004] Based on the above problems, the present invention proposes a data security verification method and device based on zero-knowledge proof. The method of optimizing the zero-knowledge proof process in combination with a deep learning algorithm provided by the solution of the present invention realizes a distributed verification process and improves the verification efficiency, intelligence and accuracy.
[0005] In view of this, one aspect of the present invention proposes a data security verification method based on zero-knowledge proof, comprising:
[0006] Build the first proof problem database to record the proof problem data such as problem description, parameters, and results;
[0007] Annotating the first proof question library and extracting question features as first reference samples for neural network training;
[0008] Designing a first deep learning model suitable for proof problems based on the first proof problem library;
[0009] Collecting real proof samples according to the first reference samples, and using the real proof samples to train the first deep learning model to obtain a second deep learning model;
[0010] Determine a first device corresponding to the problem to be verified, and verify the security status of the first device to obtain a security verification result;
[0011] When the security verification result meets the preset conditions, extracting the feature of the problem to be verified from the problem to be verified and inputting the feature of the problem to be verified into the second deep learning model, and the second deep learning model performs prediction and outputs a prediction result;
[0012] Using a zero-knowledge proof algorithm to encrypt and sign the prediction result;
[0013] Upload the signature to the participating nodes of the blockchain network for distributed verification;
[0014] The blockchain network participating nodes use public information to replay the predicted calculation to gradually verify the signature;
[0015] The nodes participating in the blockchain network reach a consensus through voting and output the verification result of the signature;
[0016] Compare the actual operation results to verify the error statistics, and iteratively optimize the second deep learning model according to the statistical results;
[0017] The first proof question library and the second deep learning model are regularly adjusted to improve prediction accuracy and system performance.
[0018] Optionally, the step of constructing a first proof problem library and recording proof problem data such as problem description, parameters, and results includes:
[0019] Identify the type of evidence needed to support it;
[0020] Build representations that support various types of proofs;
[0021] Collect case information that specifically proves the case;
[0022] Label different types of proof cases and establish type-label correspondence;
[0023] For each proof case, extract the characteristic items;
[0024] Organize case information, labels and feature items in a structured manner and store them in the database to support query;
[0025] After processing the incoming data, statistical analysis is performed on the database structure and content to obtain the overall distribution pattern;
[0026] Find edge data points and store them in the database to enrich the boundary of the sample space;
[0027] Establish a mapping relationship between the question bank and the learning samples;
[0028] Check the database structure and content to ensure data quality and integrity.
[0029] Optionally, the step of designing a first deep learning model suitable for proof problems according to the first proof problem library includes:
[0030] Performing problem feature statistics on the first proof problem database, and selecting a suitable deep learning model structure based on the problem feature statistical data;
[0031] Determine the number of neurons in each layer according to the selected deep learning model structure and set the network width based on the problem size;
[0032] Choose the corresponding activation function to improve the expressiveness;
[0033] Train model parameters using optimization algorithms;
[0034] Add regularization to prevent overfitting;
[0035] Collect necessary statistical indicators to evaluate the effectiveness of the initial model;
[0036] Optimize network structure or algorithm to achieve improvement based on evaluation results;
[0037] Combine new samples to optimize and improve model performance.
[0038] Optionally, the step of collecting a real proof sample according to the first reference sample, and using the real proof sample to train the first deep learning model to obtain the second deep learning model includes:
[0039] According to the problem space scope of the first reference sample, expand and collect more real samples;
[0040] Assigning labels and extracting features to the new sample, unifying the format with the first reference sample, and obtaining the authenticity proof sample;
[0041] Using the real proof samples to train the first deep learning model, increasing the number of training iterations and batches, and continuously optimizing the model weights;
[0042] Monitor the accuracy and loss curves to select the best model as the second deep learning model;
[0043] Test the effect of the second deep learning model on the first reference sample, and adjust the second deep learning model according to the test effect.
[0044] Optionally, the step of determining a first device corresponding to the problem to be verified, and verifying the security status of the first device to obtain a security verification result includes:
[0045] Collecting information related to the first device as features, and selecting device security-sensitive parameters as verification objects;
[0046] The first device uses a preset private key to digitally sign the parameters to generate a certificate;
[0047] Upload the proof to the blockchain network for storage;
[0048] Multiple verification nodes perform distributed multi-point confirmation through a zero-knowledge proof algorithm to verify the validity of the signature;
[0049] Record the security verification results on the chain that cannot be tampered with.
[0050] Optionally, when the security verification result meets a preset condition, extracting features of the problem to be verified from the problem to be verified and inputting the features of the problem to be verified into the second deep learning model, and the second deep learning model predicts and outputs a prediction result, the step includes:
[0051] Extract relevant features of the problem to be verified, convert the relevant features into a numerical form that can be recognized by the network, and obtain the features of the problem to be verified;
[0052] Inputting the problem feature to be verified into the optimized second deep learning model;
[0053] The second deep learning model performs forward propagation calculations to obtain prediction results, which are compared with the actual results to statistically analyze the prediction accuracy.
[0054] Optionally, the step of using a zero-knowledge proof algorithm to encrypt and sign the prediction result includes:
[0055] Define a public-private key pair for encrypting prediction results;
[0056] Encode the prediction results using the selected zero-knowledge proof algorithm;
[0057] Perform a hash operation on the prediction result to obtain a first signature of a fixed length;
[0058] digitally signing the first signature using the private key;
[0059] The digital signature content includes the prediction result and the random number.
[0060] Optionally, the blockchain network participating nodes use public information to replay the predicted calculation to gradually verify the signature, including:
[0061] The blockchain network participating nodes obtain the prediction result signature and random number;
[0062] Perform simulation calculations based on a preset prediction model;
[0063] Use random numbers to update the calculation and gradually restore the original prediction results;
[0064] Hash the prediction result and compare it with the signature for verification;
[0065] Different nodes perform distributed multi-point repeated verification;
[0066] Record the intermediate state information generated in each step of the calculation;
[0067] Ultimately, a tamper-proof verification record chain is formed.
[0068] Optionally, the blockchain network participating nodes reach a consensus through voting and output a verification result of the signature, including:
[0069] Each blockchain network participating node generates a vote based on its own verification calculation results;
[0070] The voting results will be recorded and archived in an unalterable manner;
[0071] Count all node votes, and if there is a clear majority, that’s the result;
[0072] If there is no clear majority, a multi-round voting process of demotion is initiated;
[0073] Constantly adjust the elimination criteria, re-count and re-vote;
[0074] Until more than half of the nodes support a result.
[0075] Another aspect of the present invention provides a data security verification device based on zero-knowledge proof, comprising: an acquisition module, a control processing module and an output module;
[0076] The control processing module is configured as follows:
[0077] Build the first proof problem database to record the proof problem data such as problem description, parameters, and results;
[0078] Annotating the first proof question library and extracting question features as first reference samples for neural network training;
[0079] Designing a first deep learning model suitable for proof problems based on the first proof problem library;
[0080] Collecting real proof samples according to the first reference samples, and using the real proof samples to train the first deep learning model to obtain a second deep learning model;
[0081] Determine a first device corresponding to the problem to be verified, and verify the security status of the first device to obtain a security verification result;
[0082] When the security verification result meets the preset conditions, extracting the feature of the problem to be verified from the problem to be verified and inputting the feature of the problem to be verified into the second deep learning model, and the second deep learning model performs prediction and outputs a prediction result;
[0083] Using a zero-knowledge proof algorithm to encrypt and sign the prediction result;
[0084] Upload the signature to the participating nodes of the blockchain network for distributed verification;
[0085] The blockchain network participating nodes use public information to replay the predicted calculation to gradually verify the signature;
[0086] The nodes participating in the blockchain network reach a consensus through voting and output the verification result of the signature;
[0087] Compare the actual operation results to verify the error statistics, and iteratively optimize the second deep learning model according to the statistical results;
[0088] The first proof question library and the second deep learning model are regularly adjusted to improve prediction accuracy and system performance.
[0089] According to the technical solution of the present invention, a data security verification method based on zero-knowledge proof includes: constructing a first proof problem library to record proof problem data such as problem description, parameters, and results; annotating the first proof problem library and extracting problem features as a first reference sample for neural network training; designing a first deep learning model suitable for proof problems based on the first proof problem library; collecting real proof samples based on the first reference samples, and using the real proof samples to train the first deep learning model to obtain a second deep learning model; determining a first device corresponding to the problem to be verified, and verifying the security status of the first device to obtain a security verification result; and when the security verification result meets the preset conditions, extracting the first deep learning model from the problem to be verified. The proof problem extracts the features of the problem to be verified and inputs the features of the problem to be verified into the second deep learning model, and the second deep learning model predicts and outputs the prediction results; the prediction results are encrypted and signed using the zero-knowledge proof algorithm; the signature is uploaded to the blockchain network participating nodes for distributed verification; the blockchain network participating nodes use public information to replay the prediction calculation to gradually verify the signature; the blockchain network participating nodes reach a consensus through voting and output the verification results of the signature; the verification error statistics are compared with the actual operation results, and the second deep learning model is iteratively optimized according to the statistical results; the first proof problem library and the second deep learning model are regularly adjusted to improve the prediction accuracy and system performance. The method of optimizing the zero-knowledge proof process in combination with the deep learning algorithm provided by the scheme of the present invention realizes a distributed verification process and improves the verification efficiency, intelligence and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0090] Figure 1 is a flow chart of a data security verification method based on zero-knowledge proof provided by an embodiment of the present invention;
[0091] Figure 2 It is a schematic block diagram of a data security verification device based on zero-knowledge proof provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0092] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0093] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.
[0094] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0095] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0096] Refer to the following Figure 1 to Figure 2 To describe the data security verification method and device based on zero-knowledge proof provided according to some embodiments of the present invention.
[0097] like Figure 1 As shown, an embodiment of the present invention provides a data security verification method based on zero-knowledge proof, including:
[0098] Build the first proof problem database to record the proof problem data such as problem description, parameters, and results;
[0099] Annotating the first proof question library and extracting question features as first reference samples for neural network training;
[0100] In this step, a labeling system is designed according to the type of question to classify and label the questions, extract the feature items of the questions, such as the number of variables, logical depth and other quantitative attributes; perform numerical / discretization preprocessing on the feature items; record the detailed description of the question as the text input of the feature vector; collect the relevant parameters of the question as the conditional feature input; save the question, label and feature records in the structured sample set; analyze the spatial distribution of the question, collect marginal samples; normalize, clean and enhance the initial samples; clearly correspond the labeled samples with the features as the network input. Through this step, the neural network is provided with preliminary effective training reference samples, forming the basis for the mapping relationship between the problem features and the labels, realizing the early preprocessing support for the problem machine recognition, and laying the groundwork for further optimization of the network. This step achieves the purpose of providing the first batch of high-quality training samples for deep learning and lays the foundation for network learning.
[0101] According to the first proof problem library, design a first deep learning model (including network structure and algorithm, etc.) suitable for the proof problem;
[0102] Collecting real proof samples according to the first reference samples, and using the real proof samples to train the first deep learning model to obtain a second deep learning model;
[0103] Determine a first device corresponding to the problem to be verified, and verify the security status of the first device to obtain a security verification result;
[0104] When the security verification result meets the preset conditions, extracting the feature of the problem to be verified from the problem to be verified and inputting the feature of the problem to be verified into the second deep learning model, and the second deep learning model performs prediction and outputs a prediction result;
[0105] Using a zero-knowledge proof algorithm to encrypt and sign the prediction result;
[0106] Upload the signature to the participating nodes of the blockchain network for distributed verification;
[0107] The blockchain network participating nodes use public information to replay the predicted calculation to gradually verify the signature;
[0108] The nodes participating in the blockchain network reach a consensus through voting and output the verification result of the signature;
[0109] Compare the actual operation results to verify the error statistics, and iteratively optimize the second deep learning model according to the statistical results;
[0110] In this step, for those problem samples that have obtained actual running results, compare the prediction results of the second deep learning model on these problems; count the number of samples that the model predicts correctly and incorrectly, calculate the prediction accuracy and other error metrics; analyze the characteristics of the error samples, and try to locate the bottleneck of the model's prediction ability; according to the error statistics, such as misidentified patterns, sample blank areas, etc., retrain the model: increase the number of relevant error samples, modify the model structure to increase expressiveness, optimize model parameters to improve generalization ability, etc.; re-execute the training-prediction cycle on some data to evaluate the improvement effect; continuously iterate this process to gradually improve the prediction accuracy of the deep learning model. This step uses real scene feedback information to quantitatively diagnose model problems in order to achieve true agent optimization.
[0111] The first proof question library and the second deep learning model are regularly adjusted to improve prediction accuracy and system performance.
[0112] In this step, new real cases can be collected regularly and integrated with the first proof problem library to enrich the library content; the problem feature extraction method can be continuously improved to extract richer input information; the classification system can be adjusted to optimize the library structure according to the actual problem trends and difficulties; the edge of the model recognition ability can be evaluated through error analysis, and difficult samples can be added for retraining; the degree of model parameterization can be optimized according to computing power and storage limitations; multimedia or relaxation methods can be reasonably used to enhance the representation ability; and precision and efficiency can be balanced through methods such as hybrid precision training. The purpose is to dynamically upgrade the training samples and the model itself: improve the prediction performance to meet the problem changes, optimize the speed and resource usage to improve the feasibility of deployment, and realize the continuous adaptation and development of the intelligent body.
[0113] By adopting the technical solution of this embodiment and combining the method of optimizing the zero-knowledge proof process with a deep learning algorithm, a distributed verification process is implemented, thereby improving verification efficiency, intelligence and accuracy.
[0114] In some possible implementations of the present invention, the step of constructing a first proof problem library and recording proof problem data such as problem description, parameters, and results includes:
[0115] Identify the types of proofs that need to be supported (e.g., Boolean procedures, spherical fields, etc.);
[0116] Build representations that support various types of proofs (e.g., using CNF literal representations for Boolean programs);
[0117] Collect case information for specific proof cases (such as input parameters, expected output results, etc.);
[0118] Label different types of proof cases and establish type-label correspondence;
[0119] For each proof case, extract the characteristic items (such as the number of variables, operation depth, etc.);
[0120] Organize case information, labels and feature items in a structured manner and store them in the database to support query;
[0121] After processing the incoming data (such as discretizing continuous features, filling missing values, etc.), statistical analysis is performed on the database structure and content to obtain the overall distribution law;
[0122] Find edge data points and store them in the database to enrich the boundary of the sample space;
[0123] In this step, the distribution of data points in the current sample library is analyzed to identify the concentrated area of the data set; edge data points of the sample library are collected, that is, samples that are far away from the concentrated area; these edge data points are usually at the boundary or transition area of the sample space, for example, the edge samples of the classification problem may contain mixed features of two categories; adding these edge data points can expand the scope and dimension of the sample space; when learning these special samples, the model needs to have a deep understanding of the sample attribute relationship, so as to enhance the model's reasoning and generalization capabilities in edge and abnormal situations. Effectively identifying and injecting edge data is an important measure to improve the robustness of the model. This step eliminates the uncertainty of the sample space boundary by enriching the edge data, which is conducive to improving the quality of the model.
[0124] Establish a mapping relationship between the question bank and the learning samples;
[0125] Check the database structure and content to ensure data quality and integrity.
[0126] In this embodiment, a rich question library foundation that supports deep learning can be effectively constructed.
[0127] In some possible implementations of the present invention, the step of extracting characteristic items from each proof case includes:
[0128] Number of variables: The total number of variables in the statistical problem reflects the scale of the problem.
[0129] Logic depth: Topologically sort Boolean circuits and calculate the maximum path length.
[0130] Number of items: For CNF format, count the number of combined items (clauses).
[0131] Item length: For each composite item, count the number of atomic literals it contains.
[0132] Non-monotonicity: Counting the number of NOT gates in a circuit reflects the difficulty of the problem.
[0133] Data structures: Mathematical / data structures used in annotation problems, such as graphs, matrices, etc.
[0134] Algorithm classification: mark the main algorithms involved, such as sorting, FFT, etc.
[0135] Parameter statistics: For problems with parameters, extract the statistical characteristics of the parameters.
[0136] Spatial features: Extract the topological features of the spatial objects involved.
[0137] Time characteristics: If it is a dynamic problem, extract the characteristics of the time change law.
[0138] Other professional features: Extract proprietary features based on specific problem domains, such as biological sequence features.
[0139] Through the above method provided in this embodiment, the problem can be systematically and comprehensively characterized from multiple dimensions, providing rich input for subsequent modeling.
[0140] In some possible implementations of the present invention, the step of designing a first deep learning model suitable for proof problems according to the first proof problem library includes:
[0141] Perform problem feature statistics on the first proof problem database, and select a suitable deep learning model structure (such as MLP, CNN, etc.) based on the problem feature statistics;
[0142] In this step, the problems contained in the first proof problem library are carefully counted, and the specific characteristics of the problems are analyzed, such as: problem type (classification, regression, etc.), data structure (series, images, etc.), feature dimension and scale, etc.; according to the statistical results of the problem characteristics, the appropriate deep learning model architecture is selected: if the problem is mainly sequence or time series data, the RNN / LSTM model can be considered; if the problem involves input as image or graphic data, CNN or Graph network models will be more suitable; for conventional classification or regression tasks, MLP may be a good first choice; combined with the problem scale and computing resources, the model is refined, such as adding attention mechanism, etc.; a deep learning model that can fully mine the problem feature information while considering efficiency is selected as the basic model; model selection can accurately match the problem PROFILE, which is conducive to improving the prediction effect; the purpose is to select the most suitable model framework through statistical analysis and customize solutions for the problem.
[0143] Determine the number of neurons in each layer according to the selected deep learning model structure and set the network width based on the problem size;
[0144] Choose the corresponding activation function (ReLU, etc.) to improve expressiveness;
[0145] Use optimization algorithms such as Adam to train model parameters;
[0146] Add regularization methods (such as Dropout, etc.) to prevent overfitting;
[0147] Collect necessary statistical indicators to evaluate the initial model effect (such as accuracy, loss, etc.);
[0148] In this step, after the deep learning model is trained in the early stage, a quick evaluation of the model's performance is required; the collection of necessary statistical indicators mentioned here refers to some common basic indicators for evaluating the model's effect. For example, for classification problems, the accuracy can be statistically analyzed as an indicator that directly represents the correctness of the model output; for regression problems, the loss function value (such as MSE, MAE, etc.) can be recorded to represent the prediction error; other indicators such as recall rate and F1 score can also be collected for multi-faceted evaluation; these basic indicators can quickly reflect the performance level of the model on the initial training data set; by comparing the theoretically achievable standards, it is evaluated whether the model has basically learned normally and whether subsequent optimization is required, providing a reference for the subsequent decision on whether to continue training or parameter adjustment. The purpose is to make an efficient and convenient performance estimate of the initial model.
[0149] Optimize network structure or algorithm to achieve improvement based on evaluation results;
[0150] Combine new samples to optimize and improve model performance.
[0151] Through this embodiment scheme, a deep learning model based on the question library is preliminarily realized, and a certain recognition accuracy is achieved for specific proof problems. This step designs the first generation model to provide a basis for subsequent continuous optimization.
[0152] In some possible implementations of the present invention, the step of collecting a real proof sample according to the first reference sample, and using the real proof sample to train the first deep learning model to obtain a second deep learning model includes:
[0153] According to the problem space scope of the first reference sample, expand and collect more real samples;
[0154] In this step, based on the scope of problems and feature space distribution that are currently included in the first reference sample library; evaluate the types of problems and feature combinations currently covered by the sample library; determine whether there are certain problem space areas that are not covered by the sample library; actively collect more real samples for these potential blank areas, such as looking for more complex features or edge cases to make up for the shortcomings of the current sample library; and collect some unprecedented new problems based on actual business needs. The purpose is to expand and enrich the scope and dimensions of the current problem space, fully collect marginal and advanced samples, so that the samples better represent real application scenarios; using the expanded samples, the model's reasoning ability in new problem areas can be improved. This step is committed to improving the sample size and representativeness, and is a very important part of ensuring the generalization of the model.
[0155] Assigning labels and extracting features to the new sample, unifying the format with the first reference sample, and obtaining the authenticity proof sample;
[0156] Using the real proof samples to train the first deep learning model, increasing the number of training iterations and batches, and continuously optimizing the model weights;
[0157] Monitor the accuracy and loss curves to select the best model as the second deep learning model;
[0158] Test the effect of the second deep learning model on the first reference sample, and adjust the second deep learning model according to the test effect.
[0159] Through the solution of this embodiment, a deep model trained with a large amount of real data is obtained, and the recognition ability of the second deep learning model is improved compared with the first deep learning model, which realizes the gradual verification and optimization under real cases and provides a reliable baseline model for subsequent work. Through iterative learning, the samples are continuously improved and the model recognition ability is improved.
[0160] In some possible implementations of the present invention, the step of determining a first device corresponding to the problem to be verified, and verifying the security status of the first device to obtain a security verification result includes:
[0161] Collecting information related to the first device as features (such as model, version, etc.), and selecting device security-sensitive parameters as verification objects (such as configuration, operating status, etc.);
[0162] The first device uses a preset private key to digitally sign the parameters to generate a certificate;
[0163] Upload the proof to the blockchain network for storage;
[0164] Multiple verification nodes perform distributed multi-point confirmation through a zero-knowledge proof algorithm to verify the validity of the signature;
[0165] Record the security verification results on the chain that cannot be tampered with.
[0166] In this embodiment, real-time detection of the device security status can be achieved, the feasibility and efficiency of the distributed verification mechanism can be verified, the foundation for the subsequent expansion of device trusted management can be laid, the application prospects in the IoT device security scenario can be verified, and experience can be collected to further optimize the verification process. This step begins to realize the actual verification of the device security state and test the proposed technical route.
[0167] In this embodiment, the private key is retained in the first device, and a random number is generated for signing (this can prevent the private key from being leaked); each verification request is accompanied by a new random number to reduce the risk of replay attacks; the verification information carries a timestamp, and only requests within the recent period are accepted to prevent old data from being used; the device itself adopts anti-tampering technology, and the hardware configuration is checked during the verification process to identify whether it has been tampered with; the device life cycle management is added, and the device key is updated and rotated regularly; combined with identity identification elements, such as physical identification codes, to further enhance the individual differences of the device; lightweight zero-knowledge proof technology is adopted, which is suitable for IoT scenarios with limited resources; the results are verified at multiple points, and a central node does not make the final decision, and the results are verified by many nodes in a coordinated manner; the integrity and non-repudiation of the data transmission process also need to be guaranteed to avoid intermediate tampering; the device APIs interface is opened for audit and debugging by relevant parties, and timely patches are made when security vulnerabilities are found. In this embodiment, the reliability and credibility of IoT device security verification can be effectively improved through the coordinated use of the above technologies.
[0168] In some possible implementations of the present invention, when the security verification result meets the preset conditions, extracting the feature of the problem to be verified from the problem to be verified and inputting the feature of the problem to be verified into the second deep learning model, and the second deep learning model predicts and outputs the prediction result, the step includes:
[0169] Extract relevant features of the problem to be verified (such as the number of variables, logical structure, etc.), convert the relevant features into a numerical form that can be recognized by the network, and obtain the features of the problem to be verified;
[0170] Inputting the problem feature to be verified into the optimized second deep learning model;
[0171] The second deep learning model performs forward propagation calculations to obtain prediction results, which are compared with the actual results to statistically analyze the prediction accuracy.
[0172] In this example, we test whether the feature extraction and prediction model can match the problem, demonstrate the model recognition ability after multiple rounds of training, and determine whether the model can adapt to the new sample size, providing basic and reliable technical support for the problem recognition task, and accumulating experience for the next step of improving the recognition effect. This example realizes the real application of the problem to the learned deep model for prediction, verifying the feasibility of the overall process.
[0173] In some possible implementations of the present invention, the step of extracting relevant features of the problem to be verified includes:
[0174] Variable statistics: basic information such as the number of variables and variable types involved in the statistical problem;
[0175] Logical depth statistics: The maximum path length is counted through topological sorting to reflect the logical depth of the problem;
[0176] Item Statistics: Perform frequency statistics on Boolean circuits or CNF representations to extract features such as the number of clauses;
[0177] Data structure feature extraction: whether the labeling problem involves professional data structures such as graphs and matrices;
[0178] Algorithm classification features: whether the labeling problem involves common algorithm fields such as sorting and hashing;
[0179] Parameter statistics: For problems with parameters, statistical parameter value range, average value and other information;
[0180] Text feature extraction: Perform NLP processing such as word frequency statistics and topic model analysis on the problem description;
[0181] Spatial feature extraction: geometric size and topological feature analysis of problems involving space or space-time;
[0182] Matrix feature extraction: Matrix feature statistics such as rank and non-zero element distribution for matrix problems;
[0183] Dynamic time feature extraction: Extract statistical laws of time series data for dynamic problems.
[0184] This embodiment scheme can systematically and comprehensively extract multiple features, providing rich input information for deep learning.
[0185] In some possible implementations of the present invention, the step of using a zero-knowledge proof algorithm to encrypt and sign the prediction result includes:
[0186] Define a public-private key pair for encrypting prediction results;
[0187] Encode the prediction results using the selected zero-knowledge proof algorithm;
[0188] In this step, when selecting a zero-knowledge proof algorithm to sign the prediction results, the following points need to be considered: computational efficiency (the algorithm should have low computational overhead for frequent signatures of prediction results), security (the algorithm should not rely on randomness assumptions and provide strong security guarantees), storage requirements (the proof size determines the transmission and archiving costs), device capabilities (select an appropriate algorithm considering the computing power of the device), scalability (the algorithm should support online dynamic expansion capabilities), development level (selecting an algorithm that is actively being developed to facilitate maintenance), etc.; based on the above conditions, a zero-knowledge proof algorithm with high computational efficiency, no reliance on randomness, small proof size, low storage overhead, support for online expansion capabilities, and leading algorithm development level can be selected. To encode the prediction results, the following steps can be taken: define the numerical representation of the prediction results, such as the result of a sentence classification problem can be represented by an integer; perform fixed-length hashing on the results, and convert the variable-length results into a fixed-length binary string through a hash function; use homomorphic encryption to encrypt the hash results, such as using Paillier encryption to generate an encrypted representation of the prediction results; based on the public reference string of zero-knowledge proof, define a public space to support incremental proof updates; use polynomial interpolation to encode the prediction results, and embed the results into polynomial coefficients for derivation and encoding; extract common subformulas for synthesis, and extract common terms to form a proof of cumulative structure; compress and optimize the encoded proof, and finally output a highly efficient encoded expression of the prediction results; the above steps convert the prediction results into an abstract encoded representation that is convenient for zero-knowledge verification.
[0189] Perform a hash operation on the prediction result to obtain a first signature of a fixed length;
[0190] In this step, when selecting a hash function to process the prediction results, the following points need to be considered: hash length (the number of bits required to represent the result should be considered, and a fixed-length hash value that meets the requirements should be selected), performance (if frequent calculations are required, a hash algorithm with high computational efficiency should be selected), conflict rate (hash conflicts may affect the results, so an algorithm with a low conflict rate should be selected), attack difficulty (to be able to resist current mainstream attacks, a function with a higher security level should be selected), hardware support (select an algorithm that the target device can directly support to reduce computing overhead), degree of standardization (select an internationally commonly used algorithm with a high degree of standardization), etc.
[0191] digitally signing the first signature using the private key;
[0192] The digital signature content includes the prediction result and random number (the signature will prevent third parties from obtaining the prediction details and can only verify the legitimacy).
[0193] Through the scheme of this embodiment, the secure encrypted transmission and archiving of the prediction results can be achieved, the leakage of the prediction content during the transmission process can be prevented, the prediction results are digitally signed and verified, the technical foundation is laid for subsequent distributed verification, and the proprietary knowledge of the deep learning model holder is protected. This scheme begins to sign the prediction results to provide security for subsequent work.
[0194] In some possible implementations of the present invention, the blockchain network participating nodes use public information to replay the predicted calculation to gradually verify the signature, including:
[0195] The blockchain network participating nodes obtain the prediction result signature and random number;
[0196] Perform simulation calculations based on a preset prediction model;
[0197] Use random numbers to update the calculation and gradually restore the original prediction results;
[0198] Hash the prediction result and compare it with the signature for verification;
[0199] Different nodes perform distributed multi-point repeated verification;
[0200] Record the intermediate state information generated in each step of the calculation;
[0201] Ultimately, a tamper-proof verification record chain is formed.
[0202] The solution of this embodiment realizes distributed third-party verification of prediction results, improves the transparency and credibility of the verification process, eliminates single-point trust problems through multi-node verification, provides strong and reliable technical support for prediction services, and provides record support for post-auditing and tracing. The solution of this embodiment realizes a public and private distributed verification mode for prediction results.
[0203] In some possible implementations of the present invention, the blockchain network participating nodes reach a consensus through voting and output a verification result of the signature, including:
[0204] Each blockchain network participating node generates a vote based on its own verification calculation results;
[0205] The voting results will be recorded and archived in an unalterable manner;
[0206] Count all node votes, and if there is a clear majority, that’s the result;
[0207] If there is no clear majority, a multi-round voting process of demotion is initiated;
[0208] Constantly adjust the elimination criteria, re-count and re-vote;
[0209] Until more than half of the nodes support a result.
[0210] The solution of this embodiment achieves the coordination and consistency of opinions of different nodes, prevents individual conclusions from affecting the final judgment, improves the consistency requirement through multiple rounds of optimization, digitally records the verification results generated by negotiation, improves the credibility and reliability of the trust system, and draws conclusions through on-chain democracy, thereby improving the authority of verification.
[0211] See also Figure 2 ,Another embodiment of the present invention provides a data security verification device based on zero-knowledge proof, comprising: an acquisition module, a control processing module and an output module;
[0212] The control processing module is configured as follows:
[0213] Build the first proof problem database to record the proof problem data such as problem description, parameters, and results;
[0214] Annotating the first proof question library and extracting question features as first reference samples for neural network training;
[0215] Designing a first deep learning model suitable for proof problems based on the first proof problem library;
[0216] Collecting real proof samples according to the first reference samples, and using the real proof samples to train the first deep learning model to obtain a second deep learning model;
[0217] Determine a first device corresponding to the problem to be verified, and verify the security status of the first device to obtain a security verification result;
[0218] When the security verification result meets the preset conditions, extracting the feature of the problem to be verified from the problem to be verified and inputting the feature of the problem to be verified into the second deep learning model, and the second deep learning model performs prediction and outputs a prediction result;
[0219] Using a zero-knowledge proof algorithm to encrypt and sign the prediction result;
[0220] Upload the signature to the participating nodes of the blockchain network for distributed verification;
[0221] The blockchain network participating nodes use public information to replay the predicted calculation to gradually verify the signature;
[0222] The nodes participating in the blockchain network reach a consensus through voting and output the verification result of the signature;
[0223] Compare the actual operation results to verify the error statistics, and iteratively optimize the second deep learning model according to the statistical results;
[0224] The first proof question library and the second deep learning model are regularly adjusted to improve prediction accuracy and system performance.
[0225] It should be known that Figure 2 The block diagram of the data security verification device based on zero-knowledge proof is for illustration only, and the number of modules shown does not limit the protection scope of the present invention. The data security verification device based on zero-knowledge proof provided in this embodiment can be used to execute the corresponding embodiments of the data security verification method based on zero-knowledge proof. For the specific implementation process, please refer to the description of the embodiments of each method, which will not be repeated here.
[0226] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0227] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0228] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the above-mentioned units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0229] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0230] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0231] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the above-mentioned methods of each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or CD-ROM and other media that can store program codes.
[0232] A person skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, and the memory can include: a flash drive, a read-only memory (English: Read-Only Memory, abbreviated as: ROM), a random access memory (English: Random Access Memory, abbreviated as: RAM), a magnetic disk or an optical disk, etc.
[0233] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
[0234] Although the present invention is disclosed as above, the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions without departing from the spirit and scope of the present invention, and can make various changes and modifications, including the combination of the above-mentioned different functions and implementation steps, including software and hardware implementation methods, all of which are within the scope of protection of the present invention.
Claims
1. A data security verification method based on zero-knowledge proof, characterized in that: include: Build the first proof problem database to record the proof problem data such as problem description, parameters, and results; Annotating the first proof question library and extracting question features as first reference samples for neural network training; Designing a first deep learning model suitable for proof problems based on the first proof problem library; Collecting real proof samples according to the first reference samples, and using the real proof samples to train the first deep learning model to obtain a second deep learning model; Determine a first device corresponding to the problem to be verified, and verify the security status of the first device to obtain a security verification result; When the security verification result meets the preset conditions, extracting the feature of the problem to be verified from the problem to be verified and inputting the feature of the problem to be verified into the second deep learning model, and the second deep learning model performs prediction and outputs a prediction result; Using a zero-knowledge proof algorithm to encrypt and sign the prediction result; Upload the signature to the participating nodes of the blockchain network for distributed verification; The blockchain network participating nodes use public information to replay the predicted calculation to gradually verify the signature; The nodes participating in the blockchain network reach a consensus through voting and output the verification result of the signature; Compare the actual operation results to verify the error statistics, and iteratively optimize the second deep learning model according to the statistical results; The first proof question library and the second deep learning model are regularly adjusted to improve prediction accuracy and system performance.
2. The data security verification method based on zero-knowledge proof according to claim 1 is characterized in that: The step of constructing a first proof problem database to record proof problem data such as problem description, parameters, and results includes: Identify the type of evidence needed to support it; Build representations that support various types of proofs; Collect case information that specifically proves the case; Label different types of proof cases and establish type-label correspondence; For each proof case, extract the characteristic items; Organize case information, labels and feature items in a structured manner and store them in the database to support query; After processing the incoming data, statistical analysis is performed on the database structure and content to obtain the overall distribution pattern; Find edge data points and store them in the database to enrich the boundary of the sample space; Establish a mapping relationship between the question bank and the learning samples; Check the database structure and content to ensure data quality and integrity.
3. The data security verification method based on zero-knowledge proof according to claim 2 is characterized in that: The step of designing a first deep learning model suitable for proof problems according to the first proof problem library includes: Performing problem feature statistics on the first proof problem database, and selecting a suitable deep learning model structure based on the problem feature statistical data; Determine the number of neurons in each layer according to the selected deep learning model structure and set the network width based on the problem size; Choose the corresponding activation function to improve the expressiveness; Train model parameters using optimization algorithms; Add regularization to prevent overfitting; Collect necessary statistical indicators to evaluate the effectiveness of the initial model; Optimize network structure or algorithm to achieve improvement based on evaluation results; Combine new samples to optimize and improve model performance.
4. The data security verification method based on zero-knowledge proof according to claim 3 is characterized in that: The step of collecting a real proof sample according to the first reference sample, and using the real proof sample to train the first deep learning model to obtain a second deep learning model includes: According to the problem space scope of the first reference sample, expand and collect more real samples; Assigning labels and extracting features to the new sample, unifying the format with the first reference sample, and obtaining the authenticity proof sample; Using the real proof samples to train the first deep learning model, increasing the number of training iterations and batches, and continuously optimizing the model weights; Monitor the accuracy and loss curves to select the best model as the second deep learning model; Test the effect of the second deep learning model on the first reference sample, and adjust the second deep learning model according to the test effect.
5. The data security verification method based on zero-knowledge proof according to claim 4 is characterized in that: The step of determining the first device corresponding to the problem to be verified, and verifying the security status of the first device to obtain a security verification result includes: Collecting information related to the first device as features, and selecting device security-sensitive parameters as verification objects; The first device uses a preset private key to digitally sign the parameters to generate a certificate; Upload the proof to the blockchain network for storage; Multiple verification nodes perform distributed multi-point confirmation through a zero-knowledge proof algorithm to verify the validity of the signature; Record the security verification results on the chain that cannot be tampered with.
6. The data security verification method based on zero-knowledge proof according to claim 5 is characterized in that: When the security verification result meets the preset conditions, the step of extracting the feature of the problem to be verified from the problem to be verified and inputting the feature of the problem to be verified into the second deep learning model, and the second deep learning model predicts and outputs the prediction result includes: Extract relevant features of the problem to be verified, convert the relevant features into a numerical form that can be recognized by the network, and obtain the features of the problem to be verified; Inputting the problem feature to be verified into the optimized second deep learning model; The second deep learning model performs forward propagation calculations to obtain prediction results, which are compared with the actual results to statistically analyze the prediction accuracy.
7. The data security verification method based on zero-knowledge proof according to claim 6 is characterized in that: The step of using a zero-knowledge proof algorithm to encrypt and sign the prediction result includes: Define a public-private key pair for encrypting prediction results; Encode the prediction results using the selected zero-knowledge proof algorithm; Perform a hash operation on the prediction result to obtain a first signature of a fixed length; digitally signing the first signature using the private key; The digital signature content includes the prediction result and the random number.
8. The data security verification method based on zero-knowledge proof according to claim 7 is characterized in that: The steps of the blockchain network participating nodes using public information to replay the predicted calculation to gradually verify the signature include: The blockchain network participating nodes obtain the prediction result signature and random number; Perform simulation calculations based on a preset prediction model; Use random numbers to update the calculation and gradually restore the original prediction results; Hash the prediction result and compare it with the signature for verification; Different nodes perform distributed multi-point repeated verification; Record the intermediate state information generated in each step of the calculation; Ultimately, a tamper-proof verification record chain is formed.
9. The data security verification method based on zero-knowledge proof according to claim 8, characterized in that: The blockchain network participating nodes reach a consensus through voting and output the verification result of the signature, including: Each blockchain network participating node generates a vote based on its own verification calculation results; The voting results will be recorded and archived in an unalterable manner; Count all node votes, and if there is a clear majority, that’s the result; If there is no clear majority, a multi-round voting process with demotion is initiated; Constantly adjust the elimination criteria, re-count and re-vote; Until more than half of the nodes support a result.
10. A data security verification device based on zero-knowledge proof, characterized in that: include: Acquisition module, control processing module and output module; The control processing module is configured as follows: Build the first proof problem database to record the proof problem data such as problem description, parameters, and results; Annotating the first proof question library and extracting question features as first reference samples for neural network training; Designing a first deep learning model suitable for proof problems based on the first proof problem library; Collecting real proof samples according to the first reference samples, and using the real proof samples to train the first deep learning model to obtain a second deep learning model; Determine a first device corresponding to the problem to be verified, and verify the security status of the first device to obtain a security verification result; When the security verification result meets the preset conditions, extracting the feature of the problem to be verified from the problem to be verified and inputting the feature of the problem to be verified into the second deep learning model, and the second deep learning model performs prediction and outputs a prediction result; Using a zero-knowledge proof algorithm to encrypt and sign the prediction result; Upload the signature to the participating nodes of the blockchain network for distributed verification; The blockchain network participating nodes use public information to replay the predicted calculation to gradually verify the signature; The nodes participating in the blockchain network reach a consensus through voting and output the verification result of the signature; Compare the actual operation results to verify the error statistics, and iteratively optimize the second deep learning model according to the statistical results; The first proof question library and the second deep learning model are regularly adjusted to improve prediction accuracy and system performance.
Citation Information
Patent Citations
Learning proof block chain consensus method and system based on zero-knowledge proof
CN118250006A
Block chain multi-factor identity verification method based on federal deep learning
CN118677596A