A data verification method, server and communication device
By comparing and verifying the keys between the first and second servers in a multi-party secure computation, the problem of low data credibility caused by malicious participants is solved, thereby improving data credibility and ensuring the secure execution of tasks.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA MOBILE COMM LTD RES INST
- Filing Date
- 2021-12-07
- Publication Date
- 2026-08-04
AI Technical Summary
Existing secure multi-party computation protocols assume honesty among participants, but in reality, the reliability of the data is low when malicious participants are present.
The credibility of input data in multi-party secure computation tasks is ensured by verifying the key comparison between the first and second servers, including generating and comparing keys to detect data modification behavior.
It improves the credibility of data in multi-party secure computation tasks, promptly detects and handles data modification behavior by malicious participants, and ensures the secure execution of tasks.
Smart Images

Figure CN116305062B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a data verification method, server, and communication equipment. Background Technology
[0002] According to the definition of secure multi-party computation, an ideal secure multi-party computation protocol assumes the existence of an honest and trustworthy third party who will not disclose private information or transmit false information. However, in reality, trustworthy third parties often do not exist for various reasons. Therefore, it is necessary to design secure multi-role coordination mechanisms in the absence of a third party. Current secure multi-party computation mechanisms are based on the assumption of semi-honest participants, meaning they assume no data falsification. However, the presence of dishonest actions by malicious participants will lead to lower data credibility. Summary of the Invention
[0003] This application provides a data verification method, server, and communication device to address the problem of low data credibility.
[0004] In a first aspect, embodiments of this application provide a data verification method, including:
[0005] The first server obtains a first key sent by the second server, the first key being generated based on the first task data of the second server;
[0006] The first server obtains the second task data sent by the second server, wherein the second task data is the task data for the second server to perform a multi-party secure computation task;
[0007] The first server generates a second key based on the second task data;
[0008] The first server compares the second key with the first key to verify whether the second task data matches the first task data.
[0009] Secondly, embodiments of this application also provide a data verification method, including:
[0010] The second server obtains the first task data and generates a first key based on the first task data;
[0011] The second server sends the first key to the first server;
[0012] The second server sends second task data to the first server. The second task data is the task data for the second server to perform a multi-party secure computation task. The second task data is used by the first server to generate a second key. The first key and the second key are used by the first server to verify whether the second task data matches the first task data.
[0013] Thirdly, this application also provides a server, which is a first server, comprising:
[0014] The first acquisition module is used to acquire a first key sent by the second server, wherein the first key is generated based on the first task data of the second server.
[0015] The second acquisition module is used to acquire the second task data sent by the second server, wherein the second task data is the task data of the second server performing a multi-party secure computation task.
[0016] The first generation module is used to generate a second key based on the second task data;
[0017] The first comparison module is used to compare the second key with the first key to verify whether the second task data matches the first task data.
[0018] Fourthly, this application also provides a server, which is a second server, comprising:
[0019] The third acquisition module is used to acquire the first task data and generate a first key based on the first task data;
[0020] The first sending module is used to send the first key to the first server;
[0021] The second sending module is used to send second task data to the first server. The second task data is task data for the second server to perform a multi-party secure computation task. The second task data is used by the first server to generate a second key. The first key and the second key are used by the first server to verify whether the second task data matches the first task data.
[0022] Fifthly, embodiments of this application also provide a communication device, including: a transceiver, a memory, a processor, and a program stored in the memory and executable on the processor; the processor is configured to read the program in the memory to implement the steps in the method described in the first aspect of the embodiments of this application.
[0023] In a sixth aspect, embodiments of this application also provide a readable storage medium storing a program that, when executed by a processor, implements the steps of the method described in the first aspect of embodiments of this application.
[0024] In this embodiment, a first server obtains a first key sent by a second server, the first key being generated based on first task data from the second server; the first server also obtains second task data sent by the second server, the second task data being task data for the second server to perform a multi-party secure computation task; the first server generates a second key based on the second task data; and the first server compares the second key with the first key to verify whether the second task data matches the first task data. That is, by comparing the first key generated based on the first task data with the second key generated based on the second task data, the first server can verify whether the second task data matches the first task data, thereby confirming whether the second server has modified data during the execution of the multi-party secure computation task, thus improving data credibility. Attached Figure Description
[0025] To more clearly illustrate the technical solutions of this application, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0026] Figure 1 This is a flowchart illustrating a data verification method provided in an embodiment of this application;
[0027] Figure 2 This is a flowchart illustrating another data verification method provided in an embodiment of this application;
[0028] Figure 3 This is a schematic diagram illustrating the connection sequence between a participant and a configuration center, provided in an embodiment of this application.
[0029] Figure 4 This is a schematic diagram of an authorized connection provided in an embodiment of this application;
[0030] Figure 5 This is a schematic diagram of the structure of a server provided in an embodiment of this application;
[0031] Figure 6 This is a schematic diagram of another server structure provided in an embodiment of this application;
[0032] Figure 7This is a schematic diagram of the structure of a communication device provided in an embodiment of this application;
[0033] Figure 8 This is a schematic diagram of the structure of another communication device provided in an embodiment of this application. Detailed Implementation
[0034] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0035] The terms "first," "second," etc., used in the embodiments of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or devices. Additionally, the use of "and / or" in this application indicates at least one of the connected objects, such as A and / or B and / or C, representing seven possibilities: including A alone, B alone, C alone, and the presence of both A and B, both B and C, both A and C, and the presence of A, B, and C.
[0036] Please see Figure 1 , Figure 1 This is a flowchart illustrating a data verification method provided in an embodiment of this application, as shown below. Figure 1 As shown, it includes the following steps:
[0037] Step 101: The first server obtains the first key sent by the second server, which is generated based on the first task data of the second server.
[0038] In some embodiments, the data verification method described above can be applied to multi-party secure computation task scenarios, that is, the data participating in the computation task can be verified using the data verification method described above. The first server mentioned above is the server that verifies the data of multiple parties participating in the computation task, and the second server mentioned above is the server corresponding to any one of the parties.
[0039] The aforementioned first task data refers to the task data sent by the second server to the first server. For example, it could be task data sent by the second server to the first server before executing the multi-party secure computation task, informing the first server of the task data to be used during the execution of the multi-party secure computation task; or it could be task data sent by the second server to the first server during the execution of the multi-party secure computation task, informing the first server of the task data to be used at a certain moment during the execution of the multi-party secure computation task. It can be understood that the aforementioned first key can be generated from data sampled from the aforementioned first task data according to preset rules.
[0040] Step 102: Obtain the second task data sent by the second server. The second task data is the task data for the second server to perform a multi-party secure computation task.
[0041] The aforementioned first task data and second task data can be input data from different moments during the execution of the multi-party secure computation task by the second server. By verifying whether the first task data and the second task data match, it can be determined whether the second server has modified the input data during the execution of the multi-party secure computation task, thereby improving the credibility of the input data during the multi-party secure computation task. It can be understood that the acquisition of the first task data precedes the acquisition of the second task data, and the second task data can be task data used in real-time by the second server during the execution of the multi-party secure computation task.
[0042] Optionally, in step 102, the first server obtaining the second task data sent by the second server may specifically include the following steps:
[0043] The first server acquires the second task data sent by the second server at preset time intervals.
[0044] It is understood that the first server may acquire the second task data multiple times, and the specific acquisition time can be determined according to data verification needs during the execution of the multi-party secure computation task by the second server, thereby verifying the task data used in the execution of the multi-party secure computation task multiple times. If the preset time interval is short, the verification frequency of the task data can be increased, so that modifications to the task data by the second server can be detected in a timely manner.
[0045] In addition, in a multi-party secure computation scenario, the second server can be understood as any participating server that performs a multi-party secure computation task, and the first server can be understood as a server that verifies the data input by the participating server when performing the task. The first server can also verify the data input by multiple participating servers performing the multi-party secure computation task through a polling method.
[0046] In this embodiment, the first server acquires the second task data sent by the second server at preset time intervals. The second task data used by the second server to execute the multi-party secure computation task can be verified multiple times. By acquiring and verifying the data at preset time intervals, the data modification behavior of the second server during the execution of the multi-party secure computation task can be detected as soon as possible, thereby improving the data credibility of the multi-party secure computation task and the security of task execution.
[0047] Step 103: Generate a second key based on the second task data.
[0048] It is understood that the generation method of the second key is consistent with the generation method of the first key. Therefore, if the second server does not alter the second task data participating in the multi-party secure computation task (i.e., if the first task data and the second task data are identical), the first key and the second key can be successfully matched. Specifically, the generation method of the first or second key can be agreed upon by the servers participating in the multi-party secure computation task, or it can be determined by the first server. For example, based on the current time, the clock sequence and network card physical address of the second server, and data sampled from the first or second task data, an encryption algorithm can be used to generate the corresponding first or second key. The specific sampling method can be predetermined.
[0049] Step 104: Compare the second key with the first key to verify whether the second task data matches the first task data.
[0050] Where the second key can be matched with the first key, it can be determined that the second task data matches the first task data. The matching can be understood as the data content of the two being completely consistent. It can be understood that in some embodiments, the first key and the second key include time information, and the matching can also be understood as the data content other than the time information being consistent.
[0051] In this embodiment, a first server obtains a first key sent by a second server, the first key being generated based on first task data from the second server; the first server also obtains second task data sent by the second server, the second task data being task data for the second server to perform a multi-party secure computation task; the first server generates a second key based on the second task data; and the first server compares the second key with the first key to verify whether the second task data matches the first task data. That is, by comparing the first key generated based on the first task data with the second key generated based on the second task data, the first server can verify whether the second task data matches the first task data, thereby confirming whether the second server has modified data during the execution of the multi-party secure computation task, thus improving data credibility.
[0052] Optionally, if the second task data matches the first task data, the method may further include the following steps:
[0053] The first server receives the first heartbeat packet sent by the second server;
[0054] In response to the first heartbeat packet, the first server sends a second heartbeat packet to the second server.
[0055] Wherein, if the second task data matches the first task data, a WebSocket (bidirectional communication) connection can be established between the first server and the second server.
[0056] It is understood that the aforementioned first heartbeat packet can be sent periodically by the aforementioned second server. Specifically, the aforementioned second server can set a timer for sending the aforementioned first heartbeat packet. By receiving the aforementioned periodically sent first heartbeat packet, the aforementioned first server can periodically obtain the status of the aforementioned second server, and by responding to the aforementioned first heartbeat packet, send a second heartbeat packet to the aforementioned second server to realize the periodic notification of the status of the aforementioned first server.
[0057] In this embodiment, the first server can obtain the status data of the second server by receiving a first heartbeat packet sent by the second server, ensuring that the second server and the first server are in a connected state. The first server then sends a second heartbeat packet to the second server, thereby informing the second server of the status of the first server, realizing the updating and confirmation of the status of both parties. Furthermore, message exchange can also be achieved while the first server and the second server maintain a communication connection.
[0058] Furthermore, after receiving the first heartbeat packet sent by the second server, the first server can record or update the status data of the second server in the first heartbeat packet to its database. Similarly, after the first server responds to the first heartbeat packet and sends a second heartbeat packet to the second server, the second server can record or update the status data of the first server in the second heartbeat packet to its database. It is understood that the database can be a local database or a remote database, and the type of database can be determined according to the actual situation; this application does not impose any restrictions on this.
[0059] Optionally, the second heartbeat packet includes a query instruction, which is used to query the status of the second server;
[0060] After the first server responds to the first heartbeat packet and sends a second heartbeat packet to the second server, the method may include the following steps:
[0061] If the first server receives a response message within a preset time, it sends a connection command to the second server, the connection command instructing the second server to establish a communication connection with the third server; or...
[0062] If the first server does not receive the response message within a preset time, it instructs the third server to stop executing the multi-party secure computation task;
[0063] The response message is a message sent by the second server in response to the query command, and the third server is a server other than the second server among the multiple servers executing the multi-party secure computation task.
[0064] It is understood that a communication connection has been established between the third server and the first server. When the second task data matches the first task data, a communication connection has been established between the first server and the second server. The first server can obtain the information required by the second server and the third server to connect to other servers performing the multi-party secure computation task. If the first server receives a response message within a preset time, it can confirm that the second server and the first server are in a communication connection state. Therefore, it can send connection instructions to the second server and the third server to instruct them to establish a communication connection and assist them in performing the multi-party secure computation task.
[0065] If the first server does not receive a response message from the second server within a preset time, it indicates that the connection between the second server and the first server is broken. If the second server continues to modify the data in the multi-party secure computation task, the first server will be unable to verify the task data. Thus, by instructing other servers executing the multi-party secure computation task to stop executing it, the secure execution of the multi-party secure computation task can be ensured.
[0066] In this embodiment, if the first server receives a response message within a preset time, it sends a connection instruction to the second server, which instructs the second server to establish a communication connection with the third server; or, if the first server does not receive the response message within a preset time, it instructs the third server to stop executing the multi-party secure computation task; that is, the first server can manage the execution of the multi-party secure computation task based on the response of the second server to the query instruction.
[0067] Optionally, if the second task data matches the first task data, the method may further include the following steps:
[0068] The first server sends task parameter information to the second server, the task parameter information including the task parameters for the second server to perform the multi-party secure computation task.
[0069] The aforementioned task parameter information corresponds one-to-one with the aforementioned second server. For example, when the second server uses a clustering algorithm to execute the aforementioned multi-party secure computation task, the task parameter information may include the type of clustering algorithm and the parameters required by the clustering algorithm. The aforementioned first server can also select servers to participate in the aforementioned multi-party secure computation task by sending the aforementioned task parameter information. If the aforementioned first task data matches the aforementioned second task data, and the aforementioned first server sends task parameter information to the aforementioned second server, it indicates that the aforementioned second server has been selected as the server for the aforementioned multi-party secure computation task.
[0070] In this embodiment, when the second task data matches the first task data, the first server sends task parameter information to the second server, informing the second server of the task parameters for executing the multi-party secure computation task, thereby configuring the parameter information for the task execution of the second server.
[0071] Optionally, if the second task data does not match the first task data, the method may further include the following steps:
[0072] The first server generates a third key based on the second task data;
[0073] The first server compares the third key with the first key to verify again whether the second task data matches the first task data;
[0074] Based on the result of the re-verification, the first server configures the second server with permissions to perform multi-party secure computation tasks.
[0075] It is understood that, if the comparison of the first key and the second key initially determines that the first task data and the second task data do not match, to improve the accuracy of the comparison result, a third key can be generated again using the second task data, and then compared with the first key to re-verify whether the first task data and the second task data match. It is understood that the method for generating the third key is consistent with the method for generating the first key and the second key.
[0076] If the result of the above re-verification is still that the first task data and the second task data do not match, then it can be confirmed that the second task data has changed compared to the first task data. That is, the input data of the second server in the process of executing the multi-party secure computation task has changed. The second server can be identified as a malicious participant in the multi-party secure computation task. The permissions of the second server can be reduced by the first server when configuring permissions for the second server, until the second server is prevented from participating in the multi-party secure computation task.
[0077] If the result of the above re-verification is that the first task data and the second task data match, then the verification result of the first task data and the second task data can be determined as a match.
[0078] In this implementation, if the second task data does not match the first task data, the first server generates a third key based on the second task data. The first server compares the third key with the first key to re-verify whether the second task data matches the first task data. Based on the result of this re-verification, the first server configures the permissions for the second server to perform multi-party secure computation tasks. This improves the accuracy of the permissions configured by the first server for the second server to perform multi-party secure computation tasks.
[0079] It is understood that if the second task data matches the first task data, the first server can also configure the second server with permissions to perform multi-party secure computation tasks based on the result of the matching verification.
[0080] The various optional implementation methods described in the embodiments of this application can be combined with each other or implemented individually without conflict. The embodiments of this application do not limit this.
[0081] Please see Figure 2 , Figure 2 This is a flowchart illustrating a data verification method provided in an embodiment of this application, as shown below. Figure 2 As shown, it includes the following steps:
[0082] Step 201: The second server obtains the first task data and generates the first key based on the first task data.
[0083] Step 202: The second server sends the first key to the first server.
[0084] Step 203: The second server sends second task data to the first server. The second task data is the task data for the second server to perform a multi-party secure computation task. The second task data is used by the first server to generate a second key. The first key and the second key are used by the first server to verify whether the second task data matches the first task data.
[0085] Optionally, if the second task data matches the first task data, the method further includes:
[0086] The second server sends a first heartbeat packet to the first server;
[0087] The second server receives the second heartbeat packet sent by the first server in response to the first heartbeat packet.
[0088] Optionally, the second heartbeat packet includes a query instruction, which is used to query the status of the second server;
[0089] After the second server receives the second heartbeat packet sent by the first server in response to the first heartbeat packet, the method may further include the following steps:
[0090] The second server sends a response message to the first server within a preset time.
[0091] The second server receives the connection command sent by the first server;
[0092] The second server establishes a communication connection with the third server based on the connection command;
[0093] The response message is a message sent by the second server in response to the query command, and the third server is a server other than the second server among the multiple servers executing the multi-party secure computation task.
[0094] Optionally, if the second task data matches the first task data, the method may further include the following steps:
[0095] The second server receives task parameter information sent by the first server, the task parameter information including task parameters for the second server to perform the multi-party secure computation task.
[0096] Optionally, in step 203, the second server sends the second task data to the first server, which may specifically include:
[0097] The second server sends second task data to the first server at preset time intervals.
[0098] Optionally, if the second task data does not match the first task data, the method may further include the following steps:
[0099] The second server obtains the permissions configured by the first server for the second server in performing multi-party secure computation tasks.
[0100] It should be noted that this embodiment is as described above. Figure 1 The implementation method of the second server corresponding to the method embodiment can therefore be found above. Figure 1 The relevant descriptions in the method embodiments can achieve the same beneficial effects. To avoid repetition, they will not be repeated here.
[0101] The various optional implementation methods described in the embodiments of this application can be combined with each other or implemented individually without conflict. The embodiments of this application do not limit this.
[0102] For ease of understanding, a specific example is as follows:
[0103] This application provides a method for coordinating multi-party secure computing tasks, applied to a coordination system, which includes a configuration center server and multiple participating party devices involved in the multi-party secure computing task. Figure 3 A connection timing diagram between a configuration center server and multiple participating party devices is provided for an embodiment of this application, as shown below. Figure 3 As shown, the above-mentioned multi-party secure computation task coordination method can specifically include the following steps:
[0104] Step 31: The configuration center server obtains the participant data and the corresponding private key according to the rules. The participant device stores the private key locally, and the configuration center server backs up the private key and logs information such as the private key version and operation time, permanently saving it. The private key is the unique credential for completing the security check and is subsequently used for comparison and verification to determine the stability of the participant device's information, thus enabling the participant device to legally connect to the configuration center server. Before obtaining the private key, the participant must undergo qualification verification.
[0105] Step 32: After the security test of the participating devices is passed, configure the central server to initialize the database and task queue, and complete the registration service;
[0106] Step 33: After the participating device confirms receipt of the registration success message, it sends a heartbeat packet to the configuration center server's heartbeat service detection within the specified time interval; after receiving the heartbeats from each participating device, the configuration center server's heartbeat service detection sends the relevant participating information and corresponding tasks to each participating device.
[0107] Step 34: During the execution of a multi-party secure computation task by multiple participating devices, the configuration center server polls the private keys of each participating device at preset time intervals. Each time the multi-party secure computation task is restarted, the private keys must be reconfirmed. Only if the private key information has not changed can the participating device pass the security test or maintain the WebSocket connection with the configuration center server.
[0108] Step 35: The private key polling result is transmitted to the configuration center server. Based on the private key polling result, the configuration center server can implement functions such as polling authentication, permission allocation, authorized connection, heartbeat maintenance, error handling, and configuration distribution.
[0109] The configuration center server includes an authorization connection submodule, a heartbeat maintenance submodule, an error handling submodule, and a configuration distribution submodule, which are used to perform functions such as polling authentication, permission allocation, authorization connection, heartbeat location, error handling, and configuration distribution in step 35, respectively.
[0110] Specifically, the authorized connection submodule is used to connect the devices of each participating party to the configuration center server. Regarding the definition of a malicious participant—that is, a participant who does not comply with the protocol and may maliciously alter their own input information, potentially leading to their direct withdrawal from the protocol and its inability to continue—this application utilizes the authorized connection submodule to implement polling authentication and authorized connection functions based on the private key polling results.
[0111] The rules for generating private keys are as follows:
[0112] Participating parties register their devices and upload data. Data is then sampled from the dataset according to predetermined rules, which are agreed upon by all parties. Based on time, the current computer's clock sequence, the computer's network card physical address, and the sampled data, a one-time private key is generated (i.e., the private key cannot be updated or modified; each version corresponds to a specific time, and any update or change renders that version of the private key insecure). This private key is then returned to the participating party's local storage, backed up on the server, and its version and operation time are logged and permanently stored.
[0113] The private key polling rules are as follows:
[0114] During the execution of the multi-party secure computation task, at regular intervals or when the service is interrupted and then restarted, the data uploaded by the participating devices is sampled again according to the established rules, and a new version of the private key is generated. Theoretically, the only difference in the private key is the time version information. During security detection, the private key is matched. If the private key information shows that it has been updated or modified, or if the private key information differs from the backup version on the configuration center server (except for the version information), the detection result is uploaded to the authorized connection submodule, which will then take further processing according to the rules.
[0115] like Figure 4 As shown in the figure below, the working process of the authorized connection submodule is as follows.
[0116] Step 41: Log in to the management interface using the authorized username and password, obtain the device information and uploaded data of each participant, and generate the corresponding one-time private key according to the established rules;
[0117] Step 42: Return the private key to the participating device, and configure the central server to back up the data. All operation information is logged and permanently stored.
[0118] Step 43: Initialize the database and task queue, complete the configuration center server registration service, and prepare the authorization connection module;
[0119] Step 44: The participating device successfully connects to the configuration center server. The participating device transmits its relevant information for the connection between the participants to the configuration center server, such as IP address, port number, public key, etc.
[0120] Step 45: During the collaboration, the configuration center server polls the aforementioned private key at predetermined time intervals. That is, according to predetermined rules, it samples the data uploaded by the participating devices and regenerates a new version of the private key. Theoretically, this private key only differs in time version information. During security testing, the private key is matched. If the private key information shows that it has been updated or modified, or if the private key differs from the backup version on the configuration center server (except for version information), the test result is uploaded to the authorized connection submodule. This module takes further processing according to the rules, and all operation information is logged.
[0121] Step 46: For participating devices with different private key information, the authorization connection submodule should further verify their information. Generally, this involves regenerating the private key and re-evaluating it. If it is confirmed that the private key information has indeed changed (except for version information), the subsequent configuration authorization should reduce the participant's permissions until it is prevented from continuing to cooperate and participate.
[0122] Specifically, after the participating device successfully authenticates with the configuration center server, it establishes a WebSocket connection with the configuration center server. At this time, the heartbeat maintenance submodule will perform the following operations:
[0123] Participating devices complete their own information: The participating device sends its generated public key and participating device ID to the configuration center server, which then stores the corresponding information. Based on the WebSocket custom connection_info event, the participating device's sequence number is sent to it. Upon receiving this message, the participating device saves the relevant information to its own database.
[0124] The participating device establishes a heartbeat with the configuration center server: After establishing a connection with the configuration center server, the participating device sets a timer to periodically send heartbeat packets. The participating device and the configuration center server use a custom event, `heartbeat`, to exchange messages. After the participating device sends a heartbeat packet, the configuration center server responds with a heartbeat. Upon receiving the heartbeat packet, both the configuration center server and the participating device update their respective liveness status in their respective databases. The status update of the participating device is recorded in the `clients` table of the participating device's database, as shown in Table 1; the status update of the configuration center server is recorded in the `clients` table of the configuration center server's database, as shown in Table 2.
[0125] Table 1. Participant Database: clients table
[0126]
[0127] Table 2 Configuration Center Database clients table
[0128]
[0129] Specifically, the error handling submodule defines the question-and-answer format for heartbeat packets. It sends commands to query the liveness status of participating parties via heartbeat packets. If a participating party fails to respond, the algorithm execution fails. At this point, the configuration center sends heartbeat responses to all surviving participating devices via a custom terminate event. Upon receiving this message, the surviving participating devices stop executing the task. After the server receives messages indicating successful service shutdown, the configuration center updates the liveness status of all participating devices and records it in its database. Simultaneously, the configuration center server logs failures and sends task failure information to all participating parties via an alarm service.
[0130] Specifically, the configuration distribution submodule has two main functions: distributing configurations to assist participating devices in establishing connections, and distributing task configurations to participating devices for calculation.
[0131] Connection Establishment: After establishing a heartbeat connection, the configuration center server obtains the information required for connections between all participating devices. This information is stored in the client table of the configuration center server, as shown in Table 2. The heartbeat maintenance submodule assigns a number to each participant and sends the information to the participating device. After all participants have established connections with the configuration center, the configuration center issues connection establishment commands to each pair of participants according to their numbers, from largest to smallest, providing the connection address, public key, ID, and other information. After a connection is established between each pair of participating devices, a connection success message is sent to the configuration center server.
[0132] Task Configuration Distribution: In the framework implemented in this application, a clustering algorithm based on secure multi-party computation is taken as an example. When configuring a task, the participating devices, the type of clustering algorithm, and the parameters required by the clustering algorithm are selected. The configuration center server distributes the task to the participating devices through custom tasks events. The participating devices then perform the next step of computation based on the received configuration. The fields of the task table of the configuration center server are shown in Table 3.
[0133] Table 3 Configuration Center Server Task Table
[0134]
[0135] In this embodiment, by polling and comparing the keys of each participating device through a configuration center server, dishonest operations such as malicious deletion or modification of uploaded data by participating devices can be effectively detected. This provides a certain degree of identification, prediction, and authorization blocking capability against malicious operators. Furthermore, the configuration center server coordinates specific requirements such as authorized connections, heartbeat maintenance, error handling, and configuration distribution for participating parties, increasing the specific application scenarios of the protocol and effectively improving its practicality. In addition, this application can perform multi-party secure computation tasks without the need for a zero-knowledge proof system, reducing the cost of using the protocol.
[0136] See Figure 5 , Figure 5 This is a schematic diagram of the structure of a server provided in an embodiment of this application. Figure 5 As shown, the server is the first server, and server 500 includes:
[0137] The first acquisition module 501 is used to acquire a first key sent by the second server, wherein the first key is generated based on the first task data of the second server.
[0138] The second acquisition module 502 is used to acquire the second task data sent by the second server, wherein the second task data is the task data of the second server performing a multi-party secure computation task.
[0139] The first generation module 503 is used to generate a second key based on the second task data;
[0140] The first comparison module 504 is used to compare the second key with the first key to verify whether the second task data matches the first task data.
[0141] Optionally, if the second task data matches the first task data, the server 500 may further include:
[0142] The first receiving module is used to receive the first heartbeat packet sent by the second server;
[0143] The third sending module is used to send a second heartbeat packet to the second server in response to the first heartbeat packet.
[0144] Optionally, the second heartbeat packet includes a query instruction, which is used to query the status of the second server;
[0145] The fourth sending module is used to send a connection command to the second server upon receiving a response message within a preset time. The connection command instructs the second server to establish a communication connection with the third server; or...
[0146] The instruction module is used to instruct the third server to stop executing the multi-party secure computation task if the response message is not received within a preset time.
[0147] The response message is a message sent by the second server in response to the query command, and the third server is a server other than the second server among the multiple servers executing the multi-party secure computation task.
[0148] Optionally, if the second task data matches the first task data, the server 500 may further include:
[0149] The fifth sending module is used to send task parameter information to the second server, the task parameter information including task parameters for the second server to perform the multi-party secure computation task.
[0150] Optionally, the second acquisition module may specifically include:
[0151] The first acquisition unit is used to acquire the second task data sent by the second server at preset time intervals.
[0152] Optionally, if the second task data does not match the first task data, the server 500 may further include:
[0153] The second generation module is used to generate a third key based on the second task data;
[0154] The second comparison module is used to compare the third key with the first key to verify again whether the second task data matches the first task data;
[0155] The configuration module is used to configure the permissions of the second server for performing multi-party secure computation tasks based on the result of the re-verification.
[0156] Server 500 can implement the embodiments of this application. Figure 1 The various processes in the method embodiments, and the ways to achieve the same beneficial effects, will not be repeated here to avoid repetition.
[0157] See Figure 6 , Figure 6 This is a schematic diagram of the structure of a server provided in an embodiment of this application. Figure 6 As shown, the server is a second server, and server 600 includes:
[0158] The third acquisition module 601 is used to acquire the first task data and generate a first key based on the first task data;
[0159] The first sending module 602 is used to send the first key to the first server;
[0160] The second sending module 603 is used to send second task data to the first server. The second task data is task data for the second server to perform a multi-party secure computation task. The second task data is used by the first server to generate a second key. The first key and the second key are used by the first server to verify whether the second task data matches the first task data.
[0161] Optionally, if the second task data matches the first task data, the server 600 may further include:
[0162] The sixth sending module is used to send the first heartbeat packet to the first server;
[0163] The second receiving module is used to receive the second heartbeat packet sent by the first server in response to the first heartbeat packet.
[0164] Optionally, the second heartbeat packet includes a query instruction, which is used to query the status of the second server;
[0165] Server 600 may also include:
[0166] The seventh sending module is used to send a response message to the first server within a preset time.
[0167] The third receiving module is used to receive the connection command sent by the first server;
[0168] A module is established to establish a communication connection with a third server based on the connection command.
[0169] The response message is a message sent by the second server in response to the query command, and the third server is a server other than the second server among the multiple servers executing the multi-party secure computation task.
[0170] Optionally, if the second task data matches the first task data, the server 600 may further include:
[0171] The fourth receiving module is used to receive task parameter information sent by the first server, the task parameter information including task parameters for the second server to perform the multi-party secure computation task.
[0172] Optionally, the second transmitting module 603 may specifically include:
[0173] The sending unit is used to send second task data to the first server at preset time intervals.
[0174] Optionally, if the second task data does not match the first task data, the server 600 may further include:
[0175] The fourth acquisition module is used to acquire the permissions configured by the first server for the second server in performing multi-party secure computation tasks.
[0176] Server 600 can implement the embodiments of this application. Figure 2 The various processes in the method embodiments, and the ways to achieve the same beneficial effects, will not be repeated here to avoid repetition.
[0177] This application also provides a communication device. Because the principle by which the communication device solves the problem is similar to that in the embodiments of this application... Figure 1 The data verification method shown is similar; therefore, the implementation of this communication device can be found in the method implementation, and repeated details will not be elaborated upon. For example... Figure 7 As shown, the communication device in this embodiment includes: a first processor 700, configured to read a program from a first memory 720 and execute the following processes:
[0178] The first key sent by the second server is obtained through the first transceiver 710, and the first key is generated based on the first task data of the second server.
[0179] The first transceiver 710 obtains the second task data sent by the second server, which is the task data for the second server to perform a multi-party secure computation task.
[0180] A second key is generated based on the second task data;
[0181] The second key is compared with the first key to verify whether the second task data matches the first task data;
[0182] The first transceiver 710 is used to receive and send data under the control of the first processor 700.
[0183] Among them, Figure 7In this context, the bus architecture may include any number of interconnected buses and bridges, specifically linking various circuits together with one or more processors represented by the first processor 700 and a memory represented by the first memory 720. The bus architecture may also link together various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. A bus interface provides an interface. The first transceiver 710 may be multiple elements, including transmitters and transceivers, providing a unit for communicating with various other devices over a transmission medium. The first processor 700 is responsible for managing the bus architecture and general processing, and the first memory 720 may store data used by the first processor 700 during operation.
[0184] Optionally, if the second task data matches the first task data, the first processor 700 is further configured to read the program from the first memory 720 and execute the following steps:
[0185] Receive the first heartbeat packet sent by the second server;
[0186] In response to the first heartbeat packet, a second heartbeat packet is sent to the second server.
[0187] Optionally, the second heartbeat packet includes a query instruction, which is used to query the status of the second server;
[0188] The first processor 700 is also used to read the program from the first memory 720 and perform the following steps:
[0189] If a response message is received within a preset time, a connection command is sent to the second server, which instructs the second server to establish a communication connection with the third server; or...
[0190] If the response message is not received within a preset time, the third server is instructed to stop executing the multi-party secure computation task.
[0191] The response message is a message sent by the second server in response to the query command, and the third server is a server other than the second server among the multiple servers executing the multi-party secure computation task.
[0192] Optionally, if the second task data matches the first task data, the first processor 700 is further configured to read the program from the first memory 720 and execute the following steps:
[0193] The task parameter information is sent to the second server, and the task parameter information includes the task parameters for the second server to perform the multi-party secure computation task.
[0194] Optionally, obtaining the second task data sent by the second server may specifically include:
[0195] The second task data sent by the second server is obtained at preset time intervals.
[0196] Optionally, if the second task data does not match the first task data, the first processor 700 is further configured to read the program from the first memory 720 and execute the following steps:
[0197] A third key is generated based on the data from the second task.
[0198] The third key is compared with the first key to verify again whether the second task data matches the first task data;
[0199] Based on the results of the re-verification, the second server is configured with permissions to perform multi-party secure computation tasks.
[0200] The communication device provided in this application embodiment can perform the above-described... Figure 1 The method embodiments shown are similar in principle and technical effect, and will not be described again here.
[0201] This application also provides a communication device. Because the principle by which the communication device solves the problem is similar to that in the embodiments of this application... Figure 2 The data verification method shown is similar; therefore, the implementation of this communication device can be found in the method implementation, and repeated details will not be elaborated upon. For example... Figure 8 As shown, the communication device in this embodiment includes: a second processor 800, configured to read a program from a second memory 820 and execute the following processes:
[0202] Obtain the first task data and generate the first key based on the first task data;
[0203] The first key is sent to the first server via the second transceiver 810;
[0204] The second transceiver 810 sends second task data to the first server. The second task data is the task data for the second server to perform a multi-party secure computation task. The second task data is used by the first server to generate a second key. The first key and the second key are used by the first server to verify whether the second task data matches the first task data.
[0205] The second transceiver 810 is used to receive and send data under the control of the second processor 800.
[0206] Among them, Figure 8 In this context, the bus architecture can include any number of interconnected buses and bridges, specifically linking various circuits of one or more processors represented by the second processor 800 and the memory represented by the second memory 820 together. The bus architecture can also link various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. A bus interface provides an interface. The second transceiver 810 can be multiple elements, including transmitters and transceivers, providing a unit for communicating with various other devices over a transmission medium. The second processor 800 is responsible for managing the bus architecture and general processing, and the second memory 820 can store data used by the second processor 800 during operation.
[0207] Optionally, if the second task data matches the first task data, the second processor 800 is further configured to read the program from the second memory 820 and execute the following steps:
[0208] Send the first heartbeat packet to the first server;
[0209] Receive the second heartbeat packet sent by the first server in response to the first heartbeat packet.
[0210] Optionally, the second heartbeat packet includes a query instruction, which is used to query the status of the second server;
[0211] The second processor 800 is also used to read the program from the second memory 820 and perform the following steps:
[0212] Send a response message to the first server within a preset time;
[0213] Receive the connection command sent by the first server;
[0214] A communication connection is established with the third server based on the connection command;
[0215] The response message is a message sent by the second server in response to the query command, and the third server is a server other than the second server among the multiple servers executing the multi-party secure computation task.
[0216] Optionally, if the second task data matches the first task data, the second processor 800 is further configured to read the program from the second memory 820 and execute the following steps:
[0217] The system receives task parameter information sent by the first server, the task parameter information including task parameters for the second server to perform the multi-party secure computation task.
[0218] Optionally, sending the second task data to the first server includes:
[0219] The second task data is sent to the first server at preset time intervals.
[0220] If the second task data does not match the first task data, the second processor 800 is also used to read the program in the second memory 820 and execute the following steps:
[0221] Obtain the permissions configured by the first server for the second server in performing multi-party secure computation tasks.
[0222] The communication device provided in this application embodiment can perform the above-described... Figure 2 The method embodiments shown are similar in principle and technical effect, and will not be described again here.
[0223] This application also provides a readable storage medium storing a program that, when executed by a processor, implements the following... Figure 1 or Figure 2 The various processes in the Chinese method embodiment can achieve the same technical effect, and will not be described again here to avoid repetition.
[0224] In the several embodiments provided in this application, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0225] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can be physically included separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional units.
[0226] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute some steps of the transmission and reception methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0227] The above description is the preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principles described in this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A data verification method, characterized in that, include: The first server obtains a first key sent by the second server, the first key being generated based on the first task data of the second server; The first server obtains the second task data sent by the second server, wherein the second task data is the task data for the second server to perform a multi-party secure computation task; The first server generates a second key based on the second task data, and the second key is generated in the same way as the first key. The first server compares the second key with the first key to verify whether the second task data matches the first task data; The first server is a server that verifies the data of multiple participants in the computation task.
2. The method as described in claim 1, characterized in that, If the second task data matches the first task data, the method further includes: The first server receives the first heartbeat packet sent by the second server; In response to the first heartbeat packet, the first server sends a second heartbeat packet to the second server.
3. The method as described in claim 2, characterized in that, The second heartbeat packet includes a query instruction, which is used to query the status of the second server; After the first server responds to the first heartbeat packet and sends a second heartbeat packet to the second server, the method further includes: If the first server receives a response message within a preset time, it sends a connection command to the second server, the connection command instructing the second server to establish a communication connection with the third server; or... If the first server does not receive the response message within a preset time, it instructs the third server to stop executing the multi-party secure computation task; The response message is a message sent by the second server in response to the query command, and the third server is a server other than the second server among the multiple servers executing the multi-party secure computation task.
4. The method as described in claim 1, characterized in that, If the second task data matches the first task data, the method further includes: The first server sends task parameter information to the second server, the task parameter information including the task parameters for the second server to perform the multi-party secure computation task.
5. The method according to any one of claims 1 to 4, characterized in that, The first server obtains the second task data sent by the second server, including: The first server acquires the second task data sent by the second server at preset time intervals.
6. The method as described in claim 1, characterized in that, If the second task data does not match the first task data, the method further includes: The first server generates a third key based on the second task data; The first server compares the third key with the first key to verify again whether the second task data matches the first task data; Based on the result of the re-verification, the first server configures the second server with permissions to perform multi-party secure computation tasks.
7. A data verification method, characterized in that, include: The second server obtains the first task data and generates a first key based on the first task data; The second server sends the first key to the first server; The second server sends second task data to the first server. The second task data is the task data for the second server to perform a multi-party secure computation task. The second task data is used by the first server to generate a second key. The second key is generated in the same way as the first key. The first key and the second key are used by the first server to verify whether the second task data matches the first task data. The first server is a server that verifies the data of multiple participating parties in the computation task.
8. The method as described in claim 7, characterized in that, If the second task data matches the first task data, the method further includes: The second server sends a first heartbeat packet to the first server; The second server receives the second heartbeat packet sent by the first server in response to the first heartbeat packet.
9. The method as described in claim 8, characterized in that, The second heartbeat packet includes a query instruction, which is used to query the status of the second server; After the second server receives the second heartbeat packet sent by the first server in response to the first heartbeat packet, the method further includes: The second server sends a response message to the first server within a preset time. The second server receives the connection command sent by the first server; The second server establishes a communication connection with the third server based on the connection command; The response message is a message sent by the second server in response to the query command, and the third server is a server other than the second server among the multiple servers executing the multi-party secure computation task.
10. The method as described in claim 7, characterized in that, If the second task data matches the first task data, the method further includes: The second server receives task parameter information sent by the first server, the task parameter information including task parameters for the second server to perform the multi-party secure computation task.
11. The method according to any one of claims 7 to 10, characterized in that, The second server sends second task data to the first server, including: The second server sends second task data to the first server at preset time intervals.
12. The method as described in claim 1, characterized in that, If the second task data does not match the first task data, the method further includes: The second server obtains the permissions configured by the first server for the second server in performing multi-party secure computation tasks.
13. A server, wherein the server is a first server, characterized in that, include: The first acquisition module is used to acquire a first key sent by the second server, wherein the first key is generated based on the first task data of the second server. The second acquisition module is used to acquire the second task data sent by the second server, wherein the second task data is the task data of the second server performing a multi-party secure computation task. The first generation module is used to generate a second key based on the second task data, wherein the second key is generated in the same way as the first key. The first comparison module is used to compare the second key with the first key to verify whether the second task data matches the first task data; The first server is a server that verifies the data of multiple participants in the computation task.
14. A server, wherein the server is a second server, characterized in that, include: The third acquisition module is used to acquire the first task data and generate a first key based on the first task data; The first sending module is used to send the first key to the first server; The second sending module is used to send second task data to the first server. The second task data is the task data of the second server performing a multi-party secure computation task. The second task data is used by the first server to generate a second key. The generation method of the second key is the same as that of the first key. The first key and the second key are used by the first server to verify whether the second task data matches the first task data. The first server is a server that verifies the data of multiple participating parties in the computation task.
15. A communication device, comprising: A transceiver, a memory, a processor, and a program stored in the memory and executable on the processor; characterized in that, The processor is configured to read a program from the memory to implement the steps of the method as described in any one of claims 1 to 6; or to implement the steps of the method as described in any one of claims 7 to 12.
16. A readable storage medium, characterized in that, A program is stored on the readable storage medium, which, when executed by a processor, implements the steps of the method as described in any one of claims 1 to 6; or implements the steps of the method as described in any one of claims 7 to 12.