Method and device for executing multi-party computing task, electronic equipment and storage medium
By identifying the role of the target node and configure the management authority, it provides the operation process of different interfaces, solves the problem of complex and inconvenience of multi -party security computing operations, and improves the convenience of operation and user experience.
Patent Information
- Application Number
- CN202411848423.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2044-12-16
AI Technical Summary
The operation of multi-party security computing is complex and inconvenient. Users need to have deep cryptography knowledge and programming capabilities, and the operation interface is complex, making it difficult for users to distinguish between initiators and data providers.
By identifying the role of the target node and configure the corresponding management authority, different interface operation processes are provided, so that the sponsor and participants can operate according to the operation process provided by the interface to simplify the execution of multi -party computing tasks.
It has improved the convenience of operations for multi -party security computing, reduced the difficulty of selecting the corresponding operating options in the complex interface, and enhancing the user experience and operation intuition.
Smart Images

Figure CN119337429A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer system technology, and in particular to a method, device, electronic device and storage medium for performing multi-party computing tasks. Background Art
[0002] MPC (Multi-Party Computation) technology allows multiple parties to collaboratively calculate an agreed function without a trusted third party, ensuring that, in addition to the calculation results, each party cannot infer the original data of other parties through the interactive data. This feature gives MPC a natural advantage in privacy protection and data security.
[0003] However, the implementation of MPC relies on complex cryptographic algorithms and protocols, such as homomorphic encryption, secret sharing, and oblivious transmission. These technologies require users to have deep cryptographic knowledge and programming skills. Especially during the interface operation process, users often do not know whether they are the task initiator or the data provider. The complex operation interface makes it difficult for users to get started, which increases the complexity and inconvenience of the operation. Summary of the invention
[0004] The present application provides a method, device, electronic device and storage medium for performing multi-party computing tasks to solve the problems of complex and inconvenient operations during multi-party secure computing.
[0005] In a first aspect, the present application provides a method for performing a multi-party computing task, the method comprising: Assigning a role to the target node according to a target event triggered by the target node, wherein the role identifier carried in the target event is used to indicate that the target node is an initiator or a participant of a multi-party computing task, and the multi-party computing task includes an initiator and at least one participant; Configuring management permissions for the target node according to the assigned role, wherein the initiator is configured to allow provision of data and access to data, and the participant is configured to allow provision of data; The multi-party computing task is executed using the interface operation process corresponding to the management authority, wherein each node can be applied to at least one multi-party computing task, and the role of each node in different multi-party computing tasks can be converted.
[0006] Optionally, executing the multi-party computing task using the interface operation process corresponding to the management authority includes: Reading a preset configuration file, wherein the configuration file includes a data import method and corresponding import configuration parameters; Importing node data using the data import method and the import configuration parameters, wherein the node data is part of the data held by the current node and used to calculate the multi-party computing task; In the case where it is detected that the target node is a participant, constructing and publishing a sub-model of the participant according to the node data, wherein the sub-model is used to indicate a calculation model constructed according to the node data, and the published sub-model is in an authorized whitelist; When a query request from the initiator is detected, the multi-party computing task is performed in combination with the node data of the initiator and the sub-model of each of the participants.
[0007] Optionally, after constructing and publishing the sub-model of the participant according to the node data, the method further includes: Real-time monitoring of on-chain logs through event-driven mechanisms; In the case where it is detected that the on-chain log is updated, if it is detected that the on-chain log contains a specific field indicating the sub-model, the on-chain log is parsed and the model information of the sub-model is extracted; If it is determined according to the model information that the sub-model is not in the current authorization whitelist, the authorization whitelist is updated according to the model information, and the sub-model in the blockchain is updated, wherein the setting field of the sub-model is marked with meta-information of the sub-model, and the meta-information is used to record the creation data and update data of the sub-model.
[0008] Optionally, when a query request from the initiator is detected, performing the multi-party computing task in combination with the node data of the initiator and the sub-model of each of the participants includes: Obtaining a query request sent by the initiator; If it is determined that the sub-model of the participant associated with the query request is in the authorized whitelist, then obtaining the sub-model of each participant and the node data of the initiator; Integrate the acquired sub-models of the participants and the node data of the initiator into a preset overall calculation model; Configuring task parameters of the multi-party computing task based on the integrated computing model, wherein the task parameters include role allocation and computing logic; The multi-party computing task is executed according to the task parameters, and the query result is fed back to the initiator.
[0009] Optionally, obtaining the sub-model of each participant includes: According to the participant associated with the query request, sending a call request to the participant; Obtaining the authorization identifier fed back by the participant based on the call request; Access and obtain the sub-model of the participant according to the authorization identifier.
[0010] Optionally, importing node data using the data import method and the import configuration parameters includes: If the data import method is database import, the node data is imported according to database connection parameters and set query statements; If the data import method is interface import, import the node data according to the interface connection and request parameters; If the data import method is file import, the node data is imported according to the file path and file format; If the data import method is user input, the node data is imported according to the validation rules of the input data.
[0011] Optionally, after constructing the sub-model of the participant according to the node data, the method further includes: Scan the on-chain logs regularly through the built-in scheduled tasks; If the on-chain log contains a newly added sub-model or an updated sub-model, a notification event is triggered to a preset functional component so that the functional component takes corresponding actions according to the new log.
[0012] In a second aspect, the present application provides a module for performing a multi-party computing task, the module comprising: an assignment module, configured to assign a role to a target node according to a target event triggered by the target node, wherein the role identifier carried in the target event is used to indicate that the target node is an initiator or a participant of a multi-party computing task, wherein the multi-party computing task includes an initiator and at least one participant; a configuration module, configured to configure management rights for the target node according to the assigned role, wherein the initiator is configured to allow provision of data and access to data, and the participant is configured to allow provision of data; An execution module is used to execute the multi-party computing task using the interface operation process corresponding to the management authority, wherein each node can be applied to at least one multi-party computing task, and the role of each node in different multi-party computing tasks can be converted.
[0013] In a third aspect, the present application provides an electronic device comprising: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor connected to the at least one bus; and at least one memory connected to the at least one bus.
[0014] In a fourth aspect, the present application further provides a computer storage medium storing computer executable instructions, wherein the computer executable instructions are used to execute the method for performing a multi-party computing task as described in any one of the above items of the present application.
[0015] The above technical solution provided by the embodiment of the present application has the following advantages compared with the prior art: by identifying the role of the node and configuring the corresponding management authority of the role, it can be ensured that the users of the initiator and the participant can view different interfaces, so that the user can complete the multi-party computing task by operating according to the operation process provided by the interface. The interfaces of the initiator and the participant are distinguished, and intuitive operation guidance can be provided. The user does not need to select the operation option corresponding to a certain role in a complex interface, thereby improving the convenience of operation during multi-party secure computing. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0018] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0019] Figure 1 A schematic diagram of a system for performing multi-party computing tasks provided in an embodiment of the present application; Figure 2 A flowchart of a method for performing a multi-party computing task provided in an embodiment of the present application; Figure 3 A schematic diagram of the overall process of executing a multi-party computing task provided in an embodiment of the present application; Figure 4 A schematic diagram of data import, data cleaning and data adaptation provided in an embodiment of the present application; Figure 5 A signaling diagram for participants to build, publish sub-models, and update authorization whitelists provided in an embodiment of the present application; Figure 6 A signaling diagram for the initiator to periodically synchronize logs and query data provided in an embodiment of the present application; Figure 7A schematic diagram of the structure of a device for performing multi-party computing tasks provided in an embodiment of the present application; Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0020] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are 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.
[0021] The disclosure below provides many different embodiments or examples to realize the different structures of the present application. In order to simplify the disclosure of the present application, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present application. In addition, the present application can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.
[0022] In order to solve the problems mentioned in the background technology, according to one aspect of an embodiment of the present application, an embodiment of executing a multi-party computing task is provided.
[0023] Optionally, in the embodiment of the present application, the above method for executing a multi-party computing task can be applied to: Figure 1 In the hardware environment composed of the terminal 101 and the server 103 shown in FIG. Figure 1 As shown, the user executes the interface management process of the initiator or participant on the terminal, and the server 103 is connected to the terminal 101 through the network to perform multi-party computing tasks according to the operations of the multi-party nodes. The database 105 can be set on the server or independently of the server to provide data storage services for the server 103. The above-mentioned network includes but is not limited to: wide area network, metropolitan area network or local area network, and the terminal 101 includes but is not limited to PC, mobile phone, tablet computer, etc.
[0024] The following will be combined with a specific implementation method to provide a method for performing a multi-party computing task provided by an embodiment of the present application in detail, and is applied to a server, such as Figure 2 As shown, the specific steps are as follows: Step 201: assigning a role to a target node according to a target event triggered by the target node, wherein the role identifier carried in the target event is used to indicate that the target node is an initiator or participant of a multi-party computing task, and the multi-party computing task includes an initiator and at least one participant; Step 202: configuring management permissions for the target node according to the assigned role, wherein the initiator is configured to allow provision of data and access to data, and the participant is configured to allow provision of data; Step 203: Execute the multi-party computing task using the interface operation process corresponding to the management authority, wherein each node can be applied to at least one multi-party computing task, and the role of each node in different multi-party computing tasks can be switched.
[0025] The system regards each user who participates in multi-party computing as a node, and can also regard each terminal where a user account logs in as a node. After the target node successfully logs in to the system, it initiates a task. The system obtains the user login account and task items, and at this time it is considered that the target event has been triggered. The system pre-stores the correspondence between the user login account, task items and role identifiers, which can be used to determine the role identifier of the target node. It indicates whether the role of the target node in the upcoming multi-party computing task is the initiator or the participant. The initiator is responsible for initializing the computing task and providing the necessary data and parameters, while the participants provide their respective input data. In the same way, the system obtains the role represented by each node. In a multi-party computing task, there is only one initiator, but there can be multiple participants.
[0026] Next, the system configures the corresponding management permissions based on the role of the target node. For the initiator, the system grants it the permission to provide and access data so that it can control the computing process and provide all the information required; for the participants, the system only grants them the permission to provide data, ensuring that they can only submit their own inputs and cannot access the data of other nodes or affect the computing process. When configuring management permissions, the system also implements various security measures, such as encrypted communications, identity authentication, and access control lists, to ensure that only authorized nodes can perform specific operations.
[0027] Finally, the system uses the interface operation process corresponding to the target node management authority to guide users to complete the multi-party computing task. This means that different roles will see different user interfaces, which only display options and functions related to their permissions. After the user provides the necessary input through the interface, the system will start to execute the multi-party computing task.
[0028] In this computing process, each node can participate in at least one multi-party computing task at the same time. The operating system can assign different processes or threads to different CPU cores for parallel execution, and their roles in different tasks can be converted. That is, the same node can be a participant in one multi-party computing task and an initiator in another multi-party computing task. This method allows nodes to flexibly play different roles in MPC tasks, increasing flexibility while ensuring security, and providing support for the flexibility and scalability of the system.
[0029] After the calculation is completed, the system will decide how to distribute the results based on the role of each node. The initiator will receive the complete calculation results, while the participants will only receive partial results related to their input, or receive intermediate results.
[0030] For example, Company A, Company B, and Company C all have their own user blacklists, and they do not want their blacklists to be known to other companies. If Company A wants to check whether a certain user is on the blacklist, then Company A acts as the initiator, and Company B and Company C act as participants. The blacklist data of the three companies are jointly computed by multiple parties, and the result of whether the user exists in the entire blacklist is fed back to Company A.
[0031] Optionally, the role definition process of the initiator and the participant is: when a node contributes its own data and the data can be used, then the node can play the role of the participant in this MPC task. Correspondingly, when a node uses the data provided by other participants to initiate its own MPC task, the node plays the role of the initiator.
[0032] Alternatively, multi-party computing is a cryptographic technique that allows multiple data owners to jointly calculate the result of a function while protecting the privacy of their respective inputs. In the scenario of private data query, multi-party secure computing technology can ensure that neither the initiator nor the participants will leak their private information.
[0033] In this application, by identifying the role of the node and configuring the corresponding management authority of the role, it can be ensured that the users of the initiator and the participants can view different interfaces, so that the users can complete the multi-party computing task by operating according to the operation process provided by the interface. The interfaces of the initiator and the participants are distinguished, which can provide intuitive operation guidance, and the user does not need to select the operation option corresponding to a certain role in a complex interface, thereby improving the convenience of operation during multi-party secure computing. While applying multi-party computing to ensure user privacy, this application also provides convenience for user operation, achieving a balance between user privacy protection and operational convenience.
[0034] In addition, this application provides corresponding graphical interfaces and button operations for users who play different roles. The graphical interface operation is intuitive and convenient. Users only need to click buttons to complete related operations, avoiding cumbersome command line operations and configuration processes. Users do not need to master complex cryptography and programming knowledge to complete MPC privacy data sharing, which improves user experience. This method greatly reduces the technical threshold and promotes the popularization of MPC technology. In addition, through process optimization, each step of the operation is streamlined, and the complex operations of MPC are encapsulated in the background. Users only need to focus on the operations of the front-end interface, which reduces the possibility of errors and enhances the operability and reliability of the system.
[0035] As an optional implementation, in step 203, executing the multi-party computing task using the interface operation process corresponding to the management authority includes the following steps: Step S11: reading a preset configuration file, wherein the configuration file includes a data import method and corresponding import configuration parameters; Step S12: importing node data using a data import method and import configuration parameters, wherein the node data is part of the data held by the current node and used to calculate the multi-party computing task; Step S13: when it is detected that the target node is a participant, a sub-model of the participant is constructed and published according to the node data, wherein the sub-model is used to indicate a calculation model constructed according to the node data, and the published sub-model is in the authorized whitelist; Step S14: When a query request from the initiator is detected, the multi-party computing task is performed by combining the node data of the initiator and the sub-model of each participant.
[0036] The framework of the present application supports importing node data from different data sources. For different data sources, the data import method and import configuration parameters are also different. The embodiment of the present application stores the data import method and import configuration parameters adapted by the target node in the configuration file in advance. When the user clicks the "Import Data" button, the data import method and import configuration parameters are automatically obtained from the configuration file, and then the node data is imported based on the obtained parameters. The interface operation process of importing data is applicable to both the initiator and the participant.
[0037] The original data set is divided into multiple parts, each of which is held by a different data owner (participant and initiator). Each data owner only processes the part of the node data that it holds. Through specific encryption technology and protocols, calculations can be performed without exposing the original data. For example, in a blacklist system, a complete blacklist may be divided into multiple copies, each of which is the responsibility of a data owner. By dividing and assigning data to different data owners, it can be ensured that no single data owner can access the complete sensitive data, thereby protecting the privacy of the data. Even if the data of a data owner is leaked, the leaked data is only a small part of the entire data set and will not have a significant impact on the overall data.
[0038] Optionally, the embodiments of the present application are applicable to a variety of scenarios, such as healthcare, financial risk control, e-commerce platforms or supply chain management, etc. The node data can be the blacklist data of an enterprise, the financial assets of an enterprise, the patient data of a hospital or the user portrait of an e-commerce platform, etc.
[0039] Optionally, after obtaining the node data from the data source, the data needs to be cleaned and adapted to ensure the quality and applicability of the data, enhance the accuracy of MPC calculations, and improve the efficiency of MPC calculations. Data cleaning includes steps such as removing duplicate data, correcting erroneous data, and filling missing data, and data adaptation involves steps such as data format conversion, data standardization and normalization.
[0040] After importing the node data, the system opens different interface operation processes for participants and initiators. For participants, the system builds a sub-model based on the node data of the participants and publishes it to the authorized whitelist. The sub-model refers to the calculation model built based on the node data. The sub-model is part of the total calculation model and is used for multi-party computing tasks. In this way, each participant is responsible for maintaining and updating its own sub-model, and through the whitelist authorization mechanism, only authorized participants can access specific sub-models, which enhances the security of the system and prevents unauthorized access.
[0041] For the initiator, if the user initiates a query request, such as requesting to query whether a certain user is on the enterprise blacklist, the system obtains the node data of the initiator and obtains the sub-model of each participant from the authorized whitelist, and then integrates the node data of the initiator and the sub-model of the participant to form a complete computing model, thereby executing the multi-party computing task, and finally feeding back the query results to the initiator.
[0042] In this application, the participants and the initiator use the same data import process, and then start to display different interfaces. The participants use their own operation process to build and publish sub-models, and the initiator uses its own operation process to perform multi-party computing tasks and obtain query results. This process ensures data security and compliance while simplifying the user's operation interface.
[0043] As an optional implementation, after constructing and publishing the sub-model of the participant according to the node data (step S13), the method further includes the following steps: Step S21: Real-time monitoring of on-chain logs through an event-driven mechanism; Step S22: When it is detected that the on-chain log is updated, if it is detected that the on-chain log contains a specific field indicating a sub-model, the on-chain log is parsed and the model information of the sub-model is extracted; Step S23: If it is determined according to the model information that the sub-model is not in the current authorization whitelist, the authorization whitelist is updated according to the model information, and the sub-model in the blockchain is updated, wherein the setting field of the sub-model is marked with the meta-information of the sub-model, and the meta-information is used to record the creation data and update data of the sub-model.
[0044] An event listener is set up in the system to listen to log events on the blockchain. Once a new log event is detected, it is immediately checked whether the new log event contains specific fields indicating the sub-model (such as sub-model ID, participant ID, etc.). If these fields are contained, the system parses the log to extract the model information of the sub-model, such as sub-model ID, participant ID, etc. The system obtains the current authorized whitelist and checks whether the sub-model ID is already included in it. If the sub-model ID is not in the current whitelist, it needs to be added to the whitelist, or if the sub-model ID is already in the whitelist, but the log shows that the sub-model has been updated (such as the update time has changed), the relevant information in the whitelist needs to be updated. At the same time, the sub-model information in the blockchain is updated to ensure that the latest sub-model data is recorded.
[0045] In addition, it is also necessary to annotate meta information in the setting fields of the sub-model (such as the extra field). The sub-model usually contains some meta information, such as data source, creation time, and last modification time. This meta information helps to record the creation time and update time of the sub-model. Through the meta information, other participants can identify and use the sub-model, which enhances the traceability and transparency of the data.
[0046] The entire process of this application is completed on the blockchain. Through blockchain technology, all operations and data updates are ensured to be transparent, which increases the credibility and transparency of the system.
[0047] In this application, an event-driven mechanism is used to monitor logs. Compared with the timed synchronization data in the prior art, this application can detect any updated or newly added sub-models in a timely manner; by checking the authorized whitelist and updating the whitelist, it is ensured that only authorized sub-models can be used, which enhances the security and privacy protection capabilities of the system. In addition, meta information is annotated in the setting field of the sub-model to record the creation time and update time of the sub-model, providing complete audit and tracking capabilities, which is convenient for subsequent monitoring and review.
[0048] The present application adopts an event-driven mechanism to monitor logs. Compared with the timed synchronization data in the prior art, the present application can promptly detect any updated or newly added sub-models.
[0049] As an optional implementation, in step S14, when a query request from the initiator is detected, performing the multi-party computing task in combination with the node data of the initiator and the sub-model of each participant includes the following steps: Step S141: obtaining a query request sent by the initiator; Step S142: if it is determined that the sub-model of the participant associated with the query request is in the authorized whitelist, the sub-model of each participant and the node data of the initiator are obtained; Step S143: Integrate the acquired sub-models of the participants and the node data of the initiator into the preset overall calculation model; Step S144: configuring task parameters of the multi-party computing task based on the integrated computing model, wherein the task parameters include role allocation and computing logic; Step S145: Execute the multi-party computing task according to the task parameters, and feed back the query results to the initiator.
[0050] The initiator sends a query request through the corresponding interface or API. The query request usually contains the data to be queried (such as sub-model ID, participant ID) and related meta-information (such as user ID, timestamp, etc.). The system saves this data in the database for subsequent auditing and monitoring.
[0051] The system determines whether the sub-models of all participants involved in the query request are in the current authorization whitelist. If a sub-model is not in the authorization whitelist, the system will reject the query request or prompt the initiator to resubmit; if each sub-model is in the authorization whitelist, the system obtains the sub-model of each participant from the authorization whitelist and obtains the node data of the initiator, where the node data of the initiator is part of the data held locally by the initiator. Through the authorization whitelist mechanism, it is ensured that only the sub-models of authorized participants are used, which improves the security of the system.
[0052] The system confirms the integrity and consistency of the acquired sub-model and node data to ensure that the data is not damaged or lost, then integrates the sub-models of each participant and the node data of the initiator into a preset overall computing model, and then configures the task parameters. The multi-party computing task is started according to the configured task parameters, and the asynchronous MPC algorithm or other suitable algorithms are used for distributed computing to ensure data privacy and security. The calculation results are then persistently stored to ensure the long-term availability of the data. Finally, the query results are fed back to the initiator and returned through the front-end interface or API.
[0053] Optionally, the total computing model is composed of sub-models of multiple participants, which can process the data of multiple participants and support specific computing logic. When the initiator needs to perform a multi-party computing task, it will integrate its own node data and the acquired sub-models of the participants into the preset total computing model. This process involves multiple links such as data integration, model fusion, and aggregation of computing results. In this way, the initiator can use the data and model resources of all participants to jointly complete complex computing tasks and obtain more accurate and reliable results.
[0054] Optionally, configuring task parameters includes defining role allocation of participants and configuring computing logic. Role allocation is used to specify the role of each participant in the computing task (such as initiator, participant); computing logic is used to define specific computing methods and algorithms to ensure that the computing task can be performed as expected.
[0055] Optionally, when the system obtains the sub-model of the participants and the node data of the initiator, these data will be configured with security parameters such as encryption keys and authentication mechanisms to ensure the security of data transmission and calculation processes.
[0056] This application verifies whether the sub-model is in the authorized whitelist to ensure that only authorized parties can update the node data, that is, only the sub-models of authorized parties are used, thereby improving the security of the system.
[0057] As an optional implementation, in step S142, obtaining the sub-model of each participant includes: sending a call request to the participant according to the participant associated with the query request; obtaining the authorization identifier fed back by the participant based on the call request; and accessing and obtaining the sub-model of the participant according to the authorization identifier.
[0058] Based on the query request of the initiator, the system determines all relevant participants, and then generates a call request containing necessary information, such as the initiator ID, query request ID and timestamp. The call request may also include some meta-information so that the participants can verify the legitimacy of the request. The system sends the call request to the node of each participant.
[0059] After receiving the call request, the participant verifies and generates an authorization identifier. The authorization identifier is usually a unique token or key that indicates that the initiator is allowed to use the participant's sub-model. Based on the authorization identifier, the system constructs an access request, which contains the authorization identifier and other necessary information (such as the participant ID, sub-model ID, etc.), and sends the access request to the participant's node. After receiving the access request, the participant verifies the validity of the authorization identifier. If the authorization identifier is valid, the participant returns the sub-model to the system. The sub-model data may include actual data and related meta-information (such as creation time, update time, etc.). After receiving the sub-model data, the system performs an integrity check to ensure that the data is not damaged or tampered with.
[0060] This application uses an authorization identification mechanism to ensure that only authorized requests can access the sub-model of the participant, thereby improving the security of the system.
[0061] As an optional implementation, in step S12, importing node data using a data import method and importing configuration parameters includes: If the data import method is database import, the node data is imported according to the database connection parameters and the set query statements; If the data import method is interface import, the node data is imported according to the interface connection and request parameters; If the data import method is file import, the node data is imported according to the file path and file format; If the data import method is user input, the node data is imported according to the validation rules of the input data.
[0062] This application uses the data source as the input of the multi-party computing task, which can provide the original data required for data query. The data import methods supported in the embodiments of this application include database import, interface import, file import and user input. The user can choose any of the following methods to import data, and each data import method is described below.
[0063] 1. Database import: Import configuration parameters include database connection parameters and query statements (for example). Before using database import, you need to configure the node local database to store and manage node data. Database import can retrieve information from the database through SQL query language.
[0064] For example, if the configuration file includes database initialization parameters (host address, port, database name, user name and password, etc.), indicating that the database is used as the data source, then a connection to the database is established.
[0065] 2. Interface import: Import configuration parameters including interface connection and request parameters. Interface import allows data exchange between different software. It is suitable for data storage in third-party services or provides a unified interface for other systems to call.
[0066] 3. File import: The import configuration parameters include file path and file format, which is applicable to the case where data exists in the form of files and needs to be imported in batches. It also provides data filtering function, allowing users to select specific data for import. File formats include EXCEL, CSV (Comma-Separated Values) or XML, etc.
[0067] 4. User input: Importing configuration parameters includes validation rules for input data. This method allows users to directly edit input information and is suitable for situations where the amount of data is very small and needs to be updated frequently.
[0068] Based on the existing database import, this application adds three more data import methods to provide convenience for users.
[0069] As an optional implementation method, after constructing the sub-model of the participant based on the node data, the method also includes: regularly scanning the on-chain log through a built-in scheduled task; if the on-chain log contains a newly added sub-model or an updated sub-model, triggering a notification event to a preset functional component so that the functional component can take corresponding actions based on the new log.
[0070] A scheduled task is configured in the system. Whenever the scheduled task is triggered, the system will automatically scan the logs on the blockchain. The scanning process includes obtaining the latest log data from the blockchain node and checking whether these logs contain specific fields (such as sub-models). If they contain specific fields, the system will record the results of each scan in the log file or database for subsequent analysis and auditing, and generate a notification event on the other hand. After receiving the notification event, the preset functional component will take corresponding actions based on the content of the event.
[0071] Among them, functional components include but are not limited to: whitelist management component, data synchronization component, audit and logging component, security verification component and user interface (UI) component.
[0072] The actions taken by each functional component based on the new log are as follows: Whitelist management component, when a new release log is found, the whitelist management component needs to check the newly added sub-model and add it to the authorization whitelist to ensure that the latest permission status is reflected in a timely manner.
[0073] Data synchronization component: When a new sub-model is released, the data synchronization component needs to synchronize the new data to the local database to ensure data consistency and up-to-dateness for all participants.
[0074] Audit and logging components: When a new release log is found, the audit and logging components need to record the change to ensure that all operations are traceable for subsequent review and tracking.
[0075] Security verification component: When a new release log is discovered, the security verification component needs to verify whether the participant is in the authorization whitelist to ensure that only authorized participants can access specific data.
[0076] User Interface (UI) Components: When new release logs are found, the UI components can update the displayed information so that users can keep up to date with the latest changes.
[0077] In this application, after the scheduled task scans the logs on the chain and finds a new model publishing log, it triggers an event to notify multiple components within the system, each of which is responsible for different functions. In this way, the system can ensure the consistency, security, auditability and real-time nature of the data, thereby improving the overall reliability and user experience.
[0078] In addition, this application also provides an audit mechanism that uses blockchain to record all operations that access and update node data, facilitating post-audit and monitoring.
[0079] This application also provides an update mechanism. If a database is used as the data source, when a participant detects that its own sub-model is updated, that is, when its own node data is updated, the node data stored in the local database will be updated immediately to ensure data consistency.
[0080] This application provides a schematic diagram of the overall process of executing a multi-party computing task, such as Figure 3 As shown, the following steps are included: Step 1: The node triggers the target event at the terminal, and the system assigns a role to the node and configures management permissions.
[0081] Step 2: The node reads the data import method and import configuration parameters from the configuration file, and then imports the node data from the data source according to the read parameters. The flowchart for importing node data is as follows: Figure 4 As shown, you can use any import method (database import, file import, interface import and manual input) and perform data cleaning.
[0082] Step 3: The participant builds a sub-model based on its own node data and publishes the sub-model to the authorized whitelist.
[0083] Step 4: If a newly added sub-model or an updated sub-model is detected according to the on-chain log, the authorization whitelist is updated synchronously, and the sub-model in the blockchain (including meta information) is updated synchronously.
[0084] Step 5: The initiator initiates a query request.
[0085] Step 6: Based on the query request, if the system detects that the sub-model of the relevant participant is in the authorized whitelist, it sends a call request to the participant.
[0086] Step 7: The participant feeds back an authorization identifier based on the call request, and the system obtains the participant's sub-model based on the authorization identifier.
[0087] Step 8: The system performs multi-party computing tasks based on the sub-models of the participants and the node data of the initiator, and feeds back the query results to the initiator.
[0088] Figure 5 The signaling diagram for building, publishing sub-models, and updating the authorization whitelist for the participants shows that the system configures the data source as a database, then provides the initialization parameters of the database, and the system uses the blockchain environment to read the data source information from the configuration file, thereby obtaining the node data provision method and import configuration parameters, and then publishes the sub-model to the authorization whitelist, annotates the sub-model with meta information, and then dynamically updates the authorization whitelist. Each subsequent detection of a log update requires parsing the log data to update the authorization whitelist.
[0089] Figure 6 The signaling diagram for the initiator to synchronize logs and query data regularly shows that the system uses the blockchain environment to start the scheduled task, thereby synchronizing the logs on the chain. If the log is updated, a notification event is triggered, so that other functional components take corresponding actions. When the initiator initiates a query request, the event processor parses the log to determine whether the sub-model of the participant is included and whether the sub-model is in the authorization whitelist. If the log contains the sub-model of the participant and the sub-model is in the authorization whitelist, the event processor initiates a call request. The node of the participant feedbacks the authorization identifier based on the call request. The system stores the authorization identifier in the blockchain, and then integrates the sub-model of the participant and the node data of the initiator into the preset total calculation model, and finally feedbacks the query results to the initiator.
[0090] Based on the same technical concept, this application provides a module for executing multi-party computing tasks, such as Figure 7 As shown, the module includes: An assignment module 701 is used to assign a role to a target node according to a target event triggered by the target node, wherein the role identifier carried in the target event is used to indicate that the target node is an initiator or a participant of a multi-party computing task, and the multi-party computing task includes an initiator and at least one participant; Configuration module 702, configured to configure management rights for the target node according to the assigned role, wherein the initiator is configured to allow provision of data and access to data, and the participant is configured to allow provision of data; The execution module 703 is used to execute the multi-party computing task using the interface operation process corresponding to the management authority, wherein each node can be applied to at least one multi-party computing task, and the role of each node in different multi-party computing tasks can be converted.
[0091] Optionally, the execution module 703 is used to: Reading a preset configuration file, wherein the configuration file includes a data import method and corresponding import configuration parameters; Import node data using data import mode and import configuration parameters, where node data is part of the data held by the current node and used to calculate multi-party computing tasks; When it is detected that the target node is a participant, a sub-model of the participant is constructed and published according to the node data, wherein the sub-model is used to indicate a calculation model constructed according to the node data, and the published sub-model is in the authorized whitelist; When a query request from the initiator is detected, the multi-party computing task is performed by combining the node data of the initiator and the sub-model of each participant.
[0092] Optionally, the device is also used for: Real-time monitoring of on-chain logs through event-driven mechanisms; When an update of the on-chain log is detected, if it is detected that the on-chain log contains a specific field indicating a sub-model, the on-chain log is parsed and the model information of the sub-model is extracted; If it is determined based on the model information that the sub-model is not in the current authorization whitelist, the authorization whitelist is updated based on the model information, and the sub-model in the blockchain is updated, wherein the setting field of the sub-model is marked with the meta-information of the sub-model, and the meta-information is used to record the creation data and update data of the sub-model.
[0093] Optionally, the execution module 703 is specifically used to: Get the query request sent by the initiator; If it is determined that the sub-model of the participant associated with the query request is in the authorized whitelist, the sub-model of each participant and the node data of the initiator are obtained; Integrate the acquired sub-models of the participants and the node data of the initiator into the preset overall calculation model; Configure task parameters of the multi-party computing task based on the integrated computing model, where the task parameters include role allocation and computing logic; Execute multi-party computing tasks according to task parameters and feedback the query results to the initiator.
[0094] Optionally, the execution module 703 is specifically used to: According to the participants associated with the query request, a call request is sent to the participants; Obtain the authorization identifier of the participant based on the call request feedback; Access and obtain the sub-model of the participant according to the authorization ID.
[0095] Optionally, the execution module 703 is specifically used to: If the data import method is database import, the node data is imported according to the database connection parameters and the set query statements; If the data import method is interface import, the node data is imported according to the interface connection and request parameters; If the data import method is file import, the node data is imported according to the file path and file format; If the data import method is user input, the node data is imported according to the validation rules of the input data.
[0096] Optionally, the device is also used for: Scan the on-chain logs regularly through the built-in scheduled tasks; If the on-chain log contains a newly added sub-model or an updated sub-model, a notification event is triggered to the preset functional component so that the functional component can take corresponding actions based on the new log.
[0097] like Figure 8 As shown, an embodiment of the present application provides an electronic device, including a processor 801, a communication interface 802, a memory 803 and a communication bus 804, wherein the processor 801, the communication interface 802, and the memory 803 communicate with each other through the communication bus 804.
[0098] The memory 803 is used to store computer programs.
[0099] In one embodiment of the present application, the processor 801 is used to implement the method for executing a multi-party computing task provided by any of the aforementioned method embodiments when executing a program stored in the memory 803.
[0100] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the method for executing a multi-party computing task provided in any of the aforementioned method embodiments are implemented.
[0101] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0102] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution, in essence, or the part that contributes to the relevant technology, can be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiment.
[0103] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0104] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.
Claims
1. A method for executing a multi-party computing task, characterized in that: The method comprises: Assigning a role to the target node according to a target event triggered by the target node, wherein the role identifier carried in the target event is used to indicate that the target node is an initiator or a participant of a multi-party computing task, and the multi-party computing task includes an initiator and at least one participant; Configuring management permissions for the target node according to the assigned role, wherein the initiator is configured to allow provision of data and access to data, and the participant is configured to allow provision of data; The multi-party computing task is executed using the interface operation process corresponding to the management authority, wherein each node can be applied to at least one multi-party computing task, and the role of each node in different multi-party computing tasks can be converted.
2. The method according to claim 1, characterized in that Executing the multi-party computing task using the interface operation process corresponding to the management authority includes: Reading a preset configuration file, wherein the configuration file includes a data import method and corresponding import configuration parameters; Importing node data using the data import method and the import configuration parameters, wherein the node data is part of the data held by the current node and used to calculate the multi-party computing task; In the case where it is detected that the target node is a participant, constructing and publishing a sub-model of the participant according to the node data, wherein the sub-model is used to indicate a calculation model constructed according to the node data, and the published sub-model is in an authorized whitelist; When a query request from the initiator is detected, the multi-party computing task is performed in combination with the node data of the initiator and the sub-model of each of the participants.
3. The method according to claim 2, characterized in that After constructing and publishing the sub-model of the participant according to the node data, the method further includes: Real-time monitoring of on-chain logs through event-driven mechanisms; In the case where it is detected that the on-chain log is updated, if it is detected that the on-chain log contains a specific field indicating the sub-model, the on-chain log is parsed and the model information of the sub-model is extracted; If it is determined according to the model information that the sub-model is not in the current authorization whitelist, the authorization whitelist is updated according to the model information, and the sub-model in the blockchain is updated, wherein the setting field of the sub-model is marked with meta-information of the sub-model, and the meta-information is used to record the creation data and update data of the sub-model.
4. The method according to claim 3, characterized in that In the case where the query request of the initiator is detected, performing the multi-party computing task in combination with the node data of the initiator and the sub-model of each of the participants includes: Obtaining a query request sent by the initiator; If it is determined that the sub-model of the participant associated with the query request is in the authorized whitelist, then obtaining the sub-model of each participant and the node data of the initiator; Integrate the acquired sub-model of the participant and the node data of the initiator into a preset overall calculation model; Configuring task parameters of the multi-party computing task based on the integrated computing model, wherein the task parameters include role allocation and computing logic; The multi-party computing task is executed according to the task parameters, and the query result is fed back to the initiator.
5. The method according to claim 4, characterized in that Obtaining the sub-model of each of the participants includes: According to the participant associated with the query request, sending a call request to the participant; Obtaining the authorization identifier fed back by the participant based on the call request; Access and obtain the sub-model of the participant according to the authorization identifier.
6. The method according to claim 2, characterized in that Importing node data using the data import method and the import configuration parameters includes: If the data import method is database import, the node data is imported according to database connection parameters and set query statements; If the data import method is interface import, import the node data according to the interface connection and request parameters; If the data import method is file import, the node data is imported according to the file path and file format; If the data import method is user input, the node data is imported according to the validation rules of the input data.
7. The method according to claim 3, characterized in that After constructing the sub-model of the participant according to the node data, the method further includes: Scan the on-chain logs regularly through the built-in scheduled tasks; If the on-chain log contains a newly added sub-model or an updated sub-model, a notification event is triggered to a preset functional component so that the functional component takes corresponding actions according to the new log.
8. A module for executing multi-party computing tasks, characterized in that: The modules include: an assignment module, configured to assign a role to a target node according to a target event triggered by the target node, wherein the role identifier carried in the target event is used to indicate that the target node is an initiator or a participant of a multi-party computing task, wherein the multi-party computing task includes an initiator and at least one participant; a configuration module, configured to configure management rights for the target node according to the assigned role, wherein the initiator is configured to allow provision of data and access to data, and the participant is configured to allow provision of data; An execution module is used to execute the multi-party computing task using the interface operation process corresponding to the management authority, wherein each node can be applied to at least one multi-party computing task, and the role of each node in different multi-party computing tasks can be converted.
9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing any of the methods described in claims 1-7 when executing a program stored in a memory.
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 method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Input data calculation method, calculation engine and storage medium
CN111753315A
Longitudinal federated learning incentive training method, electronic device and storage medium
CN112328698A
Data sharing method of multiple bidding and tendering platforms based on block chain and related equipment
CN113569278A
Secure multi-party computing method and system and computer readable medium
CN115065461A
Data co-processing method and system, block chain node equipment and storage medium
CN115098884A