CN115630400B - Query method, device, equipment and storage medium for de-identified data - Google Patents

Query method, device, equipment and storage medium for de-identified data Download PDF

Info

Publication number
CN115630400B
CN115630400B CN202211645698.3A CN202211645698A CN115630400B CN 115630400 B CN115630400 B CN 115630400B CN 202211645698 A CN202211645698 A CN 202211645698A CN 115630400 B CN115630400 B CN 115630400B
Authority
CN
China
Prior art keywords
data item
key
main body
main
salt
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211645698.3A
Other languages
Chinese (zh)
Other versions
CN115630400A (en
Inventor
周俊
李芊
邓倩倩
张诗怡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Electronics Technology Network Security Technology Co ltd
Original Assignee
China Electronics Technology Network Security Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Electronics Technology Network Security Technology Co ltd filed Critical China Electronics Technology Network Security Technology Co ltd
Priority to CN202211645698.3A priority Critical patent/CN115630400B/en
Publication of CN115630400A publication Critical patent/CN115630400A/en
Application granted granted Critical
Publication of CN115630400B publication Critical patent/CN115630400B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes
    • G06F21/6254Protecting personal data, e.g. for financial or medical purposes by anonymising data, e.g. decorrelating personal data from the owner's identification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6227Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database where protection concerns the structure of data, e.g. records, types, queries
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0435Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply symmetric encryption, i.e. same key used for encryption and decryption
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Medical Informatics (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Storage Device Security (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a query method, a query device, query equipment and a storage medium for de-identified data, which are applied to the field of computer software. The method comprises the following steps: obtaining a main body unique identifier and main body salt from a main body unique identifier table; searching a first main key and a data item corresponding to the main body unique identifier from the main body information relation table according to the main body unique identifier; calculating a second primary key; the second main key is a value calculated by a summary algorithm after the first main key and the main salt are combined; and searching the data item and the data item value corresponding to the second main key from the information table according to the second main key. The invention designs the three longitudinal tables of the main body unique identification table, the main body information relation table and the information table, and adopts an index mode based on a unidirectional abstract algorithm and salt among the tables, thereby ensuring that only legal users can execute the query function, disconnecting the association of the main body unique identification and the data item value, ensuring the usability of data and reducing the processing cost of the system while achieving the effect of de-identification and protection.

Description

Query method, device, equipment and storage medium for de-identified data
Technical Field
The present invention relates to the field of computer software, and in particular, to a method, an apparatus, a device, and a storage medium for querying de-identified data.
Background
Sensitive information leakage events are becoming more and more widespread, and protection of sensitive information is becoming highly appreciated. The need for protection of personal information occupies a considerable area. Personal information (or body information) is typically stored in a database in a structured form such as data items. Compared with general sensitive information, the method generally adopts encryption or desensitization and other technical methods to protect personal information stored in a database, and if the usability of the encrypted data is ensured, a special encryption algorithm, such as a reserved format encryption algorithm or homomorphic encryption algorithm, is needed. The general encryption or desensitization technology destroys the usability of the data, so if the data is wanted to be used, decryption is needed first, and meanwhile, frequent encryption and decryption operations bring certain system processing cost and influence the inquiry performance; the homomorphic encryption algorithm can well ensure that the data is 'available and invisible', but the homomorphic encryption algorithm has lower efficiency, and is not applied and popularized on a large scale at present.
In the process of realizing the invention, the prior art is found to have the following problems, the existing de-identification method is utilized to encrypt the data, the defects of damaging availability, limiting a protected object, affecting the system performance and the like are caused, and the queried de-identification data also has the defects of unavailable, incapability of comprehensively protecting information, slow query process and the like. Therefore, how to effectively protect user information, avoid the influence of encryption and decryption technology on the data use efficiency, and protect adversaries from attacking main information is a technical problem that needs to be solved by those skilled in the art.
Disclosure of Invention
Accordingly, the present invention is directed to a method, apparatus, device and storage medium for querying de-identified data, which solve the technical problem that the prior art cannot effectively protect user information.
In order to solve the technical problems, the invention provides a query method for de-identified data, which comprises the following steps:
acquiring a main body unique identifier and main body salt from a main body unique identifier table according to a search instruction;
searching a first main key and a data item corresponding to the main unique identifier from a main information relation table according to the main unique identifier;
calculating a second primary key; the second main key is a value calculated by a summary algorithm after the first main key and the main salt are combined;
and searching the data item and the data item value corresponding to the second main key from an information table according to the second main key.
Optionally, before the obtaining the unique main body identifier and the main body salt from the unique main body identifier table according to the search instruction, the method further includes:
judging whether the user is a legal user or not according to the input verification information;
and when the user is a legal user, executing the step of acquiring the unique main body identification and the main body salt from the unique main body identification table according to the search instruction.
Optionally, the second primary key is a value calculated by using a digest algorithm after the first primary key and the main salt are combined, including:
the second primary bond is a value calculated by an SM3 algorithm after the first primary bond and the main salt are combined.
Optionally, after the searching the data item and the data item value corresponding to the second primary key from the information table according to the second primary key, the method further includes:
and storing the process of searching the data item value corresponding to the main body unique identifier according to the searching instruction into a query log.
Optionally, after the searching the data item and the data item value corresponding to the second primary key from the information table according to the second primary key, the method further includes:
acquiring a target data item value, a target data item and a target primary key from the information table according to a main body searching instruction;
searching a target data item salt encryption key corresponding to the target data item from a key table according to the target data item, and decrypting the target data item salt encryption key to obtain a target data item salt key;
searching a target data item salt ciphertext corresponding to the target data item from a data item salt table according to the target data item;
decrypting the target data item salt ciphertext according to the target data item salt key to obtain a target data item salt plaintext;
calculating a reverse target primary key; the reverse target main key is a value obtained by calculating by using a summary algorithm after the target main key and the target data item salt plaintext are combined;
and searching a target main body unique identifier corresponding to the reverse target main key from the main body information relation table according to the reverse target main key.
Optionally, the generating process of the target data item salt ciphertext and the target data item salt encryption key includes:
and obtaining the target data item salt ciphertext and the target data item salt encryption key by using a symmetric key algorithm.
Optionally, after the searching, according to the reverse target primary key, the target primary unique identifier corresponding to the reverse target primary key from the primary information relationship table, the method further includes:
when receiving an instruction for adding new data;
and adding the corresponding information generated by the received new data according to the preset rule into the main body unique identification table, the main body information relation table, the information table, the key table and the data item salt table.
The invention also provides a query device for de-identified data, which comprises:
the main body unique identifier acquisition module is used for acquiring a main body unique identifier and main body salt from the main body unique identifier table according to the search instruction;
the first main key acquisition module is used for searching a first main key and a data item corresponding to the main body unique identifier from a main body information relation table according to the main body unique identifier;
the second main key calculation module is used for calculating a second main key; the second main key is a value calculated by a summary algorithm after the first main key and the main salt are combined;
and the data item value acquisition module is used for searching the data item and the data item value corresponding to the second main key from the information table according to the second main key.
The invention also provides query equipment for de-identifying data, which comprises:
a memory for storing a computer program;
and the processor is used for realizing the steps of the query method of the de-identified data when executing the computer program.
The invention also provides a storage medium, wherein the storage medium is stored with a computer program, and the computer program realizes the steps of the query method for de-identified data when being executed by a processor.
Therefore, according to the query method for de-identified data, the main body unique identification and the main body salt are obtained from the main body unique identification table according to the search instruction; searching a first main key and a data item corresponding to the main unique identifier from a main information relation table according to the main unique identifier; calculating a second primary key; the second main key is a value calculated by a summary algorithm after the first main key and the main salt are combined; and searching the data item and the data item value corresponding to the second main key from an information table according to the second main key. Compared with the prior art for symmetrically encrypting each data item value, the de-identification data query method provided by the invention is based on the design idea of taking data as a center, and by designing a vertical table comprising a main body unique identification table, a main body information relation table and an information table, and combining with the de-identification technology, the security is built on the data itself, and the data item value itself does not undergo any processing. The tables adopt an index mode based on a one-way summary function and salt, the salt is used as encryption protection, and only legal users can execute the query function between the tables. The scheme of the invention achieves the effect of de-identification protection, ensures the usability of the data, and reduces the processing cost of the system compared with the encryption mode of the data item value.
In addition, the invention also provides a query device, equipment and storage medium for de-identifying data, which also have the beneficial effects.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only embodiments of the present invention, and other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a query method for de-identified data according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for querying de-identified data according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a query device for de-identifying data according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a query device for de-identifying data according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, fig. 1 is a flowchart of a query method for de-identifying data according to an embodiment of the present invention. The method may include:
s100, acquiring the unique main body identifier and main body salt from the unique main body identifier table according to the search instruction.
The embodiment is not limited to a specific form of the search instruction, as long as the search of the data item value corresponding to the unique identifier of the user can be triggered. For example, the search instruction may be to input the unique identity of the subject for searching, or the search instruction may be to input the unique identity of the subject for searching when the user is a legitimate user. UUID (Universally Unique Identifier, principal unique identification) refers to a number generated on one machine that is guaranteed to be unique to all machines in the same space-time. This embodiment is also not limited to the specific content of the subject unique identification as long as the subject unique identification can represent a unique subject, for example, the subject unique identification is 550E8400-E29b-41D4-a716-446655440000, or the subject unique identification is 3F2504E0-4F89-11D3-9A0C-0305E82C3301. The host salt refers to a host salt corresponding to the unique host identifier, and the embodiment is not limited to the specific content of the host salt. The salt can be any letter, number, combination of letters or numbers, but is generated randomly, so that the main body salt corresponding to each main body unique identifier is different, and when the main body unique identifier is known, the main body unique identifier can be salted according to the input main body unique identifier, so that the main body salt corresponding to the main body unique identifier is obtained.
S101, searching a first main key and a data item corresponding to the main body unique identifier from the main body information relation table according to the main body unique identifier.
The embodiment is not limited to a specific design method of the first primary key as long as the first primary key has no descriptive and unique field. For example, the first primary key may be a sequence number; or the first primary key may be a number; or the first primary key may be a social security card number; or the first primary key may be a cell phone number or the like. In this embodiment, since the subject unique identifier exists in the subject information relationship table, the first primary key and the data item corresponding to the subject unique identifier in the subject information relationship table can be indexed according to the subject unique identifier in the subject unique identifier table.
S102, calculating a second primary key; the second main key is a value calculated by a digest algorithm after the first main key and the main salt are combined.
The specific calculation method of the second main bond is not limited in this embodiment, as long as it can be calculated by using a digest algorithm after combining the first main bond and the main salt. The embodiment is not limited to a particular type of Digest Algorithm, for example, the Digest Algorithm may be MD2 (Message-Digest Algorithm); or the Digest Algorithm may be MD4 (Message-Digest Algorithm); or the Digest Algorithm may also be MD5 (Message-Digest Algorithm 5); or the digest algorithm may be SHA1 (Secure Hash Algorithm ); or the digest algorithm may be an SM3 algorithm (domestic hash algorithm); or the digest algorithm may be a MAC (Message Authentication Code, message authentication code algorithm) algorithm.
S103, searching the data item and the data item value corresponding to the second main key from the information table according to the second main key.
The particular type of data item is not limited in this embodiment. For example, the data item type may be age; or the data item type may be height; or the data item type can also be an identity card number; or the data item type may also be a cell phone number, or the data item type may also be an address. This embodiment is also not limited to a particular value of the data item value, for example, the data item value may be 23; or the data item value may be 180; the data item value may be 110; the data item value may also be 1526798, etc.
Based on the above embodiment, the embodiment of the present invention obtains the subject unique identifier and the subject salt from the subject unique identifier table according to the search instruction; searching a first main key and a data item corresponding to the main body unique identifier from the main body information relation table according to the main body unique identifier; calculating a second primary key; the second main key is a value calculated by a summary algorithm after the first main key and the main salt are combined; and searching the data item and the data item value corresponding to the second main key from the information table according to the second main key. Compared with the prior art that the data are encrypted and protected mainly through the transverse table and the data item values are encrypted one by one, the method and the device have the advantages that the three longitudinal tables of the main body unique identification table, the main body information relation table and the information table are designed, the encryption and protection of the salt are realized through the index mode based on the unidirectional abstract function and the salt, the fact that only legal users can execute the query function is guaranteed, the association between the main body unique identification and the data item values is disconnected, the effect of de-identification and protection is achieved, meanwhile, the usability of the data is guaranteed, and the processing cost of a system is reduced.
Further, in order to ensure validity and security of the main body for acquiring the data item value according to the search instruction, before acquiring the main body unique identifier and the main body salt from the main body unique identifier table according to the search instruction, the method may further include:
judging whether the user is a legal user or not according to the input verification information;
and when the user is a legal user, executing the step of acquiring the unique main body identification and main body salt from the unique main body identification table according to the search instruction.
The embodiment is not limited to a specific information type of the authentication information, as long as it can be ensured that a legitimate user performs a search for the data item value. For example, the entered authentication information may be a password; or the input verification information may be a face; or the input verification information can also be a fingerprint; or the input verification information can also be palmprint; or the input authentication information may also be an iris or the like.
Further, in order to increase the autonomous controllability and improve the calculation efficiency, the second primary key is a value calculated by using a digest algorithm after the combination of the first primary key and the main salt, and may include:
the second primary key is a value calculated by using an SM3 algorithm after the first primary key and the main salt are combined.
The embodiment is not limited to the combination of the first main bond and the main salt, as long as the first main bond and the main salt can be combined together, and for example, can be a random combination; or combined according to some rule. The SM3 algorithm (domestic hash algorithm) in this embodiment is mainly used for digital signature and verification, message authentication code generation and verification, random number generation, and the like, and the algorithm thereof is disclosed. The SM3 algorithm (domestic hash algorithm) is used in this embodiment to follow the management requirements of security compliance, and to improve the autonomous controllability and computational efficiency of encryption. In this embodiment, the second primary key is calculated by using SM3 algorithm (domestic hash algorithm), for example, the main salt added after the first primary key is a long character, and the hash operation is performed on the first primary key to which the long character is added.
Further, in order to facilitate the subsequent problem investigation and conduct the behavior audit, after searching the data item and the data item value corresponding to the second primary key from the information table according to the second primary key, the method may further include:
and storing the process of searching the data item value corresponding to the unique identification of the main body according to the searching instruction into the query log.
This embodiment will store the process of looking up the data item value corresponding to the subject unique identification according to the lookup instruction in the query log. It can be understood that the searching process is stored, so that when the data is not queried or the query result is obvious and correct, the problem can be checked in time in the whole searching process, and the problem can be found in time.
Further, in order to query the unique identifier of the main body according to the data item value, to implement reverse query, after searching the data item and the data item value corresponding to the second main key from the information table according to the second main key, the method may further include the following steps, specifically please refer to fig. 2, fig. 2 is a flowchart illustrating a query method for de-identifying data according to an embodiment of the present invention. The method may include:
s200, acquiring a target data item value, a target data item and a target primary key from an information table according to a main body searching instruction;
the embodiment is not limited to a particular type of subject lookup instruction. For example, a person corresponding to the target data item value is looked up by the subject lookup instruction, or a device corresponding to the target data item value is looked up by the subject lookup instruction. The embodiment also does not limit the time for triggering the main body searching instruction, for example, when the target data item value is input, the main body unique identifier corresponding to the target data item value can be searched according to the main body searching instruction; or when the user is a legal user, the target data item value can be input, and the main body searching instruction is triggered to be executed.
S201, searching a target data item salt encryption key corresponding to the target data item from a key table according to the target data item, and decrypting the target data item salt encryption key to obtain the target data item salt key.
The information table is indexed to the key table by the target data item in this embodiment. The embodiment is not limited to the generation method of the target data item salt key, as long as the target data item salt ciphertext can be decrypted using the data item salt key, for example, the generation method of the target data item salt key is a symmetric key, or the generation method of the target data item salt key is a symmetric key generation method is an asymmetric key.
S202, searching a target data item salt ciphertext corresponding to the target data item from the data item salt table according to the target data item.
The embodiment is not limited to the method of generating the target data item salt ciphertext and the target data item salt encryption key, as long as the target data item salt ciphertext and the target data item salt encryption key can be generated, for example, DES (Data Encryption Standard, symmetric encryption algorithm) can be utilized; or the generation method can be 3DES (Triple DES, triple data encryption algorithm); or the generation method may be SM4 (packet data algorithm of the wire lan standard); or the generation method may be IDEA (International Data Encryption Algorithm ); or the generation method may be RC (Ron Rivest, symmetric key encryption algorithm); or the generation method can be that a cryptographic algorithm such as AES (Advanced Encryption Standard, advanced encryption algorithm) generates the target data item salt ciphertext and the target data item salt encryption key.
And S203, decrypting the target data item salt ciphertext according to the target data item salt key to obtain a target data item salt plaintext.
In the embodiment, the target data item salt ciphertext is decrypted through the acquired target data item salt secret key, and the target data item salt plaintext is obtained.
S204, calculating a reverse target primary key; the reverse target main key is a value calculated by a summary algorithm after the target main key and the target data item salt plaintext are combined.
The embodiment is not limited to a particular type of Digest Algorithm, for example, the Digest Algorithm may be MD2 (Message-Digest Algorithm); or the Digest Algorithm may be MD4 (Message-Digest Algorithm); or the Digest Algorithm may be MD5 (Message-Digest Algorithm); or the digest algorithm may be SHA1 (Secure Hash Algorithm ); or the digest algorithm may be an SM3 algorithm (domestic hash algorithm); or the digest algorithm may be a MAC (Message Authentication Code, message authentication code algorithm) or the like.
S205, searching the unique target subject identifier corresponding to the reverse target main key from the subject information relation table according to the reverse target main key.
In this embodiment, since the main body information relation table stores the reverse target main key, the unique target main body identifier corresponding to the reverse target main key in the main body information table can be obtained according to the calculated reverse target main key.
Based on the above embodiment, the embodiment of the present invention obtains the target data item value, the target data item and the target primary key from the information table according to the subject search instruction; searching a target data item salt encryption key corresponding to the target data item from a key table according to the target data item, and decrypting the target data item salt encryption key to obtain a target data item salt key; searching a target data item salt ciphertext corresponding to the target data item from the data item salt table according to the target data item; decrypting the target data item salt ciphertext according to the target data item salt key to obtain a target data item salt plaintext; calculating a reverse target primary key; the reverse target main key is a value obtained by calculating by using a summary algorithm after the combination of the target main key and the target data item salt plaintext; and searching the unique target subject identifier corresponding to the reverse target main key from the subject information relation table according to the reverse target main key. Therefore, the embodiment of the invention can reversely inquire the unique identity of the main body corresponding to the data item value through the data item value, namely, the reverse inquiry from the data item value to the main body is realized.
Further, in order to achieve quick query and improve encryption efficiency, the generating process of the target data item salt ciphertext and the target data item salt encryption key may include:
and obtaining the target data item salt ciphertext and the target data item salt encryption key by using a symmetric key algorithm.
The specific type of the symmetric key algorithm is not limited in this embodiment as long as the target data item salt ciphertext and the target data item salt are available, and for example, the symmetric key algorithm may be 3DES (Triple DES, triple data encryption algorithm), AES (Advanced Encryption Standard, advanced encryption algorithm), blowfish (symmetric key encryption algorithm), SM4 (national encryption algorithm), or the like.
Further, in order to de-identify new data, so that new data may be searched according to the query method of de-identified data provided by the embodiment of the present invention, after searching the unique target main body identifier corresponding to the reverse target main key from the main body information relationship table according to the reverse target main key, the method may further include:
when receiving an instruction for adding new data;
and adding the corresponding information generated by the received new data according to the preset rule into a main body unique identification table, a main body information relation table, an information table, a key table and a data item salt table.
This embodiment is not limited to the specific content of the add new data instruction. The process of adding the new data instruction to the main body information table, the main body information relation table, the information table, the key table and the data item salt table in the embodiment can comprise dividing each part of the input new data and storing the divided parts into corresponding tables, so that the tables can be conveniently used for inquiring later.
In summary, based on the above embodiment, according to the query method for de-identified data provided by the embodiment of the present invention, the main body unique identifier and the main body salt are obtained from the main body unique identifier table according to the search instruction;
searching a first main key and a data item corresponding to the main body unique identifier from the main body information relation table according to the main body unique identifier; calculating a second primary key; the second main key is a value calculated by a summary algorithm after the first main key and the main salt are combined; and searching the data item and the data item value corresponding to the second main key from the information table according to the second main key. Therefore, the embodiment of the invention can achieve the effect of de-identification protection by disconnecting the association of the main body unique identification and the data item value, and simultaneously ensure the usability of the data and reduce the processing cost of the system. And further, in order to enhance autonomous controllability and improve encryption efficiency, a second main key is obtained for a combination process SM3 algorithm of the first main key and the main salt, and a unidirectional SM3 algorithm and indexing of the salt are realized; further, in order to enable the query method of the de-identified data to realize reverse query, the reverse query from the data item value to the main body unique identification can be realized by utilizing a reverse index mode.
The following describes the query device for de-identified data provided in the embodiment of the present invention, and the query device for de-identified data described below and the query method for de-identified data described above may be referred to correspondingly.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a query device for de-identifying data according to an embodiment of the present invention, which may include:
the main body unique identifier obtaining module 100 is configured to obtain a main body unique identifier and a main body salt from the main body unique identifier table according to a search instruction;
the first primary key obtaining module 200 is configured to search, according to the unique main body identifier, a first primary key and a data item corresponding to the unique main body identifier from a main body information relationship table;
a second primary key calculation module 300 for calculating a second primary key; the second main key is a value calculated by a summary algorithm after the first main key and the main salt are combined;
and the data item value obtaining module 400 is configured to search the data item and the data item value corresponding to the second primary key from the information table according to the second primary key.
Based on the above embodiment, the query device for de-identified data may further include:
the legal user judging module is used for judging whether the user is a legal user or not according to the input verification information;
and the legal user determining module is used for executing the step of acquiring the main body unique identification and the main body salt from the main body unique identification table according to the search instruction when the legal user is the legal user.
Based on any of the above embodiments, the second primary key calculation module 300 may include:
a second primary key calculation unit for calculating a second primary key; the second main bond is a value calculated by an SM3 algorithm after the first main bond and the main salt are combined.
Based on any of the above embodiments, the de-identified data query device may further include:
and the storage module is used for storing the process of searching the data item value corresponding to the main body unique identifier according to the searching instruction into a query log.
Based on any of the above embodiments, the de-identified data query device may further include:
the information table information acquisition module is used for acquiring a target data item value, a target data item and a target primary key from the information table according to the main body searching instruction;
the data item salt key acquisition module is used for searching a target data item salt encryption key corresponding to the target data item from a key table according to the target data item, and decrypting the target data item salt encryption key to obtain a target data item salt key;
the data item salt ciphertext obtaining module is used for searching a target data item salt ciphertext corresponding to the target data item from a data item salt table according to the target data item;
the data item salt plaintext obtaining module is used for decrypting the target data item salt ciphertext according to the target data item salt key to obtain a target data item salt plaintext;
the reverse target main key calculation module is used for calculating a reverse target main key; the reverse target main key is a value obtained by calculating by using a summary cryptographic algorithm after the target main key and the target data item salt plaintext are combined;
and the corresponding main body unique identifier acquisition module is used for searching the target main body unique identifier corresponding to the reverse target main key from the main body information relation table according to the reverse target main key.
Based on any of the above embodiments, the query device for de-identifying data may include:
and the data item salt ciphertext and data item salt encryption key calculation unit is used for obtaining the target data item salt ciphertext and the target data item salt encryption key by utilizing a symmetric key algorithm.
Based on any of the foregoing embodiments, the query device for de-identifying data may further include:
the adding instruction receiving module is used for receiving an adding new data instruction;
and the adding module is used for adding the corresponding information generated by the new data according to the preset rule to the main body unique identification table, the main body information relation table, the information table, the key table and the data item salt table.
Based on the above embodiments, the present embodiment provides a query device for de-identifying data, where the device includes a main body unique identifier obtaining module 100, configured to obtain a main body unique identifier and a main body salt from a main body unique identifier table according to a search instruction; the first primary key obtaining module 200 is configured to search, according to the unique main body identifier, a first primary key and a data item corresponding to the unique main body identifier from a main body information relationship table; a second primary key calculation module 300 for calculating a second primary key; the second main key is a value calculated by a summary algorithm after the first main key and the main salt are combined; and the data item value obtaining module 400 is configured to search the data item and the data item value corresponding to the second primary key from the information table according to the second primary key. Compared with the prior art for symmetrically encrypting each data item value, the query device for de-identifying data is designed around the design idea with data as a center, and by designing a vertical table comprising a main body unique identification table, a main body information relation table and an information table, and combining with the de-identifying technology, the security is built on the data, and the data item value does not undergo any processing. The tables adopt an index mode based on a one-way abstract function and salt, and the salt is encrypted and protected, so that only legal users can execute the query function. Therefore, the query device for de-identifying data provided by the application achieves the effect of de-identifying protection, and meanwhile, the usability of the data is guaranteed, and compared with a mode of encrypting the data item value, the processing cost of the system is reduced. And further, in order to enhance autonomous controllability and improve encryption efficiency, a second main key is obtained for a combination process SM3 algorithm of the first main key and the main salt, and a unidirectional SM3 algorithm and indexing of the salt are realized; further, in order to enable the query method of the de-identified data to realize reverse query, the reverse query from the data item value to the main body unique identification can be realized by utilizing a reverse index mode.
The following describes a query device for de-identified data according to an embodiment of the present invention, where the query device for de-identified data described below and the query method for de-identified data described above may be referred to correspondingly.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a query device for de-identifying data according to an embodiment of the present invention, which may include:
a memory 10 for storing a computer program;
a processor 20 for executing a computer program for implementing the steps of the query method for de-identified data described above.
As shown in fig. 4, fig. 4 is a schematic structural diagram of a query device for de-identifying data, where the query device for de-identifying data may include: memory 10, processor 20, communication interface 30, and communication bus 40. The memory 10, the processor 20, and the communication interface 30 all communicate with each other via a communication bus 40.
The memory may include read only memory and random access memory and provide instructions and data to the processor. A portion of the memory may also include NVRAM. The memory stores an operating system and operating instructions, executable modules or data structures, or a subset thereof, or an extended set thereof, where the operating instructions may include various operating instructions for performing various operations. The operating system may include various system programs for implementing various basic tasks as well as handling hardware-based tasks.
The processor controls the operation of the application replication terminal device, which may also be referred to as CPU. The number of processors may be one or more. In some embodiments of the present application, the processor and memory may be connected by a bus or other means.
The method disclosed in the embodiments of the present application may be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or by instructions in the form of software. The processor described above may be a general purpose processor, DSP, ASIC, FPGA or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Of course, it should be noted that the structure shown in fig. 4 does not limit the application replication terminal device in the embodiment of the present application, and the application replication terminal device may include more or fewer components than those shown in fig. 4 or may combine some components in practical applications.
The present application also provides a storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the de-identified data querying method of any of the embodiments described above.
The storage medium in this embodiment may include: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, so that the same or similar parts between the embodiments are referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it is further noted that, in this document, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
The method, the device, the equipment and the storage medium for querying the de-identified data provided by the invention are described in detail, and specific examples are applied to the description of the principle and the implementation mode of the invention, and the description of the examples is only used for helping to understand the method and the core idea of the invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (10)

1. A method of querying de-identified data, comprising:
acquiring a main body unique identifier and main body salt from a main body unique identifier table according to a search instruction; wherein the main body unique identification table comprises the main body unique identification and the main body salt;
searching a first main key and a data item corresponding to the main unique identifier from a main information relation table according to the main unique identifier; the main body information relation table comprises the main body unique identifier, the first main key and the data item, wherein the first main key is a unique key word;
calculating a second primary key; the second main key is a value calculated by a summary algorithm after the first main key and the main salt are combined;
searching the data item and the data item value corresponding to the second main key from an information table according to the second main key; wherein the information table includes the second primary key, the data item, and the data item value.
2. The method of claim 1, further comprising, prior to said retrieving the subject unique identifier and the subject salt from the subject unique identifier table in accordance with the lookup instruction:
judging whether the user is a legal user or not according to the input verification information;
and when the user is a legal user, executing the step of acquiring the unique main body identification and the main body salt from the unique main body identification table according to the search instruction.
3. The method of claim 1, wherein the second primary key is a value calculated by a digest algorithm after the first primary key and the main salt are combined, comprising:
the second primary bond is a value calculated by an SM3 algorithm after the first primary bond and the main salt are combined.
4. The method of claim 1, further comprising, after said searching for said data item and data item value corresponding to said second primary key from an information table according to said second primary key:
and storing the process of searching the data item value corresponding to the main body unique identifier according to the searching instruction into a query log.
5. The method of claim 1, further comprising, after said searching for said data item and data item value corresponding to said second primary key from an information table according to said second primary key:
acquiring a target data item value, a target data item and a target primary key from the information table according to a main body searching instruction;
searching a target data item salt encryption key corresponding to the target data item from a key table according to the target data item, and decrypting the target data item salt encryption key to obtain a target data item salt key;
searching a target data item salt ciphertext corresponding to the target data item from a data item salt table according to the target data item;
decrypting the target data item salt ciphertext according to the target data item salt key to obtain a target data item salt plaintext;
calculating a reverse target primary key; the reverse target main key is a value obtained by calculating by using a summary algorithm after the target main key and the target data item salt plaintext are combined;
and searching a target main body unique identifier corresponding to the reverse target main key from the main body information relation table according to the reverse target main key.
6. The method of claim 5, wherein the generating the target data item salt ciphertext and the target data item salt encryption key comprises:
and obtaining the target data item salt ciphertext and the target data item salt encryption key by using a symmetric key algorithm.
7. The method for querying de-identified data as claimed in claim 5, further comprising, after said searching for a target subject unique identifier corresponding to said reverse target primary key from said subject information relationship table according to said reverse target primary key:
when receiving an instruction for adding new data;
and adding the corresponding information generated by the received new data according to the preset rule into the main body unique identification table, the main body information relation table, the information table, the key table and the data item salt table.
8. A query device for de-identifying data, comprising:
the main body unique identifier acquisition module is used for acquiring a main body unique identifier and main body salt from the main body unique identifier table according to the search instruction; wherein the main body unique identification table comprises the main body unique identification and the main body salt;
the first main key acquisition module is used for searching a first main key and a data item corresponding to the main body unique identifier from a main body information relation table according to the main body unique identifier; the main body information relation table comprises the main body unique identifier, the first main key and the data item, wherein the first main key is a unique key word;
the second main key calculation module is used for calculating a second main key; the second main key is a value calculated by a summary algorithm after the first main key and the main salt are combined;
the data item value acquisition module is used for searching the data item and the data item value corresponding to the second main key from the information table according to the second main key; wherein the information table includes the second primary key, the data item, and the data item value.
9. A query device for de-identifying data, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the query method of de-identified data as claimed in any one of claims 1 to 7 when executing said computer program.
10. A storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the de-identified data querying method according to any one of claims 1 to 7.
CN202211645698.3A 2022-12-21 2022-12-21 Query method, device, equipment and storage medium for de-identified data Active CN115630400B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211645698.3A CN115630400B (en) 2022-12-21 2022-12-21 Query method, device, equipment and storage medium for de-identified data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211645698.3A CN115630400B (en) 2022-12-21 2022-12-21 Query method, device, equipment and storage medium for de-identified data

Publications (2)

Publication Number Publication Date
CN115630400A CN115630400A (en) 2023-01-20
CN115630400B true CN115630400B (en) 2023-05-26

Family

ID=84910987

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211645698.3A Active CN115630400B (en) 2022-12-21 2022-12-21 Query method, device, equipment and storage medium for de-identified data

Country Status (1)

Country Link
CN (1) CN115630400B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109522315A (en) * 2018-10-26 2019-03-26 苏宁易购集团股份有限公司 A kind of data base processing method and system
CN111767364A (en) * 2019-03-26 2020-10-13 钉钉控股(开曼)有限公司 Data processing method, device and equipment
CN115344615A (en) * 2022-08-23 2022-11-15 中国民航信息网络股份有限公司 Information query method, system, electronic equipment and storage medium

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016188402A1 (en) * 2015-05-25 2016-12-01 邵通 Network anti-phishing apparatus, method and system
US9946744B2 (en) * 2016-01-06 2018-04-17 General Motors Llc Customer vehicle data security method
US10803196B2 (en) * 2018-03-30 2020-10-13 Microsoft Technology Licensing, Llc On-demand de-identification of data in computer storage systems
CN109492384B (en) * 2018-09-26 2021-07-20 成都卫士通信息产业股份有限公司 Method for receiving entity access and accessing password device, password device and entity
CN110930253B (en) * 2019-11-18 2023-05-23 深圳前海环融联易信息科技服务有限公司 Method and device for generating main key inside intelligent contract, computer equipment and storage medium
US11431476B2 (en) * 2020-04-30 2022-08-30 Dell Products L.P. Install time creation of forward error correction data and integrity checksums
CN111858659A (en) * 2020-07-23 2020-10-30 中国平安财产保险股份有限公司 Data query method, device and equipment based on row key salt value and storage medium
CN115329359A (en) * 2022-08-22 2022-11-11 蚂蚁区块链科技(上海)有限公司 Secret query method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109522315A (en) * 2018-10-26 2019-03-26 苏宁易购集团股份有限公司 A kind of data base processing method and system
CN111767364A (en) * 2019-03-26 2020-10-13 钉钉控股(开曼)有限公司 Data processing method, device and equipment
CN115344615A (en) * 2022-08-23 2022-11-15 中国民航信息网络股份有限公司 Information query method, system, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN115630400A (en) 2023-01-20

Similar Documents

Publication Publication Date Title
CN106997439B (en) TrustZone-based data encryption and decryption method and device and terminal equipment
CN106980794B (en) TrustZone-based file encryption and decryption method and device and terminal equipment
US9436839B2 (en) Tokenization using multiple reversible transformations
CN106529308B (en) data encryption method and device and mobile terminal
US11170128B2 (en) Information security using blockchains
CN106980793B (en) TrustZone-based universal password storage and reading method, device and terminal equipment
CN106452770B (en) Data encryption method, data decryption method, device and system
US20100014662A1 (en) Method, apparatus and computer program product for providing trusted storage of temporary subscriber data
US8621189B2 (en) System and method for hardware strengthened passwords
CN106992851B (en) TrustZone-based database file password encryption and decryption method and device and terminal equipment
CN111917540B (en) Data encryption and decryption method and device, mobile terminal and storage medium
US11658978B2 (en) Authentication using blockchains
US20230325516A1 (en) Method for file encryption, terminal, electronic device and computer-readable storage medium
US11184163B2 (en) Value comparison server, value comparison encryption system, and value comparison method
CN104468937A (en) Data encryption and decryption methods and devices for mobile terminal and protection system
WO2016144258A2 (en) Methods and systems for facilitating secured access to storage devices
CN115982761A (en) Sensitive information processing method and device, electronic equipment and storage medium
CN115694921B (en) Data storage method, device and medium
CN115630400B (en) Query method, device, equipment and storage medium for de-identified data
KR20150100602A (en) Data storing and reading methods, apparatuses and devices
EP2469441A1 (en) System and method for hardware strenghtened passwords
KR101444828B1 (en) Method for storing encrypted image and searching the image
US11914746B2 (en) Methods and systems for validating sensitive data in a distributed computing system without exposing the sensitive data
WO2018043466A1 (en) Data extraction system, data extraction method, registration device, and program
CN114462088A (en) Method and device for de-identifying shared data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: No. 333, Yunhua Road, high tech Zone, Chengdu, Sichuan 610041

Applicant after: China Electronics Technology Network Security Technology Co.,Ltd.

Address before: No. 333, Yunhua Road, high tech Zone, Chengdu, Sichuan 610041

Applicant before: CHENGDU WESTONE INFORMATION INDUSTRY Inc.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant