WO2019205366A1 - 一种图片管理方法、装置、计算机设备及存储介质 - Google Patents

一种图片管理方法、装置、计算机设备及存储介质 Download PDF

Info

Publication number
WO2019205366A1
WO2019205366A1 PCT/CN2018/101845 CN2018101845W WO2019205366A1 WO 2019205366 A1 WO2019205366 A1 WO 2019205366A1 CN 2018101845 W CN2018101845 W CN 2018101845W WO 2019205366 A1 WO2019205366 A1 WO 2019205366A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
picture
information
encrypted
key
Prior art date
Application number
PCT/CN2018/101845
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 WO2019205366A1 publication Critical patent/WO2019205366A1/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
    • 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
    • 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/0478Network 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 applying multiple layers of encryption, e.g. nested tunnels or encrypting the content with a first key and then with at least a second key
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0876Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2107File encryption
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2141Access rights, e.g. capability lists, access control lists, access tables, access matrices

Definitions

  • the present application relates to the field of computer technologies, and in particular, to a picture management method, apparatus, computer device, and storage medium.
  • sample images As the positive and negative samples for algorithm training to improve the accuracy of recognition.
  • enterprises manage these samples by simply collecting these samples in a library. When an algorithm needs to use these samples, it is necessary to manually screen out the corresponding samples, and then sample the samples. Packet compression is performed for transmission to the terminal.
  • this kind of sample management method is easy to cause leakage in the process of sample image storage, screening, transmission, etc., and poses a safety hazard to the characters in the sample image.
  • the application provides a picture management method, device, computer device and storage medium to improve the security of picture management.
  • the present application provides a picture management method, including: acquiring a picture; identifying whether the picture carries preset sensitive information; if the picture does not carry the preset sensitive information, based on a file encryption algorithm Encrypting the picture to obtain a corresponding encrypted file; storing the encrypted file into a sample database.
  • the present application provides a picture management apparatus, including: an obtaining unit, configured to acquire a picture; an identifying unit, configured to identify whether the picture carries preset sensitive information; and an encryption unit, if The preset sensitive information is not carried in the picture, and the picture is encrypted according to a file encryption algorithm to obtain a corresponding encrypted file.
  • the storage unit is configured to store the encrypted file into the sample database.
  • the present application further provides a computer device comprising a memory, a processor, and a computer program stored on the memory and operable on the processor, the processor implementing the computer program
  • a computer device comprising a memory, a processor, and a computer program stored on the memory and operable on the processor, the processor implementing the computer program
  • the present application also provides a storage medium, wherein the storage medium stores a computer program, the computer program comprising program instructions, the program instructions, when executed by a processor, causing the processor to execute the application
  • the picture management method of any of the provided is not limited to:
  • the application provides a picture management method, device, computer device and storage medium.
  • the image management method first screens out images that do not carry preset sensitive information as face recognition algorithms, and encrypts and stores the images to reduce the risk of image leakage and improve the security of image storage.
  • FIG. 1 is a schematic flowchart of a picture management method according to an embodiment of the present application
  • FIG. 2 is a schematic flow chart of a picture management method shown in FIG. 1;
  • FIG. 3 is a schematic flow chart of a picture management method shown in FIG. 2;
  • FIG. 4 is another specific schematic flowchart of a picture management method shown in FIG. 2;
  • FIG. 5 is a schematic flowchart of a picture management method according to an embodiment of the present application.
  • FIG. 6 is a schematic block diagram of a picture management apparatus according to an embodiment of the present application.
  • FIG. 7 is a specific schematic block diagram of a picture management apparatus shown in FIG. 6; FIG.
  • FIG. 8 is a detailed schematic block diagram of a picture management apparatus shown in FIG. 7;
  • FIG. 9 is a schematic block diagram of a picture management apparatus according to an embodiment of the present application.
  • FIG. 10 is a schematic block diagram of a computer device according to an embodiment of the present application.
  • FIG. 1 is a schematic flowchart of a picture management method according to an embodiment of the present application.
  • the picture management method is applied to a server, for example, the server may be a server for managing and storing pictures.
  • the picture management method includes steps S101 to S104.
  • a picture library is provided in the server, and the picture library is a database for storing various pictures.
  • the server reads the picture from the picture library and performs step S102.
  • the OCR image recognition technology may be used to identify whether the preset information is carried in the picture.
  • the preset sensitive information may be text information.
  • the preset sensitive information may be information related to personal privacy such as name, address, ID number, and telephone number.
  • the type of the text of the preset sensitive information is not limited to Chinese characters, English, numbers, and the like.
  • the server may discard the image in the image library, that is, the image is not used as a face recognition algorithm. Training samples.
  • the server recognizes that the preset information is not carried in the picture, it indicates that the picture can be used as a training sample of an algorithm such as face recognition, and the server performs step S103.
  • the picture is a photo of Zhang San's ID card
  • the picture will carry the information of Zhang San's avatar, name, ID card number, etc.
  • the server can recognize the preset sensitivity in the picture through OCR image recognition technology. Information, the server discards the picture in the picture library, that is, does not use the picture as a training sample of algorithms such as face recognition.
  • FIG. 2 is a specific schematic flowchart of a picture management method shown in FIG. 1.
  • This step S103 includes steps S1031 and S1032.
  • the image is Base64 transcoded to convert the image format into a Base64 encoded file. That is, convert the image format to a file containing a string. After acquiring the Base64 encoded file corresponding to the picture, step S1032 is performed.
  • S1032 Encrypt the Base64 encoded file according to a file encryption algorithm to generate an encrypted file.
  • the Base64 encoded file may be double-encrypted based on the file encryption algorithm to generate the encrypted file.
  • FIG. 3 is a specific schematic flowchart of a picture management method shown in FIG. 2.
  • This step S1032 specifically includes steps S1032a to S1032c.
  • S1032a Generate an initial key, and perform encryption processing on the Base64 encoded file based on the AES encryption algorithm and the initial key to generate a primary encrypted file.
  • the initial key may be a randomly dynamically generated key.
  • the server processes a lot of pictures. In order to improve the security level of the picture, multiple pictures are not decrypted by the same key.
  • the initial key is a private key, that is, the initial keys of multiple pictures are different from each other. Obtaining different initial keys by means of random dynamic generation.
  • the initial key may also be a public key, that is, multiple pictures may share the same initial key.
  • the Base64 encoded file is encrypted according to the AES encryption algorithm and the initial key, and then the primary encrypted file corresponding to the picture is generated, that is, the first re-encryption process is completed.
  • S1032b Calculate, according to the initial key, a secondary key according to a preset calculation rule.
  • calculating the secondary key according to the initial calculation rule according to the preset calculation rule includes: acquiring current time information; converting the current time information into a corresponding time string; The AES encryption algorithm and the initial key encrypt the time string to calculate a secondary key.
  • the current time information is time information of the current processing picture of the server.
  • the current time information can be, for example, 2018.1.10.18.20.50.230.
  • the time string is encrypted by the AES encryption algorithm and the initial key, thereby calculating the secondary key.
  • the secondary key is a private key, that is, the secondary keys corresponding to each picture are different from each other.
  • the server can process multiple pictures serially or in parallel; when the initial key is a public key, the server needs to select a serial processing picture.
  • the secondary key may also be a public key, which is not specifically limited herein.
  • the server may process multiple pictures in parallel, but this may cause the current time information corresponding to the multiple pictures to be in the case where the initial key is a public key. The same time information, so that the generated secondary key is a public key, reducing the security of the encrypted file.
  • the secondary key is still a private key.
  • the initial key is calculated according to a preset calculation rule according to the initial key.
  • Level key comprising: numbering at least two of the Base64 encoded files currently processed in parallel; acquiring current time information; converting the current time information into a corresponding time string, and converting each of the Base64 encoded files Converting the corresponding number into a corresponding number string; encrypting the time string and the number string based on the AES encryption algorithm and the initial key to calculate a secondary density corresponding to each of the Base64 encoded files key.
  • the server encrypts ten Base64 encoded files in parallel.
  • the security level of the Base64 encoded file is improved, and the server first processes the batch processing.
  • Ten Base64 encoded files are numbered, for example, the numbers are "001", “002", “010", and so on.
  • the current time information is obtained, and the current time information and the numbers corresponding to the ten Base64 encoded files are respectively converted into corresponding strings.
  • the current time information is converted into a time string, and the number corresponding to each Base64 encoded file is converted into a numbered string.
  • the time string and the numbered string are further encrypted based on the AES encryption algorithm and the initial key to obtain a secondary key corresponding to each Base64 encoded file.
  • the current time information corresponding to the ten Base64 encoded files is the same, since the mutually different numbers are introduced, the last generated secondary key is still the private key.
  • the number may be replaced with other content, as long as the effect is equivalent to the effect of the number, and no specific limitation is imposed herein.
  • S1032c Perform secondary encryption processing on the primary encrypted file based on a preset encryption algorithm and the secondary key to generate an encrypted file.
  • performing secondary encryption processing on the primary encrypted file to generate an encrypted file based on a preset encryption algorithm and the secondary key including: following a string in the primary encrypted file
  • the first preset number of bits is subjected to an array process to generate a corresponding file array
  • the string in the second level key is arrayed according to a second preset number of bits to generate a corresponding key array
  • the elements in the file array and the elements in the key array are reorganized to generate an encrypted file.
  • the string in the primary encrypted file is divided into 10 units, and the string formed by each 10 characters is used as a file array. An element of it.
  • the string in the secondary key can be divided into units of 1 bit, and each character is used as an element of the key array.
  • the file array and the elements in the key array are then reorganized. For example, a plurality of elements in a file array are represented as A 1 , A 2 , A 3 ... A n , respectively, and a plurality of elements in the key array are represented as B 1 , B 2 , B 3 ... B n , respectively.
  • the file array and the elements at the same position in the key array are arranged in a certain order to form a new string of A 1 B 1 A 2 B 2 A 3 B 3 ... A n B n , and the file in which the new string is located is To encrypt the file.
  • the number of elements in the file array will be more than the number of elements in the key array.
  • the extra elements in the file array can be arranged in order after the new string, for example, A 1 B 1 A 2 B 2 ... A n B n A n+1 A n+2 A n+3 A n+4 ....
  • the manner in which the elements in the file array and the key array are arranged in a certain order is not limited to the manner in the above example, and may be other methods, for example, A 1 A 2 B 1 A 3 A 4 B 2 A 5 A 6 B 3 ... A 2n B n are arranged in the form of.
  • FIG. 4 is another specific schematic flowchart of a picture management method shown in FIG. 2.
  • This step S1032 includes step S1032d and step S1032e.
  • the initial key may be a randomly generated key.
  • the initial key is a private key.
  • the initial key may also be a public key.
  • S1032e Perform encryption processing on the Base64 encoded file based on an AES encryption algorithm and the initial key to generate an encrypted file.
  • the Base64 encoded file is encrypted based on the AES encryption algorithm and the initial key, thereby generating an encrypted file.
  • the encrypted file may be stored in a sample database based on a distributed storage technique.
  • the sample database is used for storing and managing an encrypted file corresponding to a training sample image required by an algorithm such as face recognition.
  • the picture management method in this embodiment first filters out pictures that do not carry preset sensitive information as pictures of face recognition algorithms, and then encrypts and stores the pictures to reduce the risk of picture leakage and improve the security of picture storage. Sex.
  • FIG. 5 is a schematic flowchart of a picture management method according to an embodiment of the present application.
  • the picture management method is applied to a server, for example, the server may be a server for managing and storing pictures.
  • the picture management method includes steps S201 to S216.
  • the OCR image recognition technology may be used to identify whether the preset information is carried in the picture.
  • step S203 includes: performing Base64 transcoding processing on the picture to generate a corresponding Base64 encoded file; and performing encryption processing on the Base64 encoded file to generate an encrypted file based on a file encryption algorithm.
  • the staff in order to improve the recognition of the picture and facilitate the staff to find the picture, the staff often names the picture by name, name and ID number, which causes the name of the picture to carry the preset sensitive information. If the picture leaks, the unscrupulous person can obtain the preset sensitive information by the name of the picture. In order to avoid leaking preset sensitive information through the identification information of the picture, it is necessary to obtain the identification information of the picture.
  • the identification information of the picture may be, for example, a name of the picture.
  • the OCR image recognition technology may be used to identify whether the preset information is carried in the identification information of the picture.
  • the server performs step S206.
  • the server performs step S207.
  • the identifier information of the picture is serialized according to a serialization algorithm to obtain file identifier information of the encrypted file corresponding to the picture.
  • the identification information of the picture may be serialized by the serialization algorithm to obtain the file identification information of the encrypted file corresponding to the picture, and step S208 is performed. It can be understood that the file identification information of the encrypted file corresponding to the picture does not carry the preset sensitive information.
  • the identification information of the picture is "Zhang San 11010219880272314", that is, the identification information of the picture is composed of the name and the ID number.
  • the file identification information of the encrypted file corresponding to the picture may be, for example, “../X00000000001001/A”, and the name and the ID number cannot be known from the file identification information of the encrypted file corresponding to the picture. , thus protecting the preset sensitive information.
  • step S207 If the preset sensitive information is not carried in the identifier information of the picture, set the identifier information of the picture as the file identifier information of the encrypted file corresponding to the picture, and perform step S208.
  • the picture identification information is "picture0010", and the identification information of the picture does not carry the preset sensitive information.
  • the file identification information of the encrypted file corresponding to the picture is set to "picture0010".
  • the server generates an empty file directory, and then writes the file identification information of the encrypted file into the file directory.
  • the server obtains the access permission information set by the user for the file directory, and then sets the access permission of the file directory according to the access permission information. That is to say, in this embodiment, the user can set access rights for the file directory to exclude some illegal users from accessing the picture.
  • the access right information may be, for example, the access key 1534avrd, and only the user who accurately inputs the access key has access to the encrypted file in the file directory. It is also equivalent to setting access rights for each encrypted file in the file directory.
  • step S204 can be merged into step S201.
  • step S205 and related steps may be performed before step S202 and the like.
  • the sample database is used for storing and managing data such as training samples required for algorithms such as face recognition.
  • the server may send the file directory to the legal terminal user, that is, the file identifier information corresponding to the encrypted file in the file directory is sent to the legal terminal user, so that the legal terminal user needs to use one or some When encrypting a file, the encrypted file can be obtained from the server.
  • an end user When an end user needs to use one or some pictures in the sample database, it can send an access request to the server.
  • the server receives the access request, the access request may be parsed to obtain information such as a transport key, end user identity information, and file identification information of the target file.
  • the transmission key is a key randomly generated by the terminal for encrypting the transmission data during the data transmission.
  • the end user identity information may include information for verifying whether the end user has access rights.
  • the server may first determine whether the transmission key is valid. Specifically, the server can determine whether the transport key is used for the first time and is in a valid use period.
  • the transport key carries time information when the terminal generates the transport key, and the server may determine, according to time information in the transport key, whether the transport key is within a valid use period. If it is determined that the transmission key is used for the first time and is in a valid use period, it is determined that the transmission key is valid. Otherwise the transmission key will be invalidated.
  • the server After determining that the transmission key is valid, the server further determines whether the identity information of the terminal user matches the access authority information of the file directory, that is, whether the terminal user has the right to access the file directory. If the terminal user identity information matches the access permission information of the file directory, the terminal user is a legitimate user and can access the file directory. In this case, step S213 is performed.
  • the sequence in which the server determines whether the transmission key is valid and determines whether the identity information of the terminal user matches the access authority information is not limited to the foregoing sequence, and may further determine whether the identity information of the terminal user is related to the access. The permission information is matched, and then the transmission key is determined to be valid. No specific restrictions are imposed here.
  • step S214 is performed.
  • the server obtains the corresponding encrypted file according to the identification information of the target file in the access request, and then decrypts the encrypted file to obtain the target file, and executes step S215.
  • the method before decrypting the encrypted file corresponding to the identifier information of the target file to obtain the target file, the method further includes: acquiring network address information of the terminal; determining whether the network address information matches the preset network address information; And if the network address information matches the preset network address information, performing the step of decrypting the encrypted file corresponding to the identification information of the target file to obtain a target file.
  • the network address information may be, for example, IP address information.
  • the access request is ignored, thereby ensuring the security of the data information in the sample database, and avoiding leaking the encrypted file in the sample database to illegal user.
  • the server may perform encryption processing on the target file based on the AES encryption algorithm and the transmission key to obtain an encrypted target file.
  • the server sends the encrypted target file to the terminal.
  • the terminal After the terminal receives the encrypted target file, the terminal can decrypt the encrypted target file according to the transport key, thereby acquiring the target file.
  • a picture that does not carry preset sensitive information may be selected as a picture of a face recognition algorithm, and the identification information of the picture and the picture is encrypted and stored to reduce the picture or picture. Identify the risk of leakage of sensitive information caused by information leakage and improve the security of image storage.
  • the server when the server provides some pictures to the terminal, the server needs to judge the transmission key sent by the terminal and the identity information of the terminal user, and after the judgment, the server encrypts the required target file.
  • the encrypted target file is transmitted to the terminal, and the entire process does not require manual repetitive operations, which improves data extraction efficiency, saves time, and ensures data transmission security.
  • FIG. 6 is a schematic block diagram of a picture management apparatus according to an embodiment of the present application.
  • the picture management apparatus 300 can be installed in a server, for example, the server can be a server for managing and storing pictures.
  • the picture management apparatus 300 includes an acquisition unit 301, an identification unit 302, an encryption unit 303, and a storage unit 304.
  • the obtaining unit 301 is configured to acquire a picture.
  • the identifying unit 302 is configured to identify whether the preset sensitive information is carried in the picture.
  • the identification unit 302 identifies, by the OCR image recognition technology, whether the preset sensitive information is carried in the picture.
  • the encryption unit 303 is configured to: if the preset sensitive information is not carried in the picture, encrypt the picture according to a file encryption algorithm to obtain a corresponding encrypted file.
  • FIG. 7 is a specific schematic block diagram of a picture management apparatus shown in FIG. 6.
  • the encryption unit 303 includes a transcoding unit 3031 and a file encryption unit 3032.
  • the transcoding unit 3031 is configured to perform Base64 transcoding processing on the picture to generate a corresponding Base64 encoded file.
  • the file encryption unit 3032 is configured to perform encryption processing on the Base64 encoded file based on a file encryption algorithm to generate an encrypted file.
  • FIG. 8 is a specific schematic block diagram of a picture management apparatus shown in FIG. 7.
  • the file encryption unit 3032 includes a generation subunit 30321, a key calculation subunit 30322, and a file encryption subunit 30323.
  • the generating subunit 30321 is configured to generate an initial key, and perform encryption processing on the Base64 encoded file based on the AES encryption algorithm and the initial key to generate a primary encrypted file.
  • the key calculation sub-unit 30322 is configured to calculate a secondary key according to the initial calculation rule according to the initial calculation rule.
  • the key calculation sub-unit 30322 is specifically configured to acquire current time information; convert the current time information into a corresponding time string; and base the AES encryption algorithm and the initial key.
  • the time string is encrypted to calculate a secondary key.
  • the secondary key is still a private key, and at this time, the secret
  • the key calculation sub-unit 30322 is specifically configured to number the at least two Base64 encoded files currently processed in parallel; obtain current time information; convert the current time information into a corresponding time string, and each of the Base64 Converting the number corresponding to the encoded file into a corresponding numbered string; encrypting the time string and the numbered string based on the AES encryption algorithm and the initial key to calculate two corresponding to each of the Base64 encoded files Level key.
  • the file encryption subunit 30323 is configured to perform secondary encryption processing on the primary encrypted file based on a preset encryption algorithm and the secondary key to generate an encrypted file.
  • the file encryption subunit 30323 is configured to perform string processing on the character string in the primary encrypted file according to a first preset number of bits to generate a corresponding file array, and to use characters in the secondary key.
  • the string is arrayed according to a second predetermined number of bits to generate a corresponding key array; and elements in the file array and elements in the key array are recombined to generate an encrypted file.
  • the file encryption unit 3032 may perform only one encryption process on the generated Base64 encoded file to generate an encrypted file.
  • the file encryption unit 3032 is configured to: generate an initial key; perform encryption processing on the Base64 encoded file based on the AES encryption algorithm and the initial key to generate an encrypted file.
  • the storage unit 304 is configured to store the encrypted file into a sample database.
  • storage unit 304 may store the encrypted file into a sample database based on a distributed storage technology.
  • the picture management apparatus 300 in this embodiment first filters out pictures that do not carry preset sensitive information as pictures of face recognition algorithms, and then encrypts and stores the pictures to reduce the risk of picture leakage and improve picture storage. safety.
  • FIG. 9 is a schematic block diagram of a picture management apparatus according to an embodiment of the present application.
  • the picture management device 400 is installed in a server.
  • the server may be a server for managing and storing pictures.
  • the picture management apparatus 400 includes an obtaining unit 401, an identifying unit 402, an encrypting unit 403, an identifier acquiring unit 404, an information identifying unit 405, a serialization processing unit 406, an identifier setting unit 407, a directory generating unit 408, The setting unit 409, the storage unit 410, the request acquisition unit 411, the determination unit 412, the decryption unit 413, the object file encryption unit 414, and the transmission unit 415.
  • the obtaining unit 401 is configured to acquire a picture.
  • the identifying unit 402 is configured to identify whether the preset sensitive information is carried in the picture.
  • the identification unit 402 identifies, by the OCR image recognition technology, whether the preset sensitive information is carried in the picture.
  • the encryption unit 403 is configured to: if the preset sensitive information is not carried in the picture, encrypt the picture according to a file encryption algorithm to obtain a corresponding encrypted file.
  • the encryption unit 403 is configured to perform Base64 transcoding processing on the picture to generate a corresponding Base64 encoded file; and perform encryption processing on the Base64 encoded file to generate an encrypted file based on a file encryption algorithm.
  • the identifier obtaining unit 404 is configured to acquire identifier information of the image.
  • the information identifying unit 405 is configured to identify whether the preset sensitive information is carried in the identification information of the picture.
  • the information identifying unit 405 can identify whether the preset sensitive information is carried in the identification information of the picture by using an OCR image recognition technology.
  • the serialization processing unit 406 is configured to: if the preset information is carried in the identification information of the picture, serialize the identification information of the picture according to a serialization algorithm to obtain a file of the encrypted file corresponding to the picture Identification information.
  • the identifier setting unit 407 is configured to: if the preset sensitive information is not carried in the identifier information of the image, set the identifier information of the image as the file identifier information of the encrypted file corresponding to the image.
  • the directory generating unit 408 is configured to generate a file directory according to the file identification information of the encrypted file.
  • the setting unit 409 is configured to acquire access authority information of the file directory, and set an access right of the file directory according to the access right information.
  • the storage unit 410 is configured to store the encrypted file and the file directory into the sample database.
  • the request obtaining unit 411 is configured to obtain an access request sent by the terminal, where the access request includes a transport key, terminal user identity information, and file identifier information of the target file.
  • the transmission key is a key randomly generated by the terminal for encrypting the transmission data during the data transmission.
  • the end user identity information may include information for verifying whether the end user has access rights.
  • the determining unit 412 is configured to determine whether the transmission key is valid and whether the terminal user identity information matches the access authority information of the file directory.
  • the determining unit 412 determines that the transmission key is invalid, or determines that the terminal user identity information does not match the access authority information, the determining unit 412 will ignore the access request.
  • the judging unit 412 judges that the transmission key is valid and the terminal user identity information matches the access authority information, the judging unit 412 will transmit a signal to the decrypting unit 413 to cause the decrypting unit 413 to perform a corresponding operation.
  • the decrypting unit 413 is configured to decrypt the encrypted file corresponding to the identification information of the target file to obtain the target file, if the transport key is valid and the terminal user identity information matches the access rights information.
  • the decrypting unit 413 is configured to acquire network address information of the terminal before decrypting the encrypted file corresponding to the identification information of the target file to obtain the target file, and determine whether the network address information is related to The preset network address information is matched; if the network address information matches the preset network address information, performing an operation of decrypting the encrypted file corresponding to the identification information of the target file to obtain the target file.
  • the target file encryption unit 414 is configured to perform encryption processing on the target file based on the AES encryption algorithm and the transmission key to obtain an encrypted target file.
  • the sending unit 415 is configured to send the encrypted target file to the terminal, so that the terminal decrypts the encrypted target file according to the transport key to obtain the target file.
  • the picture management apparatus 400 in this embodiment can reduce the risk of leakage of sensitive information caused by the disclosure of the identification information of the picture or the picture, and improve the security of the picture storage.
  • the picture management apparatus 400 provides certain pictures to the terminal, the data extraction efficiency can be improved, time is saved, and the security of data transmission is also ensured.
  • FIG. 10 is a schematic block diagram of a computer device according to an embodiment of the present application.
  • the computer device 500 device can be a server.
  • the computer device 500 includes a processor 502, a memory, and a network interface 505 connected by a system bus 501, wherein the memory can include a non-volatile storage medium 503 and an internal memory 504.
  • the non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032.
  • the computer program 5032 includes program instructions that, when executed, cause the processor 502 to perform a picture management method.
  • the processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500.
  • the internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503, which when executed by the processor 502, may cause the processor 502 to perform a picture management method.
  • the network interface 505 is used for network communication, such as sending assigned tasks and the like. It will be understood by those skilled in the art that the structure shown in FIG.
  • 10 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation of the computer device 500 to which the solution of the present application is applied, and a specific computer device. 500 may include more or fewer components than shown, or some components may be combined, or have different component arrangements.
  • the processor 502 is configured to run the computer program 5032 stored in the memory to: acquire a picture; identify whether the picture carries preset sensitive information; if the picture does not carry the preset Sensitive information, the image is encrypted according to a file encryption algorithm to obtain a corresponding encrypted file; and the encrypted file is stored into a sample database.
  • the processor 502 when the processor 502 performs the encryption process on the image to obtain the corresponding encrypted file, the processor 502 performs the following functions: performing Base64 transcoding on the image to generate a corresponding Base64 code. a file; encrypting the Base64 encoded file based on a file encryption algorithm to generate an encrypted file.
  • the processor 502 when performing the encryption processing on the Base64 encoded file by the file encryption algorithm to generate the encrypted file, specifically implements the following functions: generating an initial key, and based on the AES encryption algorithm and the initial secret Decrypting the Base64 encoded file to generate a primary encrypted file; calculating a secondary key according to the initial calculation rule according to the preset calculation rule; and using the preset encryption algorithm and the secondary key pair to the primary
  • the encrypted file is subjected to secondary encryption processing to generate an encrypted file.
  • the processor 502 when performing the calculation of the secondary key according to the initial calculation rule according to the initial key, specifically implements the following functions: acquiring current time information; and converting the current time information into a corresponding a time string; the time string is encrypted based on the AES encryption algorithm and the initial key to calculate a secondary key.
  • the processor 502 when performing a secondary encryption process on the primary encrypted file to generate an encrypted file based on a preset encryption algorithm and the secondary key, specifically implements the following function: The string in the file is arrayed according to the first preset number of bits to generate a corresponding file array, and the string in the secondary key is arrayed according to the second preset number of bits to generate a corresponding An array of keys; reorganize the elements in the file array and the elements in the key array to generate an encrypted file.
  • the processor 502 before performing the storing the encrypted file in the sample database, the processor 502 further implements the following functions: acquiring identification information of the image; and identifying whether the preset information of the image carries the preset Sensitive information; if the preset information is carried in the identification information of the picture, the identification information of the picture is serialized according to a serialization algorithm to obtain file identification information of the encrypted file corresponding to the picture; The file identification information of the encrypted file generates a file directory; obtains access authority information of the file directory, and sets an access right of the file directory according to the access permission information.
  • the processor 502 when executing the storing the encrypted file into the sample database, the processor 502 specifically implements the function of storing the encrypted file and the file directory into the sample database.
  • the processor 502 further implements a function of: acquiring an access request sent by the terminal, where the access request includes a transmission key, and the terminal User identity information and file identification information of the target file; determining whether the transmission key is valid and whether the terminal user identity information matches the access authority information of the file directory; if the transmission key is valid and the terminal The user identity information is matched with the access permission information, and the encrypted file corresponding to the identification information of the target file is decrypted to obtain a target file; and the target file is encrypted according to the AES encryption algorithm and the transmission key.
  • Obtaining an encrypted target file ; transmitting the encrypted target file to the terminal, so that the terminal decrypts the encrypted target file according to the transport key to obtain the target file.
  • the processor 502 may be a central processing unit (CPU), and the processor 502 may also be another general-purpose processor, a digital signal processor (DSP), Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, etc.
  • the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Power Engineering (AREA)
  • Storage Device Security (AREA)

