CN109525747B - Picture uploading method, encryption and decryption method, device and system and electronic equipment - Google Patents

Picture uploading method, encryption and decryption method, device and system and electronic equipment Download PDF

Info

Publication number
CN109525747B
CN109525747B CN201710855326.6A CN201710855326A CN109525747B CN 109525747 B CN109525747 B CN 109525747B CN 201710855326 A CN201710855326 A CN 201710855326A CN 109525747 B CN109525747 B CN 109525747B
Authority
CN
China
Prior art keywords
picture
uploading
encrypted
ciphertext
source information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710855326.6A
Other languages
Chinese (zh)
Other versions
CN109525747A (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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201710855326.6A priority Critical patent/CN109525747B/en
Publication of CN109525747A publication Critical patent/CN109525747A/en
Application granted granted Critical
Publication of CN109525747B publication Critical patent/CN109525747B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/32Circuits or arrangements for control or supervision between transmitter and receiver or between image input and image output device, e.g. between a still-image camera and its memory or between a still-image camera and a printer device
    • H04N1/32101Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title
    • H04N1/32144Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title embedded in the image data, i.e. enclosed or integrated in the image, e.g. watermark, super-imposed logo or stamp
    • H04N1/32149Methods relating to embedding, encoding, decoding, detection or retrieval operations
    • H04N1/32267Methods relating to embedding, encoding, decoding, detection or retrieval operations combined with processing of the image
    • H04N1/32272Encryption or ciphering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/32Circuits or arrangements for control or supervision between transmitter and receiver or between image input and image output device, e.g. between a still-image camera and its memory or between a still-image camera and a printer device
    • H04N1/32101Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title
    • H04N1/32144Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title embedded in the image data, i.e. enclosed or integrated in the image, e.g. watermark, super-imposed logo or stamp

Abstract

The embodiment of the application provides a picture uploading method, an encryption and decryption device, an encryption and decryption system and electronic equipment. The method comprises the following steps: acquiring source information of an unencrypted picture; encrypting the source information to obtain a ciphertext; and adding the ciphertext into the picture stream of the unencrypted picture to obtain an encrypted picture, and uploading the encrypted picture. According to the technical scheme, the ciphertext generated based on the picture source information is added to the picture stream of the picture instead of the picture, so that the picture can be decrypted only by the corresponding decryption rule, the picture cannot be decrypted by other means under the condition that the decryption rule is not known, each picture uploaded to the E-commerce platform has the ciphertext with the unique source information, and the picture embezzlement in the E-commerce platform can be effectively prevented.

Description

Picture uploading method, encryption and decryption method, device and system and electronic equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a picture uploading method, an encryption and decryption device, a system, and an electronic device.
Background
The third party e-commerce platform provides a common platform for displaying, promoting and selling products for many small and medium-sized enterprises (also called merchants). The merchant can display the publicity pictures of the products to be sold in the webpage for the user to check so that the user can know the products and attract the user to purchase.
However, at present, some merchants steal the publicity pictures of merchants selling the same type of products as the publicity pictures of the merchants, and most users buy the commodities online by looking at the publicity pictures to distinguish the quality of the commodities. Some merchants cover the disadvantages of their own commodities by stealing pictures (including picture quality and picture content quality) with good quality from other merchants, so that consumers can hardly judge which stores have the product quality consistent with the pictures.
Content of application
In view of the above problems, the present application is proposed to provide a picture uploading method, an encryption and decryption method, an apparatus, a system and an electronic device that overcome the above problems or at least partially solve the above problems.
In one embodiment of the application, a picture uploading method is provided. The method comprises the following steps:
acquiring source information of an unencrypted picture;
encrypting the source information to obtain a ciphertext;
and adding the ciphertext into the picture stream of the unencrypted picture to obtain an encrypted picture, and uploading the encrypted picture.
In another embodiment of the present application, a method for uploading a picture is provided. The method comprises the following steps:
obtaining uploading party information of an encrypted picture added with a ciphertext in a picture stream;
decrypting the ciphertext to obtain source information;
and determining whether to execute picture uploading operation on the encrypted picture according to a consistency comparison result of the source information and the uploading party information.
In yet another embodiment of the present application, a picture encryption method is provided. The method comprises the following steps:
acquiring source information of an unencrypted picture;
encrypting the source information to obtain a ciphertext;
and adding the ciphertext to the picture stream of the unencrypted picture to obtain the encrypted picture.
In yet another embodiment of the present application, a picture decryption method is provided. The method comprises the following steps:
acquiring an encrypted picture;
extracting a ciphertext from a picture stream of the encrypted picture;
and decrypting the ciphertext to obtain the source information of the encrypted picture.
In yet another embodiment of the present application, a picture uploading apparatus is provided. The device includes:
the first acquisition module is used for acquiring source information of the unencrypted picture;
the first encryption module is used for encrypting the source information to obtain a ciphertext;
and the first uploading module is used for adding the ciphertext to the picture stream of the unencrypted picture to obtain an encrypted picture and executing uploading operation on the encrypted picture.
In yet another embodiment of the present application, a picture uploading apparatus is provided. The device includes:
the second acquisition module is used for acquiring uploading party information of the encrypted picture added with the ciphertext in the picture stream;
the first decryption module is used for decrypting the ciphertext to obtain source information;
and the second uploading module is used for determining whether to execute picture uploading operation on the encrypted picture according to a consistency comparison result of the source information and the uploading party information.
In yet another embodiment of the present application, a picture encryption apparatus is provided. The device includes:
the third acquisition module is used for acquiring the source information of the unencrypted picture;
the second encryption module is used for encrypting the source information to obtain a ciphertext;
and the adding module is used for adding the ciphertext to the picture stream of the unencrypted picture to obtain the encrypted picture.
In yet another embodiment of the present application, a picture decrypting apparatus is provided. The device includes:
the fourth acquisition module is used for acquiring the encrypted picture;
the extraction module is used for extracting a ciphertext from the picture stream of the encrypted picture;
and the second decryption module is used for decrypting the ciphertext to obtain the source information of the encrypted picture.
In yet another embodiment of the present application, a picture uploading system is provided. The system comprises:
the first picture uploading device is used for acquiring source information of the unencrypted picture; encrypting the source information to obtain a ciphertext; adding the ciphertext to the picture stream of the unencrypted picture to obtain an encrypted picture, and uploading the encrypted picture; and
the second picture uploading device is used for acquiring uploading party information of the encrypted picture added with the ciphertext in the picture stream; decrypting the ciphertext to obtain source information; and determining whether to execute picture uploading operation on the encrypted picture according to a consistency comparison result of the source information and the uploading party information.
In yet another embodiment of the present application, a picture encryption and decryption system is provided. The system comprises:
the picture encryption device is used for acquiring source information of the unencrypted picture; encrypting the source information to obtain a ciphertext; adding the ciphertext to the picture stream of the unencrypted picture to obtain an encrypted picture; and
the picture decryption device is used for acquiring the encrypted picture; extracting a ciphertext from the picture stream of the encrypted picture; and decrypting the ciphertext to obtain the source information of the encrypted picture.
In yet another embodiment of the present application, an electronic device is provided. The electronic device includes: a first memory and a first processor;
the first memory is used for storing programs;
the first processor, coupled with the first memory, to execute the program stored in the first memory to:
acquiring source information of an unencrypted picture;
encrypting the source information to obtain a ciphertext;
and adding the ciphertext into the picture stream of the unencrypted picture to obtain an encrypted picture, and uploading the encrypted picture.
In yet another embodiment of the present application, an electronic device is provided. The electronic device includes: a second memory and a second processor;
the second memory is used for storing programs;
the second processor, coupled to the second memory, is configured to execute the program stored in the second memory to:
obtaining uploading party information of an encrypted picture added with a ciphertext in a picture stream;
decrypting the ciphertext to obtain source information;
and determining whether to execute picture uploading operation on the encrypted picture according to a consistency comparison result of the source information and the uploading party information.
In yet another embodiment of the present application, an electronic device is provided. The electronic device includes: a third memory and a third processor;
the third memory is used for storing programs;
the third processor, coupled to the third memory, is configured to execute the program stored in the third memory to:
acquiring source information of an unencrypted picture;
encrypting the source information to obtain a ciphertext;
and adding the ciphertext to the picture stream of the unencrypted picture to obtain the encrypted picture.
In yet another embodiment of the present application, an electronic device is provided. The electronic device includes: a fourth memory and a fourth processor;
the fourth memory is used for storing programs;
the fourth processor, coupled to the fourth memory, configured to execute the program stored in the fourth memory to:
acquiring an encrypted picture;
extracting a ciphertext from a picture stream of the encrypted picture;
and decrypting the ciphertext to obtain the source information of the encrypted picture.
According to the technical scheme provided by the embodiment of the application, the ciphertext generated based on the picture source information is added to the picture stream of the picture instead of the picture, so that the picture can be decrypted only by the corresponding decryption rule, the picture cannot be decrypted by other means under the condition that the decryption rule is not known, and each picture uploaded to the E-commerce platform has the ciphertext with the unique source information; when the picture stealing phenomenon occurs, the picture stealing party uploads the stolen picture and is prohibited from uploading due to the fact that source information decrypted by a ciphertext in the stolen picture is judged to be inconsistent with information of the uploading party (namely, the picture stealing party), and therefore the picture stealing occurrence probability in the e-commerce platform is greatly reduced.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in 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 some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic flowchart of a picture uploading method according to an embodiment of the present application;
fig. 2 is a schematic diagram of a specific example of a picture stream involved in a picture uploading method according to an embodiment of the present application;
fig. 3 is a schematic diagram of a specific implementation of adding a ciphertext to the picture stream in the example shown in fig. 2 in the picture uploading method according to the embodiment of the present application;
fig. 4 is a schematic flowchart of a picture uploading method according to another embodiment of the present application;
fig. 5 is a schematic flowchart of a picture uploading method according to another embodiment of the present application;
fig. 6 is a schematic flowchart of a picture encryption method according to an embodiment of the present application;
fig. 7 is a schematic flowchart of a picture decryption method according to an embodiment of the present application;
fig. 8 is a schematic structural diagram illustrating a picture uploading apparatus according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of an electronic device according to another embodiment of the present application;
fig. 11 is a schematic structural diagram of a picture uploading apparatus according to another embodiment of the present application;
fig. 12 is a schematic structural diagram of an electronic device according to yet another embodiment of the present application;
fig. 13 is a schematic structural diagram of a picture encryption apparatus according to an embodiment of the present application;
fig. 14 is a schematic structural diagram of an electronic device according to yet another embodiment of the present application;
fig. 15 is a schematic structural diagram of a picture decryption apparatus according to an embodiment of the present application;
fig. 16 is a schematic structural diagram of an electronic device according to yet another embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
In the prior art, a watermark is added to a picture to prevent picture stealing. The watermarking on the picture is a process carried out at the picture representation level and is easy to modify by using a retouching software. Therefore, the watermarking mode in the prior art only has a certain use for people without image processing capacity, and cannot avoid the condition of product picture embezzlement between merchants on an e-commerce platform. Therefore, the method and the device provide a new technical scheme, the picture is encrypted by using the source information of the picture to obtain the encrypted picture, the encrypted picture is decrypted and verified when a merchant uploads and releases the encrypted picture, and the picture can be successfully uploaded only under the condition that the decrypted source information of the encrypted picture is consistent with the information of an uploading party. According to the technical scheme, the ciphertext generated based on the picture source information is added to the picture stream of the picture instead of the picture, so that the picture can be decrypted only by the corresponding decryption rule, the picture cannot be decrypted by other means under the condition that the decryption rule is not known, each picture in the E-commerce platform has the ciphertext with the unique source information, and the picture embezzlement in the E-commerce platform can be effectively prevented.
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It is to be understood that the embodiments described are only a few embodiments of the present application and not all 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.
Fig. 1 shows a flowchart of a picture uploading method according to an embodiment of the present application. As shown in fig. 1, the picture uploading method provided by this embodiment includes:
101. and acquiring the source information of the unencrypted picture.
102. And encrypting the source information to obtain a ciphertext.
103. And adding the ciphertext into the picture stream of the unencrypted picture to obtain an encrypted picture, and uploading the encrypted picture.
In the foregoing 101, the source information may be information of an uploading party requesting to upload the unencrypted picture, for example, an uploading party identifier. For example, in the third-party e-commerce platform application scenario, the uploading party is a merchant, and the uploading party identifier may be specifically a merchant ID, a merchant name, and the like. The source information may be carried in an upload request for unencrypted pictures. In a specific application scenario, a merchant requests a server to upload a product picture through a corresponding client, wherein the product picture may be an encrypted picture or an unencrypted picture; after receiving the request, the server can determine whether the picture is an unencrypted picture by verifying whether the picture stream of the picture carried in the request contains the ciphertext.
The encryption process of the source information in 102 may specifically be as follows:
the cipher used to encrypt the source information using the key K. If the encryption function is E, then C ═ E (K, P), where P is the source information, K is the key, and C is the ciphertext. That is, the source information P and the key K are input as parameters of the encryption function, and the encryption function E outputs the ciphertext C.
The decryption process corresponding to the encryption process specifically includes: if the decryption function is D, P ═ D (K, C), where C is the ciphertext, K' is the key, and P is the source information. That is, the ciphertext C and the key K' are input as parameters of the decryption function, and the decryption function outputs the plaintext P.
The keys in the encryption and decryption processes can be the same or different; the same algorithm can be collectively called as a symmetric Encryption algorithm, such as AES (Advanced Encryption Standard); when different, the above algorithms can be collectively called asymmetric encryption algorithms, such as RSA (Rivest-Shamir-Adleman), ECC (Elliptic curve Cryptography), EIGamal (double key cryptosystem), and the like; the encryption algorithm is not particularly limited in the embodiments of the present application.
In the above 103, the pictures are transmitted and stored in the form of a picture stream (also called byte stream). A schematic diagram of a binary picture stream of a picture file in jpeg format as shown in fig. 2. In fig. 2, < start > is a start mark of a picture, and < end > is an end mark of the picture. And adding the ciphertext into the picture stream of the unencrypted picture, namely finishing the picture encryption process to obtain the encrypted picture.
In theory, the ciphertext may be added anywhere in the picture stream, e.g., at the head, tail, or somewhere in the middle of the picture stream. The applicant finds that adding any content to the head or the tail of the picture does not affect the content of the picture, so that adding encryption to the head or the tail of the picture stream can reduce the processing in the subsequent picture display process; and adding the ciphertext to a certain position in the middle of the picture stream can affect the content of the picture, and content recovery processing is required in the subsequent picture display process.
Therefore, a simpler and feasible technical solution is that the ciphertext is added to the picture stream of the unencrypted picture to obtain the encrypted picture, specifically:
adding the ciphertext to a picture stream header of the unencrypted picture; or
And adding the ciphertext to the tail of the picture stream of the unencrypted picture.
The ciphertext is added to a position before the < start > tag of the unencrypted picture (see fig. 3), or the ciphertext is added to a position after the < end > tag of the unencrypted picture.
In an implementation technical solution, the performing the uploading operation on the encrypted picture may specifically be:
storing the encrypted picture into a database, and acquiring the encrypted picture from the database when a request of a client for displaying the encrypted picture is received; and sending the encrypted picture acquired from the database to the client so that the client displays the encrypted picture on a client interface after receiving the encrypted picture.
The request for displaying the picture by the client may be triggered when the user clicks to enter the encrypted picture display page.
According to the technical scheme, the ciphertext generated based on the picture source information is added to the picture stream of the picture instead of the picture, so that the picture can be decrypted only by the corresponding decryption rule, the picture cannot be decrypted by other means under the condition that the decryption rule is not known, each picture uploaded to the E-commerce platform has the ciphertext with the unique source information, and the picture embezzlement in the E-commerce platform can be effectively prevented.
Here, it should be noted that: the implementation subject of the technical solution provided by the above embodiment may be an e-commerce platform (i.e. a server). The commercial tenant (i.e. the uploading party) uploads the promotion picture corresponding to the product to the server through the Application (APP) (i.e. the client), wherein the promotion picture may be an unencrypted picture or an encrypted picture. To execute the steps provided by the above embodiment, the server needs to first execute the following steps to determine whether the picture to be displayed uploaded by the merchant is an unencrypted picture. That is, the technical solution provided by the above embodiment further includes the following steps:
and S1, receiving an uploading request sent by an uploading party, wherein the uploading request carries the picture to be displayed.
S2, verifying whether the picture stream of the picture to be displayed contains the ciphertext to be decrypted.
And S3, if the picture does not contain the ciphertext to be decrypted, taking the picture to be displayed as an unencrypted picture.
In S1, the merchant may upload the display picture corresponding to the product through the client interface; after the merchant triggers an upload event (for example, a submit control key on a touch client interface) on the client side, the server side can receive an upload request carrying a picture to be displayed, which is sent by the merchant.
As can be seen from the foregoing, the ciphertext may be added at a position in the header, trailer, or middle of the picture stream. The cipher text adding position can be preset, and the server determines how to verify the picture to be displayed according to the preset position. For example, if the preset ciphertext is added to the head or the tail, the server may directly check whether there is a byte stream before the start mark or after the end mark of the picture to be displayed, so as to verify whether the picture stream includes the ciphertext to be decrypted. If the ciphertext is added at a certain specified position in the middle of the picture stream, whether the byte stream marked with the ciphertext mark is contained at the certain specified position in the middle can be checked to verify whether the picture stream contains the ciphertext to be decrypted.
In the above step S3, the picture to be displayed that does not include the ciphertext to be decrypted is an unencrypted picture. Uploading the unencrypted picture may be a picture taken by the merchant itself or a product promotion picture provided by the vendor.
Fig. 4 shows a flowchart of a picture uploading method according to another embodiment of the present application. As shown in fig. 4, the picture uploading method includes:
201. and obtaining the uploading party information of the encrypted picture added with the ciphertext in the picture stream.
202. And decrypting the ciphertext to obtain source information.
203. And determining whether to execute picture uploading operation on the encrypted picture according to a consistency comparison result of the source information and the uploading party information.
Here, it should be noted that: the encrypted pictures mentioned in this embodiment are obtained by the method provided in the above embodiment. After the method provided by the embodiment is adopted, the picture uploaded to the platform may be an unencrypted picture or an encrypted picture. The above embodiments have been explained for uploading of unencrypted pictures. The technical scheme provided by the embodiment mainly aims at the problem of how to upload the encrypted picture.
In the above 201, the uploading party information may be carried in a request for uploading the encrypted picture. The uploader information may be an uploader identification. For example, in the third-party e-commerce platform application scenario, the uploading party is a merchant, and the uploading party identifier may be specifically a merchant ID, a merchant name, and the like.
What needs to be added here is: to execute the steps provided in the above embodiments, the server needs to first execute the following steps to determine whether the uploaded picture is an unencrypted picture. That is, the technical solution provided by the above embodiment further includes the following steps:
s1', an uploading request sent by an uploading party is received, wherein the uploading request carries the picture to be displayed and the information of the uploading party.
S2', verifying whether the picture stream of the picture to be shown contains the ciphertext to be decrypted.
S3', if the picture contains the ciphertext to be decrypted, the picture to be displayed is used as the encrypted picture.
Correspondingly, the obtaining of the upload side information of the encrypted picture added with the ciphertext in the picture stream in 201 may specifically be: and acquiring the information of the uploading party from the uploading request.
In 202, after the ciphertext is identified from the picture stream of the encrypted picture, the ciphertext is decrypted based on the set decryption rule. The decryption rule corresponds to the encryption rule, and the specific decryption process may refer to the corresponding content in the above embodiments, which is not described herein again.
In 203, the source information and the uploading party information are consistent, which indicates that the encrypted file applied for uploading belongs to the uploading party, rather than stealing the picture, so that the picture uploading operation can be performed on the encrypted picture.
The uploading operation performed on the encrypted picture with the source information consistent with the uploading party information may specifically be:
storing the encrypted picture with the source information consistent with the uploading party information into a database, and acquiring the encrypted picture from the database when a request of a client for displaying the encrypted picture is received; and sending the encrypted picture acquired from the database to the client so that the client displays the encrypted picture on a client interface after receiving the encrypted picture.
The request for displaying the picture by the client may be triggered when the user clicks to enter the encrypted picture display page.
For the encrypted picture with inconsistent source information and the uploading party information, the uploading of the encrypted picture needs to be prohibited, because the possibility that the encrypted picture is a stolen picture is very high. In the method provided in this embodiment, the step 203 may include the following steps:
when the source information is consistent with the uploading party information, picture uploading operation is carried out on the encrypted picture;
and when the source information is inconsistent with the uploading party information, generating a prompt message for prohibiting the picture uploading.
The purpose of generating the picture uploading prohibition prompt message is to send the prompt message to the uploading party of the encrypted picture so as to inform the uploading party that the encrypted picture is prohibited from being uploaded or fails to be uploaded. In particular, the prompt message may be a text message and/or a voice message, etc.
According to the technical scheme provided by the embodiment of the application, the ciphertext generated based on the picture source information is added to the picture stream of the picture instead of the picture, so that the picture can be decrypted only by the corresponding decryption rule, the picture cannot be decrypted by other means under the condition that the decryption rule is not known, and each picture uploaded to the E-commerce platform has the ciphertext with the unique source information; when the picture stealing phenomenon occurs, the picture stealing party uploads the stolen picture and is prohibited from uploading due to the fact that source information decrypted by a ciphertext in the stolen picture is judged to be inconsistent with information of the uploading party (namely, the picture stealing party), and therefore the picture stealing occurrence probability in the e-commerce platform is greatly reduced.
Fig. 5 is a flowchart illustrating a picture uploading method according to another embodiment of the present application. The technical scheme provided by the embodiment substitutes for the execution main body. The execution subject is a service end (e-commerce platform). As shown in fig. 5, the picture uploading method includes:
301. the server receives an uploading request sent by an uploading party, wherein the uploading request carries the picture to be displayed and the information of the uploading party.
302. The server side verifies whether the picture stream of the picture to be displayed contains the ciphertext to be decrypted.
303. If the picture to be displayed does not contain the ciphertext to be decrypted, taking the picture to be displayed as an unencrypted picture, and entering the steps 304-306; otherwise, the picture to be displayed is taken as an encrypted picture, and the steps 307 to 309 are carried out.
304. And acquiring the source information of the unencrypted picture.
305. And encrypting the source information to obtain a ciphertext.
306. And adding the ciphertext into the picture stream of the unencrypted picture to obtain an encrypted picture, and uploading the encrypted picture.
307. And decrypting the ciphertext in the picture stream of the encrypted picture to obtain the source information.
308. Judging whether the source information is consistent with the uploader information; if the encrypted pictures are consistent, picture uploading operation is carried out on the encrypted pictures; otherwise, generating a prompt message for prohibiting the picture from uploading.
According to the technical scheme provided by the embodiment of the application, the ciphertext generated based on the picture source information is added to the picture stream of the picture instead of the picture, so that the picture can be decrypted only by the corresponding decryption rule, the picture cannot be decrypted by other means under the condition that the decryption rule is not known, and each picture uploaded to the E-commerce platform has the ciphertext with the unique source information; when the picture stealing phenomenon occurs, the picture stealing party uploads the stolen picture and is prohibited from uploading due to the fact that source information decrypted by a ciphertext in the stolen picture is judged to be inconsistent with information of the uploading party (namely, the picture stealing party), and therefore the picture stealing occurrence probability in the e-commerce platform is greatly reduced.
Fig. 6 shows a flowchart of a picture encryption method according to an embodiment of the present application. As shown in fig. 6, the method provided by this embodiment includes:
401. and acquiring the source information of the unencrypted picture.
402. And encrypting the source information to obtain a ciphertext.
403. And adding the ciphertext to the picture stream of the unencrypted picture to obtain the encrypted picture.
Reference is made to corresponding contents described in steps 101 to 102 in the above method embodiments for 401 to 403, which are not described herein again.
As described in the above method embodiments, the ciphertext in the present embodiment may be added to any position in the picture stream, for example, a head, a tail, or a middle position of the picture stream. In a specific embodiment, in order not to affect the content of the picture, a simpler and feasible technical scheme is as follows:
adding the ciphertext to a picture stream header of the unencrypted picture; or
And adding the ciphertext to the tail of the picture stream of the unencrypted picture.
According to the technical scheme, the ciphertext generated based on the picture source information is added to the picture stream of the picture instead of the picture, the mode can ensure that only the corresponding decryption rule can be decrypted, the picture cannot be decrypted by other means under the condition that the decryption rule is not known, each picture uploaded to the E-commerce platform has the ciphertext with the unique source information, and the subsequent E-commerce platform determines whether to allow uploading or not by judging whether the source information decrypted by the ciphertext in the uploaded picture is consistent with the information of an uploading party (namely, a picture stealing party), so that the probability of picture embezzlement in the E-commerce platform is reduced.
Fig. 7 is a flowchart illustrating a picture decryption method according to another embodiment of the present application. As shown in fig. 7, the method provided by this embodiment includes:
501. and acquiring an encrypted picture.
502. And extracting a ciphertext from the picture stream of the encrypted picture.
503. And decrypting the ciphertext to obtain the source information of the encrypted picture.
Reference may be made to corresponding contents of steps 201 and 202 in the above method embodiments for 501 to 503, which are not described herein again.
In 501, an encrypted picture is a picture that includes a ciphertext in a picture stream. The encrypted picture can be uploaded to the server by the client. For example, in an e-commerce application scenario, a merchant uploads a picture to be displayed corresponding to a product to be sold to a server (e-commerce platform) through a client APP (application). After receiving a picture to be displayed, the server side verifies whether a picture stream of the picture to be displayed contains a ciphertext to be decrypted; and if the picture contains the ciphertext to be decrypted, taking the picture to be displayed as an encrypted picture.
In an implementation technical solution, the process of acquiring the encrypted picture in 501 may specifically include:
receiving an uploading request sent by an uploading party, wherein the uploading request carries a picture to be displayed;
verifying whether the picture stream of the picture to be displayed contains a ciphertext to be decrypted or not;
and if the picture contains the ciphertext to be decrypted, taking the picture to be displayed as the encrypted picture.
Based on the contents in the foregoing embodiments, in the process of encrypting a picture, a ciphertext may be added to the head or the tail of a picture stream, and the corresponding process 502 of extracting includes:
extracting the ciphertext from a picture stream header of the encrypted picture; or
And extracting the ciphertext from the tail part of the picture stream of the encrypted picture.
According to the technical scheme, the ciphertext generated based on the picture source information is added to the picture stream of the picture instead of the picture, the mode can ensure that only the corresponding decryption rule can be decrypted, the picture cannot be decrypted by other means under the condition that the decryption rule is not known, each picture uploaded to the E-commerce platform has the ciphertext with the unique source information, and the subsequent E-commerce platform determines whether to allow uploading or not by judging whether the source information decrypted by the ciphertext in the uploaded picture is consistent with the information of an uploading party (namely, a picture stealing party), so that the probability of picture embezzlement in the E-commerce platform is reduced.
For convenience of understanding, the following describes the technical solution in detail by taking an example of uploading a product picture by a merchant in an e-commerce application scenario.
The commercial tenant can import the picture A to be uploaded through an import control on the APP interface of the touch client. After the merchant successfully imports the picture A, the client monitors the touch operation of the merchant for the uploading control. If the touch operation is monitored, the client sends an uploading request carrying the picture A and the merchant identifier to a server (e-commerce platform). And after receiving the picture A, the server side decrypts the ciphertext to obtain the source information of the picture A if verifying that the head or the tail of the picture stream of the picture A has the ciphertext. And the server compares the merchant identification with the source information, if the merchant identification is consistent with the source information, the picture A is stored in the database, so that the picture A after encryption processing is displayed on a corresponding page of a client APP used by the client/merchant when the client/merchant receives a request for displaying the picture A. If the head or the tail of the picture stream of the picture A is verified to have no ciphertext, the server encrypts a merchant identifier (the merchant identifier is the source information of the picture A at this moment) to obtain a ciphertext, adds the obtained ciphertext to the head or the tail of the picture stream of the picture A, and stores the picture A added with the ciphertext into a database, so that when a client/merchant request is received to display the picture A, the picture A after encryption is displayed on a corresponding page of a client APP used by the client/merchant.
Fig. 8 shows a schematic structural diagram of a picture uploading device according to an embodiment of the present application. As shown in fig. 6, the picture uploading apparatus includes:
a first obtaining module 601, configured to obtain source information of an unencrypted picture;
a first encryption module 602, configured to encrypt the source information to obtain a ciphertext;
the first upload module 603 is configured to add the ciphertext to the picture stream of the unencrypted picture to obtain an encrypted picture, and perform an upload operation on the encrypted picture.
Further, the first uploading module 603 is further configured to add the ciphertext to a picture stream header of the unencrypted picture; or adding the ciphertext to the tail of the picture stream of the unencrypted picture.
Further, the picture uploading device may further include: the device comprises a receiving module and a verification module. The receiving module is used for receiving an uploading request sent by an uploading party, wherein the uploading request carries a picture to be displayed; the verification module is used for verifying whether the picture stream of the picture to be displayed contains a ciphertext to be decrypted or not; and if the picture to be displayed does not contain the ciphertext to be decrypted, taking the picture to be displayed as an unencrypted picture.
Further, the source information is carried in the upload request, and the source information is an identifier of the upload party.
Here, it should be noted that: the picture uploading apparatus provided in the above embodiment may implement the technical solution described in the above embodiment of the picture uploading method shown in fig. 1, and the specific implementation principle of each module or unit may refer to the corresponding content in the above embodiment of the picture uploading method shown in fig. 1, and is not described here again.
According to the technical scheme provided by the embodiment of the application, the ciphertext generated based on the picture source information is added to the picture stream of the picture instead of the picture, so that the picture can be decrypted only by the corresponding decryption rule, the picture cannot be decrypted by other means under the condition that the decryption rule is not known, and each picture uploaded to the E-commerce platform has the ciphertext with the unique source information; when the picture stealing phenomenon occurs, the picture stealing party uploads the stolen picture and is prohibited from uploading due to the fact that source information decrypted by a ciphertext in the stolen picture is judged to be inconsistent with information of the uploading party (namely, the picture stealing party), and therefore the picture stealing occurrence probability in the e-commerce platform is greatly reduced.
Fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application. The electronic device includes: a first memory 701 and a first processor 702. The first memory 701 may be configured to store other various data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device. The first memory 701 may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The first processor 702 is coupled to the first memory 701 for executing the programs stored in the first memory 701 for:
acquiring source information of an unencrypted picture;
encrypting the source information to obtain a ciphertext;
and adding the ciphertext into the picture stream of the unencrypted picture to obtain an encrypted picture, and uploading the encrypted picture.
When executing the program in the first memory 701, the first processor 702 may also implement other functions in addition to the above functions, which may be specifically referred to the description of the foregoing embodiments.
Further, as shown in fig. 10, the electronic apparatus further includes: a first communication component 703, a first display 704, a first power component 705, a first audio component 706, and other components. Only some of the components are schematically shown in fig. 10, and the electronic device is not meant to include only the components shown in fig. 10.
Fig. 11 is a schematic structural diagram of a picture uploading device according to another embodiment of the present application. As shown in fig. 11, the picture uploading apparatus provided in this embodiment includes:
a second obtaining module 801, configured to obtain upload side information of an encrypted picture to which a ciphertext is added in a picture stream;
a first decryption module 802, configured to decrypt the ciphertext to obtain source information;
the second uploading module 803 is configured to determine whether to perform a picture uploading operation on the encrypted picture according to a comparison result of consistency between the source information and the uploader information.
Further, the second uploading module 803 is further configured to:
when the source information is consistent with the uploading party information, picture uploading operation is carried out on the encrypted picture;
and when the source information is inconsistent with the uploading party information, generating a prompt message for prohibiting the picture uploading.
Further, the uploading party information is carried in the request for uploading the encrypted picture.
Here, it should be noted that: the picture uploading apparatus provided in the above embodiment may implement the technical solution described in the above embodiment of the picture uploading method shown in fig. 4, and the specific implementation principle of each module or unit may refer to the corresponding content in the above embodiment of the picture uploading method shown in fig. 4, and is not described here again.
According to the technical scheme provided by the embodiment of the application, the ciphertext generated based on the picture source information is added to the picture stream of the picture instead of the picture, so that the picture can be decrypted only by the corresponding decryption rule, the picture cannot be decrypted by other means under the condition that the decryption rule is not known, and each picture uploaded to the E-commerce platform has the ciphertext with the unique source information; when the picture stealing phenomenon occurs, the picture stealing party uploads the stolen picture and is prohibited from uploading due to the fact that source information decrypted by a ciphertext in the stolen picture is judged to be inconsistent with information of the uploading party (namely, the picture stealing party), and therefore the picture stealing occurrence probability in the e-commerce platform is greatly reduced.
Fig. 12 is a schematic structural diagram of an electronic device according to yet another embodiment of the present application. The electronic device includes: a second memory 901 and a second processor 902. The second memory 901 may be configured to store other various data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device. The second memory 901 may be implemented by any type of volatile or non-volatile memory device or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The second processor 902 is coupled to the second memory 901 for executing the program stored in the second memory 901 for:
obtaining uploading party information of an encrypted picture added with a ciphertext in a picture stream;
decrypting the ciphertext to obtain source information;
and determining whether to execute picture uploading operation on the encrypted picture according to a consistency comparison result of the source information and the uploading party information.
When executing the program in the second memory 901, the second processor 902 may also implement other functions in addition to the above functions, which may be specifically referred to the description of the foregoing embodiments.
Further, the electronic device further includes: a second communication component, a second display, a second power component, a second audio component, and the like.
The embodiments of the present application also provide a computer-readable storage medium storing a computer program, where the computer program, when executed by a computer, can implement the steps or functions of the image uploading method provided in the above embodiments.
The embodiment of the application also provides a picture uploading system. The system comprises the picture uploading device shown in the figure 8 and the picture uploading device shown in the figure 11; alternatively, the electronic apparatus shown in fig. 9 and the electronic apparatus shown in fig. 12 are included. Of course, in a specific implementation, the electronic device shown in fig. 9 and the electronic device shown in fig. 12 may be the same electronic device, and the steps or functions of the image uploading method shown in fig. 5 can be implemented.
An achievable technical solution is that the above-mentioned picture uploading system includes:
the first picture uploading device is used for acquiring source information of the unencrypted picture; encrypting the source information to obtain a ciphertext; adding the ciphertext to the picture stream of the unencrypted picture to obtain an encrypted picture, and uploading the encrypted picture; and
the second picture uploading device is used for acquiring uploading party information of the encrypted picture added with the ciphertext in the picture stream; decrypting the ciphertext to obtain source information; and executing picture uploading operation on the encrypted picture with the source information consistent with the uploading party information.
Fig. 13 is a schematic structural diagram of a picture encryption apparatus according to an embodiment of the present application. As shown in fig. 13, the picture encryption apparatus provided in this embodiment includes:
a third obtaining module 1001, configured to obtain source information of an unencrypted picture;
a second encryption module 1002, configured to encrypt the source information to obtain a ciphertext;
an adding module 1003, configured to add the ciphertext to the picture stream of the unencrypted picture to obtain an encrypted picture.
Further, the adding module 1003 is further configured to: adding the ciphertext to a picture stream header of the unencrypted picture; or adding the ciphertext to the tail of the picture stream of the unencrypted picture.
Further, the source information is carried in an upload request for uploading the unencrypted picture by an upload party, and the source information may be an identifier of the upload party.
Further, the picture encryption device may further include: the verification module is used for receiving an uploading request sent by an uploading party, wherein the uploading request carries a picture to be displayed; verifying whether the picture stream of the picture to be displayed contains a ciphertext to be decrypted or not; and if the picture to be displayed does not contain the ciphertext to be decrypted, taking the picture to be displayed as an unencrypted picture.
Here, it should be noted that: the picture encryption device provided in the above-mentioned embodiment can implement the technical solution described in the above-mentioned picture encryption method embodiment shown in fig. 6, and the specific implementation principle of each module or unit may refer to the corresponding content in the above-mentioned picture encryption method embodiment shown in fig. 6, and is not described herein again.
According to the technical scheme, the ciphertext generated based on the picture source information is added to the picture stream of the picture instead of the picture, the mode can ensure that only the corresponding decryption rule can be decrypted, the picture cannot be decrypted by other means under the condition that the decryption rule is not known, each picture uploaded to the E-commerce platform has the ciphertext with the unique source information, and the subsequent E-commerce platform determines whether to allow uploading or not by judging whether the source information decrypted by the ciphertext in the uploaded picture is consistent with the information of an uploading party (namely, a picture stealing party), so that the probability of picture embezzlement in the E-commerce platform is reduced.
Fig. 14 is a schematic structural diagram of an electronic device according to yet another embodiment of the present application. The electronic device includes: a third memory 1101, and a third processor 1102. The third memory 1101 may be configured to store other various data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device. The third memory 1101 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The third processor 1102 is coupled to the third memory 1101 for executing the programs stored in the third memory 1101 for:
acquiring source information of an unencrypted picture;
encrypting the source information to obtain a ciphertext;
and adding the ciphertext to the picture stream of the unencrypted picture to obtain the encrypted picture.
When executing the program in the third memory 1101, the third processor 1102 may also implement other functions in addition to the above functions, which may be specifically referred to in the description of the foregoing embodiments.
Further, the electronic device further includes: a third communication component, a third display, a third power supply component, a third audio component, and the like.
The embodiments of the present application also provide a computer-readable storage medium storing a computer program, where the computer program, when executed by a computer, can implement the steps or functions of the image encryption method provided in the foregoing embodiments.
Fig. 15 is a schematic structural diagram illustrating a picture decryption apparatus according to an embodiment of the present application. As shown in fig. 15, the picture decryption apparatus includes:
a fourth obtaining module 1301, configured to obtain an encrypted picture;
an extracting module 1302, configured to extract a ciphertext from a picture stream of the encrypted picture;
and the second decryption module 1303 is configured to decrypt the ciphertext to obtain the source information of the encrypted picture.
Further, the extracting module 1302 is further configured to: extracting the ciphertext from a picture stream header of the encrypted picture; or extracting the ciphertext from the tail of the picture stream of the encrypted picture.
Further, the fourth obtaining module 1301 is further configured to: receiving an uploading request sent by an uploading party, wherein the uploading request carries a picture to be displayed; verifying whether the picture stream of the picture to be displayed contains a ciphertext to be decrypted or not; and if the picture contains the ciphertext to be decrypted, taking the picture to be displayed as an encrypted picture.
Here, it should be noted that: the picture decryption device provided in the foregoing embodiment may implement the technical solution described in the above-mentioned picture decryption method embodiment shown in fig. 7, and the specific implementation principle of each module or unit may refer to the corresponding content in the above-mentioned picture decryption method embodiment shown in fig. 7, which is not described herein again.
According to the technical scheme, the ciphertext generated based on the picture source information is added to the picture stream of the picture instead of the picture, the mode can ensure that only the corresponding decryption rule can be decrypted, the picture cannot be decrypted by other means under the condition that the decryption rule is not known, each picture uploaded to the E-commerce platform has the ciphertext with the unique source information, and the subsequent E-commerce platform determines whether to allow uploading or not by judging whether the source information decrypted by the ciphertext in the uploaded picture is consistent with the information of an uploading party (namely, a picture stealing party), so that the probability of picture embezzlement in the E-commerce platform is reduced.
Fig. 16 is a schematic structural diagram of an electronic device according to yet another embodiment of the present application. The electronic device includes: a fourth memory 1401, and a fourth processor 1402. The fourth memory 1401 may be configured to store other various data to support the operation on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device. The fourth memory 1401 may be implemented by any type of volatile or non-volatile memory device or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The fourth processor 1402 is coupled to the fourth memory 1401 for executing the programs stored in the fourth memory 1401 for:
acquiring an encrypted picture;
extracting a ciphertext from a picture stream of the encrypted picture;
and decrypting the ciphertext to obtain the source information of the encrypted picture.
When the fourth processor 1402 executes the program in the fourth memory 1401, the functions other than the above functions may be implemented, and the descriptions of the foregoing embodiments may be referred to specifically.
Further, the electronic device further includes: a fourth communication component, a fourth display, a fourth power component, a fourth audio component, and the like.
The embodiments of the present application further provide a computer-readable storage medium storing a computer program, where the computer program, when executed by a computer, can implement the steps or functions of the image decryption method provided in the foregoing embodiments.
The embodiment of the application also provides a picture encryption and decryption system. The system comprises the picture uploading device shown in the figure 13 and the picture uploading device shown in the figure 15; alternatively, the electronic apparatus shown in fig. 14 and the electronic apparatus shown in fig. 16 are included. Of course, in practical implementation, the electronic device shown in fig. 14 and the electronic device shown in fig. 16 may be the same electronic device, and the steps or functions of the image encryption and decryption methods shown in fig. 6 and 7 can be implemented.
In some of the flows described in the specification, claims, and above-described figures of the present application, a number of operations are included that occur in a particular order, which operations may be performed out of order or in parallel as they occur herein. The sequence numbers of the operations, e.g., 101, 102, etc., are used merely to distinguish between the various operations, and do not represent any order of execution per se. Additionally, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first", "second", etc. in this document are used for distinguishing different messages, devices, modules, etc., and do not represent a sequential order, nor limit the types of "first" and "second" to be different.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (21)

1. A picture uploading method is characterized by comprising the following steps:
acquiring source information of an unencrypted picture;
encrypting the source information to obtain a ciphertext;
adding the ciphertext to the picture stream of the unencrypted picture to obtain an encrypted picture, and uploading the encrypted picture;
the ciphertext is decrypted after the encrypted picture is received, and the decrypted source information is used for carrying out consistency comparison with the information of an uploading party who uploads the encrypted picture;
when the source information is consistent with the uploading party information, determining to execute picture uploading operation on the encrypted picture; and when the source information is inconsistent with the uploading party information, determining that the encrypted picture is prohibited from being uploaded.
2. The method of claim 1, wherein adding the ciphertext to the picture stream of the unencrypted picture to obtain an encrypted picture comprises:
adding the ciphertext to a picture stream header of the unencrypted picture; or
And adding the ciphertext to the tail of the picture stream of the unencrypted picture.
3. The method of claim 1 or 2, further comprising:
receiving an uploading request sent by an uploading party, wherein the uploading request carries a picture to be displayed;
verifying whether the picture stream of the picture to be displayed contains a ciphertext to be decrypted or not;
and if the picture to be displayed does not contain the ciphertext to be decrypted, taking the picture to be displayed as an unencrypted picture.
4. The method according to claim 1 or 2, wherein the source information is carried in an upload request, and the source information is an identifier of the uploading party.
5. A picture uploading method is characterized by comprising the following steps:
obtaining uploading party information of an encrypted picture added with a ciphertext in a picture stream;
decrypting the ciphertext to obtain source information;
determining whether to execute picture uploading operation on the encrypted picture according to a consistency comparison result of the source information and the uploading party information;
determining whether to execute picture uploading operation on the encrypted picture according to a consistency comparison result of the source information and the uploading party information, wherein the picture uploading operation comprises the following steps:
when the source information is consistent with the uploading party information, picture uploading operation is carried out on the encrypted picture;
and when the source information is inconsistent with the uploading party information, the encrypted picture is prohibited from being uploaded.
6. The method of claim 5, wherein the uploader information is carried in a request to upload the encrypted picture.
7. The method according to claim 5 or 6, wherein determining whether to perform a picture uploading operation on the encrypted picture according to a comparison result of consistency between the source information and the uploader information further comprises:
and when the source information is inconsistent with the uploading party information, generating a prompt message for prohibiting the picture uploading.
8. A picture uploading system, comprising:
the first picture uploading device is used for acquiring source information of the unencrypted picture; encrypting the source information to obtain a ciphertext; adding the ciphertext to the picture stream of the unencrypted picture to obtain an encrypted picture, and uploading the encrypted picture; and
the second picture uploading device is used for acquiring uploading party information of the encrypted picture added with the ciphertext in the picture stream; decrypting the ciphertext to obtain source information; determining whether to execute picture uploading operation on the encrypted picture according to a consistency comparison result of the source information and the uploading party information;
determining whether to execute picture uploading operation on the encrypted picture according to a consistency comparison result of the source information and the uploading party information, wherein the picture uploading operation comprises the following steps:
when the source information is consistent with the uploading party information, picture uploading operation is carried out on the encrypted picture;
and when the source information is inconsistent with the uploading party information, the encrypted picture is prohibited from being uploaded.
9. A picture encryption method, comprising:
acquiring source information of an unencrypted picture;
encrypting the source information to obtain a ciphertext;
adding the ciphertext to the picture stream of the unencrypted picture to obtain an encrypted picture;
the ciphertext is decrypted after the encrypted picture is received, and the decrypted source information is used for carrying out consistency comparison with the information of an uploading party who uploads the encrypted picture;
when the source information is consistent with the uploading party information, determining to execute picture uploading operation on the encrypted picture; and when the source information is inconsistent with the uploading party information, determining that the encrypted picture is prohibited from being uploaded.
10. The method of claim 9, wherein adding the ciphertext to the picture stream of the unencrypted picture to obtain an encrypted picture comprises:
adding the ciphertext to a picture stream header of the unencrypted picture; or
And adding the ciphertext to the tail of the picture stream of the unencrypted picture.
11. A picture decryption method, comprising:
acquiring an encrypted picture;
extracting a ciphertext from a picture stream of the encrypted picture;
decrypting the ciphertext to obtain source information of the encrypted picture; the source information is used for carrying out consistency comparison with uploading party information for uploading the encrypted picture, so that picture uploading operation is carried out on the encrypted picture when the source information is consistent with the uploading party information, and the encrypted picture is prohibited from being uploaded when the source information is inconsistent with the uploading party information.
12. The method of claim 11, wherein extracting ciphertext from the picture stream of the encrypted picture comprises:
extracting the ciphertext from a picture stream header of the encrypted picture; or
And extracting the ciphertext from the tail part of the picture stream of the encrypted picture.
13. A picture encryption/decryption system, comprising:
the picture encryption device is used for acquiring source information of the unencrypted picture; encrypting the source information to obtain a ciphertext; adding the ciphertext to the picture stream of the unencrypted picture to obtain an encrypted picture; and
the picture decryption device is used for acquiring the encrypted picture; extracting a ciphertext from the picture stream of the encrypted picture; decrypting the ciphertext to obtain source information of the encrypted picture; the source information is used for carrying out consistency comparison with uploading party information for uploading the encrypted picture, so that picture uploading operation is carried out on the encrypted picture when the source information is consistent with the uploading party information, and the encrypted picture is prohibited from being uploaded when the source information is inconsistent with the uploading party information.
14. An image uploading apparatus, comprising:
the first acquisition module is used for acquiring source information of the unencrypted picture;
the first encryption module is used for encrypting the source information to obtain a ciphertext;
the first uploading module is used for adding the ciphertext to the picture stream of the unencrypted picture to obtain an encrypted picture and executing uploading operation on the encrypted picture;
the ciphertext is decrypted after the encrypted picture is received, and the decrypted source information is used for carrying out consistency comparison with the information of an uploading party who uploads the encrypted picture;
when the source information is consistent with the uploading party information, determining to execute picture uploading operation on the encrypted picture; and when the source information is inconsistent with the uploading party information, determining that the encrypted picture is prohibited from being uploaded.
15. An image uploading apparatus, comprising:
the second acquisition module is used for acquiring uploading party information of the encrypted picture added with the ciphertext in the picture stream;
the first decryption module is used for decrypting the ciphertext to obtain source information;
the second uploading module is used for determining whether to execute picture uploading operation on the encrypted picture according to a consistency comparison result of the source information and the uploading party information;
determining whether to execute picture uploading operation on the encrypted picture according to a consistency comparison result of the source information and the uploading party information, wherein the picture uploading operation comprises the following steps:
when the source information is consistent with the uploading party information, picture uploading operation is carried out on the encrypted picture;
and when the source information is inconsistent with the uploading party information, the encrypted picture is prohibited from being uploaded.
16. A picture encryption apparatus, comprising:
the third acquisition module is used for acquiring the source information of the unencrypted picture;
the second encryption module is used for encrypting the source information to obtain a ciphertext;
the adding module is used for adding the ciphertext to the picture stream of the unencrypted picture to obtain an encrypted picture;
the ciphertext is decrypted after the encrypted picture is received, and the decrypted source information is used for carrying out consistency comparison with the information of an uploading party who uploads the encrypted picture;
when the source information is consistent with the uploading party information, determining to execute picture uploading operation on the encrypted picture; and when the source information is inconsistent with the uploading party information, determining that the encrypted picture is prohibited from being uploaded.
17. A picture decryption apparatus, comprising:
the fourth acquisition module is used for acquiring the encrypted picture;
the extraction module is used for extracting a ciphertext from the picture stream of the encrypted picture;
the second decryption module is used for decrypting the ciphertext to obtain the source information of the encrypted picture;
the source information is used for carrying out consistency comparison with uploading party information for uploading the encrypted picture, so that picture uploading operation is carried out on the encrypted picture when the source information is consistent with the uploading party information, and the encrypted picture is prohibited from being uploaded when the source information is inconsistent with the uploading party information.
18. An electronic device, comprising: a first memory and a first processor;
the first memory is used for storing programs;
the first processor, coupled with the first memory, to execute the program stored in the first memory to:
acquiring source information of an unencrypted picture;
encrypting the source information to obtain a ciphertext;
adding the ciphertext to the picture stream of the unencrypted picture to obtain an encrypted picture, and uploading the encrypted picture;
the ciphertext is decrypted after the encrypted picture is received, and the decrypted source information is used for carrying out consistency comparison with the information of an uploading party who uploads the encrypted picture;
when the source information is consistent with the uploading party information, determining to execute picture uploading operation on the encrypted picture; and when the source information is inconsistent with the uploading party information, determining that the encrypted picture is prohibited from being uploaded.
19. An electronic device, comprising: a second memory and a second processor;
the second memory is used for storing programs;
the second processor, coupled to the second memory, is configured to execute the program stored in the second memory to:
obtaining uploading party information of an encrypted picture added with a ciphertext in a picture stream;
decrypting the ciphertext to obtain source information;
determining whether to execute picture uploading operation on the encrypted picture according to a consistency comparison result of the source information and the uploading party information;
determining whether to execute picture uploading operation on the encrypted picture according to a consistency comparison result of the source information and the uploading party information, wherein the picture uploading operation comprises the following steps:
when the source information is consistent with the uploading party information, picture uploading operation is carried out on the encrypted picture;
and when the source information is inconsistent with the uploading party information, the encrypted picture is prohibited from being uploaded.
20. An electronic device, comprising: a third memory and a third processor;
the third memory is used for storing programs;
the third processor, coupled to the third memory, is configured to execute the program stored in the third memory to:
acquiring source information of an unencrypted picture;
encrypting the source information to obtain a ciphertext;
adding the ciphertext to the picture stream of the unencrypted picture to obtain an encrypted picture;
the ciphertext is decrypted after the encrypted picture is received, and the decrypted source information is used for carrying out consistency comparison with the information of an uploading party who uploads the encrypted picture;
when the source information is consistent with the uploading party information, determining to execute picture uploading operation on the encrypted picture; and when the source information is inconsistent with the uploading party information, determining that the encrypted picture is prohibited from being uploaded.
21. An electronic device, comprising: a fourth memory and a fourth processor;
the fourth memory is used for storing programs;
the fourth processor, coupled to the fourth memory, configured to execute the program stored in the fourth memory to:
acquiring an encrypted picture;
extracting a ciphertext from a picture stream of the encrypted picture;
decrypting the ciphertext to obtain source information of the encrypted picture; the source information is used for carrying out consistency comparison with uploading party information for uploading the encrypted picture, so that picture uploading operation is carried out on the encrypted picture when the source information is consistent with the uploading party information, and the encrypted picture is prohibited from being uploaded when the source information is inconsistent with the uploading party information.
CN201710855326.6A 2017-09-20 2017-09-20 Picture uploading method, encryption and decryption method, device and system and electronic equipment Active CN109525747B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710855326.6A CN109525747B (en) 2017-09-20 2017-09-20 Picture uploading method, encryption and decryption method, device and system and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710855326.6A CN109525747B (en) 2017-09-20 2017-09-20 Picture uploading method, encryption and decryption method, device and system and electronic equipment

Publications (2)

Publication Number Publication Date
CN109525747A CN109525747A (en) 2019-03-26
CN109525747B true CN109525747B (en) 2021-05-28

Family

ID=65769359

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710855326.6A Active CN109525747B (en) 2017-09-20 2017-09-20 Picture uploading method, encryption and decryption method, device and system and electronic equipment

Country Status (1)

Country Link
CN (1) CN109525747B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113240503A (en) * 2021-04-08 2021-08-10 福建升腾资讯有限公司 Reimbursement invoice management method, device and medium based on intelligent equipment
CN114462054A (en) * 2021-11-16 2022-05-10 马上消费金融股份有限公司 Multimedia file label adding and checking method and equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1968080A (en) * 2006-09-06 2007-05-23 四川长虹电器股份有限公司 Method for privacy protection in digital media application
CN105825083A (en) * 2016-03-18 2016-08-03 北京花生科技有限责任公司 Picture copyright protecting method and recognizing method and related method and system

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102306114B (en) * 2010-09-25 2013-04-10 广东电子工业研究院有限公司 Regular data backup and recovery method based on cloud storage
EP2910026B1 (en) * 2012-10-19 2017-11-29 Visa International Service Association Digital broadcast methods using secure meshes and wavelets
CN104038664A (en) * 2013-03-05 2014-09-10 北京印刷学院 Mobile phone based method and system for transmitting picture file
CN105279440A (en) * 2015-07-06 2016-01-27 深圳市美贝壳科技有限公司 Photo file encryption method
CN105357415B (en) * 2015-11-09 2017-12-08 北京奇虎科技有限公司 Image ciphering, the method and device of decryption
CN106453056A (en) * 2016-10-28 2017-02-22 努比亚技术有限公司 Mobile terminal and method for safely sharing picture

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1968080A (en) * 2006-09-06 2007-05-23 四川长虹电器股份有限公司 Method for privacy protection in digital media application
CN105825083A (en) * 2016-03-18 2016-08-03 北京花生科技有限责任公司 Picture copyright protecting method and recognizing method and related method and system

Also Published As

Publication number Publication date
CN109525747A (en) 2019-03-26

Similar Documents

Publication Publication Date Title
US11558358B2 (en) Secure analytics using homomorphic and injective format-preserving encryption
CN110798315B (en) Data processing method and device based on block chain and terminal
US20180219688A1 (en) Information Transmission Method and Mobile Device
CN102281300A (en) digital rights management license distribution method and system, server and terminal
CN105871805A (en) Anti-stealing-link method and device
CN108197439A (en) A kind of file encrypting method, device and server
CN107613316A (en) A kind of network direct broadcasting plug-flow verification method and system
CN113347143B (en) Identity verification method, device, equipment and storage medium
CN109005184A (en) File encrypting method and device, storage medium, terminal
CN111741268B (en) Video transmission method, device, server, equipment and medium
CN108229192B (en) File decryption method and device and client
CN111027981A (en) Method and device for multi-party joint training of risk assessment model for IoT (Internet of things) machine
CN111404892B (en) Data supervision method and device and server
CN109525747B (en) Picture uploading method, encryption and decryption method, device and system and electronic equipment
CN105868987B (en) A kind of method and system of shared information between devices
CN115276978A (en) Data processing method and related device
US20170200020A1 (en) Data management system, program recording medium, communication terminal, and data management server
CN117240625B (en) Tamper-resistant data processing method and device and electronic equipment
CN112600667A (en) Key negotiation method, device, equipment and storage medium
CN111181905B (en) File encryption method and device
CN110968878B (en) Information transmission method, system, electronic equipment and readable medium
JP2016100007A (en) Network authentication method using card device
CN111260359A (en) Mobile payment method, device and system
CN110912683B (en) Password storage method and device and password verification method and device
CN113434177A (en) Medical software updating method and device based on medical data safety

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
GR01 Patent grant
GR01 Patent grant