Method and device for testing privacy computing platform function
By designing a test method to distinguish the initiator and participant nodes on the privacy computing platform, the complexity and challenges in the functional testing of the privacy computing platform are solved, and automation, adaptability and efficiency are achieved.
Patent Information
- Application Number
- CN202411562360.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-02-18
AI Technical Summary
In functional testing, privacy computing platforms face problems such as complex encrypted data verification, difficulty in collaborative testing of multi-party, deep understanding of cryptographic algorithm testing, great challenges in system performance and scalability testing, and complex compliance and regulatory requirements.
A test method for the functions of the privacy computing platform is designed, by deploying an internal testing environment, distinguishing the initiator and participant nodes, executing different test scripts, uploading test data, creating test tasks or services, and collecting and notifying test results. This method adapts to different test environments through parameter input, supports multi-party collaborative testing and data-driven, and realizes automated tests and result polling and collection.
It realizes the configuration and execution of automated test scripts, adapts to different test environments, supports multi-party collaboration and data-driven testing, reduces the need for manual query, is suitable for big data processing time-consuming scenarios, and improves testing efficiency and accuracy.
Smart Images

Figure CN119473922A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of privacy computing application technology, and in particular to a method and device for testing the functions of a privacy computing platform. Background Art
[0002] A privacy computing platform is a system or environment specifically designed for performing computing and analysis under data encryption. It uses modern cryptographic techniques such as homomorphic encryption, secure multi-party computing (MPC), secret sharing, trusted execution environment (TEE), and differential privacy to achieve secure sharing and joint computing of data among multiple parties while ensuring that the original data is not directly leaked.
[0003] Privacy computing platforms are widely used in many fields such as financial risk control, medical health, and government cooperation. They solve the problem of data silos and promote the maximum utilization of data value, while also effectively safeguarding user privacy and personal information security.
[0004] There are indeed some unique difficulties in software functional testing of privacy computing platforms. These challenges mainly stem from its technical characteristics and application scenarios:
[0005] 1. Functional verification of encrypted data:
[0006] Since the core of privacy computing is to process encrypted data, it becomes very complicated to verify the correctness of the calculation results while ensuring data security and privacy. The traditional method of directly comparing input and output is no longer applicable, and special tools and technologies need to be developed to verify whether the operation logic in the ciphertext environment is accurate.
[0007] 2. Multi-party collaborative testing:
[0008] Privacy computing platforms often involve multiple participants to jointly perform computing tasks, which means that testing requires simulating multi-user scenarios and ensuring that all participants can correctly and securely complete computing operations during complex interactions while maintaining data isolation.
[0009] 3. Cryptography algorithm test:
[0010] Verify whether the various cryptographic algorithms used by the platform, such as homomorphic encryption and MPC, are effective and meet security requirements. This requires a deep understanding of cryptography and the ability to design targeted test cases to verify the correctness and performance of the algorithm in actual applications.
[0011] 4. System performance and scalability:
[0012] The test platform's performance and resource utilization in large-scale data processing and high concurrency situations must also ensure the ability to scale as more users or nodes join the system. Achieving efficient distributed computing while protecting privacy is a huge challenge. The testing process for large-scale data processing is also time-consuming.
[0013] 5. Compliance and regulatory requirements:
[0014] To meet the data privacy protection requirements of laws and regulations in different countries and regions, the testing process needs to cover all necessary compliance steps, including but not limited to data permission control, audit tracking, GDPR and other regulatory compatibility.
[0015] Existing technologies are generally tested on deployed single-node platforms, which requires solving the problem of multi-party collaboration.
[0016] Existing technologies generally test functions by targeting specific data and corresponding services and tasks. The core processing object of the privacy computing platform is data, which needs to cover data inputs from various sources and types.
[0017] With existing technologies, big data scenario testing is generally performed manually, and the testing process is time-consuming. Summary of the invention
[0018] In order to solve at least one of the above existing technical problems, the technical solution of the present invention is as follows:
[0019] According to a first aspect of the present invention, a method for testing functions of a privacy computing platform is provided, which is applied to testing an integrated platform. The method comprises:
[0020] Deploy the internal test environment, including configuring the initiator node and the participant node;
[0021] Triggering the initiator node to execute a test script corresponding to the initiator based on a first predetermined input parameter;
[0022] Triggering the participant node to execute a test script corresponding to the participant based on a second predetermined input parameter;
[0023] Receiving test data uploaded by the initiator node and the participant node respectively;
[0024] The initiator node or the test integration platform creates a test task or service based on the test data, and collects and notifies the test results.
[0025] Optionally, the test data uploaded by the initiator node and the test data uploaded by the participant node respectively carry an identification number for identifying the local organization.
[0026] Optionally, the identification number includes an institution number.
[0027] Optionally, the step of receiving the test data uploaded by the initiator node and the participant node respectively includes:
[0028] Receiving test data uploaded by the initiator node and the participant node respectively through the data processing module;
[0029] Wherein, the data processing module is decoupled from the data source file and the application parameter file.
[0030] Optionally, the step of creating, by the initiator node or the test integration platform, a test task or service based on the test data includes:
[0031] The initiator node or the test integration platform uses a data application module to create a test task or service based on the test data;
[0032] Wherein, the data application module is decoupled from the data source file and the application parameter file.
[0033] Optionally, the initiator node or the test integration platform creates a test task or service based on the test data, and collects and notifies the test result, including:
[0034] After the initiator node or the test integration platform creates a test task or service based on the test data, it polls and collects test results, and sends the test results to a pre-established work group.
[0035] Optionally, the test integration platform is a Jenkins integration platform.
[0036] According to a second aspect of the present invention, a testing device for a privacy computing platform function is provided, which is applied to a testing integrated platform, and the testing device comprises:
[0037] The first configuration module is used to deploy the internal test environment, including configuring the initiator node and the participant node;
[0038] A first trigger module, used to trigger the initiator node to execute a test script corresponding to the initiator based on a first predetermined input parameter;
[0039] A second triggering module, used to trigger the participant node to execute a test script corresponding to the participant based on a second predetermined input parameter;
[0040] A receiving module, used to receive the test data uploaded by the initiator node and the participant node respectively;
[0041] The first creation module is used for the initiator node or the test integration platform to create a test task or service based on the test data, and to collect and notify the test results.
[0042] According to a third aspect of the present invention, a method for testing the function of a privacy computing platform is provided, which is applied to an initiator node, and the testing method includes:
[0043] Based on the first predetermined input parameter, executing the test script corresponding to the initiator;
[0044] Upload local test data to the test integration platform;
[0045] Create test tasks or services based on the test data uploaded by the initiator node and the participant nodes;
[0046] Execute the test task or service together with the participating nodes, and collect and notify the test results.
[0047] Optionally, the steps of uploading local test data to the test integration platform include:
[0048] Using the data processing module to read the configuration parameter file corresponding to the test data;
[0049] The data processing module is used to call a data processing interface based on the configuration parameter file, and the test data is uploaded based on the data processing interface.
[0050] Wherein, the data processing module is decoupled from the data source file and the application parameter file;
[0051] Optionally, the method further includes: configuring a corresponding parameter file for each newly added data file.
[0052] Optionally, the steps of creating a test task or service based on the test data uploaded by the initiator node and the participant node include:
[0053] Use the data application module to read the configuration parameter file corresponding to the test data;
[0054] Using the data application module to create a test task or service based on the configuration parameter file and the test data;
[0055] Wherein, the data application module is decoupled from the data source file and the application parameter file.
[0056] Optionally, the method further includes: configuring a corresponding parameter file for each newly added task or service use case.
[0057] Optionally, before creating a test task or service based on the test data uploaded by the initiator node and the participant node, the following steps may also be included:
[0058] Carry out mutual authorization with participating nodes.
[0059] According to a fourth aspect of the present invention, a testing device for a privacy computing platform function is provided, which is applied to an initiator node, and the testing device includes:
[0060] A first execution module, configured to execute a test script corresponding to the initiator based on a first predetermined input parameter;
[0061] The first upload module is used to upload local test data to the test integration platform;
[0062] The second creation module is used to create a test task or service based on the test data uploaded by the initiator node and the participant node;
[0063] The notification module is used to execute the test task or service together with the participating node, and collect and notify the test results.
[0064] According to a fifth aspect of the present invention, a method for testing the function of a privacy computing platform is provided, which is applied to a participant node, and the testing method includes:
[0065] Based on the second predetermined input parameter, executing the test script corresponding to the participant;
[0066] Upload local test data to the test integration platform;
[0067] Together with the initiator node, it executes the test tasks or services created based on the test data uploaded by the initiator node and the participant nodes.
[0068] Optionally, before jointly executing with the initiator node a test task or service created based on the test data uploaded by the initiator node and the participant node, the following steps may also be included:
[0069] Mutual authorization is performed with the initiator node.
[0070] According to a sixth aspect of the present invention, a testing device for a privacy computing platform function is provided, which is applied to a participant node, and the testing device includes:
[0071] A second execution module, used for executing a test script corresponding to a participant based on a second predetermined input parameter;
[0072] The second upload module is used to upload local test data to the test integration platform;
[0073] The third execution module is used to jointly execute with the initiator node the test task or service created based on the test data uploaded by the initiator node and the participant nodes.
[0074] The above solution of the present invention includes at least the following beneficial effects:
[0075] 1) In the above scheme of the present invention, the automated test script is configured to the test integration platform, which triggers the automatic construction and operation, and can adapt to different test environments through parameter input.
[0076] 2) Due to the existence of multi-party collaboration in the privacy computing platform, there are also different processing between the initiator and the data party under federated tasks and multi-party secure computing services, and at least two nodes need to be tested as a whole. At the same time, it is also necessary to support the functional process testing of the party as a leader and a partner respectively. The above scheme of the present invention distinguishes between the initiator (Leader) and the participant (Partner) during design and executes different test scripts accordingly. During execution, the test scripts of different parties are executed by inputting parameters, thereby realizing the testing of at least two nodes as a whole, and also supporting the functional process testing of the party as a leader and a partner respectively.
[0077] 3) In the above-mentioned scheme of the present invention, the data processing and data application modules (federated learning tasks, joint computing services, etc.) are designed and implemented to be decoupled from the actual data source files and application parameter files, and new data processing and corresponding data applications are added. Use cases can be added by configuring JSON files to achieve data-driven.
[0078] 4) The above scheme of the present invention establishes a result polling and collection function, and the results are sent to the work group through messages. After the automated test is started, no manual query is required, and the results are synchronized regularly during the process, which is suitable for time-consuming scenarios of big data processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0079] Figure 1 It is a flow chart of a testing method for a privacy computing platform function applied to testing an integrated platform provided by an embodiment of the present invention;
[0080] Figure 2 It is a schematic diagram of an application process of a method for testing the privacy computing platform function provided by an embodiment of the present invention;
[0081] Figure 3 It is another application flow diagram of the method for testing the privacy computing platform function provided by an embodiment of the present invention;
[0082] Figure 4 It is a structural schematic diagram of a testing device for testing the privacy computing platform function of an integrated platform provided by an embodiment of the present invention;
[0083] Figure 5 It is a flow chart of a method for testing the privacy computing platform function applied to an initiator node provided by an embodiment of the present invention;
[0084] Figure 6 It is a structural schematic diagram of a testing device for the privacy computing platform function applied to an initiator node provided by an embodiment of the present invention;
[0085] Figure 7 It is a flow chart of a method for testing the privacy computing platform function applied to a participant node provided by an embodiment of the present invention;
[0086] Figure 8 It is a structural schematic diagram of a testing device for the privacy computing platform function applied to a participant node provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0087] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0088] In the description of this application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, "plurality" means two or more, unless otherwise clearly and specifically defined.
[0089] The following is a brief introduction to the privacy computing platform and Pytest involved in this application to facilitate a better understanding of the present invention.
[0090] A privacy computing platform is a system or environment specifically designed for performing computing and analysis under data encryption. It uses modern cryptographic technologies such as homomorphic encryption, secure multi-party computing (MPC), secret sharing, trusted execution environment (TEE), and differential privacy to achieve secure sharing and joint computing of data among multiple parties while ensuring that the original data is not directly leaked.
[0091] Specifically, the privacy computing platform has the following core features:
[0092] Data is available but not visible: Technical means are used to ensure that data always remains encrypted during use. Even during the calculation process, parties other than the data owner cannot access unauthorized data content.
[0093] Multi-party collaborative computing: supports multiple data owners to upload their encrypted data to the platform. The platform can coordinate these data for joint analysis and modeling, while ensuring that each participant can only obtain the calculation results but cannot access the original data of other participants.
[0094] Security and Privacy Protection: Computing protocols are built on strong cryptographic algorithms to ensure that the privacy and integrity of data can be effectively protected even in the event of an attack or malicious actors within the platform.
[0095] Traceability and auditing: Provides complete records and traceability of data usage, allowing compliance audits of data operations to ensure that the entire computing process complies with relevant regulations and policy requirements.
[0096] pytest is a widely used Python testing framework, whose features include but are not limited to the following:
[0097] Easy to use: pytest's syntax is concise and intuitive, making it easy to write and maintain test cases. It supports direct use of functions for testing without the need for additional decorators or inheritance of specific classes.
[0098] Rich assertion mechanism: pytest provides a large number of built-in assertion methods, making it more expressive when verifying various conditions.
[0099] Automatic test discovery: pytest can automatically discover and run all test functions in the directory whose names start with test_ or are located in test_*.py files, without the need to manually arrange the test order.
[0100] Parameterized testing: Supports applying the same test function to different input data sets through the @pytest.mark.parametrize decorator to implement data-driven testing.
[0101] **Fixture support**: pytest has a powerful fixture function, which is used to provide environment setup, cleanup, and shared resource management before and after testing. It can define fixtures of different scopes (such as session level, module level, class level, and function level).
[0102] Hierarchical organization: Organizing test cases through folder structure and module import relationships can easily build complex test structures for large projects.
[0103] Retry and skip tests on failure: Test cases can be marked to be run even when they encounter expected failures, and certain tests can be specified to be skipped if certain conditions are met.
[0104] Detailed error reporting: pytest provides detailed failure information, including source code traceback, comparison failure values, etc., and can generate richer test reports through third-party plug-ins, such as HTML format reports.
[0105] Distributed execution: The pytest-xdist plug-in can be used to execute tests in parallel across multiple CPU cores or multiple machines, thereby speeding up testing.
[0106] Integration with other tools: pytest can be easily combined with other tools, such as Selenium for Web UI automation testing and requests library for interface testing. It is also seamlessly compatible with test cases written by unittest, and can work well with CI / CD tools (such as Jenkins) and reporting tools (such as allure).
[0107] These features together make up the power and flexibility of pytest, making it one of the preferred tools for unit testing, integration testing, and system testing in modern Python projects.
[0108] The present invention mainly proposes a solution for functional automation test scripts based on pytest in terms of functional testing for multi-party collaborative testing, covering multiple data and big data tasks.
[0109] Existing technologies are generally tested for deployed single-node platforms, and the problem of multi-party collaboration needs to be solved. Due to the multi-party collaboration, federated tasks and multi-party secure computing services, there are also different processing between the initiator and the data party, and at least two nodes need to be tested as a whole. At the same time, it is also necessary to support the functional process testing of the party as a leader and a partner.
[0110] See also Figure 1 As shown, the embodiment of the present application provides a method for testing the function of a privacy computing platform, which is applied to a testing integration platform. The testing method includes:
[0111] Step 101: Deploy the internal test environment, including configuring the initiator node and the participant node.
[0112] Here, the initiator (Leader) node and the participant (Partner) node are defined. There can be multiple participant nodes. For the same node, it can be used as both the initiator node and the participant node, and different scripts can be run by inputting parameters.
[0113] Step 102: trigger the initiator node to execute the test script corresponding to the initiator based on the first predetermined input parameter.
[0114] Step 103: trigger the participant node to execute the test script corresponding to the participant based on the second predetermined input parameter.
[0115] Here, the initiator node and the participant node run different test scripts through parameter input. For example, different test scripts are executed by inputting the value of the parameter role as Leader or Partner.
[0116] Step 104: Receive the test data uploaded by the initiator node and the participant node respectively.
[0117] Here, the initiator node and the participant node upload their own test data respectively for testing.
[0118] Optionally, the test data uploaded by the initiator node and the test data uploaded by the participant node each carry an identification number for identifying the local organization. Preferably, the identification number may include the organization number. In this way, the test data introduces the identification number, such as adding the organization number to the data prefix, which can be used for global distinction and testing between different nodes.
[0119] Step 105: The initiator node or the test integration platform creates a test task or service based on the test data, and collects and notifies test results.
[0120] Here, the initiator node or the test integration platform creates the test task or service, the initiator node and the participant nodes perform federated learning or joint computing, and the initiator node or the test integration platform collects and notifies the test results, thereby automatically querying and notifying the test results, without manual query, and using big data to process time-consuming scenarios. Preferably, this step is performed by the initiator node.
[0121] The test task created based on the test data can be an offline task, or the service created based on the test data can be an online service. The initiator node serves as the main executor of the task execution or service call, and the participant node serves as the data party to participate in federated learning or joint computing.
[0122] Optionally, the above step 105 includes:
[0123] Step 1051: After the initiator node or the test integration platform creates a test task or service based on the test data, it polls and collects test results, and sends the test results to a pre-established work group.
[0124] Optionally, before the above step 105, the process further includes: the initiator node and the participant node authorize each other. At this time, only by authorizing the external node to use the test data can federated learning or joint computing be performed, thereby increasing security and reliability.
[0125] In the existing technology, general big data scenario testing is performed manually, and the testing process is time-consuming. During the manual testing process, it is necessary to query the progress of the test function regularly. In the present invention, the execution results of tasks and services are collected by polling, and after the execution is completed, the test report is notified to the work group through a message, and there is no need to wait for long test tasks. That is, after the internal test environment is deployed, by executing the automated script, the business data between the two privacy computing nodes: data authorization, joint computing, and federated modeling are automatically executed and verified. In this way, after the automated test is started, there is no need for manual query, and the results are synchronized regularly during the process, which is suitable for time-consuming scenarios of big data processing. Since the product application environment itself has a python executable environment, the product of the automation solution is a python script, so it can be executed directly after deployment.
[0126] In the above solution of the present invention, the automated test script is configured to the test integration platform, which triggers the automatic construction and operation, and can adapt to different test environments through parameter input. The test integration platform can be a Jenkins integration platform.
[0127] The above scheme of the present invention distinguishes between the initiator (Leader) and the participant (Partner) during design and executes different test scripts accordingly. During execution, the test scripts of different parties can be executed by inputting parameters, thereby realizing the testing of at least two nodes as a whole, and also supporting the functional process testing of the party as a Leader and a Partner respectively.
[0128] A specific application example of the present invention is described below.
[0129] like Figure 2 As shown, the Leader node, Partner node 1, and Partner node 2 are pre-configured.
[0130] 1. The test integration platform passes the Leader node role = Leader, the Leader node recognizes role = Leader, and executes the test script corresponding to Leader.
[0131] The test integration platform passes in Partner node 1 and Partner node 2, role = Partner, the Partner node recognizes role = Partner, and executes the test script corresponding to Partner.
[0132] 2. Leader node, Partner node 1 and Partner node 2 upload their own test data respectively, and the test data is prefixed with the institution number.
[0133] 3. The Leader node communicates with Partner node 1 and Partner node 2 and authorizes each other. The Leader node is authorized by external nodes such as Partner node 1 and Partner node 2, and Partner node 1 and Partner node 2 are authorized by the Leader node to use federated learning or joint computing.
[0134] 4. The Leader node creates online services or offline tasks. During this process, the test data is added with the institution number prefix.
[0135] 5. The Leader node completes the task execution or service call. During this period, Partner node 1 and Partner node 2 participate in federated learning or joint computing as data parties.
[0136] 6. The Leader node tests the tasks and polls the service execution results, and notifies the work group of the report message.
[0137] In the present invention, different test scripts can be run by passing in parameters; the test data is introduced with the organization number as the data prefix, which is globally distinguished and can be tested with different nodes; by reading the configuration file, data-driven execution is carried out, which facilitates the expansion of test scenarios for different data; tasks and services are polled for execution results, and after execution is completed, the test report is notified to the work group via a message, and there is no need to wait for long test tasks.
[0138] As mentioned above, the test integration platform may be a Jenkins integration platform. The following is an example of a test method based on the Jenkins integration platform.
[0139] 1) The deployment test integration platform is triggered, and the Jenkins integration task is automatically executed after submission.
[0140] 2) After startup, the actual execution script is as follows: pytest --leader "10.xx.138.8" --partner1 "10.xx.139.8".
[0141] 3) The execution process is as follows according to the privacy computing business process sequence:
[0142] a)[gw0]PASSED test_01_asset.py---》leader and partner asset entry.
[0143] b)[gw0]PASSED test_02_project_canvas.py--》Leader federated modeling project generation and implementation.
[0144] c)[gw0]PASSED test_03_model_service.py--》Leader party joint computing service generation and testing 1.
[0145] d)[gw0]PASSED test_04_edge_service.py--》Leader party joint computing service generation and testing 2.
[0146] 4) Taking test_02_project_canvas.py as an example, when executed, the leader and partner test methods will be executed respectively according to the input parameters leader and partner, and a prefix will be generated according to the organization number to globally distinguish the data.
[0147] 5) Federated modeling projects usually take a long time to execute. By performing regular queries on the task status during test execution and sending DingTalk message notifications when the execution is completed, the cost of manual queries can be reduced.
[0148] The present invention also solves the following problem: the existing technology generally tests functions for specific data and corresponding services and tasks. The core processing object of the privacy computing platform is data, which needs to cover data input from various sources and types. The present invention supports the configuration of newly added data to drive the test by decoupling the test scheme related to specific data. The specific description is as follows.
[0149] Preferably, the above step 104 includes: receiving the test data uploaded by the initiator node and the participant node respectively through the data processing module; wherein the data processing module is decoupled from the data source file and the application parameter file.
[0150] The above step 105 includes: the initiator node or the test integration platform uses a data application module to create a test task or service based on the test data; wherein the data application module is decoupled from the data source file and the application parameter file.
[0151] At this time, the data processing and data application modules (federated learning tasks, joint computing services, etc.) are designed and implemented to be decoupled from the actual data source files and application parameter files. New data processing and corresponding data applications can be added by configuring JSON files to add use cases and implement data-driven development, thereby facilitating the expansion of test scenarios for different data.
[0152] Preferably, the testing method further comprises: each time the initiator node or the participant node adds a new test data or creates a new test task, a corresponding JSON parameter file is configured.
[0153] At this point, the specific functional test script can be executed by reading the configuration file and driven by data, which facilitates the expansion of test scenarios with different data.
[0154] A specific application example of the above-mentioned data processing module and data application module of the present invention is described below by way of example.
[0155] like Figure 3 As shown, the data processing module first reads the configuration parameter JSON file corresponding to the test data, and configures the corresponding JSON parameter file for each new data file; then calls the data processing interface to upload the test data of the party (with the institution number prefix); a message notifies the upload data function module of the test result; and ends.
[0156] Continue as Figure 3 As shown, the data application module first reads the configuration parameter JSON file corresponding to the test data, configures the corresponding service JSON parameter file for each new online service test case, and configures the corresponding federated learning task JSON parameter file for each new federated learning data test case; creates an online service or offline task (with the institution number prefix); the task is executed or the service call is completed; a message is sent to the upload data function module to notify the test result; and ends.
[0157] Take asset loading as an example for the above implementation:
[0158] The request parameters passed in when calling the asset loading function itself use JSON files. By configuring different JSON files, you can add a new test asset loading without adding new code.
[0159] The above solution of the present invention can realize the whole set of automated test scripts based on the pytest test framework, which naturally inherits its powerful functions and flexibility. It is convenient to arrange the execution sequence of test cases, support parameter input, and integrate other tool capabilities such as CI / CD tools (such as Jenkins) and reporting tools (such as allure).
[0160] The above scheme of the present invention, 1) the automated test script is configured to an integrated platform such as Jenkins, and the deployment platform triggers the automatic construction and operation, and adapts to different test environments through parameter input. 2) Different corresponding execution of different test scripts is distinguished during design. During execution, the test scripts of different parties are executed by inputting the parameter role=Leader or Partner. The organization number is used as a prefix, which is marked in the constructed test data and is globally unique. The node can be tested with multiple other external nodes. 3) The data processing and data application modules (federated learning tasks, joint computing services, etc.) are designed and implemented to be decoupled from the actual data source files and application parameter files, and new data processing and corresponding data applications are added. Use cases can be added by configuring JSON files to realize data-driven. 4) Each functional test module (data processing and data application) has results collected in a round-robin manner, and the results are sent to the work group through messages. After the automated test is started, there is no need for manual query, and the results are synchronized regularly during the process, which is suitable for time-consuming scenarios of big data processing.
[0161] See also Figure 4 As shown, an embodiment of the present invention further provides a testing device for the function of a privacy computing platform, which is applied to a testing integrated platform, and the testing device includes:
[0162] The first configuration module 401 is used to configure the initiator node and the participant node;
[0163] A first trigger module 402, used to trigger the initiator node to execute a test script corresponding to the initiator based on a first predetermined input parameter;
[0164] The second trigger module 403 is used to trigger the participant node to execute the test script corresponding to the participant based on the second predetermined input parameter;
[0165] The receiving module 404 is used to receive the test data uploaded by the initiator node and the participant node respectively;
[0166] The first creation module 405 is used for the initiator node or the test integration platform to create a test task or service based on the test data, and to collect and notify the test results.
[0167] Optionally, the test data uploaded by the initiator node and the test data uploaded by the participant node respectively carry an identification number for identifying the local organization.
[0168] Preferably, the identification number includes an institution number.
[0169] Optionally, the receiving module 404 includes:
[0170] A receiving submodule, used for receiving the test data uploaded by the initiator node and the participant node respectively through the data processing module;
[0171] Wherein, the data processing module is decoupled from the data source file and the application parameter file.
[0172] Optionally, the first creation module 405 includes:
[0173] A first creation submodule, configured for the initiator node or the test integration platform to use a data application module to create a test task or service based on the test data;
[0174] Wherein, the data application module is decoupled from the data source file and the application parameter file.
[0175] Optionally, the first creation module 405 includes:
[0176] The second creation submodule is used to poll and collect test results after the initiator node or the test integration platform creates a test task or service based on the test data, and send the test results to a pre-established work group.
[0177] Optionally, the test integration platform is a Jenkins integration platform.
[0178] The above scheme of the present invention, 1) the automated test script is configured to an integrated platform such as Jenkins, and the deployment platform triggers the automatic construction and operation, and adapts to different test environments through parameter input. 2) Different corresponding execution of different test scripts is distinguished during design. During execution, the test scripts of different parties are executed by inputting the parameter role=Leader or Partner. The organization number is used as a prefix, which is marked in the constructed test data and is globally unique. The node can be tested with multiple other external nodes. 3) The data processing and data application modules (federated learning tasks, joint computing services, etc.) are designed and implemented to be decoupled from the actual data source files and application parameter files, and new data processing and corresponding data applications are added. Use cases can be added by configuring JSON files to realize data-driven. 4) Each functional test module (data processing and data application) has results collected in a round-robin manner, and the results are sent to the work group through messages. After the automated test is started, there is no need for manual query, and the results are synchronized regularly during the process, which is suitable for time-consuming scenarios of big data processing.
[0179] It should be noted that all implementation methods in the above-mentioned testing method embodiment for testing the privacy computing platform function of the integrated platform are applicable to the embodiments of the testing device and can achieve the same technical effect.
[0180] See also Figure 5 As shown, an embodiment of the present invention further provides a method for testing the function of a privacy computing platform, which is applied to an initiator node, and the testing method includes:
[0181] Step 501: Based on a first predetermined input parameter, execute a test script corresponding to the initiator.
[0182] Here, the initiator node and the participant node run different test scripts through parameter input. For example, different test scripts are executed by inputting the value of the parameter role as Leader or Partner.
[0183] Step 502: Upload local test data to the test integration platform.
[0184] Here, the initiator node and the participant node upload their own test data respectively for testing.
[0185] Optionally, the test data uploaded by the initiator node and the test data uploaded by the participant node each carry an identification number for identifying the local organization. Preferably, the identification number may include the organization number. In this way, the test data introduces the identification number, such as adding the organization number to the data prefix, which can be used for global distinction and testing between different nodes.
[0186] Step 503: Create a test task or service based on the test data uploaded by the initiator node and the participant nodes.
[0187] Step 504: Execute the test task or service together with the participating nodes, and collect and notify the test results.
[0188] Here, the initiator node creates the test task or service, the initiator node and the participating nodes perform federated learning or joint computing, and the initiator node collects and notifies the test results, thereby automatically querying and notifying the test results, without the need for manual query and time-consuming scenarios using big data processing.
[0189] The test task created based on the test data can be an offline task, or the service created based on the test data can be an online service. The initiator node serves as the main executor of task execution or service call, and the participant node serves as the data party to participate in federated learning or joint computing. The privacy computing nodes deployed online are privately deployed, and deployment verification tests are performed through automated solutions to reduce the workload of manual testing. The core business path is tested and verified by executing the scripts of the initiator leader.sh and the participant partner.sh on the nodes respectively.
[0190] Optionally, in the above step 504, the step of collecting and notifying the test results includes:
[0191] After the initiator node creates a test task or service based on the test data, it polls and collects test results, and sends the test results to a pre-established work group.
[0192] Optionally, before the above step 503, the process further includes: the initiator node and the participant node authorize each other. At this time, only by authorizing the external node to use the test data can federated learning or joint computing be performed, thereby increasing security and reliability.
[0193] In the existing technology, the testing of big data scenarios is generally performed manually, and the testing process is time-consuming. During the manual testing process, it is necessary to regularly query the progress of the test function. In the present invention, the task and service execution results are collected by polling, and after the execution is completed, the test report is notified to the work group through a message, and there is no need to wait for long test tasks. In this way, after the automated test is started, there is no need for manual query, and the results are synchronized regularly during the process, which is suitable for time-consuming scenarios of big data processing.
[0194] In the above solution of the present invention, the automated test script is configured to the test integration platform, which triggers the automatic construction and operation, and can adapt to different test environments through parameter input. The test integration platform can be a Jenkins integration platform.
[0195] The above scheme of the present invention distinguishes between the initiator (Leader) and the participant (Partner) during design and executes different test scripts accordingly. During execution, the test scripts of different parties can be executed by inputting parameters, thereby realizing the testing of at least two nodes as a whole, and also supporting the functional process testing of the party as a Leader and a Partner respectively.
[0196] Optionally, step 502 includes:
[0197] Step 5021: Using the data processing module to read the configuration parameter file corresponding to the test data;
[0198] Step 5022: using the data processing module to call a data processing interface based on the configuration parameter file, and uploading the test data based on the data processing interface;
[0199] Wherein, the data processing module is decoupled from the data source file and the application parameter file.
[0200] Optionally, the method further includes: configuring a corresponding parameter file for each newly added data file.
[0201] Optionally, step 503 includes:
[0202] Step 5031: Using the data application module to read the configuration parameter file corresponding to the test data;
[0203] Step 5032: Using the data application module to create a test task or service based on the configuration parameter file and the test data;
[0204] Wherein, the data application module is decoupled from the data source file and the application parameter file.
[0205] Optionally, the method further includes: configuring a corresponding parameter file for each newly added task or service use case.
[0206] At this time, the data processing and data application modules (federated learning tasks, joint computing services, etc.) are designed and implemented to be decoupled from the actual data source files and application parameter files. New data processing and corresponding data applications can be added by configuring JSON files to add use cases and implement data-driven development, thereby facilitating the expansion of test scenarios for different data.
[0207] The above scheme of the present invention, 1) the automated test script is configured to an integrated platform such as Jenkins, and the deployment platform triggers the automatic construction and operation, and adapts to different test environments through parameter input. 2) Different corresponding execution of different test scripts is distinguished during design. During execution, the test scripts of different parties are executed by inputting the parameter role=Leader or Partner. The organization number is used as a prefix, which is marked in the constructed test data and is globally unique. The node can be tested with multiple other external nodes. 3) The data processing and data application modules (federated learning tasks, joint computing services, etc.) are designed and implemented to be decoupled from the actual data source files and application parameter files, and new data processing and corresponding data applications are added. Use cases can be added by configuring JSON files to realize data-driven. 4) Each functional test module (data processing and data application) has results collected in a round-robin manner, and the results are sent to the work group through messages. After the automated test is started, there is no need for manual query, and the results are synchronized regularly during the process, which is suitable for time-consuming scenarios of big data processing.
[0208] See also Figure 6 As shown, an embodiment of the present invention further provides a testing device for privacy computing platform functions, which is applied to an initiator node, and the testing device includes:
[0209] The first execution module 601 is used to execute the test script corresponding to the initiator based on the first predetermined input parameter;
[0210] The first uploading module 602 is used to upload local test data to the test integration platform;
[0211] The second creation module 603 is used to create a test task or service based on the test data uploaded by the initiator node and the participant node;
[0212] The notification module 604 is used to execute the test task or service together with the participant node, and collect and notify the test results.
[0213] Optionally, the first uploading module 602 includes:
[0214] A first reading submodule, used for reading a configuration parameter file corresponding to the test data using a data processing module;
[0215] A first uploading submodule, configured to use the data processing module to call a data processing interface based on the configuration parameter file, and upload the test data based on the data processing interface;
[0216] Wherein, the data processing module is decoupled from the data source file and the application parameter file;
[0217] Optionally, the device further includes: a second configuration module, configured to configure a corresponding parameter file for each newly added data file.
[0218] Optionally, the second creation module 603 includes:
[0219] The second reading submodule is used to read the configuration parameter file corresponding to the test data using the data application module;
[0220] A first creation submodule, configured to use the data application module to create a test task or service based on the configuration parameter file and the test data;
[0221] Wherein, the data application module is decoupled from the data source file and the application parameter file;
[0222] Optionally, the device further includes: a third configuration module, configured to configure a corresponding parameter file for each newly added task or service use case.
[0223] Optionally, the device further includes: a first authorization module, used to perform mutual authorization with the participating nodes.
[0224] The above scheme of the present invention, 1) the automated test script is configured to an integrated platform such as Jenkins, and the deployment platform triggers the automatic construction and operation, and adapts to different test environments through parameter input. 2) Different corresponding execution of different test scripts is distinguished during design. During execution, the test scripts of different parties are executed by inputting the parameter role=Leader or Partner. The organization number is used as a prefix, which is marked in the constructed test data and is globally unique. The node can be tested with multiple other external nodes. 3) The data processing and data application modules (federated learning tasks, joint computing services, etc.) are designed and implemented to be decoupled from the actual data source files and application parameter files, and new data processing and corresponding data applications are added. Use cases can be added by configuring JSON files to realize data-driven. 4) Each functional test module (data processing and data application) has results collected in a round-robin manner, and the results are sent to the work group through messages. After the automated test is started, there is no need for manual query, and the results are synchronized regularly during the process, which is suitable for time-consuming scenarios of big data processing.
[0225] It should be noted that all implementation methods in the above-mentioned testing method embodiment of the privacy computing platform function applied to the initiator node are applicable to the embodiments of the testing device and can achieve the same technical effect.
[0226] See also Figure 7 As shown, an embodiment of the present invention further provides a method for testing the function of a privacy computing platform, which is applied to a participant node, and the testing method includes:
[0227] Step 701: Based on the second predetermined input parameter, execute the test script corresponding to the participant.
[0228] Here, the initiator node and the participant node run different test scripts through parameter input. For example, different test scripts are executed by inputting the value of the parameter role as Leader or Partner.
[0229] Step 702: Upload local test data to the test integration platform.
[0230] Here, the initiator node and the participant node upload their own test data respectively for testing.
[0231] Optionally, the test data uploaded by the initiator node and the test data uploaded by the participant node each carry an identification number for identifying the local organization. Preferably, the identification number may include the organization number. In this way, the test data introduces the identification number, such as adding the organization number to the data prefix, which can be used for global distinction and testing between different nodes.
[0232] Step 703: jointly execute with the initiator node the test task or service created based on the test data uploaded by the initiator node and the participant nodes.
[0233] Here, the initiator node creates the test task or service, the initiator node and the participating nodes perform federated learning or joint computing, and the initiator node collects and notifies the test results, thereby automatically querying and notifying the test results, without the need for manual query and time-consuming scenarios using big data processing.
[0234] The test task created based on the test data can be an offline task, or the service created based on the test data can be an online service. The initiator node serves as the main executor of the task execution or service call, and the participant node serves as the data party to participate in federated learning or joint computing.
[0235] Optionally, before step 703, the process further includes: mutual authorization with the initiator node. At this time, only by authorizing the external node to use the test data can federated learning or joint computing be performed, thereby increasing security and reliability.
[0236] In the existing technology, the testing of big data scenarios is generally performed manually, and the testing process is time-consuming. During the manual testing process, it is necessary to regularly query the progress of the test function. In the present invention, the task and service execution results can be collected by polling the initiator node, and after the execution is completed, the test report is notified to the work group through a message, and there is no need to wait for long test tasks. In this way, after the automated test is started, there is no need for manual query, and the results are synchronized regularly during the process, which is suitable for time-consuming scenarios of big data processing.
[0237] In the above solution of the present invention, the automated test script is configured to the test integration platform, which triggers the automatic construction and operation, and can adapt to different test environments through parameter input. The test integration platform can be a Jenkins integration platform.
[0238] The above scheme of the present invention distinguishes between the initiator (Leader) and the participant (Partner) during design and executes different test scripts accordingly. During execution, the test scripts of different parties can be executed by inputting parameters, thereby realizing the testing of at least two nodes as a whole, and also supporting the functional process testing of the party as a Leader and a Partner respectively.
[0239] Optionally, step 702 includes:
[0240] Step 7021: Using the data processing module to read the configuration parameter file corresponding to the test data;
[0241] Step 7022: using the data processing module to call a data processing interface based on the configuration parameter file, and uploading the test data based on the data processing interface;
[0242] Wherein, the data processing module is decoupled from the data source file and the application parameter file.
[0243] Optionally, the method further includes: configuring a corresponding parameter file for each newly added data file.
[0244] At this time, the data processing (federated learning tasks, joint computing services, etc.) is designed and implemented to be decoupled from the actual data source files and application parameter files. New data processing and corresponding data applications can be added by configuring JSON files to add use cases and implement data-driven development, thereby facilitating the expansion of test scenarios for different data.
[0245] The above scheme of the present invention, 1) the automated test script is configured to an integrated platform such as Jenkins, and the deployment platform triggers the automatic construction and operation, and adapts to different test environments through parameter input. 2) Different corresponding execution of different test scripts is distinguished during design. During execution, the test scripts of different parties are executed by inputting the parameter role=Leader or Partner. The organization number is used as a prefix, which is marked in the constructed test data and is globally unique. The node can be tested with multiple other external nodes. 3) The data processing and data application modules (federated learning tasks, joint computing services, etc.) are designed and implemented to be decoupled from the actual data source files and application parameter files, and new data processing and corresponding data applications are added. Use cases can be added by configuring JSON files to realize data-driven. 4) Each functional test module (data processing and data application) has results collected in a round-robin manner, and the results are sent to the work group through messages. After the automated test is started, there is no need for manual query, and the results are synchronized regularly during the process, which is suitable for time-consuming scenarios of big data processing.
[0246] See also Figure 8 As shown, an embodiment of the present invention further provides a testing device for the function of a privacy computing platform, which is applied to a participant node, and the testing device includes:
[0247] The second execution module 801 is used to execute the test script corresponding to the participant based on the second predetermined input parameter;
[0248] The second uploading module 802 is used to upload local test data to the test integration platform;
[0249] The third execution module 803 is used to jointly execute, with the initiator node, the test task or service created based on the test data uploaded by the initiator node and the participant nodes.
[0250] Optionally, the second uploading module 802 includes:
[0251] Step 8021: Using the data processing module to read the configuration parameter file corresponding to the test data;
[0252] Step 8022: using the data processing module to call a data processing interface based on the configuration parameter file, and uploading the test data based on the data processing interface;
[0253] Wherein, the data processing module is decoupled from the data source file and the application parameter file.
[0254] Optionally, the device further includes: a fourth configuration module, configured to configure a corresponding parameter file for each newly added data file.
[0255] Optionally, it further includes: a second authorization module, which is used to authorize the initiator node. At this time, only by authorizing the external node to use the test data can federated learning or joint computing be performed, which increases security and reliability.
[0256] The above scheme of the present invention, 1) the automated test script is configured to an integrated platform such as Jenkins, and the deployment platform triggers the automatic construction and operation, and adapts to different test environments through parameter input. 2) Different corresponding execution of different test scripts is distinguished during design. During execution, the test scripts of different parties are executed by inputting the parameter role=Leader or Partner. The organization number is used as a prefix, which is marked in the constructed test data and is globally unique. The node can be tested with multiple other external nodes. 3) The data processing and data application modules (federated learning tasks, joint computing services, etc.) are designed and implemented to be decoupled from the actual data source files and application parameter files, and new data processing and corresponding data applications are added. Use cases can be added by configuring JSON files to realize data-driven. 4) Each functional test module (data processing and data application) has results collected in a round-robin manner, and the results are sent to the work group through messages. After the automated test is started, there is no need for manual query, and the results are synchronized regularly during the process, which is suitable for time-consuming scenarios of big data processing. It should be noted that all implementation methods in the above-mentioned testing method embodiment of the privacy computing platform function applied to the participating node are applicable to the embodiment of the testing device and can achieve the same technical effect.
[0257] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for testing the function of a privacy computing platform, applied to testing an integrated platform, characterized in that: The test method includes: Deploy the internal test environment, including configuring the initiator node and the participant node; Triggering the initiator node to execute a test script corresponding to the initiator based on a first predetermined input parameter; Triggering the participant node to execute a test script corresponding to the participant based on a second predetermined input parameter; Receiving test data uploaded by the initiator node and the participant node respectively; The initiator node or the test integration platform creates a test task or service based on the test data, and collects and notifies the test results.
2. The testing method according to claim 1, characterized in that: The test data uploaded by the initiator node and the test data uploaded by the participant node respectively carry an identification number for identifying the local organization; Preferably, the identification number includes an institution number; Preferably, the step of receiving the test data uploaded by the initiator node and the participant node respectively comprises: Receiving test data uploaded by the initiator node and the participant node respectively through the data processing module; Wherein, the data processing module is decoupled from the data source file and the application parameter file; Preferably, the step of creating a test task or service based on the test data by the initiator node or the test integration platform includes: The initiator node or the test integration platform uses a data application module to create a test task or service based on the test data; Wherein, the data application module is decoupled from the data source file and the application parameter file.
3. The testing method according to claim 1, characterized in that: The steps of creating a test task or service based on the test data by the initiator node or the test integration platform, and collecting and notifying the test results include: After the initiator node or the test integration platform creates a test task or service based on the test data, polling collects test results and sends the test results to a pre-established work group; Preferably, the test integration platform is a Jenkins integration platform.
4. A testing device for the function of a privacy computing platform, applied to a testing integration platform, characterized in that: The testing device comprises: The first configuration module is used to deploy the internal test environment, including configuring the initiator node and the participant node; A first trigger module, used to trigger the initiator node to execute a test script corresponding to the initiator based on a first predetermined input parameter; A second triggering module, used to trigger the participant node to execute a test script corresponding to the participant based on a second predetermined input parameter; A receiving module, used to receive the test data uploaded by the initiator node and the participant node respectively; The first creation module is used for the initiator node or the test integration platform to create a test task or service based on the test data, and to collect and notify the test results.
5. A method for testing the function of a privacy computing platform, applied to an initiator node, characterized in that: The test method includes: Based on the first predetermined input parameter, executing the test script corresponding to the initiator; Upload local test data to the test integration platform; Create test tasks or services based on the test data uploaded by the initiator node and the participant nodes; Execute the test task or service together with the participating nodes, and collect and notify the test results.
6. The testing method according to claim 5, characterized in that: The steps for uploading local test data to the test integration platform include: Using the data processing module to read the configuration parameter file corresponding to the test data; Using the data processing module to call a data processing interface based on the configuration parameter file, and uploading the test data based on the data processing interface; Wherein, the data processing module is decoupled from the data source file and the application parameter file; Optionally, the method further comprises: configuring a corresponding parameter file for each newly added data file; Preferably, the step of creating a test task or service based on the test data uploaded by the initiator node and the participant node includes: Use the data application module to read the configuration parameter file corresponding to the test data; Using the data application module to create a test task or service based on the configuration parameter file and the test data; Wherein, the data application module is decoupled from the data source file and the application parameter file; Optionally, the method further comprises: configuring a corresponding parameter file for each newly added task or service use case; Preferably, before creating a test task or service based on the test data uploaded by the initiator node and the participant node, the process further includes: Carry out mutual authorization with participating nodes.
7. A test device for the function of a privacy computing platform, applied to an initiator node, characterized in that: The testing device comprises: A first execution module, configured to execute a test script corresponding to the initiator based on a first predetermined input parameter; The first upload module is used to upload local test data to the test integration platform; The second creation module is used to create a test task or service based on the test data uploaded by the initiator node and the participant node; The notification module is used to execute the test task or service together with the participating node, and collect and notify the test results.
8. A method for testing the function of a privacy computing platform, applied to a participant node, characterized in that: The test method includes: Based on the second predetermined input parameter, executing the test script corresponding to the participant; Upload local test data to the test integration platform; Together with the initiator node, it executes the test tasks or services created based on the test data uploaded by the initiator node and the participant nodes.
9. The testing method according to claim 8, characterized in that: Before jointly executing with the initiator node a test task or service created based on the test data uploaded by the initiator node and the participant nodes, the following also applies: Mutual authorization is performed with the initiator node.
10. A testing device for the function of a privacy computing platform, applied to a participant node, characterized in that: The testing device comprises: A second execution module, used for executing a test script corresponding to a participant based on a second predetermined input parameter; The second upload module is used to upload local test data to the test integration platform; The third execution module is used to jointly execute with the initiator node the test task or service created based on the test data uploaded by the initiator node and the participant nodes.