Test data verification method, device and equipment and computer readable storage medium

By executing test cases in a dedicated test environment and generating encrypted data hash values ​​and zero-knowledge proofs, uploading them to the blockchain to generate smart contracts, solving data leakage and compliance risks in test data verification, and achieving safe and effective data verification and flexible permission management.

CN120523741APending Publication Date: 2025-08-22INSPUR (SHANDONG) COMPUTER TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510676864.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-23
Publication Date
2025-08-22

AI Technical Summary

Technical Problem

The existing test data verification solutions have sensitive data leakage and compliance risks, and cannot effectively ensure data security.

Method used

Execute test cases in a dedicated test environment, generate encrypted data hash values ​​and zero-knowledge proofs, and upload them to the blockchain to generate smart contracts, and use smart contracts to achieve test data verification.

Benefits of technology

It realizes more secure and effective test data verification, avoids data leakage, ensures data security, and realizes flexible permission control through dynamic key management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120523741A_ABST
    Figure CN120523741A_ABST
Patent Text Reader

Abstract

The invention discloses a test data verification method, which comprises the following steps: acquiring a target test case, and loading the target test case to a special test environment; executing the target test case in the special test environment to obtain test data; performing encryption calculation on the test data to obtain encrypted data, and performing hash calculation on the encrypted data to obtain an encrypted data hash value; generating a zero-knowledge proof corresponding to the encrypted data hash value according to the target test case; and uploading the encrypted data hash value and the zero-knowledge proof to a block chain to generate a smart contract, so that a verification end realizes test data verification based on the smart contract. By applying the technical scheme provided by the invention, safer and more effective test data verification can be realized, data leakage is avoided, and data security is ensured. The invention also discloses a test data verification device, electronic equipment and a computer readable storage medium, which also have the above technical effects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data verification technology, and in particular to a test data verification method, and also to a test data verification device, an electronic device, and a computer-readable storage medium. Background Art

[0002] In software testing, security audits, or hardware verification scenarios for standard devices, testers must submit raw test data or unencrypted results to the user for correctness verification. However, this can lead to several issues: First, sensitive data can be leaked, as test results may contain business logic, vulnerability details, or user privacy (such as medical or financial data); second, compliance risks arise, as cross-organizational data transmission may violate certain privacy regulations. In other words, existing test data verification solutions based on standard devices still present significant data leakage risks and security issues.

[0003] Therefore, how to achieve more secure and effective test data verification, avoid data leakage, and ensure data security is an urgent problem to be solved by those skilled in the art. Summary of the Invention

[0004] The purpose of this application is to provide a test data verification method, which can achieve more secure and effective test data verification, avoid data leakage, and ensure data security; another purpose of this application is to provide a test data verification device, electronic equipment, computer-readable storage medium and computer program product, all of which have the above-mentioned beneficial effects.

[0005] In a first aspect, the present application provides a test data verification method, comprising:

[0006] Obtaining a target test case and loading the target test case into a dedicated test environment;

[0007] Execute the target test case in the dedicated test environment to obtain test data;

[0008] Performing encryption calculation on the test data to obtain encrypted data, and performing hash calculation on the encrypted data to obtain a hash value of the encrypted data;

[0009] Generate a zero-knowledge proof corresponding to the encrypted data hash value according to the target test case;

[0010] The encrypted data hash value and the zero-knowledge proof are uploaded to the blockchain to generate a smart contract, so that the verification end can implement test data verification based on the smart contract.

[0011] Optionally, executing the target test case in the dedicated test environment to obtain test data includes:

[0012] Execute the target test case in the dedicated test environment to obtain a test process file;

[0013] Performing signature verification on the test process file to obtain a signature file;

[0014] The signature file is run to obtain the test data.

[0015] Optionally, performing signature verification on the test process file to obtain a signature file includes:

[0016] When the test process file does not hit the file library of the dedicated test environment, performing file structure parsing and file content parsing on the test process file to obtain a file parsing result;

[0017] The signature file is created according to the file parsing result, and the signature file is added to the file library.

[0018] Optionally, the test data verification method further includes:

[0019] Monitoring the validity of the signature of the signature document;

[0020] When the signature validity period reaches a preset time limit, the signature file is cleared.

[0021] Optionally, generating a zero-knowledge proof corresponding to the encrypted data hash value according to the target test case includes:

[0022] Perform mathematical circuit conversion on the test logic of the test case to generate a zero-knowledge proof corresponding to the hash value of the encrypted data.

