WO2022166829A1 - 一种数据遮掩、还原方法、系统以及计算机设备和介质 - Google Patents

一种数据遮掩、还原方法、系统以及计算机设备和介质 Download PDF

Info

Publication number
WO2022166829A1
WO2022166829A1 PCT/CN2022/074713 CN2022074713W WO2022166829A1 WO 2022166829 A1 WO2022166829 A1 WO 2022166829A1 CN 2022074713 W CN2022074713 W CN 2022074713W WO 2022166829 A1 WO2022166829 A1 WO 2022166829A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
field
encrypted
mask
module
Prior art date
Application number
PCT/CN2022/074713
Other languages
English (en)
French (fr)
Inventor
施瑜
刘源
Original Assignee
易保网络技术(上海)有限公司
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 易保网络技术(上海)有限公司 filed Critical 易保网络技术(上海)有限公司
Publication of WO2022166829A1 publication Critical patent/WO2022166829A1/zh

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/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
    • 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

Definitions

  • the present invention relates to the field of computer technology, and in particular, to a method, system, and related computer equipment and media for masking and restoring in data processing.
  • a data masking method wherein the data masking method includes: identifying a field to be encrypted in data; encrypting the to-be-encrypted field to obtain a first field; and using a mask The first field is masked to obtain update data including the mask, wherein the first field is associated with the update data.
  • the data is received from a front end of the network architecture.
  • the method further includes: judging whether the data belongs to sensitive data to be encrypted.
  • the method further comprises: storing and/or processing update data including the mask.
  • the method further comprises: storing and/or processing the encrypted first field.
  • the method further comprises: the first field is associated with the update data through a dynamic tag stored in the back end.
  • encrypting the to-be-encrypted field to obtain the first field includes: encrypting the to-be-encrypted field by using an AES algorithm.
  • a data restoration method includes: identifying a mask contained in data; obtaining a first field associated with the data; decrypting the first field; and replacing the decrypted first field with the mask contained in the data to restore unmasked data.
  • the method further comprises: acquiring the first field associated with the data including the mask by reading the dynamic tag stored in the backend.
  • the method further comprises: comparing the unmasked data with data of the same type received from the front end of the network architecture, and if the comparison results are different, using the received replace the unmasked data with data of the same type.
  • decrypting the first field includes: decrypting the first field by using an AES algorithm.
  • a data masking system includes: an identification module, the identification module identifies a field to be encrypted in the data; an encryption module, the encryption module encrypting the encrypted field to obtain a first field; and a masking module that masks the first field with a mask to obtain update data including the mask, wherein the first field is the same as the mask The update data is associated.
  • the data is received from the front end of the network architecture in the data masking system.
  • system further includes: a judgment module, the judgment module judges whether the data belongs to sensitive data to be encrypted.
  • system further comprises: a data processing module, the data processing module stores and/or processes the update data including the mask.
  • the data processing module further stores and/or processes the encrypted first field.
  • the first field is associated with the update data in the data masking system through a dynamic tag stored in the backend.
  • the encryption module encrypts the to-be-encrypted field by using the AES algorithm.
  • a data restoration system the system includes: an identification module, the identification module identifies a mask included in the data; an acquisition module, the acquisition module acquires and the data an associated first field; a decryption module that decrypts the first field; and a replacement module that replaces the decrypted first field with a mask contained in the data to restore to No mask data.
  • the system obtains the first field associated with the data containing the mask by reading a dynamic tag stored in the backend.
  • the system further includes a comparison module that compares the unmasked data with the same type of data received from the front end of the network architecture, If the comparison results are different, the unmasked data is replaced with the received data of the same type.
  • the decryption module uses an AES algorithm to decrypt the first field.
  • a computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing a computer program according to the present invention when the processor executes the program The steps of the method of the aspect.
  • a recording medium having stored thereon a computer program executed by a computer to implement the steps of the method according to an aspect of the present invention.
  • one or more embodiments of the present invention can obtain one or more of the following beneficial effects:
  • the data can be converted between masked and restored states to meet different processing requirements
  • the data of the back-end can be updated.
  • Figure 1 shows a data encryption method 1000 according to one embodiment of the present invention.
  • Figure 2 shows a data decryption method 2000 according to one embodiment of the present invention.
  • Figure 3 illustrates a data encryption system 3000 according to one embodiment of the present invention.
  • Figure 4 shows a data decryption system 4000 according to one embodiment of the present invention.
  • Figure 5 is an example block diagram 5000 of a computer device for the methods described herein, according to one embodiment of the invention.
  • These computer program instructions may be stored in a computer readable memory, the instructions may instruct a computer or other programmable processor to perform functions in a particular manner, such that the instructions stored in the computer readable memory constitute the flowcharts and/or A manufactured product of the instruction components for the function/operation specified in one or more of the blocks of the block diagram.
  • the present disclosure proposes a data encryption and decryption method, device, and computer medium.
  • the method, device and computer medium involved in the present invention can be used for transmission between the front end and the back end of the network architecture, wherein the front end of the network architecture includes but is not limited to the front end of the web page, the user interface, etc., and the back end of the network architecture includes but is not limited to Not limited to backend servers, databases, etc.
  • Figure 1 shows a data encryption method 1000 according to one embodiment of the present invention.
  • the data encryption method 1000 includes an optional decision step S101 (shown in dotted lines).
  • an optional determination step S101 it is determined whether the data belongs to sensitive data to be encrypted according to the data type. The judgment can be performed by the judgment module deployed in the front-end or the back-end, and the data type of the sensitive data can be defined by the user.
  • the data types include but are not limited to sensitive information such as mobile phone numbers, ID card numbers, and bank account numbers.
  • the method proceeds to the identifying step S102.
  • the fields to be encrypted in the data will be identified.
  • the fields to be encrypted can be defined by the user, and different fields to be encrypted can be set for different data types.
  • the 7-14 digits in the ID card number can be set to be encrypted, so as to prevent the user's birth date information from being exposed, and the 1-6 digits in the ID card number can also be set. Encryption is required to prevent the user's territorial information from being exposed.
  • the method proceeds to the encryption step S103.
  • the to-be-encrypted field identified in the step S104 is encrypted to obtain the first field, that is, the encrypted to-be-encrypted field.
  • Encryption may be performed in an encryption manner known in the art, such as AES encryption.
  • the key required for encryption can be a public key defined in the computer system or a custom key.
  • the method proceeds to masking step S104.
  • the first field is masked with a mask to obtain update data including the mask.
  • the partial field is replaced with a mask such as *code, #code to generate partially masked update data. Since the updated data still retains the data structure of the original data, such as the data bits of the original data, and part of the content of the original data, the data can be applied to the data processing of the back-end or database.
  • the key information of the data is masked, so that the user who uses the data cannot directly read the key information (such as birthday, place of origin, etc.) in the data, thereby preventing information leakage.
  • the first field is associated with the update data.
  • the masked data can be associated with the first field encrypted in step S103 through the method of dynamic labeling or recording, so that the replaced encrypted data can be found through the masked data in subsequent restoration. field, and replace the field decryption back into the data.
  • the method 1000 may further include a data processing step S105.
  • the update data obtained in the step S104 can be stored separately and other processing is performed on the data, such as sending to other locations for the user to call.
  • the encrypted first field obtained in step S103 may also be stored and processed, such as sent to other locations, for the user to call.
  • the update data and the encrypted first field may be stored in different locations, respectively, associated only by an associated tag. It is also possible to store the masked data and the encrypted fields in the same location so that both are read simultaneously on a restore read.
  • the AES encryption algorithm can be used for encryption, and other encryption algorithms known in the art can also be used to encrypt the field.
  • the encryption key can be a public key or a user-defined private key.
  • FIG. 2 shows a data restoration method 2000 according to an embodiment of the present invention.
  • the data restoration method 2000 begins with an identification step S201.
  • the identifying step S201 it can be identified whether a mask is included in the data. If a mask exists, it confirms that the data needs to be restored. Specifically, the mask contained in the data needs to be restored.
  • step S202 the first field associated with the data may be acquired.
  • the first field associated with the data may be obtained based on a dynamic tag or record.
  • the method 200 proceeds to the decryption step S203.
  • the first field may be decrypted.
  • Decryption can be performed using a decryption method corresponding to encryption.
  • the decryption can be decrypted with the AES algorithm.
  • the decryption key can be the corresponding public key, or it can be a user-defined private key in encryption.
  • the method 200 proceeds to a replacement step S204.
  • the decrypted first field may be replaced with the mask contained in the data to restore the data to unmasked data, thereby obtaining restored data.
  • the method 2000 may optionally include a comparison step.
  • the unmasked data is compared with the data of the same type received from the front end of the network architecture, and if the comparison results are different, it is considered that the data type (eg, user ID number)
  • the data is re-entered, replacing the unmasked data with the received data of the same type.
  • Figure 3 illustrates a data encryption system 3000 according to one embodiment of the present invention.
  • the data encryption system 300 includes an optional judgment module 301 (shown in dashed lines), an identification module 302, an encryption module 303, a masking module 304, and an optional data processing module 305 (shown in dashed lines) .
  • the judging module 301 judges whether the data belongs to the sensitive data to be encrypted according to the data type.
  • the judgment module 301 can be deployed in the front end or the back end, and the data type of the sensitive data can be defined by the user.
  • the data types include but are not limited to sensitive information such as mobile phone numbers, ID card numbers, and bank account numbers.
  • the identification module 302 identifies that there is a field to be encrypted in the data.
  • the fields to be encrypted can be defined by the user, and different fields to be encrypted can be set for different data types.
  • the 7-14 digits in the ID card number can be set to be encrypted, so as to prevent the user's birth date information from being exposed, and the 1-6 digits in the ID card number can also be set. Encryption is required to prevent the user's territorial information from being exposed.
  • the encryption module 303 encrypts the to-be-encrypted field identified in the identification module 302 to obtain the first field, that is, the encrypted to-be-encrypted field. Encryption may be performed in an encryption manner known in the art, such as AES encryption.
  • the key required for encryption can be a public key defined in the computer system or a custom key.
  • the masking module 304 masks the first field with a mask to obtain updated data including the mask. Specifically, the partial field is replaced with a mask such as *code, #code to generate partially masked update data. Since the updated data still retains the data structure of the original data, such as the data bits of the original data, and part of the content of the original data, the data can be applied to the data processing of the back-end or database. At the same time, the key information of the data is masked, so that the user who uses the data cannot directly read the key information (such as birthday, place of origin, etc.) in the data, thereby preventing information leakage.
  • a mask such as *code, #code
  • the first field is associated with the update data.
  • the masked data can be associated with the first field encrypted in the encryption module 303 by the method of dynamic labeling or recording, so that the replaced encryption can be found through the masked data in subsequent restoration. , and decrypt the fields and replace them back into the data.
  • the system 3000 may also include a data processing module 305 .
  • the data processing module 305 may separately store the updated data obtained in the masking module 304 and process the data, such as sending it to other locations, for user recall.
  • the encrypted first field obtained in the encryption module 303 can also be stored and processed, such as sent to other locations, for the user to call.
  • the update data and the encrypted first field may be stored in different locations, respectively, associated only by an associated tag. It is also possible to store the masked data and the encrypted fields in the same location so that both are read simultaneously on a restore read.
  • the AES encryption algorithm can be used for encryption, and other encryption algorithms known in the art can also be used to encrypt the field.
  • the encryption key can be a public key or a user-defined private key.
  • Figure 4 shows a data decryption system 4000 according to one embodiment of the present invention.
  • the data decryption system 4000 includes an identification module 401, an acquisition module 402, a decryption module 403, a replacement module 404, and an optional comparison module 405 (shown in dashed lines).
  • the identification module 401 it can be identified whether there is a mask in the data. If there are masked fields, confirm that the data needs to be restored. Specifically, the masks in the data need to be restored.
  • the first field associated with the data can be obtained.
  • the first field associated with the data may be obtained based on a dynamic tag or record.
  • the associated first field can be decrypted.
  • Decryption can be performed using a decryption method corresponding to encryption.
  • the decryption can be decrypted with the AES algorithm.
  • the decryption key can be the corresponding public key, or it can be a user-defined private key in encryption.
  • the decrypted first field may be replaced with a mask, thereby obtaining unmasked data.
  • system 4000 may optionally also include a comparison module.
  • the comparison module compares the unmasked data with data of the same type received from the front end of the network architecture, and if the comparison results are different, it is considered for that data type (eg, user ID number) re-entered the data, replacing the unmasked data with the received data of the same type.
  • data type eg, user ID number
  • the present invention is not limited to these embodiments, and the present invention can also be implemented in the following manner: a computer device for executing the above method or a computer device for executing the above method.
  • the above method is in the form of a computer program, or in the form of a computer program for realizing the functions of the above apparatus, or in the form of a computer-readable recording medium on which the computer program is recorded.
  • FIG. 5 shows a computer device used for the above-mentioned data encryption and decryption method according to an embodiment of the present invention.
  • computer device 5000 includes memory 501 and processor 502 .
  • computer device 5000 also includes a computer program stored on memory 501 and executable on processor 502 . When the processor executes the program, the steps shown in FIG. 1 and FIG. 2 are simultaneously implemented.
  • the present invention can also be implemented as a recording medium in which a program for causing a computer to execute the data encryption/decryption method as described above is stored.
  • disks for example, magnetic disks, optical disks, etc.
  • cards for example, memory cards, optical cards, etc.
  • semiconductor memories for example, ROM, nonvolatile memory, etc.
  • tapes etc.
  • Types eg, magnetic tapes, cassette tapes, etc.
  • the above-mentioned recording medium is loaded on the computer, the computer program recorded in the recording medium is read out by the computer and stored in the memory, the processors (CPU: Central Processing Unit), MPU: Micro Processing Unit (microprocessing unit) reads the computer program from the memory and executes it, thereby executing the data masking and restoring method in the above-mentioned embodiment and realizing the functions of the device of the data masking and restoring method in the above-mentioned embodiment.
  • CPU Central Processing Unit
  • MPU Micro Processing Unit

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)

