Cloud Data Loss Prevention (Cloud DLP) fait désormais partie de la protection des données sensibles. Le nom de l'API reste le même: API Cloud Data Loss Prevention (DLP). Pour en savoir plus sur les services qui constituent Sensitive Data Protection, consultez la section Présentation de Sensitive Data Protection.
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
La delta-présence (δ-présence) est une métrique quantifiant la probabilité qu'un individu appartienne à un ensemble de données analysé. Comme pour k-table, vous pouvez estimer les valeurs de δ-présence à l'aide de la protection des données sensibles, qui se sert d'un modèle statistique pour estimer l'ensemble de données d'attaque.
δ-présence diffère des autres méthodes d'analyse des risques, dans lesquelles l'ensemble de données d'attaque est explicitement connu. Selon le type de données, la protection des données sensibles utilise des ensembles de données publiquement disponibles (comme ceux du recensement américain) ou un modèle statistique personnalisé (comprenant par exemple une ou plusieurs tables BigQuery que vous définissez). La protection des données sensibles peut également effectuer une extrapolation à partir de la distribution des valeurs dans votre ensemble de données d'entrée.
Cet article explique comment calculer des valeurs de δ-présence pour un ensemble de données à l'aide de la protection des données sensibles. Pour en savoir plus sur la δ-présence ou l'analyse des risques en général, consultez la section sur les concepts d'analyse des risques avant de continuer.
Avant de commencer
Avant de continuer, assurez-vous d'avoir effectué les actions suivantes :
Pour calculer une estimation de δ-présence à l'aide de Sensitive Data Protection, envoyez une requête à l'URL suivante, où PROJECT_ID indique votre identifiant de projet :
Un objet PrivacyMetric. C'est ici que vous indiquez que vous voulez calculer la δ-présence, en spécifiant un objet DeltaPresenceEstimationConfig contenant les éléments suivants :
quasiIds[] : valeur obligatoire. Champs (objets QuasiId) considérés comme des quasi-identifiants à analyser et à utiliser pour calculer δ-présence. Deux colonnes ne peuvent pas partager le même tag, et chaque tag peut correspondre à l'un des éléments suivants :
infoType : ceci impose à la protection des données sensibles d'utiliser l'ensemble de données public pertinent comme modèle statistique de population, y compris les codes postaux américains, les codes des régions, l'âge et le sexe.
InfoType personnalisé : tag personnalisé dans lequel vous indiquez une table auxiliaire (un objet AuxiliaryTable) contenant des informations statistiques sur les valeurs possibles de cette colonne.
Tag inferred : si aucun tag sémantique n'est indiqué, renseignez inferred.
Sensitive Data Protection déduit le modèle statistique à partir de la distribution des valeurs dans les données d'entrée.
regionCode : code de région ISO 3166-1 alpha-2 permettant à Sensitive Data Protection de modéliser les statistiques. Cette valeur est obligatoire si aucune colonne ne contient de tag d'infoType spécifique à une région (un code postal américain, par exemple) ou à un code de région.
auxiliaryTables[] : Tables auxiliaires (objets StatisticalTable) à utiliser dans l'analyse. Chaque tag personnalisé servant à marquer une colonne de quasi-identifiants (depuis quasiIds[]) ne doit apparaître que dans une colonne d'une table auxiliaire.
Un objet BigQueryTable. Spécifiez la table BigQuery à analyser en incluant tous les éléments suivants :
projectId : ID du projet contenant la table.
datasetId : ID de l'ensemble de données de la table.
tableId : nom de la table.
Un ensemble d'un ou de plusieurs objets Action représentant les actions à exécuter, dans l'ordre indiqué, à la fin de la tâche. Chaque objet Action peut contenir l'une des actions suivantes :
Objet SaveFindings : enregistre les résultats de l'analyse des risques dans une table BigQuery.
Objet PublishToStackdriver : enregistre les résultats dans Google Cloud Observability.
Afficher les résultats de la tâche δ-présence
Pour récupérer les résultats de la tâche d'analyse des risques δ-présence à l'aide de l'API REST, envoyez la requête GET suivante à la ressource projects.dlpJobs. Remplacez PROJECT_ID par votre ID de projet et JOB_ID par l'identifiant de la tâche pour laquelle vous souhaitez obtenir des résultats.
L'ID de tâche a été renvoyé au démarrage de la tâche et peut être récupéré en répertoriant toutes les tâches.
GET https://dlp.googleapis.com/v2/projects/PROJECT_ID/dlpJobs/JOB_ID
La requête renvoie un objet JSON contenant une instance de la tâche. Les résultats de l'analyse se trouvent dans la clé "riskDetails", dans un objet AnalyzeDataSourceRiskDetails. Pour en savoir plus, consultez la documentation de référence de l'API pour la ressource DlpJob.
Étape suivante
Découvrez comment calculer la valeur k-anonymat pour un ensemble de données.
Découvrez comment calculer la valeur l-diversité pour un ensemble de données.
Découvrez comment calculer la valeur k-table pour un ensemble de données.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/08/19 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/08/19 (UTC)."],[],[],null,["# Computing δ-presence for a dataset\n\nDelta-presence (*δ* -presence) is a metric that quantifies the probability that\nan individual belongs to an analyzed dataset. Like [*k*-map](#compute-k-map),\nyou can estimate *δ*-presence values using Sensitive Data Protection, which\nuses a statistical model to estimate the attack dataset.\n\n*δ*-presence contrasts with the other risk analysis methods, in which the\nattack dataset is explicitly known. Depending on the type of data,\nSensitive Data Protection uses publicly available datasets (for example, from the\nUS Census) or a custom statistical model (for example, one or more\nBigQuery tables that you specify), or it extrapolates from the\ndistribution of values in your input dataset.\n\nThis topic demonstrates how to compute *δ* -presence values for a dataset using\nSensitive Data Protection. For more information about *δ* -presence or risk analysis in\ngeneral, see the [risk analysis concept topic](/sensitive-data-protection/docs/concepts-risk-analysis)\nbefore continuing on.\n| **Note:** At this time, you can only compute *δ* -presence values using the DLP API or Sensitive Data Protection-supported [client\n| libraries](/sensitive-data-protection/docs/libraries). Sensitive Data Protection in the Google Cloud console doesn't support computing *δ*-presence values.\n\n\u003cbr /\u003e\n\n| **Note:** Prematurely canceling an operation midway through a job still incurs costs for the portion of the job that was completed. For more information about billing, see [Sensitive Data Protection pricing](https://cloud.google.com/sensitive-data-protection/pricing).\n\n\u003cbr /\u003e\n\nBefore you begin\n----------------\n\n\nBefore continuing, be sure you've done the following:\n\n1. [Sign in](https://accounts.google.com/Login) to your Google Account.\n2. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.\n[Go to the project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n3. Make sure that billing is enabled for your Google Cloud project. [Learn how to confirm billing is enabled for your\n project.](/billing/docs/how-to/modify-project)\n4. Enable Sensitive Data Protection.\n[Enable Sensitive Data Protection](https://console.cloud.google.com/flows/enableapi?apiid=dlp.googleapis.com)\n5. Select a BigQuery dataset to analyze. Sensitive Data Protection estimates the *δ*-presence metric by scanning a BigQuery table.\n6. Determine the types of datasets you want to use to model the attack dataset. For more information, see the reference page for the [`DeltaPresenceEstimationConfig`](/sensitive-data-protection/docs/reference/rest/v2/projects.dlpJobs#deltapresenceestimationconfig) object, as well as [Risk\n analysis terms and techniques](/sensitive-data-protection/docs/concepts-risk-analysis#risk_analysis_terms_and_techniques).\n\n\u003cbr /\u003e\n\nCompute *δ*-presence metrics\n----------------------------\n\nTo compute a *δ* -presence estimate using Sensitive Data Protection, send a request\nto the following URL, where \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e indicates your [project\nidentifier](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects): \n\n```\nhttps://dlp.googleapis.com/v2/projects/PROJECT_ID/dlpJobs\n```\n\nThe request contains a\n[`RiskAnalysisJobConfig`](/sensitive-data-protection/docs/reference/rest/v2/projects.dlpJobs/create#riskanalysisjobconfig)\nobject, which is composed of the following:\n\n- A\n [`PrivacyMetric`](/sensitive-data-protection/docs/reference/rest/v2/projects.dlpJobs#privacymetric)\n object. This is where you specify that you want to calculate *δ* -presence by\n specifying a\n [`DeltaPresenceEstimationConfig`](/sensitive-data-protection/docs/reference/rest/v2/projects.dlpJobs#deltapresenceestimationconfig)\n object containing the following:\n\n - `quasiIds[]`: Required. Fields\n ([`QuasiId`](/sensitive-data-protection/docs/reference/rest/v2/projects.dlpJobs#quasiid)\n objects) considered to be quasi-identifiers to scan and use to compute\n *δ*-presence. No two columns can have the same tag. These can be any of the\n following:\n\n - An [infoType](/sensitive-data-protection/docs/reference/rest/v2/InfoType): This causes Sensitive Data Protection to use the relevant public dataset as a statistical model of population, including US ZIP codes, region codes, ages, and genders.\n - A custom infoType: A custom tag wherein you indicate an auxiliary table (an [`AuxiliaryTable`](/sensitive-data-protection/docs/reference/rest/v2/projects.dlpJobs#DlpJob.AuxiliaryTable) object) that contains statistical information about the possible values of this column.\n - The `inferred` tag: If no semantic tag is indicated, specify `inferred`. Sensitive Data Protection infers the statistical model from the distribution of values in the input data.\n - `regionCode`: An\n [ISO 3166-1 alpha-2 region code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)\n for Sensitive Data Protection to use in statistical modeling. This value\n is required if no column is tagged with a region-specific infoType (for\n example, a US ZIP code) or a region code.\n\n - `auxiliaryTables[]`: Auxiliary tables\n ([`StatisticalTable`](/sensitive-data-protection/docs/reference/rest/v2/projects.dlpJobs#statisticaltable)\n objects) to use in the analysis. Each custom tag used to tag a\n quasi-identifier column (from `quasiIds[]`) must appear in exactly one\n column of one auxiliary table.\n\n- A [`BigQueryTable`](/sensitive-data-protection/docs/reference/rest/v2/BigQueryTable)\n object. Specify the BigQuery table to scan by including all of\n the following:\n\n - `projectId`: The project ID of the project containing the table.\n - `datasetId`: The dataset ID of the table.\n - `tableId`: The name of the table.\n- A set of one or more\n [`Action`](/sensitive-data-protection/docs/reference/rest/v2/InspectJobConfig#Action)\n objects, which represent actions to run, in the order given, at the\n completion of the job. Each `Action` object can contain one of the\n following actions:\n\n - [`SaveFindings`](/sensitive-data-protection/docs/reference/rest/v2/InspectJobConfig#SaveFindings) object: Saves the results of the risk analysis scan to a BigQuery table.\n - [`PublishToPubSub`](/sensitive-data-protection/docs/reference/rest/v2/InspectJobConfig#PublishToPubSub) object: [Publishes a notification to a Pub/Sub topic](/pubsub/docs/publisher).\n\n | **Note:** If there are configuration or permission issues with the Pub/Sub topic, Sensitive Data Protection retries sending the Pub/Sub notification for up to two weeks. After two weeks, the notification is discarded.\n - [`PublishSummaryToCscc`](/sensitive-data-protection/docs/reference/rest/v2/InspectJobConfig#PublishSummaryToCscc) object: Saves a results summary to Security Command Center.\n - [`PublishFindingsToCloudDataCatalog`](/sensitive-data-protection/docs/reference/rest/v2/InspectJobConfig#PublishFindingsToCloudDataCatalog) object: Saves results to [Data Catalog](/sensitive-data-protection/docs/sending-results-to-dc).\n - [`JobNotificationEmails`](/sensitive-data-protection/docs/reference/rest/v2/InspectJobConfig#JobNotificationEmails) object: Sends you an email with results.\n - [`PublishToStackdriver`](/sensitive-data-protection/docs/reference/rest/v2/InspectJobConfig#PublishToStackdriver) object: Saves results to Google Cloud Observability.\n\nViewing *δ*-presence job results\n--------------------------------\n\nTo retrieve the results of the *δ* -presence risk analysis job using the REST\nAPI, send the following GET request to the\n[`projects.dlpJobs`](/sensitive-data-protection/docs/reference/rest/v2/projects.dlpJobs/get)\nresource. Replace \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e with your project ID and\n\u003cvar translate=\"no\"\u003eJOB_ID\u003c/var\u003e with the identifier of the job you want to obtain results for.\nThe job ID was returned when you started the job, and can also be retrieved by\n[listing all jobs](#list-jobs). \n\n```\nGET https://dlp.googleapis.com/v2/projects/PROJECT_ID/dlpJobs/JOB_ID\n```\n\nThe request returns a JSON object containing an instance of the job. The results\nof the analysis are inside the `\"riskDetails\"` key, in an\n[`AnalyzeDataSourceRiskDetails`](/sensitive-data-protection/docs/reference/rest/v2/projects.dlpJobs#DlpJob.AnalyzeDataSourceRiskDetails)\nobject. For more information, see the API reference for the\n[`DlpJob`](/sensitive-data-protection/docs/reference/rest/v2/projects.dlpJobs#DlpJob)\nresource.\n\nWhat's next\n-----------\n\n- Learn how to calculate the [*k*-anonymity](/sensitive-data-protection/docs/compute-k-anonymity) value for a dataset.\n- Learn how to calculate the [*l*-diversity](/sensitive-data-protection/docs/compute-l-diversity) value for a dataset.\n- Learn how to calculate the [*k*-map](/sensitive-data-protection/docs/compute-k-map) value for a dataset."]]