WO2020140616A1 - 一种数据加密方法和相关装置 - Google Patents

一种数据加密方法和相关装置 Download PDF

Info

Publication number
WO2020140616A1
WO2020140616A1 PCT/CN2019/117545 CN2019117545W WO2020140616A1 WO 2020140616 A1 WO2020140616 A1 WO 2020140616A1 CN 2019117545 W CN2019117545 W CN 2019117545W WO 2020140616 A1 WO2020140616 A1 WO 2020140616A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
preset rules
gray value
encryption
preset
Prior art date
Application number
PCT/CN2019/117545
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 WO2020140616A1 publication Critical patent/WO2020140616A1/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
    • 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

  • This application relates to the field of computer technology, in particular to a data encryption method and related device.
  • the embodiments of the present application disclose a data encryption method and related devices. Implementing the embodiments of the present application is beneficial to prevent data leakage.
  • a first aspect of an embodiment of the present application provides a data encryption method, including:
  • the original data is encrypted according to the encryption key and N encryption algorithms to obtain encrypted data, wherein the original data is obtained by the client from the storage volume of the client, and N is a positive integer.
  • a second aspect of an embodiment of the present application provides a data encryption device, including:
  • the sending module is used to send the key request to the key service center when receiving the encrypted instruction
  • a receiving module configured to receive a key request response for the key request sent by the key service center, where the key request response includes an encryption key
  • the encryption module is used to encrypt the original data according to the encryption key and N encryption algorithms to obtain encrypted data, wherein the original data is obtained by the client from the storage volume of the client, and N is Positive integer.
  • a third aspect of an embodiment of the present application provides a data encryption electronic device, including a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory, and It is configured to be executed by the processor to perform part or all of the steps including any one of the data encryption methods described in the above method embodiments.
  • a fourth aspect of the embodiments of the present application provides a computer-readable storage medium, where the computer-readable storage medium is used to store a computer program, and the stored computer program is executed by the processor to implement the method embodiment described above. Part or all steps of any data encryption method described.
  • the client when receiving the encryption instruction, the client sends a key request to the key service center, and when the key service center passes the identity authentication to the client, the encryption key is sent to the client.
  • the importance level of the original data is determined, thereby generating a data identifier that matches the importance level of the original data, and further, the encryption level of the original data is obtained.
  • the client selects N encryption algorithms matching the encryption level from the encryption algorithm database, and then encrypts the original data according to the encryption key and the N encryption algorithms to obtain encrypted data.
  • the client selectively uses N encryption algorithms to encrypt the original data according to the encryption level, providing a multi-layer protection mechanism for important data, preventing data leakage, and improving data security performance.
  • FIG. 1A is a schematic flowchart of a data encryption method according to an embodiment of this application.
  • FIG. 1B is a schematic structural diagram of a communication system according to an embodiment of the present application.
  • FIG. 2 is a schematic flowchart of another data encryption method according to an embodiment of the present application.
  • FIG. 3 is a schematic flowchart of another data encryption method according to an embodiment of the present application.
  • FIG. 4 is a schematic diagram of yet another data encryption device provided by an embodiment of this application.
  • FIG. 5 is a schematic structural diagram of a merchant node in a hardware operating environment according to an embodiment of this application.
  • FIG. 1A is a schematic flowchart of a data encryption method according to an embodiment of the present application.
  • the solution shown in FIG. 1A can be specifically implemented in the system shown in FIG. 1B.
  • a data encryption method provided by an embodiment of the present application may include:
  • the client When receiving the encryption instruction, the client sends a key request to the key service center.
  • the client receives a key request response to the key request sent by the key service center.
  • the key request response includes an encryption key.
  • the client encrypts the original data according to the encryption key and N encryption algorithms to obtain encrypted data.
  • the original data is obtained by the client from the storage volume of the client, and N is a positive integer.
  • N may be equal to 1, 2, 3, 5, 6, 11, 13, 20 or other values, for example.
  • the storage volume may include a storage area divided from a hard disk, for example.
  • the encryption algorithm may include, for example, a symmetric encryption algorithm and an asymmetric encryption algorithm.
  • FIG. 2 is a schematic flowchart of still another data encryption method according to another embodiment of the present application.
  • yet another data encryption method provided by another embodiment of the present application may include:
  • the client When receiving the encryption instruction, the client sends a key request to the key service center.
  • the key request carries identity authentication information of the client, where the identity authentication information of the client is used by the key service center to The client performs identity authentication.
  • the key service center constructs a communication channel to send the key request response to the client through the communication channel.
  • the identity authentication information may be, for example, the identity identifier assigned to the client by the key service center.
  • the client receives a key request response to the key request sent by the key service center.
  • the key request response includes an encryption key.
  • the client sets M preset rules.
  • M is a positive integer.
  • M can be equal to 1, 2, 3, 5, 6, 11, 13, 20 or other values, for example.
  • the preset rules may include regular expressions, for example.
  • the client uses the M preset rules to detect the original data to determine that the original data meets the K preset rules among the M preset rules.
  • K is a positive integer, M ⁇ K.
  • K may be equal to 1, 2, 3, 5, 6, 11, 13, 20 or other values, for example.
  • the original data includes video data
  • the M preset rules are used to detect the original data to determine that the original data satisfies the M presets
  • the M preset rules detect each data set in the Q data sets to determine that the Q data sets satisfy the K preset rules of the M preset rules in total.
  • L may be equal to 1, 2, 3, 5, 6, 11, 13, 20 or other values, for example.
  • Q may be equal to 1, 2, 3, 5, 6, 11, 13, 20 or other values, for example.
  • i may be equal to 1, 2, 3, 5, 6, 11, 13, 20 or other values, for example.
  • the preset rules that the original data meets are determined to prepare for the subsequent determination of the importance level of the original data according to the number of preset rules.
  • the extracting the data of each of the L image frames to obtain Q data sets includes: for each of the L image frames Image frames perform the first preset operation to obtain the Q data sets; the first preset operation includes the following steps: acquiring the currently processed image frame; determining the first corresponding to the currently processed image frame A matrix, the first matrix includes a gray value corresponding to each pixel in the image frame currently processed; at least one gray value in the first matrix that is the same as a preset first gray value; determined Adjacent gray values of each gray value in the first matrix in the at least one gray value; determining whether each gray value in the at least one gray value is equal to the at least one gray value The adjacent gray value corresponding to each gray value in the satisfies the preset first formula; if so, the adjacent gray corresponding to each gray value in the at least one gray value in the first matrix The degree value is deleted to obtain a second matrix; the second matrix is set to the data set corresponding to the currently processed image frame.
  • the preset first gray value may be set by an administrator, or may be configured in the configuration file of the client.
  • the preset first formula is Wherein, x may be one gray value in the at least one gray value, or may be an adjacent gray value corresponding to each gray value in the at least one gray value, and a is a non-zero integer.
  • the method further includes: if not, determining each gray value in the at least one gray value and each gray value in the at least one gray value The difference between adjacent grayscale values corresponding to the degree value to obtain multiple grayscale differences; selecting at least one grayscale whose grayscale difference is less than the preset grayscale difference from the multiple grayscale differences Degree difference; delete the gray value in the first matrix according to the at least one gray difference to obtain a third matrix; set the third matrix to the data corresponding to the currently processed image frame set.
  • the M preset rules are used to detect each of the Q data sets to determine that the Q data sets satisfy the M
  • the K preset rules in the preset rules include: using the M preset rules to detect each data set in the Q data sets, if there is only one data set in the Q data sets Satisfying the K preset rules among the M preset rules, then the Q data sets satisfy the K preset rules in total; or, the M preset rules are used for the Q preset rules
  • the E preset rules are different from any of the F preset rules.
  • R may be equal to 1, 2, 3, 5, 6, 11, 13, 20 or other values.
  • S may be equal to 1, 2, 3, 5, 6, 11, 13, 20 or other values, for example.
  • E may be equal to 1, 2, 3, 5, 6, 11, 13, 20 or other values, for example.
  • F may be equal to 1, 2, 3, 5, 6, 11, 13, 20 or other values, for example.
  • the client determines the importance level of the original data.
  • the importance level of the original data is proportional to the number of the original data satisfying preset rules.
  • the determining the importance level of the original data wherein the importance level of the original data is proportional to the number of the original data satisfying preset rules
  • the method includes: determining the importance level of the Q data sets, wherein the importance level of the Q data sets is proportional to the number of the Q data sets that satisfy preset rules;
  • Q ⁇ K the preset ratio is equal to (KQ)/K.
  • the client generates a data identifier that matches the importance level of the original data.
  • the data identification is used to identify the original data.
  • the client obtains the encryption level J matching the data identifier from the encryption level database.
  • J is a positive integer.
  • J may be equal to 1, 2, 3, 5, 6, 11, 13, 20 or other values, for example.
  • the client selects the N encryption algorithms that match the encryption level J from the encryption algorithm database.
  • N J.
  • the client encrypts the original data according to the encryption key and N encryption algorithms to obtain encrypted data.
  • the original data is obtained by the client from the storage volume of the client, and N is a positive integer.
  • N may be equal to 1, 2, 3, 5, 6, 11, 13, 20 or other values, for example.
  • the storage volume may include a storage area divided from a hard disk, for example.
  • the encryption algorithm may include, for example, a symmetric encryption algorithm and an asymmetric encryption algorithm.
  • the encrypting the original data according to the encryption key and the N encryption algorithms to obtain encrypted data includes: according to the encryption key and the N The encryption algorithm encrypts the L image frames to obtain L encrypted image frames; the L encrypted image frames are synthesized to form encrypted video data.
  • FIG. 3 is a schematic flowchart of another data encryption method according to another embodiment of the present application.
  • yet another data encryption method provided by another embodiment of the present application may include:
  • the client When receiving the encryption instruction, the client sends a key request to the key service center.
  • the key request carries identity authentication information of the client, where the identity authentication information of the client is used by the key service center to The client performs identity authentication.
  • the key service center constructs a communication channel to send the key request response to the client through the communication channel.
  • the identity authentication information may be, for example, the identity identifier assigned to the client by the key service center.
  • the client receives a key request response to the key request sent by the key service center.
  • the key request response includes an encryption key.
  • the client sets M preset rules.
  • M is a positive integer.
  • M can be equal to 1, 2, 3, 5, 6, 11, 13, 20 or other values, for example.
  • the preset rules may include regular expressions, for example.
  • the client uses the M preset rules to detect the original data to determine that the original data meets the K preset rules among the M preset rules.
  • K is a positive integer, M ⁇ K.
  • K may be equal to 1, 2, 3, 5, 6, 11, 13, 20 or other values, for example.
  • the original data includes video data
  • the M preset rules are used to detect the original data to determine that the original data meets the M
  • L may be equal to 1, 2, 3, 5, 6, 11, 13, 20 or other values, for example.
  • Q may be equal to 1, 2, 3, 5, 6, 11, 13, 20 or other values, for example.
  • i may be equal to 1, 2, 3, 5, 6, 11, 13, 20 or other values, for example.
  • the preset rules that the original data meets are determined to prepare for the subsequent determination of the importance level of the original data according to the number of preset rules.
  • the extracting the data of each of the L image frames to obtain Q data sets includes: for each of the L image frames Image frames perform the first preset operation to obtain the Q data sets; the first preset operation includes the following steps: acquiring the currently processed image frame; determining the first corresponding to the currently processed image frame A matrix, the first matrix includes a gray value corresponding to each pixel in the image frame currently processed; at least one gray value in the first matrix that is the same as a preset first gray value; determined Adjacent gray values of each gray value in the first matrix in the at least one gray value; determining whether each gray value in the at least one gray value is equal to the at least one gray value The adjacent gray value corresponding to each gray value in the satisfies the preset first formula; if so, the adjacent gray corresponding to each gray value in the at least one gray value in the first matrix The degree value is deleted to obtain a second matrix; the second matrix is set to the data set corresponding to the currently processed image frame.
  • the preset first gray value may be set by an administrator, or may be configured in the configuration file of the client.
  • the preset first formula is Wherein, x may be one gray value in the at least one gray value, or may be an adjacent gray value corresponding to each gray value in the at least one gray value, and a is a non-zero integer.
  • the method further includes: if not, determining each gray value in the at least one gray value and each gray value in the at least one gray value The difference between adjacent grayscale values corresponding to the degree value to obtain multiple grayscale differences; selecting at least one grayscale whose grayscale difference is less than the preset grayscale difference from the multiple grayscale differences Degree difference; delete the gray value in the first matrix according to the at least one gray difference to obtain a third matrix; set the third matrix to the data corresponding to the currently processed image frame set.
  • the M preset rules are used to detect each of the Q data sets to determine that the Q data sets meet the M
  • the K preset rules in the preset rules include: using the M preset rules to detect each data set in the Q data sets, if there is only one data set in the Q data sets Satisfying the K preset rules among the M preset rules, then the Q data sets satisfy the K preset rules in total; or, the M preset rules are used for the Q preset rules
  • the E preset rules are different from any of the F preset rules.
  • R may be equal to 1, 2, 3, 5, 6, 11, 13, 20 or other values.
  • S may be equal to 1, 2, 3, 5, 6, 11, 13, 20 or other values, for example.
  • E may be equal to 1, 2, 3, 5, 6, 11, 13, 20 or other values, for example.
  • F may be equal to 1, 2, 3, 5, 6, 11, 13, 20 or other values, for example.
  • the original data includes document data
  • the M preset rules are used to detect the original data to determine that the original data meets the M
  • the K preset rules in the preset rules include: parsing the document data to obtain T fields, where T is a positive integer; and comparing the T fields with the H preset fields to obtain Compare the successful G key fields, where H and G are positive integers, T ⁇ H, G ⁇ T; extract the data of each key field of the G key fields to obtain G data sets , Where the i-th data set in the G data sets corresponds to the i-th key field in the G key fields; the M preset rules are used for each of the G data sets The data sets are tested to determine that the G data sets satisfy the K preset rules among the M preset rules.
  • T can be equal to 1, 2, 3, 5, 6, 11, 13, 20 or other values, for example.
  • H may be equal to 1, 2, 3, 5, 6, 11, 13, 20 or other values, for example.
  • G may be equal to 1, 2, 3, 5, 6, 11, 13, 20 or other values, for example.
  • the preset rules that the original data meets are determined to prepare for the subsequent determination of the importance level of the original data according to the number of preset rules.
  • the client determines the importance level of the original data.
  • the importance level of the original data is proportional to the number of the original data satisfying preset rules.
  • the determining the importance level of the original data wherein the importance level of the original data is proportional to the number of the original data satisfying preset rules
  • the method includes: determining the importance level of the Q data sets, wherein the importance level of the Q data sets is proportional to the number of the Q data sets that satisfy preset rules;
  • Q ⁇ K the preset ratio is equal to (KQ)/K.
  • the client generates a data identifier that matches the importance level of the original data.
  • the data identification is used to identify the original data.
  • the client obtains the encryption level J matching the data identifier from the encryption level database.
  • J is a positive integer.
  • J may be equal to 1, 2, 3, 5, 6, 11, 13, 20 or other values, for example.
  • the client selects the N encryption algorithms that match the encryption level J from the encryption algorithm database.
  • N J.
  • the client encrypts the L image frames according to the encryption key and N encryption algorithms to obtain L encrypted image frames.
  • the original data is obtained by the client from the storage volume of the client, and N is a positive integer.
  • the original data includes video data.
  • N may be equal to 1, 2, 3, 5, 6, 11, 13, 20 or other values, for example.
  • the storage volume may include a storage area divided from a hard disk, for example.
  • the encryption algorithm may include, for example, a symmetric encryption algorithm and an asymmetric encryption algorithm.
  • the client synthesizes the L encrypted image frames to form encrypted video data.
  • FIG. 4 is a schematic diagram of a data encryption device according to an embodiment of the present application.
  • a data encryption device 400 provided by an embodiment of the present application may include:
  • the sending module 401 is used for sending a key request to the key service center when receiving the encryption instruction.
  • the key request carries the identity authentication information of the client, wherein the identity authentication information of the client is used for the identity authentication of the client by the key service center, and when the identity authentication is passed,
  • the key service center constructs a communication channel to send the key request response to the client through the communication channel.
  • the receiving module 402 is configured to receive a key request response for the key request sent by the key service center.
  • the key request response includes an encryption key.
  • the encryption module 403 is configured to encrypt the original data according to the encryption key and N encryption algorithms to obtain encrypted data.
  • the original data is obtained by the client from the storage volume of the client, and N is a positive integer.
  • N may be equal to 1, 2, 3, 5, 6, 11, 13, 20 or other values, for example.
  • the storage volume may include a storage area divided from a hard disk, for example.
  • the encryption algorithm may include, for example, a symmetric encryption algorithm and an asymmetric encryption algorithm.
  • the device further includes a processing device configured to set M preset rules, where M is a positive integer; the M preset rules are used to detect the original data to determine The original data satisfies K preset rules out of the M preset rules, where K is a positive integer and M ⁇ K; the importance level of the original data is determined, where the importance level of the original data is The number of the original data satisfying the preset rules is proportional to; the number of data that matches the importance level of the original data is generated, wherein the data identifier is used to identify the original data; and the data is obtained from the encryption level database.
  • the original data includes video data
  • the processing device is specifically configured to perform a first preset operation on each of the L image frames to obtain the Q data sets;
  • the first preset operation includes the following steps:
  • the processing device is specifically configured to determine, if not, each gray value in the at least one gray value and an adjacent gray corresponding to each gray value in the at least one gray value The difference between the degree values to obtain a plurality of grayscale difference values; selecting at least one grayscale difference value whose grayscale difference value is less than a preset grayscale difference value from the plurality of grayscale difference values; according to the At least one gray scale difference value is deleted from the first matrix to obtain a third matrix; and the third matrix is set to a data set corresponding to the currently processed image frame.
  • the encryption module is specifically configured to encrypt the L image frames according to the encryption key and N encryption algorithms to obtain L encrypted image frames; and perform the L encrypted image frames Synthesize to form encrypted video data.
  • An embodiment of the present application also provides an electronic device with data encryption, which is characterized by including a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory And is configured to be executed by the processor to perform part or all of the steps including any one of the data encryption methods described in the above method embodiments.
  • Embodiments of the present application further provide a computer-readable storage medium, where the computer-readable storage medium may store a program to implement part or all of the steps including any one of the data encryption methods described in the foregoing method embodiments.
  • FIG. 5 is a schematic structural diagram of a merchant node in a hardware operating environment according to an embodiment of the present application.
  • An embodiment of the present application provides an electronic device for data encryption, including a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and are configured by The processor executes instructions to execute steps in any method of data encryption.
  • the merchant node of the hardware operating environment involved in the embodiments of the present application may include:
  • the processor 501 for example, a CPU.
  • the memory 502 is optional.
  • the memory may be a high-speed RAM memory or a stable memory, such as a disk memory.
  • the communication interface 503 is used to implement connection communication between the processor 501 and the memory 502.
  • the structure of the merchant node shown in FIG. 5 does not constitute a limitation on it, and may include more or less components than those illustrated, or combine certain components, or arrange different components.
  • the memory 502 may include an operating system, a network communication module, and a data processing program.
  • the operating system is a program that manages and controls the hardware and software resources of merchant nodes, and supports the operation of personnel-managed programs and other software or programs.
  • the network communication module is used to implement communication between various components within the memory 502 and other hardware and software within the merchant node.
  • the processor 501 is used to execute the personnel management program stored in the memory 502 to realize the following steps:
  • the original data is encrypted according to the encryption key and N encryption algorithms to obtain encrypted data, wherein the original data is obtained by the client from the storage volume of the client, and N is a positive integer.
  • the present application also provides a computer-readable storage medium, which is used to store a computer program, and the stored computer program is executed by the processor to implement the following steps:
  • the original data is encrypted according to the encryption key and N encryption algorithms to obtain encrypted data, wherein the original data is obtained by the client from the storage volume of the client, and N is a positive integer.
  • the disclosed device may be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of the modules is only a division of logical functions.
  • there may be other divisions for example, multiple modules or components may be combined or may Integration into another system, or some features can be ignored, or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be electrical or other forms.
  • modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module.
  • the above integrated modules can be implemented in the form of hardware or software function modules.
  • the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may be stored in a computer-readable storage medium.
  • the technical solution of the present application may be essentially or part of the contribution to the existing technology or all or part of the technical solution may be embodied in the form of a software product, and the computer software product is stored in a storage
  • the medium includes several instructions to enable a computer device (which may be a personal computer, a merchant node or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application.
  • the aforementioned storage media include: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program code .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Bioethics (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Storage Device Security (AREA)

Abstract

一种数据加密方法和相关装置,涉及信息加解密。所述方法包括:在接收加密指令时,向密钥服务中心发送密钥请求;接收所述密钥服务中心发送的针对所述密钥请求的密钥请求响应,其中,所述密钥请求响应包括加密密钥;根据所述加密密钥和N个加密算法对原始数据进行加密,以得到加密数据,其中,所述原始数据由客户端从所述客户端的存储卷中获得,N为正整数。实施该方法有利于防止数据泄露。

Description

一种数据加密方法和相关装置
本申请要求于2019年1月04日提交中国专利局、申请号为2019100076893、申请名称为“一种数据加密方法和相关装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机技术领域,尤其涉及一种数据加密方法和相关装置。
背景技术
随着互联网企业的高速发展,在企业业务系统产生的数据越来越多的同时,企业对数据存储的要求越来越高。因此,为了保证数据的稳定性和网络处理速度的快捷性,目前,大多数网络由传统的集中式网络计算模型过渡到了分布式和协作式网络计算模型。分布式和协作式网络计算模型不仅保证了性能和容量能够同时拓展,系统规模具有很强的伸缩性,还提高了系统的可靠性、可用性和存取效率。
然而随着分布式云存储系统推广应用,在将数据分布到多台服务器时,如何保证数据的安全性,越来越受用户的关注。在传统的技术方案中,通常是在客户端打开存储卷时,再进行数据的读写。然而,只要能够打开存储卷,无论任何人,都可以获取存储卷中未加密的数据。因此,如果遇到系统被黑客入侵的情况,那么存储卷可能会被打开,从而导致数据泄露。
发明内容
本申请实施例公开了一种数据加密方法和相关装置,实施本申请实施例,有利于防止数据泄露。
本申请实施例第一方面提供了一种数据加密方法,包括:
在接收加密指令时,向密钥服务中心发送密钥请求;
接收所述密钥服务中心发送的针对所述密钥请求的密钥请求响应,其中,所述密钥请求响应包括加密密钥;
根据所述加密密钥和N个加密算法对原始数据进行加密,以得到加密数据,其中,所述原始数据由所述客户端从所述客户端的存储卷中获得,N为正整数。
本申请实施例第二方面提供了一种数据加密装置,包括:
发送模块,用于在接收加密指令时,向密钥服务中心发送密钥请求;
接收模块,用于接收所述密钥服务中心发送的针对所述密钥请求的密钥请求响应,其中,所述密钥请求响应包括加密密钥;
加密模块,用于根据所述加密密钥和N个加密算法对原始数据进行加密,以得到加密数据,其中,所述原始数据由所述客户端从所述客户端的存储卷中获得,N为正整数。
本申请实施例第三方面提供了一种数据加密的电子设备,包括处理器、存储器、通信接口以及一个或多个程序,其中,所述一个或多个程序被存储在所述存储器中,并且被配置由所述处理器执行,以执行包括上述方法实施例中记载的任何一种数据加密方法的部分或全部步骤。
本申请实施例第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质用于存储计算机程序,所述存储计算机程序被所述处理器执行,以实现包括上述方法实施例中记载的任何一种数据加密方法的部分或全部步骤。
可以看出,上述技术方案中,在接收加密指令时,客户端向密钥服务中心发送密钥请求,当密钥服务中心对客户端进行身份认证通过时,向客户端发送加密密钥。接着,确定原始数据的重要级别,从而生成与原始数据的重要级别匹配的数据标识,进而,得到原始数据的加密等级。然后,客户端从加密算法数据库中选取与加密等级匹配的N个加密算法,进而,根据加密密钥和N个加密算法对原始数据进行加密,以得到加密数据。通过客户端根据加密等级有选择性的采用N个加密算法对原始数据进行加密,为重要数据提供多层保护机制,防止数据泄露,提升数据的安全性能。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
其中:
图1A为本申请实施例提供的一种数据加密方法的流程示意图;
图1B为本申请实施例提供的一种通信系统的架构示意图;
图2为本申请实施例提供的又一种数据加密方法的流程示意图;
图3为本申请实施例提供的又一种数据加密方法的流程示意图;
图4为本申请实施例提供的又一种数据加密装置的示意图;
图5为本申请的实施例涉及的硬件运行环境的商家节点结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
以下分别进行详细说明。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。
首先,参见图1A和图1B,图1A为本申请的一个实施例提供的一种数据加密方法的流程示意图。图1A所示方案可在图1B所示架构的系统中来具体的实施例。其中,如图1A所示,本申请的一个实施例提供的一种数据加密方法可以包括:
101、在接收加密指令时,客户端向密钥服务中心发送密钥请求。
102、客户端接收所述密钥服务中心发送的针对所述密钥请求的密钥请求响 应。
其中,所述密钥请求响应包括加密密钥。
103、客户端根据所述加密密钥和N个加密算法对原始数据进行加密,以得到加密数据。
其中,所述原始数据由所述客户端从所述客户端的存储卷中获得,N为正整数。
其中,N例如可等于1、2、3、5、6、11、13、20或其他值。
其中,存储卷例如可以包括从硬盘划分的存储区域。
其中,加密算法例如可以包括对称加密算法和非对称加密算法。
参见图2,图2为本申请的又一个实施例提供的又一种数据加密方法的流程示意图。其中,如图2所示,本申请的又一个实施例提供的又一种数据加密方法可以包括:
201、在接收加密指令时,客户端向密钥服务中心发送密钥请求。
可选的,在本申请的一种可能的实施方式中,所述密钥请求携带所述客户端的身份认证信息,其中,所述客户端的身份认证信息用于所述密钥服务中心对所述客户端进行身份认证,在所述身份认证通过时,所述密钥服务中心构建通信通道,以通过所述通信通道向所述客户端发送所述密钥请求响应。
其中,身份认证信息例如可以为所述密钥服务中心分配给所述客户端的身份标识。
可以看出,上述方案中,提高了信息安全性。
202、客户端接收所述密钥服务中心发送的针对所述密钥请求的密钥请求响应。
其中,所述密钥请求响应包括加密密钥。
203、客户端设置M个预设规则。
其中,M为正整数。
其中,M例如可等于1、2、3、5、6、11、13、20或其他值。
其中,预设规则例如可以包括正则表达式。
204、客户端采用所述M个预设规则对所述原始数据进行检测以确定所述原始数据满足所述M个预设规则中的K个预设规则。
其中,K为正整数,M≥K。
其中,K例如可等于1、2、3、5、6、11、13、20或其他值。
可选的,在一种可能的实施方式中,所述原始数据包括视频数据,所述采用所述M个预设规则对所述原始数据进行检测以确定所述原始数据满足所述M个预设规则中的K个预设规则,包括:对所述视频数据进行解析,以得到L个图像帧,其中,L为正整数;提取所述L个图像帧中的每个图像帧的数据,以得到Q个数据集,其中,所述Q个数据集中的第i个数据集与所述L个图像帧中的第i个图像帧对应,Q和i均为正整数,Q=L;采用所述M个预设规则对所述Q个数据集中的每个数据集进行检测以确定所述Q个数据集一共满足所述M个预设规则中的所述K个预设规则。
其中,L例如可等于1、2、3、5、6、11、13、20或其他值。
其中,Q例如可等于1、2、3、5、6、11、13、20或其他值。
其中,i例如可等于1、2、3、5、6、11、13、20或其他值。
可以看出,上述技术方案中,实现了确定原始数据所满足的预设规则,从而为后续根据预设规则的个数确定原始数据的重要级别做准备。
可选的,在一种可能的实施方式中,所述提取所述L个图像帧中的每个图像帧的数据,以得到Q个数据集,包括:针对所述L个图像帧中的每个图像帧执行第一预设操作,以得到所述Q个数据集;所述第一预设操作包括以下步骤:获取当前处理的图像帧;确定当前处理的所述图像帧所对应的第一矩阵,所述第一矩阵包括当前处理的所述图像帧中每个像素点对应的灰度值;将所述第一矩阵中与预设第一灰度值相同的至少一个灰度值;确定所述至少一个灰度值中每个灰度值在所述第一矩阵中的相邻灰度值;确定所述至少一个灰度值中每个灰度值是否与所述至少一个灰度值中每个灰度值对应的相邻灰度值满足预设第一公式;若是,则在所述第一矩阵中将与所述至少一个灰度值中每个灰度值对应的相邻灰度值删除,以得到第二矩阵;将所述第二矩阵设置为当前处理的所述图像帧所对应的数据集。
其中,预设第一灰度值可以由管理员设置,也可以配置在客户端的配置文件中。
其中,预设第一公式为
Figure PCTCN2019117545-appb-000001
其中,x可以为所述至少一个灰度值中一个灰度值,也可以为与所述至少一个灰度值中每个灰度值对应的相邻灰度值,a为非零整数。
可以看出,上述技术方案中,减少了数据集中的数据,降低了采用M个预设规则对数据集进行检测时的检测复杂度。
可选的,在一种可能的实施方式中,所述方法还包括:若否,则确定所述至少一个灰度值中的每个灰度值与所述至少一个灰度值中每个灰度值对应的相邻灰度值之间的差值,以得到多个灰度差值;从所述多个灰度差值中选取灰度差值小于预设灰度差值的至少一个灰度差值;根据所述至少一个灰度差值在所述第一矩阵中删除灰度值,以得到第三矩阵;将所述第三矩阵设置为当前处理的所述图像帧所对应的数据集。
可以看出,上述技术方案中,减少了数据集中的数据,降低了采用M个预设规则对数据集进行检测时的检测复杂度。
可选的,在一种可能的实施方式中,所述采用所述M个预设规则对所述Q个数据集中的每个数据集进行检测以确定所述Q个数据集一共满足所述M个预设规则中的所述K个预设规则,包括:采用所述M个预设规则对所述Q个数据集中的每个数据集进行检测,若所述Q个数据集中只有一个数据集满足所述M个预设规则中的所述K个预设规则,则所述Q个数据集一共满足所述K个预设规则;或者,采用所述M个预设规则对所述Q个数据集中的每个数据集进行检测,若所述Q个数据集中的R个数据集满足所述M个预设规则中的E个预设规则,所述Q个数据集中的S个数据集满足所述M个预设规则中的F个预设规则,则所述Q个数据集一共满足所述K个预设规则,其中,K=E+F,R、S、E和F 为正整数,所述E个预设规则不同于所述F个预设规则中的任一一个。
其中,R例如可等于1、2、3、5、6、11、13、20或其他值。
其中,S例如可等于1、2、3、5、6、11、13、20或其他值。
其中,E例如可等于1、2、3、5、6、11、13、20或其他值。
其中,F例如可等于1、2、3、5、6、11、13、20或其他值。
可以看出,上述技术方案中,实现了确定数据集满足预设规则。
205、客户端确定所述原始数据的重要级别。
其中,所述原始数据的重要级别与所述原始数据满足预设规则的个数成正比。
可选的,在本申请一种可能的实施方式中,所述确定所述原始数据的重要级别,其中,所述原始数据的重要级别与所述原始数据满足预设规则的个数成正比,包括:确定所述Q个数据集的重要级别,其中,所述Q个数据集的重要级别与所述Q个数据集满足预设规则的个数成正比;按照预设比例将所述Q个数据集的重要级别进行处理,以得到所述视频数据的重要级别,其中,在Q>K时,所述预设比例等于(Q-K)/K,在Q=K时,所述预设比例等于1,在Q<K时,所述预设比例等于(K-Q)/K。
可以看出,上述技术方案中,实现了重要级别的确定。
206、客户端生成与所述原始数据的重要级别匹配的数据标识。
其中,所述数据标识用于标识所述原始数据。
207、客户端从加密等级数据库中获取与所述数据标识匹配的加密等级J。
其中,J为正整数。
其中,J例如可等于1、2、3、5、6、11、13、20或其他值。
208、客户端从加密算法数据库中选取与所述加密等级J匹配的所述N个加密算法。
其中,N=J。
209、客户端根据所述加密密钥和N个加密算法对原始数据进行加密,以得到加密数据。
其中,所述原始数据由所述客户端从所述客户端的存储卷中获得,N为正整数。
其中,N例如可等于1、2、3、5、6、11、13、20或其他值。
其中,存储卷例如可以包括从硬盘划分的存储区域。
其中,加密算法例如可以包括对称加密算法和非对称加密算法。
可选的,在本申请一种可能的实施方式中,所述根据所述加密密钥和N个加密算法对原始数据进行加密,以得到加密数据,包括:根据所述加密密钥和N个加密算法对所述L个图像帧进行加密,以得到L个加密图像帧;将所述L个加密图像帧进行合成,以形成加密视频数据。
可以看出,上述技术方案中,通过对每个图像帧加密,提高了信息安全性。
参见图3,图3为本申请的又一个实施例提供的又一种数据加密方法的流程示意图。其中,如图3所示,本申请的又一个实施例提供的又一种数据加密方法可以包括:
301、在接收加密指令时,客户端向密钥服务中心发送密钥请求。
可选的,在本申请的一种可能的实施方式中,所述密钥请求携带所述客户端的身份认证信息,其中,所述客户端的身份认证信息用于所述密钥服务中心对所述客户端进行身份认证,在所述身份认证通过时,所述密钥服务中心构建通信通道,以通过所述通信通道向所述客户端发送所述密钥请求响应。
其中,身份认证信息例如可以为所述密钥服务中心分配给所述客户端的身份标识。
可以看出,上述方案中,提高了信息安全性。
302、客户端接收所述密钥服务中心发送的针对所述密钥请求的密钥请求响应。
其中,所述密钥请求响应包括加密密钥。
303、客户端设置M个预设规则。
其中,M为正整数。
其中,M例如可等于1、2、3、5、6、11、13、20或其他值。
其中,预设规则例如可以包括正则表达式。
304、客户端采用所述M个预设规则对所述原始数据进行检测以确定所述原始数据满足所述M个预设规则中的K个预设规则。
其中,K为正整数,M≥K。
其中,K例如可等于1、2、3、5、6、11、13、20或其他值。
可选的,在本申请一种可能的实施方式中,所述原始数据包括视频数据,所述采用所述M个预设规则对所述原始数据进行检测以确定所述原始数据满足所述M个预设规则中的K个预设规则,包括:对所述视频数据进行解析,以得到L个图像帧,其中,L为正整数;提取所述L个图像帧中的每个图像帧的数据,以得到Q个数据集,其中,所述Q个数据集中的第i个数据集与所述L个图像帧中的第i个图像帧对应,Q和i均为正整数,Q=L;采用所述M个预设规则对所述Q个数据集中的每个数据集进行检测以确定所述Q个数据集一共满足所述M个预设规则中的所述K个预设规则。
其中,L例如可等于1、2、3、5、6、11、13、20或其他值。
其中,Q例如可等于1、2、3、5、6、11、13、20或其他值。
其中,i例如可等于1、2、3、5、6、11、13、20或其他值。
可以看出,上述技术方案中,实现了确定原始数据所满足的预设规则,从而为后续根据预设规则的个数确定原始数据的重要级别做准备。
可选的,在一种可能的实施方式中,所述提取所述L个图像帧中的每个图像帧的数据,以得到Q个数据集,包括:针对所述L个图像帧中的每个图像帧执行第一预设操作,以得到所述Q个数据集;所述第一预设操作包括以下步骤:获取当前处理的图像帧;确定当前处理的所述图像帧所对应的第一矩阵,所述第一矩阵包括当前处理的所述图像帧中每个像素点对应的灰度值;将所述第一矩阵中与预设第一灰度值相同的至少一个灰度值;确定所述至少一个灰度值中每个灰度值在所述第一矩阵中的相邻灰度值;确定所述至少一个灰度值中每个灰度值是否与所述至少一个灰度值中每个灰度值对应的相邻灰度值满足预设第 一公式;若是,则在所述第一矩阵中将与所述至少一个灰度值中每个灰度值对应的相邻灰度值删除,以得到第二矩阵;将所述第二矩阵设置为当前处理的所述图像帧所对应的数据集。
其中,预设第一灰度值可以由管理员设置,也可以配置在客户端的配置文件中。
其中,预设第一公式为
Figure PCTCN2019117545-appb-000002
其中,x可以为所述至少一个灰度值中一个灰度值,也可以为与所述至少一个灰度值中每个灰度值对应的相邻灰度值,a为非零整数。
可以看出,上述技术方案中,减少了数据集中的数据,降低了采用M个预设规则对数据集进行检测时的检测复杂度。
可选的,在一种可能的实施方式中,所述方法还包括:若否,则确定所述至少一个灰度值中的每个灰度值与所述至少一个灰度值中每个灰度值对应的相邻灰度值之间的差值,以得到多个灰度差值;从所述多个灰度差值中选取灰度差值小于预设灰度差值的至少一个灰度差值;根据所述至少一个灰度差值在所述第一矩阵中删除灰度值,以得到第三矩阵;将所述第三矩阵设置为当前处理的所述图像帧所对应的数据集。
可以看出,上述技术方案中,减少了数据集中的数据,降低了采用M个预设规则对数据集进行检测时的检测复杂度。
可选的,在一种可能的实施方式中,所述采用所述M个预设规则对所述Q个数据集中的每个数据集进行检测以确定所述Q个数据集一共满足所述M个预设规则中的所述K个预设规则,包括:采用所述M个预设规则对所述Q个数据集中的每个数据集进行检测,若所述Q个数据集中只有一个数据集满足所述M个预设规则中的所述K个预设规则,则所述Q个数据集一共满足所述K个预设规则;或者,采用所述M个预设规则对所述Q个数据集中的每个数据集进行检测,若所述Q个数据集中的R个数据集满足所述M个预设规则中的E个预设规则,所述Q个数据集中的S个数据集满足所述M个预设规则中的F个预设规则,则所述Q个数据集一共满足所述K个预设规则,其中,K=E+F,R、S、E和F为正整数,所述E个预设规则不同于所述F个预设规则中的任一一个。
其中,R例如可等于1、2、3、5、6、11、13、20或其他值。
其中,S例如可等于1、2、3、5、6、11、13、20或其他值。
其中,E例如可等于1、2、3、5、6、11、13、20或其他值。
其中,F例如可等于1、2、3、5、6、11、13、20或其他值。
可以看出,上述技术方案中,实现了确定数据集满足预设规则。
可选的,在本申请一种可能的实施方式中,所述原始数据包括文档数据,所述采用所述M个预设规则对所述原始数据进行检测以确定所述原始数据满足所述M个预设规则中的K个预设规则,包括:解析所述文档数据,以得到T个字段,其中,T为正整数;将所述T个字段与H个预设字段进行对比,以得到对比成功的G个关键字段,其中,H和G为正整数,T<H,G≤T;提取所述G个关键字段中的每个关键字段的数据,以得到G个数据集,其中,所述G个 数据集中的第i个数据集与所述G个关键字段中的第i个关键字段对应;采用所述M个预设规则对所述G个数据集中的每个数据集进行检测以确定所述G个数据集一共满足所述M个预设规则中的所述K个预设规则。
其中,T例如可等于1、2、3、5、6、11、13、20或其他值。
其中,H例如可等于1、2、3、5、6、11、13、20或其他值。
其中,G例如可等于1、2、3、5、6、11、13、20或其他值。
可以看出,上述技术方案中,实现了确定原始数据所满足的预设规则,从而为后续根据预设规则的个数确定原始数据的重要级别做准备。
305、客户端确定所述原始数据的重要级别。
其中,所述原始数据的重要级别与所述原始数据满足预设规则的个数成正比。
可选的,在本申请一种可能的实施方式中,所述确定所述原始数据的重要级别,其中,所述原始数据的重要级别与所述原始数据满足预设规则的个数成正比,包括:确定所述Q个数据集的重要级别,其中,所述Q个数据集的重要级别与所述Q个数据集满足预设规则的个数成正比;按照预设比例将所述Q个数据集的重要级别进行处理,以得到所述视频数据的重要级别,其中,在Q>K时,所述预设比例等于(Q-K)/K,在Q=K时,所述预设比例等于1,在Q<K时,所述预设比例等于(K-Q)/K。
可以看出,上述技术方案中,实现了重要级别的确定。
306、客户端生成与所述原始数据的重要级别匹配的数据标识。
其中,所述数据标识用于标识所述原始数据。
307、客户端从加密等级数据库中获取与所述数据标识匹配的加密等级J。
其中,J为正整数。
其中,J例如可等于1、2、3、5、6、11、13、20或其他值。
308、客户端从加密算法数据库中选取与所述加密等级J匹配的所述N个加密算法。
其中,N=J。
309、客户端根据所述加密密钥和N个加密算法对所述L个图像帧进行加密,以得到L个加密图像帧。
其中,所述原始数据由所述客户端从所述客户端的存储卷中获得,N为正整数。
其中,所述原始数据包括视频数据。
其中,N例如可等于1、2、3、5、6、11、13、20或其他值。
其中,存储卷例如可以包括从硬盘划分的存储区域。
其中,加密算法例如可以包括对称加密算法和非对称加密算法。
310、客户端将所述L个加密图像帧进行合成,以形成加密视频数据。
参见图4,图4为本申请的一个实施例提供的一种数据加密装置的示意图。其中,如图4所示,本申请的一个实施例提供的一种数据加密装置400可以包括:
发送模块401,用于在接收加密指令时,向密钥服务中心发送密钥请求。
其中,所述密钥请求携带所述客户端的身份认证信息,其中,所述客户端的身份认证信息用于所述密钥服务中心对所述客户端进行身份认证,在所述身份认证通过时,所述密钥服务中心构建通信通道,以通过所述通信通道向所述客户端发送所述密钥请求响应。
接收模块402,用于接收所述密钥服务中心发送的针对所述密钥请求的密钥请求响应。
其中,所述密钥请求响应包括加密密钥。
加密模块403,用于根据所述加密密钥和N个加密算法对原始数据进行加密,以得到加密数据。
其中,所述原始数据由所述客户端从所述客户端的存储卷中获得,N为正整数。
其中,N例如可等于1、2、3、5、6、11、13、20或其他值。
其中,存储卷例如可以包括从硬盘划分的存储区域。
其中,加密算法例如可以包括对称加密算法和非对称加密算法。
可选的,所述装置还包括处理装置,所述处理装置,用于设置M个预设规则,其中,M为正整数;采用所述M个预设规则对所述原始数据进行检测以确定所述原始数据满足所述M个预设规则中的K个预设规则,其中,K为正整数,M≥K;确定所述原始数据的重要级别,其中,所述原始数据的重要级别与所述原始数据满足预设规则的个数成正比;生成与所述原始数据的重要级别匹配的数据标识,其中,所述数据标识用于标识所述原始数据;从加密等级数据库中获取与所述数据标识匹配的加密等级J,其中,J为正整数;从加密算法数据库中选取与所述加密等级J匹配的所述N个加密算法,其中,N=J。
可选的,所述原始数据包括视频数据,所述处理装置,具体用于对所述视频数据进行解析,以得到L个图像帧,其中,L为正整数;提取所述L个图像帧中的每个图像帧的数据,以得到Q个数据集,其中,所述Q个数据集中的第i个数据集与所述L个图像帧中的第i个图像帧对应,Q和i均为正整数,Q=L;采用所述M个预设规则对所述Q个数据集中的每个数据集进行检测以确定所述Q个数据集一共满足所述M个预设规则中的所述K个预设规则。
可选的,所述处理装置,具体用于针对所述L个图像帧中的每个图像帧执行第一预设操作,以得到所述Q个数据集;
所述第一预设操作包括以下步骤:
获取当前处理的图像帧;确定当前处理的所述图像帧所对应的第一矩阵,所述第一矩阵包括当前处理的所述图像帧中每个像素点对应的灰度值;将所述第一矩阵中与预设第一灰度值相同的至少一个灰度值;确定所述至少一个灰度值中每个灰度值在所述第一矩阵中的相邻灰度值;确定所述至少一个灰度值中每个灰度值是否与所述至少一个灰度值中每个灰度值对应的相邻灰度值满足预设第一公式;若是,则在所述第一矩阵中将与所述至少一个灰度值中每个灰度值对应的相邻灰度值删除,以得到第二矩阵;将所述第二矩阵设置为当前处理的所述图像帧所对应的数据集。
可选的,所述处理装置,具体用于若否,则确定所述至少一个灰度值中的 每个灰度值与所述至少一个灰度值中每个灰度值对应的相邻灰度值之间的差值,以得到多个灰度差值;从所述多个灰度差值中选取灰度差值小于预设灰度差值的至少一个灰度差值;根据所述至少一个灰度差值在所述第一矩阵中删除灰度值,以得到第三矩阵;将所述第三矩阵设置为当前处理的所述图像帧所对应的数据集。
可选的,所述处理装置,具体用于确定所述Q个数据集的重要级别,其中,所述Q个数据集的重要级别与所述Q个数据集满足预设规则的个数成正比;按照预设比例将所述Q个数据集的重要级别进行处理,以得到所述视频数据的重要级别,其中,在Q>K时,所述预设比例等于(Q-K)/K,在Q=K时,所述预设比例等于1,在Q<K时,所述预设比例等于(K-Q)/K。
可选的,所述处理装置,具体用于采用所述M个预设规则对所述Q个数据集中的每个数据集进行检测,若所述Q个数据集中只有一个数据集满足所述M个预设规则中的所述K个预设规则,则所述Q个数据集一共满足所述K个预设规则;或者,采用所述M个预设规则对所述Q个数据集中的每个数据集进行检测,若所述Q个数据集中的R个数据集满足所述M个预设规则中的E个预设规则,所述Q个数据集中的S个数据集满足所述M个预设规则中的F个预设规则,则所述Q个数据集一共满足所述K个预设规则,其中,K=E+F,R、S、E和F为正整数,所述E个预设规则不同于所述F个预设规则中的任一一个。
可选的,所述加密模块,具体用于根据所述加密密钥和N个加密算法对所述L个图像帧进行加密,以得到L个加密图像帧;将所述L个加密图像帧进行合成,以形成加密视频数据。
本申请实施例还提供一种数据加密的的电子设备,其特征在于,包括处理器、存储器、通信接口以及一个或多个程序,其中,所述一个或多个程序被存储在所述存储器中,并且被配置由所述处理器执行,以执行包括上述方法实施例中记载的任何一种数据加密方法的部分或全部步骤。
本申请实施例还提供一种计算机可读存储介质,其中,该计算机可读存储介质可存储有程序,以实现包括上述方法实施例中记载的任何一种数据加密方法的部分或全部步骤。
参见图5,图5为本申请的实施例涉及的硬件运行环境的商家节点结构示意图。
本申请实施例提供了一种数据加密的电子设备,包括处理器、存储器、通信接口以及一个或多个程序,其中,所述一个或多个程序被存储在所述存储器中,并且被配置由所述处理器执行,以执行包括任一项数据加密的方法中的步骤的指令。其中,如图5所示,本申请的实施例涉及的硬件运行环境的商家节点可以包括:
处理器501,例如CPU。
存储器502,可选的,存储器可以为高速RAM存储器,也可以是稳定的存储器,例如磁盘存储器。
通信接口503,用于实现处理器501和存储器502之间的连接通信。
本领域技术人员可以理解,图5中示出的商家节点的结构并不构成对其的 限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
如图5所示,存储器502中可以包括操作系统、网络通信模块以及数据处理的程序。操作系统是管理和控制商家节点硬件和软件资源的程序,支持人员管理的程序以及其他软件或程序的运行。网络通信模块用于实现存储器502内部各组件之间的通信,以及与商家节点内部其他硬件和软件之间通信。
在图5所示的商家节点中,处理器501用于执行存储器502中存储的人员管理的程序,实现以下步骤:
在接收加密指令时,向密钥服务中心发送密钥请求;
接收所述密钥服务中心发送的针对所述密钥请求的密钥请求响应,其中,所述密钥请求响应包括加密密钥;
根据所述加密密钥和N个加密算法对原始数据进行加密,以得到加密数据,其中,所述原始数据由所述客户端从所述客户端的存储卷中获得,N为正整数。
本申请涉及的商家节点的具体实施可参见上述数据加密的方法的各实施例,在此不做赘述。
本申请还提供了一种计算机可读存储介质,所述计算机可读存储介质用于存储计算机程序,所述存储计算机程序被所述处理器执行,以实现以下步骤:
在接收加密指令时,向密钥服务中心发送密钥请求;
接收所述密钥服务中心发送的针对所述密钥请求的密钥请求响应,其中,所述密钥请求响应包括加密密钥;
根据所述加密密钥和N个加密算法对原始数据进行加密,以得到加密数据,其中,所述原始数据由所述客户端从所述客户端的存储卷中获得,N为正整数。
本申请涉及的计算机非易失性可读存储介质的具体实施可参见上述数据加密的方法的各实施例,在此不做赘述。
在本申请所提供的几个实施例中,应所述理解到,所揭露的装置,可通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或模块的间接耦合或通信连接,可以是电性或者其它的形式。
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或 使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者所述技术方案的全部或部分可以以软件产品的形式体现出来,所述计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可为个人计算机、商家节点或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。

Claims (20)

  1. 一种数据加密的方法,其特征在于,包括:
    在接收加密指令时,向密钥服务中心发送密钥请求;
    接收所述密钥服务中心发送的针对所述密钥请求的密钥请求响应,其中,所述密钥请求响应包括加密密钥;
    根据所述加密密钥和N个加密算法对原始数据进行加密,以得到加密数据,其中,所述原始数据由所述客户端从所述客户端的存储卷中获得,N为正整数。
  2. 根据权利要求1所述的方法,其特征在于,所述密钥请求携带所述客户端的身份认证信息,其中,所述客户端的身份认证信息用于所述密钥服务中心对所述客户端进行身份认证,在所述身份认证通过时,所述密钥服务中心构建通信通道,以通过所述通信通道向所述客户端发送所述密钥请求响应。
  3. 根据权利要求1所述的方法,其特征在于,所述在根据所述加密密钥和N个加密算法对原始数据进行加密,以得到加密数据之前,包括:
    设置M个预设规则,其中,M为正整数;
    采用所述M个预设规则对所述原始数据进行检测以确定所述原始数据满足所述M个预设规则中的K个预设规则,其中,K为正整数,M≥K;
    确定所述原始数据的重要级别,其中,所述原始数据的重要级别与所述原始数据满足预设规则的个数成正比;
    生成与所述原始数据的重要级别匹配的数据标识,其中,所述数据标识用于标识所述原始数据;
    从加密等级数据库中获取与所述数据标识匹配的加密等级J,其中,J为正整数;
    从加密算法数据库中选取与所述加密等级J匹配的所述N个加密算法,其中,N=J。
  4. 根据权利要求3所述的方法,其特征在于,所述原始数据包括视频数据,所述采用所述M个预设规则对所述原始数据进行检测以确定所述原始数据满足所述M个预设规则中的K个预设规则,包括:
    对所述视频数据进行解析,以得到L个图像帧,其中,L为正整数;
    提取所述L个图像帧中的每个图像帧的数据,以得到Q个数据集,其中,所述Q个数据集中的第i个数据集与所述L个图像帧中的第i个图像帧对应,Q和i均为正整数,Q=L;
    采用所述M个预设规则对所述Q个数据集中的每个数据集进行检测以确定所述Q个数据集一共满足所述M个预设规则中的所述K个预设规则。
  5. 根据权利要求4所述的方法,其特征在于,所述提取所述L个图像帧中的每个图像帧的数据,以得到Q个数据集,包括:
    针对所述L个图像帧中的每个图像帧执行第一预设操作,以得到所述Q个数据集;
    所述第一预设操作包括以下步骤:
    获取当前处理的图像帧;确定当前处理的所述图像帧所对应的第一矩阵, 所述第一矩阵包括当前处理的所述图像帧中每个像素点对应的灰度值;将所述第一矩阵中与预设第一灰度值相同的至少一个灰度值;确定所述至少一个灰度值中每个灰度值在所述第一矩阵中的相邻灰度值;确定所述至少一个灰度值中每个灰度值是否与所述至少一个灰度值中每个灰度值对应的相邻灰度值满足预设第一公式;若是,则在所述第一矩阵中将与所述至少一个灰度值中每个灰度值对应的相邻灰度值删除,以得到第二矩阵;将所述第二矩阵设置为当前处理的所述图像帧所对应的数据集。
  6. 根据权利要求5所述的方法,其特征在于,所述方法还包括:
    若否,则确定所述至少一个灰度值中的每个灰度值与所述至少一个灰度值中每个灰度值对应的相邻灰度值之间的差值,以得到多个灰度差值;
    从所述多个灰度差值中选取灰度差值小于预设灰度差值的至少一个灰度差值;
    根据所述至少一个灰度差值在所述第一矩阵中删除灰度值,以得到第三矩阵;
    将所述第三矩阵设置为当前处理的所述图像帧所对应的数据集。
  7. 根据权利要求3或4所述的方法,其特征在于,所述确定所述原始数据的重要级别,其中,所述原始数据的重要级别与所述原始数据满足预设规则的个数成正比,包括:
    确定所述Q个数据集的重要级别,其中,所述Q个数据集的重要级别与所述Q个数据集满足预设规则的个数成正比;
    按照预设比例将所述Q个数据集的重要级别进行处理,以得到所述视频数据的重要级别,其中,在Q>K时,所述预设比例等于(Q-K)/K,在Q=K时,所述预设比例等于1,在Q<K时,所述预设比例等于(K-Q)/K。
  8. 根据权利要求4所述的方法,其特征在于,所述采用所述M个预设规则对所述Q个数据集中的每个数据集进行检测以确定所述Q个数据集一共满足所述M个预设规则中的所述K个预设规则,包括:
    采用所述M个预设规则对所述Q个数据集中的每个数据集进行检测,若所述Q个数据集中只有一个数据集满足所述M个预设规则中的所述K个预设规则,则所述Q个数据集一共满足所述K个预设规则;
    或者,采用所述M个预设规则对所述Q个数据集中的每个数据集进行检测,若所述Q个数据集中的R个数据集满足所述M个预设规则中的E个预设规则,所述Q个数据集中的S个数据集满足所述M个预设规则中的F个预设规则,则所述Q个数据集一共满足所述K个预设规则,其中,K=E+F,R、S、E和F为正整数,所述E个预设规则不同于所述F个预设规则中的任一一个。
  9. 根据权利要求1或8所述的方法,其特征在于,所述根据所述加密密钥和N个加密算法对原始数据进行加密,以得到加密数据,包括:
    根据所述加密密钥和N个加密算法对所述L个图像帧进行加密,以得到L个加密图像帧;
    将所述L个加密图像帧进行合成,以形成加密视频数据。
  10. 一种数据加密装置,其特征在于,包括:
    发送模块,用于在接收加密指令时,向密钥服务中心发送密钥请求;
    接收模块,用于接收所述密钥服务中心发送的针对所述密钥请求的密钥请求响应,其中,所述密钥请求响应包括加密密钥;
    加密模块,用于根据所述加密密钥和N个加密算法对原始数据进行加密,以得到加密数据,其中,所述原始数据由所述客户端从所述客户端的存储卷中获得,N为正整数。
  11. 根据权利要求10所述的装置,其特征在于,所述密钥请求携带所述客户端的身份认证信息,其中,所述客户端的身份认证信息用于所述密钥服务中心对所述客户端进行身份认证,在所述身份认证通过时,所述密钥服务中心构建通信通道,以通过所述通信通道向所述客户端发送所述密钥请求响应。
  12. 根据权利要求10所述的装置,其特征在于,所述装置还包括处理装置,所述处理装置,用于设置M个预设规则,其中,M为正整数;采用所述M个预设规则对所述原始数据进行检测以确定所述原始数据满足所述M个预设规则中的K个预设规则,其中,K为正整数,M≥K;确定所述原始数据的重要级别,其中,所述原始数据的重要级别与所述原始数据满足预设规则的个数成正比;生成与所述原始数据的重要级别匹配的数据标识,其中,所述数据标识用于标识所述原始数据;从加密等级数据库中获取与所述数据标识匹配的加密等级J,其中,J为正整数;从加密算法数据库中选取与所述加密等级J匹配的所述N个加密算法,其中,N=J。
  13. 根据权利要求12所述的装置,其特征在于,所述原始数据包括视频数据,所述处理装置,具体用于对所述视频数据进行解析,以得到L个图像帧,其中,L为正整数;提取所述L个图像帧中的每个图像帧的数据,以得到Q个数据集,其中,所述Q个数据集中的第i个数据集与所述L个图像帧中的第i个图像帧对应,Q和i均为正整数,Q=L;采用所述M个预设规则对所述Q个数据集中的每个数据集进行检测以确定所述Q个数据集一共满足所述M个预设规则中的所述K个预设规则。
  14. 根据权利要求13所述的装置,其特征在于,所述处理装置,具体用于针对所述L个图像帧中的每个图像帧执行第一预设操作,以得到所述Q个数据集;
    所述第一预设操作包括以下步骤:
    获取当前处理的图像帧;确定当前处理的所述图像帧所对应的第一矩阵,所述第一矩阵包括当前处理的所述图像帧中每个像素点对应的灰度值;将所述第一矩阵中与预设第一灰度值相同的至少一个灰度值;确定所述至少一个灰度值中每个灰度值在所述第一矩阵中的相邻灰度值;确定所述至少一个灰度值中每个灰度值是否与所述至少一个灰度值中每个灰度值对应的相邻灰度值满足预设第一公式;若是,则在所述第一矩阵中将与所述至少一个灰度值中每个灰度值对应的相邻灰度值删除,以得到第二矩阵;将所述第二矩阵设置为当前处理的所述图像帧所对应的数据集。
  15. 根据权利要求14所述的装置,其特征在于,所述处理装置,具体用于若否,则确定所述至少一个灰度值中的每个灰度值与所述至少一个灰度值中每 个灰度值对应的相邻灰度值之间的差值,以得到多个灰度差值;从所述多个灰度差值中选取灰度差值小于预设灰度差值的至少一个灰度差值;根据所述至少一个灰度差值在所述第一矩阵中删除灰度值,以得到第三矩阵;将所述第三矩阵设置为当前处理的所述图像帧所对应的数据集。
  16. 根据权利要求12或13所述的装置,其特征在于,所述处理装置,具体用于确定所述Q个数据集的重要级别,其中,所述Q个数据集的重要级别与所述Q个数据集满足预设规则的个数成正比;按照预设比例将所述Q个数据集的重要级别进行处理,以得到所述视频数据的重要级别,其中,在Q>K时,所述预设比例等于(Q-K)/K,在Q=K时,所述预设比例等于1,在Q<K时,所述预设比例等于(K-Q)/K。
  17. 根据权利要求13所述的装置,其特征在于,所述处理装置,具体用于采用所述M个预设规则对所述Q个数据集中的每个数据集进行检测,若所述Q个数据集中只有一个数据集满足所述M个预设规则中的所述K个预设规则,则所述Q个数据集一共满足所述K个预设规则;或者,采用所述M个预设规则对所述Q个数据集中的每个数据集进行检测,若所述Q个数据集中的R个数据集满足所述M个预设规则中的E个预设规则,所述Q个数据集中的S个数据集满足所述M个预设规则中的F个预设规则,则所述Q个数据集一共满足所述K个预设规则,其中,K=E+F,R、S、E和F为正整数,所述E个预设规则不同于所述F个预设规则中的任一一个。
  18. 根据权利要求10或17所述的装置,其特征在于,所述加密模块,具体用于根据所述加密密钥和N个加密算法对所述L个图像帧进行加密,以得到L个加密图像帧;将所述L个加密图像帧进行合成,以形成加密视频数据。
  19. 一种数据加密的电子设备,其特征在于,包括处理器、存储器、通信接口以及一个或多个程序,其中,所述一个或多个程序被存储在所述存储器中,并且被配置由所述处理器执行,以执行权利要求1-9任一项方法中的步骤的指令。
  20. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质用于存储计算机程序,所述存储计算机程序被所述处理器执行,以实现权利要求1-9任一项所述的方法。
PCT/CN2019/117545 2019-01-04 2019-11-12 一种数据加密方法和相关装置 WO2020140616A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910007689.3 2019-01-04
CN201910007689.3A CN109815715A (zh) 2019-01-04 2019-01-04 一种数据加密方法和相关装置

Publications (1)

Publication Number Publication Date
WO2020140616A1 true WO2020140616A1 (zh) 2020-07-09

Family

ID=66603930

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/117545 WO2020140616A1 (zh) 2019-01-04 2019-11-12 一种数据加密方法和相关装置

Country Status (2)

Country Link
CN (1) CN109815715A (zh)
WO (1) WO2020140616A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109815715A (zh) * 2019-01-04 2019-05-28 平安科技(深圳)有限公司 一种数据加密方法和相关装置
CN111126604B (zh) * 2019-12-31 2024-02-02 北京奇艺世纪科技有限公司 模型训练方法、装置、服务器及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102412967A (zh) * 2011-09-29 2012-04-11 用友软件股份有限公司 数据传输系统和方法
CN106650482A (zh) * 2015-11-04 2017-05-10 阿里巴巴集团控股有限公司 电子文件加密解密方法、装置和系统
CN107483383A (zh) * 2016-06-07 2017-12-15 腾讯科技(深圳)有限公司 一种数据处理方法、终端及后台服务器
US20180351920A1 (en) * 2017-05-31 2018-12-06 Samsung Sds Co., Ltd. Encryption processing method and apparatus
CN109815715A (zh) * 2019-01-04 2019-05-28 平安科技(深圳)有限公司 一种数据加密方法和相关装置

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103780622B (zh) * 2014-01-24 2016-09-28 华中科技大学 一种面向云存储的数据分类加密方法
US9858426B2 (en) * 2015-11-03 2018-01-02 Palo Alto Research Center Incorporated Computer-implemented system and method for automatically identifying attributes for anonymization
CN106936771A (zh) * 2015-12-29 2017-07-07 航天信息股份有限公司 一种基于分级加密的安全云存储方法和系统
CN106372519A (zh) * 2016-08-30 2017-02-01 江苏博智软件科技有限公司 一种信息加密方法及装置
CN107292183B (zh) * 2017-06-29 2019-08-23 国信优易数据有限公司 一种数据处理方法及设备
CN107508796B (zh) * 2017-07-28 2019-01-04 北京明朝万达科技股份有限公司 一种数据通信方法和装置
CN108520183B (zh) * 2018-04-13 2020-03-24 杭州橙鹰数据技术有限公司 一种数据存储方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102412967A (zh) * 2011-09-29 2012-04-11 用友软件股份有限公司 数据传输系统和方法
CN106650482A (zh) * 2015-11-04 2017-05-10 阿里巴巴集团控股有限公司 电子文件加密解密方法、装置和系统
CN107483383A (zh) * 2016-06-07 2017-12-15 腾讯科技(深圳)有限公司 一种数据处理方法、终端及后台服务器
US20180351920A1 (en) * 2017-05-31 2018-12-06 Samsung Sds Co., Ltd. Encryption processing method and apparatus
CN109815715A (zh) * 2019-01-04 2019-05-28 平安科技(深圳)有限公司 一种数据加密方法和相关装置

Also Published As

Publication number Publication date
CN109815715A (zh) 2019-05-28

Similar Documents

Publication Publication Date Title
US10839104B2 (en) Obfuscating information related to personally identifiable information (PII)
US11399079B2 (en) Zero-knowledge environment based networking engine
WO2020177392A1 (zh) 基于联邦学习的模型参数训练方法、装置、设备及介质
AU2017404207B2 (en) Information processing device and information processing method
US10235539B2 (en) Server device, recording medium, and concealed search system
EP3935547A1 (en) System and associated method for ensuring data privacy
US20220374876A1 (en) Method for routing to mesh network content utilizing blockchain technology
WO2019205366A1 (zh) 一种图片管理方法、装置、计算机设备及存储介质
US10366240B1 (en) Authorization to access a server in the cloud without obtaining an initial secret
JP2012164031A (ja) データ処理装置及びデータ保管装置及びデータ処理方法及びデータ保管方法及びプログラム
US20220353248A1 (en) Identifying and Securing Unencrypted Data in a Production Environment
WO2016043120A1 (ja) 情報処理装置及び協調分散保存システム
US20170004201A1 (en) Structure-based entity analysis
WO2020140616A1 (zh) 一种数据加密方法和相关装置
WO2022237175A1 (zh) 图数据的处理方法、装置、设备、存储介质及程序产品
US20120066490A1 (en) Cryptographic device management method, cryptographic device management server, and program
JP5557683B2 (ja) 情報検索装置および情報検索方法
CN112100639B (zh) 一种基于元数据业务信息的数据加密传输的方法、系统
CN117478303A (zh) 区块链隐蔽通信方法、系统和计算机设备
CN111783140A (zh) 请求响应方法及装置、电子设备及计算机可读存储介质
KR20200099790A (ko) 데이터 관리 시스템 및 데이터 관리 방법
WO2019019650A1 (zh) 网站数据处理方法、装置、网站数据处理平台及存储介质
US10592682B2 (en) Data storage apparatus, data processing method, and computer readable medium adding a user attribute of a revoked user to an embedded decryption condition while encrypted data remains in an encrypted state
KR102123435B1 (ko) 멀티 클라이언트 환경에서 동치 질의를 지원하는 암호화 방법 및 이를 이용한 장치
CN113052045A (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: 19907950

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 11/11/2021)

122 Ep: pct application non-entry in european phase

Ref document number: 19907950

Country of ref document: EP

Kind code of ref document: A1