Abstract

一种图片管理方法、装置、计算机设备及存储介质。方法包括:获取图片(S101);识别所述图片中是否携带预设敏感信息(S102);若所述图片中未携带预设敏感信息,基于文件加密算法对所述图片进行加密处理以得到对应的加密文件(S103);存储所述加密文件至样图数据库中(S104)。

Description

一种图片管理方法、装置、计算机设备及存储介质
本申请要求于2018年4月27日提交中国专利局、申请号为201810394760.3、发明名称为“一种图片管理方法、装置、计算机设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机技术领域,尤其涉及一种图片管理方法、装置、计算机设备及存储介质。
背景技术
人脸识别算法等一般都需要百万级以上的样本图片(以下简称样图)作为正负样本进行算法训练,以提高识别的准确性。目前企业对这些样图的管理方式是将这些样图简单地收集在一个图库中,当某个算法训练过程需要用到这些样图时,需要人工筛选出相应的样图,然后将这些样图进行打包压缩来传输至终端中。然而,目前这种样图管理方式很容易在样图存储、筛选、传输等过程中造成泄露,给样图中的人物造成安全隐患。
因此,如何有效地、安全地管理这些样图成为亟待解决的问题。
发明内容
本申请提供了一种图片管理方法、装置、计算机设备及存储介质,以提高图片管理的安全性。
第一方面,本申请提供了一种图片管理方法,其包括:获取图片;识别所述图片中是否携带预设敏感信息;若所述图片中未携带所述预设敏感信息,基于文件加密算法对所述图片进行加密处理以得到对应的加密文件;存储所述加密文件至样图数据库中。
第二方面,本申请提供了一种图片管理装置,其包括:获取单元,用于获取图片;识别单元,用于识别所述图片中是否携带预设敏感信息;加密单元, 用于若所述图片中未携带所述预设敏感信息,基于文件加密算法对所述图片进行加密处理以得到对应的加密文件;存储单元,用于存储所述加密文件至样图数据库中。
第三方面,本申请又提供了一种计算机设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现本申请提供的任一项所述的图片管理方法。
第四方面,本申请还提供了一种存储介质,其中所述存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令当被处理器执行时使所述处理器执行本申请提供的任一项所述的图片管理方法。
本申请提供一种图片管理方法、装置、计算机设备及存储介质。该图片管理方法先筛选出不携带预设敏感信息的图片作为人脸识别算法等方面的图片,并对这些图片进行加密存储,以降低图片泄露的风险,提高图片存储的安全性。
附图说明
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例提供的一种图片管理方法的示意流程图;
图2为图1所示的一种图片管理方法的具体示意流程图;
图3为图2所示的一种图片管理方法的具体示意流程图;
图4为图2所示的一种图片管理方法的另一具体示意流程图;
图5为本申请实施例提供的一种图片管理方法的示意流程图;
图6为本申请实施例提供的一种图片管理装置的示意性框图;
图7为图6所示的一种图片管理装置的具体示意性框图;
图8为图7所示的一种图片管理装置的具体示意性框图;
图9为本申请实施例提供的一种图片管理装置的示意性框图;
图10为本申请实施例提供的一种计算机设备的示意性框图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
请参阅图1,图1是本申请实施例提供的一种图片管理方法的示意流程图。该图片管理方法应用于服务器中,譬如,该服务器可以为用于管理、存储图片的服务器。如图1所示,该图片管理方法包括步骤S101~S104。
S101、获取图片。
在本实施例中,服务器中设有图片库,该图片库为用于存储各种图片的数据库。服务器从图片库中读取图片,并执行步骤S102。
S102、识别所述图片中是否携带预设敏感信息。
具体地,在一实施例中,可以通过OCR图像识别技术来识别所述图片中是否携带预设敏感信息。其中,该预设敏感信息可以为文字信息。譬如,预设敏感信息可以为姓名、地址、身份证号码、电话号码等涉及个人隐私方面的信息。另外,该预设敏感信息的文字种类不限于汉字、英文、数字等类别。
当服务器识别出图片中携带有预设敏感信息时,为了防止后续造成预设敏感信息泄露,此时服务器可以将该图片丢弃在图片库中,即,不采用该图片作为人脸识别等算法的训练样本。当服务器识别出图片中不携带预设敏感信息时,说明该图片可以作为人脸识别等算法的训练样本,服务器将执行步骤S103。
譬如,假设该图片为张三的身份证件照片,那么该图片中将势必携带有张三的头像、姓名、身份证号码等信息,服务器通过OCR图像识别技术可以识别出该图片中存在预设敏感信息,服务器将该图片丢弃在图片库中,即不使用该图片作为人脸识别等算法的训练样本。
S103、若所述图片中未携带所述预设敏感信息,基于文件加密算法对所述图片进行加密处理以得到对应的加密文件。
为了保证图片的安全性,在存储图片之前,需要对该图片进行加密处理以生成图片对应的加密文件。具体地,在一实施例中,如图2所示,图2为图1所示的一种图片管理方法的具体示意流程图。该步骤S103包括步骤S1031和S1032。
S1031、对所述图片进行Base64转码处理以生成对应的Base64编码文件。
首先,将图片进行Base64转码处理,以将图片格式转换成Base64编码文件。也就是说,将图片格式转换成了包含字符串的文件。在获取图片对应的Base64编码文件之后,执行步骤S1032。
S1032、基于文件加密算法对所述Base64编码文件进行加密处理以生成加密文件。
在一实施例中,为了提高加密文件的安全性,可以基于文件加密算法对Base64编码文件进行双重加密处理,以生成加密文件。
具体地,如图3所示,图3为图2所示的一种图片管理方法的具体示意流程图。该步骤S1032具体包括步骤S1032a至S1032c。
S1032a、生成初始密钥,并基于AES加密算法和所述初始密钥对所述Base64编码文件进行加密处理以生成初级加密文件。
在一实施例中,该初始密钥可以是随机动态生成的密钥。一般来说,服务器会处理很多张图片,为了提高图片的安全等级,避免多张图片被同一个密钥解密,该初始密钥为私有密钥,即多张图片的初始密钥是互不相同的,通过随机动态生成的方式获得互不相同的初始密钥。当然,在其他实施例中,初始密钥也可以为公有密钥,即多张图片可以共用同一个初始密钥。当服务器串行或并行批量处理多张图片时,处理每张图片所生成的初始密钥均相同。
在生成初始密钥后,基于AES加密算法和初始密钥对Base64编码文件进行加密处理,进而生成图片对应的初级加密文件,即完成第一重加密处理。
S1032b、根据所述初始密钥按照预设计算规则计算出二级密钥。
具体地,在一实施例中,根据所述初始密钥按照预设计算规则计算出二级密钥,包括:获取当前时间信息;将所述当前时间信息转成对应的时间字符串;基于所述AES加密算法和所述初始密钥对所述时间字符串进行加密以计算出二级密钥。其中,当前时间信息为服务器当前处理图片的时间信息。譬如,当前时间信息可例如为2018.1.10.18.20.50.230。将该当前时间信息转换成对应的时间字符串后,通过AES加密算法和初始密钥对时间字符串进行加密,从而计算出二级密钥。
为了提高加密文件的安全性,该二级密钥为私有密钥,即每张图片对应的二级密钥互不相同。为了保证二级密钥为私有密钥,当初始密钥为私有密钥时,服务器可以采用串行或并行处理多张图片;当初始密钥为公有密钥时,服务器 需选择串行处理图片,以保证处理每张图片所获取的当前时间信息互不相同,进而得到互不相同的二级密钥。当然,在其他实施例中,二级密钥也可以是公有密钥,在此不做具体限制。
具体地,在另一实施例中,为了提高图片的处理效率,服务器可以并行处理多张图片,但这样会使得在初始密钥为公有密钥的情况下,多张图片对应的当前时间信息为相同的时间信息,进而使得生成的二级密钥为公有密钥,降低加密文件的安全性。
为了在初始密钥为公有密钥,且服务器以并行方式处理多张图片的情况下,二级密钥仍然为私有密钥,此时,根据所述初始密钥按照预设计算规则计算出二级密钥,包括:对当前并行处理的至少两个所述Base64编码文件进行编号;获取当前时间信息;将所述当前时间信息转成对应的时间字符串,以及将每个所述Base64编码文件对应的编号转成对应的编号字符串;基于所述AES加密算法和所述初始密钥对所述时间字符串和编号字符串进行加密以计算出每个所述Base64编码文件对应的二级密钥。
譬如,假设服务器对十个Base64编码文件并行进行加密处理,为了可以使得每个Base64编码文件对应的二级密钥是互不相同的,提高Base64编码文件的安全等级,服务器先对当前批量处理的十个Base64编码文件进行编号,比如,编号依次为“001”、“002”……“010”等。然后再获取当前时间信息,并将当前时间信息和十个Base64编码文件对应的编号分别转换成相应的字符串。具体地,将当前时间信息转换成时间字符串,将每个Base64编码文件对应的编号转换成编号字符串。再基于AES加密算法和初始密钥对时间字符串和编号字符串进行加密以得到每个Base64编码文件对应的二级密钥。这样,虽然十个Base64编码文件对应的当前时间信息相同,但由于引入了互不相同的编号,使得最后生成的二级密钥仍然为私有密钥。
可以理解的是,在其他实施例中,也可以将编号替换成其他内容,只要作用等同于编号的作用即可,在此不做具体限制。
S1032c、基于预设加密算法和所述二级密钥对所述初级加密文件进行二次加密处理以生成加密文件。
具体地,在一实施例中,基于预设加密算法和所述二级密钥对所述初级加密文件进行二次加密处理以生成加密文件,包括:将所述初级加密文件中的字 符串按照第一预设位数进行数组化处理以生成对应的文件数组,以及将所述二级密钥中的字符串按照第二预设位数进行数组化处理以生成对应的密钥数组;将所述文件数组中的元素和密钥数组中的元素进行重组以生成加密文件。
譬如,假设第一预设位数为10,第二预设位数为1,那么将初级加密文件中的字符串以10位为一个单位进行划分,每10个字符形成的字符串作为文件数组的一个元素。同理,可以将二级密钥中的字符串以1位为一个单位进行划分,每个字符作为密钥数组的一个元素。然后再将文件数组和密钥数组中的元素进行重组。例如,文件数组中的多个元素分别表示为A 1、A 2、A 3……A n,密钥数组中的多个元素分别表示为B 1、B 2、B 3……B n,将文件数组和密钥数组中相同位置的元素按一定顺序排列,以形成A 1B 1A 2B 2A 3B 3…A nB n的新的字符串,该新的字符串所在的文件即为加密文件。
在一些情况下,文件数组中的元素个数会比密钥数组中的元素个数多,此时可以将文件数组中多余出来的元素按照顺序排列在新的字符串后面,如,A 1B 1A 2B 2…A nB nA n+1A n+2A n+3A n+4…。另外,文件数组和密钥数组中的元素按一定顺序排列的方式也不局限于上述例子中的方式,还可以为其他方式,譬如,可以以A 1A 2B 1A 3A 4B 2A 5A 6B 3…A 2nB n的形式进行排列。
另外,在其他实施例中,也可以只对步骤S1031中生成的Base64编码文件进行一重加密处理,以生成加密文件。具体地,如图4所示,图4为图2所示的一种图片管理方法的另一具体示意流程图。该步骤S1032包括步骤S1032d和步骤S1032e。
S1032d、生成初始密钥。
其中,该初始密钥可以为随机动态生成的密钥。在一实施例中,为了提高图片的安全等级,避免多张图片被同一个密钥解密,初始密钥为私有密钥。当然,在其他实施例中,初始密钥也可以为公有密钥。
S1032e、基于AES加密算法和所述初始密钥对所述Base64编码文件进行加密处理以生成加密文件。
在生成初始密钥后,基于AES加密算法和初始密钥对Base64编码文件进行加密处理,进而生成加密文件。
S104、存储所述加密文件至样图数据库中。
具体地,在一实施例中,可以基于分布式存储技术存储加密文件至样图数 据库中。该样图数据库用于存储、管理人脸识别等算法所需的训练样图对应的加密文件。
本实施例中的图片管理方法,先筛选出不携带预设敏感信息的图片作为人脸识别算法等方面的图片,再对这些图片进行加密存储,以降低图片泄露的风险,提高图片存储的安全性。
请参阅图5,图5为本申请实施例提供的一种图片管理方法的示意流程图。该图片管理方法应用于服务器中,譬如,该服务器可以为用于管理、存储图片的服务器。如图5所示,该图片管理方法包括步骤S201~S216。
S201、获取图片。
S202、识别所述图片中是否携带预设敏感信息。
具体地,在一实施例中,可以通过OCR图像识别技术来识别所述图片中是否携带预设敏感信息。
S203、若所述图片中未携带所述预设敏感信息,基于文件加密算法对所述图片进行加密处理以得到对应的加密文件。
为了保证图片的安全性,在存储图片之前,需要对该图片进行加密处理以生成图片对应的加密文件。具体地,在一实施例中,步骤S203包括:对所述图片进行Base64转码处理以生成对应的Base64编码文件;基于文件加密算法对所述Base64编码文件进行加密处理以生成加密文件。
由于前述实施例中已经对步骤S201、S202、S203中的具体内容做了详细地说明,为了说明书的简洁性,在此不再赘述。
S204、获取所述图片的标识信息。
在某些情况下,为了提高图片的辨识度,方便工作人员查找图片,工作人员往往会以姓名、姓名加身份证号等方式命名图片,这样就导致图片的名称中携带了预设敏感信息。若图片发生泄漏,不法人员可以通过图片的名称来获取到预设敏感信息。为了避免通过图片的标识信息泄露预设敏感信息,需要获取图片的标识信息。其中,该图片的标识信息可例如为图片的名称。
S205、识别所述图片的标识信息中是否携带所述预设敏感信息。
具体地,可以通过OCR图像识别技术来识别所述图片的标识信息中是否携带预设敏感信息。当识别出图片的标识信息中携带所述预设敏感信息时,为了 避免预设敏感信息发生泄露,服务器将执行步骤S206。当识别出图片的标识信息中未携带所述预设敏感信息时,服务器将执行步骤S207。
S206、若所述图片的标识信息中携带所述预设敏感信息,基于序列化算法对所述图片的标识信息进行序列化处理以得到所述图片对应的加密文件的文件标识信息。
当图片的标识信息中携带预设敏感信息时,可以通过序列化算法对图片的标识信息进行序列化处理以得到图片对应的加密文件的文件标识信息,并执行步骤S208。可以理解的是,该图片对应的加密文件的文件标识信息中将不携带预设敏感信息。
譬如,图片的标识信息为“张三11010219880272314”,即该图片的标识信息由姓名和身份证号码组成。经过序列化算法处理后,该图片对应的加密文件的文件标识信息可例如为“../X00000000001001/A”,从该图片对应的加密文件的文件标识信息中就无法得知姓名和身份证号码,从而保护了预设敏感信息。
S207、若所述图片的标识信息中未携带所述预设敏感信息,将所述图片的标识信息设为所述图片对应的加密文件的文件标识信息,并执行步骤S208。
譬如,图片的标识信息为“picture0010”,此图片的标识信息中不会携带预设敏感信息,此时该图片对应的加密文件的文件标识信息设置为“picture0010”。
S208、根据所述加密文件的文件标识信息生成文件目录。
具体地,服务器生成一个空的文件目录,然后将加密文件的文件标识信息写入该文件目录中。
S209、获取所述文件目录的访问权限信息,并根据所述访问权限信息设置所述文件目录的访问权限。
为了提高图片的安全性,服务器获取用户为文件目录设置的访问权限信息,然后根据访问权限信息设置文件目录的访问权限。也就是说,在本实施例中,用户可以为文件目录设置访问权限,以排除一些非法用户访问图片。
譬如,该访问权限信息可例如为访问密钥1534avrd,只有准确地输入该访问密钥的用户,才有机会访问到该文件目录中的加密文件。也相当于,设置了文件目录中每个加密文件的访问权限。
需要说明的是,步骤S201至步骤S209的先后顺序可以做相应调整,各个步骤的顺序不局限于图5所示的顺序。譬如,步骤S204可以合并至步骤S201 中。又譬如,步骤S205及相关步骤可以放在步骤S202之前执行等等。
S210、存储所述加密文件和文件目录至样图数据库中。
在获得图片对应的加密文件以及文件目录后,将加密文件和文件目录存储在样图数据库中。其中,该样图数据库用于存储、管理人脸识别等算法所需的训练样图等数据。
在执行完步骤S210之后,服务器可以将文件目录发送至合法的终端用户,即将文件目录中的加密文件对应的文件标识信息发送至合法的终端用户,使得合法的终端用户在需要使用某个或某些加密文件时,可以向服务器获取该加密文件。
S211、获取终端发送的访问请求,其中,所述访问请求包括传输密钥、终端用户身份信息和目标文件的文件标识信息。
当某个终端用户需要使用样图数据库中某个或某些图片时,其可以向服务器发送访问请求。当服务器接收到访问请求时,可以解析该访问请求以获取到传输密钥、终端用户身份信息和目标文件的文件标识信息等信息。其中,该传输密钥为终端随机生成的用于数据传输过程中对传输数据进行加密的密钥。该终端用户身份信息可以包括用于验证终端用户是否具有访问权限的信息。
S212、判断所述传输密钥是否有效且所述终端用户身份信息是否与所述文件目录的访问权限信息相匹配。
在一实施例中,为了保证数据在传输过程中的安全性,服务器可以先判断传输密钥是否有效。具体地,服务器可以判断传输密钥是否是第一次使用且是否处于有效使用期内。其中,该传输密钥中携带有终端生成该传输密钥时的时间信息,服务器可以根据传输密钥中的时间信息判断传输密钥是否在有效使用期内。若判断出传输密钥是第一次使用且处于有效使用期内,则判定该传输密钥有效。否则将判定传输密钥无效。
在判断出传输密钥有效后,服务器再判断终端用户身份信息是否与文件目录的访问权限信息相匹配,即,确认终端用户是否具有访问该文件目录的权限。若终端用户身份信息与文件目录的访问权限信息相匹配,说明终端用户是合法用户,可以访问文件目录,此时将执行步骤S213。
需要说明的是,服务器判断传输密钥是否有效和判断终端用户身份信息是否与所述访问权限信息相匹配的先后顺序不局限于上述的顺序,还可以先判断 终端用户身份信息是否与所述访问权限信息相匹配,再判断传输密钥是否有效,在此不做具体限制。另外,当服务器判断出传输密钥无效,或者判断出终端用户身份信息与所述访问权限信息不匹配时,将执行步骤S214。
S213、若所述传输密钥有效且所述终端用户身份信息与所述访问权限信息相匹配,对所述目标文件的标识信息对应的加密文件进行解密以获得目标文件。
服务器根据访问请求中目标文件的标识信息获取到对应的加密文件,然后对加密文件进行解密来获取到目标文件,并执行步骤S215。
在一实施例中,当样图数据库内的数据仅供特定终端使用时,比如,样图数据库内的数据仅供某企业的终端使用或仅供某企业中某几台终端使用时,在所述对所述目标文件的标识信息对应的加密文件进行解密以获得目标文件之前,还包括:获取所述终端的网络地址信息;判断所述网络地址信息是否与预设的网络地址信息相匹配;若所述网络地址信息与所述预设的网络地址信息相匹配,执行对所述目标文件的标识信息对应的加密文件进行解密以获得目标文件的步骤。其中,该网络地址信息可例如为IP地址信息。通过上述判断网络地址信息是否与预设的网络地址信息相匹配,可以排除企业以外的其他终端或者企业内其他终端使用该样图数据库。
S214、若所述传输密钥无效,或者所述终端用户身份信息与所述访问权限信息不匹配,忽略所述访问请求。
当判断出传输密钥无效,或者终端用户身份信息与访问权限信息不匹配时,忽略该访问请求,从而保证样图数据库中的数据信息的安全性,避免将样图数据库中的加密文件泄露给非法用户。
S215、基于AES加密算法和所述传输密钥对所述目标文件进行加密处理以得到加密目标文件。
为了确保目标文件在传输过程中的安全性,在本实施例中,服务器可以基于AES加密算法和传输密钥对目标文件进行加密处理以得到加密目标文件。
S216、发送所述加密目标文件至所述终端,以使得所述终端根据所述传输密钥对所述加密目标文件进行解密以获取所述目标文件。
服务器将加密目标文件发送至终端。这样终端接收到加密目标文件后,可以根据传输密钥对加密目标文件进行解密,从而获取到目标文件。
本实施例中的图片管理方法,可以筛选出不携带预设敏感信息的图片作为 人脸识别算法等方面的图片,并对这些图片以及图片的标识信息进行加密存储,以降低因图片或图片的标识信息泄露而导致敏感信息泄露的风险,提高图片存储的安全性。另外,该图片管理方法,在服务器向终端提供某些图片时,服务器需对终端发送的传输密钥以及终端用户身份信息进行相应判断,在通过判断后,服务器将所需的目标文件进行加密处理并将加密目标文件传输至终端,整个过程无需人工重复性操作,提高数据提取效率,节省时间,同时也保证了数据传输的安全性。
本申请实施例还提供一种图片管理装置,该图片管理装置用于执行前述任一项图片管理方法。具体地,请参阅图6,图6是本申请实施例提供的一种图片管理装置的示意性框图。图片管理装置300可以安装于服务器中,譬如,该服务器可以为用于管理、存储图片的服务器。如图6所示,图片管理装置300包括获取单元301、识别单元302、加密单元303和存储单元304。
获取单元301,用于获取图片。
识别单元302,用于识别所述图片中是否携带预设敏感信息。
具体地,在一实施例中,识别单元302通过OCR图像识别技术来识别所述图片中是否携带预设敏感信息。
加密单元303,用于若所述图片中未携带所述预设敏感信息,基于文件加密算法对所述图片进行加密处理以得到对应的加密文件。
具体地,在一实施例中,如图7所示,图7为图6所示的一种图片管理装置的具体示意性框图。该加密单元303包括转码单元3031和文件加密单元3032。
转码单元3031,用于对所述图片进行Base64转码处理以生成对应的Base64编码文件。
文件加密单元3032,用于基于文件加密算法对所述Base64编码文件进行加密处理以生成加密文件。
具体地,在一实施例中,如图8所示,图8为图7所示的一种图片管理装置的具体示意性框图。该文件加密单元3032包括生成子单元30321、密钥计算子单元30322和文件加密子单元30323。
生成子单元30321,用于生成初始密钥,并基于AES加密算法和所述初始密钥对所述Base64编码文件进行加密处理以生成初级加密文件。
密钥计算子单元30322,用于根据所述初始密钥按照预设计算规则计算出二级密钥。
具体地,在一实施例中,密钥计算子单元30322具体用于获取当前时间信息;将所述当前时间信息转成对应的时间字符串;以及基于所述AES加密算法和所述初始密钥对所述时间字符串进行加密以计算出二级密钥。
具体地,在另一实施例中,为了在初始密钥为公有密钥,且图片管理装置300以并行方式处理多张图片的情况下,二级密钥仍然为私有密钥,此时,密钥计算子单元30322具体用于对当前并行处理的至少两个所述Base64编码文件进行编号;获取当前时间信息;将所述当前时间信息转成对应的时间字符串,以及将每个所述Base64编码文件对应的编号转成对应的编号字符串;基于所述AES加密算法和所述初始密钥对所述时间字符串和编号字符串进行加密以计算出每个所述Base64编码文件对应的二级密钥。
文件加密子单元30323,用于基于预设加密算法和所述二级密钥对所述初级加密文件进行二次加密处理以生成加密文件。
具体地,该文件加密子单元30323用于将所述初级加密文件中的字符串按照第一预设位数进行数组化处理以生成对应的文件数组,以及将所述二级密钥中的字符串按照第二预设位数进行数组化处理以生成对应的密钥数组;以及将所述文件数组中的元素和密钥数组中的元素进行重组以生成加密文件。
另外,在其他实施例中,文件加密单元3032也可以只对生成的Base64编码文件进行一重加密处理,以生成加密文件。具体地,该文件加密单元3032用于:生成初始密钥;基于AES加密算法和所述初始密钥对所述Base64编码文件进行加密处理以生成加密文件。
存储单元304,用于存储所述加密文件至样图数据库中。
具体地,在一实施例中,存储单元304可以基于分布式存储技术存储加密文件至样图数据库中。
需要说明的是,所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的图片管理装置300和各单元的具体工作过程,可以参考前述图片管理方法实施例中的对应过程,在此不再赘述。
本实施例中的图片管理装置300,先筛选出不携带预设敏感信息的图片作为人脸识别算法等方面的图片,再对这些图片进行加密存储,以降低图片泄露的 风险,提高图片存储的安全性。
请参阅图9所示,图9为本申请实施例提供的一种图片管理装置的示意性框图。该图片管理装置400安装于服务器中,譬如,该服务器可以为用于管理、存储图片的服务器。如图9所示,该图片管理装置400包括获取单元401、识别单元402、加密单元403、标识获取单元404、信息识别单元405、序列化处理单元406、标识设置单元407、目录生成单元408、设置单元409、存储单元410、请求获取单元411、判断单元412、解密单元413、目标文件加密单元414和发送单元415。
获取单元401,用于获取图片。
识别单元402,用于识别所述图片中是否携带预设敏感信息。
具体地,在一实施例中,识别单元402通过OCR图像识别技术来识别所述图片中是否携带预设敏感信息。
加密单元403,用于若所述图片中未携带所述预设敏感信息,基于文件加密算法对所述图片进行加密处理以得到对应的加密文件。
具体地,在一实施例中,加密单元403用于对所述图片进行Base64转码处理以生成对应的Base64编码文件;基于文件加密算法对所述Base64编码文件进行加密处理以生成加密文件。
标识获取单元404,用于获取所述图片的标识信息。
信息识别单元405,用于识别所述图片的标识信息中是否携带所述预设敏感信息。
具体地,信息识别单元405可以通过OCR图像识别技术来识别所述图片的标识信息中是否携带预设敏感信息。
序列化处理单元406,用于若所述图片的标识信息中携带所述预设敏感信息,基于序列化算法对所述图片的标识信息进行序列化处理以得到所述图片对应的加密文件的文件标识信息。
标识设置单元407,用于若所述图片的标识信息中未携带所述预设敏感信息,将所述图片的标识信息设为所述图片对应的加密文件的文件标识信息。
目录生成单元408,用于根据所述加密文件的文件标识信息生成文件目录。
设置单元409,用于获取所述文件目录的访问权限信息,并根据所述访问权 限信息设置所述文件目录的访问权限。
存储单元410,用于存储所述加密文件和文件目录至样图数据库中。
请求获取单元411,用于获取终端发送的访问请求,其中,所述访问请求包括传输密钥、终端用户身份信息和目标文件的文件标识信息。
其中,该传输密钥为终端随机生成的用于数据传输过程中对传输数据进行加密的密钥。该终端用户身份信息可以包括用于验证终端用户是否具有访问权限的信息。
判断单元412,用于判断所述传输密钥是否有效且所述终端用户身份信息是否与所述文件目录的访问权限信息相匹配。
当判断单元412判断出传输密钥无效,或者判断出终端用户身份信息与所述访问权限信息不匹配时,判断单元412将忽略所述访问请求。
当判断单元412判断出传输密钥有效且所述终端用户身份信息与所述访问权限信息相匹配时,判断单元412将向解密单元413发送信号以使得解密单元413执行相应操作。
解密单元413,用于若所述传输密钥有效且所述终端用户身份信息与所述访问权限信息相匹配,对所述目标文件的标识信息对应的加密文件进行解密以获得目标文件。
在一实施例中,解密单元413在对所述目标文件的标识信息对应的加密文件进行解密以获得目标文件之前,还用于获取所述终端的网络地址信息;判断所述网络地址信息是否与预设的网络地址信息相匹配;若所述网络地址信息与所述预设的网络地址信息相匹配,执行对所述目标文件的标识信息对应的加密文件进行解密以获得目标文件的操作。
目标文件加密单元414,用于基于AES加密算法和所述传输密钥对所述目标文件进行加密处理以得到加密目标文件。
发送单元415,用于发送所述加密目标文件至所述终端,以使得所述终端根据所述传输密钥对所述加密目标文件进行解密以获取所述目标文件。
需要说明的是,所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的图片管理装置400和各单元的具体工作过程,可以参考前述图片管理方法实施例中的对应过程,在此不再赘述。
本实施例中的图片管理装置400,可以降低因图片或图片的标识信息泄露而 导致敏感信息泄露的风险,提高图片存储的安全性。另外,该图片管理装置400向终端提供某些图片时,可以提高数据提取效率,节省时间,同时也保证了数据传输的安全性。
上述图片管理装置可以实现为一种计算机程序的形式,该计算机程序可以在如图10所示的计算机设备上运行。请参阅图10,图10是本申请实施例提供的一种计算机设备的示意性框图。该计算机设备500设备可以是服务器。参阅图10,该计算机设备500包括通过系统总线501连接的处理器502、存储器和网络接口505,其中,存储器可以包括非易失性存储介质503和内存储器504。
该非易失性存储介质503可存储操作系统5031和计算机程序5032。该计算机程序5032包括程序指令,该程序指令被执行时,可使得处理器502执行一种图片管理方法。该处理器502用于提供计算和控制能力,支撑整个计算机设备500的运行。该内存储器504为非易失性存储介质503中的计算机程序5032的运行提供环境,该计算机程序5032被处理器502执行时,可使得处理器502执行一种图片管理方法。该网络接口505用于进行网络通信,如发送分配的任务等。本领域技术人员可以理解,图10中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备500的限定,具体的计算机设备500可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
其中,所述处理器502用于运行存储在存储器中的计算机程序5032,以实现如下功能:获取图片;识别所述图片中是否携带预设敏感信息;若所述图片中未携带所述预设敏感信息,基于文件加密算法对所述图片进行加密处理以得到对应的加密文件;存储所述加密文件至样图数据库中。
在一实施例中,处理器502在执行基于文件加密算法对所述图片进行加密处理以得到对应的加密文件时,具体实现如下功能:对所述图片进行Base64转码处理以生成对应的Base64编码文件;基于文件加密算法对所述Base64编码文件进行加密处理以生成加密文件。
在一实施例中,处理器502在执行基于文件加密算法对所述Base64编码文件进行加密处理以生成加密文件时,具体实现如下功能:生成初始密钥,并基于AES加密算法和所述初始密钥对所述Base64编码文件进行加密处理以生成初 级加密文件;根据所述初始密钥按照预设计算规则计算出二级密钥;基于预设加密算法和所述二级密钥对所述初级加密文件进行二次加密处理以生成加密文件。
在一实施例中,处理器502在执行根据所述初始密钥按照预设计算规则计算出二级密钥时,具体实现如下功能:获取当前时间信息;将所述当前时间信息转成对应的时间字符串;基于所述AES加密算法和所述初始密钥对所述时间字符串进行加密以计算出二级密钥。
在一实施例中,处理器502在执行基于预设加密算法和所述二级密钥对所述初级加密文件进行二次加密处理以生成加密文件时,具体实现如下功能:将所述初级加密文件中的字符串按照第一预设位数进行数组化处理以生成对应的文件数组,以及将所述二级密钥中的字符串按照第二预设位数进行数组化处理以生成对应的密钥数组;将所述文件数组中的元素和密钥数组中的元素进行重组以生成加密文件。
在一实施例中,处理器502在执行存储所述加密文件至样图数据库中之前,还实现如下功能:获取所述图片的标识信息;识别所述图片的标识信息中是否携带所述预设敏感信息;若所述图片的标识信息中携带所述预设敏感信息,基于序列化算法对所述图片的标识信息进行序列化处理以得到所述图片对应的加密文件的文件标识信息;根据所述加密文件的文件标识信息生成文件目录;获取所述文件目录的访问权限信息,并根据所述访问权限信息设置所述文件目录的访问权限。相应地,处理器502在执行存储所述加密文件至样图数据库中时,具体实现如下功能:存储所述加密文件和文件目录至样图数据库中。
在一实施例中,处理器502在执行存储所述加密文件和文件目录至样图数据库中之后,还实现如下功能:获取终端发送的访问请求,其中,所述访问请求包括传输密钥、终端用户身份信息和目标文件的文件标识信息;判断所述传输密钥是否有效且所述终端用户身份信息是否与所述文件目录的访问权限信息相匹配;若所述传输密钥有效且所述终端用户身份信息与所述访问权限信息相匹配,对所述目标文件的标识信息对应的加密文件进行解密以获得目标文件;基于AES加密算法和所述传输密钥对所述目标文件进行加密处理以得到加密目标文件;发送所述加密目标文件至所述终端,以使得所述终端根据所述传输密钥对所述加密目标文件进行解密以获取所述目标文件。
应当理解,在本申请实施例中,处理器502可以是中央处理单元(Central Processing Unit,CPU),该处理器502还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。其中,通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。