Abstract

本公开提供了一种数据遮掩方法、系统以及计算机设备和介质,其中所述方法包括:识别数据中的待加密字段;将所述待加密字段进行加密,以获得第一字段;以及利用掩码将所述第一字段进行遮掩,以获得包含所述掩码的更新数据,其中,所述第一字段与所述更新数据相关联。

Description

一种数据遮掩、还原方法、系统以及计算机设备和介质 技术领域
本发明涉及计算机技术领域,具体而言,涉及数据处理中的遮掩、还原方法、系统以及相关联的计算机设备和介质。
背景技术
随着互联网应用的普及和人们对互联网的依赖,诸如手机号、身份证号等的客户敏感数据泄漏问题也日益凸显。近年来,常有新闻报道互联网公司,甚至一些传统行业的公司出现大范围敏感信息泄漏等数据安全问题,严重影响公司的形象,甚至导致严重的经营问题。
随着信息泄漏带来的影响不断发酵,数据安全的问题被越来越多的个人、企业以及政府所重视。相关法规和政策随之不断出台。数据泄漏不再只是影响个人的问题,已经严重危及到企业的生存和发展,甚至影响到行业前景。
通常情况下,为了保护数据的安全,当数据在客户端与服务器之间进行传输的过程中,都会采用加密的手段保护数据信息的安全。然而,加密后的数据往往不宜处理和识别。
因此,需要一种新的数据处理方法、设备及计算机介质,以提升数据的安全性。
发明内容
按照本发明的一个方面,提供了一种数据遮掩方法,其中所述数据遮掩方法包括:识别数据中的待加密字段;将所述待加密字段进行加密,以获得第一字段;以及利用掩码将所述第一字段进行遮掩,以获得包含所述掩码的更新数据,其中,所述第一字段与所述更新数据相关联。
进一步地,在根据本发明的一个方面中,在所述方法中所述数据是从网络架构的前端所接收的。
进一步地,在根据本发明的一个方面中,所述方法还包括:判断所述数据是否属于需加密的敏感数据。
进一步地,在根据本发明的一个方面中,所述方法还包括:存储和/或处理包含所述掩码的更新数据。
进一步地,在根据本发明的一个方面中,所述方法还包括:存储和/或处理加密的所述第一字段。
进一步地,在根据本发明的一个方面中,所述方法还包括:所述第一字段通过储存在 所述后端的动态标签与所述更新数据相关联。
进一步地,在根据本发明的一个方面中,将所述待加密字段进行加密,以获得第一字段包括:采用AES算法加密所述待加密字段。
按照本发明的另一个方面,提供了一种数据还原方法,其中所述方法包括:识别数据中包含的掩码;获取与所述数据相关联的第一字段;将所述第一字段解密;以及将解密的所述第一字段替换所述数据中包含的掩码以还原成无掩码数据。
进一步地,在根据本发明的另一个方面中,所述方法还包括:通过读取存储在后端的动态标签获取与包含掩码的所述数据相关联的第一字段。
进一步地,在根据本发明的另一个方面中,所述方法还包括:将所述无掩码数据与从网络架构的前端所接收的同类型数据进行比较,如果比较结果不同,则使用所接收的同类型数据替换所述无掩码数据。
进一步地,在根据本发明的另一个方面中,将所述第一字段解密包括:采用AES算法解密所述第一字段。
按照本发明的仍有另一个方面,提供了一种数据遮掩系统,其中所述系统包括:识别模块,所述识别模块识别数据中的待加密字段;加密模块,所述加密模块将所述待加密字段进行加密,以获得第一字段;以及遮掩模块,所述遮掩模块利用掩码将所述第一字段进行遮掩,以获得包含所述掩码的更新数据,其中,所述第一字段与所述更新数据相关联。
进一步地,在根据本发明的仍有另一个方面中,在所述数据遮掩系统中所述数据是从网络架构的前端所接收的。
进一步地,在根据本发明的仍有另一个方面中,所述系统还包括:判断模块,所述判断模块判断所述数据是否属于需加密的敏感数据。
进一步地,在根据本发明的仍有另一个方面中,所述系统还包括:数据处理模块,所述数据处理模块存储和/或处理包含所述掩码的更新数据。
进一步地,在根据本发明的仍有另一个方面中,所述数据处理模块还存储和/或处理加密的所述第一字段。
进一步地,在根据本发明的仍有另一个方面中,在数据遮掩系统中所述第一字段通过储存在所述后端的动态标签与所述更新数据相关联。
进一步地,在根据本发明的仍有另一个方面中,所述加密模块采用AES算法加密所述待加密字段。
按照本发明的还有另一个方面,提供了一种数据还原系统,所述系统包括:识别模 块,所述识别模块识别数据中包含的掩码;获取模块,所述获取模块获取与所述数据相关联的第一字段;解密模块,所述解密模块将所述第一字段解密;以及替换模块,所述替换模块将解密的所述第一字段替换所述数据中包含的掩码以还原成无掩码数据。
进一步地,在根据本发明的还有另一个方面中,所述系统通过读取存储在后端的动态标签获取与包含掩码的所述数据相关联的第一字段。
进一步地,在根据本发明的还有另一个方面中,所述系统还包括:比较模块,所述比较模块将所述无掩码数据与从网络架构的前端所接收的同类型数据进行比较,如果比较结果不同,则使用所接收的同类型数据替换所述无掩码数据。
进一步地,在根据本发明的还有另一个方面中,所述解密模块采用AES算法解密所述第一字段。
按照本发明的又一个方面,提供一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现根据本发明的一个方面的方法的步骤。
按照本发明的再一个方面,提供一种记录介质,其上存储有计算机程序,该程序被计算机执行以实现根据本发明的一个方面的方法的步骤。
相对于现有技术,本发明的一个或多个实施例可以获得如下有益效果的一个或多个:
1)通过使用遮掩的数据,数据可以在前端与后端的传输中保持隐蔽,从而避免泄露关键信息;
2)通过提供遮掩的数据,原有数据的数据结构被保持,由此可以在后端中对遮掩的数据进行处理;
3)通过将遮掩的数据和解密的字段组合,可以将数据在遮掩和还原状态中转换,以应对不同处理要求;
4)通过将后端还原的数据与从前端输入的数据进行比较,可以将更新后端的数据。
附图说明
图1示出了根据本发明的一个实施例的数据加密方法1000。
图2示出了根据本发明的一个实施例的数据解密方法2000。
图3示出了根据本发明的一个实施例的数据加密系统3000。
图4示出了根据本发明的一个实施例的数据解密系统4000。
图5是根据本发明的一个实施例的本文所述方法的计算机设备的示例框图5000。
具体实施方式
以下将结合附图对本发明涉及的数据加解密方法、设备以及计算机介质作进一步的详细描述。需要注意的是,以下的具体实施方式是示例性而非限制的,其旨在提供对本发明的基本了解,并不旨在确认本发明的关键或决定性的要素或限定所要保护的范围。
下文参考本发明实施例的方法和装置的框图说明、框图和/或流程图来描述本发明。将理解这些流程图说明和/或框图的每个框、以及流程图说明和/或框图的组合可以由计算机程序指令来实现。可以将这些计算机程序指令提供给通用计算机、专用计算机或其它可编程数据处理设备的处理器以构成机器,以便由计算机或其它可编程数据处理设备的处理器执行的这些指令创建用于实施这些流程图和/或框和/或一个或多个流程框图中指定的功能/操作的部件。
可以将这些计算机程序指令存储在计算机可读存储器中,这些指令可以指示计算机或其它可编程处理器以特定方式实现功能,以便存储在计算机可读存储器中的这些指令构成包含实施流程图和/或框图的一个或多个框中指定的功能/操作的指令部件的制作产品。
可以将这些计算机程序指令加载到计算机或其它可编程数据处理器上以使一系列的操作步骤在计算机或其它可编程处理器上执行,以便构成计算机实现的进程,以使计算机或其它可编程数据处理器上执行的这些指令提供用于实施此流程图和/或框图的一个或多个框中指定的功能或操作的步骤。还应该注意在一些备选实现中,框中所示的功能/操作可以不按流程图所示的次序来发生。例如,依次示出的两个框实际可以基本同时地执行或这些框有时可以按逆序执行,具体取决于所涉及的功能/操作。
如背景技术所述的,在现有的计算机网络架构中,敏感数据的传输并不安全。然而常规方法中对敏感数据进行加密的方法,使得加密后的密文无法被应用于计算机系统进行计算和应用。为了解决这个问题,本公开提出了一种数据加解密方法、设备以及计算机介质。本发明所涉及的方法、设备以及计算机介质可以用于网络架构的前端和后端之间的传输,其中网络架构的前端包括但不限于网页前台、用户界面等,并且网络架构的后端包括但不限于后台服务器、数据库等。
图1示出了根据本发明的一个实施例的数据加密方法1000。如图1中所示,数据加密方法1000包括可选的判断步骤S101(以虚线示出)。在可选的判断步骤S101中,根据数据类型判断数据是否属于需加密的敏感数据。判断可以由部署在前端或者后端的判断模块来执行,并且敏感数据的数据类型可以由用户自行定义。所述数据类型包括但不限于手机号码、身份证号码、银行账户号码等敏感信息。
在判断数据属于敏感数据需要加密后,方法进入识别步骤S102。在识别步骤S102中,将识别数据中的待加密字段。待加密字段可以由用户自行定义,其中,对不同数据类型可以设置不同的待加密字段。以示例的方式,对于身份证号码,可以设置身份证号码中的7-14位需要加密处理,从而防止用户的出生年月信息遭到暴露,同时也可以设置身份证号码中的1-6位需要加密处理,从而防止用户的属地信息遭到暴露。
在识别数据中的待加密字段后,方法进入加密步骤S103。在加密步骤S103中,将在步骤S104中识别的待加密字段进行加密,以获得第一字段,即,经过加密的待加密字段。加密可以以本领域公知的加密方式进行,诸如AES加密。加密所需密钥可以为定义在计算机系统内的公共密钥,也可以为自定义密钥。
在加密需加密的字段后,方法进入遮掩步骤S104。在遮掩步骤S104中,将利用掩码将所述第一字段进行遮掩,以获得包含所述掩码的更新数据。具体而言,用诸如*码、#码的掩码替换该部分字段,以生成部分遮掩的更新数据。由于更新数据仍保留了原数据的数据结构,例如原数据的数据位数,以及原数据的部分内容,因此该数据可以应用于后端或者数据库的数据处理。同时数据的关键信息被遮掩,使得使用数据的用户无法直接读取数据中的关键信息(诸如生日、属地等),从而防止信息泄露。
并且在遮掩步骤S104中,所述第一字段与所述更新数据相关联。可以通过动态标签或记录的方法,使经遮掩的所述数据与在步骤S103中加密的第一字段相关联,由此在后续的还原中可以通过经遮掩的所述数据找到所替换的加密的字段,并将字段解密替换回到数据中。
可选地,方法1000还可以包括数据处理步骤S105。在数据处理步骤S105中,可以单独存储在步骤S104中取得的更新数据并对该数据进行其他处理,诸如发送到其他位置以供使用者调用。也可以将步骤S103中取得的加密的第一字段存储并处理,诸如发送到其他位置,以供使用者调用。更新数据以及加密的第一字段可以分别存储于不同位置,仅通过相关联标签相关联。也可以将经遮掩的数据以及经加密的字段存储在同一位置,从而在还原读取是将两者同时读取。
在如上所述的加密中,可以使用AES加密算法进行加密,也可以使用其他本领域公知的加密算法对字段进行加密。在加密中,加密密钥可以是公共密钥,也可以是用户自定义的私有密钥。
图2示出了根据本发明的一个实施例的数据还原方法2000。如图2中所示,数据还原方法2000开始于识别步骤S201。在识别步骤S201中,可以识别数据中是否包含掩码。 如果存在掩码,则确认数据需要还原。具体而言,需要还原数据中所包含的掩码。
在识别数据中是否存在掩码后,方法200前进到获取步骤S202。在步骤S202中,可以获取与所述数据相关联的第一字段。可以基于动态标签或者记录来获取与所述数据相关联的第一字段。
在获取第一字段后,方法200前进到解密步骤S203。在解密步骤S203中,可以将第一字段解密。解密可以采用加密相对应的解密方法。以示例的方式,如果加密采用AES算法加密,则解密可以采用AES算法解密。在解密中,解密密钥可以是对应的公共密钥,也可以在加密中由用户自定义的私有密钥。
在解密第一字段后,方法200前进到替换步骤S204。在替换步骤S204中,可以将解密的所述第一字段替换所述数据中包含的掩码,以还原成无掩码数据,从而获得还原的数据。
此外,在得到无掩码数据后,方法2000还可选地可以包括比较步骤。在可选的比较步骤S205中,将所述无掩码数据与从网络架构的前端所接收的同类型数据进行比较,如果比较结果不同,则认为针对该数据类型(例如,用户身份证号码)重新输入了数据,从而使用所接收的同类型数据替换所述无掩码数据。
图3示出了根据本发明的一个实施例的数据加密系统3000。如图3中所示,数据加密系统300包括可选的判断模块301(以虚线示出)、识别模块302、加密模块303、遮掩模块304、可选的数据处理模块305(以虚线示出)。在可选的判断模块301中,判断模块301根据数据类型判断数据是否属于需加密的敏感数据。判断模块301可以部署在前端或者后端中,并且敏感数据的数据类型可以由用户自行定义。所述数据类型包括但不限于手机号码、身份证号码、银行账户号码等敏感信息。
在数据加密系统3000中,识别模块302识别数据中存在待加密字段。待加密字段可以由用户自行定义,其中,对不同数据类型可以设置不同的待加密字段。以示例的方式,对于身份证号码,可以设置身份证号码中的7-14位需要加密处理,从而防止用户的出生年月信息遭到暴露,同时也可以设置身份证号码中的1-6位需要加密处理,从而防止用户的属地信息遭到暴露。
在数据加密系统3000中,加密模块303将在识别模块302中识别的待加密字段进行加密,以获得第一字段,即,经过加密的待加密字段。加密可以以本领域公知的加密方式进行,诸如AES加密。加密所需密钥可以为定义在计算机系统内的公共密钥,也可以为自定义密钥。
在数据加密系统3000中,遮掩模块304中将利用掩码将所述第一字段进行遮掩,以获得包含所述掩码的更新数据。具体而言,用诸如*码、#码的掩码替换该部分字段,以生成部分遮掩的更新数据。由于更新数据仍保留了原数据的数据结构,例如原数据的数据位数,以及原数据的部分内容,因此该数据可以应用于后端或者数据库的数据处理。同时数据的关键信息被遮掩,使得使用数据的用户无法直接读取数据中的关键信息(诸如生日、属地等),从而防止信息泄露。
在数据加密系统3000中,所述第一字段与所述更新数据相关联。可以通过动态标签或记录的方法,使经遮掩的所述数据与在加密模块303中加密的第一字段相关联,由此在后续的还原中可以通过经遮掩的所述数据找到所替换的加密的字段,并将字段解密替换回到数据中。
可选地,系统3000还可以包括数据处理模块305。数据处理模块305可以单独存储在遮掩模块304中取得的更新数据并将该数据进行处理,诸如发送到其他位置,以供使用者调用。也可以将加密模块303中取得的加密的第一字段存储并处理,诸如发送到其他位置,以供使用者调用。更新数据以及加密的第一字段可以分别存储于不同位置,仅通过相关联标签相关联。也可以将经遮掩的数据以及经加密的字段存储在同一位置,从而在还原读取是将两者同时读取。
在如上所述的加密中,可以使用AES加密算法进行加密,也可以使用其他本领域公知的加密算法对字段进行加密。在加密中,加密密钥可以是公共密钥,也可以是用户自定义的私有密钥。
图4示出了根据本发明的一个实施例的数据解密系统4000。如图4中所示,数据解密系统4000包括识别模块401、获取模块402、解密模块403、替换模块404、可选的比较模块405(以虚线示出)。如图4中所示,在识别模块401中,可以识别数据中是否存在掩码。如果存在经遮掩的字段,则确认数据需要还原。具体而言,数据中的掩码需要还原。
在获取模块402中,可以获取与所述数据相关联的第一字段。可以基于动态标签或者记录来获取与所述数据相关联的第一字段。
在解密模块403中,可以将相关联的第一字段解密。解密可以采用加密相对应的解密方法。以示例的方式,如果加密采用AES算法加密,则解密可以采用AES算法解密。在解密中,解密密钥可以是对应的公共密钥,也可以在加密中由用户自定义的私有密钥。
在替换模块404中,可以将解密的所述第一字段替换掩码,从而得到无掩码数据。
此外,系统4000还可选地可以包括比较模块。在可选的比较模块405中,所述比较 模块将所述无掩码数据与从网络架构的前端所接收的同类型数据进行比较,如果比较结果不同,则认为针对该数据类型(例如,用户身份证号码)重新输入了数据,从而使用所接收的同类型数据替换所述无掩码数据。
虽然在此之前对数据遮掩和还原的方法的实施例进行了说明,但是本发明不限定于这些实施例,也可以将本发明实施为以下方式:用于执行上述方法的计算机设备或者用于执行上述方法的计算机程序的方式或者用于实现上述装置的功能的计算机程序的方式或者记录有该计算机程序的计算机可读取的记录介质的方式。
在图5中示出了根据本发明的一个实施例的用于如上所述的一种数据加解密方法的计算机设备。如图5中所示,计算机设备5000包括存储器501和处理器502。虽然未图示,但是计算机设备5000还包括存储在存储器501上并可在处理器502上运行的计算机程序。所述处理器执行所述程序时同时实现图1、图2所示的步骤。
另外,如上所述,本发明也可以被实施为一种记录介质,在其中存储有用于使计算机执行如上所述的数据加解密方法的程序。
在此,作为记录介质,能采用盘类(例如,磁盘、光盘等)、卡类(例如,存储卡、光卡等)、半导体存储器类(例如,ROM、非易失性存储器等)、带类(例如,磁带、盒式磁带等)等各种方式的记录介质。
通过在这些记录介质中记录使计算机执行上述实施例中的数据加解密方法的计算机程序或使计算机实现上述实施例中的数据加解密方法的功能的计算机程序并使其流通,从而能使成本的低廉化以及可携带性、通用性提高。
而且,在计算机上装载上述记录介质,由计算机读出在记录介质中记录的计算机程序并储存在存储器中,计算机所具备的处理器(CPU:Central Processing Unit(中央处理单元)、MPU:Micro Processing Unit(微处理单元))从存储器读出该计算机程序并执行,由此,能执行上述实施例中的数据遮掩、还原方法并能实现上述实施例中的数据遮掩、还原方法的装置的功能。
本领域普通技术人员应当了解,本发明不限定于上述的实施例,本发明可以在不偏离其主旨与范围内以许多其它的形式实施。因此,所展示的示例与实施例被视为示意性的而非限制性的,在不脱离如所附各权利要求所定义的本发明精神及范围的情况下,本发明可能涵盖各种的修改与替换。

