A contribution quantification method and device based on privacy calculation and related equipment
By employing a contribution metric method based on privacy computing, the contribution of a device is calculated using the approximate Shapley value of the encrypted state, quality parameters, and timeliness parameters, and then stored in the blockchain. This solves the problem of low efficiency in multi-device collaborative processing tasks and achieves efficient and secure collaborative processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA MOBILE INFORMATION TECHNOLOGY CO LTD
- Filing Date
- 2026-05-14
- Publication Date
- 2026-06-12
AI Technical Summary
In existing technologies, multi-device collaborative processing tasks require high-trust verification, resulting in low efficiency.
By using a privacy-based contribution metric, the contribution of a device is calculated using the approximate Shapley value of the encrypted state, quality parameters, and timeliness parameters, and then stored in the blockchain to enable collaborative processing between devices.
It improves the efficiency and accuracy of collaborative task processing, reduces the need for device trust verification, and enhances data security.
Smart Images

Figure CN122197082A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and specifically to a contribution quantification method, apparatus, and related equipment based on privacy computing. Background Technology
[0002] Collaborating multiple devices to process a task can achieve rapid task handling. In related technologies, to achieve collaborative task processing, data from different devices is typically transferred to a centralized server or data warehouse, where plaintext data is then accessed for task processing. However, since a data leak in one device could lead to the leakage of all original data, these technologies require a high degree of trust between all participating devices. Establishing such a high level of trust between different devices requires significant manual intervention and verification, resulting in low efficiency for collaborative task processing.
[0003] It is evident that the related technologies suffer from low efficiency in collaborative task processing. Summary of the Invention
[0004] This invention provides a contribution quantification method, apparatus, and related equipment based on privacy computing to address the problem of low efficiency in collaborative processing tasks in related technologies.
[0005] To solve the above problems, the present invention is implemented as follows: In a first aspect, embodiments of the present invention provide a contribution quantification method based on privacy computing, applied to a first device, the method comprising: Multiple sub-vectors are obtained, each sub-vector corresponding to a multiple device. Each sub-vector is obtained by dividing the data vector corresponding to the local data of the corresponding device. The multiple devices include the first device. Receive the approximate Shapley value sent by the second device; Calculate the quality parameters and timeliness parameters corresponding to the multiple sub-vectors. The quality parameters are used to characterize the data quality of the multiple sub-vectors, and the timeliness parameters are used to characterize the time when each of the multiple devices sends the sub-vectors. The contribution of the first device is calculated based on the approximate Shapley value of the encrypted state, the quality parameter, and the timeliness parameter; The contribution level is sent to the second device.
[0006] Secondly, embodiments of the present invention provide a contribution quantification method based on privacy computing, applied to a second device, the method comprising: Calculate the approximate Shapley value for each of the multiple devices; Send the corresponding approximate Shapley value to the plurality of devices; The contribution value sent by each device is received. The contribution value is calculated by the device based on the approximate Shapley value, quality parameter and timeliness parameter of the ciphertext state. The quality parameter is used to characterize the data quality of multiple sub-vectors. The timeliness parameter is used to characterize the time when each device sends the sub-vector. Each sub-vector is obtained by dividing the data vector corresponding to the local data of the corresponding device. The contributions of the multiple devices are stored in the blockchain.
[0007] Thirdly, embodiments of the present invention provide a contribution quantification device based on privacy computing, applied to a first device, the device comprising: The acquisition module is used to acquire multiple sub-vectors, which correspond one-to-one with multiple devices. Each sub-vector is obtained by dividing the data vector corresponding to the local data of the corresponding device. The multiple devices include the first device. The first receiving module is used to receive the approximate Shapley value sent by the second device; The first calculation module is used to calculate the quality parameters and timeliness parameters corresponding to the plurality of sub-vectors. The quality parameters are used to characterize the data quality of the plurality of sub-vectors, and the timeliness parameters are used to characterize the time when each of the plurality of devices sends the sub-vectors. The second calculation module is used to calculate the contribution of the first device based on the approximate Shapley value of the encrypted state, the quality parameter, and the timeliness parameter; The first sending module is used to send the contribution value to the second device.
[0008] Fourthly, embodiments of the present invention provide a contribution quantification device based on privacy computing, applied to a second device, the device comprising: The calculation module is used to calculate the approximate Shapley value for each of the multiple devices; The first sending module is used to send the corresponding approximate Shapley value to the plurality of devices; The first receiving module is used to receive the contribution value sent by each device. The contribution value is calculated by the device based on the approximate Shapley value, quality parameter and timeliness parameter of the ciphertext state. The quality parameter is used to characterize the data quality of multiple sub-vectors. The timeliness parameter is used to characterize the time when each device sends the sub-vector. Each sub-vector is obtained by dividing the data vector corresponding to the local data of the corresponding device. A storage module is used to store the contributions of the multiple devices to the blockchain.
[0009] Fifthly, embodiments of the present invention also provide an electronic device applied to a first device, including a transceiver and a processor. The transceiver is used to acquire multiple sub-vectors, which correspond one-to-one with multiple devices. Each sub-vector is obtained by dividing the data vector corresponding to the local data of the corresponding device. The multiple devices include the first device. The transceiver is also used to receive an approximate Shapley value sent by the second device; The processor is used to calculate the quality parameters and timeliness parameters corresponding to the plurality of sub-vectors. The quality parameters are used to characterize the data quality of the plurality of sub-vectors, and the timeliness parameters are used to characterize the time when each of the plurality of devices sends the sub-vectors. The processor is also configured to calculate the contribution of the first device based on the approximate Shapley value of the ciphertext state, the quality parameter, and the timeliness parameter; The transceiver is also used to send the contribution level to the second device.
[0010] Sixthly, embodiments of the present invention also provide an electronic device applied to a second device, including a transceiver and a processor. The processor is used to calculate the approximate Shapley value for each of the multiple devices; The transceiver is used to send corresponding approximate Shapley values to the plurality of devices; The transceiver is also used to receive the contribution value sent by each device. The contribution value is calculated by the device based on the approximate Shapley value, quality parameter and timeliness parameter of the ciphertext state. The quality parameter is used to characterize the data quality of multiple sub-vectors. The timeliness parameter is used to characterize the time when each device sends the sub-vector. Each sub-vector is obtained by dividing the data vector corresponding to the local data of the corresponding device. The processor is also used to store the contribution values of the multiple devices to the blockchain.
[0011] In a seventh aspect, embodiments of the present invention provide an electronic device, including: a processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, it implements the steps of the privacy-based computation contribution quantification method described in the first or second aspect above.
[0012] Eighthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the privacy-based computation contribution quantification method described in the first or second aspect.
[0013] In a ninth aspect, the present invention also provides a computer program product, including computer instructions that, when executed by a processor, implement the steps of the privacy-based computation contribution quantification method described in the first or second aspect above.
[0014] In this embodiment of the invention, multiple sub-vectors are obtained, each corresponding one-to-one with multiple devices. Each sub-vector is derived from a data vector corresponding to the local data of the respective device, including the first device. The process involves receiving an approximate Shapley value from a second device; calculating a quality parameter and a timeliness parameter corresponding to the multiple sub-vectors. The quality parameter characterizes the data quality of the multiple sub-vectors, and the timeliness parameter characterizes the time each device sends the sub-vector. The contribution of the first device is calculated based on the approximate Shapley value in the encrypted state, the quality parameter, and the timeliness parameter; and the contribution is sent to the second device. In this way, by obtaining multiple sub-vectors from different devices through the first device to achieve collaborative processing tasks, the data used in the collaborative processing task in the first device does not include all the data from any one of the multiple devices, thus eliminating the need for pre-verification of the devices participating in the collaborative processing task. Furthermore, since the first device obtains multiple sub-vectors, collaborative execution of the task can be achieved through these multiple sub-vectors, improving the efficiency of the collaborative processing task. Furthermore, the contribution of the first device is calculated using the approximate Shapley value sent by the second device, along with quality and time parameters, thus quantifying the contribution and improving its accuracy. Attached Figure Description
[0015] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a flowchart of a contribution quantification method based on privacy computing applied to a first device, provided by an embodiment of the present invention; Figure 2 This is a flowchart of the coordination processing task provided in an embodiment of the present invention; Figure 3 This is a flowchart of a contribution quantification method based on privacy computing applied to a second device, provided by an embodiment of the present invention; Figure 4 This is a flowchart of generating the second model weights provided in an embodiment of the present invention; Figure 5This is a structural diagram of a contribution metric system based on privacy computing provided in an embodiment of the present invention; Figure 6 This is a structural diagram of a privacy-based contribution quantification device applied to a first device, provided by an embodiment of the present invention; Figure 7 This is a structural diagram of a privacy-based contribution quantification device applied to a second device, provided by an embodiment of the present invention. Figure 8 This is a structural diagram of an electronic device applied to a first device according to an embodiment of the present invention; Figure 9 This is a structural diagram of an electronic device applied to a second device, provided by an embodiment of the present invention. Detailed Implementation
[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] Please see Figure 1 , Figure 1 This is a flowchart of a privacy-based contribution metric method applied to a first device, as provided in an embodiment of the present invention. Figure 1 As shown, it includes the following steps: Step 101: Obtain multiple sub-vectors, each of which corresponds to a different device. Each sub-vector is obtained by dividing the local data of the corresponding device into data vectors. The multiple devices include the first device.
[0019] The aforementioned first device is one of multiple devices that need to perform collaborative processing tasks. In this embodiment, collaborative task processing is achieved by multiple devices collaboratively processing the same task. The aforementioned multiple sub-vectors correspond one-to-one with multiple devices. That is, the first device needs to obtain sub-vectors from multiple devices so that it can obtain partial data from the local devices of each device, so as to execute the task based on the partial data from the local devices of each device.
[0020] In this context, local data refers to the data used by each device for collaborative task execution. For example, when collaboratively training a model, the devices need to train the model based on the local data. The data vector is the vector corresponding to the local data, and its characteristics can be determined through the data vector. In this embodiment, the first device acquires multiple sub-vectors, thereby enabling the acquisition of partial data from the local data of each device.
[0021] Step 102: Receive the Approximate Shapley Value (APPSV) sent by the second device.
[0022] It should be noted that after multiple devices acquire multiple sub-vectors and process the task collaboratively based on the multiple sub-vectors, it is necessary to determine the contribution of each device to the training result. Therefore, an approximate Shapley value is introduced in this invention. The approximate Shapley value can be used as an initial or approximate similarity value, and then the approximate Shapley value is used to calculate the accurate contribution of each device in the multiple devices.
[0023] The second device can be one of the multiple devices, or it can be a device other than the multiple devices. The second device is used to calculate an approximate Shapley value and send the approximate Shapley value to each of the multiple devices (including the first device), so that each device can calculate its contribution.
[0024] Step 103: Calculate the quality parameters and timeliness parameters corresponding to the multiple sub-vectors. The quality parameters are used to characterize the data quality of the multiple sub-vectors, and the timeliness parameters are used to characterize the time when each of the multiple devices sends the sub-vectors.
[0025] The aforementioned quality parameters characterize the data quality of multiple sub-vectors. These parameters can be pre-evaluation scores obtained by performing privacy-preserving data probing on the corresponding data of each sub-vector (e.g., calculating the proportion of missing values, feature distribution entropy, etc.). It should be noted that these quality parameters determine the data quality of different devices within a collaborative processing task. Higher quality data contributes more to the result, and vice versa, allowing for the calculation of the contribution of different devices.
[0026] The aforementioned timeliness parameter characterizes the timing of sub-vector transmission by each of the multiple devices. It can be calculated using a preset time decay function based on the timestamps of sub-vector transmission from different devices. It should be noted that the earlier a device transmits its sub-vector, the higher the likelihood of changes to its local data. In this case, the device's contribution to the result should be reduced to improve the accuracy of the calculated contribution.
[0027] The aging parameter f(t) can be calculated using the following formula: ; In the formula, t now For the current time, t i The time when the i-th device among multiple devices sends the sub-vector. This is the attenuation coefficient.
[0028] In some implementations, parameters such as data volume and feature sparseness can also be calculated. Subsequently, the contribution of the first device can be calculated using multiple parameters such as data volume, feature sparseness, quality parameters, and timeliness parameters, as well as an approximate Shapley value.
[0029] Step 104: Calculate the contribution of the first device based on the approximate Shapley value of the ciphertext state, the quality parameter, and the timeliness parameter.
[0030] The contribution of the first device mentioned above can be obtained by weighting the approximate Shapley value, quality parameters, and aging parameters, or by weighting the quality parameters and aging parameters and then multiplying the weighted result by the approximate Shapley value.
[0031] In some implementations, the contribution of the first device can be calculated using the following formula: ; In the formula, C i The contribution of the i-th device; S i Let be the approximate Shapley value of the i-th device; m represents the number of parameters across multiple dimensions, including quality parameters and timeliness parameters; a j Let be the global weight of the j-th dimension parameter, and have ; It is the normalized score (i.e., parameter value) of the i-th device on the j-th dimension parameter.
[0032] The calculation process, through the invocation of secure multiplication and secure addition primitives, is executed in encrypted form on each device, ensuring that the approximate Shapley values S of each party are known before the final contribution C is revealed. i and the weights of multidimensional parameters None of the data will be leaked, thus improving data security.
[0033] Step 105: Send the contribution score to the second device.
[0034] It should be understood that after calculating the approximate Shapley value, the second device can also receive contribution values sent by multiple devices, thereby managing the contribution values, such as performing blockchain-based operations, to improve the reliability of the contribution values calculated by each device and facilitate subsequent queries.
[0035] Specifically, in some implementations, after calculating the contribution of each device C={C1,C2,…,C…}, the contribution of each device is... n Afterwards, this quantified result is transformed into a digital asset that is verifiable, traceable, and transferable through blockchain, and the distribution of rights is completed in a decentralized, automated, and tamper-proof manner. At this point, due to the contribution C of each device... iIt remains distributed among devices in the form of secret shares. To submit it to the blockchain, its value needs to be securely reconstructed first. Specifically, each device will assign its share of C... i The contribution of each i=1,…,n is broadcast to an off-chain entity (i.e., a second device, which is a "secure oracle" and can be built based on a Trusted Execution Environment (TEE) or another MPC instance) designated by consensus and possessing secure computation capabilities. Subsequently, the second device aggregates all shares in a secure hardware environment to reconstruct the plaintext contribution C={C1,C2,…,C}. n The purpose of using a second device is to securely process sensitive data in this final stage in an off-chain environment, preventing any single device from cheating during the broadcast phase or obtaining the complete results in advance.
[0036] Furthermore, multiple devices can perform a multi-party signature on the reconstructed plaintext contribution, forming a digital signature with collective consensus, which is then submitted to the blockchain by the oracle (i.e., the second device).
[0037] In this embodiment of the invention, multiple sub-vectors are obtained, each corresponding one-to-one with multiple devices. Each sub-vector is derived from a data vector corresponding to the local data of the respective device, including the first device. The process involves receiving an approximate Shapley value from a second device; calculating a quality parameter and a timeliness parameter corresponding to the multiple sub-vectors. The quality parameter characterizes the data quality of the multiple sub-vectors, and the timeliness parameter characterizes the time each device sends the sub-vector. The contribution of the first device is calculated based on the approximate Shapley value in the encrypted state, the quality parameter, and the timeliness parameter; and the contribution is sent to the second device. In this way, by obtaining multiple sub-vectors from different devices through the first device to achieve collaborative processing tasks, the data used in the collaborative processing task in the first device does not include all the data from any one of the multiple devices, thus eliminating the need for pre-verification of the devices participating in the collaborative processing task. Furthermore, since the first device obtains multiple sub-vectors, collaborative execution of the task can be achieved through these multiple sub-vectors, improving the efficiency of the collaborative processing task. Furthermore, the contribution of the first device is calculated using the approximate Shapley value sent by the second device, along with quality and time parameters, thus quantifying the contribution and improving its accuracy.
[0038] In one embodiment, the plurality of subvectors includes a first subvector and n-1 second subvectors; The process of obtaining multiple sub-vectors includes: Extract the data vector from the local data of the first device; The data vector is divided into n first sub-vectors, where n is the number of devices in the collaborative processing task and n is a positive integer greater than 1. Send n-1 first sub-vectors to other devices respectively, and delete the n-1 first sub-vectors in the first device, wherein the other devices are devices other than the first device among the plurality of devices; Receive n-1 second sub-vectors sent by the other devices, where each of the n-1 second sub-vectors corresponds one-to-one with the other devices, and the second sub-vectors are sub-vectors obtained by the other devices after splitting the data vector of the local data.
[0039] In this embodiment of the invention, a data vector of local data from the first device is extracted; the data vector is divided into n first sub-vectors, where n is the number of devices in the collaborative processing task and is a positive integer greater than 1; n-1 first sub-vectors are sent to other devices respectively, and the n-1 first sub-vectors in the first device are deleted, where the other devices are devices other than the first device; n-1 second sub-vectors sent by the other devices are received, where each of the n-1 second sub-vectors corresponds one-to-one with the other device, and the second sub-vectors are sub-vectors obtained by the other devices after splitting the data vector of local data. Thus, by dividing the data vector of local data by the first device and sending the resulting n-1 first sub-vectors to other devices while retaining one first sub-vector, and simultaneously receiving the n-1 second sub-vectors sent by other devices, the first device includes one first sub-vector and n-1 second sub-vectors, meaning the multiple sub-vectors are sub-vectors from different devices within the multiple devices, thereby enabling collaborative task execution using one first sub-vector and n-1 second sub-vectors.
[0040] Local data refers to data stored within the first device, which is required for collaborative task execution. After extracting the data vector from the local data of the first device, the data vector is divided to obtain sub-vectors for each of the multiple devices.
[0041] Furthermore, after each device is divided into n sub-vectors, each device establishes a point-to-point secure channel with the others using standard encrypted communication protocols (such as Transport Layer Security (TLS) or Secure Sockets Layer (SSL)) to ensure the confidentiality and integrity of subsequent protocol messages. That is, the first device sends n-1 first sub-vectors and receives n-1 second sub-vectors through the secure channel, achieving secure data transmission.
[0042] Specifically, the i-th device among multiple devices has its local data vector xi Perform a sharing operation. Taking additive secret sharing as an example, the i-th device will share x. i Divide into n shares (i.e., sub-vectors) {s i1 ,s i2 ,…,s in}, where n is the total number of devices, and Subsequently, the i-th device will transfer the subvector s. ij It is sent to other devices j (j=1,…,n-1) through a secure channel, while s is retained. ii Wherein, the data vector x i It can be an encrypted data vector, and the resulting sub-vectors are also encrypted sub-vectors.
[0043] The above method enables each device to hold a sub-vector from all devices, thus constructing a distributed, encrypted, and trusted data space. It should be understood that within this space, each device's local data remains physically local, but its encrypted share has been distributed across the computing network, achieving both "logical centralization" and "physical separation" of data to facilitate subsequent privacy-preserving computations.
[0044] In one embodiment, the method further includes: The initial gradient parameters are calculated based on the processing model and the multiple sub-vectors of the ciphertext state. The processing model is a model for processing the task, and the weights of the parameters in the processing model are the first model weights. The initial gradient parameters are sent to the second device; The device receives a second model weight sent by the second device. The second model weight is obtained by the second device adjusting the first model weight based on global gradient parameters. The global gradient parameters are obtained by aggregating the initial gradient parameters of the multiple devices. The weights of the parameters within the processing model are updated based on the weights of the second model.
[0045] In this embodiment of the invention, initial gradient parameters are calculated based on the processing model and the multiple sub-vectors of the ciphertext state. The processing model is a model for processing the task, and the weights of the parameters within the processing model are first model weights. The initial gradient parameters are sent to the second device. The second model weights are received from the second device, whereby the second device adjusts the first model weights based on global gradient parameters, which are obtained by aggregating the initial gradient parameters from the multiple devices. The weights of the parameters within the processing model are updated based on the second model weights. In this way, the first device calculates the initial gradient parameters based on the processing model and the multiple sub-vectors of the ciphertext state, thereby completing the processing of the task by the first device and obtaining the processing result (i.e., the initial gradient parameters). Then, by sending the initial gradient parameters to the second device and receiving the second model weights from the second device, the weights of the parameters within the processing model can be updated using the second model weights, so that the updated processing model can subsequently execute new tasks.
[0046] In some implementations, the calculation of initial gradient parameters based on the plurality of sub-vectors according to the processing model and the ciphertext state includes: The calculation of the initial gradient parameters of the multiple sub-vectors based on the processing model and the ciphertext state is broken down into multiple steps, including addition steps and / or multiplication steps; Perform the above steps sequentially; Wherein, if the execution step is the addition step, the addition step is performed based on at least two of the plurality of sub-vectors; and / or, When the execution step is the multiplication step, the first device exchanges the plurality of subvectors with other devices to coordinate the execution of the multiplication step.
[0047] It's important to note that collaborative processing tasks (such as machine learning) can be broken down into a series of basic arithmetic operations, primarily addition and multiplication. Within the Secure Multi-Party Computation (MPC) framework, these operations are performed using specific secure computation primitives, ensuring that no intermediate values or raw data are leaked in plaintext throughout the computation process, thus achieving privacy-preserving computation.
[0048] Specifically, for the addition step, taking two secretly shared sub-vectors a and b as an example, the share of their sum c = a + b can be obtained by each device adding its locally held sub-vectors of a and b. This is a purely local operation, requiring no network communication.
[0049] For the multiplication step, taking two secretly shared subvectors a and b as an example, calculating the share of their product d = a × b is relatively complex, typically requiring one or more rounds of interactive communication. The system employs a standard secure multiplication protocol (e.g., based on the Beaver Triples method), where each device collaboratively calculates the effective share of the product d by exchanging pre-computed random number shares, without exposing the true values of a and b, thus improving the security of data computation.
[0050] In some implementations, before multiple devices collaboratively process a task, the multiple devices involved in the collaborative processing task, as well as the protocols and security parameters during the execution process, can be determined first, and then the multiple devices collaboratively process the task based on the protocols and security parameters.
[0051] Specifically, such as Figure 2 As shown, the process of multiple devices collaboratively processing a task includes the following: The task initiator defines the task, including its objective, data requirements, and MPC protocol, and sends it to the coordinating node. For example, the task objective could be training a logistic regression model for credit scoring; the data requirements could specify the type, format, and anonymization requirements of the data features to be provided by each device, as well as the preset model hyperparameters, such as learning rate, regularization coefficient, and number of iterations. The MPC protocol can adaptively select the optimal secure computation protocol from a pre-defined MPC protocol library based on the task's nature (e.g., computational complexity, number of devices, security requirement level) and preset strategies. For example, for addition- and multiplication-intensive machine learning tasks, a secret-sharing-based protocol, such as the Scalable Protocol for Secure Multi-Party Computation (SPDZ), could be chosen; while for tasks requiring comparisons and complex logical judgments, a protocol based on garbled circuits could be considered.
[0052] After receiving the data sent by the task initiator, the coordinating node broadcasts the task information to the device.
[0053] After receiving the task information, the device registers to join the task if it meets the conditions for collaborative processing. Specifically, interested data holders (i.e., devices) respond to the task by registering their identity information (e.g., public key, network address) with the system.
[0054] The coordinating node sends a list of devices for collaborative processing tasks to each registered device, and the registered devices negotiate and determine the security parameters. The coordinating node maintains a list of all registered device identifiers (e.g., public keys, network addresses), visible to all legitimate participants, for subsequent secure communication and protocol execution. The security parameters to be negotiated include a security model and cryptographic parameters. The security model is the model by which the devices process the tasks, and the cryptographic parameters are the cryptographic parameters used during task processing. For example, the security model needs to be negotiated to determine whether to operate under a "semi-honest" model or a "malicious" model that can resist malicious behavior; while cryptographic parameters need to be negotiated, such as key length and the size of finite fields, to ensure the cryptographic security of the computation process.
[0055] After receiving the device list and security parameters, each device divides the data into sub-vectors, sends the sub-vectors to other devices, and receives sub-vectors sent by other devices. For example, device 1 retains sub-vector s. 11 Device 1 sends subvector s to device n 1n Meanwhile, device n retains subvector s. nn Device n sends subvector s to device 1 n1 This allows for the sharing of subvectors; After each device completes the sharing of subvectors, it sends a message to the coordinating node confirming the completion of initialization. The coordinating node then starts coordinating and processing tasks through each device.
[0056] Please see Figure 3 , Figure 3 This is a flowchart of a privacy-based contribution metric method applied to a second device, as provided in an embodiment of the present invention. Figure 3 As shown, it includes the following steps: Step 301: Calculate the approximate Shapley value for each of the multiple devices; Step 302: Send the corresponding approximate Shapley values to the plurality of devices; Step 303: Receive the contribution value sent by each device. The contribution value is calculated by the device based on the approximate Shapley value, quality parameter and timeliness parameter of the ciphertext state. The quality parameter is used to characterize the data quality of multiple sub-vectors. The timeliness parameter is used to characterize the time when each device sends the sub-vector. Each sub-vector is obtained by dividing the data vector corresponding to the local data of the corresponding device. Step 304: Store the contribution values of the multiple devices in the blockchain.
[0057] In this embodiment of the invention, an approximate Shapley value is calculated for each of a plurality of devices; the corresponding approximate Shapley value is sent to the plurality of devices; a contribution score is received from each device, wherein the contribution score is calculated by the device based on the approximate Shapley value, quality parameters, and timeliness parameters of the encrypted state, the quality parameters characterizing the data quality of multiple sub-vectors, and the timeliness parameters characterizing the time at which each device sends the sub-vectors, each sub-vector being a data vector partition corresponding to the local data of the respective device; and the contribution scores of the plurality of devices are stored in the blockchain. Thus, by having a second device calculate and send the approximate Shapley value to each device, each device can calculate its contribution score; and by receiving the contribution scores from multiple devices, the contribution scores of multiple devices can be stored in the blockchain to improve the reliability of the contribution scores.
[0058] In some implementations, before calculating the approximate Shapley value for each of the multiple devices, a utility function and an evaluation environment can be defined. Specifically, the utility function is defined as follows: the second device predefines a utility function V(S) based on the task objective to measure the performance of the jointly trained model. For example, for a risk control model training task, the utility function can be defined as the area under the curve (AUC), accuracy, or F1 score of the model on a public or encrypted validation set. The evaluation environment is prepared by creating a test dataset to evaluate the model's performance. To protect the privacy of the test data, this dataset can also exist in a trusted data space in the form of secret shares.
[0059] In some implementations, an approximate Shapley value is calculated for each of the multiple devices, specifically including the following: Generate random permutations; The approximate Shapley value for each device is calculated based on random permutations.
[0060] The generated random permutation can be: Where K is the preset number of samplings. The larger the value of K, the more accurate the estimation result, but the higher the computational cost.
[0061] The above method calculates the approximate Shapley value for each device based on random permutation. The second device simulates the sequential addition process of the devices and calculates the marginal contribution of each device. Taking the first device as an example, the approximate Shapley value of the first device is calculated based on random permutation, including: Determine the predecessor subset of the first device in the random permutation; wherein, the predecessor subset can be represented as That is, in random permutation The set of all devices preceding i.
[0062] The process of invoking cooperative processing tasks utilizes only a subset of predecessors. A baseline model is trained using the corresponding data share, and the first utility value of the first device is securely computed on the cryptographic verification set. .
[0063] The second device invokes the process again, utilizing... The corresponding data share is used to train an augmentation model and securely compute the second utility value of the first device. .
[0064] Calculate the marginal contribution of the first device in each of the random permutations. Specifically: .
[0065] The approximate Shapley value of the first device is calculated based on its marginal contribution in each permutation. After calculating for all K permutations, the approximate Shapley value S of the i-th device is obtained. i This can be the average marginal contribution of the i-th device in K samplings. The process of calculating this average is also accomplished using a security computation primitive, specifically expressed by the following formula: ; The above formula is used to calculate the approximate Shapley value for each device.
[0066] In one embodiment, the method further includes: Receive the initial gradient parameters sent by each device, wherein the initial gradient parameters are calculated by the device based on the processing model and the multiple sub-vectors of the ciphertext state, and the weights of the intrinsic parameters of the processing model are the first model weights; The gradient parameters of the multiple second devices are aggregated to obtain global gradient parameters; The weights of the first model are adjusted based on the global gradient parameters to obtain the weights of the second model; The second model weights are sent to the plurality of devices.
[0067] In this embodiment of the invention, initial gradient parameters sent by each device are received. These initial gradient parameters are calculated by the device based on a processing model and multiple sub-vectors of the encrypted state. The weights of the intrinsic parameters of the processing model are designated as first model weights. The gradient parameters of the multiple second devices are aggregated to obtain global gradient parameters. The first model weights are adjusted based on the global gradient parameters to obtain second model weights. The second model weights are then sent to the multiple devices. In this way, by calculating the second model weights through the second devices and then sending them to the multiple devices, the model weights of the multiple devices are updated, enabling the multiple devices to coordinate task processing based on the updated weights.
[0068] Specifically, such as Figure 4 As shown, after each device acquires multiple sub-vectors, multiple iterations are performed. In each iteration, each device determines the number of sub-vectors x it holds. i and the current model weights w t By invoking the safe addition and multiplication primitives described above, the model collaboratively computes the intermediate results on this data sample (for example, for a logistic regression model, this intermediate result is a linear prediction). (share) and its corresponding initial gradient parameters All calculations are performed in encrypted form to enhance data security.
[0069] Furthermore, the second device calculates the initial gradient parameters from all devices. Perform safe aggregation (using the safe addition primitive) to obtain the global gradient parameters. Specifically, it can be expressed as .
[0070] After obtaining the global gradient parameters, the weights of the first model are adjusted to obtain the weights of the second model. Specifically, this can be calculated using the gradient descent method, and can be expressed as follows: , w in the formula t+1 For the weights of the second model, w t The weights of the first model. This is the learning rate. Thus, through safe subtraction (essentially addition) and safe scalar multiplication, the model weights w for the new round of model calculation are obtained. t+1 .
[0071] It should be noted that the above iterative process will be repeated until a preset convergence condition is met. The convergence condition can be: reaching a preset maximum number of iterations.
[0072] The model's performance metrics (such as AUC) on the validation set change less than a threshold. The calculation of these performance metrics must also be performed securely within an MPC environment.
[0073] When training converges, the final model weights w are obtained. final The data is still distributed across various devices in encrypted form. At this point, according to a preset access control policy, the second device can collect the weights broadcast by all devices and reconstruct the final plaintext model M through local addition operations. final .
[0074] In this way, only the final aggregated model parameters are exposed, while the original data, intermediate calculation results, and their respective gradient parameters and contributions from multiple devices remain encrypted and protected, thereby improving data integrity.
[0075] In some implementations, the contributions of the multiple devices are stored on a blockchain, which may specifically include the following: The second device formats the verified and (optionally) signed contributions into a transaction, invoking a specific function of the "stake distribution smart contract" deployed on the target blockchain network (such as Hyperledger Fabric). To prevent data tampering, the transaction may include generated multi-party signatures, which the smart contract verifies before execution. For example, it might call a function named `distributeRewards(address[]participants, uint256[]contributions)`.
[0076] Contribution points are recorded on the blockchain. After a transaction is packaged and confirmed by the blockchain network, the address of each device and its corresponding contribution point C are recorded. i It is stored permanently on the blockchain ledger as an immutable record, thus enabling the contribution to be recorded on the chain.
[0077] Furthermore, after the contribution is recorded on the blockchain, it can be minted as a token of equity for subsequent verification.
[0078] Specifically, upon receiving a call request, the equity allocation smart contract can automatically execute its internally preset allocation logic. This logic first verifies whether the call source is the address of an authorized oracle (i.e., a second device) to ensure the legitimacy of the data.
[0079] Then, the equity allocation contract is based on the total value pool (e.g., the total revenue generated from this collaborative computation) and the contribution C of each device. i In total contribution The percentage of equity certificates received is used to calculate the number of equity certificates that the individual is entitled to.
[0080] Specifically, this invention may adopt two or more of the following certification standards: One type is the fungible token (FT) (such as ERC-20). This means that the stake is divisible, and the stake distribution contract can mint a number of tokens for each device that is proportional to its contribution.
[0081] The second type is the non-fungible token (NFT) (such as ERC-721 or ERC-1155). This token embodies the uniqueness of each contribution, and the equity distribution contract can mint a unique NFT for each device's contribution in this task. The metadata of this NFT can record detailed information, such as task ID, contribution level, data type, timestamp, etc., making it a "data contribution certificate" with legal and economic significance.
[0082] Furthermore, the smart contract calls the corresponding token standard interface (e.g., the _mint() function) to generate new equity tokens on the blockchain. After the tokens are minted, the smart contract immediately executes a transfer operation (e.g., calling the transfer() or safeTransferFrom() function) to atomically transfer the newly minted equity tokens to the blockchain addresses provided by each data device during registration.
[0083] It should be noted that once a transaction is finally confirmed on the blockchain, the entire rights allocation process is complete. Each device can view the acquired rights certificates in its wallet and freely hold, display, or trade them on the secondary market. The process of putting contributions on the blockchain is fully automated, transparent, and enforced by code, requiring no human intervention or trust endorsement from centralized institutions. This achieves an end-to-end trusted closed loop from contribution measurement to value allocation, improving on-chain efficiency and security.
[0084] This invention also provides a structural diagram of a contribution metric system based on privacy computing, for performing the above-mentioned tasks. Figure 1 or Figure 3 The contribution metric method based on privacy-preserving computation is shown.
[0085] Specifically, such as Figure 5 As shown, the contribution measurement system based on privacy computing includes a trusted data space construction module, a multi-dimensional dynamic contribution measurement module, and a rights certificate generation and allocation module.
[0086] The Trusted Data Space Construction Module is built on the Secure Multi-Party Computation (MPC) protocol and operates independently of the blockchain network. Its function is to provide a secure, off-chain distributed computing environment for multiple untrusted data devices (P1, P2, ..., Pn). The difference between this and on-chain computing is that, unlike the method of directly writing encrypted data to the blockchain and performing homomorphic operations through smart contracts, this module uses Secret Sharing technology. Each device splits the original data into random shares, interacting only peer-to-peer between device nodes within the network, without storing the encrypted data or shares on the blockchain ledger. This architecture achieves "logical centralization and physical separation," avoiding the storage explosion and gas fee limitations of the blockchain, supporting complex, high-traffic iterative computation tasks (such as machine learning model training and repeated gradient aggregation), while ensuring that data is destroyed immediately after computation, eliminating the risk of permanent on-chain retention.
[0087] The multidimensional dynamic contribution quantification module is deployed within the trusted data space and is responsible for quantifying the contributions of each data device while protecting privacy.
[0088] The multidimensional dynamic contribution metric module includes: The collaborative computing task interface is used to receive a secure computing environment from a trusted data space and to provide an execution entry point for specific collaborative computing tasks (such as joint model training). The privacy-preserving approximate Shapley value engine calculates an approximate Shapley value for each device. Unlike traditional Shapley value calculations that require aggregating plaintext data, this engine is based on secure multi-party computation protocols (such as secret sharing) and employs approximation algorithms such as Monte Carlo Permutation Sampling. The entire marginal value contribution calculation process (including sub-model training and evaluation) is performed in encrypted form, ensuring that the original data, intermediate model parameters, and validation set labels of each device are not leaked during the contribution calculation process; only the final approximate Shapley value is output.
[0089] A multi-dimensional factor library is used to store and manage contribution evaluation dimensions other than model utility, such as data quality, data timeliness, and data volume. These factors can be pre-evaluated in a privacy-preserving manner during the task initialization phase.
[0090] The contribution calculation unit is used to fuse approximate Shapley values (S) from the APPSV engine. i ) and multidimensional parameters from a multidimensional factor library ( The contribution of each device is calculated based on preset weights and formulas.
[0091] Furthermore, the equity token generation and allocation module is used to upload the contribution calculated through privacy calculations to the blockchain. This module receives the calculated contribution C. i It is responsible for triggering calls to smart contracts deployed on the blockchain network.
[0092] In some implementations, the contribution metric system based on privacy computing also includes a blockchain network, which includes smart contracts and stake tokens, to record the device's contribution on the blockchain.
[0093] Among them, smart contracts are pre-written automated contracts that contain equity allocation logic. When called by the equity certificate generation and allocation module, the smart contract will automatically execute the minting and allocation logic of equity certificates based on the input contribution data.
[0094] The stake certificates are digital assets minted by smart contracts, which can be fungible tokens (FTs) or non-fungible tokens (NFTs), representing the stakes that data devices acquire in this collaboration. These certificates are automatically allocated to the corresponding blockchain addresses of each device.
[0095] Please see Figure 6 , Figure 6 This is a structural diagram of a privacy-based contribution quantification device applied to a first device, as provided in an embodiment of the present invention. Figure 6 As shown, the privacy-based computational contribution quantification device 600 includes: The acquisition module 601 is used to acquire multiple sub-vectors, which correspond one-to-one with multiple devices. Each sub-vector is obtained by dividing the data vector corresponding to the local data of the corresponding device. The multiple devices include the first device. The first receiving module 602 is used to receive the approximate Shapley value sent by the second device; The first calculation module 603 is used to calculate the quality parameters and timeliness parameters corresponding to the plurality of sub-vectors. The quality parameters are used to characterize the data quality of the plurality of sub-vectors, and the timeliness parameters are used to characterize the time when each of the plurality of devices sends the sub-vectors. The second calculation module 604 is used to calculate the contribution of the first device based on the approximate Shapley value of the encrypted state, the quality parameter and the timeliness parameter; The first sending module 605 is used to send the contribution value to the second device.
[0096] In one embodiment, the plurality of subvectors includes a first subvector and n-1 second subvectors; The acquisition module 601 includes: Extraction unit, used to extract data vectors from the local data of the first device; A partitioning unit is used to divide the data vector into n first sub-vectors, where n is the number of devices in the collaborative processing task and n is a positive integer greater than 1. A sending unit is configured to send n-1 first sub-vectors to other devices respectively, and delete the n-1 first sub-vectors from the first device, wherein the other devices are devices other than the first device among the plurality of devices; The receiving unit is used to receive n-1 second sub-vectors sent by the other device, wherein each of the n-1 second sub-vectors corresponds one-to-one with the other device, and the second sub-vector is a sub-vector obtained by the other device after splitting the data vector of the local data.
[0097] In one embodiment, the privacy-based computational contribution quantification device 600 further includes: The third calculation module is used to calculate the initial gradient parameters based on the processing model and the multiple sub-vectors of the ciphertext state. The processing model is a model for processing the task, and the weights of the parameters in the processing model are the weights of the first model. The second sending module is used to send the initial gradient parameters to the second device; The second receiving module is used to receive the second model weights sent by the second device. The second model weights are obtained by the second device adjusting the first model weights based on global gradient parameters. The global gradient parameters are obtained by aggregating the initial gradient parameters of the multiple devices. An update module is used to update the weights of the parameters within the processing model based on the weights of the second model.
[0098] The privacy-based contribution quantification device provided in this embodiment of the invention is capable of achieving the above. Figure 1 The various processes and technical features of the embodiments of the privacy-based contribution quantification method applied to the first device shown correspond one-to-one and can achieve the same technical effect. To avoid repetition, they will not be described again here.
[0099] It should be noted that the contribution quantification device based on privacy computing in the embodiments of the present invention can be a device, or it can be a component, integrated circuit, or chip in an electronic device.
[0100] Please see Figure 7 , Figure 7 This is a structural diagram of a privacy-based contribution quantification device applied to a second device, as provided in an embodiment of the present invention. Figure 7 As shown, the privacy-based computational contribution quantification device 700 includes: Calculation module 701 is used to calculate the approximate Shapley value for each of the multiple devices; The first sending module 702 is used to send corresponding approximate Shapley values to the plurality of devices; The first receiving module 703 is used to receive the contribution value sent by each device. The contribution value is calculated by the device based on the approximate Shapley value, quality parameter and timeliness parameter of the ciphertext state. The quality parameter is used to characterize the data quality of multiple sub-vectors. The timeliness parameter is used to characterize the time when each device sends the sub-vector. Each sub-vector is obtained by dividing the data vector corresponding to the local data of the corresponding device. Storage module 704 is used to store the contribution values of the multiple devices to the blockchain.
[0101] In one embodiment, the privacy-based computational contribution quantification device 700 further includes: The second receiving module is used to receive the initial gradient parameters sent by each device. The initial gradient parameters are calculated by the device based on the processing model and the multiple sub-vectors of the ciphertext state. The processing model is the weight of the intrinsic parameters, which is the weight of the first model. An aggregation module is used to aggregate the gradient parameters of the multiple second devices to obtain global gradient parameters; An adjustment module is used to adjust the weights of the first model based on the global gradient parameters to obtain the weights of the second model. The second sending module is used to send the second model weights to the plurality of devices.
[0102] The privacy-based contribution quantification device provided in this embodiment of the invention is capable of achieving the above. Figure 3 The various processes and technical features of the embodiments of the privacy-based contribution quantification method applied to the second device shown are identical and can achieve the same technical effect. To avoid repetition, they will not be described again here.
[0103] It should be noted that the contribution quantification device based on privacy computing in the embodiments of the present invention can be a device, or it can be a component, integrated circuit, or chip in an electronic device.
[0104] This invention also provides an electronic device applied to a first device, comprising: a processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the above-described functionality. Figure 1 The various processes shown in the embodiment of the privacy-based computation contribution quantification method applied to the first device can achieve the same technical effect, and will not be described again here to avoid repetition.
[0105] For details, see Figure 8 As shown, this embodiment of the invention also provides an electronic device, including a bus 801, a transceiver 802, an antenna 803, a bus interface 804, a processor 805, and a memory 806.
[0106] The transceiver 802 is used to acquire multiple sub-vectors, which correspond one-to-one with multiple devices. Each sub-vector is obtained by dividing the data vector corresponding to the local data of the corresponding device. The multiple devices include the first device. The transceiver 802 is also used to receive an approximate Shapley value sent by the second device; The processor 805 is used to calculate the quality parameters and timeliness parameters corresponding to the plurality of sub-vectors. The quality parameters are used to characterize the data quality of the plurality of sub-vectors, and the timeliness parameters are used to characterize the time when each of the plurality of devices sends the sub-vectors. The processor 805 is also used to calculate the contribution of the first device based on the approximate Shapley value of the ciphertext state, the quality parameter, and the timeliness parameter; The transceiver 802 is also used to send the contribution level to the second device.
[0107] In one embodiment, the plurality of subvectors includes a first subvector and n-1 second subvectors; The process of obtaining multiple sub-vectors includes: Extract the data vector from the local data of the first device; The data vector is divided into n first sub-vectors, where n is the number of devices in the collaborative processing task and n is a positive integer greater than 1. Send n-1 first sub-vectors to other devices respectively, and delete the n-1 first sub-vectors in the first device, wherein the other devices are devices other than the first device among the plurality of devices; Receive n-1 second sub-vectors sent by the other devices, where each of the n-1 second sub-vectors corresponds one-to-one with the other devices, and the second sub-vectors are sub-vectors obtained by the other devices after splitting the data vector of the local data.
[0108] In one embodiment, the processor 805 is further configured to calculate initial gradient parameters based on the processing model and the plurality of sub-vectors of the ciphertext state, wherein the processing model is a model for processing the task, and the weights of the parameters within the processing model are first model weights. The transceiver 802 is also used to send the initial gradient parameters to the second device; The transceiver 802 is further configured to receive a second model weight sent by the second device, wherein the second model weight is obtained by the second device adjusting the first model weight based on global gradient parameters, and the global gradient parameters are obtained by aggregating the initial gradient parameters of the multiple devices; The processor 805 is further configured to update the weights of the parameters within the processing model based on the second model weights.
[0109] exist Figure 8 In this document, a bus architecture (represented by bus 801) is used. Bus 801 can include any number of interconnected buses and bridges, linking various circuits including one or more processors represented by processor 805 and memory represented by memory 806. Bus 801 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. Bus interface 804 provides an interface between bus 801 and transceiver 802. Transceiver 802 can be a single element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by processor 805 is transmitted over a wireless medium via antenna 803, which further receives data and transmits data to processor 805.
[0110] The processor 805 manages the bus 801 and handles general processing, and also provides various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. The memory 806 can be used to store data used by the processor 805 during operation.
[0111] Optionally, the processor 805 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or a graphics processing unit (GPU).
[0112] This invention also provides an electronic device applied to a second device, comprising: a processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the above-described... Figure 3 The various processes shown in the embodiment of the privacy-based computation contribution quantification method applied to the second device can achieve the same technical effect, and will not be described again here to avoid repetition.
[0113] For details, see Figure 9 As shown, this embodiment of the invention also provides an electronic device, including a bus 901, a transceiver 902, an antenna 903, a bus interface 904, a processor 905, and a memory 906.
[0114] The processor 905 is used to calculate the approximate Shapley value for each of the multiple devices; The transceiver 902 is used to send corresponding approximate Shapley values to the plurality of devices; The transceiver 902 is also used to receive the contribution value sent by each device. The contribution value is calculated by the device based on the approximate Shapley value, quality parameter and timeliness parameter of the ciphertext state. The quality parameter is used to characterize the data quality of multiple sub-vectors. The timeliness parameter is used to characterize the time when each device sends the sub-vector. Each sub-vector is obtained by dividing the data vector corresponding to the local data of the corresponding device. The processor 905 is also used to store the contribution values of the multiple devices to the blockchain.
[0115] In one embodiment, the transceiver 902 is further configured to receive initial gradient parameters sent by each device, wherein the initial gradient parameters are calculated by the device based on the processing model and the plurality of sub-vectors of the ciphertext state, and the processing model is a first model weight for the weights of the intrinsic parameters. The processor 905 is further configured to aggregate the gradient parameters of the plurality of second devices to obtain global gradient parameters; The processor 905 is further configured to adjust the weights of the first model based on the global gradient parameters to obtain the weights of the second model. The transceiver 902 is also used to send the second model weights to the plurality of devices.
[0116] exist Figure 9In this document, a bus architecture (represented by bus 901) is used. Bus 901 can include any number of interconnected buses and bridges, linking various circuits including one or more processors represented by processor 905 and memory represented by memory 906. Bus 901 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. Bus interface 904 provides an interface between bus 901 and transceiver 902. Transceiver 902 can be a single element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by processor 905 is transmitted over a wireless medium via antenna 903, which further receives data and transmits it to processor 905.
[0117] Processor 905 manages bus 901 and general processing, and also provides various functions, including timing, peripheral interface, voltage regulation, power management, and other control functions. Memory 906 can be used to store data used by processor 905 during operation.
[0118] Optionally, the processor 905 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or a graphics processing unit (GPU).
[0119] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, performs the above-described functions. Figure 1 or Figure 3 The various processes corresponding to the privacy-based contribution quantification method embodiments, and achieving the same technical effect, will not be described again here to avoid repetition. The computer-readable storage medium mentioned includes, for example, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0120] The present invention also provides a computer program product, including computer instructions that, when executed by a processor, implement the above-described... Figure 1 or Figure 3The various processes corresponding to the privacy-based contribution metric method implementation examples, and which can achieve the same technical effect, will not be described again here to avoid repetition.
[0121] In the embodiments of this invention, the terms "first," "second," etc., are used to distinguish similar object parameters 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 comprises 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 object parameters, such as A and / or B and / or C, representing seven possibilities: A alone, B alone, C alone, both A and B present, both B and C present, both A and C present, and A, B, and C present.
[0122] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0123] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or second terminal device, etc.) to execute the methods of the various embodiments of this application.
[0124] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A contribution quantification method based on privacy computing, applied to a first device, characterized in that, include: Multiple sub-vectors are obtained, each sub-vector corresponding to a multiple device. Each sub-vector is obtained by dividing the data vector corresponding to the local data of the corresponding device. The multiple devices include the first device. Receive the approximate Shapley value sent by the second device; Calculate the quality parameters and timeliness parameters corresponding to the multiple sub-vectors. The quality parameters are used to characterize the data quality of the multiple sub-vectors, and the timeliness parameters are used to characterize the time when each of the multiple devices sends the sub-vectors. The contribution of the first device is calculated based on the approximate Shapley value of the encrypted state, the quality parameter, and the timeliness parameter; The contribution level is sent to the second device.
2. The method as described in claim 1, characterized in that, The plurality of sub-vectors includes a first sub-vector and n-1 second sub-vectors; The process of obtaining multiple sub-vectors includes: Extract the data vector from the local data of the first device; The data vector is divided into n first sub-vectors, where n is the number of devices in the collaborative processing task and n is a positive integer greater than 1. Send n-1 first sub-vectors to other devices respectively, and delete the n-1 first sub-vectors in the first device, wherein the other devices are devices other than the first device among the plurality of devices; Receive n-1 second sub-vectors sent by the other devices, where each of the n-1 second sub-vectors corresponds one-to-one with the other devices, and the second sub-vectors are sub-vectors obtained by the other devices after splitting the data vector of the local data.
3. The method as described in claim 1 or 2, characterized in that, The method further includes: The initial gradient parameters are calculated based on the processing model and the multiple sub-vectors of the ciphertext state. The processing model is a model for processing the task, and the weights of the parameters in the processing model are the first model weights. The initial gradient parameters are sent to the second device; The device receives a second model weight sent by the second device. The second model weight is obtained by the second device adjusting the first model weight based on global gradient parameters. The global gradient parameters are obtained by aggregating the initial gradient parameters of the multiple devices. The weights of the parameters within the processing model are updated based on the weights of the second model.
4. A contribution quantification method based on privacy computing, applied to a second device, characterized in that, include: Calculate the approximate Shapley value for each of the multiple devices; Send the corresponding approximate Shapley value to the plurality of devices; The contribution value sent by each device is received. The contribution value is calculated by the device based on the approximate Shapley value, quality parameter and timeliness parameter of the ciphertext state. The quality parameter is used to characterize the data quality of multiple sub-vectors. The timeliness parameter is used to characterize the time when each device sends the sub-vector. Each sub-vector is obtained by dividing the data vector corresponding to the local data of the corresponding device. The contributions of the multiple devices are stored in the blockchain.
5. The method as described in claim 4, characterized in that, The method further includes: Receive initial gradient parameters sent by each device, wherein the initial gradient parameters are calculated by the device based on the processing model and the multiple sub-vectors of the ciphertext state, and the weights of the intrinsic parameters of the processing model are the first model weights; The gradient parameters of the multiple second devices are aggregated to obtain global gradient parameters; The weights of the first model are adjusted based on the global gradient parameters to obtain the weights of the second model; The second model weights are sent to the plurality of devices.
6. A contribution quantification device based on privacy computing, applied to a first device, characterized in that, include: The acquisition module is used to acquire multiple sub-vectors, which correspond one-to-one with multiple devices. Each sub-vector is obtained by dividing the data vector corresponding to the local data of the corresponding device. The multiple devices include the first device. The first receiving module is used to receive the approximate Shapley value sent by the second device; The first calculation module is used to calculate the quality parameters and timeliness parameters corresponding to the plurality of sub-vectors. The quality parameters are used to characterize the data quality of the plurality of sub-vectors, and the timeliness parameters are used to characterize the time when each of the plurality of devices sends the sub-vectors. The second calculation module is used to calculate the contribution of the first device based on the approximate Shapley value of the encrypted state, the quality parameter, and the timeliness parameter; The first sending module is used to send the contribution value to the second device.
7. A contribution quantification device based on privacy computing, applied to a second device, characterized in that, include: The calculation module is used to calculate the approximate Shapley value for each of the multiple devices; The first sending module is used to send the corresponding approximate Shapley value to the plurality of devices; The first receiving module is used to receive the contribution value sent by each device. The contribution value is calculated by the device based on the approximate Shapley value, quality parameter and timeliness parameter of the ciphertext state. The quality parameter is used to characterize the data quality of multiple sub-vectors. The timeliness parameter is used to characterize the time when each device sends the sub-vector. Each sub-vector is obtained by dividing the data vector corresponding to the local data of the corresponding device. A storage module is used to store the contributions of the multiple devices to the blockchain.
8. An electronic device applied to a first device, characterized in that, Including transceivers and processors, The transceiver is used to acquire multiple sub-vectors, which correspond one-to-one with multiple devices. Each sub-vector is obtained by dividing the data vector corresponding to the local data of the corresponding device. The multiple devices include the first device. The transceiver is also used to receive an approximate Shapley value sent by the second device; The processor is used to calculate the quality parameters and timeliness parameters corresponding to the plurality of sub-vectors. The quality parameters are used to characterize the data quality of the plurality of sub-vectors, and the timeliness parameters are used to characterize the time when each of the plurality of devices sends the sub-vectors. The processor is also configured to calculate the contribution of the first device based on the approximate Shapley value of the ciphertext state, the quality parameter, and the timeliness parameter; The transceiver is also used to send the contribution level to the second device.
9. An electronic device applied to a second device, characterized in that, Including transceivers and processors, The processor is used to calculate the approximate Shapley value for each of the multiple devices; The transceiver is used to send corresponding approximate Shapley values to the plurality of devices; The transceiver is also used to receive the contribution value sent by each device. The contribution value is calculated by the device based on the approximate Shapley value, quality parameter and timeliness parameter of the ciphertext state. The quality parameter is used to characterize the data quality of multiple sub-vectors. The timeliness parameter is used to characterize the time when each device sends the sub-vector. Each sub-vector is obtained by dividing the data vector corresponding to the local data of the corresponding device. The processor is also used to store the contribution values of the multiple devices to the blockchain.
10. An electronic device, characterized in that, include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the steps of the contribution quantification method based on privacy computing as described in any one of claims 1 to 5.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the contribution quantification method based on privacy computing as described in any one of claims 1 to 5.
12. A computer program product, characterized in that, It includes computer instructions that, when executed by a processor, implement the steps of the contribution quantification method based on privacy computing as described in any one of claims 1 to 5.