CN110909368A - Data encryption method and device and computer readable storage medium - Google Patents

Data encryption method and device and computer readable storage medium Download PDF

Info

Publication number
CN110909368A
CN110909368A CN201911083935.XA CN201911083935A CN110909368A CN 110909368 A CN110909368 A CN 110909368A CN 201911083935 A CN201911083935 A CN 201911083935A CN 110909368 A CN110909368 A CN 110909368A
Authority
CN
China
Prior art keywords
multimedia data
data
encryption
content type
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911083935.XA
Other languages
Chinese (zh)
Other versions
CN110909368B (en
Inventor
青欣
刘育氚
王曦
冯诚
张文峰
王智培
丁茂霞
马宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201911083935.XA priority Critical patent/CN110909368B/en
Publication of CN110909368A publication Critical patent/CN110909368A/en
Application granted granted Critical
Publication of CN110909368B publication Critical patent/CN110909368B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • 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

Landscapes

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

Abstract

The application discloses a data encryption method, a data encryption device and a computer readable storage medium, wherein the method comprises the following steps: responding to the synchronous encryption operation to obtain a multimedia data set; identifying a data content type of first multimedia data according to the data content of the first multimedia data in the multimedia data set; determining first multimedia data with a data content type as a target content type as multimedia data to be encrypted; the target content type is a data content type indicated by the synchronous encryption operation; and encrypting the multimedia data to be encrypted. By the adoption of the method and the device, the encryption efficiency for the multimedia data can be improved.

Description

Data encryption method and device and computer readable storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a data encryption method and apparatus, and a computer-readable storage medium.
Background
A private space is usually existed in an existing terminal device, and the private space is an encrypted folder, so that a user can store any file, such as a video file or a picture file, which the user wants to store in the private space.
However, in the current private space in the terminal device, when a user wants to encrypt a plurality of files, for example, a plurality of pictures, the user needs to add the plurality of pictures to the encrypted space one by one, or add the entire folder storing the plurality of pictures to the encrypted space, so as to encrypt the plurality of pictures. Therefore, the efficiency of file encryption is low aiming at the current way of encrypting files in a private space.
Content of application
The application provides a data encryption method, a data encryption device and a computer readable storage medium, which can improve the encryption efficiency aiming at multimedia data.
One aspect of the present application provides a data encryption method, including:
responding to the synchronous encryption operation to obtain a multimedia data set;
identifying a data content type of first multimedia data in the multimedia data set according to the data content of the first multimedia data;
determining the first multimedia data with the data content type as the target content type as multimedia data to be encrypted; the target content type is a data content type indicated by the synchronous encryption operation;
and encrypting the multimedia data to be encrypted.
Wherein the first multimedia data is image data; the identifying a data content type of a first multimedia data in the multimedia data set according to a data content of the first multimedia data comprises:
traversing each pixel point in the first multimedia data, and acquiring a plurality of target areas in the first multimedia data according to a color tolerance threshold and a color value of each pixel point in the traversed first multimedia data; the color of all pixel points in a target area is within a color value interval defined by a target color value and the color tolerance threshold, and the target color value refers to the color value of the first pixel point traversed in the target area;
determining the number of pixel points in each target area as the first pixel point number;
and determining the data content type of the first multimedia data according to a target color value interval for matching the target content type, the number of the first pixel points and the color value of each pixel point in each target area.
Wherein the target color value interval comprises a first type color value interval and a second type color value interval; the determining the data content type of the first multimedia data according to the target color value interval for matching the target content type, the first pixel number and the color value of each pixel in each target region includes:
obtaining a color value of each pixel point in each target area, selecting a first area in the target areas based on the first type color value interval, and selecting a second area in the target areas based on the second type color value interval; the number of pixel points of which the color values are in the first type color value interval in the first area is larger than the target number; the number of pixel points of which the color values are in the second type color value interval in the second area is larger than the target number; the target number is determined based on the first number of pixels and a proportional threshold;
counting the number of pixel points in each first region to obtain a first number value, and counting the number of pixel points in each second region to obtain a second number value;
determining the number of pixel points in the first multimedia data as the number of second pixel points;
determining a first ratio based on the first quantity value and the second pixel point quantity, and determining a second ratio based on the second quantity value and the second pixel point quantity;
and when the maximum value of the first ratio and the second ratio is larger than or equal to a ratio threshold value, determining that the data content type of the first multimedia data is the target content type.
Wherein the identifying the data content type of the first multimedia data according to the data content of the first multimedia data in the multimedia data set comprises:
acquiring a data character string corresponding to the first multimedia data, and acquiring a target content address library; the target content address library comprises a plurality of target content addresses; the plurality of target content addresses are all addresses used for acquiring multimedia data of the target content type;
acquiring a source address of the first multimedia data from the data character string;
and if the source address exists in the target content addresses, determining that the data content type of the first multimedia data is the target content type.
Wherein, still include:
responding to a storage operation aiming at the first multimedia data, and acquiring an original character string and the source address of the first multimedia data;
and adding the source address in the original character string to obtain the data character string corresponding to the first multimedia data, and storing the data character string.
Wherein the identifying the data content type of the first multimedia data according to the data content of the first multimedia data in the multimedia data set comprises:
inputting the first multimedia data into an identification plug-in, and outputting a confidence degree for the first multimedia data based on the identification plug-in; the identification plug-in is used for identifying the data content type of the multimedia data according to the data content of the multimedia data;
and when the confidence coefficient is equal to or greater than a confidence coefficient threshold value, determining the data content type of the first multimedia data as the target content type.
Wherein the identifying the data content type of the first multimedia data according to the data content of the first multimedia data in the multimedia data set comprises:
acquiring reference multimedia data from the encrypted multimedia data;
inputting the first multimedia data and the reference multimedia data into the identification plug-in, and outputting data similarity between the first multimedia data and the reference multimedia data based on the identification plug-in;
and when the data similarity is equal to or greater than a similarity threshold value, determining the data content type of the first multimedia data as the target content type.
Wherein the responding to the synchronous encryption operation to obtain the multimedia data set comprises:
responding to the encryption operation aiming at second multimedia data, carrying out encryption processing on the second multimedia data, and outputting an encryption selection frame;
responding to the synchronous encryption operation in the encryption selection box, acquiring the multimedia data set, and identifying the data content type of the second multimedia data;
determining a data content type of the second multimedia data as the target content type.
Wherein the responding to the synchronous encryption operation to obtain the multimedia data set comprises:
responding to the encryption operation aiming at second multimedia data, carrying out encryption processing on the second multimedia data, and outputting an encryption selection frame; the encryption selection frame comprises encryption prompt information aiming at the target content type;
and responding to the synchronous encryption operation of the encryption prompt information in the encryption selection box, and acquiring the multimedia data set according to the parent storage directory of the second multimedia data.
Wherein the responding to the encryption operation for the second multimedia data, encrypting the second multimedia data, and outputting an encryption selection frame includes:
responding to the encryption operation aiming at the second multimedia data, carrying out encryption processing on the second multimedia data, and identifying the data content type of the second multimedia data;
and when the data content type of the second multimedia data is identified as the target content type, outputting the encryption selection frame.
Wherein the obtaining the multimedia data set according to the parent storage directory of the second multimedia data comprises:
acquiring the parent storage directory of the second multimedia data;
determining the parent storage directory, the child storage directory in the parent storage target and the peer storage directory aiming at the parent storage directory as storage directories to be identified;
and adding the multimedia data in the storage directory to be identified to the multimedia data set.
Wherein, the encrypting the multimedia data to be encrypted comprises:
adding the multimedia data to be encrypted to an equipment encryption space;
then, the method further comprises the following steps:
responding to expansion operation aiming at the equipment encryption space, and outputting a verification information input box;
acquiring the verification information input in the verification information input frame;
and when the verification information is the same as the authentication information, outputting the multimedia data in the encrypted space of the equipment.
Another aspect of the present application provides a data encryption method, including:
outputting an encryption selection frame in response to an encryption operation for the first image; the encryption selection frame is output when the image content type of the first image is identified as a target content type;
responding to the synchronous encryption operation in the encryption selection box and outputting a first encryption prompt box; the first encryption prompt box comprises prompt information of an encryption process aiming at a second image; the second image is an image of which the image content type in the image set is the target content type.
Wherein, after the response to the synchronous encryption operation in the encryption selection box and the output of the first encryption prompt box, the method further comprises:
closing the first encryption prompt box and outputting a second encryption prompt box; the second encryption prompt box comprises prompt information of an encryption result aiming at the second image.
One aspect of the present application provides a data encryption apparatus, including:
the response module is used for responding to the synchronous encryption operation and acquiring a multimedia data set;
the identification module is used for identifying the data content type of first multimedia data according to the data content of the first multimedia data in the multimedia data set;
the determining module is used for determining the first multimedia data with the data content type as the target content type as the multimedia data to be encrypted; the target content type is a data content type indicated by the synchronous encryption operation;
and the encryption module is used for encrypting the multimedia data to be encrypted.
Wherein the first multimedia data is image data; the identification module comprises:
the traversal unit is used for traversing each pixel point in the first multimedia data and acquiring a plurality of target areas in the first multimedia data according to a color tolerance threshold and a color value of each pixel point in the traversed first multimedia data; the color of all pixel points in a target area is within a color value interval defined by a target color value and the color tolerance threshold, and the target color value refers to the color value of the first pixel point traversed in the target area;
the first determining unit is used for determining the number of the pixel points in each target area as the number of the first pixel points;
and the second determining unit is used for determining the data content type of the first multimedia data according to the target color value interval for matching the target content type, the first pixel number and the color value of each pixel in each target area.
Wherein the target color value interval comprises a first type color value interval and a second type color value interval; the second determination unit includes:
an obtaining subunit, configured to obtain a color value of each pixel point in each target region, select a first region from the multiple target regions based on the first type color value interval, and select a second region from the multiple target regions based on the second type color value interval; the number of pixel points of which the color values are in the first type color value interval in the first area is larger than the target number; the number of pixel points of which the color values are in the second type color value interval in the second area is larger than the target number; the target number is determined based on the first number of pixels and a proportional threshold;
the counting subunit is used for counting the number of the pixel points in each first region to obtain a first numerical value, and counting the number of the pixel points in each second region to obtain a second numerical value;
a number determining subunit, configured to determine the number of pixels in the first multimedia data as a second number of pixels;
a ratio determining subunit, configured to determine a first ratio based on the first quantity value and the second number of pixels, and determine a second ratio based on the second quantity value and the second number of pixels;
a type determining subunit, configured to determine, when a maximum value of the first ratio and the second ratio is greater than or equal to a ratio threshold, that the data content type of the first multimedia data is the target content type.
Wherein the identification module comprises:
the address library obtaining unit is used for obtaining a data character string corresponding to the first multimedia data and obtaining a target content address library; the target content address library comprises a plurality of target content addresses; the plurality of target content addresses are all addresses used for acquiring multimedia data of the target content type;
a source address obtaining unit, configured to obtain a source address of the first multimedia data from the data string;
a determining unit, configured to determine that a data content type of the first multimedia data is the target content type if the source address exists in the target content addresses.
Wherein, the data encryption device further comprises:
the storage response module is used for responding to the storage operation aiming at the first multimedia data and acquiring the original character string and the source address of the first multimedia data;
and the adding module is used for adding the source address in the original character string to obtain the data character string corresponding to the first multimedia data and storing the data character string.
Wherein the identification module comprises:
a first input unit for inputting the first multimedia data into an identification plug-in, and outputting a confidence for the first multimedia data based on the identification plug-in; the identification plug-in is used for identifying the data content type of the multimedia data according to the data content of the multimedia data;
a third determining unit, configured to determine that the data content type of the first multimedia data is the target content type when the confidence is equal to or greater than a confidence threshold.
Wherein the identification module comprises:
a reference acquisition unit configured to acquire reference multimedia data from the multimedia data subjected to the encryption processing;
a second input unit, configured to input the first multimedia data and the reference multimedia data into the identification plug-in, and output a data similarity between the first multimedia data and the reference multimedia data based on the identification plug-in;
a fourth determining unit, configured to determine that the data content type of the first multimedia data is the target content type when the data similarity is equal to or greater than a similarity threshold.
Wherein the response module comprises:
the first response unit is used for responding to the encryption operation aiming at the second multimedia data, carrying out encryption processing on the second multimedia data and outputting an encryption selection frame;
a second response unit, configured to respond to the synchronous encryption operation in the encryption selection box, obtain the multimedia data set, and identify a data content type of the second multimedia data;
a fifth determining unit, configured to determine a data content type of the second multimedia data as the target content type.
Wherein the response module comprises:
the third response unit is used for responding to the encryption operation aiming at the second multimedia data, carrying out encryption processing on the second multimedia data and outputting an encryption selection frame; the encryption selection frame comprises encryption prompt information aiming at the target content type;
and the fourth response unit is used for responding to the synchronous encryption operation of the encryption prompt message in the encryption selection box and acquiring the multimedia data set according to the parent storage directory of the second multimedia data.
Wherein the third response unit includes:
the response subunit is used for responding to the encryption operation aiming at the second multimedia data, carrying out encryption processing on the second multimedia data and identifying the data content type of the second multimedia data;
and the output subunit is used for outputting the encryption selection frame when the data content type of the second multimedia data is identified as the target content type.
Wherein the fourth response unit includes:
a directory acquiring subunit, configured to acquire the parent storage directory of the second multimedia data;
the catalog determining subunit is used for determining the parent storage catalog, the child storage catalog in the parent storage target and the peer storage catalog aiming at the parent storage catalog as the storage catalog to be identified;
and the adding subunit is used for adding the multimedia data in the storage directory to be identified to the multimedia data set.
The encryption module is specifically configured to:
adding the multimedia data to be encrypted to an equipment encryption space;
then, the data encryption apparatus further includes:
the output module is used for responding to the expansion operation aiming at the equipment encryption space and outputting a verification information input box;
the verification acquisition module is used for acquiring the verification information input in the verification information input frame;
and the authentication module is used for outputting the multimedia data in the encrypted space of the equipment when the verification information is the same as the authentication information.
Another aspect of the present application provides a data encryption apparatus, including:
a first operation response module for responding to the encryption operation aiming at the first image and outputting an encryption selection frame; the encryption selection frame is output when the image content type of the first image is identified as a target content type;
the second operation response module is used for responding to the synchronous encryption operation in the encryption selection frame and outputting a first encryption prompt frame; the first encryption prompt box comprises prompt information of an encryption process aiming at a second image; the second image is an image of which the image content type in the image set is the target content type.
After the second operation response module completes execution, the data encryption device is further configured to:
closing the first encryption prompt box and outputting a second encryption prompt box; the second encryption prompt box comprises prompt information of an encryption result aiming at the second image.
The present application provides, in an aspect, a computer device comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to perform the method of the above aspect/aspect.
The present application provides in one aspect a computer-readable storage medium having stored thereon a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the method of the above one/another aspect.
The method includes the steps that firstly, synchronous encryption operation is responded, and a multimedia data set is obtained; identifying a data content type of first multimedia data in the multimedia data set according to the data content of the first multimedia data; determining the first multimedia data with the data content type as the target content type as multimedia data to be encrypted; the target content type is a data content type indicated by the synchronous encryption operation; and encrypting the multimedia data to be encrypted. Therefore, the method provided by the application can identify the data content type of the first multimedia data in the multimedia data set by responding to the synchronous encryption operation, and encrypt all the first multimedia data with the identified data content type as the target content type, thereby enriching the encryption mode for the multimedia data. Meanwhile, all multimedia data which are the same as the target content type in the multimedia data can be automatically and synchronously encrypted, and the multimedia data which are the target content type do not need to be discontinuously encrypted one by one, so that the encryption efficiency aiming at the multimedia data is improved.
Drawings
In order to more clearly illustrate the technical solutions in the present application or the prior art, the drawings needed for the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1a is a schematic diagram of a system architecture provided herein;
FIG. 1b is a schematic diagram of a data encryption scenario provided in the present application;
FIG. 2 is a schematic flow chart of a data encryption method provided herein;
FIG. 3 is a schematic diagram illustrating a scenario for determining a multimedia data set according to the present application;
fig. 4 is a schematic page diagram of a terminal device provided in the present application;
FIG. 5 is a schematic diagram of a scenario for identifying a data content type of multimedia data provided in the present application;
FIG. 6 is a schematic diagram of a scenario for acquiring a data string according to the present application;
FIG. 7 is a schematic diagram of another scenario provided herein for identifying a data content type of multimedia data;
FIG. 8 is a schematic diagram of another scenario provided herein for identifying a data content type of multimedia data;
FIG. 9 is a schematic page view of another terminal device provided in the present application;
FIG. 10 is a schematic flow chart diagram of another data encryption method provided herein;
FIG. 11 is a schematic flow chart of another data encryption method provided herein;
FIG. 12 is a schematic structural diagram of a data encryption device provided in the present application;
FIG. 13 is a schematic diagram of another data encryption device provided in the present application;
fig. 14 is a schematic structural diagram of a computer device provided in the present application.
Detailed Description
The technical solutions in the present application will be described clearly and completely with reference to the accompanying drawings in the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Please refer to fig. 1a, which is a schematic diagram of a system architecture provided in the present application. As shown in fig. 1a, the system architecture diagram includes a server 100 and a plurality of terminal devices, and the plurality of terminal devices specifically include a terminal device 200a, a terminal device 200b, and a terminal device 200 c. The terminal device 200a, the terminal device 200b, and the terminal device 200c can communicate with the server 100 through a network, and the terminal device may be a mobile phone, a tablet computer, a notebook computer, a palm computer, a Mobile Internet Device (MID), a wearable device (e.g., a smart watch, a smart band, etc.). Here, the communication between the terminal device 200a and the server 100 is explained as an example.
Please refer to fig. 1b, which is a schematic view of a data encryption scenario provided in the present application. As shown in fig. 1b, the multimedia data in the present application is taken as an example for description. The terminal page 100a in the terminal device 200a is a page of image browsing. There are a total of 50 viewable images, and the image viewed in the terminal page 100a is the first image 100 b. Also included in terminal page 100a is button 101b (i.e., a "privacy save" button). The terminal apparatus 200a may encrypt the image 100b in response to a user operation (e.g., a click operation, a slide operation, a long-press operation, or a double-click operation, etc.) with respect to the button 101b by the user. Encrypting the image 100b here means adding the image 100b to a private space in the terminal device 200a, which is an encrypted folder in the terminal device 200a, in which the user can store any multimedia data he wants to store, such as multimedia data of a video type, multimedia data of an image type, multimedia data of a document type, and so on. The terminal device 200a can recognize the data content type of the image 100b while adding the image 100b to the private space. The data content type of the image data is a type of image content specifically included in the image, and examples thereof include a natural landscape type image, an architectural design type image, and a human body art type image (i.e., a human body art figure). Here, it should be noted that the terminal device 200a may download, through the server 100, an identification plug-in which is a plug-in for identifying a data content type of image data, and the identification plug-in may be an image which is used exclusively for identifying the data content type as a human art type. When the terminal 200a recognizes that the image 100b is a "figure art" of a human art type through the plug-in, the terminal device may pop up an encryption selection box 102b (the encryption selection box may be a popup sub-window for the terminal page 100a, which is displayed separately on the image 100 b) above the image 100b, as shown in the terminal page 101 a. The encrypted selection box 102b includes therein a prompt message "saved to private space. Whether to open the 'one-key encryption character art figure', 'cancel' button and 'open' button. When the user clicks the "cancel" button in the encryption selection box 102b, the terminal device 200a may close the encryption selection box 102 b; when the user clicks the "on" button in the encryption selection box, the terminal device 200a may close the encryption selection box 102b while displaying the popup window 103b above the image 100b (the popup window 103b includes a prompt message "being automatically encrypted" as shown in the terminal page 102 a). In displaying the popup 103b, the terminal apparatus 200a may scan and identify the data content type of the other image (i.e., the other image than the image 100b in the terminal apparatus 200 a) stored in the terminal 200a through the above-described identification plug-in. The terminal apparatus 200a may add all the "figure art" of the human art type recognized in the above other images to the private space. When the terminal device 100a completes the identification of the data content type of the other image and adds the "figure art" of the identified body art type to the private space, the terminal device may close the pop-up window 103b and display the prompt message 104b (i.e., "10 pictures have been automatically encrypted"), as shown in the terminal page 103 a. The prompt message 104b is for prompting the user that the data content type of 10 images among the other images described above is "body art type", and that the 10 images that have been recognized have been added to the private space.
The user may then open a privacy space in the terminal device 200a (an access password may be set, i.e., the user needs to enter a password to open the privacy space) as shown in the terminal page 104 a. The private space in the terminal page 104a includes 10 images of which data content type is "body art type" identified from the above other images, in addition to the above-described image 100b added to the private space.
By the method, when the user encrypts and stores a certain 'figure art figure' in the terminal equipment, the user is prompted to encrypt other 'figure art figures' in the terminal equipment (namely, the function of encrypting the 'figure art figure' by one key is started), when the user agrees to start the function of encrypting the 'figure art figure' by one key based on the terminal equipment, the terminal equipment can automatically scan and identify the data content types of all other images in the equipment and automatically encrypt all the identified 'figure art figures', the encryption intelligence aiming at the 'figure art figure' is improved, and the encryption efficiency aiming at the 'figure art figure' is improved.
Please refer to fig. 2, which is a schematic flow chart of a data encryption method provided in the present application, and as shown in fig. 2, the method may include:
step S101, responding to synchronous encryption operation and acquiring a multimedia data set;
specifically, the terminal device may respond to the synchronous encryption operation to obtain the multimedia data set. The synchronous encryption operation can have multiple operation modes, through the synchronous encryption operation, the terminal equipment can carry out synchronous intelligent encryption on certain multimedia data, and the terminal equipment can acquire different multimedia data sets through different operation modes of the synchronous encryption operation.
First mode of operation of synchronous encryption: the terminal device may be specially provided with a synchronous encryption button, the user may click the synchronous encryption button, and the operation of the user clicking the synchronous encryption button is the synchronous encryption operation. If the synchronous encryption operation is performed through the synchronous encryption button, the multimedia data set acquired by the terminal device may be a set formed by all multimedia data in the terminal device, that is, the terminal device may perform full-disc scanning, and add all scanned multimedia data to the multimedia data set.
It should be noted that, since the multimedia data may be various types of data, such as video type data, image type data, document type data, and the like, the multimedia data in the present application is described as the same type of multimedia data, that is, the multimedia data may be described as video type data, image type data, or document type data. Therefore, it can be understood that, in response to the synchronous encryption operation performed by the terminal device in the first operation mode, the acquired multimedia data set may be a set formed by all multimedia data of the same type (which may be a video type, an image type, or a document type) in the terminal device.
Second mode of operation of the synchronous encryption operation: the operation is carried out through the synchronous encryption gesture, namely, one or more gestures specially used for carrying out synchronous encryption operation can be set (can be set by self). For example, the synchronous encryption gesture may be a gesture in which two fingers simultaneously swipe up in the terminal page of the terminal device, or a gesture in which two fingers separated in the terminal page of the terminal device simultaneously swipe together towards the center of the terminal page. And the synchronous encryption operation is the operation of carrying out the synchronous encryption gesture by the user in the terminal page. The multimedia data set obtained by the synchronous encryption gesture may also be a set composed of all multimedia data of the same type in the terminal device.
A third mode of operation of the synchronous encryption operation: the terminal equipment can respond to the encryption operation aiming at the second multimedia data, carry out encryption processing on the second multimedia data and output an encryption selection frame; the terminal device may respond to the synchronous encryption operation in the encryption selection box to obtain the multimedia data set, identify a data content type of the second multimedia data:
the second multimedia data may be any multimedia data stored in the terminal device, such as an image (i.e., a picture). The encryption operation for the second multimedia data is an operation of encrypting the second multimedia data (which may be an operation of adding the second multimedia data to the private space, for example, the user operation for the button 101b in the embodiment corresponding to fig. 1b, and the image 100b is the second multimedia data). The terminal device may perform encryption processing on the second multimedia data (e.g., processing of adding the second multimedia data to a private space of the terminal device) in response to an encryption operation on the second multimedia data, and at the same time, the terminal device may output (i.e., display) an encryption selection box (e.g., the encryption selection box 102b in the above-described embodiment corresponding to fig. 1 b) in the terminal page, where the encryption selection box may be a sub-page, such as a popup window, that is displayed independently above the terminal page where the second multimedia data is currently encrypted. The encryption selection frame comprises a cancel button and an open button, and the terminal equipment can respond to the click operation of a user on the cancel button in the encryption selection frame to close the displayed encryption selection frame. The terminal device may further respond to a click operation of the user on an "open" button in the encryption selection box, obtain the multimedia data set, and identify the data content type of the second multimedia data, and a specific implementation process for identifying the data content type of the second multimedia data may refer to a process for identifying the data content type of the first multimedia data in step S102, where a manner of identifying the data content type of the second multimedia data may be the same as a manner of identifying the data content type of the first multimedia data. The click operation of the user on the "open" button in the encryption selection box is the synchronous encryption operation in the encryption selection box.
Here, an explanation is made on the data content type, and the data content type for an image refers to the type of image content specifically contained in the image, such as an image of a nature landscape type, an image of a building type, and an image of a human body art type (i.e., a human body art figure); the data content type for the video refers to the type of video content specifically contained in the video, such as a natural scene type video, a gourmet type video, a makeup type video, a human body art type video, and the like; the data content type for a document refers to the type of document content specifically contained in the document, such as a work record type document, a famous type document, a suspense type document, and the like.
The terminal device may use the identified data content type of the second multimedia data as the data content type indicated by the above synchronous encryption operation, that is, a target content type, where the target content type refers to the data content type of the multimedia data that needs to be encrypted in the multimedia data set, and specific explanation may be referred to in steps S102 to S104 described below.
If the synchronous encryption operation is performed in the third operation manner, the multimedia data set may be collected according to the parent storage directory of the second multimedia data, specifically: the terminal device may obtain a parent storage directory of the second multimedia data, where the parent storage directory refers to a folder in which the second multimedia data is located. The terminal device may use the parent storage directory, the child storage directories in the parent storage directory (i.e., folders in the parent storage directory), and the peer storage directories to the parent storage directory (i.e., folders at the same level as the parent storage directory) as the storage directories to be identified, and the terminal device may scan each storage directory to be identified, and add all multimedia data except the second multimedia data in each storage directory to be identified (directly in the storage directory to be identified, not in the child storage directories in the storage directory to be identified) to the multimedia data set. For example, please refer to fig. 3, which is a schematic view illustrating a scenario for determining a multimedia data set according to the present application. As shown in fig. 3, taking the picture 1 in the terminal page 101c as the second multimedia data as an example, the parent storage directory of the second multimedia data is the folder 1 (because the picture 1 is stored in the folder 1), and the folder 1 in the terminal page 101c further includes the picture 2, the picture 3 and the sub-folder 1. The subfolder 1 in the folder 1 is a child storage directory in the parent storage directory of the second multimedia data, and the terminal device may display the terminal page 102c in response to a click operation of the user on the child folder 1 in the terminal page 101c, where the terminal page 102c displays the picture 4, the picture 5, and the child folder 2 in the child folder 1. Clicking "back" in page 101c, the terminal device will display terminal page 100c, which is displayed in terminal page 100c as all folders in my files, including folder 1, folder 2, and folder 3. Folder 1, folder 2, and folder 3 are peer folders with respect to each other, and therefore, the peer storage directory of the parent storage directory of the above-mentioned second multimedia data (i.e., folder 1) includes folder 2 and folder 3. As shown in fig. 3, the terminal device may further display a click operation of the user on the folder 2 in the terminal page 100c, and display a terminal page 103c in which the pictures 6 and 7 included in the folder 2 are displayed. The terminal device may further display a click operation of the user on the folder 3 in the terminal page 100c, and display a terminal page 104c in which the pictures 8 and 9 included in the folder 3 are displayed. Therefore, the terminal device may use all of the folders 1, 2, 3, and 1 as the storage directories to be identified, and then the terminal device may add the pictures 2 and 3 in the parent storage directory (i.e., file 1) to the multimedia data set, add the pictures 4 and 5 in the child storage directory (i.e., child folder 1) of the parent storage directory to the multimedia data set, and add the pictures 6, 7, 8, and 9 in the peer storage directories (i.e., folders 2 and 3) of the parent storage directory to the multimedia data set, that is, the multimedia data set includes the pictures 2, 3, 4, 5, 6, 7, 8, and 9. Optionally, a depth of selecting a child storage directory in the parent storage directory may also be set, for example, the depth is set to 2, multimedia data in both the child storage directory (i.e., the child folder 1) in the parent storage directory (i.e., the folder 1) and the child folder 2 in the child folder 1 may be added to the multimedia data set, that is, the child folder 2 is also used as the storage directory to be identified, where the depth is for the parent storage directory of the second multimedia data, the depth of the child folder 1 for the folder 1 is 1, and the depth of the child folder 2 for the file 1 is 2. The depth of the parent storage directory may be set by itself, for example, set to 1, set to 2, set to 3, or set to infinity, and the like, which is not limited. Alternatively, some other scanning rules may be set, for example, if the peer storage directories (e.g., folder 2 and folder 3) of the parent storage directory of the second multimedia data are root storage directories (e.g., root directories of a memory card or a terminal device) of a storage medium, the peer storage directory of the parent storage directory is not used as the storage directory to be identified, that is, the multimedia data in the peer storage directory of the parent storage directory is not added to the multimedia data set, that is, the peer storage directories of the parent storage directory are not scanned.
A fourth mode of operation of the synchronous encryption operation: the terminal equipment can respond to the encryption operation aiming at the second multimedia data, carry out encryption processing on the second multimedia data and output an encryption selection frame; the encryption selection frame comprises encryption prompt information aiming at the target content type; responding to the synchronous encryption operation of the encryption prompt information in the encryption selection box, and acquiring the multimedia data set according to the parent storage directory of the second multimedia data:
in fact, the fourth operation manner is different from the third operation manner except that the determination manner of the target content type indicated by the synchronous encryption operation is different, and the pop-up condition of the encryption selection box is different. The method specifically comprises the following steps:
for the fourth operation mode, the data content type (i.e. the target content type) indicated by the synchronous encryption operation may be set in advance, that is, a default data content type may be set in advance as the target content type, for example, a "body art type" is selected as the default target content type, the terminal device may perform encryption processing on the second multimedia data in response to the encryption operation on the second multimedia data (the process is the same as the encryption process on the second multimedia data in the third operation mode described above), and identify the data content type of the second multimedia data, where please refer to the following process of identifying the data content type of the first multimedia data in step S102. When the terminal device recognizes that the data content type of the second multimedia data is the target content type, the terminal device may display the encryption selection frame in the terminal page, and if the terminal device recognizes that the data content type of the second multimedia data is not the target content type, the terminal device may not display the encryption selection frame. The encryption selection box may further include an encryption prompt message for the target content type, for example, the prompt message may be "is multimedia data of the target content type encrypted by one key? ", the encryption selection box may include a disavowal button (equivalent to the" cancel "button in the encryption selection box 102b in fig. 1b described above) and a confirmation button (equivalent to the" on "button in the encryption selection box 102b in fig. 1b described above) for the prompt message. The terminal device can respond to the clicking operation of the user on the denial button in the encryption selection box to close the encryption selection box, and can also respond to the clicking operation of the user on the confirmation button in the encryption selection box to acquire the multimedia data set according to the parent storage directory of the second multimedia data. Here, the click operation of the user on the confirmation button in the encryption selection box is the synchronous encryption operation for the encryption prompt information in the encryption selection box. Here, the process of acquiring the multimedia data set according to the parent storage directory of the second multimedia data is the same as the process described in the third operation manner, and is not described again here. Alternatively, instead of obtaining the multimedia data set from the parent storage directory of the second multimedia data, all multimedia data (e.g., all images) stored in the terminal device may be added to the multimedia data set.
Please refer to fig. 4, which is a schematic page diagram of a terminal device provided in the present application. As shown in fig. 4, the terminal page of the terminal device described in the process 106g is displayed in the manner described in the fourth operation manner, and the terminal page of the terminal device described in the process 113g is displayed in the manner described in the third operation manner. In the process 106g, the terminal page 100g is an image browsing page, the image 103g displayed in the terminal page 100g is the second multimedia data, the terminal device may respond to a click operation of the user on the button 104g (i.e., a "private save" button) in the terminal page 100g to encrypt the image 103g, and perform the process 101g, i.e., identify the data content type of the image 103g, when the terminal device identifies that the data content type of the image 103g is a target content type (preset), the encryption selection box 105g may be displayed, as shown in the terminal page 102g, and the prompt information in the encryption selection box 105g is "saved to private space". Whether to start the one-key encryption function or not. If the terminal device recognizes that the data content type of the image 103g is not the target content type, the encryption selection box 105g is not displayed. In the process 113g, the terminal page 107g is also an image browsing page, and the image 110g displayed in the terminal page 107g is the second multimedia data. The terminal device may encrypt the image 110g in response to a user's click operation on a button 111g (i.e., a "private save" button) in the terminal page 107g, while displaying an encryption selection box 112g, as shown in the terminal page 108g, with the hint information in the encryption selection box 112g being "saved to private space". Whether to open the one-key encryption similar type diagram or not. When the user clicks the "on" button in the encryption selection box 112g, the terminal device may identify the data content type of the image 110g, and the terminal device may use the identified data content type of the image 110g as the target data content type, for example, if the data content type of the image 110g is identified as a building type, the target content type is also the building type.
Step S102, identifying the data content type of first multimedia data according to the data content of the first multimedia data in the multimedia data set;
specifically, the multimedia data in the multimedia data set may be referred to as first multimedia data, and the multimedia data set may include a plurality of first multimedia data. The terminal device may identify a data content type of the first multimedia data according to the data content of the first multimedia data. The following process is described by taking first multimedia data as image data, a target content type as a human art type, and an identification process for a data content type of 1 piece of first multimedia data as an example, and the identification method for the first multimedia data has a plurality of types, specifically including:
first identification mode of data content type: whether the first multimedia data is a figure art image of a figure art type is judged by identifying the color of a pixel point in the first multimedia data, namely the skin color of a figure in the first multimedia data is identified through the color of the pixel point, the skin color corresponds to the skin, and whether the first multimedia data is the figure art image is judged through the area of the identified skin.
The terminal device may traverse each pixel point in the first multimedia data, and obtain a plurality of target regions in the first multimedia data according to a color tolerance threshold and a color value of each pixel point in the traversed first multimedia data: the terminal device may traverse each pixel point in the first multimedia data through a principle of a depth traversal algorithm, and may obtain a color value of each pixel point in the traversed first multimedia data. Wherein, the colour value of every pixel all uses R, G, B, A to represent, and R, G, B, A represent 4 passageways, and R represents the passageway that red corresponds, and G represents the passageway that green corresponds, and B represents the passageway that blue corresponds, and A represents the passageway that transparent color corresponds. Each color value is represented by 32 bits (i.e., 32 bits), and thus each channel (4 in total) for 1 color value is represented by 8 bits, and thus the value of each channel ranges from 0 to 255. And for each pixel point, the value of the channel A corresponding to the transparent color is the same.
The color tolerance threshold is for each channel, each channel may correspond to 1 color tolerance threshold, and the color tolerance threshold corresponding to each channel may be equal or unequal. Since the values of the channel a of the transparent color corresponding to each pixel point are the same, only the color tolerance thresholds of the channel R, the channel G, and the channel B may be set. And acquiring a plurality of target areas in the first multimedia data through the set color tolerance threshold of each channel and the color value of each pixel point in the traversed first multimedia data. The color of all the pixels in a target region is within a color value interval defined by a target color value (which refers to the color value of the first pixel traversed in the target region) and a color tolerance threshold. In addition, all the pixel points in one target region are communicated with each other, that is, one target region is a communicated region (i.e., a closed region) in the first multimedia data, in other words, any one pixel point in one target region is adjacent to at least one pixel point in the target region to which the pixel point belongs. Since the plurality of target areas in the first multimedia data are acquired only in relation to the channel R, the channel G, and the channel B, the following processes are all described with reference to the channel R, the channel G, and the channel B, and the channel a is not mentioned. For example, if the color tolerance threshold values corresponding to the channels R, G and B are all set to be 16. The pixel point 1 and the pixel point 2 are traversed pixels in the first multimedia data, the pixel point 1 is a first pixel point in the traversed first multimedia data, and the pixel point 2 is a second pixel point in the traversed first multimedia data. The color value corresponding to the pixel point 1 is: channel R is 100, channel G is 130, and channel B is 113. The color value corresponding to the pixel point 2 is: channel R is 105, channel G is 145, and channel B is 120. Therefore, the value 105 of the channel R corresponding to the pixel point 2 may be subtracted by the value 100 of the channel R corresponding to the pixel point 1 to obtain a first difference value 5; the value of the channel G corresponding to pixel point 1 may be subtracted from the value 145 of the channel G corresponding to pixel point 2 to obtain a second difference value 15; the value of channel B113 corresponding to pixel 1 may be subtracted from the value of channel B120 corresponding to pixel 2 to obtain a third difference value 7. Since the obtained first difference 5 is smaller than the color tolerance threshold 16 corresponding to the channel R, the second difference 15 is smaller than the color tolerance threshold 16 corresponding to the channel G, and the third difference 7 is smaller than the color tolerance threshold 16 corresponding to the channel B, the pixel point 1 and the pixel point 2 can be divided into the same target region (and the pixel point 1 and the pixel point are also communicated).
And continuously traversing the next pixel point, for example, the pixel point 3, so that the value of each channel in the color value of the pixel point 1 can be correspondingly subtracted from the value of each channel in the color value of the pixel point 3 in the same manner as described above. If the color value of the pixel point 3 is correspondingly subtracted from the values of the channel R, the channel G and the channel B by subtracting the color value of the pixel point 1 from the values of the channel R, the channel G and the channel B, and the obtained 3 difference values are all smaller than the color tolerance threshold of the corresponding channel, the pixel point 3 can be also divided into target areas where the pixel point 1 and the pixel point 2 are located (because the pixel point 3 is communicated with the pixel point 2, the pixel point 3 is also communicated with the target areas where the pixel point 1 and the pixel point 2 are located). The pixel 1 in the target area where the pixel 1, the pixel 2 and the pixel 3 are located is the first pixel traversed, therefore, when determining whether the subsequently traversed pixel belongs to the target area where the pixel 1, the pixel 2 and the pixel 3 are located, the pixel 1 is used as the basis, that is, the values of the pixel 1 in the channel R, the channel G and the channel B are used as the subtrahend, the values of other pixels communicated with the target area where the pixel 1 is located in the channel R, the channel G and the channel B are used as the subtrahend in the subsequent traversal, and whether the subsequently traversed pixel belongs to the target area where the pixel 1 is located is determined by comparing whether the difference between the subtrahend and the subtrahend is within the color tolerance threshold corresponding to the channel R, the channel G and the channel B respectively. If the color value of the pixel point 3 is correspondingly subtracted from the values of the channel R, the channel G and the channel B to obtain 3 difference values, and at least one difference value is not within the color tolerance threshold of the corresponding channel, then the pixel point 3 is judged not to belong to the target area where the pixel point 1 and the pixel point 2 are located, so that the pixel point 3 can be used as the basis for selecting the next target area, namely in the target area where the pixel point 3 is located, the pixel point 3 is the first pixel point traversed, and when traversing other pixel points communicated with the target area where the pixel point 3 is located, the values of the pixel point 3 in the channel R, the channel G and the channel B are used as the deduction, and the values of the other pixel points communicated with the target area where the pixel point 3 is located in the channel R, the channel G and the channel B traversed later are used as the deduction, and judging whether the pixel points traversed subsequently belong to the target area where the pixel point 3 is located or not by comparing whether the difference value between the subtracted number and the subtracted number is within the color tolerance threshold value corresponding to the channel R, the channel G and the channel B respectively. By the method, each pixel point in the first multimedia data can be traversed, all pixel points in the traversed first multimedia data are respectively divided into the plurality of target areas, so that the plurality of target areas in the first multimedia data are obtained, and the difference values between the color values of any two pixel points in the same target area (including the difference values respectively corresponding to the channel R, the channel G and the channel B) are smaller than the color value threshold, so that it can be understood that the colors of the pixel points between the plurality of pixel points in the same target area are not very different (namely, the color difference is small and the colors are close). In all the obtained target areas in the first multimedia data, the target areas with the areas too small may be discarded, for example, the target areas with the total number of pixels smaller than the number threshold may be discarded. For example, if the number threshold is set to 500, the target area with the total number of pixels greater than or equal to 500 may be retained, and the target area with the total number of pixels less than 500 may be discarded.
The number of pixels in each target region may be referred to as the first number of pixels.
The terminal device may determine the data content type of the first multimedia data according to a target color value interval for matching the target content type, the first pixel number, and a color value of each pixel in each target region:
the target color value interval may include a skin color value interval of the caucasian (i.e., a color value interval corresponding to the skin color of the caucasian), and a skin color value interval of the caucasian (i.e., a color value interval corresponding to the skin color of the caucasian). Each color value interval comprises an interval corresponding to the channel R, the channel G and the channel B respectively. The target color value bins may include a first type of color value bin and a second type of color value bin. The first type color value interval and the second type color value interval refer to two different color value intervals, for example, the first type color value interval and the second type color value interval may refer to the skin color value interval of the aforesaid yellow-to-white person and the skin color value interval of the aforesaid caucasian, or the first type color value interval and the second type color value interval may refer to the skin color value interval of the aforesaid yellow-to-white person and the skin color value interval of the aforesaid black-to-black person, or the first type color value interval and the second type color value interval may refer to the skin color value interval of the aforesaid black-to-white person and the skin color value interval of the aforesaid caucasian person. That is, the first type color value interval and the second type color value interval are only used for distinguishing two different color value intervals. That is, different types of color value intervals (e.g., the first type of color value interval and the second type of color value interval) correspond to different types of target areas (e.g., the first area type and the second area type), and one target area corresponds to one type of color value interval. In other words, the first type color value interval may be any one of a Huang-kind skin color value interval, a Caucasian skin color value interval, and a Caucasian skin color value interval, the second type color value interval may also be any one of a Huang-kind skin color value interval, a Caucasian skin color value interval, and the first type color value interval is different from the second type color value interval.
The server may obtain a color value of each pixel point in each target region, select a first region in the target regions based on the first type color value interval, and select a second region in the target regions based on the second type color value interval: a proportional threshold may be set, each target region corresponds to a target number, and the target number corresponding to one target region is equal to the product of the first pixel number corresponding to the target region and the proportional threshold. For example, if the ratio threshold is set to 0.5, and the threshold of the first pixel point corresponding to a certain target area is 300, the target number corresponding to the target area is 150. And if the number of the pixel points of which the color values of the pixel points fall in the first type color value interval in all the pixel points of a certain target area is larger than the corresponding target number, judging that the target area is the first area. For example, if the color values of 100 pixels in a certain target region fall within the first type color value interval and the number of targets corresponding to the target region is 80, it is determined that the target region is the first region (100> 80). Similarly, if the number of the pixels of which the color values of the pixels in the second type color value interval fall in all the pixels of a certain target area is greater than the corresponding target number, the target area is determined to be the second area. For example, if the color values of 150 pixels in a certain target region fall in the second type color value interval and the number of targets corresponding to the target region is 100, it is determined that the target region is the second region (150> 100). The color value of a certain pixel point falls in the color value interval, namely, the color value of the pixel point is in the interval of the channel corresponding to the values of the channel R, the channel G and the channel B in the color value interval. For example, if the color value of the pixel point Q is: channel R has a value of 100, channel G has a value of 130, and channel B has a value of 160. The first type of color value interval is: channel R interval [95, 105], channel G interval [125, 135], and channel B interval [155, 165 ]. It can be seen that the value 100 of pixel Q in channel R falls within the interval [95, 105] of channel R, the value 130 of pixel Q in channel G falls within the interval [125, 135] of channel G, and the value 160 of pixel Q in channel B falls within the interval [155, 165] of channel B, indicating that pixel Q falls within the first type color value interval.
The terminal equipment can count the number of the pixel points in each first area to obtain a first numerical value, and count the number of the pixel points in each second area to obtain a second numerical value; determining a first ratio based on the first quantity value and the second pixel point quantity, and determining a second ratio based on the second quantity value and the second pixel point quantity; when the maximum value of the first ratio and the second ratio is greater than or equal to a ratio threshold, determining that the data content type of the first multimedia data is the target content type:
the terminal device may sum the number of the pixel points in each first region to obtain a first number value, for example, when the first region includes a region 1 and a region 2, the number of the first pixel points corresponding to the region 1 is 100, and the number of the first pixel points corresponding to the region 2 is 200, the first number value is equal to 300 (i.e., 100+ 200). Similarly, the terminal device may sum the number of the pixel points in each second region to obtain a second number value, for example, when the second region includes a region 3 and a region 4, the number of the first pixel points corresponding to the region 3 is 150, and the number of the first pixel points corresponding to the region 4 is 400, the second number value is equal to 650 (i.e., 150+ 400). The total number of the pixels in the first multimedia data may be referred to as a second pixel number, and the terminal device may obtain a ratio between the first number value and a second pixel threshold, that is, a first ratio, and may also obtain a ratio between the second number value and the second pixel threshold, that is, a second ratio. For example, if the first quantity value is equal to 100, the second quantity value is equal to 200, and the second quantity value is 600, the first ratio is equal to 1/6 (i.e., 100/600), and the second ratio is equal to 1/3 (i.e., 200/600). And if the maximum value of the first ratio and the second ratio is greater than or equal to the ratio threshold value, the data content type of the first multimedia data is considered as the target content type. For example, if the first ratio is 0.7, the second ratio is 0.3, and the ratio threshold is 0.5, the data content type of the first multimedia data is considered as the target content type (because 0.7> 0.5).
Therefore, it can be known through the above method that, when the target color value intervals include the skin color value interval of the caucasian, and the skin color value interval of the caucasian, it can be determined which target areas correspond to the skin color value interval of the caucasian, and which target areas correspond to the skin color value interval of the caucasian, among all target areas obtained from the first multimedia data. Furthermore, the terminal device may calculate a ratio between the total number of the pixels in all the target regions corresponding to the skin color section of the yellow race and the number of the second pixels (i.e., the total number of the pixels in the first multimedia data), calculate a ratio between the total number of the pixels in all the target regions corresponding to the skin color section of the white race and the number of the second pixels (i.e., the total number of the pixels in the first multimedia data), and calculate a ratio between the total number of the pixels in all the target regions corresponding to the skin color section of the black race and the number of the second pixels (i.e., the total number of the pixels in the first multimedia data). When the maximum value of the ratio corresponding to the yellow people, the ratio corresponding to the white people and the ratio corresponding to the black people is larger than a ratio threshold value, the first multimedia data is judged to be a 'figure art map' of the figure art type (namely the target content type) (because the ratio is the proportion of the area of the figure skin in the first multimedia data to the whole image area). Optionally, the number of the pixel points in all the target regions corresponding to the skin color interval of the yellow-kind person, and the number of the pixel points in all the target regions corresponding to the skin color interval of the black-kind person may be summed to obtain a sum value, a ratio between the sum value and the second pixel point number is calculated, and if the ratio is greater than a ratio threshold value, it is determined that the first multimedia data is a "figure art diagram" of a human art type (i.e., a target content type).
Please refer to fig. 5, which is a schematic view illustrating a scene for identifying a data content type of multimedia data according to the present application. As shown in fig. 5, the image 103h is used as the first multimedia data for explanation, and the target area 106h, the target area 100h, the target area 101h, and the target area 102h can be obtained by traversing all the pixels in the image 103h (the background image of the person in the image 103h is not considered here, and actually the background image may form 1 or more target areas). As shown in set 104h, 4 target regions in the acquired image 103 h. By comparing the target color value intervals (including the skin color value intervals of the yellow, white and black people) to which the color values of the pixels in the target area 106h, 100h, 101h and 102h belong, it is obtained that the target area 106h does not correspond to any target color value interval, and therefore, the target area 106h does not participate in the calculation (because it is irrelevant to the target area 106 h) in the process of subsequently judging whether the image 103h is a "figure art" of a human art type (i.e., a target content type). It can also be obtained that the target area 100h, the target area 101h, and the target area 102h all correspond to the color value intervals of the yellow-class person, that is, the target area 100h, the target area 101h, and the target area 102h can be regarded as the areas corresponding to the skin of the yellow-class person. If the first type color value interval is a color value interval of a yellow race, the target area 100h, the target area 101h, and the target area 102h may be referred to as a first area. The number of the pixel points in all the first regions can be summed, that is, the number of the first pixel points corresponding to the target region 100h, the number of the first pixel points corresponding to the target region 101h, and the number of the first pixel points corresponding to the target region 102h are summed to obtain a sum value, and then a ratio between the sum value and the number of the second pixel points (that is, the total number of the pixel points in the image 103 h), that is, a first ratio, can be calculated to obtain a result 105h if the first ratio is greater than a ratio threshold, that is, the image 103h is a "figure art figure" of a human art type (that is, a target content type).
Second identification of data content type: whether the first multimedia data is a human art map of a human art type (namely, a target content type) is judged through the source of the first multimedia data. The method specifically comprises the following steps:
specifically, when the terminal device downloads and stores the first multimedia data at the network side, the terminal device needs to fill the network source address of the first multimedia data in the original character string of the first multimedia data and store the character string filled with the network source address of the first multimedia data. The method specifically comprises the following steps: the terminal equipment can respond to the storage operation aiming at the first multimedia data and acquire the original character string and the source address of the first multimedia data; adding the source address in the original character string to obtain the data character string corresponding to the first multimedia data, and storing the data character string:
the data string is a string obtained by filling the source address of the first multimedia data (i.e., the network source address) in the original string of the first multimedia data. Please refer to fig. 6, which is a schematic view of a scene for acquiring a data character string according to the present application. Typically, when downloading an image in jpg (an image format) format on a browser (QB), the image corresponds to a source address (i.e. host of a web address) which is the network address of the downloaded image. An image in jpg format typically corresponds to an original string that includes image data characters (i.e., characters corresponding to the content of the image itself), an end character, and useless characters following the end character. Therefore, when the terminal device downloads the first multimedia data in the jpg format through the browser, the source address and the original character string of the first multimedia data can be acquired through the browser, and then the source address of the first multimedia data can be filled in useless characters after the end character in the original character string of the first multimedia data. As shown in fig. 6, the character string 100j is an original character string of the first multimedia data, and the character string 100j includes image data characters, end characters, and useless characters corresponding to the first multimedia data. The character string 101j is a data character string in which the source address of the first multimedia data is filled, and in the character string 101j, the image data characters and the end characters in the character string 100j are retained, and the positions of the useless characters in the character string 100j are filled with the "padding flag", "byte length", and "source address". The padding flag in the character string 101j is a flag (which may be set by itself and has a fixed length) used to indicate that the source address of the first multimedia data is padded in the character string 101j, the byte length in the character string 101j is the byte length of the source address padded in the character string 101j, and the source address in the character string 101j is the network address of the first multimedia data acquired through the browser. The byte length of the character string 101j is used to read the source address of the character string 101j, for example, when the byte length is 10 bytes, then when reading the character string 101j, 10 bytes after the byte length of the character string 101j are read as the source address of the first multimedia data. As shown in fig. 6, the string 102j is an exemplary data string of the first multimedia data, i.e., the image data character may be 0000003F, the end character may be FF D9, the padding flag may be 51425F 46524F 4D, the byte length may be 0x 0A (i.e., 10 bytes), and the source address may be www.xx.com (10 bytes in total).
When the terminal device identifies the data content type of the first multimedia data and stores the data character string of the first multimedia data, the terminal device may acquire the data character string of the first multimedia data and read the source address of the first multimedia data in the data character string. Meanwhile, the terminal device may initiate a request for obtaining the target content address library to the server, and the server may return the requested target content address library to the terminal device. The target content address library includes a plurality of network addresses, and the network addresses in the target content address library are addresses for acquiring multimedia data of a human art type (target content type). When the terminal equipment compares that the source address of the first multimedia data exists in the target content address library, the first multimedia data is judged to be a 'figure art map' of the figure art type (namely the target content type). The identification manner for identifying the data content type of the first multimedia data by the source address of the first multimedia data can become more reliable and accurate with the lapse of time for using the multimedia data of the synchronous encryption target content type and the enlargement of the user group, and is a constantly improved manner (because the sample information (including the user feedback information, the source address information, the image content information, and the like) of the "human art" of the human art type is more sufficient with the lapse of the use time and the enlargement of the user group).
The third identification mode of the data content type is as follows: the data content type of the first multimedia data is identified by an identifying plug-in, which is a plug-in requested by the terminal device to the server for downloading. The recognition plug-in is a plug-in for recognizing multimedia data of a target content type, the recognition plug-in may be a plug-in for recognizing 'human art figure' of a human art type only, the recognition plug-in may be a model trained by a large number of 'human art figures' of human art types, and the model may be understood as a code consisting of a plurality of formulas and a plurality of parameters. The identification plug-in may include two identification functions, namely an identification function and a comparison identification function.
Application of the recognition function: the terminal equipment can input the first multimedia data into an identification plug-in, and output a confidence coefficient for the first multimedia data based on the identification plug-in; when the confidence is equal to or greater than a confidence threshold, determining that the data content type of the first multimedia data is the target content type: when the terminal device inputs the first multimedia data into the identification plug-in, the identification plug-in may call an identification function to perform image identification on the first multimedia data, and after the identification is completed, the identification plug-in may output a confidence level for the first multimedia data, where the confidence level may be understood as a probability, and the greater the confidence level, the greater the possibility that the first multimedia data is multimedia data of a target content type is. Therefore, a confidence threshold may be set, and when the confidence of the first multimedia data is greater than or equal to the confidence threshold, the data content type of the first multimedia data is determined to be the target content type. Please refer to fig. 7, which is a schematic view of another scenario for identifying a data content type of multimedia data provided in the present application. As shown in fig. 7, the terminal device may input the first multimedia data 100f into a model m (i.e., an identification plug-in), and the model may perform image identification on the first multimedia data 100f and output a confidence 101f of the first multimedia data 100f, and when the confidence 101f is greater than or equal to a confidence threshold, a recognition result 102f may be obtained, that is, the data content type of the first multimedia data 100f is the target content type.
Application of the comparative recognition function: the terminal equipment can acquire reference multimedia data from the encrypted multimedia data; inputting the first multimedia data and the reference multimedia data into the identification plug-in, and outputting data similarity between the first multimedia data and the reference multimedia data based on the identification plug-in; when the data similarity is equal to or greater than a similarity threshold, determining that the data content type of the first multimedia data is the target content type: when the data content type of 1 first multimedia data is identified, the terminal device may identify the data content type of the first multimedia data using the multimedia data that has been subjected to the encryption process (e.g., the multimedia data that has been added to the private space) as the reference multimedia data. First, the terminal device can acquire 1 multimedia data from the multimedia data that has been subjected to the encryption processing as the reference multimedia data. The terminal equipment can input the first multimedia data and the obtained reference multimedia data into the identification plug-in, the identification plug-in can identify the data similarity between the first multimedia data and the reference multimedia data, and when the identification is finished, the data similarity between the first multimedia data and the reference multimedia data is output. The greater the data similarity, the more similar between the first multimedia data and the reference multimedia data. A similarity threshold may be set, and when the data similarity between the first multimedia data and the reference multimedia data is greater than or equal to the similarity threshold, the data content type of the first multimedia data is determined to be the target content type. The data similarity may refer to similarity of image contents (e.g., color distribution of pixel points) between the first multimedia data and the reference multimedia data, and may also refer to similarity between a face of a person in the first multimedia data and a face of a person in the reference multimedia data. When the data similarity between the first multimedia data and the reference multimedia data is less than the similarity threshold, it continues to acquire another multimedia data as the reference multimedia data from the multimedia data that has been subjected to the encryption processing, in the same manner as described above, the data content type of the first multimedia data is judged again, when the data content type of the first multimedia data is judged not to be the target content type all the time, the multimedia data which is subjected to the encryption processing is required to be continuously selected in sequence to serve as the reference multimedia data to identify the data content type of the first multimedia data, and the data content type of the first multimedia data is judged not to be the target content type when all the multimedia data which is subjected to the encryption processing are still taken as the reference multimedia data and the data content type of the first multimedia data is judged not to be the target content type. Please refer to fig. 8, which is a schematic view of another scenario for identifying a data content type of multimedia data provided in the present application. As shown in fig. 8, a model m (i.e., an identification plug-in) may be input from the first multimedia data 100e in the multimedia data set and the reference multimedia data 101e obtained from the private space, and the model m may perform image recognition on the first multimedia data 100e and the reference multimedia data 101e and output a data similarity 102e between the first multimedia data 100e and the reference multimedia data 101 e. When the data similarity 102e is greater than or equal to the similarity threshold, the recognition result 103e is obtained, that is, the data content type of the first multimedia data 100e is the target content type.
The data content type of the first multimedia data can be identified by combining the three identification modes, and the three identification modes are, for review, the first one: identifying by traversing colors of pixel points in the first multimedia data; and the second method comprises the following steps: identifying through a source address of the first multimedia data; and the third is that: the identification is performed by an identification plug-in. The manner of combining the data content type identifying the first multimedia data may include: the identification may be performed by selecting any one of the three identification methods, that is, by using a first identification method, a second identification method, or a third identification method. The identification may be performed by selecting any two of the three identification methods, that is, by using the first identification method and the second identification method, by using the first identification method and the third identification method, or by using the second identification method and the third identification method. When two identification modes are selected for identification, the identification result is not affected by the identification sequence of the two identification modes, and the first multimedia data can be judged to be the multimedia data of the target content type only if the multimedia data of the target content type of the first multimedia data is identified by the two identification modes. The three identification modes can be selected for identification, the identification sequence of the three identification modes does not affect the identification result, and the first multimedia data can be judged to be the multimedia data of the target content type only when the multimedia data of the target content type of the first multimedia data is identified through the three identification modes.
Step S103, determining the first multimedia data with the data content type as the target content type as the multimedia data to be encrypted;
specifically, the first multimedia data with the data content type being the target content type in the identified multimedia data set may be referred to as multimedia data to be encrypted. The target content type is a data content type indicated by the synchronous encryption operation, and the target content type may be a default data content type set by the user, or may be a data content type of the second multimedia data. The specific determination manner of the target content type can be found in step S102 described above.
Step S104, encrypting the multimedia data to be encrypted;
specifically, the terminal device may encrypt the multimedia data to be encrypted. Wherein, the encryption processing may include: and uploading the multimedia data to be encrypted to a private space in the cloud disk, or adding the multimedia data to be encrypted to the private space in the terminal equipment (also referred to as equipment encryption space). After the multimedia data to be encrypted is encrypted, the multimedia data to be encrypted can be deleted from the parent storage directory where the multimedia data to be encrypted originally exists. The private space is an encrypted folder and can be opened for access only by a password, a fingerprint, a voice or a human face, that is, the private space can be encrypted by the password or by the fingerprint, the voice or the human face of a user.
The terminal equipment can respond to the expansion operation aiming at the equipment encryption space and output a verification information input box; acquiring the verification information input in the verification information input frame; when the verification information is the same as the authentication information, outputting the multimedia data in the encrypted space of the device: the terminal device may respond to a click instruction (that is, an expansion operation for the device encryption space) of the user for the private space (that is, the encrypted folder, that is, the device encryption space), and output a verification information entry box, which may be a sub-page independently displayed on the current terminal page, for example, a pop-up window. The terminal device may acquire the verification information entered in the verification information entry box by the user, where the verification information may be password information, fingerprint information, voice information, or face information. The user can set authentication information for the device encryption space in the terminal device in advance, and the device encryption space can be accessed through the authentication information. When the verification information acquired by the terminal device and input by the user in the verification information input box is the same as the authentication information, the terminal device can display the multimedia data in the device encryption space in the terminal page for the user to browse. Please refer to fig. 9, which is a schematic page diagram of another terminal device provided in the present application. As shown in fig. 9, there is a button 100d in a page 100d of the terminal device, and the terminal device may display a menu bar 103d in response to a click operation of the user on the button 100d, where the menu bar 103d includes a "private space" menu, a "file setting" menu, a "help and feedback" menu, and an "install desktop portal" menu. The terminal device can display the page 101d in response to a user's click operation on the "private space" menu in the menu bar 103d (this click operation is the above-described expansion operation on the device encrypted space). The page 101d is a page in which an access password for the private space is entered, and the input window 104d in the page 101d for inputting the unlock password is the authentication information entry box. The terminal device may acquire an access password (i.e., the above-mentioned authentication information) entered by the user in the page 101d, and when the acquired access password is the same as an authentication password (i.e., the above-mentioned authentication information) set by the user in the terminal device in advance, the terminal device may display the page 102 d. The page 102d is a page corresponding to a private space (i.e. a device encryption space) in the terminal device, and the page 102d includes all multimedia data (including the second multimedia data and the multimedia data to be encrypted) added to the private space, where the private space includes an image 1, an image 2, an image 3, an image 4, an image 5, and an image 6.
The method includes the steps that firstly, synchronous encryption operation is responded, and a multimedia data set is obtained; identifying a data content type of first multimedia data in the multimedia data set according to the data content of the first multimedia data; determining the first multimedia data with the data content type as the target content type as multimedia data to be encrypted; the target content type is a data content type indicated by the synchronous encryption operation; and encrypting the multimedia data to be encrypted. Therefore, the method provided by the application can identify the first multimedia data in the multimedia data set by responding to the synchronous encryption operation, and encrypt all the first multimedia data of which the identified data content type is the target content type, so that the encryption mode for the multimedia data is enriched. Meanwhile, all multimedia data which are the same as the target content type in the multimedia data can be automatically and synchronously encrypted, and the multimedia data which are the target content type do not need to be discontinuously encrypted one by one, so that the encryption efficiency aiming at the multimedia data is improved.
Fig. 10 is a schematic flow chart of another data encryption method provided in the present application. As shown in fig. 10, the data encryption method includes:
step S201, a user encrypts a picture;
specifically, when the user browses a picture in the terminal device, the browsed picture (for example, the picture Z, which is the second multimedia data) is encrypted.
In step S202, "artistic drawing of character"? (ii) a
Specifically, if the terminal device roughly recognizes (recognizes by the first recognition method or the second recognition method in the above step S102) that the picture Z is a "human art figure" of the human art type, the following step S203 is executed. If the picture Z is a "human art picture" of a human art type which is not roughly recognized (recognized by the first recognition method or the second recognition method in the above-described step S102) by the terminal device, the following step S207 is performed.
In step S203, is the user select to turn on the automatic encryption function or has turned on the automatic encryption function? (ii) a
Specifically, if the user has started the automatic encryption function (i.e. the function of synchronously encrypting the multimedia data of the target content type), the following step S204 is executed. If the user does not start the automatic encryption function, an encryption selection box is displayed, when the user clicks an "start" button in the encryption selection box (indicating that the user selects to start the automatic encryption function), the following step S204 is performed, and when the user clicks a "cancel" button in the encryption selection box, the following step S207 is performed.
In step S204, is the model updated or downloaded? (ii) a
Specifically, if the user does not download the model (i.e., the above-mentioned identification plug-in) and needs to download the model or the downloaded model needs to update the model (i.e., the model has a new version for the user), the following step S205 is executed. If the user has downloaded the latest version of the model, the following step S206 is performed.
Step S205, downloading the model;
specifically, the terminal device downloads the model of the latest version.
Step S206, executing identification and reminding a user after identification;
specifically, the terminal device identifies multimedia data (i.e., first multimedia data) in the multimedia data set (which may be a picture set acquired according to the parent storage directory of the picture Z, and please refer to the process of acquiring the multimedia data set according to the parent storage directory of the second multimedia data in step S101) through the downloaded model, adds a "figure art map" that is a type of body art in the identified multimedia data set to the device encryption space, and reminds the user. If 10 "artwork" of the type body art in the identified multimedia data set is added to the device encryption space, the reminder content may be "10 pictures that have been automatically encrypted".
Step S207, end;
specifically, picture Z is added to the device encryption space, and the process ends.
Fig. 11 is a schematic flow chart of another data encryption method provided in the present application. As shown in fig. 11, the data encryption method may include:
step S301, responding to the encryption operation aiming at the first image, and outputting an encryption selection frame;
specifically, the first image may be any one of images in a terminal device, and the terminal device may perform encryption processing on the first image in response to an encryption operation performed by a user for the first image (the encryption operation may be performed when the user browses to the first image in a process of browsing images on the terminal device), and identify an image content type of the first image. When the image content type of the first image is identified as the target content type, an encryption selection frame (e.g., the encryption selection frame 102b in fig. 1b described above) is output in the terminal page. The target content type here may be a preset one of image content types, such as an image content type for landscape, an image content type for architecture, or an image content type for human art. The encryption selection box is used for prompting a user whether to start a function of encrypting the image of the target content type in the terminal equipment by one key, and comprises two buttons, wherein one button is a 'cancel' button, and the other button is a 'start' button. When the user clicks the "cancel" button, the terminal device may close the above-described encryption selection box, and when the user clicks the "open" button, the terminal device may perform the following step S302. It is to be understood that, here, the first image corresponds to the second multimedia data, the image content type corresponds to the data content type, and the target content type corresponding to the image corresponds to the target content type corresponding to the multimedia data. Therefore, for the specific implementation process of step S301, refer to the description process of "the fourth encryption manner of synchronous encryption operation" in step S101 in the corresponding embodiment of fig. 2.
Step S302, responding to the synchronous encryption operation in the encryption selection box and outputting a first encryption prompt box;
specifically, the terminal device may respond to a click operation of a user on an "on" button in the encryption selection box (the click operation is a synchronous encryption operation in the encryption selection box), output a first encryption prompt box (for example, the prompt box 103b in fig. 1 b) in the terminal page, and identify and encrypt an image in the image set, where the image content type is the target content type. The image set (corresponding to the multimedia data set) may be a set composed of all images (except the first image) in the terminal device, and an image in which the content type of the image in the image set is the target content type may be referred to as a second image. The first encryption prompt box may include therein encryption process prompt information for the second image. The encryption process prompting information is used to prompt the user that the second image is being recognized and encrypted, for example, the encryption process prompting information may be "the second image is being recognized and encrypted".
During the process of identifying and encrypting the second image by the terminal device, the first encryption prompt box can be continuously output (i.e. displayed) on the terminal page. When the terminal device completes encrypting the second image in the image set, the first encryption prompt box in the terminal page may be closed, and a second encryption prompt box (for example, the prompt box 104b in fig. 1b described above) including the encryption completion prompt information for the second image may be output in the terminal page. The encryption completion prompt is used to prompt the user that the encryption of the second image in the image set is completed, for example, the encryption completion prompt may be "all the second images have been encrypted completed".
More specifically, when the user shares a certain image (for example, a third image, where the third image may be any one of the images in the terminal device) through the terminal device, the terminal device may identify an image content type of the third image shared by the user. When the third image is recognized as the figure art drawing with the image content type being the human body art type, the sharing prompt box can be output (namely displayed) in the terminal page. The sharing prompt box is used for prompting the user of the image content type of the third image to be shared, and the sharing prompt box may include prompting information (for example, is the image shared by the user as an artistic drawing, may share the image failed, and continues to share the image. The terminal equipment can respond to the click operation of the user on the 'cancel' button in the sharing prompt box, close the sharing prompt box in the terminal page and cancel the sharing operation of the third image. The terminal device can also respond to the click operation of the user on the 'confirm' button in the sharing prompt box, close the sharing prompt box in the terminal page, share the third image out, and forward the third image to the address which the user wants to share.
The method includes the steps that firstly, synchronous encryption operation is responded, and a multimedia data set is obtained; identifying a data content type of first multimedia data in the multimedia data set according to the data content of the first multimedia data; determining the first multimedia data with the data content type as the target content type as multimedia data to be encrypted; the target content type is a data content type indicated by the synchronous encryption operation; and encrypting the multimedia data to be encrypted. Therefore, the method provided by the application can identify the first multimedia data in the multimedia data set by responding to the synchronous encryption operation, and encrypt all the first multimedia data of which the identified data content type is the target content type, so that the encryption mode for the multimedia data is enriched. Meanwhile, all multimedia data which are the same as the target content type in the multimedia data can be automatically and synchronously encrypted, and the multimedia data which are the target content type do not need to be discontinuously encrypted one by one, so that the encryption efficiency aiming at the multimedia data is improved.
Please refer to fig. 12, which is a schematic structural diagram of a data encryption apparatus provided in the present application. As shown in fig. 12, the data encryption device 1 may include: a response module 11, an identification module 12, a determination module 13 and an encryption module 14;
a response module 11, configured to respond to the synchronous encryption operation and obtain a multimedia data set;
the identification module 12 is configured to identify a data content type of first multimedia data in the multimedia data set according to a data content of the first multimedia data;
a determining module 13, configured to determine the first multimedia data with the data content type being the target content type as multimedia data to be encrypted; the target content type is a data content type indicated by the synchronous encryption operation;
and the encryption module 14 is configured to encrypt the multimedia data to be encrypted.
For specific implementation of functions of the response module 11, the identification module 12, the determination module 13, and the encryption module 14, please refer to steps S101 to S104 in the corresponding embodiment of fig. 2, which is not described herein again.
Wherein the first multimedia data is image data; the identification module 12 includes: a traversing unit 1201, a first determining unit 1202, and a second determining unit 1203;
a traversal unit 1201, configured to traverse each pixel in the first multimedia data, and obtain a plurality of target regions in the first multimedia data according to a color tolerance threshold and a color value of each pixel in the traversed first multimedia data; the color of all pixel points in a target area is within a color value interval defined by a target color value and the color tolerance threshold, and the target color value refers to the color value of the first pixel point traversed in the target area;
a first determining unit 1202, configured to determine the number of pixel points in each target region as a first number of pixel points;
a second determining unit 1203, configured to determine a data content type of the first multimedia data according to a target color value interval for matching the target content type, the number of the first pixel points, and a color value of each pixel point in each target region.
For a specific implementation manner of functions of the traversing unit 1201, the first determining unit 1202, and the second determining unit 1203, please refer to step S102 in the corresponding embodiment of fig. 2, which is not described herein again.
Wherein the target color value interval comprises a first type color value interval and a second type color value interval; the second determining unit 1203 includes: an acquisition subunit 12031, a statistics subunit 12032, a number determination subunit 12033, a ratio determination subunit 12034, and a type determination subunit 12035;
an obtaining subunit 12031, configured to obtain a color value of each pixel in each target region, select a first region in the multiple target regions based on the first type color value interval, and select a second region in the multiple target regions based on the second type color value interval; the number of pixel points of which the color values are in the first type color value interval in the first area is larger than the target number; the number of pixel points of which the color values are in the second type color value interval in the second area is larger than the target number; the target number is determined based on the first number of pixels and a proportional threshold;
a statistics subunit 12032, configured to count the number of pixels in each first region to obtain a first numerical value, and count the number of pixels in each second region to obtain a second numerical value;
a number determining subunit 12033, configured to determine the number of pixel points in the first multimedia data as a second number of pixel points;
a ratio determining subunit 12034, configured to determine a first ratio based on the first quantity value and the second quantity of pixels, and determine a second ratio based on the second quantity value and the second quantity of pixels;
a type determining subunit 12035, configured to determine, when a maximum value of the first ratio and the second ratio is greater than or equal to a ratio threshold, that the data content type of the first multimedia data is the target content type.
For specific implementation of functions of the acquiring subunit 12031, the statistics subunit 12032, the number determining subunit 12033, the ratio determining subunit 12034, and the type determining subunit 12035, please refer to step S102 in the embodiment corresponding to fig. 2, which is not described herein again.
Wherein, the identification module 12 includes: an address pool obtaining unit 1204, a source address obtaining unit 1205, and a judgment unit 1206;
an address library obtaining unit 1204, configured to obtain a data character string corresponding to the first multimedia data, and obtain a target content address library; the target content address library comprises a plurality of target content addresses; the plurality of target content addresses are all addresses used for acquiring multimedia data of the target content type;
a source address obtaining unit 1205 for obtaining a source address of the first multimedia data from the data string;
a determining unit 1206, configured to determine, if the source address exists in the target content addresses, that the data content type of the first multimedia data is the target content type.
For a detailed implementation manner of the functions of the address library obtaining unit 1204, the source address obtaining unit 1205 and the determining unit 1206, please refer to step S102 in the corresponding embodiment of fig. 2, which is not described herein again.
Wherein, the data encryption device 1 further comprises: a store response module 15 and an add module 16;
a storage response module 15, configured to respond to a storage operation for the first multimedia data, and obtain an original character string of the first multimedia data and the source address;
and an adding module 16, configured to add the source address to the original character string to obtain the data character string corresponding to the first multimedia data, and store the data character string.
For a specific implementation manner of the functions of the storage response module 15 and the adding module 16, please refer to step S102 in the corresponding embodiment of fig. 2, which is not described herein again.
Wherein, the identification module 12 includes: a first input unit 1207 and a third determination unit 1208;
a first input unit 1207, configured to input the first multimedia data into an identification plug-in, and output a confidence for the first multimedia data based on the identification plug-in; the identification plug-in is used for identifying the data content type of the multimedia data according to the data content of the multimedia data;
a third determining unit 1208, configured to determine, when the confidence is equal to or greater than a confidence threshold, that the data content type of the first multimedia data is the target content type.
For specific implementation of functions of the first input unit 1207 and the third determining unit 1208, please refer to step S102 in the corresponding embodiment of fig. 2, which is not described herein again.
Wherein, the identification module 12 includes: a reference acquisition unit 1209, a second input unit 1210, and a fourth determination unit 1211;
a reference acquisition unit 1209 for acquiring reference multimedia data from the multimedia data that has been subjected to the encryption processing;
a second input unit 1210 for inputting the first multimedia data and the reference multimedia data into the identification plug-in, and outputting a data similarity between the first multimedia data and the reference multimedia data based on the identification plug-in;
a fourth determining unit 1211, configured to determine a data content type of the first multimedia data as the target content type when the data similarity is equal to or greater than a similarity threshold.
For a specific implementation manner of the functions of the reference obtaining unit 1209, the second input unit 1210, and the fourth determining unit 1211, please refer to step S102 in the embodiment corresponding to fig. 2, which is not described herein again.
Wherein, the response module 11 includes: a first response unit 111, a second response unit 112, and a fifth determination unit 113;
a first response unit 111, configured to respond to an encryption operation for second multimedia data, perform encryption processing on the second multimedia data, and output an encryption selection box;
a second response unit 112, configured to obtain the multimedia data set in response to the synchronous encryption operation in the encryption selection box, and identify a data content type of the second multimedia data;
a fifth determining unit 113, configured to determine the data content type of the second multimedia data as the target content type.
For specific functional implementation manners of the first responding unit 111, the second responding unit 112, and the fifth determining unit 113, please refer to step S101 in the corresponding embodiment of fig. 2, which is not described herein again.
Wherein, the response module 11 includes: a third response unit 114 and a fourth response unit 115;
a third response unit 114, configured to perform encryption processing on second multimedia data in response to an encryption operation on the second multimedia data, and output an encryption selection box; the encryption selection frame comprises encryption prompt information aiming at the target content type;
a fourth response unit 115, configured to, in response to the synchronous encryption operation on the encryption hint information in the encryption selection box, obtain the multimedia data set according to the parent storage directory of the second multimedia data.
For a specific implementation manner of the functions of the third response unit 114 and the fourth response unit 115, please refer to step S101 in the corresponding embodiment of fig. 2, which is not described herein again.
Wherein the third responding unit 114 includes: a response subunit 1141 and an output subunit 1142;
a response subunit 1141, configured to perform encryption processing on the second multimedia data in response to an encryption operation on the second multimedia data, and identify a data content type of the second multimedia data;
an output subunit 1142, configured to output the encryption selection box when the data content type of the second multimedia data is identified as the target content type.
For a specific implementation manner of the functions of the response subunit 1141 and the output subunit 1142, please refer to step S101 in the corresponding embodiment of fig. 2, which is not described herein again.
Wherein the fourth response unit 115 includes: a directory acquiring subunit 1151, a directory determining subunit 1152, and an adding subunit 1153;
a directory acquiring subunit 1151, configured to acquire the parent storage directory of the second multimedia data;
a directory determining subunit 1152, configured to determine the parent storage directory, the child storage directories in the parent storage target, and the peer storage directories for the parent storage directory as storage directories to be identified;
an adding subunit 1153, configured to add the multimedia data in the storage directory to be identified to the multimedia data set.
For a specific function implementation manner of the directory obtaining subunit 1151, the directory determining subunit 1152, and the adding subunit 1153, please refer to step S101 in the corresponding embodiment of fig. 2, which is not described herein again.
The encryption module 14 is specifically configured to:
adding the multimedia data to be encrypted to an equipment encryption space;
then, the data encryption apparatus 1 further includes: an output module 17, a verification acquisition module 18 and an authentication module 19;
an output module 17, configured to output a verification information entry box in response to an expansion operation for the device encrypted space;
a verification acquisition module 18, configured to acquire verification information entered in the verification information entry box;
and the authentication module 19 is used for outputting the multimedia data in the encrypted space of the equipment when the verification information is the same as the authentication information.
For specific functional implementation manners of the output module 17, the verification obtaining module 18, and the authentication module 19, please refer to step S104 in the corresponding embodiment of fig. 2, which is not described herein again.
The method includes the steps that firstly, synchronous encryption operation is responded, and a multimedia data set is obtained; identifying a data content type of first multimedia data in the multimedia data set according to the data content of the first multimedia data; determining the first multimedia data with the data content type as the target content type as multimedia data to be encrypted; the target content type is a data content type indicated by the synchronous encryption operation; and encrypting the multimedia data to be encrypted. Therefore, the method provided by the application can identify the first multimedia data in the multimedia data set by responding to the synchronous encryption operation, and encrypt all the first multimedia data of which the identified data content type is the target content type, so that the encryption mode for the multimedia data is enriched. Meanwhile, all multimedia data which are the same as the target content type in the multimedia data can be automatically and synchronously encrypted, and the multimedia data which are the target content type do not need to be discontinuously encrypted one by one, so that the encryption efficiency aiming at the multimedia data is improved.
Fig. 13 is a schematic structural diagram of another data encryption device provided in the present application. As shown in fig. 13, the data encryption device 2 may include: a first operation response module 21 and a second operation response module 22;
a first operation response module 21 for outputting an encryption selection frame in response to an encryption operation for the first image; the encryption selection frame is output when the image content type of the first image is identified as a target content type;
the second operation response module 22 is configured to respond to the synchronous encryption operation in the encryption selection box and output a first encryption prompt box; the first encryption prompt box comprises prompt information of an encryption process aiming at a second image; the second image is an image of which the image content type in the image set is the target content type.
For specific implementation of functions of the first operation response module 21 and the second operation response module 22, please refer to steps S301 to S302 in the embodiment corresponding to fig. 11, which is not described herein again.
After the second operation response module 22 completes the execution, the data encryption apparatus 2 is further configured to:
closing the first encryption prompt box and outputting a second encryption prompt box; the second encryption prompt box comprises prompt information of an encryption result aiming at the second image.
Please refer to fig. 14, which is a schematic structural diagram of a computer device provided in the present application. As shown in fig. 14, the computer apparatus 1000 may include: the processor 1001, the network interface 1004, and the memory 1005, and the data encryption apparatus 1000 may further include: a user interface 1003, and at least one communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display) and a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a standard wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 1005 may optionally be at least one memory device located remotely from the processor 1001. As shown in fig. 14, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a device control application program.
In the computer device 1000 shown in fig. 14, the network interface 1004 may provide a network communication function; the user interface 1003 is an interface for providing a user with input; and the processor 1001 may be configured to call the device control application stored in the memory 1005 to implement the data encryption method described in the embodiment corresponding to any of fig. 2 and 11. It should be understood that the data encryption device 1000 described in the present application can also perform the description of the data encryption device 1 in the embodiment corresponding to fig. 12 and the description of the data encryption device 2 in the embodiment corresponding to fig. 13, which are not described herein again. In addition, the beneficial effects of the same method are not described in detail.
Further, here, it is to be noted that: the present application further provides a computer-readable storage medium, where the computer program executed by the aforementioned data encryption device 1 and data encryption device 2 is stored in the computer-readable storage medium, and the computer program includes program instructions, and when the processor executes the program instructions, the description of the data encryption method in the embodiment corresponding to any one of fig. 2 and fig. 11 can be executed, and therefore, details will not be repeated here. In addition, the beneficial effects of the same method are not described in detail. For technical details not disclosed in the embodiments of the computer storage medium referred to in the present application, reference is made to the description of the embodiments of the method of the present application.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present application and is not to be construed as limiting the scope of the present application, so that the present application is not limited thereto but rather by the claims appended hereto.

Claims (15)

1. A method for data encryption, comprising:
responding to the synchronous encryption operation to obtain a multimedia data set;
identifying a data content type of first multimedia data in the multimedia data set according to the data content of the first multimedia data;
determining the first multimedia data with the data content type as the target content type as multimedia data to be encrypted; the target content type is a data content type indicated by the synchronous encryption operation;
and encrypting the multimedia data to be encrypted.
2. The method of claim 1, wherein the first multimedia data is image data; the identifying a data content type of a first multimedia data in the multimedia data set according to a data content of the first multimedia data comprises:
traversing each pixel point in the first multimedia data, and acquiring a plurality of target areas in the first multimedia data according to a color tolerance threshold and a color value of each pixel point in the traversed first multimedia data; the color of all pixel points in a target area is within a color value interval defined by a target color value and the color tolerance threshold, and the target color value refers to the color value of the first pixel point traversed in the target area;
determining the number of pixel points in each target area as the first pixel point number;
and determining the data content type of the first multimedia data according to a target color value interval for matching the target content type, the number of the first pixel points and the color value of each pixel point in each target area.
3. The method of claim 2 wherein the target color value bins comprise a first type of color value bin and a second type of color value bin; the determining the data content type of the first multimedia data according to the target color value interval for matching the target content type, the first pixel number and the color value of each pixel in each target region includes:
obtaining a color value of each pixel point in each target area, selecting a first area in the target areas based on the first type color value interval, and selecting a second area in the target areas based on the second type color value interval; the number of pixel points of which the color values are in the first type color value interval in the first area is larger than the target number; the number of pixel points of which the color values are in the second type color value interval in the second area is larger than the target number; the target number is determined based on the first number of pixels and a proportional threshold;
counting the number of pixel points in each first region to obtain a first number value, and counting the number of pixel points in each second region to obtain a second number value;
determining the number of pixel points in the first multimedia data as the number of second pixel points;
determining a first ratio based on the first quantity value and the second pixel point quantity, and determining a second ratio based on the second quantity value and the second pixel point quantity;
and when the maximum value of the first ratio and the second ratio is larger than or equal to a ratio threshold value, determining that the data content type of the first multimedia data is the target content type.
4. The method of claim 1, wherein identifying a data content type of a first multimedia data of the set of multimedia data based on a data content of the first multimedia data comprises:
acquiring a data character string corresponding to the first multimedia data, and acquiring a target content address library; the target content address library comprises a plurality of target content addresses; the plurality of target content addresses are all addresses used for acquiring multimedia data of the target content type;
acquiring a source address of the first multimedia data from the data character string;
and if the source address exists in the target content addresses, determining that the data content type of the first multimedia data is the target content type.
5. The method of claim 4, further comprising:
responding to a storage operation aiming at the first multimedia data, and acquiring an original character string and the source address of the first multimedia data;
and adding the source address in the original character string to obtain the data character string corresponding to the first multimedia data, and storing the data character string.
6. The method of claim 1, wherein identifying a data content type of a first multimedia data of the set of multimedia data based on a data content of the first multimedia data comprises:
inputting the first multimedia data into an identification plug-in, and outputting a confidence degree for the first multimedia data based on the identification plug-in; the identification plug-in is used for identifying the data content type of the multimedia data according to the data content of the multimedia data;
and when the confidence coefficient is equal to or greater than a confidence coefficient threshold value, determining the data content type of the first multimedia data as the target content type.
7. The method of claim 6, wherein identifying a data content type of a first multimedia data of the set of multimedia data according to a data content of the first multimedia data comprises:
acquiring reference multimedia data from the encrypted multimedia data;
inputting the first multimedia data and the reference multimedia data into the identification plug-in, and outputting data similarity between the first multimedia data and the reference multimedia data based on the identification plug-in;
and when the data similarity is equal to or greater than a similarity threshold value, determining the data content type of the first multimedia data as the target content type.
8. The method of claim 1, wherein obtaining the set of multimedia data in response to the synchronous encryption operation comprises:
responding to the encryption operation aiming at second multimedia data, carrying out encryption processing on the second multimedia data, and outputting an encryption selection frame;
responding to the synchronous encryption operation in the encryption selection box, acquiring the multimedia data set, and identifying the data content type of the second multimedia data;
determining a data content type of the second multimedia data as the target content type.
9. The method of claim 1, wherein obtaining the set of multimedia data in response to the synchronous encryption operation comprises:
responding to the encryption operation aiming at second multimedia data, carrying out encryption processing on the second multimedia data, and outputting an encryption selection frame; the encryption selection frame comprises encryption prompt information aiming at the target content type;
and responding to the synchronous encryption operation of the encryption prompt information in the encryption selection box, and acquiring the multimedia data set according to the parent storage directory of the second multimedia data.
10. The method of claim 9, wherein the encrypting the second multimedia data in response to the encrypting operation on the second multimedia data, and outputting an encryption selection box comprises:
responding to the encryption operation aiming at the second multimedia data, carrying out encryption processing on the second multimedia data, and identifying the data content type of the second multimedia data;
and when the data content type of the second multimedia data is identified as the target content type, outputting the encryption selection frame.
11. The method of claim 9, wherein obtaining the set of multimedia data from the parent storage directory of the second multimedia data comprises:
acquiring the parent storage directory of the second multimedia data;
determining the parent storage directory, the child storage directory in the parent storage target and the peer storage directory aiming at the parent storage directory as storage directories to be identified;
and adding the multimedia data in the storage directory to be identified to the multimedia data set.
12. The method according to claim 1, wherein the encrypting the multimedia data to be encrypted comprises:
adding the multimedia data to be encrypted to an equipment encryption space;
then, the method further comprises the following steps:
responding to expansion operation aiming at the equipment encryption space, and outputting a verification information input box;
acquiring the verification information input in the verification information input frame;
and when the verification information is the same as the authentication information, outputting the multimedia data in the encrypted space of the equipment.
13. A method for data encryption, comprising:
outputting an encryption selection frame in response to an encryption operation for the first image; the encryption selection frame is output when the image content type of the first image is identified as a target content type;
responding to the synchronous encryption operation in the encryption selection box and outputting a first encryption prompt box; the first encryption prompt box comprises prompt information of an encryption process aiming at a second image; the second image is an image of which the image content type in the image set is the target content type.
14. A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method according to any one of claims 1-13.
15. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program comprising program instructions which, when executed by a processor, perform the method according to any one of claims 1-13.
CN201911083935.XA 2019-11-07 2019-11-07 Data encryption method, device and computer readable storage medium Active CN110909368B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911083935.XA CN110909368B (en) 2019-11-07 2019-11-07 Data encryption method, device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911083935.XA CN110909368B (en) 2019-11-07 2019-11-07 Data encryption method, device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110909368A true CN110909368A (en) 2020-03-24
CN110909368B CN110909368B (en) 2023-09-05

Family

ID=69816381

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911083935.XA Active CN110909368B (en) 2019-11-07 2019-11-07 Data encryption method, device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110909368B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111832043A (en) * 2020-06-23 2020-10-27 平安科技(深圳)有限公司 Data encryption processing method and device, computer equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100306540A1 (en) * 2008-02-13 2010-12-02 Panasonic Corporation Encryption processing method and encryption processing device
CN103207870A (en) * 2012-01-17 2013-07-17 华为技术有限公司 Method, server, device and system for photo sort management
CN105893449A (en) * 2015-12-31 2016-08-24 乐视移动智能信息技术(北京)有限公司 Batch processing method and device for pictures
WO2016189105A1 (en) * 2015-05-28 2016-12-01 Nagravision S.A. Management of broadcast encrypted digital multimedia data receivers
CN108830820A (en) * 2018-05-31 2018-11-16 康键信息技术(深圳)有限公司 Electronic device, image-pickup method and computer readable storage medium
CN109977692A (en) * 2019-02-26 2019-07-05 北京三快在线科技有限公司 Data processing method and device, storage medium and electronic equipment
CN110083735A (en) * 2019-04-22 2019-08-02 广州华多网络科技有限公司 Method, apparatus, electronic equipment and the computer readable storage medium of optical sieving

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100306540A1 (en) * 2008-02-13 2010-12-02 Panasonic Corporation Encryption processing method and encryption processing device
CN103207870A (en) * 2012-01-17 2013-07-17 华为技术有限公司 Method, server, device and system for photo sort management
WO2016189105A1 (en) * 2015-05-28 2016-12-01 Nagravision S.A. Management of broadcast encrypted digital multimedia data receivers
CN105893449A (en) * 2015-12-31 2016-08-24 乐视移动智能信息技术(北京)有限公司 Batch processing method and device for pictures
CN108830820A (en) * 2018-05-31 2018-11-16 康键信息技术(深圳)有限公司 Electronic device, image-pickup method and computer readable storage medium
CN109977692A (en) * 2019-02-26 2019-07-05 北京三快在线科技有限公司 Data processing method and device, storage medium and electronic equipment
CN110083735A (en) * 2019-04-22 2019-08-02 广州华多网络科技有限公司 Method, apparatus, electronic equipment and the computer readable storage medium of optical sieving

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111832043A (en) * 2020-06-23 2020-10-27 平安科技(深圳)有限公司 Data encryption processing method and device, computer equipment and storage medium
CN111832043B (en) * 2020-06-23 2023-10-03 平安科技(深圳)有限公司 Data encryption processing method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN110909368B (en) 2023-09-05

Similar Documents

Publication Publication Date Title
US20150277686A1 (en) Systems and Methods for the Real-Time Modification of Videos and Images Within a Social Network Format
CN105302428B (en) Dynamic information display method and device based on social network
CN107194817B (en) User social information display method and device and computer equipment
CN103544251B (en) Multi-source image processing method and its device
CN111601012B (en) Image processing method and device and electronic equipment
US20180107686A1 (en) Search method and apparatus
CN112929494B (en) Information processing method, information processing apparatus, information processing medium, and electronic device
US20220092071A1 (en) Integrated Dynamic Interface for Expression-Based Retrieval of Expressive Media Content
CN109408652B (en) Picture searching method, device and equipment
US10460490B2 (en) Method, terminal, and computer storage medium for processing pictures in batches according to preset rules
US10860885B2 (en) Method and system for management and operation over image in a computing system
CN114430460A (en) Shooting method and device and electronic equipment
CN110909368A (en) Data encryption method and device and computer readable storage medium
CN111934985B (en) Media content sharing method, device, equipment and computer readable storage medium
CN111885298B (en) Image processing method and device
CN112330728A (en) Image processing method, image processing device, electronic equipment and readable storage medium
WO2017201999A1 (en) File encryption method, device, terminal and storage medium
CN116170681A (en) Media content transmitting method, device, equipment and storage medium
CN116051366A (en) Image processing method, device, equipment and storage medium
CN115695543A (en) Microscopic image sharing method and microscope system
CN114928761A (en) Video sharing method and device and electronic equipment
CN113282780A (en) Picture management method and device, electronic equipment and readable storage medium
KR20220042930A (en) Method, apparatus and computer program for providing contents list
CN112486650A (en) Operation path switching method and device and electronic equipment
CN112446366A (en) Image translation evaluating method and device for image translation evaluating

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40022623

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant