Data processing method and device, equipment and storage medium
By receiving and updating the global data model and using anchor sample loss values to identify malicious data providers, the problem of the platform's difficulty in identifying malicious data providers has been solved, thereby improving data security and accuracy.
Patent Information
- Application Number
- CN202311591861.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-24
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2043-11-24
AI Technical Summary
In existing technologies, platforms struggle to identify malicious data providers, leading to decreased accuracy of the global data model and increased platform losses.
By receiving local data models from data providers, updating the global data model, calculating anchor sample loss values using anchor samples, and generating evaluation data to identify malicious data providers, the frequency of information exposure and interaction is reduced.
It improved the accuracy of identifying malicious data providers, reduced platform losses, and ensured data security and the accuracy of the global data model.
Smart Images

Figure CN117592032B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of data processing technology, and in particular relates to a data identification method, apparatus, device and storage medium. Background Technology
[0002] With the popularization of internet resource trading, the data resources of a single platform are insufficient to support all the service needs of the platform. New service needs have prompted platforms to seek cross-institutional participants, thereby introducing participant data to train the platform's local global data model and achieve effective cooperation between multiple platforms.
[0003] In related technologies, due to the low review threshold of some platforms and the huge profits brought by the leakage of privacy data, the possibility of malicious data providers is gradually increasing. If a platform introduces data from malicious data providers, it will affect the accuracy of the local global data model and cause losses to the platform. Summary of the Invention
[0004] This application provides a data processing method, apparatus, device, and storage medium that can solve the problem in related technologies of being unable to identify malicious data providers, thus increasing platform losses.
[0005] In a first aspect, embodiments of this application provide a data processing method, which may include:
[0006] Receive local data models sent by the data provider;
[0007] By updating the first global data model of the data application party through the local data model, the second global data model is obtained;
[0008] Based on the anchor samples of the data application party, calculate the first anchor sample loss value corresponding to the first global data model and the second anchor sample loss value corresponding to the second global data model. The anchor sample is used to characterize the data features of the data application party in the i-th data category among N data categories, i∈[1,N];
[0009] Based on the loss values of the first anchor sample and the second anchor sample, evaluation data for the data provider is generated. This evaluation data is used to determine whether the data provider is a malicious data provider.
[0010] Secondly, embodiments of this application provide a data processing apparatus, which may include:
[0011] The receiving module is used to receive local data models sent by the data provider;
[0012] The update module is used to update the first global data model of the data application party through the local data model to obtain the second global data model;
[0013] The calculation module is used to calculate the first anchor sample loss value corresponding to the first global data model and the second anchor sample loss value corresponding to the second global data model based on the anchor sample of the data application party. The anchor sample is used to characterize the data features of the data application party in the i-th data category among N data categories, i∈[1,N].
[0014] A generative model is used to generate evaluation data for the data provider based on the loss values of the first anchor sample and the second anchor sample. The evaluation data is used to determine whether the data provider is a malicious data provider.
[0015] Thirdly, embodiments of this application provide a computer device, which includes: a processor and a memory storing computer program instructions;
[0016] When the processor executes computer program instructions, it implements the data processing method as described in the first aspect.
[0017] Fourthly, embodiments of this application provide a computer storage medium storing computer program instructions, which, when executed by a processor, implement the data processing method as described in the first aspect.
[0018] Fifthly, embodiments of this application provide a chip, which includes a processor and a communication interface. The communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the data processing method as shown in the first aspect.
[0019] In a sixth aspect, embodiments of this application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the data processing method as described in the first aspect.
[0020] The data processing method, apparatus, device, and storage medium of this application embodiment, upon receiving a local data model sent by a data provider, can update the first global data model of the data application party through the local data model to obtain a second global data model. Then, based on the anchor sample in the data application party used to characterize the data features of the data application party in the i-th data category among N data categories, the first anchor sample loss value corresponding to the anchor sample and the first global data model and the second anchor sample loss value corresponding to the anchor sample and the second global data model are calculated. Then, based on the first anchor sample loss value and the second anchor sample loss value, evaluation data of the data provider is generated. The evaluation data is used to determine whether the data provider is a malicious data provider. In this way, the data application party can combine its local first global data model and the local data model provided by the data provider for joint modeling with the data application party in the horizontal logistic regression joint modeling. It can independently evaluate the discriminatory power of the local data model provided by the data provider for different data categories of the data application party's own samples, thereby determining whether the data provider is a malicious data provider. This eliminates the need for additional data transmission of other verification information, such as the samples and methods used to train the local data model. The data application party can complete the detection of the data provider, reducing the exposure of the data provider's data information and the frequency of interaction between the data application party and the data provider, thus improving the efficiency of verifying whether the data provider is a malicious data provider. In this way, if the data provider is determined to be a malicious data provider through evaluation data, its influence on joint modeling can be promptly blocked, avoiding losses for the data application party. Furthermore, the anchor samples needed for evaluation by the data application party do not require collaboration with the data provider; this can be completed before calculating the loss values of the first and second anchor samples, without increasing additional computational overhead or posing data security risks to the data application party, thereby improving the security of the data application party's data. Attached Figure Description
[0021] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 This is a schematic diagram of the structure of a data processing system provided in an embodiment of this application;
[0023] Figure 2 A flowchart illustrating a data processing method provided in an embodiment of this application;
[0024] Figure 3 One of the loss representation intentions provided in the embodiments of this application for a data processing method;
[0025] Figure 4 This is a second intentional representation of the loss in a data processing method provided in an embodiment of this application;
[0026] Figure 5 This is a schematic diagram of the structure of a data processing apparatus provided in one embodiment of this application;
[0027] Figure 6 This is a schematic diagram of the structure of a computer device provided in one embodiment of this application. Detailed Implementation
[0028] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.
[0029] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, 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. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.
[0030] The acquisition, storage, use, and processing of data (including but not limited to features and information mentioned in this document) in the technical solution of this application all comply with the relevant provisions of national laws and regulations.
[0031] The orderly flow of financial data, such as transaction data, trading volume, and market capitalization, among multiple institutions to facilitate applications in the same scenario is a major trend in future cross-institutional data cooperation. Among these, horizontal logistic regression models are a joint modeling approach used in data cooperation. Currently, horizontal logistic regression models typically assume honest participation from all data providers. However, with the lowering of relevant technical barriers and the allure of substantial profits from privacy data, the possibility of malicious data providers is gradually increasing. Since malicious data providers can offer partial data models for joint modeling with data users, if the data user fails to detect the malicious provider in time, they may merge the malicious partial data model with their local global data model to generate a new global data model. This reduces the security and accuracy of the new global data model, and in some cases, renders it unusable in actual data detection scenarios, increasing losses for the data user.
[0032] In related technologies, remote sensing image data collected by various satellites can be aggregated and processed by region to construct a local model. Then, using corresponding edge servers as units, the category accuracy of the local encrypted model relative to the validation set and the objective function loss value of the data in the local model are evaluated. Based on the localized category accuracy and objective function loss value, a trust value is calculated for each edge server. The credibility of this trust value is guaranteed by digital signature and on-chain verification to resist the identification of malicious data providers. However, this method involves a complex evaluation process for malicious data providers and an incomplete consideration of different categories. On the one hand, the evaluation process adopts a distributed approach to calculate the complexity of the local model, and multiple validation set copies need to be distributed from the edge servers to each data holder for evaluation, increasing the evaluation latency. On the other hand, in considering different categories, both the calculation of accuracy and objective function loss ignore the impact of different subcategories. In reality, different subcategories have different values for the application scenario, and the contribution of different data providers to the model accuracy may vary across different categories, reducing the accuracy of identifying malicious data providers.
[0033] To address the aforementioned technical problems, embodiments of this application provide a data processing method, apparatus, computer equipment, and storage medium.
[0034] Based on this, the following will be combined with the appendix Figures 1 to 6 This application describes in detail the data processing methods, apparatus, computer equipment, and storage media of the embodiments. It should be noted that these embodiments are not intended to limit the scope of this application.
[0035] Figure 1 This is a schematic diagram of a data processing system provided in an embodiment of this application.
[0036] like Figure 1 As shown, the data processing system 10 provided in this application embodiment can be a data processing system for a data application party. The data processing system 10 may include a data application party anchor sample construction module 101, a category triplet loss calculation module 102, and a malicious data provider module 103.
[0037] The data processing system 10 described above will be explained in detail below.
[0038] The data application anchor sample construction module 101 is used to screen several samples that can represent various categories of data application parties, that is, to determine anchor samples based on the clustering results of transaction data of data application parties in Y transaction dimensions. Specifically, the transaction data of data application parties in Y transaction dimensions is obtained; the transaction data in Y transaction dimensions is clustered to obtain M transaction clusters. The i-th transaction cluster in the M transaction clusters includes a first data point carrying a first data category label and a second data point carrying a second data category label. The first data category label is the label corresponding to the first data category, and the second data category label is the label corresponding to the second data category; the first precision value of the first data point in the i-th transaction cluster and the second precision value of the second data point in the i-th transaction cluster are calculated; based on the first precision value and the second precision value, target data points are screened from the M transaction clusters as anchor samples.
[0039] It should be noted that when a data provider offers a malicious local data model, the accuracy of the global data model, which should have been further improved after joint modeling, will inevitably decrease. This manifests as increased distance between similar data and decreased distance between dissimilar data in terms of category loss. When each data category has a certain number of anchor samples, the evaluation results will be more objective than with a single anchor sample. Therefore, in this embodiment, the number of anchor samples can be at least one per transaction dimension, or at least one per data category in each transaction cluster. This allows for a more comprehensive assessment of the changes in the ability of the local data model provided by the data provider to distinguish between class intervals of the data application's own samples, increasing the ability to verify whether the data provider is a malicious data provider and improving the accuracy of malicious data provider detection.
[0040] Therefore, the data application anchor sample construction module 101 in this embodiment can find representative samples in the transaction cluster based on the clustering results, so that each data category has a certain number of samples, and these samples can represent their corresponding categories under a certain metric. In this way, the impact of the data application's global data model on different data categories of the data application is considered more comprehensively, improving the accuracy of determining anchor samples, thereby improving the accuracy of the anchor sample loss value corresponding to the anchor sample, and thus ensuring the accuracy of evaluating whether the data provider is a malicious data provider.
[0041] The category triplet loss calculation module 102 is used to evaluate the ability of the global data model to distinguish categories on a validation set composed of its own samples before and after the model update. Specifically, it constructs a triplet loss function corresponding to the anchor sample based on the anchor sample output by the data application anchor sample construction module 101. Specifically, the triplet loss function can be constructed based on the anchor sample's data category label, the data transaction scenario, the first type of samples carrying the first data category label from the data application party, and the second type of samples carrying the second data category label from the data application party. Furthermore, the category triplet loss calculation module 102 can also be used to calculate the first anchor sample loss value corresponding to the first global data model and the second anchor sample loss value corresponding to the second global data model using the triplet loss function.
[0042] Therefore, based on the anchor sample's data category label, data transaction scenario, first-class samples carrying the first data category label from the data application party, and second-class samples carrying the second data category label from the data application party, a triplet loss function corresponding to the anchor sample is constructed. Using the triplet loss function, the loss of the original global data model of the data application party and the second global data model (after fusing the local data provided by the data provider with the original global data model) relative to all anchor samples is calculated for each data category, including both similar and dissimilar samples. This approach more comprehensively considers the impact of the data application party's global data model on different data categories of the data application party, improving the accuracy of the anchor sample loss value corresponding to the anchor sample, thereby ensuring the accuracy of evaluating whether the data provider is a malicious data provider.
[0043] The malicious data provider module 103 is used to identify whether a data provider with cooperative value has maliciously tampered with the global data model of the data application party through the local model. That is, based on the first anchor sample loss and the second anchor sample loss output by the category triplet loss calculation module 102, it is determined whether the data provider is a malicious data provider. In other words, by comparing the changes in the loss values of the original global data model of the data application party and the second global data model after the fusion of the local data provided by the data provider and the original global data model, it can be determined whether the data provider has maliciously participated in the current fusion process under each data category for samples of the same and different categories.
[0044] Therefore, when the data processing system provided in this application receives a local data model sent by the data provider, it can update the first global data model of the data application party through the local data model to obtain a second global data model. Then, based on the anchor sample in the data application party used to characterize the data features of the data application party in the i-th data category among N data categories, it calculates the first anchor sample loss value corresponding to the anchor sample and the first global data model and the second anchor sample loss value corresponding to the anchor sample and the second global data model. Then, based on the first anchor sample loss value and the second anchor sample loss value, it generates evaluation data of the data provider. The evaluation data is used to determine whether the data provider is a malicious data provider. In this way, data users can independently evaluate the discriminatory power of the local data model provided by the data provider for different data categories of the data user's own samples in the joint modeling of horizontal logistic regression, by combining the local first global data model and the local data model provided by the data provider for joint modeling with the data user. This allows for the determination of whether the data provider is a malicious data provider. Furthermore, even with limited information exchange between the data provider and the data user, any number of malicious data providers can be detected in a timely manner, which can promptly block the impact of malicious data providers on joint modeling. This also helps to protect the rights and interests of the data user and reduce the losses of the data user.
[0045] Therefore, in order to better illustrate the content of the embodiments of this application, the following will be combined with... Figure 2 The following describes a data processing method provided in an embodiment of this application.
[0046] Figure 2 This is a flowchart of a data processing method provided in an embodiment of this application.
[0047] like Figure 2 As shown, this data processing method can be applied to the data processing system of the data application party. This data processing system can be installed on a computer device, and the data processing method can specifically include the following steps:
[0048] Step 210: Receive the local data model sent by the data provider; Step 220: Update the first global data model of the data application party using the local data model to obtain the second global data model; Step 230: Based on the anchor samples of the data application party, calculate the first anchor sample loss value corresponding to the anchor sample and the first global data model, and the second anchor sample loss value corresponding to the anchor sample and the second global data model. The anchor sample is used to characterize the data features of the data application party in the i-th data category among N data categories, i∈[1,N]. Specifically, i can be an integer between 1 and N, i.e., i takes the values 1, 2, 3, ..., N; Step 240: Generate evaluation data for the data provider based on the first anchor sample loss value and the second anchor sample loss value. The evaluation data is used to determine whether the data provider is a malicious data provider.
[0049] In this way, the data application party can independently evaluate the discriminatory power of the local data model provided by the data provider for different data categories of the data application party's own samples, by combining the local first global data model and the local data model provided by the data provider for joint modeling with the data application party. This allows for the determination of whether the data provider is a malicious data provider. No additional verification information, such as the samples and methods used to train the local data model, needs to be transmitted with the data application party. This reduces the exposure of the data provider's data information and the frequency of interaction between the data application party and the data provider, improving the efficiency of verifying whether the data provider is a malicious data provider. Thus, if the data provider is determined to be a malicious data provider through evaluation data, its influence on joint modeling can be promptly blocked, preventing losses to the data application party. Furthermore, the anchor samples needed for the evaluation by the data application party do not require collaboration with the data provider; this can be completed before calculating the loss values of the first and second anchor samples, without increasing additional computational overhead or posing data security risks to the data application party, thereby improving the security of the data application party's data.
[0050] The steps described above are explained in detail below.
[0051] First, regarding step 210, in some embodiments of this application, the local data model in the embodiments of this application is a logistic regression model. Specifically, the logistic regression model can be a horizontal logistic regression model.
[0052] In this embodiment, the local data model is a data model sent by the data provider to the data application provider. This local data model is used to fuse with the global data model in the data provider to obtain a new global data model for the data application provider, thereby optimizing the original global data model in the data application provider and improving its accuracy. Secondly, regarding step 220, in order to accurately identify whether each data provider is a malicious data provider, the model fusion is a tentative one-to-one fusion. That is, the data application provider can choose the data provider it wants to verify. Whether to verify all data providers connected to the data application provider can be determined based on the actual application. Based on this, the local data model 1 provided by data provider 1 is fused with the first global data model of the data application provider to obtain the second global data model 1, and the local data model 2 provided by data provider 2 is fused with the first global data model of the data application provider to obtain the second global data model 2. In this way, one-to-one verification of whether a data provider is a malicious data provider can be performed, improving the accuracy of verifying whether a data provider is a malicious data provider.
[0053] In some embodiments of this application, the first global data model and the second global data model in the embodiments of this application are logistic regression models. Specifically, the logistic regression model can be a horizontal logistic regression model.
[0054] The first global data model can be the global data model optimized in the previous round, or it can be...
[0055] The data application provider replicates the global data model optimized in the previous round. In this way, after confirming through evaluation data that the data provider is not providing malicious data, the local data model sent by the data provider is then merged into the global data model optimized in the previous round. This avoids the situation where the local data model provided by the data application provider is merged with the original local global data model without verifying the identity of the data provider, which could cause the local data model provided by the malicious data provider to interfere with the global data model optimized in the previous round in the data application provider.
[0056] Based on this, the condition for triggering step 220 can be that, when the data application party is performing a horizontal federated modeling process, it verifies whether the data provider is a malicious data provider. Without the data participating in the additional transmission of other verification information, such as the samples and methods for training local data models, the data application party can complete the detection of the accuracy of the local data models provided by each data provider. This reduces the exposure of data information of data providers, reduces the frequency of interaction between the data application party and the data provider, and improves the efficiency of verifying whether the data provider is a malicious data provider.
[0057] Based on this, in some embodiments of this application, step 220 may specifically include:
[0058] Using the parameters of the first data model in the local data model, and following the federated averaging algorithm, the parameters of the second data model in the first global data model are updated to obtain the second global data model.
[0059] For example, the local data model of the data parameter square in the embodiments of this application is denoted as f. i The first global data model is denoted as F. o The second global data model is denoted as F. n Thus, upon receiving a local model f from the j-th data provider out of P data providers... i In this case, the FedAvg algorithm is used, through the local data model f i The first data model parameter, such as waveform parameter w, is... a The mean is used to update the first global data model F. o The second data model parameter w a The second global data model is obtained and denoted as F. n .
[0060] Furthermore, regarding step 230, in some embodiments of this application, before step 230, the anchor sample can be determined in the following manner. Based on this, the data processing method may also include steps 2501 to 2504, as detailed below.
[0061] Step 2501: Obtain transaction data from the data application party in Y transaction dimensions, where Y is a positive integer.
[0062] In this application embodiment, the transaction dimensions can be transaction time, resource transfer volume, transaction type, or transaction method, etc. For example, if Y is 2, then the two transaction dimensions can be transaction time and resource transfer volume. In this case, the transaction data can include time-series transaction data statistically analyzed according to transaction time, and transaction data sorted from largest to smallest according to resource transfer volume.
[0063] Step 2502: Cluster the transaction data of Y transaction dimensions to obtain M transaction clusters. The i-th transaction cluster in the M transaction clusters includes a first data point carrying a first data category label and a second data point carrying a second data category label. The first data category label is the label corresponding to the first data category, and the second data category label is the label corresponding to the second data category.
[0064] Specifically, step 2502 may include:
[0065] The transaction data of Y transaction dimensions are clustered using the Mean-Shift clustering algorithm or the K-means clustering algorithm to obtain M transaction clusters.
[0066] For example, the K-means clustering algorithm is used as an example to illustrate the process. The K-means clustering algorithm is used to scale the data points with data category labels carried by the data application party according to the preset scaling parameters of each transaction dimension, so as to cluster the transaction data of Y transaction dimensions.
[0067] Alternatively, taking the mean-shift clustering algorithm as an example, the cluster center is determined by calculating the mean of the transaction data in Y transaction dimensions. The cluster center is continuously updated until it no longer changes position. In this way, two data points that are more similar can be clustered into the same transaction cluster.
[0068] It should be noted that the embodiments of this application use the mean offset clustering algorithm or the K-means clustering algorithm as examples, including but not limited to these two clustering algorithms for clustering transaction data of Y transaction dimensions.
[0069] Step 2503: Calculate the first precision value of the first data point in the i-th transaction cluster and the second precision value of the second data point in the i-th transaction cluster. Specifically, step 2503 may include steps 25031 and 25032, as shown below.
[0070] Step 25031: Based on the number of data points in the i-th transaction cluster that have the same data category label as the first data point and the total number of samples in the i-th transaction cluster, calculate the first precision value of the first data point in the i-th transaction cluster.
[0071] For example, if the number of data points with the same data category label as the first data point is 50, and the total number of samples in the i-th transaction cluster is 100, then the first precision value can be the ratio of the number of data points with the same data category label as the first data point to the total number of samples in the i-th transaction cluster, which is 0.5. Here, having the same data category label as the first data point refers to the data points in the i-th transaction cluster that carry the first data category label, including the first data point itself.
[0072] It should be noted that for each transaction cluster, the number of first data points can be at least one. In this way, the first precision value of each first data point in each transaction cluster can be calculated in the above manner.
[0073] Step 25032: Based on the number of data points in the i-th transaction cluster that have the same data category label as the second data point and the total number of samples in the i-th transaction cluster, calculate the second precision value of the second data point in the i-th transaction cluster.
[0074] For example, similar to the principle of calculating the first precision value in step 25031, if the number of data points with the same data category label as the second data point is 75, and the total number of samples in the i-th transaction cluster is 100, then the second precision value can be the ratio of the number of data points with the same data category label as the second data point to the total number of samples in the i-th transaction cluster, which is 0.75. Here, having the same data category label as the second data point refers to the data points in the i-th transaction cluster that carry the second data category label, including the second data point itself.
[0075] It should be noted that for each transaction cluster, the number of second data points can be at least one. Thus, for each transaction cluster, the first precision value of each second data point in each transaction cluster can be calculated in the manner described above.
[0076] Step 2504: Select target data points as anchor samples from M transaction clusters based on the first precision value and the second precision value.
[0077] Specifically, step 2504 may include steps 25041 and 25042, as shown below.
[0078] Step 25041: Based on the first precision value and the second precision value, select the first transaction cluster from the M transaction clusters. The relationship between the first precision value corresponding to the first data point and the second precision value corresponding to the second data point in the first transaction cluster satisfies the preset precision selection condition.
[0079] For example, for any transaction cluster C i Calculate the precision of the transaction cluster with respect to the positive and negative class classification labels, respectively; that is, the first precision value corresponding to the first data point carrying the first data classification label. And the second precision value corresponding to the second data point carrying the second data classification label. The first transaction cluster that meets at least one of the following preset precision screening conditions will be retained, i.e., the first precision value is much greater than the second precision value. The first transaction cluster and the first precision value are much smaller than the second precision value. The first transaction cluster. Where the first precision value is much larger than the second precision value, i.e. The case of the first transaction cluster can be for a transaction cluster C iThe first precision value is 0.75, and the second precision value is 0.25. At this point, the transaction cluster can be identified as the first transaction cluster. The first precision value is much smaller than the second precision value... The case of the first transaction cluster can be for a transaction cluster C i The first precision value is 0.2, and the second precision value is 0.8. At this point, the transaction cluster can be determined as the first transaction cluster. It should be noted that this application embodiment is illustrated using binary classification, i.e., positive classification and negative classification. However, the data processing method provided in this application embodiment can also be extended to multi-class cases, such as three-class classification, i.e., default, non-default, and default type. In this case, default can be the first data category label, non-default can be the second data category label, and default type can be the third data category label. Based on this, multi-class classification can construct and calculate a triplet loss function in the form of one class against other classes. Correspondingly, the number of comparison matrices for anchor loss values calculated based on the triplet loss function is the number of categories, i.e., three sets.
[0080] Step 25042: Generate anchor samples based on the target data points in the first transaction cluster.
[0081] For example, at least one target data point is selected from the first transaction cluster. This target data point can be a data point carrying a first data classification label, i.e., a positive class, or a data point carrying a second data classification label, i.e., a negative class, to form anchor samples.
[0082] It should be noted that the anchor sample in the embodiments of this application can be one or more. When there are multiple anchor samples, the anchor sample... An anchor sample can be a set of anchor samples. These anchor samples can come from the same transaction cluster out of M transaction clusters, or from multiple transaction clusters out of M transaction clusters. This set of anchor samples includes anchor samples carrying a first data classification label and anchor samples carrying a second data classification label. The rationale for using multiple anchor samples in this application is that, due to changes in the ability of the local data model provided by the data provider to distinguish the class intervals of the data application party's own samples, when a data provider engages in malicious behavior, the accuracy that could have been further improved after joint modeling will inevitably decrease. In terms of class loss, this manifests as a larger distance between samples of the same class and a smaller distance between samples of different classes. When each class has a certain number of anchor samples, the evaluation results will be more objective than with a single anchor sample.
[0083] Specifically, in order to improve the screening accuracy of anchor samples, the target data points can be further judged. That is, step 25042 can specifically include steps 250421 and 250422, as shown below.
[0084] Step 250421: Based on the target data point in the first transaction cluster, determine whether the target data point is a data point in the second transaction cluster among the M transaction clusters.
[0085] For example, if the target data point carries a first data classification label, i.e., a positive data classification label, it can be determined whether the other transaction clusters among the M transaction clusters besides the first transaction cluster include the target data point. If the second transaction cluster among the M transaction clusters includes the target data point, it is necessary to further determine the data classification label carried by the target data point in the second transaction cluster, i.e., to execute step 250422.
[0086] Step 250422: If the target data point is determined to be a data point in the second transaction cluster, and the data category label of the target data point in the first transaction cluster is the same as the data category label in the second transaction cluster, then the target data point is determined as the anchor sample.
[0087] For example, if the data classification label carried by the target data point in the second transaction cluster is also the first data classification label, i.e., the positive data classification label, then the target data point is retained, and the target data point is determined as an anchor sample. Conversely, if the data classification label carried by the target data point in the second transaction cluster is the second data classification label, i.e., the negative data classification label, then the target data point is not retained, and the target data point is deleted from the set of anchor samples.
[0088] Alternatively, after step 250421, the data processing method may further include:
[0089] If the target data point is determined not to be a data point in the second transaction cluster, the target data point is determined as the anchor sample.
[0090] For example, if the target data point is not included in any of the M transaction clusters other than the first transaction cluster, then the target data point is retained, that is, the target data point is determined as the anchor sample.
[0091] In this way, the anchor sample that the data application party looks for when detecting whether the data provider is a malicious data provider can be completed before combining the local first global data model and the local data model provided by the data provider for joint modeling with the data application party, without the need for the data provider's cooperation. This does not increase the additional computational overhead, nor does it bring data security risks to the data application party.
[0092] It should be noted that, in the embodiments of this application, the process by which the data application party combines the local first global data model with the local data model provided by the data provider for joint modeling with the data application party refers to the process by which, when it is determined that the data provider is not a malicious data provider, the data application party updates the previously optimized global data model by using the local data model provided by each of at least one data provider.
[0093] Based on this, step 230 in the embodiments of this application may specifically include steps 2301 and 2302, as shown below.
[0094] Step 2301: Based on the anchor samples from the data application side, construct the triplet loss function corresponding to the anchor samples.
[0095] Specifically, step 2301 may include:
[0096] Based on the anchor sample's data category label, data transaction scenario, first-class samples carrying the first data category label from the data application party, and second-class samples carrying the second data category label from the data application party, a triplet loss function corresponding to the anchor sample is constructed.
[0097] For example, for each anchor sample, a triplet loss function is constructed according to the data classification label corresponding to the anchor sample, such as the first data classification label or the second data classification label.
[0098] For positive anchor samples carrying the first data classification label, the triplet loss function is shown in Equation (1):
[0099]
[0100] For negative anchor samples carrying a second data classification label, the triplet loss function is shown in Equation (2):
[0101]
[0102] in, For anchor samples carrying the first data classification label, For anchor samples carrying the second data classification label, f is the weight corresponding to the data transaction scenario, and x is the weight. j x represents the first type of sample carrying the first data category label in the data application. k For the second type of sample in the data application, d represents the distance metric (such as the Euclidean distance involved in the K-means clustering algorithm), and f(x) represents the distance metric. j) represents the sample vector after the weights of the horizontal logistic regression parameters are added to each dimension of the anchor sample. ε>0 is a constant representing the interval between the first class of samples and the second class of samples.
[0103] It should be noted that f in the embodiments of this application can be configured in combination with the actual data transaction scenario. For example, if the data transaction scenario is a scenario of providing resource exchange services to users, the value of f can be configured based on parameters such as expected revenue and user streaming cost for the resource exchange service.
[0104] Step 2302: Calculate the first anchor sample loss value corresponding to the first global data model and the second anchor sample loss value corresponding to the second global data model using the triplet loss function.
[0105] For example, the first global data model F can be calculated using the formulas (1) and (2) mentioned above for anchor samples carrying different data classification labels. o All and And calculate the second global data model F n All and
[0106] Specifically, the anchor samples include a first type of anchor samples carrying a first data category label and a second type of anchor samples carrying a second data category label. The triplet loss function includes a first type of triplet loss function corresponding to the first type of anchor samples and a second type of triplet loss function corresponding to the second type of anchor samples. The first type of anchor samples is used to characterize the data features of the data applied to the first data category among N data categories, and the second type of anchor samples is used to characterize the data applied to the second data category among N data categories. Based on this, step 2302 specifically includes the process of calculating the loss value of the first anchor sample and the process of calculating the loss value of the second anchor sample.
[0107] Specifically, step 2302 may include steps 23021 to 23023, calculating the loss value of the first anchor sample, as shown below.
[0108] Step 23021: Input the first type of anchor sample, the first type of sample, the second type of sample and the total number of samples into the first global data model, and calculate the first average loss value of the first type of anchor sample relative to the first type of sample and the second average loss value of the first type of anchor sample relative to the second type of sample through the first type triplet loss function.
[0109] For example, assume there are N in total. + N samples of the first class are also positive samples. - There are n second-class samples, which are also negative class samples. + n positive anchor samples- For each negative anchor sample, the first average loss value of the first anchor sample relative to the first sample, i.e., the average loss of the positive sample, can be calculated using formula (3). The second average loss value of the first anchor sample relative to the second sample, i.e., the average loss of the negative sample, can be calculated using formula (4), as shown below:
[0110]
[0111]
[0112] Step 23022: Input the second type of anchor samples, the first type of samples, the second type of samples and the total number of samples into the first global data model, and calculate the third average loss value of the second type of anchor samples relative to the first type of samples and the fourth average loss value of the second type of anchor samples relative to the second type of samples through the second type triplet loss function.
[0113] For example, referring to the example in step 23021, the third average loss value of the second type of anchor sample relative to the first type of sample, i.e., the average loss of the negative sample, can be calculated by formula (5), and the fourth average loss value of the second type of anchor sample relative to the second type of sample, i.e., the average loss of the positive sample, can be calculated by formula (6), as shown below:
[0114]
[0115]
[0116] Step 23023: Use the first average loss value, the second average loss value, the third average loss value, and the fourth average loss value as the first anchor sample loss value.
[0117] Furthermore, step 2302 may specifically include steps 23024 to 23026, calculating the loss value of the second anchor sample, as shown below.
[0118] Step 23024: Input the first type of anchor sample, the first type of sample, the second type of sample and the total number of samples into the second global data model, and calculate the fifth average loss value of the first type of anchor sample relative to the first type of sample and the sixth average loss value of the first type of anchor sample relative to the second type of sample through the first type triplet loss function.
[0119] For example, referring to the example in step 23021, the fifth average loss value of the first type of anchor sample for the first type of sample, i.e., the average loss of the positive sample, can be calculated by formula (7), and the sixth average loss value of the first type of anchor sample for the second type of sample, i.e., the average loss of the negative sample, can be calculated by formula (8), as shown below:
[0120]
[0121]
[0122] Step 23025: Input the second type of anchor samples, the first type of samples, the second type of samples and the total number of samples into the second global data model, and calculate the seventh average loss value of the second type of anchor samples relative to the first type of samples and the eighth average loss value of the second type of anchor samples relative to the second type of samples through the second type triplet loss function.
[0123] For example, referring to the example in step 23021, the seventh average loss value of the second type of anchor sample relative to the first type of sample, i.e., the average loss of the negative sample, can be calculated by formula (9), and the eighth average loss value of the second type of anchor sample relative to the second type of sample, i.e., the average loss of the positive sample, can be calculated by formula (10), as shown below:
[0124]
[0125]
[0126] Step 23026: Use the fifth average loss value, the sixth average loss value, the seventh average loss value, and the eighth average loss value as the second anchor sample loss value.
[0127] Therefore, based on the existing cross-sectional logistic regression joint modeling interaction steps, the data application party combines its own samples and the local model information of each data provider to independently evaluate the distinguishability of the local model provided by the data provider for different categories of its own samples, thereby completing the determination of malicious participation by each data provider.
[0128] Then, regarding step 240, in some embodiments of this application, step 240 may specifically include steps 2401 and 2402, as shown below.
[0129] Step 2401: Based on the first anchor sample loss and the second anchor sample loss, generate the evaluation value of the data provider.
[0130] For example, based on the first anchor sample loss and the second anchor sample loss calculated in step 230 above, a class triplet loss comparison matrix is constructed. The calculated class triplet losses are organized into two tables according to the positive and negative classes, respectively, as shown below. Figure 3 and Figure 4 As shown.
[0131] Based on this, assuming the weights of the positive and negative samples are w and 1-w respectively, then for the t-th data provider, the evaluation value mal(i) can be calculated using the following formula (11):
[0132]
[0133] Step 2402: If the evaluation value is greater than or equal to a preset threshold, determine that the data provider is a malicious data provider.
[0134] For example, if the evaluation value mal(t) > ξ, it indicates that the t-th data provider is a malicious data provider; otherwise, the t-th data provider is a non-malicious participant. ξ is a preset threshold, where ξ ≥ 0 represents the data application party's tolerance for fluctuations in the modeling effect of the data provider, and when ξ = 0, it is a strict malicious determination.
[0135] Therefore, the data application party calculates the loss of each data provider under different data categories based on the triplet loss function, and identifies malicious participants based on the examination of the importance of the categories.
[0136] In addition, after step 240, the data processing method provided in this application embodiment may further include:
[0137] If the evaluation value is less than the preset threshold, the data provider is determined to be a bona fide data provider, and the local model is determined to be the local model of the data application party in this horizontal logistic regression joint modeling.
[0138] This application also provides a data processing apparatus, specifically combined with... Figure 5 Please provide a detailed explanation.
[0139] Figure 5 This is a schematic diagram of the structure of a data processing apparatus provided in one embodiment of this application.
[0140] In some embodiments of this application, Figure 5 The data processing device shown can be installed in the computing device provided in the embodiments of this application.
[0141] like Figure 5 As shown, the data processing device 50 may specifically include:
[0142] The receiving module 501 is used to receive the local data model sent by the data provider;
[0143] Update module 502 is used to update the first global data model of the data application party through the local data model to obtain the second global data model;
[0144] The calculation module 503 is used to calculate the first anchor sample loss value corresponding to the first global data model and the second anchor sample loss value corresponding to the second global data model based on the anchor sample of the data application party. The anchor sample is used to characterize the data features of the data application party in the i-th data category among N data categories.
[0145] Generative model 504 is used to generate evaluation data for the data provider based on the loss values of the first anchor sample and the second anchor sample. The evaluation data is used to determine whether the data provider is a malicious data provider.
[0146] The data processing device 50 in the embodiments of this application will be described in detail below.
[0147] In some embodiments of this application, the data processing device 50 may further include an acquisition module, a first clustering module, and a filtering module; wherein,
[0148] The acquisition module is used to acquire transaction data from the data application party across Y transaction dimensions.
[0149] The first clustering module is used to cluster transaction data in Y transaction dimensions to obtain M transaction clusters. The i-th transaction cluster in the M transaction clusters includes a first data point carrying a first data category label and a second data point carrying a second data category label. The first data category label is a label corresponding to the first data category, and the second data category label is a label corresponding to the second data category.
[0150] The calculation module 503 can also be used to calculate the first precision value of the first data point in the i-th transaction cluster and the second precision value of the second data point in the i-th transaction cluster.
[0151] The filtering module is used to select target data points as anchor samples from M transaction clusters based on a first precision value and a second precision value.
[0152] In other embodiments of this application, the data processing device 50 may further include a second clustering module; wherein,
[0153] The second clustering module is used to cluster transaction data in Y transaction dimensions using either the mean offset clustering algorithm or the K-means clustering algorithm, to obtain M transaction clusters.
[0154] In some other embodiments of this application, the calculation module 503 may be specifically used to calculate the first precision value of the first data point in the i-th transaction cluster based on the number of data points in the i-th transaction cluster that have the same data category label as the first data point and the total number of samples in the i-th transaction cluster.
[0155] Furthermore, based on the number of data points in the i-th transaction cluster that have the same data category label as the second data point and the total number of samples in the i-th transaction cluster, the second precision value of the second data point in the i-th transaction cluster is calculated.
[0156] In some further embodiments of this application, the data processing device 50 may further include a third clustering module; wherein,
[0157] The third clustering module is used to filter the first transaction cluster from M transaction clusters based on the first precision value and the second precision value. The relationship between the first precision value corresponding to the first data point and the second precision value corresponding to the second data point in the first transaction cluster satisfies the preset precision filtering condition.
[0158] The generative model 504 can also be used to generate anchor samples based on target data points in the first transaction cluster.
[0159] In some other embodiments of this application, the data processing device 50 may further include a first determining module; wherein,
[0160] The first determining module is used to determine whether a target data point is a data point in the second transaction cluster among M transaction clusters, based on the target data point in the first transaction cluster.
[0161] If the target data point is determined to be a data point in the second transaction cluster, and the data category label of the target data point in the first transaction cluster is the same as the data category label in the second transaction cluster, then the target data point is determined as the anchor sample.
[0162] In some other embodiments of this application, the data processing device 50 may further include a second determining module; wherein,
[0163] The second determining module is used to determine the target data point as the anchor sample if it is determined that the target data point is not a data point in the second transaction cluster.
[0164] In some other embodiments of this application, the data processing device 50 may further include a first building module; wherein,
[0165] The first construction module is used to construct a triplet loss function corresponding to the anchor sample based on the anchor sample of the data application party.
[0166] Specifically, the calculation module 503 can be used to calculate the first anchor sample loss value corresponding to the first global data model and the second anchor sample loss value corresponding to the second global data model using the triplet loss function.
[0167] In some further embodiments of this application, the data processing apparatus 50 may further include a second building module; wherein,
[0168] The second construction module is used to construct a triplet loss function corresponding to the anchor sample based on the anchor sample's data category label, data transaction scenario, first-class samples carrying the first data category label in the data application party, and second-class samples carrying the second data category label in the data application party.
[0169] In some embodiments of this application, the calculation module 503 may be specifically used to input the first type of anchor sample, the first type of sample, the second type of sample and the total number of samples into the first global data model when the anchor sample includes a first type of anchor sample carrying a first data category label and a second type of anchor sample carrying a second data category label, and the triplet loss function includes a first type of triplet loss function corresponding to the first type of anchor sample and a second type of triplet loss function corresponding to the second type of anchor sample; and calculate the first average loss value of the first type of anchor sample relative to the first type of sample and the second average loss value of the first type of anchor sample relative to the second type of sample through the first type of triplet loss function.
[0170] Input the second type of anchor sample, the first type of sample, the second type of sample and the total number of samples into the first global data model, and calculate the third average loss value of the second type of anchor sample relative to the first type of sample and the fourth average loss value of the second type of anchor sample relative to the second type of sample through the second type triplet loss function.
[0171] The first average loss value, the second average loss value, the third average loss value, and the fourth average loss value are used as the first anchor sample loss value.
[0172] In some other embodiments of this application, the calculation module 503 may be specifically used to input the first type of anchor sample, the first type of sample, the second type of sample and the total number of samples into the second global data model, and calculate the fifth average loss value of the first type of anchor sample for the first type of sample and the sixth average loss value of the first type of anchor sample for the second type of sample through the first type of triplet loss function.
[0173] Input the second type of anchor samples, the first type of samples, the second type of samples and the total number of samples into the second global data model. Calculate the seventh average loss value of the second type of anchor samples relative to the first type of samples and the eighth average loss value of the second type of anchor samples relative to the second type of samples using the second type triplet loss function.
[0174] The fifth, sixth, seventh, and eighth average loss values were used as the second anchor sample loss values.
[0175] In some further embodiments of this application, the data processing device 50 may further include a third determining module; wherein,
[0176] Specifically, the generative model 504 can be used to generate evaluation values for data providers based on the first anchor sample loss and the second anchor sample loss.
[0177] The third determination module is used to determine whether a data provider is a malicious data provider when the evaluation value is greater than or equal to a preset threshold.
[0178] In some other embodiments of this application, the update module 502 may be specifically used to update the second data model parameters in the first global data model according to the federated average algorithm based on the first data model parameters in the local data model, so as to obtain the second global data model.
[0179] Therefore, the data processing apparatus of this application embodiment can, upon receiving a local data model sent by the data provider, update the first global data model of the data application party through the local data model to obtain a second global data model. Then, based on the anchor sample in the data application party used to characterize the data features of the data application party in the i-th data category among N data categories, calculate the first anchor sample loss value corresponding to the anchor sample and the first global data model and the second anchor sample loss value corresponding to the anchor sample and the second global data model. Then, based on the first anchor sample loss value and the second anchor sample loss value, generate evaluation data of the data provider. The evaluation data is used to determine whether the data provider is a malicious data provider. In this way, the data application party can independently evaluate the discriminatory power of the local data model provided by the data provider for different data categories of the data application party's own samples, by combining the local first global data model and the local data model provided by the data provider for joint modeling with the data application party. This allows for the determination of whether the data provider is a malicious data provider. No additional verification information, such as the samples and methods used to train the local data model, needs to be transmitted with the data application party. This reduces the exposure of the data provider's data information and the frequency of interaction between the data application party and the data provider, improving the efficiency of verifying whether the data provider is a malicious data provider. Thus, if the data provider is determined to be a malicious data provider through evaluation data, its influence on joint modeling can be promptly blocked, preventing losses to the data application party. Furthermore, the anchor samples needed for the evaluation by the data application party do not require collaboration with the data provider; this can be completed before calculating the loss values of the first and second anchor samples, without increasing additional computational overhead or posing data security risks to the data application party, thereby improving the security of the data application party's data.
[0180] Based on the same inventive concept, this application also provides a computer device. (Specifically combined with...) Figure 6 Please provide a detailed explanation.
[0181] Figure 6 This is a schematic diagram of the structure of a computer device provided in one embodiment of this application.
[0182] like Figure 6 As shown, the computer device may include at least one of the following as described in the embodiments of this application: an electronic device, a server. The computer device may include a processor 601 and a memory 602 storing computer program instructions.
[0183] Specifically, the processor 601 may include a central processing unit (CPU), an application-specific integrated circuit (ASTC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0184] Memory 602 may include a large-capacity memory for data or instructions. For example, and not limitingly, memory 602 may include a hard disk drive (HDD), a floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 602 may include removable or non-removable (or fixed) media. Where appropriate, memory 602 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 602 is non-volatile solid-state memory. In a particular embodiment, memory 602 includes solid-state storage (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM), or flash memory, or a combination of two or more of these.
[0185] The processor 601 implements any of the data processing methods described in the above embodiments by reading and executing computer program instructions stored in the memory 602.
[0186] In one example, the computer device may also include a communication interface 603 and a bus 610. Wherein, as... Figure 6 As shown, the processor 601, memory 602, and communication interface 603 are connected through bus 610 and complete communication with each other.
[0187] The communication interface 603 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.
[0188] Bus 610 includes hardware, software, or both, that couples components of a flow control device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard System (ETSA) bus, a Front Side Bus (FSB), an HyperTransport (HT) interconnect, an Industry Standard System (TSA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel System (MCA) bus, a Peripheral Component Interconnect (PCT) bus, a PCT-Express (PCT-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 610 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, any suitable bus or interconnect is contemplated herein.
[0189] The data processing device can execute the data processing method described in the embodiments of this application, thereby achieving the combination Figures 1 to 6 The data processing methods and apparatus described.
[0190] Furthermore, in conjunction with the data processing methods in the above embodiments, this application embodiment can provide a computer-readable storage medium for implementation. This computer-readable storage medium stores computer program instructions; when executed by a processor, these computer program instructions implement any of the data processing methods in the above embodiments.
[0191] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.
[0192] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASTCs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0193] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0194] The above are merely specific embodiments of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.
Claims
1. A data processing method, comprising: Receive local data models sent by the data provider; The first global data model of the data application party is updated using the local data model to obtain the second global data model; Obtain the transaction data of the data application party in Y transaction dimensions; cluster the transaction data in the Y transaction dimensions to obtain M transaction clusters, wherein the i-th transaction cluster in the M transaction clusters includes a first data point carrying a first data category label and a second data point carrying a second data category label, wherein the first data category label is a label corresponding to the first data category and the second data category label is a label corresponding to the second data category; Calculate the first precision value of the first data point in the i-th transaction cluster and the second precision value of the second data point in the i-th transaction cluster; based on the first precision value and the second precision value, select target data points from the M transaction clusters as anchor samples for the data application party; Based on the anchor samples of the data application party, calculate the first anchor sample loss value corresponding to the first global data model and the second anchor sample loss value corresponding to the second global data model. The anchor sample is used to characterize the data features of the data application party in the i-th data category among N data categories, i∈[1,N]; Based on the loss values of the first anchor sample and the second anchor sample, evaluation data for the data provider is generated, and the evaluation data is used to determine whether the data provider is a malicious data provider.
2. The method according to claim 1, characterized in that, The process of clustering the transaction data across the Y transaction dimensions to obtain M transaction clusters includes: The transaction data of the Y transaction dimensions are clustered using the mean offset clustering algorithm or the K-means clustering algorithm to obtain M transaction clusters.
3. The method according to claim 1, characterized in that, The calculation of the first precision value of the first data point in the i-th transaction cluster and the second precision value of the second data point in the i-th transaction cluster includes: Based on the number of data points in the i-th transaction cluster that have the same data category label as the first data point and the total number of samples in the i-th transaction cluster, calculate the first precision value of the first data point in the i-th transaction cluster; Furthermore, based on the number of data points in the i-th transaction cluster that have the same data category label as the second data point and the total number of samples in the i-th transaction cluster, the second precision value of the second data point in the i-th transaction cluster is calculated.
4. The method according to claim 1, characterized in that, The step of selecting target data points from the M transaction clusters as anchor samples based on the first precision value and the second precision value includes: Based on the first precision value and the second precision value, a first transaction cluster is selected from the M transaction clusters, wherein the relationship between the first precision value corresponding to the first data point and the second precision value corresponding to the second data point in the first transaction cluster satisfies the preset precision selection condition. The anchor sample is generated based on the target data points in the first transaction cluster.
5. The method according to claim 4, characterized in that, The step of generating the anchor sample based on the target data points in the first transaction cluster includes: Based on the target data point in the first transaction cluster, determine whether the target data point is a data point in the second transaction cluster among the M transaction clusters; If the target data point is determined to be a data point in the second transaction cluster, and the data category label of the target data point in the first transaction cluster is the same as the data category label in the second transaction cluster, then the target data point is determined as the anchor sample.
6. The method according to claim 5, characterized in that, The method further includes: If it is determined that the target data point is not a data point in the second transaction cluster, the target data point is determined as the anchor sample.
7. The method according to claim 1, characterized in that, The step of calculating the first anchor sample loss value corresponding to the first global data model and the second anchor sample loss value corresponding to the second global data model based on the anchor sample of the data application party includes: Based on the anchor samples of the data application party, construct a triplet loss function corresponding to the anchor samples; The first anchor sample loss value corresponding to the anchor sample and the first global data model, and the second anchor sample loss value corresponding to the anchor sample and the second global data model are calculated using the triplet loss function.
8. The method according to claim 7, characterized in that, The construction of a triplet loss function corresponding to the anchor sample based on the data application party includes: Based on the data category label of the anchor sample, the data transaction scenario, the first type of sample carrying the first data category label in the data application party, and the second type of sample carrying the second data category label in the data application party, a triplet loss function corresponding to the anchor sample is constructed.
9. The method according to claim 8, characterized in that, The anchor samples include a first type of anchor samples carrying a first data category label and a second type of anchor samples carrying a second data category label. The triplet loss function includes a first type of triplet loss function corresponding to the first type of anchor samples and a second type of triplet loss function corresponding to the second type of anchor samples. The step of calculating the first anchor sample loss value corresponding to the anchor sample and the first global data model, and the second anchor sample loss value corresponding to the anchor sample and the second global data model, using the triplet loss function, includes: Input the first type of anchor sample, the first type of sample, the second type of sample and the total number of samples into the first global data model, and calculate the first average loss value of the first type of anchor sample for the first type of sample and the second average loss value of the first type of anchor sample for the second type of sample through the first type of triplet loss function. Input the second type of anchor sample, the first type of sample, the second type of sample and the total number of samples into the first global data model, and calculate the third average loss value of the second type of anchor sample relative to the first type of sample and the fourth average loss value of the second type of anchor sample relative to the second type of sample through the second type triplet loss function. The first average loss value, the second average loss value, the third average loss value, and the fourth average loss value are used as the first anchor sample loss value.
10. The method according to claim 9, characterized in that, The step of calculating the first anchor sample loss value corresponding to the anchor sample and the first global data model, and the second anchor sample loss value corresponding to the anchor sample and the second global data model, using the triplet loss function, includes: Input the first type of anchor sample, the first type of sample, the second type of sample and the total number of samples into the second global data model, and calculate the fifth average loss value of the first type of anchor sample for the first type of sample and the sixth average loss value of the first type of anchor sample for the second type of sample through the first type of triplet loss function. Input the second type of anchor sample, the first type of sample, the second type of sample and the total number of samples into the second global data model, and calculate the seventh average loss value of the second type of anchor sample relative to the first type of sample and the eighth average loss value of the second type of anchor sample relative to the second type of sample through the second type triplet loss function. The fifth average loss value, the sixth average loss value, the seventh average loss value, and the eighth average loss value are used as the second anchor sample loss value.
11. The method according to claim 1, characterized in that, The step of generating evaluation data for the data provider based on the loss values of the first and second anchor samples includes: Based on the first anchor sample loss and the second anchor sample loss, an evaluation value for the data provider is generated; If the evaluation value is greater than or equal to a preset threshold, the data provider is determined to be a malicious data provider.
12. The method according to claim 1, characterized in that, The step of updating the first global data model of the data application party through the local data model to obtain the second global data model includes: The second global data model is obtained by updating the second data model parameters in the first global data model using the first data model parameters in the local data model.
13. A data processing apparatus, comprising: The receiving module is used to receive local data models sent by the data provider; The update module is used to update the first global data model of the data application party through the local data model to obtain the second global data model; The acquisition module is used to acquire the transaction data of the data application party in Y transaction dimensions; The first clustering module is used to cluster the transaction data of the Y transaction dimensions to obtain M transaction clusters. The i-th transaction cluster in the M transaction clusters includes a first data point carrying a first data category label and a second data point carrying a second data category label. The first data category label is a label corresponding to the first data category, and the second data category label is a label corresponding to the second data category. The calculation module is used to calculate the first precision value of the first data point in the i-th transaction cluster and the second precision value of the second data point in the i-th transaction cluster; The filtering module is used to filter target data points from the M transaction clusters as anchor samples for the data application party based on the first precision value and the second precision value. The calculation module is used to calculate, based on the anchor sample of the data application party, the first anchor sample loss value corresponding to the first global data model and the second anchor sample loss value corresponding to the second global data model, wherein the anchor sample is used to characterize the data features of the data application party in the i-th data category among N data categories, i∈[1,N]; A generative model is used to generate evaluation data for the data provider based on the loss values of the first anchor sample and the second anchor sample, and the evaluation data is used to determine whether the data provider is a malicious data provider.
14. A computer device, the device comprising: Processor and memory storing computer program instructions; When the processor executes the computer program instructions, it implements the data processing method as described in any one of claims 1-12.
15. A storage medium storing computer program instructions, which, when executed by a processor, implement the data processing method as described in any one of claims 1-12.
Citation Information
Patent Citations
Equipment evaluation and federated learning importance aggregation method, system and equipment based on edge intelligence and readable storage medium
CN112181666A
Zero sample knowledge distillation method and system based on resisting triple loss
CN114972904A
Federal learning method for Byzantine robustness under data non-independent identical distribution
CN116050546A