[0023] Optionally, uploading the encrypted data hash value and the zero-knowledge proof to a blockchain to generate a smart contract includes:

[0024] The encrypted data hash value and the zero-knowledge proof are uploaded to the blockchain, so that the blockchain verifies the validity of the zero-knowledge proof using a zero-knowledge proof verification algorithm, and generates the smart contract based on the encrypted data hash value and the zero-knowledge proof when the zero-knowledge proof is verified to be valid.

[0025] Optionally, uploading the encrypted data hash value and the zero-knowledge proof to a blockchain to generate a smart contract, so that the verification end can verify the test data based on the smart contract, including:

[0026] Uploading the encrypted data hash value and the zero-knowledge proof to the blockchain to generate the smart contract, so that the verification end can use the key to obtain the test data verification result from the smart contract to implement test data verification;

[0027] The key is obtained by the verification terminal through application from a dynamic key management agency, and the key level of the key corresponds to the verification authority of the verification terminal.

[0028] In a second aspect, the present application further discloses a test data verification device, comprising:

[0029] A loading module, used to obtain a target test case and load the target test case into a dedicated test environment;

[0030] An execution module, configured to execute the target test case in the dedicated test environment to obtain test data;

[0031] a calculation module, configured to perform encryption calculation on the test data to obtain encrypted data, and perform hash calculation on the encrypted data to obtain a hash value of the encrypted data;

[0032] A generation module, configured to generate a zero-knowledge proof corresponding to the hash value of the encrypted data according to the target test case;

[0033] A verification module is used to upload the encrypted data hash value and the zero-knowledge proof to the blockchain to generate a smart contract, so that the verification end can verify the test data based on the smart contract.

[0034] In a third aspect, the present application further discloses an electronic device, comprising:

[0035] memory for storing computer programs;

[0036] A processor is configured to implement the steps of any one of the test data verification methods described above when executing the computer program.

[0037] In a fourth aspect, the present application further discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of any one of the test data verification methods described above are implemented.

[0038] In a fifth aspect, the present invention further discloses a computer program product, comprising a computer program / instruction, which implements the steps of any one of the test data verification methods described above when executed by a processor.

[0039] The present application provides a test data verification method, comprising: obtaining a target test case and loading the target test case into a dedicated test environment; executing the target test case in the dedicated test environment to obtain test data; performing encryption calculation on the test data to obtain encrypted data, and performing hash calculation on the encrypted data to obtain an encrypted data hash value; generating a zero-knowledge proof corresponding to the encrypted data hash value according to the target test case; uploading the encrypted data hash value and the zero-knowledge proof to a blockchain to generate a smart contract, so that a verification end can implement test data verification based on the smart contract.

[0040] By applying the technical solution provided by this application, the target test case is loaded into a dedicated test environment, which is then used to execute the target test case. The corresponding test data is encrypted and hashed to obtain a hash value of the encrypted data. At the same time, the corresponding zero-knowledge proof is generated and uploaded to the blockchain to generate a smart contract. Thus, the verification end can verify the test data through the smart contract. This shows that this technical solution combines dedicated environment testing technology, blockchain technology, and smart contract technology to implement test data verification operations, which helps to achieve more secure and effective test data verification, further avoid data leakage, and ensure data security.

[0041] In one embodiment of the present application, a third-party dynamic key management agency is utilized to set different verification permissions for verification terminals of different roles, and different verification permissions are implemented by allocating keys of different levels, that is, different client roles correspond to different verification permissions, and different verification permissions correspond to different key levels, thereby enabling verification permissions to be allocated according to the verification terminal role, effectively improving the applicability and flexibility of the test data verification system, and further improving the system performance.

[0042] The test data verification device, electronic device, computer-readable storage medium, and computer program product provided in this application also have the above-mentioned technical effects, and this application will not elaborate on them here. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions in the prior art and the embodiments of the present application, the following is a brief introduction to the drawings required for describing the prior art and the embodiments of the present application. Of course, the drawings described below in connection with the embodiments of the present application are only part of the embodiments of the present application. For those skilled in the art, other drawings can be obtained based on the provided drawings without inventive effort, and the obtained other drawings also fall within the scope of protection of the present application.

[0044] Figure 1 A flow chart of a test data verification method provided in this application;

[0045] Figure 2 A flowchart of another test data verification method provided in this application;

[0046] Figure 3 A flowchart of an application scenario of a test data verification method provided in this application;

[0047] Figure 4 A schematic diagram of the structure of a test data verification device provided in this application;

[0048] Figure 5 This is a schematic structural diagram of an electronic device provided in this application. DETAILED DESCRIPTION