Claims (20)

  1. 一种图片管理方法,包括:
    获取图片;
    识别所述图片中是否携带预设敏感信息;
    若所述图片中未携带所述预设敏感信息,基于文件加密算法对所述图片进行加密处理以得到对应的加密文件;
    存储所述加密文件至样图数据库中。
  2. 根据权利要求1所述的图片管理方法,其中,所述基于文件加密算法对所述图片进行加密处理以得到对应的加密文件,包括:对所述图片进行Base64转码处理以生成对应的Base64编码文件;以及基于文件加密算法对所述Base64编码文件进行加密处理以生成加密文件。
  3. 根据权利要求2所述的图片管理方法,其中,所述基于文件加密算法对所述Base64编码文件进行加密处理以生成加密文件,包括:生成初始密钥,并基于AES加密算法和所述初始密钥对所述Base64编码文件进行加密处理以生成初级加密文件;根据所述初始密钥按照预设计算规则计算出二级密钥;以及基于预设加密算法和所述二级密钥对所述初级加密文件进行二次加密处理以生成加密文件。
  4. 根据权利要求3所述的图片管理方法,其中,所述根据所述初始密钥按照预设计算规则计算出二级密钥,包括:获取当前时间信息;将所述当前时间信息转成对应的时间字符串;以及基于所述AES加密算法和所述初始密钥对所述时间字符串进行加密以计算出二级密钥。
  5. 根据权利要求3所述的图片管理方法,其中,所述基于预设加密算法和所述二级密钥对所述初级加密文件进行二次加密处理以生成加密文件,包括:将所述初级加密文件中的字符串按照第一预设位数进行数组化处理以生成对应的文件数组,以及将所述二级密钥中的字符串按照第二预设位数进行数组化处理以生成对应的密钥数组;以及将所述文件数组中的元素和密钥数组中的元素进行重组以生成加密文件。
  6. 根据权利要求1所述的图片管理方法,其中,在所述存储所述加密文件至样图数据库中之前,还包括:获取所述图片的标识信息;识别所述图片的标 识信息中是否携带所述预设敏感信息;若所述图片的标识信息中携带所述预设敏感信息,基于序列化算法对所述图片的标识信息进行序列化处理以得到所述图片对应的加密文件的文件标识信息;根据所述加密文件的文件标识信息生成文件目录;以及获取所述文件目录的访问权限信息,并根据所述访问权限信息设置所述文件目录的访问权限;
    所述存储所述加密文件至样图数据库中,包括:存储所述加密文件和文件目录至样图数据库中。
  7. 根据权利要求6所述的图片管理方法,其中,在所述存储所述加密文件和文件目录至样图数据库中之后,还包括:获取终端发送的访问请求,其中,所述访问请求包括传输密钥、终端用户身份信息和目标文件的文件标识信息;判断所述传输密钥是否有效且所述终端用户身份信息是否与所述文件目录的访问权限信息相匹配;若所述传输密钥有效且所述终端用户身份信息与所述访问权限信息相匹配,对所述目标文件的标识信息对应的加密文件进行解密以获得目标文件;基于AES加密算法和所述传输密钥对所述目标文件进行加密处理以得到加密目标文件;发送所述加密目标文件至所述终端,以使得所述终端根据所述传输密钥对所述加密目标文件进行解密以获取所述目标文件。
  8. 根据权利要求1所述的图片管理方法,所述识别所述图片中是否携带预设敏感信息,包括:通过OCR图像识别技术识别所述图片中是否携带预设敏感信息。
  9. 根据权利要求3所述的图片管理方法,其中,所述根据所述初始密钥按照预设计算规则计算出二级密钥,包括:对当前并行处理的至少两个所述Base64编码文件进行编号;获取当前时间信息;将所述当前时间信息转成对应的时间字符串,以及将每个所述Base64编码文件对应的编号转成对应的编号字符串;以及基于所述AES加密算法和所述初始密钥对所述时间字符串和编号字符串进行加密以计算出每个所述Base64编码文件对应的二级密钥。
  10. 根据权利要求1所述的图片管理方法,其中,所述存储所述加密文件至样图数据库中,包括:基于分布式存储技术存储所述加密文件至样图数据库中。
  11. 根据权利要求6所述的图片管理方法,其中,在所述识别所述图片的标识信息中是否携带所述预设敏感信息之后,还包括:若所述图片的标识信息中未携带所述预设敏感信息,将所述图片的标识信息设为所述图片对应的加密文 件的文件标识信息,并执行所述根据所述加密文件的文件标识信息生成文件目录的步骤。
  12. 根据权利要求7所述的图片管理方法,其中,在所述对所述目标文件的标识信息对应的加密文件进行解密以获得目标文件之前,还包括:获取所述终端的网络地址信息;判断所述网络地址信息是否与预设的网络地址信息相匹配;若所述网络地址信息与所述预设的网络地址信息相匹配,执行所述对所述目标文件的标识信息对应的加密文件进行解密以获得目标文件的步骤。
  13. 一种图片管理装置,包括:
    获取单元,用于获取图片;
    识别单元,用于识别所述图片中是否携带预设敏感信息;
    加密单元,用于若所述图片中未携带所述预设敏感信息,基于文件加密算法对所述图片进行加密处理以得到对应的加密文件;
    存储单元,用于存储所述加密文件至样图数据库中。
  14. 一种计算机设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时实现:获取图片;识别所述图片中是否携带预设敏感信息;若所述图片中未携带所述预设敏感信息,基于文件加密算法对所述图片进行加密处理以得到对应的加密文件;存储所述加密文件至样图数据库中。
  15. 根据权利要求14所述的计算机设备,其中,所述处理器执行所述计算机程序以实现基于文件加密算法对所述图片进行加密处理以得到对应的加密文件时,具体实现:对所述图片进行Base64转码处理以生成对应的Base64编码文件;以及基于文件加密算法对所述Base64编码文件进行加密处理以生成加密文件。
  16. 根据权利要求15所述的计算机设备,其中,所述处理器执行所述计算机程序以实现基于文件加密算法对所述Base64编码文件进行加密处理以生成加密文件时,具体实现:生成初始密钥,并基于AES加密算法和所述初始密钥对所述Base64编码文件进行加密处理以生成初级加密文件;根据所述初始密钥按照预设计算规则计算出二级密钥;以及基于预设加密算法和所述二级密钥对所述初级加密文件进行二次加密处理以生成加密文件。
  17. 根据权利要求16所述的计算机设备,其中,所述处理器执行所述计算 机程序以实现根据所述初始密钥按照预设计算规则计算出二级密钥时,具体实现:获取当前时间信息;将所述当前时间信息转成对应的时间字符串;以及基于所述AES加密算法和所述初始密钥对所述时间字符串进行加密以计算出二级密钥。
  18. 一种存储介质,其中,所述存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令当被处理器执行时使所述处理器执行:获取图片;识别所述图片中是否携带预设敏感信息;若所述图片中未携带所述预设敏感信息,基于文件加密算法对所述图片进行加密处理以得到对应的加密文件;存储所述加密文件至样图数据库中。
  19. 根据权利要求18所述的存储介质,其中,所述程序指令当被处理器执行基于文件加密算法对所述图片进行加密处理以得到对应的加密文件时使所述处理器具体执行:对所述图片进行Base64转码处理以生成对应的Base64编码文件;以及基于文件加密算法对所述Base64编码文件进行加密处理以生成加密文件。
  20. 根据权利要求19所述的存储介质,其中,所述程序指令当被处理器执行基于文件加密算法对所述Base64编码文件进行加密处理以生成加密文件时使所述处理器具体执行:生成初始密钥,并基于AES加密算法和所述初始密钥对所述Base64编码文件进行加密处理以生成初级加密文件;根据所述初始密钥按照预设计算规则计算出二级密钥;以及基于预设加密算法和所述二级密钥对所述初级加密文件进行二次加密处理以生成加密文件。