Claims (24)

  1. 一种数据遮掩方法,其特征在于,所述方法包括:
    识别数据中的待加密字段;
    将所述待加密字段进行加密,以获得第一字段;以及
    利用掩码将所述第一字段进行遮掩,以获得包含所述掩码的更新数据,
    其中,所述第一字段与所述更新数据相关联。
  2. 根据权利要求1所述的方法,其中,所述数据是从网络架构的前端所接收的。
  3. 根据权利要求2所述的方法,其中,所述方法还包括:
    判断所述数据是否属于需加密的敏感数据。
  4. 根据权利要求3所述的方法,其中,所述方法还包括:
    存储和/或处理包含所述掩码的更新数据。
  5. 根据权利要求4所述的方法,其中,所述方法还包括:
    存储和/或处理加密的所述第一字段。
  6. 根据权利要求5所述的方法,其中,所述第一字段通过储存在所述后端的动态标签与所述更新数据相关联。
  7. 根据权利要求1-6中任一项所述的方法,其中,将所述待加密字段进行加密,以获得第一字段包括:
    采用AES算法来加密所述待加密字段。
  8. 一种数据还原方法,其特征在于,所述方法包括:
    识别数据中包含的掩码;
    获取与所述数据相关联的第一字段;
    将所述第一字段解密;以及
    将解密的所述第一字段替换所述数据中包含的掩码以还原成无掩码数据。
  9. 根据权利要求8所述的方法,其中,所述方法还包括:
    通过读取存储在后端的动态标签获取与包含掩码的所述数据相关联的第一字段。
  10. 根据权利要求10所述的方法,其中,所述方法还包括:
    将所述无掩码数据与从网络架构的前端所接收的同类型数据进行比较,如果比较结果不同,则使用所接收的同类型数据替换所述无掩码数据。
  11. 根据权利要求8-10中任一项所述的方法,其中,将所述第一字段解密包括:
    采用AES算法解密所述第一字段。
  12. 一种数据遮掩系统,其特征在于,所述系统包括:
    识别模块,所述识别模块识别数据中的待加密字段;
    加密模块,所述加密模块将所述待加密字段进行加密,以获得第一字段;以及
    遮掩模块,所述遮掩模块利用掩码将所述第一字段进行遮掩,以获得包含所述掩码的更新数据,其中,所述第一字段与所述更新数据相关联。
  13. 根据权利要求12所述的数据遮掩系统,其中,所述数据是从网络架构的前端所接收的。
  14. 根据权利要求13所述的数据遮掩系统,其中,所述系统还包括:
    判断模块,所述判断模块判断所述数据是否属于需加密的敏感数据。
  15. 根据权利要求14所述的数据遮掩系统,其中,所述系统还包括:
    数据处理模块,所述数据处理模块存储和/或处理包含所述掩码的更新数据。
  16. 根据权利要求15所述的数据遮掩系统,其中,所述数据处理模块还存储和/或处理加密的所述第一字段。
  17. 根据权利要求16所述的数据遮掩系统,其中,在数据遮掩系统中所述第一字段通过储存在所述后端的动态标签与所述更新数据相关联。
  18. 根据权利要求12-17中任一项所述数据遮掩系统,其中所述加密模块采用AES算法加密所述待加密字段。
  19. 一种数据还原系统,其特征在于,所述系统包括:
    识别模块,所述识别模块识别数据中包含的掩码;
    获取模块,所述获取模块获取与所述数据相关联的第一字段;
    解密模块,所述解密模块将所述第一字段解密;以及
    替换模块,所述替换模块将解密的所述第一字段替换所述数据中包含的掩码以还原成无掩码数据。
  20. 根据权利要求19所述的数据还原系统,其中,所述系统通过读取存储在后端的动态标签获取与包含掩码的所述数据相关联的第一字段。
  21. 根据权利要求20所述的数据还原系统,其中,所述系统还包括:
    比较模块,所述比较模块将所述无掩码数据与从网络架构的前端所接收的同类型数据进行比较,如果比较结果不同,则使用所接收的同类型数据替换所述无掩码数据。
  22. 根据权利要求19-21中任一项所述数据还原系统,其中,所述解密模块采用AES算法解密所述第一字段。
  23. 一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机 程序,其特征在于,所述处理器执行所述程序时实现根据权利要求1至11中任一项所述的方法的步骤。
  24. 一种记录介质,其上存储有计算机程序,其特征在于,该程序被计算机执行以实现根据权利要求1至11中任一项所述的方法的步骤。