[0049] The core of this application is to provide a test data verification method, which can achieve more secure and effective test data verification, avoid data leakage, and ensure data security; another core of this application is to provide a test data verification device, electronic equipment, computer-readable storage medium and computer program product, all of which have the above-mentioned beneficial effects.

[0050] In order to describe the technical solutions in the embodiments of the present application more clearly and completely, the technical solutions in the embodiments of the present application will be introduced below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0051] An embodiment of the present application provides a test data verification method.

[0052] Please refer to Figure 1 , Figure 1 This is a flow chart of a test data verification method provided in the present application. The test data verification method may include the following S101 to S105.

[0053] S101: Obtain a target test case and load the target test case into a dedicated test environment.

[0054] This step is intended to achieve the acquisition or loading of the target test case, that is, to obtain the target test case and load it into a dedicated test environment. Specifically, the target test case is a test case that requires data testing. By executing the target test case, the corresponding test data can be obtained and provided to the verifier for test data verification, that is, test result verification. It can be understood that traditional test data verification methods are usually implemented based on ordinary computer equipment, and there are greater data security risks, such as data leakage problems. Based on this, the embodiment of the present application proposes a solution for executing target test cases based on a dedicated test environment to effectively solve data security problems.

[0055] A dedicated test environment, specifically a dedicated hardware and software testing environment, is designed to ensure that test logic, raw data, and test results are not accessible to external observers. In one possible implementation, this dedicated test environment can be provided by a dedicated machine with its own dedicated system, hard drive, BIOS, and unique component security card to effectively ensure the security of the test environment.

[0056] S102: Execute target test cases in a dedicated test environment to obtain test data.

[0057] This step aims to execute the target test case in a dedicated test environment and obtain the corresponding test data. This test data is the execution result of the target test case, that is, the test result.

[0058] In one embodiment of the present application, executing a target test case in a dedicated test environment to obtain test data may include:

[0059] Execute target test cases in a dedicated test environment and obtain test process documents;

[0060] Perform signature verification on the test process file to obtain the signature file;

[0061] Run the signature file to obtain test data.

[0062] It should be noted that using a dedicated test environment to perform test operations generally involves a software signature and legality verification process. Therefore, program files that can be run on ordinary devices generally cannot be run directly in a dedicated test environment. Operations such as binary files or source code compilation cannot be executed because files without legal signatures will have insufficient permissions when executed. In addition, if the content of a signed file in the dedicated test system is modified, the existing legal signature will become invalid and the normal executable permissions will be restricted. Based on this, the embodiment of the present application solves the problem of dynamically assigning legal signatures to dynamic test files in a dedicated test system, allowing them to run in the dedicated test system.

[0063] Specifically, the signature verification can be automatically performed on the test process files generated during the execution of the target test case, that is, the newly generated test process files without signatures can be automatically signed so that they can be executed under the dedicated test system, thereby realizing the execution of the target test case and obtaining test data.

[0064] Among them, performing signature verification on the test process file to obtain the signature file can include: when the test process file does not hit the file library of the dedicated test environment, performing file structure parsing and file content parsing on the test process file to obtain the file parsing result; creating a signature file according to the file parsing result, and adding the signature file to the file library.

[0065] The embodiment of the present application provides an implementation process for performing signature verification on test process files to obtain signature files. Specifically, there will be some executable files in the dedicated test environment itself, and they will be stored in the form of a file library, such as a white list, a signature set, etc. For test process files that directly hit the file library, they can be run directly in the dedicated test environment without performing other operations; for test process files that fail to hit the file library, such as newly created files or modified files, their file structure and file content can be automatically parsed, and the creation of a signature file can be achieved in combination with the file parsing results. In addition, the signature file can also be added to the file library of the dedicated test environment to make it legal and compliant and executable.

[0066] Furthermore, the test data verification method may also include: monitoring the signature validity period of the signature file; and clearing the signature file when the signature validity period reaches a preset time limit. In other words, the automatically created signature has a time limit, but only a short time limit. Its specific value can be defined by the tester before the test begins, ensuring that it is sufficient to meet the test execution time. After the signature time limit expires, it can be automatically deleted and cleared. Of course, after the test is completed, the signature files that have not expired can also be automatically deleted. The deletion mechanism can choose to manually click to confirm the deletion and then automatically perform the clearing and deletion operation, or it can automatically perform the clearing and deletion operation after the signature expires based on the timestamp in the signature. In addition, another deletion mechanism can be executed after receiving the blockchain feedback of the successful chain upload, because the encrypted data hash value and zero-knowledge proof generated based on the test data will be uploaded to the blockchain for storage, as described later in S103-S105.

[0067] S103: Perform encryption calculation on the test data to obtain encrypted data, and perform hash calculation on the encrypted data to obtain a hash value of the encrypted data.

[0068] This step aims to perform encryption and hash calculations on the test data, obtaining the encrypted data hash value corresponding to the test data. The encryption calculations can be implemented using relevant encryption algorithms, and the hash calculations can be implemented using relevant hash algorithms. It can be understood that the hash value is essentially a data fingerprint, and its core function is to verify data integrity and ensure that the test results have not been tampered with.

[0069] In one possible implementation, encryption calculations can be performed using a hybrid encryption algorithm, which combines a symmetric encryption algorithm (such as AES-256) with an asymmetric encryption algorithm (such as RSA or elliptic curve cryptography). Based on this, performing encryption calculations on test data to obtain encrypted data can include: generating a random symmetric key in a dedicated test environment; symmetrically encrypting the test data using the random symmetric key to obtain encrypted data; encrypting the random symmetric key using the public key of the receiving end (here, the receiving end is the blockchain) to obtain an encryption key; and sending the encrypted data and encryption key to the receiving end. Furthermore, the encryption process can be monitored in real time. If any error or anomaly is detected that causes encryption failure, the encryption operation can be re-executed. The receiving end can then use its private key to decrypt the encryption key to obtain the random symmetric key, which it then uses to decrypt the encrypted data to obtain the test data.

[0070] S104: Generate a zero-knowledge proof corresponding to the hash value of the encrypted data according to the target test case.

[0071] This step aims to generate a zero-knowledge proof, specifically a zero-knowledge proof corresponding to the hash value of the encrypted data based on the target test case. It's understandable that a zero-knowledge proof is essentially a "cryptographic receipt," its core function being to verify the correctness of the test logic, proving compliance with the test process and the authenticity of the results. Furthermore, if an exception occurs during the zero-knowledge proof generation process, resulting in a failed output, it can be regenerated.

[0072] In one embodiment of the present application, generating a zero-knowledge proof corresponding to a hash value of encrypted data based on a target test case may include performing a mathematical circuit transformation on the test logic of the test case to generate a zero-knowledge proof corresponding to the hash value of the encrypted data. It should be noted that this process can be implemented using any type of zero-knowledge proof generation algorithm, such as zk-SNARKs, zk-STARKs, etc.

[0073] S105: Upload the encrypted data hash value and zero-knowledge proof to the blockchain to generate a smart contract, so that the verification end can implement test data verification based on the smart contract.

[0074] This step aims to upload and store the encrypted data hash value and zero-knowledge proof based on the blockchain, generating a smart contract. This allows the verifier to obtain the test data verification result based on the smart contract, thereby achieving test data verification. The verifier's acquisition of the test data verification result can be referenced to the aforementioned process of the receiver obtaining test data using a key, and this application will not elaborate on this further.

[0075] In one embodiment of the present application, uploading the encrypted data hash value and the zero-knowledge proof to the blockchain to generate a smart contract may include: uploading the encrypted data hash value and the zero-knowledge proof to the blockchain, so that the blockchain uses a zero-knowledge proof verification algorithm to verify the validity of the zero-knowledge proof, and when verifying that the zero-knowledge proof is valid, generating a smart contract based on the encrypted data hash value and the zero-knowledge proof.

[0076] To further ensure data security, the blockchain has the authority to verify the validity of received zero-knowledge proofs. Only if the zero-knowledge proof is valid can it be stored along with the encrypted data hash value to enable smart contract generation; otherwise, the zero-knowledge proof is rejected. This validation can be implemented using a zero-knowledge proof verification algorithm, such as the ZKP verification algorithm. Furthermore, after the zero-knowledge proof passes the validity verification, the blockchain can update the on-chain status to "valid" and feedback the verification results to a dedicated testing system.

[0077] It can be seen that the test data verification method provided in the embodiment of the present application loads the target test case into a dedicated test environment to execute the target test case using the dedicated test environment, and performs encryption and hash calculations on the corresponding test data to obtain the encrypted data hash value. At the same time, it generates its corresponding zero-knowledge proof and uploads it to the blockchain to generate a smart contract. As a result, the verification end can verify the test data through the smart contract. It can be seen that this technical solution combines dedicated environment testing technology, blockchain technology, and smart contract technology to implement test data verification operations, which helps to achieve more secure and effective test data verification, further avoid data leakage, and ensure data security.