PCT/CN2018/101845 2018-04-27 2018-08-23 一种图片管理方法、装置、计算机设备及存储介质 WO2019205366A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810394760.3 2018-04-27
CN201810394760.3A CN108647262B (zh) 2018-04-27 2018-04-27 一种图片管理方法、装置、计算机设备及存储介质

Publications (1)

Publication Number Publication Date
WO2019205366A1 true WO2019205366A1 (zh) 2019-10-31

Family

ID=63747943

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/101845 WO2019205366A1 (zh) 2018-04-27 2018-08-23 一种图片管理方法、装置、计算机设备及存储介质

Country Status (2)

Country Link
CN (1) CN108647262B (zh)
WO (1) WO2019205366A1 (zh)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109067814B (zh) * 2018-10-31 2021-04-20 苏州科达科技股份有限公司 媒体数据加密方法、系统、设备及存储介质
CN111259407A (zh) * 2018-12-03 2020-06-09 珠海格力电器股份有限公司 一种图片处理方法、装置、存储介质及终端
CN109784067A (zh) * 2018-12-15 2019-05-21 平安科技(深圳)有限公司 图片管理方法、装置、电子设备及存储介质
CN110059559A (zh) * 2019-03-15 2019-07-26 深圳壹账通智能科技有限公司 Ocr识别文件的处理方法及其电子设备
CN111428261A (zh) * 2020-02-26 2020-07-17 深圳壹账通智能科技有限公司 照片信息处理方法、装置、设备及介质
CN111967033B (zh) * 2020-08-28 2024-04-05 深圳康佳电子科技有限公司 基于人脸识别的图片加密方法、装置、终端及存储介质
CN112788012B (zh) * 2020-12-30 2023-07-25 深圳市欢太科技有限公司 日志文件加密方法、装置、存储介质及电子设备
CN113810484A (zh) * 2021-09-10 2021-12-17 深圳云之家网络有限公司 文件请求处理方法、装置、计算机设备和存储介质
CN116055767A (zh) * 2022-11-08 2023-05-02 天翼云科技有限公司 视频文件的处理方法、装置、设备及可读存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102684877A (zh) * 2012-03-31 2012-09-19 奇智软件(北京)有限公司 一种进行用户信息处理的方法及装置
CN103942469A (zh) * 2014-04-14 2014-07-23 小米科技有限责任公司 图片处理方法、装置及终端
CN105205376A (zh) * 2015-09-23 2015-12-30 南京奇幻通信科技有限公司 基于Android系统的指纹登录智能应用程序的方法
CN105631354A (zh) * 2014-11-26 2016-06-01 Ncr公司 安全图像处理
CN107465513A (zh) * 2017-08-09 2017-12-12 西南大学 一种基于人脸识别的文件加密方法和系统
CN107590465A (zh) * 2017-09-14 2018-01-16 维沃移动通信有限公司 一种图像处理方法及移动终端

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE3715081A1 (de) * 1987-05-06 1988-11-17 Siemens Ag Verfahren zur verschluesselung von digitalen bildsignalen
CN104270800B (zh) * 2014-08-14 2017-11-17 平安科技(深圳)有限公司 与终端建立通信连接的方法及系统

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102684877A (zh) * 2012-03-31 2012-09-19 奇智软件(北京)有限公司 一种进行用户信息处理的方法及装置
CN103942469A (zh) * 2014-04-14 2014-07-23 小米科技有限责任公司 图片处理方法、装置及终端
CN105631354A (zh) * 2014-11-26 2016-06-01 Ncr公司 安全图像处理
CN105205376A (zh) * 2015-09-23 2015-12-30 南京奇幻通信科技有限公司 基于Android系统的指纹登录智能应用程序的方法
CN107465513A (zh) * 2017-08-09 2017-12-12 西南大学 一种基于人脸识别的文件加密方法和系统
CN107590465A (zh) * 2017-09-14 2018-01-16 维沃移动通信有限公司 一种图像处理方法及移动终端

Also Published As

Publication number Publication date
CN108647262A (zh) 2018-10-12
CN108647262B (zh) 2021-03-09

Similar Documents

Publication Publication Date Title
WO2019205366A1 (zh) 一种图片管理方法、装置、计算机设备及存储介质
US9710659B2 (en) Methods and systems for enforcing, by a kernel driver, a usage restriction associated with encrypted data
US10284372B2 (en) Method and system for secure management of computer applications
US9577989B2 (en) Methods and systems for decrypting an encrypted portion of a uniform resource identifier
US20150302218A1 (en) Method and system for file hiding
TW202021305A (zh) 提供和獲取安全身份資訊的方法及裝置
US9906364B2 (en) Secure password management systems, methods and apparatuses
US20200021448A1 (en) Public-private key pair account login and key manager
WO2021114614A1 (zh) 应用程序安全启动方法、装置、计算机设备和存储介质
JP2014119486A (ja) 秘匿検索処理システム、秘匿検索処理方法、および秘匿検索処理プログラム
WO2022193620A1 (zh) 一种用于网络文件保护的编解码方法、装置
CN111917540A (zh) 一种数据加解密方法、装置、移动终端和存储介质
CN111404892B (zh) 数据监管方法、装置和服务器
WO2019120038A1 (zh) 数据加密存储
CN112733180A (zh) 数据查询方法、装置和电子设备
KR20100009301A (ko) 모바일 기기에서의 통합형 데이터 관리 방법, 그 장치 및이를 기록한 기록 매체
WO2020181818A1 (zh) 一种电子文件的加密、解密方法及其装置
EP3764587A1 (en) Anonymization processing method, apparatus and device, and storage medium
KR101485968B1 (ko) 암호화된 파일 접근 방법
US20200097457A1 (en) Data management method, data management apparatus, and non-transitory computer readable medium
JP2018073064A (ja) ファイル分割・結合システム及びその方法
US20240107318A1 (en) A method and a system for securely sharing datasets via glyphs
JP2002041523A (ja) 電子メール検索型データベースシステム及び電子メールを用いたデータベース検索方法
JP4958014B2 (ja) ファイルデータ転送方法、ファイルデータ転送プログラム、ファイルデータ転送システム、及び通信端末
CN117499159A (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: 18916359

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 04/02/2021)

122 Ep: pct application non-entry in european phase

Ref document number: 18916359

Country of ref document: EP

Kind code of ref document: A1