PCT/CN2022/074713 2021-02-03 2022-01-28 一种数据遮掩、还原方法、系统以及计算机设备和介质 WO2022166829A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110146682.7 2021-02-03
CN202110146682.7A CN114861196A (zh) 2021-02-03 2021-02-03 一种数据遮掩、还原方法、系统以及计算机设备和介质

Publications (1)

Publication Number Publication Date
WO2022166829A1 true WO2022166829A1 (zh) 2022-08-11

Family

ID=82623115

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/074713 WO2022166829A1 (zh) 2021-02-03 2022-01-28 一种数据遮掩、还原方法、系统以及计算机设备和介质

Country Status (2)

Country Link
CN (1) CN114861196A (zh)
WO (1) WO2022166829A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130167192A1 (en) * 2011-12-27 2013-06-27 Wellpoint, Inc. Method and system for data pattern matching, masking and removal of sensitive data
CN107145799A (zh) * 2017-05-04 2017-09-08 山东浪潮云服务信息科技有限公司 一种数据脱敏方法及装置
CN107798253A (zh) * 2017-10-31 2018-03-13 新华三大数据技术有限公司 数据脱敏方法及装置
CN108289095A (zh) * 2018-01-02 2018-07-17 诚壹泰合(北京)科技有限公司 一种敏感数据存储方法、装置及系统
CN108549824A (zh) * 2018-04-17 2018-09-18 杭州橙鹰数据技术有限公司 一种数据脱敏方法及装置
CN110866281A (zh) * 2019-11-20 2020-03-06 满江(上海)软件科技有限公司 一种用于敏感数据的安全合规处理系统及方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130167192A1 (en) * 2011-12-27 2013-06-27 Wellpoint, Inc. Method and system for data pattern matching, masking and removal of sensitive data
CN107145799A (zh) * 2017-05-04 2017-09-08 山东浪潮云服务信息科技有限公司 一种数据脱敏方法及装置
CN107798253A (zh) * 2017-10-31 2018-03-13 新华三大数据技术有限公司 数据脱敏方法及装置
CN108289095A (zh) * 2018-01-02 2018-07-17 诚壹泰合(北京)科技有限公司 一种敏感数据存储方法、装置及系统
CN108549824A (zh) * 2018-04-17 2018-09-18 杭州橙鹰数据技术有限公司 一种数据脱敏方法及装置
CN110866281A (zh) * 2019-11-20 2020-03-06 满江(上海)软件科技有限公司 一种用于敏感数据的安全合规处理系统及方法