[0078] Based on the above embodiments:

[0079] In one embodiment of the present application, uploading the encrypted data hash value and the zero-knowledge proof to the blockchain to generate a smart contract, so that the verification end can implement test data verification based on the smart contract, may include: uploading the encrypted data hash value and the zero-knowledge proof to the blockchain to generate a smart contract, so that the verification end can use the key to obtain the test data verification result from the smart contract to implement test data verification;

[0080] The key is obtained by the verification end from the dynamic key management agency, and the key level of the key corresponds to the verification authority of the verification end.

[0081] As described above, the verification end can obtain test data verification results using a key. This key is assigned by a third-party dynamic key management organization based on the verification end's role permissions. In other words, different verification permissions can be set for verification ends with different roles, and these different verification permissions can be achieved through keys of different levels. Specifically, the verification end can apply to the third-party dynamic key management organization for a key. The third-party dynamic key management organization can then determine the verification permission held by the verification end based on its user information and assign a key of the corresponding level, allowing the verification end to use this key to obtain test data verification results for the corresponding permission.

[0082] In one possible implementation, verification permissions can include basic permissions, advanced permissions, and full permissions. A verification client with basic permissions can only view verification results; a verification client with advanced permissions can decrypt some test data, a process that requires multi-party signature authorization; and a verification client with full permissions can obtain raw test data details, generally limited to the security team.

[0083] It can be seen that the embodiment of the present application utilizes a third-party dynamic key management agency to set different verification permissions for verification terminals of different roles, and realizes different verification permissions by allocating keys of different levels, that is, different client roles correspond to different verification permissions, and different verification permissions correspond to different key levels, so that verification permissions can be allocated according to the verification terminal role, effectively improving the applicability and flexibility of the test data verification system, and further improving the system performance.

[0084] Furthermore, a data automatic expiration and destruction mechanism can be introduced into the test data verification method provided in the embodiment of the present application to effectively meet the "being forgotten" requirement of the "General Data Protection Regulation". Specifically, the implementation process can include:

[0085] 1. Data labeling and lifecycle management.

[0086] Dedicated testing systems can add a "shelf life" tag to each piece of data (such as user test records). For example, a storage period sets a maximum retention period for the data (e.g., automatic deletion after 30 days). Furthermore, deletion conditions can be set to mark events that trigger deletion, such as user-initiated deletion requests or deletion due to business needs.

[0087] 2. Conditions that trigger destruction.

[0088] (1) Time expiration: The system periodically scans data tags. If the current time exceeds the "shelf life", deletion is triggered.

[0089] (2) User request: When a user submits a deletion request through a compliance channel (such as the privacy management page), the system automatically verifies the identity and triggers the deletion process.

[0090] (3) Business termination: If the test project ends or the contract expires, the associated data will automatically enter the destruction queue.

[0091] 3. Implementation of safe deletion.

[0092] (1) Physical deletion: Data is completely cleared from all storage locations, including databases, backup servers, and logs.

[0093] (2) Anti-recovery processing: A secure erase algorithm (such as DoD 5220.22-M standard) can be used to overwrite the storage space multiple times to ensure that the data cannot be recovered.

[0094] Finally, the above implementation process can also be logged to record detailed information about the deletion operation, including but not limited to: deletion time (when the destruction was triggered), operation subject (whether the system executed automatically or triggered by the user), and data scope (specific deletion content). Furthermore, a deletion certificate can be generated through blockchain or trusted third-party audit tools to ensure that the operation is authentic and cannot be tampered with.

[0095] Based on the above embodiments, an embodiment of the present application provides another test data verification method.

[0096] First, please refer to Figure 2 and Figure 3 , Figure 2 This is a flow chart of another test data verification method provided by this application. Figure 3 This is a flow chart of an application scenario of a test data verification method provided by this application. The test data verification method in the embodiment of this application mainly includes the following three stages:

[0097] 1. Test execution and encryption generation phase:

[0098] (1) Load the target test case in a dedicated test environment. During the test logic execution, automatically verify and assign signatures to the test process files and execute the test operations.

[0099] (2) Generate the original test results and encrypt the results to obtain encrypted data.

[0100] (3) Construct a zero-knowledge proof. Use the zk-SNARKs or zk-STARKs algorithm to convert the test logic into a mathematical circuit to generate a zero-knowledge proof. If an exception occurs during the zero-knowledge proof generation process and the output fails, regenerate it.

[0101] 2. Blockchain storage and verification stage:

[0102] (1) Submit the encrypted data hash value and zero-knowledge proof to the blockchain network to trigger the smart contract.

[0103] (2) Execute the ZKP verification algorithm to verify the validity of the zero-knowledge proof and return the verification results to the dedicated test system.

[0104] (3) If the verification is successful, the status on the chain is updated to "valid result" and the corresponding data is stored. In the dedicated test system, the test is completed and the newly signed files are deleted during the test process.

[0105] 3. Permission control and result decryption stage:

[0106] (1) The verifier (such as the client or auditor) applies for the decryption key based on the role authority:

[0107] Basic permissions: only view verification results;

[0108] Advanced permissions: decrypt part of the test data (requires multi-party signature authorization);

[0109] Full permissions: Get raw test data details (only for security teams).

[0110] (2) The dynamic key management module / organization can implement key distribution based on attribute-based encryption (ABE) or threshold signature.

[0111] Furthermore, the test data verification method provided in the embodiments of the present application can be applied to the following scenarios:

[0112] Hypothetical scenario: Multiple parties want to jointly train a test model but are unwilling to share local data. The implementation process can include:

[0113] 1. Local model training and encryption:

[0114] (1) Each participant trains and tests the model locally using its own data to generate updated values ​​for the model parameters (such as the gradient matrix).

[0115] (2) Encrypt the parameter update value to generate a zero-knowledge proof to prove that it complies with the training rules.

[0116] 2. Federation aggregation and verification:

[0117] (1) All updated values ​​of encryption parameters are uploaded to the central server, which aggregates them through secure multi-party computation or homomorphic encryption to generate a global model.

[0118] (2) During the aggregation process, the server verifies the zero-knowledge proof of each participant and rejects cheating parties (such as participants who tamper with the gradient).

[0119] 3. Dynamic weight allocation:

[0120] (1) Different aggregation weights are assigned based on the quality of the data provided by each participant (dynamically evaluated through ZKP verification results).

[0121] (2) High-quality data providers receive higher weights, improving the accuracy of the global model.

[0122] It can be seen that the test data verification method provided in the embodiment of the present application has the following technical advantages:

[0123] (1) Simplicity: Traditional testing requires submission of original data, while this technical solution only requires submission of encryption results and zero-knowledge proof, eliminating the need for redundant data volume;

[0124] (2) Low cost: Traditional test verification relies on manual auditing or repeated testing, while this technical solution only requires automated mathematical verification, saving costs;

[0125] (3) Security: Traditional test data has a high risk of leakage. The test data in this technical solution is “available but invisible”, which has stronger compliance and security.

[0126] (4) Fine-grained permission granularity: When viewing results using traditional testing methods, permission control granularity is coarse, while this technical solution supports scenario-based fine-grained control through dynamic strategies;

[0127] (5) Innovation: In traditional testing methods, test tools cannot be dynamically compiled and binary files cannot be run in dedicated test systems. This technical solution supports dynamic signature assignment, which enables the normal operation of tool compilation and execution in dedicated test systems.

[0128] An embodiment of the present application provides a test data verification device.

[0129] Please refer to Figure 4 , Figure 4 This is a schematic diagram of the structure of a test data verification device provided by this application. The test data verification device may include:

[0130] Loading module 1, used to obtain target test cases and load the target test cases into a dedicated test environment;

[0131] Execution module 2, used to execute target test cases in a dedicated test environment to obtain test data;

[0132] Calculation module 3, used to perform encryption calculation on the test data to obtain encrypted data, and perform hash calculation on the encrypted data to obtain a hash value of the encrypted data;

[0133] Generating module 4, for generating a zero-knowledge proof corresponding to the hash value of the encrypted data according to the target test case;

[0134] Verification module 5 is used to upload the encrypted data hash value and zero-knowledge proof to the blockchain to generate a smart contract, so that the verification end can implement test data verification based on the smart contract.

[0135] It can be seen that the test data verification device provided in the embodiment of the present application loads the target test case into a dedicated test environment to execute the target test case using the dedicated test environment, and performs encryption and hash calculations on the corresponding test data to obtain the encrypted data hash value. At the same time, it generates its corresponding zero-knowledge proof and uploads it to the blockchain to generate a smart contract. As a result, the verification end can verify the test data through the smart contract. It can be seen that this technical solution combines dedicated environment testing technology, blockchain technology, and smart contract technology to implement test data verification operations, which helps to achieve more secure and effective test data verification, further avoid data leakage, and ensure data security.

[0136] In one embodiment of the present application, the execution module 2 may include:

[0137] An execution unit is used to execute target test cases in a dedicated test environment and obtain test process files;

[0138] Signature unit, used to perform signature verification on the test process file to obtain the signature file;

[0139] The running unit is used to run the signature file to obtain test data.

[0140] In one embodiment of the present application, the above-mentioned signature unit can be specifically used to perform file structure analysis and file content analysis on the test process file when the test process file does not hit the file library of the dedicated test environment to obtain the file analysis result; create a signature file based on the file analysis result, and add the signature file to the file library.

[0141] In one embodiment of the present application, the execution module 2 can also be used to monitor the validity period of the signature file; when the signature validity period reaches a preset time period, the signature file is cleared.

[0142] In one embodiment of the present application, the above-mentioned generation module 4 can be specifically used to perform mathematical circuit conversion on the test logic of the test case to generate a zero-knowledge proof corresponding to the hash value of the encrypted data.

[0143] In one embodiment of the present application, the above-mentioned verification module 5 can be specifically used to upload the encrypted data hash value and the zero-knowledge proof to the blockchain, so that the blockchain uses the zero-knowledge proof verification algorithm to verify the validity of the zero-knowledge proof, and when verifying that the zero-knowledge proof is valid, generate a smart contract based on the encrypted data hash value and the zero-knowledge proof.

[0144] In one embodiment of the present application, the verification module 5 may be specifically used to upload the encrypted data hash value and the zero-knowledge proof to the blockchain to generate a smart contract, so that the verification end can use the key to obtain the test data verification result from the smart contract to implement test data verification;

[0145] The key is obtained by the verification end from the dynamic key management agency, and the key level of the key corresponds to the verification authority of the verification end.

[0146] For an introduction to the apparatus provided in the embodiments of this application, please refer to the above method embodiments, which will not be elaborated in this application.

[0147] An embodiment of the present application provides an electronic device.

[0148] Please refer to Figure 5 , Figure 5 This is a schematic diagram of the structure of an electronic device provided in this application, which may include:

[0149] Memory 11, for storing computer programs;

[0150] The processor 10 can implement the steps of any one of the above-mentioned test data verification methods when executing a computer program.

[0151] like Figure 5 FIG2 is a schematic diagram of the structure of an electronic device, which may include a processor 10, a memory 11, a communication interface 12, and a communication bus 13. The processor 10, the memory 11, and the communication interface 12 communicate with each other via the communication bus 13.

[0152] In the embodiment of the present application, the processor 10 may be a central processing unit (CPU), an application-specific integrated circuit, a digital signal processor, a field programmable gate array, or other programmable logic device. The processor 10 may call a program stored in the memory 11. Specifically, the processor 10 may perform the operations in the embodiment of the test data verification method.

[0153] The memory 11 is used to store one or more programs. The program may include program code, and the program code includes computer operating instructions. In the embodiment of the present application, the memory 11 stores at least a program for implementing the following functions:

[0154] Obtain target test cases and load them into a dedicated test environment;

[0155] Execute target test cases in a dedicated test environment to obtain test data;

[0156] Performing encryption calculation on the test data to obtain encrypted data, and performing hash calculation on the encrypted data to obtain a hash value of the encrypted data;

[0157] Generate a zero-knowledge proof corresponding to the encrypted data hash value based on the target test case;

[0158] Upload the encrypted data hash value and zero-knowledge proof to the blockchain to generate a smart contract, so that the verification end can verify the test data based on the smart contract.

[0159] In one possible implementation, the memory 11 may include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function, and the data storage area may store data created during use. Furthermore, the memory 11 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device or other volatile solid-state storage device.

[0160] The communication interface 12 may be an interface of a communication module, and is used to connect to other devices or systems.

[0161] Of course, it needs to be explained that Figure 5 The structure shown does not constitute a limitation on the electronic device in the embodiment of the present application. In actual applications, the electronic device may include Figure 5 More or fewer components than shown, or combinations of certain components.

[0162] An embodiment of the present application provides a computer-readable storage medium.

[0163] The computer-readable storage medium provided in the embodiment of the present application stores a computer program, and when the computer program is executed by a processor, the steps of any of the above-mentioned test data verification methods can be implemented.

[0164] Among them, computer-readable storage media can be any available medium that can be stored by a computer or a data storage device such as a server or data center that integrates one or more available media. For example, it can be magnetic media (such as floppy disks, hard disks, tapes, etc.), optical media (such as DVDs) or semiconductor media (such as solid-state drives) and other media that can store computer program codes.

