Artificial intelligence based service providing method without leaking private information and client apparatus
Provided is a method of providing an artificial intelligence (AI)-based service without exposure of personal information, which includes receiving, by a client apparatus, a user query, performing, by the client apparatus, preprocessing on the user query to replace a target word corresponding to personal information in the user query with a corresponding replacement word, transmitting, by the client apparatus, the preprocessed user query to a service server for providing an AI-based service, and replacing, by the client apparatus, the replacement word in an answer corresponding to the user query that is received from the service server with the target word corresponding thereto.
1 . A method of providing an artificial intelligence (AI)-based service, the method comprising:
receiving, by a client apparatus, a user query;
preprocessing, by the client apparatus, the user query by replacing a target word corresponding to personal information with a corresponding replacement word;
transmitting, by the client apparatus, the preprocessed user query to a service server for providing an AI-based service, wherein the target word corresponding to personal information is not transmitted to the service server;
receiving, by the client apparatus, a response of the user query from the service server; and
restoring, by the client apparatus, the target word in the response by replacing the replacement word with the corresponding target word,
wherein the preprocessing comprises:
detecting the target word in the user query;
generating an embedding vector of the target word;
determining the replacement word based on the embedding vector by selecting a word having an embedding vector most similar to the embedding vector of the target word from a plurality of words stored in association with corresponding embedding vectors in an embedding space; and
replacing the target word with the replacement word in the user query.
2 . The method of claim 1 , wherein the client apparatus detects the target word in the user query using a pre-built learning model.
3 . The method of claim 1 , further comprising storing, by the client apparatus, the target word and the replacement word in a table,
wherein, when the replacement word is present in the response, the client apparatus refers to the table and replaces the replacement word with the target word.
4 . A client apparatus for receiving an artificial intelligence (AI)-based service, the client apparatus comprising:
an interface device configured to receive a user query;
a communication device configured to transmit a preprocessed user query to a service server for providing an AI-based service and receive a response corresponding to the user query from the service server;
a storage device configured to store a plurality of words; and
a processor configured to
detect, in the user query, a target word corresponding to personal information;
generate an embedding vector of the target word;
determine a replacement word based on the embedding vector by selecting, from the plurality of words stored in association with corresponding embedding vectors, a word having an embedding vector most similar to the embedding vector of the target word in an embedding space;
replace the target word in the user query with the replacement word to generate the preprocessed user query; and
restore the target word by replacing the replacement word in the response received from the service server.
5 . The client apparatus of claim 4 , wherein the processor is configured to detect the target word in the received user query using a pre-built learning model.
6 . The client apparatus of claim 4 , wherein the embedding vector of the target word includes noise which is added according to a differential privacy technique.
7 . The client apparatus of claim 4 , wherein the storage device is configured to store the target word and the replacement word in a table,
wherein the processor is configured to refer to the table and replace the replacement word with the target word when the replacement word is present in the response.