Also Published As

Publication number Publication date
CN114861196A (zh) 2022-08-05

Similar Documents

Publication Publication Date Title
JP6553819B2 (ja) 機密性を保持しつつ機密情報漏洩を検出するためのシステムおよび方法
US11398899B2 (en) Data processing device and data processing method
US10204227B2 (en) Privacy firewall
US9240883B2 (en) Multi-key cryptography for encrypting file system acceleration
TWI471754B (zh) 用於電腦系統中安全物件之支援
US20120321078A1 (en) Key rotation and selective re-encryption for data security
US7536549B2 (en) Methods for generating a partially encrypted and compressed database and decrypting and decompressing the database
KR101613146B1 (ko) 데이터베이스 암호화 방법
US20100054477A1 (en) Accelerated cryptography with an encryption attribute
AU2015249057B2 (en) Method and system for secure order management system data encryption, decryption, and segmentation
WO2022028289A1 (zh) 数据加密方法、数据解密方法、装置、终端和存储介质
US20080016127A1 (en) Utilizing software for backing up and recovering data
US7660423B2 (en) Method and apparatus for maintaining ephemeral keys in limited space
CN109274644A (zh) 一种数据处理方法、终端和水印服务器
CN109583218B (zh) 机密文件保护、定位方法、装置、设备及可读存储介质
CN106934299A (zh) 一种数据库加密系统和方法
CN111444520A (zh) 一种基于区块链的业务数据处理方法
CN112000978B (zh) 隐私数据的输出方法、数据处理系统及存储介质
JP2002351742A (ja) データ保護装置
CN105743906A (zh) 一种基于内容关联密钥的图片文件加解密方法及系统
JPH11272681A (ja) 個人情報の記録方法およびその記録媒体
CN101447013A (zh) 软件运行方法、装置及系统
WO2022166829A1 (zh) 一种数据遮掩、还原方法、系统以及计算机设备和介质
CN111666577A (zh) 一种数据解密方法、装置、设备及存储介质
CN103577771A (zh) 一种基于磁盘加密的虚拟桌面数据防泄漏保护技术

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22749108

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22749108

Country of ref document: EP

Kind code of ref document: A1