[0165] For an introduction to the computer-readable storage medium provided in the embodiments of the present application, please refer to the above method embodiments, and this application will not elaborate on them here.

[0166] An embodiment of the present application provides a computer program product.

[0167] The computer program product provided in the embodiments of the present application includes a computer program / instruction, which, when executed by a processor, can implement the steps of any of the above-mentioned test data verification methods.

[0168] Specifically, in each of the above embodiments, all or part of the embodiments may be implemented through software, hardware, firmware, or any combination thereof. When implemented through software, all or part of the embodiments may be implemented in the form of a computer program product.

[0169] Among them, the computer program product may include one or more computer programs / instructions, which, when loaded and executed on a computer, may generate, in whole or in part, the processes or functions described in the embodiments of the present application. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line, etc.) or wireless (e.g., infrared, wireless, microwave, etc.) method.

[0170] For an introduction to the computer program product provided in the embodiments of the present application, please refer to the above method embodiments, which will not be elaborated in this application.

[0171] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.

[0172] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0173] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0174] The technical solution provided by the present application is described in detail above. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only intended to help understand the method and core ideas of the present application. It should be noted that, for those skilled in the art, without departing from the principles of the present application, several improvements and modifications may be made to the present application, and these improvements and modifications also fall within the scope of protection of the present application.

Claims

1. A test data verification method, characterized in that: include: Obtaining a target test case and loading the target test case into a dedicated test environment; Execute the target test case in the dedicated test environment to obtain test data; Performing encryption calculation on the test data to obtain encrypted data, and performing hash calculation on the encrypted data to obtain a hash value of the encrypted data; Generate a zero-knowledge proof corresponding to the encrypted data hash value according to the target test case; The encrypted data hash value and the zero-knowledge proof are uploaded to the blockchain to generate a smart contract, so that the verification end can implement test data verification based on the smart contract.

2. The test data verification method according to claim 1, characterized in that: Executing the target test case in the dedicated test environment to obtain test data includes: Execute the target test case in the dedicated test environment to obtain a test process file; Performing signature verification on the test process file to obtain a signature file; The signature file is run to obtain the test data.

3. The test data verification method according to claim 2, characterized in that: Perform signature verification on the test process file to obtain a signature file, including: When the test process file does not hit the file library of the dedicated test environment, performing file structure parsing and file content parsing on the test process file to obtain a file parsing result; The signature file is created according to the file parsing result, and the signature file is added to the file library.

4. The test data verification method according to claim 2, wherein: Also includes: Monitoring the validity of the signature of the signature document; When the signature validity period reaches a preset time limit, the signature file is cleared.

5. The test data verification method according to claim 1, wherein: Generating a zero-knowledge proof corresponding to the encrypted data hash value according to the target test case, including: Perform mathematical circuit conversion on the test logic of the test case to generate a zero-knowledge proof corresponding to the hash value of the encrypted data.

6. The test data verification method according to claim 1, wherein: Uploading the encrypted data hash value and the zero-knowledge proof to the blockchain to generate a smart contract, including: The encrypted data hash value and the zero-knowledge proof are uploaded to the blockchain, so that the blockchain verifies the validity of the zero-knowledge proof using a zero-knowledge proof verification algorithm, and generates the smart contract based on the encrypted data hash value and the zero-knowledge proof when the zero-knowledge proof is verified to be valid.

7. The test data verification method according to any one of claims 1 to 6, characterized in that: Uploading the encrypted data hash value and the zero-knowledge proof to the blockchain to generate a smart contract, so that the verification end can implement test data verification based on the smart contract, including: Uploading the encrypted data hash value and the zero-knowledge proof to the blockchain to generate the smart contract, so that the verification end can use the key to obtain the test data verification result from the smart contract to implement test data verification; The key is obtained by the verification terminal through application from a dynamic key management agency, and the key level of the key corresponds to the verification authority of the verification terminal.

8. A test data verification device, characterized in that: include: A loading module, used to obtain a target test case and load the target test case into a dedicated test environment; An execution module, configured to execute the target test case in the dedicated test environment to obtain test data; a calculation module, configured to perform encryption calculation on the test data to obtain encrypted data, and perform hash calculation on the encrypted data to obtain a hash value of the encrypted data; A generation module, configured to generate a zero-knowledge proof corresponding to the hash value of the encrypted data according to the target test case; A verification module is used to upload the encrypted data hash value and the zero-knowledge proof to the blockchain to generate a smart contract, so that the verification end can verify the test data based on the smart contract.

9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the test data verification method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the test data verification method according to any one of claims 1 to 7 are implemented.