A method for pseudo-anonymizing an initial query, in natural language, to query a database containing confidential data.
The anonymization neural network with encoder, attention, and decoder blocks, along with a generative model, addresses the inefficiencies of previous methods by enabling flexible and efficient pseudoanonymization of natural language queries, maintaining data confidentiality and enhancing AI model performance.
Patent Information
- Application Number
- FR2023006471
- Authority / Receiving Office
- FR · FR
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-06-22
- Publication Date
- 2024-12-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing methods for pseudoanonymizing natural language queries to access confidential databases, such as EHRs, are complex and inefficient, often depriving generative AI models of essential information due to conservative anonymization techniques, and require complex neural network architectures like GANs for training.
A method using an anonymization neural network with a text encoder, attention block, and decoder blocks to identify and replace confidential data with pseudonyms, combined with a generative language model to transcribe queries into SQL, allowing flexible and efficient pseudoanonymization.
Enables flexible and efficient pseudoanonymization of natural language queries, preserving information integrity while ensuring data confidentiality, thereby enhancing the performance of generative AI models without the complexity of previous methods.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Title of the invention: Method for pseudoanonymizing a first request, in natural language, for querying a database containing confidential data. [0001 ] GENERAL TECHNICAL FIELD
[0002] The present invention relates to the field of databases. More specifically, it relates to a method for pseudoanonymizing a first query, in natural language, for interrogating a database containing confidential data.
[0003] STATE OF THE ART
[0004] Many organizations use proprietary databases that can be accessed via queries in a database manipulation language such as SQL.
[0005] We also know of algorithms which allow, from a query in written or spoken natural language, to automatically generate the corresponding SQL query and to access the desired data, in particular thanks to generative AI solutions of the LLM (Large Language Models) type.
[0006] This is very useful, for example, in a medical environment for querying a patient health database (so-called EHR, Electronic Health Records).
[0007] The difficulty is that to provide the LLM, often operated by a third party, it is necessary to have access to the contents of the database, which is generally not possible for reasons of data confidentiality, in particular privacy when it comes to personal data (which is particularly the case with EHRs).
[0008] The logical solution is to pseudoanonymize the data, by replacing personal data in natural language queries with unique identifiers at the LLM input, and then to de-pseudoanonymize the generated SQL queries, using a regularly updated correspondence table.
[0009] Such a solution proves to be complex because in practice it is necessary to recognize the information constituting personal data in natural language, generally in the absence of any context, which is very difficult even for a human.
[0010] There are NER (Named entity recognition) type methods that allow keywords in a query to be classified into various predefined categories (for example "person", "place", etc.), and it is then sufficient to anonymize all the words in certain target categories considered to constitute personal data. However These methods are known for their complexity and cumbersome nature. Furthermore, what constitutes personal data can be subjective and may depend on the nature of the database or other personal data, so reducing the personal or non-personal nature of a piece of data to its simple category is too limiting. For example, in a query on EHRs, the patient's address is personal data but not the hospital's address. Similarly, a hospital may have a person's name. Thus, pseudo-anonymization via NER tends to be too conservative, which ultimately unnecessarily deprives the LLM of information and impairs its performance.
[0011] An alternative solution has therefore been proposed in the document "EHR-Safe: Generating high-fidelity and privacy-preserving synthetic electronic health records, Jinsung Yoon and Sercan O. Arik, Research Scientists, Google Research, Cloud AI Team", in which synthetic medical data respecting a realistic representation will be generated using a GAN (Generative adversarial Network) type neural network on which the LLM can be trained in an agnostic manner.
[0012] More precisely, we combine an autoencoder (encoder + decoder) with the GAN (generator + discriminator) in the following way: - Classically the autoencoder is trained on real data so as to be able to predict its input; - The discriminator works not directly on the medical data, but on their representation by the encoder, i.e. the data produced by the generator are directly synthetic “encodings” and not data similar to medical data; - Said synthetic medical data is produced by injecting said encodings into the decoder; - The GAN and the autoencoder are abandoned, and the LLM is trained on this last synthetic data, without access to the real data.
[0013] Such a solution avoids all the problems of pseudo-anonymization and allows the LLM to work on "complete" data, but still proves to be very complex to implement. In addition, this solution is only useful for learning and we will always have to pseudoanonymize the queries in operation.
[0014] The invention further improves the situation. PRESENTATION OF THE INVENTION
[0015] The present invention therefore relates, according to a first aspect, to a method for pseudoanonymizing a first request, in natural language, for querying a database stored on data storage means of a first server and containing confidential data, the method being characterized in that it includes the implementation by data processing means of a second server of steps of: a. Obtaining said first request from a client terminal; b. Identification, by means of an anonymization neural network taking as input said first query and a predefined list of database headers relating to confidential data, of words to be anonymized from the first query; c. Generation of a second query, in natural language, corresponding to the first query in which the identified words are replaced by pseudonyms.
[0016] According to advantageous and non-limiting characteristics:
[0017] Said anonymization neural network comprises at least one text encoder block, one attention block and one decoder block, step (b) comprises a sub-step (bl) of obtaining a representation of the first query and a representation of the list of headers of the database to be anonymized by means of said text encoder block; a sub-step (b3) of obtaining a representation of the parts relating to the words to be anonymized of the first query by applying said attention block to said representation of the first query, said list of headers of the database to be anonymized being used as an attention map; and a sub-step (b4) of identifying said words to be anonymized of the first query by applying the decoder block to said representation of the parts relating to the words to be anonymized of the first query.
[0018] Said representations of the first query and of the parts relating to the words to be anonymized of the first query are feature maps.
[0019] The encoder block is a pre-trained model, in particular of the transformer type.
[0020] Said anonymization neural network further comprises a contextualization block, step (b) comprises an intermediate step (b2) of application to each of the representations of the first request and of the list of headers of the database to be anonymized.
[0021] Said contextualization block is a bidirectional recurrent neural network, in particular of the BiLSTM type.
[0022] The decoder block comprises a first sub-block and a second sub-block in parallel, sub-step (b4) comprises: - Prediction, using the first sub-block, of the number of words to be anonymized from the first query; - identifying, by means of the second sub-block, said words to be anonymized from the first query as a function of said predicted number of words to be anonymized
[0023] The first sub-block is a fully connected neural network terminated by a softmax activation layer, and the second sub-block is another fully connected neural network terminated by a sigmoid activation layer.
[0024] Said second sub-block is applied iteratively as many times as said predicted number of words to be anonymized from the first request.
[0025] The method comprises a step (aO) of learning, by data processing means of a third server, the attention block and the decoder block from first reference requests whose words to be anonymized are known.
[0026] According to a second aspect, the invention relates to a method for transcribing a first query, in natural language, for querying a database stored on data storage means of a first server and containing confidential data, into a computer language for manipulating said database, in particular SQL, characterized in that it comprises the implementation by data processing means of a second server of the method according to the first aspect of pseudoanonymization of said first query, so as to generate a second query, in natural language, corresponding to the first query in which the identified words are replaced by pseudonyms, then steps of: a. transcription query by a generative language model of the second query into a third query, in said computer language for manipulating said database; b. generation of a fourth query, in said computer language for manipulating said database, corresponding to the third query in which the pseudonyms are replaced by the original words of the first query.
[0027] According to a third aspect, the invention relates to a method for querying a database stored on data storage means of a first server and containing confidential data, characterized in that it comprises the implementation by data processing means of a second server of the method according to the second aspect of transcription of a first query, in natural language, for querying said database, into a computer language for manipulating said database, so as to generate a fourth query, in said computer language for manipulating said database corresponding to the first query, then a step of: a. Execution of said fourth query.
[0028] According to a fourth aspect, the invention relates to a server characterized in that it comprises data processing means configured to: - Obtain from a client terminal a first request, in natural language, to query a database stored on data storage means of a first server and containing confidential data; - identify, by means of an anonymization neural network taking as input said first query and a predefined list of database headers relating to confidential data, words to be anonymized from the first query; - generate a second query, in natural language, corresponding to the first query in which the identified words are replaced by pseudonyms.
[0029] According to a fourth and a fifth aspect, the invention relates to a computer program product comprising code instructions for executing a method according to the first aspect of pseudoanonymizing a first query, in natural language, for querying a database stored on data storage means of a first server and containing confidential data; a method according to the second aspect of transcribing the first query into a computer language for manipulating said database, in particular SQL; or a method according to the third aspect of querying the database;and a storage means readable by computer equipment on which is recorded a computer program product comprising code instructions for the execution of a method according to the first aspect of pseudoanonymization of a first query, in natural language, for querying a database stored on data storage means of a first server and containing confidential data; of a method according to the second aspect of transcription of the first query into a computer language for manipulating said database, in particular SQL; or of a method according to the third aspect of querying the database. PRESENTATION OF THE FIGURES;
[0030] Other characteristics and advantages of the present invention will appear on reading the following description of a preferred embodiment. This description will be given with reference to the appended drawings in which:
[0031] [Fig.l] [Fig.l] is a diagram of a system for implementing the method according to the invention;
[0032] [Fig.2] [Fig.2] is a flowchart illustrating the steps of an embodiment of the method according to the invention;
[0033] [Fig.3] [Fig.3] schematically represents the general architecture of the anonymization neural network used by the method according to the invention;
[0034] [Fig.4] [Fig.4] schematically represents the detailed architecture of an embodiment of the anonymization neural network used by the method according to the invention. DETAILED DESCRIPTION
[0035] Architecture
[0036] The present invention relates, according to a first aspect, to a method for pseudoanonymizing a first request, in natural language, for querying a database stored on data storage means 12 of a first server 1, with reference to [Fig.l].
[0037] As will be seen, the previous invention also concerns: - according to a second aspect a method of transcribing said first query in natural language into a fourth query in computer language, using the method according to the first aspect; and - according to a third aspect a method of querying a database using the method according to the second aspect.
[0038] Said database may be any structured database stored on data storage means 12 of a first server 1, typically a medical database stored on a server 1 of a hospital. As will be seen, it is generally made up of tables.
[0039] By querying the database, we mean any operation consisting of accessing the database and extracting certain information.
[0040] It is assumed that there is a specific computer language for querying said database, i.e. a language executable by data processing means 11 of said first server 1 to manipulate said database, for example SQL in the remainder of this description. This is in practice the language in which the fourth query as well as a third query will be.
[0041] The present methods are specific in that the first request relating to a query of a database (i.e. describing this desired query), are in natural language, that is to say the “normal” language spoken by a human being and not a structured computer language, a fortiori not said database manipulation language. Natural language is written without prior learning, unlike all computer languages.
[0042] It is assumed that said database contains confidential data. By confidential is meant data whose publication or transmission to an external entity is impossible, and in particular personal data (data relating to private life), military data, economic data, etc. For example, in the case of medical data (EHR), confidential data are: - all data relating to the identity of a patient or caregiver; - data relating to a pathology, a medical condition, etc.; - data relating to care, medication, etc.
[0043] By pseudoanonymization of the first query is meant replacement of words relating to confidential data by pseudonyms in the first query, and in particular generation of a second query, in natural language, corresponding to the first query in which said words are replaced by pseudonyms. Pseudonyms, or “codes” are unique identifiers (alphanumeric strings), meaningless and not allowing the confidential data to be traced back, possibly generated randomly.
[0044] For example the first query "Give me the average amount in mg of diphenhydramine given to Mr. John Doe in room 4 yesterday by Dr. James Smith" could be rewritten as the second query "Give me the average amount in mg of XLSM409 given to Mr. GHRM035 in room 4 yesterday by Dr. FNM897".
[0045] We therefore have the following codes ({XLSM409: Diphenhydramine, GHRM035: John Doe, FNM897: James Smith}). In a known manner, the correspondence table must be kept to generate the fourth query from the third query, see below.
[0046] As shown in [Fig. 1], there is also a second server 2 for executing said method, a client terminal 10 such as a workstation or a smartphone, having an interface and via which the user will be able to interact, and a possible third learning server 3. It is understood that the second server 2 is connected to the client terminal 10, to the second server 2 and / or to the third server 3, for example via a network 20 such as the internet network.
[0047] The second / third servers 2, 3 also comprise data processing means 21, 31 such as a processor of any kind, and data storage means 22, 32, i.e. a memory.
[0048] Note that the second server 2 can be confused with the client terminal 10 and / or with the first server 1 and / or with the third server 3.
[0049] Method
[0050] With reference to [Fig.2], the present method is implemented by the data processing means 21 of the second server, and begins with a step (a) of obtaining said first request (in natural language) from the client terminal 10.
[0051] Said first query can be directly entered by the user on an interface of the terminal 10, the user having in mind the query that he wishes to carry out and being content to write it, or it will be possible to reuse a first query already written for the same given query, the user being content to reuse it (for example to update his result).
[0052] The method then comprises a main step (b) of identification, by means of an anonymization neural network taking as input said first query and a predefined list of headers from the database relating to confidential data, of words to be anonymized from the first query, visible in [Fig.3], of which will describe examples of architecture later.
[0053] Said predefined list of database headers relating to confidential data is a sublist of the list of all the headers of the database. By headers, more commonly called "header", we mean the attributes of the different tables of the database, typically the "column names".
[0054] For example, we can have tables with the following headers, the underlined ones being the headers relating to confidential data:
[0055] Table 1: Patientldate of hospitalizationlroomlreason
[0056] Table 2: Doctor l Patient l Prescribed medication l Time
[0057] Table 3: Doctor I Specialty
[0058] We have the following complete list of headers: {Patient; date of hospitalization; room; reason; Doctor; prescribed medication; time; Specialty], and therefore the following list of headers relating to confidential data: {Patient; date of hospitalization; reason; Doctor; prescribed medication}.
[0059] It is sufficient, knowing the complete list of headers (which is never particularly long), to manually select the list of those which contain confidential information.
[0060] Starting from the first query and considering said list, the anonymization neural network is capable of predicting the words that correspond to the headers, which makes it possible to directly isolate those that correspond to confidential information headers, and to anonymize them. The output of said anonymization neural network is typically a set of “pointers”, that is to say a vector containing the indices of the words to be anonymized from the first query. Note that “word” must be interpreted as a semantic unit, first name + last name forming for example of course a single word.
[0061] In this respect, there is a following step (c) of generating a second query, in natural language, corresponding to the first query in which the identified words are replaced by pseudonyms, in a conventional manner. This step may comprise, as explained, the generation and storage of a correspondence table (of pseudonyms with the anonymized words).
[0062] Passing through headers turns out to be much more flexible than classification by NER, not limited by predefined categories, and much simpler to configure.
[0063] Anonymization neural network
[0064] Any architecture may be used for the anonymization neural network, but preferably the latter comprises, in accordance with [Fig.4], at least (successively) a text encoder block, an attention block and a decoder block. In a particularly preferred manner, a contextualization block is interposed between the text encoder block and the attention block.
[0065]
[0066]
[0067]
[0068]
[0069]
[0070]
[0071] Step (b) then comprises a plurality of sub-steps corresponding to the implementation of the various blocks. The text encoder block is a so-called "embedding" block capable of encoding a text into a "representation", advantageously a pre-trained model (and possibly fine-tuned afterwards) in particular of the transformer type. Said representation is itself often called text embedding, it is in practice a feature map, or "feature maps", generally made up of a plurality of feature vectors (forming a matrix), the vectors having the length of the text and the number of vectors corresponding to an encoding size predetermined by the model, defining a semantic depth. Any language model can be used, including large language models (LLM), and for example one of the following models: - BERT (Bidirectional Encoder Representations from Transformers); - RoBERTa (Robustly Optimized BERT Approach) XLNet - USE (Universal Sentence Encoder) - InferSent - FastText - ELMo (Embeddings from Language Models) - Doc2Vec - LASER (Language-Agnostic Sentence Representations) SBERT (Sentence-BERT) - CamemBERT - a French version of Bert. Said text encoder block is used in a first sub-step (bl) of obtaining a representation of the first query and a representation of the list of headers of the database to be anonymized. It is understood that two representations are generated, one of the first query (of dimensions: size of the first query*encoding size) and the other of the list of headers (of dimensions: number of headers relating to confidential data*encoding size). In other words, the encoder block takes as input: - The first request - The list of database headers to anonymize And returns as output: - A representation of the first query - a representation of the list of headers of the database to be anonymized Then, we have the possible contextualization block. Indeed, even if the output representations of the encoder block integrate the context, it is desirable to contextualize even more via this block, which in practice results in the management generation of new representations with, for example, a smaller encoding size, called "contextualized embeddings". Said contextualization block is advantageously a bidirectional recurrent neural network (RNN), in particular of the BiLSTM type, i.e. 2 LSTMs (Long-Short Term Memory), one in the reading direction (called "forward") and in the opposite direction (called "backward").
[0072] Said contextualization block is used in a sub-step (b2), of applying said block to each of the representations of the first query and of the list of headers of the database to be anonymized. In other words, there are two uses of the contextualization block: - in the first, it takes as output the representation of the first query and returns as output a new “contextualized” representation of the first query - in the second, it takes as output the representation of the list of headers of the database to be anonymized and returns as output a new "contextualized" representation of the list of headers of the database to be anonymized
[0073] We then have an attention block. The attention mechanism is a popular technique used in deep learning models for many tasks such as object detection in images. The underlying idea here is to help the model focus its attention on the relevant parts of the first query when generating its output.
[0074] Thus, there is a sub-step (b3) of obtaining a representation of the parts relating to the words to be anonymized of the first query by applying said attention block to said representation of the first query, said list of headers of the database to be anonymized being used as an attention map.
[0075] The attention mechanism uses the representation of the list of headers of the database to be anonymized (or advantageously its contextualized version) as a set of characteristics to calculate the weights of the attention mechanism on the first query.
[0076] In other words, the model examines the vector representation of the headers and uses this information to determine which words in the first query are most relevant to the headers. It does this by assigning higher weights to words that are more closely related to the headers in terms of meaning and context.
[0077] The result of this process is a feature vector (a new representation) that represents the relevant parts of the first request in the context of the headers, i.e. the parts that may relate to confidential data, and therefore need to be anonymized.
[0078] All that remains is to decode this representation, the method thus comprises a sub-step (b4) of identifying said words to be anonymized from the first request by applying the decoder block to said representation of the parts relating to the words to be anonymized of the first query (the output of the attention block).
[0079] Many decoder block architectures can be used, notably those of the encoder blocks of the transformers mentioned for sub-step (bl).
[0080] Alternatively and preferably, the decoder block comprises, as seen in [Fig.4], a first sub-block of the decoder block and a second sub-block of the decoder block, in parallel. As will be seen, each of the first and second sub-blocks takes as input said representation of the parts relating to the words to be anonymized of the first request, but the second sub-block also takes as input the output of the first sub-block.
[0081] Thus sub-step (b4) preferably comprises: - Prediction, using the first sub-block, of the number of words to be anonymized from the first query; - identifying, by means of the second sub-block, the predicted number of said words to be anonymized from the first query, for example in the form of a set of pointers as explained.
[0082] The first sub-block therefore aims to predict the number of words to be anonymized from the first query.
[0083] Noting M a maximum number of confidential words to anonymize from the first query with M <N le nombre total de mots de la première requête, la sortie du premier sous-bloc est typiquement un vecteur de taille M de valeurs entre 0 et 1 représentatives de la probabilité que le nombre de mots à anonymiser de la première requête soit égal à leur indice. Pour le reformuler, la i-ème valeur dudit vecteur est la probabilité que la première requête comprenne i mots confidentiels à anonymiser. Il suffit donc de prendre l’indice de la valeur la plus élevée du vecteur.
[0084] The second sub-block aims to identify the predicted number of words to be anonymized from the first query. To reformulate, if said predicted number of words to be anonymized is n, then the second sub-block identifies n words. To do this, the second sub-block takes as input said predicted number, or directly the entire output vector of the first sub-block.
[0085] Preferably, the second sub-block is applied as many times as said predicted number of words. To manage this, the second block may further take as input a vector indicating iteration i <n dans laquelle il se trouve (c'est-à-dire contenant un 1 à l'itération actuelle et un 0 ailleurs), ou une autre donnée équivalente. Cette deuxième entrée agit comme une référence pour informer le sous-bloc qu'on cherche la position du i-ème mot à anonymiser. La sortie (à chaque itération) de ce deuxième sous-bloc est avantageusement un vecteur de taille N (le nombre total de mots de la première requête), avec des valeurs comprises entre 0 et 1, représentative d’une pro enabled that the word is to be anonymized. We can define that if a value is greater than 0.5, the corresponding position represents a word that must be anonymized. Alternatively, at each iteration we take the maximum value.
[0086] Preferably, the first sub-block is a fully connected neural network (FCNN) terminated by a softmax type activation layer, and the second sub-block is another fully connected neural network terminated by a sigmoid type activation layer.
[0087] Learning
[0088] The method advantageously comprises a learning step (aO), i.e. obtaining the anonymization neural network. As explained, the encoding block is advantageously pre-learned, so that it is more preferentially a question of training the possible contextualization block, the attention block and the decoder block. The encoder block can be fine-tuned.
[0089] This learning is implemented by the data processing means 31 of the possible third server 3, in a supervised manner, i.e. from reference requests in natural language whose words to be anonymized are known, typically stored on the storage means 32 of the third server 3.
[0090] More precisely, for a plurality of reference queries in natural language, a mirror step of step (b) is implemented, of identification, by means of the anonymization neural network taking as input said reference query and the predefined list of headers of the database relating to confidential data, of candidate words to be anonymized from the reference query; and the parameters of the anonymization neural network (or at least the blocks that one seeks to train) are adapted as a function of the “expected” words to be anonymized (those associated with the reference queries) forming the ground truth.
[0091] The anonymization neural network is considered correctly trained when it is able to predict the expected anonymized words.
[0092] Methods for transcribing queries into natural language and querying the database
[0093] According to a second aspect, the invention relates to the method of transcribing a first request, in natural language, for querying a database stored on data storage means 12 of a first server 1 and containing confidential data, into a computer language for manipulating said database, in particular SQL, using the pseudoanonymization method according to the first aspect.
[0094] More precisely, we begin with the pseudoanonymization process (steps (a) to (c)) so as to generate the second query, in natural language, corresponding to the first query in which the identified words are replaced by pseudonyms.
[0095] Then, in a step (d), the means 21 require the transcription, by a generative language model, generally based on a large language model (LLM), in particular a pre-trained generative transformer (GPT) type model, of the second query into a third query in said computer language for manipulating said database. By generative language model, we mean a generative artificial intelligence capable of generating text from a prompt, for example GPT-3, LaMDA, LLaMA, BLOOM, etc. Typically, the LLM is implemented by a remote server so that this query is transmitted to it. It is noted that this outsourcing does not pose any confidentiality problem since the second query is pseudo-anonymized.
[0096] In response, the third query is received. It is understood that the third query has the same content as the second query, so that it is still pseudoanonymized (and therefore it does not correspond to the first query). In this respect, the method according to the second aspect comprises a step (e) of generating a fourth query, in said computer language for manipulating said database, corresponding to the third query in which the pseudonyms are replaced by the original words of the first query.
[0097] In other words, the fourth request is the third request "de-pseudoanonymized". We understand that thus, the fourth query corresponds exactly to the first query transcribed in the said computer language for manipulating the said database (SQL).
[0098] To carry out step (e), we simply reuse the pseudonym correspondence table from step (c).
[0099] To summarize, we have 4 database query requests: - the first request is in natural language and “in clear” (i.e. with confidential words); - the second query is in natural language and anonymized; - the third query is in basic computer manipulation language of data and anonymized; - the fourth query is in database manipulation computer language and again in clear text
[0100] In the case of the second query: “Give me the average quantity in mg of XLSM409 given to Mr. GHRM035 in room 4 yesterday by doctor FNM897”, we can have the following third query:
[0101] SELECT AVG (dose_mg) AS average_quantity_mg
[0102] FROM prescriptions
[0103] WHERE patient_name = 'GHRM035' AND medication_prescription = 'Diphenhydramine' and room = 4 AND doctor_name = 'FNM897';
[0104] And for fourth request:
[0105] SELECT AVG (dose_mg) AS average_quantity_mg
[0106] FROM prescriptions
[0107] WHERE patient_name = 'John Doe' AND medication_prescribed = 'XLSM409' and room = 4 AND doctor_name = 'James Smith';
[0108] Note that the generative language model is generally pre-trained, but the process of transcribing a first query advantageously includes an “initialization” of this model to improve its performance, amounting to fine-tuning.
[0109] This initialization can be done very simply by sending prompts to the generative language model before any transcription request. The initialization therefore preferably includes the explanation of the database headers (preferably all of them and not just those that are confidential), i.e. a description of the header in natural language, so that they can be naturally associated with elements of any sentence. It can also be initialized with sample queries.
[0110] According to a third aspect, the invention relates to the method of interrogating a database stored on data storage means 12 of a first server 1 and containing confidential data using the method according to the second aspect (and therefore indirectly the method according to the first aspect).
[0111] More precisely, we begin with the process of transcribing the first query into natural language (steps (a) to (e)) so as to generate the fourth query, in computer language for manipulating said database, corresponding to the first query, then in a step (f), said fourth query is executed.
[0112] The user receives in return, typically on the terminal 10, the result of the query.
[0113] Server
[0114] According to a fourth aspect, the invention relates to the second server 2 for implementing the methods according to the first, second and third aspects.
[0115] Thus, this second server 2 comprises, as explained, at least data processing means 21 and a memory 22. It is typically a database anonymization / transcription / query server.
[0116] The data processing means 21 are configured to implement steps consisting of: - Obtaining from a client terminal 10 a first request, in natural language, to query a database stored on data storage means 12 of a first server 1 and containing data confidential; - identify, by means of an anonymization neural network taking as input said first query and a predefined list of database headers relating to confidential data, words to be anonymized from the first query; - generate a second query, in natural language, corresponding to the first query in which the identified words are replaced by pseudonyms; - advantageously, request the transcription by a large language model of the second request into a third request, in said computer language for manipulating said database; - advantageously, generating a fourth query, in said computer language for manipulating said database, corresponding to the third query in which the pseudonyms are replaced by the original words of the first query; - advantageously, execute the fourth request.
[0117] According to another aspect, the invention proposes a system comprising said second server 2, as well as the first server 1 and / or a client terminal 10 connected (via the network 20). Advantageously, said system also comprises the third server 3, connected to the second server 2 still via the network 20.
[0118] The third server 3 comprises data processing means 31 configured to implement the learning of said classification model from said learning base of the anonymization neural network, and in particular from the attention block and the decoder block (and the possible contextualization block) from first reference queries whose words to be anonymized are known.
[0119] Computer program product
[0120] According to a fifth and a sixth aspect, the invention relates to a computer program product comprising code instructions for the execution (on the data processing means 21 of the second server 2) of a method according to the first aspect of pseudoanonymization of a first query, in natural language, for querying a database stored on data storage means 12 of a first server 1 and containing confidential data; of a method according to the second aspect of transcription of the first query into a computer language for manipulating said database, in particular SQL; and / or of a method according to the third aspect of querying the database; as well as storage means readable by computer equipment (for example the data storage means 22a of the first server 2a) on which this computer program product is found.
Claims
Claims
1. Method for pseudoanonymizing a first query, in natural language, for querying a database stored on data storage means (12) of a first server (1) and containing confidential data, the method being characterized in that it comprises the implementation by data processing means (21) of a second server (2) of steps of: a. Obtaining said first query from a client terminal (10); b. Identifying, by means of an anonymization neural network taking as input said first query and a predefined list of headers of the database relating to confidential data, words to be anonymized from the first query; c. Generating a second query, in natural language, corresponding to the first query in which the identified words are replaced by pseudonyms.
2. The method of claim 1, wherein said anonymization neural network comprises at least a text encoder block, an attention block, and a decoder block, wherein step (b) comprises a substep (bl) of obtaining a representation of the first query and a representation of the list of headers of the database to be anonymized by means of said text encoder block; a substep (b3) of obtaining a representation of the parts relating to the words to be anonymized of the first query by applying said attention block to said representation of the first query, said list of headers of the database to be anonymized being used as an attention map; and a substep (b4) of identifying said words to be anonymized of the first query by applying the decoder block to said representation of the parts relating to the words to be anonymized of the first query.
3. The method of claim 2, wherein said representations of the first query and the parts relating to the words to be anonymized of the first query are feature maps.
4. Method according to one of claims 2 to 3, in which the encoder block is a pre-trained model, in particular of the transformer type.
5. Method according to one of claims 2 to 4, in which said anonymization neural network further comprises a contextualization block, step (b) comprises an intermediate step (b2) of application to each of the representations of the first query and of the list of headers of the database to be anonymized.
6. Method according to claim 5, wherein said contextualization block is a bidirectional recurrent neural network, in particular of the BiLSTM type.
7. Method according to one of claims 2 to 6, in which the decoder block comprises a first sub-block and a second sub-block in parallel, the sub-step (b4) comprises: - The prediction, by means of the first sub-block, of the number of words to be anonymized of the first request; - the identification, by means of the second sub-block, of said words to be anonymized of the first request as a function of said predicted number of words to be anonymized
8. The method of claim 7, wherein the first sub-block is a fully connected neural network terminated by a softmax activation layer, and the second sub-block is another fully connected neural network terminated by a sigmoid activation layer.
9. The method of claim 8, wherein said second sub-block is applied iteratively as many times as said predicted number of words to be anonymized from the first query.
10. Method according to one of claims 2 to 9, comprising a step (aO) of learning, by data processing means (21b) of a third server (2b), the attention block and the decoder block from first reference requests whose words to be anonymized are known.
11. Method for transcribing a first query, in natural language, for interrogating a database stored on data storage means (12) of a first server (1) and containing confidential data, into a computer language for manipulating said database, in particular SQL, characterized in that it comprises the implementation by data processing means (21) of a second server (2) of the method according to one of the claims instructions 1 to 10 for pseudoanonymizing said first query, so as to generate a second query, in natural language, corresponding to the first query in which the identified words are replaced by pseudonyms, then steps of: a. transcription request by a generative language model of the second request into a third request, in said computer language for manipulating said database; b. generation of a fourth query, in said computer language for manipulating said database, corresponding to the third query in which the pseudonyms are replaced by the original words of the first query.
12. Method for querying a database stored on data storage means (12) of a first server (1) and containing confidential data, characterized in that it comprises the implementation by data processing means (21) of a second server (2) of the method according to claim 11 of transcription of a first query, in natural language, for querying said database, into a computer language for manipulating said database, so as to generate a fourth query, in said computer language for manipulating said database corresponding to the first query, then a step of: a. Execution of the said fourth request.
13. Server (2) characterized in that it comprises data processing means (21) configured to: - Obtaining from a client terminal (10) a first request, in natural language, to query a database stored on data storage means (12) of a first server (1) and containing confidential data; - identify, by means of an anonymization neural network taking as input said first query and a predefined list of database headers relating to confidential data, words to be anonymized from the first query; - generate a second query, in natural language, cor- responding to the first query in which the identified words are replaced by pseudonyms.
14. Computer program product comprising code instructions for executing a method according to one of claims 1 to 10 for pseudoanonymizing a first query, in natural language, for interrogating a database stored on data storage means (12) of a first server (1) and containing confidential data; a method according to claim 11 for transcribing the first query into a computer language for manipulating said database, in particular SQL; or a method according to claim 12 for interrogating the database, when said program is executed on a computer.
15. Storage means readable by computer equipment on which is recorded a computer program product comprising code instructions for the execution of a method according to one of claims 1 to 10 of pseudoanonymization of a first query, in natural language, for interrogating a database stored on data storage means (12) of a first server (1) and containing confidential data; of a method according to claim 11 of transcription of the first query into a computer language for manipulating said database, in particular SQL; or of a method according to claim 12 for interrogating the database.
Citation Information
Patent Citations
Preserving privacy in natural langauge databases
US20140278409A1
Private cloud user insight privacy
US20220182363A1