Image sharing method, device and electronic equipment

By sub-image division and encryption processing of images, special information is embedded, and stitched into a complete image sharing, the problems of privacy leakage and inefficiency in image sharing are solved, and efficient and secure image sharing is achieved.

CN117041441BActive Publication Date: 2024-11-22CHINA MOBILE INTERNET CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310953909.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-31
Publication Date
2024-11-22
Estimated Expiration
2043-07-31

AI Technical Summary

Technical Problem

During the image sharing process, users may mistakenly share special information with the wrong users, resulting in privacy leakage and reducing sharing efficiency.

Method used

By dividing the original image into multiple sub-images, selecting appropriate encryption methods according to the type of sub-image, embedding special information into the sub-image, and finally stitching the processed sub-image into a complete image for sharing, ensuring that only the specified object can be decrypted and obtained Special information.

Benefits of technology

Improves the privacy, security and efficiency of image sharing, and prevents non-specified objects from obtaining special information in images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117041441B_ABST
    Figure CN117041441B_ABST
Patent Text Reader

Abstract

The present disclosure relates to an image sharing method, device and electronic device, wherein the method comprises: a SIM card of a first terminal device, obtaining an image to be shared of an original object in a communication application, multiple sub-images in the image, and an image type of the sub-image; obtaining special information to be embedded in the image, and multiple information fragments in the special information; the multiple information fragments correspond to the multiple sub-images one by one; for each sub-image, according to an encryption method corresponding to the image type of the sub-image, the information fragment corresponding to the sub-image is embedded into the sub-image to obtain a processed sub-image; then a splicing process is performed to obtain a processed image, and the processed image is provided to a communication application, instructing the communication application to share the image to a target object, so that when the processed image is shared in a group, a designated object can decrypt and obtain the special information in the image, and a non-designated object has difficulty in obtaining the special information in the image, thereby improving privacy security and improving image sharing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image processing technology, and in particular to an image sharing method, device and electronic device. Background Art

[0002] Currently, when user A shares an image, he may only share the image with user B, and share the image plus special information with user C, where the special information is embedded in the image. In this scenario, user A needs to share images with different information to user B and user C respectively. In addition, the following situation may occur, that is, when user A mistakenly shares the image to be shared with user C with special information, it may be shared with user B, resulting in the leakage of special information, affecting privacy security, and reducing the efficiency of image sharing. Summary of the invention

[0003] The present disclosure provides an image sharing method, device and electronic device.

[0004] According to a first aspect of an embodiment of the present disclosure, there is provided an image sharing method, which is applied to a SIM card of a first terminal device, and the method comprises: obtaining an image to be shared of an original object in a communication application, a plurality of sub-images in the image, and an image type of the sub-image; obtaining special information to be embedded in the image, and a plurality of information fragments in the special information; a plurality of information fragments correspond one-to-one to a plurality of sub-images; for each sub-image, according to an encryption method corresponding to the image type of the sub-image, embedding the information fragment corresponding to the sub-image into the sub-image to obtain a processed sub-image; performing splicing processing on a plurality of processed sub-images to obtain a processed image; providing the processed image to the communication application, and instructing the communication application to share the image to a target object.

[0005] In one embodiment of the present disclosure, the method of obtaining an image of an original object to be shared in a communication application, multiple sub-images in the image, and image types of the sub-images includes: obtaining an image of an original object to be shared in a communication application; dividing the image according to a first size to obtain multiple sub-images having the first size; and determining the image type of each sub-image in the multiple sub-images.

[0006] In one embodiment of the present disclosure, the determining of the image type of each sub-image in the plurality of sub-images includes: for each sub-image, dividing the sub-image according to a second size to obtain a plurality of image blocks having the second size; the second size is smaller than the first size; performing quantization encoding processing on the plurality of image blocks to obtain a quantization value of each image block in the plurality of image blocks, a maximum quantization value and a minimum quantization value among the plurality of quantization values, and a quantization bitmap of the sub-image; determining a quantization difference between the maximum quantization value and the minimum quantization value; and determining the image type of the sub-image according to the quantization difference, the quantization difference threshold, and the quantization bitmap.

[0007] In one embodiment of the present disclosure, determining the image type of the sub-image according to the quantization difference, the quantization difference threshold and the quantization bitmap includes: when the quantization difference is less than the quantization difference threshold, determining the image type of the sub-image to be the first type; when the quantization difference is greater than or equal to the quantization difference threshold, determining a first intermediate type of a first intermediate bitmap composed of a portion with a value of 0 in the quantization bitmap, and a second intermediate type of a second intermediate bitmap composed of a portion with a value of 1 in the quantization bitmap; when there is a first type and a non-first type in the first intermediate type and the second intermediate type, determining the image type of the sub-image to be the second type; when both the first intermediate type and the second intermediate type are non-first types, determining the image type of the sub-image to be the third type.

[0008] In one embodiment of the present disclosure, determining the image type of the sub-image according to the quantization difference, the quantization difference threshold and the quantization bitmap further includes: when both the first intermediate type and the second intermediate type are of the first type, determining whether a first difference between a maximum pixel value and a minimum pixel value of pixels at a plurality of first position points in the first intermediate bitmap and a plurality of the first position points in the sub-image is greater than a pixel difference threshold; determining whether a second difference between a maximum pixel value and a minimum pixel value of pixels at a plurality of second position points in the second intermediate image and a plurality of the second position points in the sub-image is greater than the pixel difference threshold; determining that the image type of the sub-image is a fourth type when the first difference is less than or equal to the pixel difference threshold, or when the second difference is less than or equal to the pixel difference threshold; and determining that the image type of the sub-image is a fifth type when the first difference is greater than the pixel difference threshold and the second difference is greater than the pixel difference threshold.

[0009] In one embodiment of the present disclosure, the obtaining of special information to be embedded in the image and multiple information fragments in the special information includes: obtaining the special information to be embedded in the image; dividing the special information according to the number of sub-images in the image to obtain multiple information fragments.

[0010] In one embodiment of the present disclosure, the image types include a first type, a second type, a third type, a fourth type and a fifth type; the encryption methods corresponding to the first type and the fourth type are: determining a public key and a private key according to a random prime number; encrypting an information segment corresponding to the sub-image according to the public key; the encryption method corresponding to the second type is: encrypting the sub-image and marking the area in combination with the Hilbert curve, and embedding the information segment corresponding to the sub-image in the marked area; the encryption methods corresponding to the third type and the fifth type are: determining a target position in the sub-image in combination with a rectangular prediction model, and embedding the information segment corresponding to the sub-image in the target position.

[0011] In one embodiment of the present disclosure, for each sub-image, according to the encryption method corresponding to the image type of the sub-image, the information segment corresponding to the sub-image is embedded into the sub-image to obtain a processed sub-image, including: for each sub-image, when the image type of the sub-image is the first type or the fourth type, obtaining a first random prime number and a second random prime number; determining a public key and a private key according to the first random prime number, the second random prime number and a key calculation formula; encrypting the information segment corresponding to the sub-image according to the public key to obtain an encrypted information segment; embedding the encrypted information segment into the sub-image to obtain a processed sub-image.

[0012] In one embodiment of the present disclosure, for each sub-image, according to the encryption method corresponding to the image type of the sub-image, the information fragment corresponding to the sub-image is embedded into the sub-image to obtain a processed sub-image, including: for each sub-image, when the image type of the sub-image is the second type, the sub-image is subjected to Hilbert curve processing to obtain a one-dimensional digital sequence; the one-dimensional digital sequence is subjected to quantization processing and inverse Hilbert curve processing to obtain a restored sub-image, and the restored sub-image is subjected to quantization area marking processing; the restored sub-image is subjected to Hilbert curve random scrambling processing, and the restored sub-image after scrambling is encrypted using the private key of the original object when logging into the first terminal device to obtain an encrypted sub-image; and the information fragment corresponding to the sub-image is embedded in the quantization area marked in the encrypted sub-image to obtain a processed image.

[0013] In one embodiment of the present disclosure, for each sub-image, according to the encryption method corresponding to the image type of the sub-image, the information fragment corresponding to the sub-image is embedded into the sub-image to obtain a processed sub-image, including: for each sub-image, when the image type of the sub-image is the third type or the fifth type, combining a rectangular prediction model, determining the candidate pixel points in the sub-image and the predicted values ​​of the candidate pixel points; determining the prediction error values ​​of the candidate pixel points according to the pixel values ​​and the predicted values ​​of the candidate pixel points; determining the embeddable position in the sub-image according to the prediction error values ​​and the histogram of the candidate pixel points; and embedding the information fragment corresponding to the sub-image at the embeddable position of the sub-image to obtain a processed sub-image.

[0014] In one embodiment of the present disclosure, the method also includes: obtaining image marking information of multiple sub-images in the image; wherein, when the image types of the sub-images are different, the types of the image marking information are different; obtaining encryption marking information in the process of embedding multiple sub-images into information fragments; wherein, the encryption marking information is used to indicate the encryption method and encryption-related parameters; determining encryption-related information corresponding to the image based on the image marking information of the multiple sub-images and the encryption marking information; obtaining a first target object having a specified relationship with the original object; providing the encryption-related information corresponding to the image to a terminal device to which the first target object belongs, so as to instruct the SIM card of the terminal device to decrypt the received image in combination with the encryption-related information.

[0015] According to the second aspect of the embodiment of the present disclosure, there is also provided an image sharing method, which is applied to the SIM card of a second terminal device, and the method includes: obtaining a shared image received by a target object in a communication application, and encryption-related information corresponding to the shared image; the encryption-related information includes image marking information and encryption marking information of multiple sub-images in the shared image; according to the image marking information, determining multiple sub-images in the shared image and the image type of the sub-image; for each sub-image in the shared image, decrypting the sub-image according to the encryption method corresponding to the image type of the sub-image and the encryption marking information, and obtaining an information segment corresponding to the sub-image; splicing the information segments corresponding to multiple sub-images to obtain special information embedded in the shared image.

[0016] According to the third aspect of the embodiment of the present disclosure, there is also provided an image sharing device, which is applied to a SIM card of a first terminal device, and the device includes: a first acquisition module, which is used to acquire an image to be shared of an original object in a communication application, multiple sub-images in the image, and an image type of the sub-image; a second acquisition module, which is used to acquire special information to be embedded in the image, and multiple information fragments in the special information; the multiple information fragments correspond one-to-one to the multiple sub-images; an encryption processing module, which is used to embed the information fragment corresponding to the sub-image into the sub-image for each sub-image according to the encryption method corresponding to the image type of the sub-image, so as to obtain a processed sub-image; a splicing processing module, which is used to splice multiple processed sub-images to obtain a processed image; and a providing module, which is used to provide the processed image to the communication application, and instruct the communication application to share the image to the target object.

[0017] According to a fourth aspect of an embodiment of the present disclosure, there is also provided an image sharing device, which is applied to a SIM card of a second terminal device, and the device includes: an acquisition module, which is used to acquire a shared image received by a target object in a communication application, and encryption-related information corresponding to the shared image; the encryption-related information includes image marking information and encryption marking information of multiple sub-images in the shared image; a determination module, which is used to determine multiple sub-images in the shared image and the image type of the sub-image according to the image marking information; a decryption processing module, which is used to decrypt each sub-image in the shared image according to the encryption method corresponding to the image type of the sub-image and the encryption marking information, and obtain an information segment corresponding to the sub-image; a splicing processing module, which is used to splice the information segments corresponding to multiple sub-images to obtain special information embedded in the shared image.

[0018] According to a fifth aspect of an embodiment of the present disclosure, there is also provided an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to: implement the steps of the image sharing method as described above.

[0019] According to a sixth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is also provided. When instructions in the storage medium are executed by a processor, the processor is enabled to execute the image sharing method as described above.

[0020] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:

[0021] The SIM card of the first terminal device obtains the image to be shared by the original object in the communication application, multiple sub-images in the image, and the image type of the sub-image; obtains special information to be embedded in the image, and multiple information fragments in the special information; the multiple information fragments correspond to the multiple sub-images one by one; for each sub-image, according to the encryption method corresponding to the image type of the sub-image, the information fragment corresponding to the sub-image is embedded into the sub-image to obtain a processed sub-image; the multiple processed sub-images are spliced ​​to obtain a processed image; the processed image is provided to the communication application, and the communication application is instructed to share the image to the target object, so that when the processed image is shared in a group, the designated object can decrypt and obtain the special information in the image, and it is difficult for non-designated objects to obtain the special information in the image, thereby improving privacy security and improving image sharing efficiency.

[0022] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.

[0024] Figure 1 A flowchart of an image sharing method according to an embodiment of the present disclosure;

[0025] Figure 2 A flowchart of an image sharing method according to an embodiment of the present disclosure;

[0026] Figure 3 A flowchart of an image sharing method according to an embodiment of the present disclosure;

[0027] Figure 4 It is a schematic diagram of the interaction between various terminal devices;

[0028] Figure 5 A schematic diagram of the structure of an image sharing device according to an embodiment of the present disclosure;

[0029] Figure 6 A schematic diagram of the structure of an image sharing device according to an embodiment of the present disclosure;

[0030] Figure 7 The figure is a structural block diagram of an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0031] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.

[0032] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0033] Currently, when user A shares an image, he may only share the image with user B, and share the image plus special information with user C, where the special information is embedded in the image. In this scenario, user A needs to share images with different information to user B and user C respectively. In addition, the following situation may occur, that is, when user A mistakenly shares the image to be shared with user C with special information, it may be shared with user B, resulting in the leakage of special information, affecting privacy security, and reducing the efficiency of image sharing.

[0034] Figure 1 The flowchart of the image sharing method of one embodiment of the present disclosure is as follows. It should be noted that the image sharing method of the present embodiment can be applied to an image sharing device, which can be configured in an electronic device so that the electronic device can perform an image sharing function.

[0035] The electronic device may be any device with computing capability, for example, a terminal device, a server, a SIM card in a terminal device, etc. In the following embodiments, the execution subject is an example of a SIM card in a first terminal device.

[0036] The terminal device may be, for example, a personal computer (PC), a mobile terminal, etc. The mobile terminal may be, for example, a vehicle-mounted device, a mobile phone, a tablet computer, a personal digital assistant, a wearable device, or other hardware device having various operating systems, a touch screen and / or a display screen, and capable of image sharing processing.

[0037] like Figure 1 As shown, the method comprises the following steps:

[0038] Step 101 : obtaining an image to be shared of an original object in a communication application, a plurality of sub-images in the image, and image types of the sub-images.

[0039] In the disclosed embodiment, the image to be shared can be any image. The original object can be any object of the image to be shared in the communication application. The communication application is an application that can share images, such as a system SMS application, a third-party instant messaging software, etc., which can be set according to actual needs.

[0040] In the embodiment of the present disclosure, the multiple sub-images in the image can be obtained by dividing the image. The size information of the sub-images can be, for example, N*N, where N represents the number of pixels.

[0041] In the disclosed embodiment, the image type of the sub-image may be determined based on the smoothness of the sub-image, the smoothness of the image blocks in the sub-image, the depth of the colors in the sub-image, etc.

[0042] Step 102, obtaining special information to be embedded in the image and a plurality of information segments in the special information; the plurality of information segments correspond to the plurality of sub-images one by one.

[0043] In an embodiment of the present disclosure, in one example, the process of the SIM card of the first terminal device executing step 102 may be, for example, obtaining special information to be embedded in the image; dividing the special information according to the number of sub-images in the image to obtain multiple information fragments. Taking the special information as text information as an example, the characters in the text information may be divided according to the number of sub-images in the image to obtain multiple information fragments containing characters.

[0044] It should be noted that if the number of characters in the text information is too small, the text information may be padded with empty characters.

[0045] In another example of the embodiment of the present disclosure, the process of the SIM card of the first terminal device executing step 102 may, for example, be to obtain the special information of the image to be embedded and the number of image types; divide the special information according to the number of image types to obtain multiple sub-special information; for each sub-special information, determine the number of sub-images under the corresponding image type; divide the sub-special information according to the number of sub-images under the image type to obtain multiple information fragments.

[0046] Step 103 , for each sub-image, according to the encryption method corresponding to the image type of the sub-image, an information fragment corresponding to the sub-image is embedded into the sub-image to obtain a processed sub-image.

[0047] In the disclosed embodiment, image types include a first type, a second type, a third type, a fourth type and a fifth type; the encryption methods corresponding to the first type and the fourth type are: determining a public key and a private key according to a random prime number; encrypting an information segment corresponding to a sub-image according to the public key; the encryption method corresponding to the second type is: encrypting the sub-image and marking the area in combination with the Hilbert curve, and embedding the information segment corresponding to the sub-image in the marked area; the encryption methods corresponding to the third type and the fifth type are: determining a target position in a sub-image in combination with a rectangular prediction model, and embedding the information segment corresponding to the sub-image in the target position.

[0048] In the embodiment of the present disclosure, when the image type of the sub-image is the first type or the fourth type, the process of the SIM card of the first terminal device executing step 103 may, for example, be to obtain a first random prime number and a second random prime number; determine a public key and a private key according to the first random prime number, the second random prime number and a key calculation formula; encrypt the information segment corresponding to the sub-image according to the public key to obtain an encrypted information segment; embed the encrypted information segment into the sub-image to obtain a processed sub-image.

[0049] The process of determining the public key and the private key by the SIM card of the first terminal device may be, for example, determining the product of the first random prime number and the second random prime number, the difference between the first random prime number and 1, the difference between the second random prime number and 1, and the least common multiple N2 of the above three; then determining a set E according to N2, where all constants in the set E are coprime with N2; randomly selecting an integer g from the set E; randomly determining an integer N, then the public key is (N, g); combining the public key and the secret key calculation formula to calculate the private key. The secret key calculation public key may be shown in the following formula (1).

[0050] god(L(g γ modN 2 ),N)=1 (1)

[0051] Among them, function L = (g-1) / N; γ represents the private key; god() represents the greatest common divisor of two inputs.

[0052] The formula for the SIM card of the first terminal device to obtain the processed sub-image may be, for example, as shown in the following formula (2).

[0053] PIC=V(m,r)=g m rm N modN 2 (2)

[0054] Among them, m represents an image; r represents an information segment, or represents the Chinese Internal Code Specification (GBK) representation of the information segment.

[0055] In the disclosed embodiment, when the image type of the sub-image is the second type, the process of the SIM card of the first terminal device executing step 103 may, for example, be as follows: for each sub-image, when the image type of the sub-image is the second type, performing Hilbert curve processing on the sub-image to obtain a one-dimensional digital sequence; performing quantization processing and inverse Hilbert curve processing on the one-dimensional digital sequence to obtain a restored sub-image, and performing quantization area marking processing on the restored sub-image; performing Hilbert curve random scrambling processing on the restored sub-image, and using the private key of the original object when logging into the first terminal device, encrypting the scrambled restored sub-image to obtain an encrypted sub-image; embedding the information fragment corresponding to the sub-image in the quantization area marked in the encrypted sub-image to obtain a processed image.

[0056] Among them, the process of the SIM card of the first terminal device performing quantization processing on the one-dimensional digital sequence can, for example, be to perform pixel quantization multi-resolution analysis on the sub-image to obtain the development trend curve of the sub-image; use the development trend curve as a threshold to divide the critical curve and perform quantization processing on the one-dimensional digital sequence.

[0057] In the embodiment of the present disclosure, when the image type of the sub-image is the third type or the fifth type, the process of the SIM card of the first terminal device executing step 103 may, for example, be as follows: for each sub-image, when the image type of the sub-image is the third type or the fifth type, determine the candidate pixels in the sub-image and the predicted values ​​of the candidate pixels in combination with the rectangular prediction model; determine the prediction error values ​​of the candidate pixels based on the pixel values ​​and the predicted values ​​of the candidate pixels; determine the embeddable position in the sub-image based on the prediction error values ​​and the histogram of the candidate pixels; and embed the information fragment corresponding to the sub-image at the embeddable position of the sub-image to obtain the processed sub-image.

[0058] The process of determining the candidate pixels in the sub-image and the predicted values ​​of the candidate pixels by the SIM card of the first terminal device can be, for example, (1) obtaining a rectangular prediction model, wherein each rectangle of the rectangular prediction model includes 3 blue pixels and 1 white pixel; wherein, among the 4 pixels of the rectangle, the upper left corner pixel, the left pixel and the upper pixel of the white pixel are all blue pixels. (2) determining multiple rectangles in the sub-image; for each rectangle, determining the predicted value of the white pixel based on the pixel values ​​of the 3 blue pixels; wherein the white pixel is used as a candidate pixel. The predicted value of the white pixel can be the average of the pixel values ​​of the 3 blue pixels.

[0059] The process of determining the embeddable position in the sub-image based on the prediction error value and histogram of the candidate pixel point by the SIM card of the first terminal device can be, for example, (1) generating a histogram using a differential equation; finding the corresponding difference values ​​E1 and Er (Er = E1 + 1) of different candidate pixel points from the maximum peak vertex of the histogram from the histogram; then adjusting the different candidate pixel points after operating the histogram according to the prediction value of the candidate pixel point to obtain the address index map Lm1 and Lm2; and determining the embeddable position in the embeddable position sub-image based on Lm1 and Lm2. The prediction value of the candidate pixel point can be obtained by using E i,j express.

[0060] The process of determining the address index maps Lm1 and Lm2 by the SIM card of the first terminal device may be, for example, to determine the parameter LSBP i,j , that is, the pixel value P of the candidate pixel i,j The least significant bit of the bit; define Lm1 to mark the embeddable position, and Lm2 to record the embedded information fragment (for example, the symbol 0 or 1 in the information fragment); operate in the following order from left to right and from top to bottom: (1) If E i,j <E1-1, then P i,j =P i,j +1, Lm1=0, Lm2 is not processed; (2) If E1-1<E i,j <=E1 and LSBP i,j =0, then Lm1 = 1, Lm2 = 0; (3) If E1-1 < E i,j <=E1 and LSBP i,j =1, then P i,j =P i,j +1, Lm1=0, Lm2 is not processed; (4) If E1<E i,j <=Er and LSBP i,j =1, then Lm1 = 1, Lm2 = 1; (5) If E1 <= E i,j <=Er and LSBP i,j =0, then P i,j =P i,j -1, Lm1=0, Lm2 is not processed; (6) If E i,j >Er, then P i,j =P i,j -1, Lm1=0, Lm2 is not processed.

[0061] The SIM card of the first terminal device determines the embeddable position in the embeddable position sub-image based on Lm1 and Lm2, and embeds the information fragment in the following process, for example: (1) defining the parameter HC i,j, which means the specific pixel point in row i and column j of the image with special information to be generated; define parameter C i,j , represents the pixel point in row i and column j of the image after preprocessing, and m represents the embeddable position. (2) Read Lm1 from left to right and from top to bottom to find the embeddable position. If Lm1 = 0, skip this position and go to the next position; if Lm1 = 1, execute step (3). (3) If m = 0, read Lm2. If Lm2 = 0, then HC i,j =C i,j ; If Lm2 = 1, then HC i,j =(C i,j +1) mod256; if m = 1, read Lm2, if Lm2 = 0, then HC i,j =(C i,j -1) mod256; if Lm2 = 1, then HC i,j =C i,j In the pixel point where m=1, fill in the part of the information fragment that can be accommodated, and repeat the above process until all the information fragments are accommodated.

[0062] Step 104 , stitching the multiple processed sub-images to obtain a processed image.

[0063] Step 105 , providing the processed image to a communication application, and instructing the communication application to share the image to a target object.

[0064] In the disclosed embodiment, in order to ensure the security of image sharing, the SIM card of the first terminal device can also perform ordinary encryption processing on the processed image. For example, the processed image is encrypted using the Advanced Encryption Standard (AES). Correspondingly, after receiving the shared image, other terminal devices can use the AES algorithm to decrypt the shared image to obtain the decrypted image for image display processing.

[0065] In the embodiment of the present disclosure, at the same time or after step 105, in order to facilitate the first target object having a specified relationship with the original object to parse the shared image to obtain special information, the SIM card of the first terminal device can also perform the following process: obtaining image marking information of multiple sub-images in the image; wherein, when the image type of the sub-image is different, the type of the image marking information is different; obtaining encryption marking information in the process of embedding multiple sub-images into information fragments; wherein the encryption marking information is used to indicate the encryption method and encryption-related parameters; determining the encryption-related information corresponding to the image based on the image marking information of the multiple sub-images and the encryption marking information; obtaining the first target object having a specified relationship with the original object; and providing the encryption-related information corresponding to the image to the terminal device to which the first target object belongs, so as to instruct the SIM card of the terminal device to decrypt the received image in combination with the encryption-related information.

[0066] Wherein, when the image type of the sub-image is the first type, the image marking information of the sub-image may be, for example, the average value of the values ​​of all pixels in the sub-image. When the image type of the sub-image is the second type, the image marking information of the sub-image may be, for example, the minimum quantization value among the quantization values ​​of multiple image blocks of the sub-image. When the image type of the sub-image is the third type, the image marking information of the sub-image may be, for example, empty. When the image type of the sub-image is the fourth type, the image marking information of the sub-image may be, for example, the quantization value of each image block in the first intermediate bitmap composed of the part with a value of 0 in the quantization bitmap of the sub-image. When the image type of the sub-image is the fifth type, the image marking information of the sub-image may be, for example, the pixel value of the first pixel in the sub-image.

[0067] Among them, in the encrypted marking information of the sub-image, if the image type of the sub-image is the first type or the fourth type, the encrypted marking information may be, for example, the least common multiple involved in the key calculation process, and the generated public key and private key; if the image type of the sub-image is the second type, the encrypted marking information may be, for example, the private key when the original object logs in to the first terminal device. If the image type of the sub-image is the third type or the fifth type, the encrypted marking information may be, for example, a rectangular prediction model.

[0068] In the image sharing method of the disclosed embodiment, the SIM card of the first terminal device obtains the image to be shared by the original object in the communication application, multiple sub-images in the image, and the image type of the sub-image; obtains special information to be embedded in the image, and multiple information fragments in the special information; the multiple information fragments correspond to the multiple sub-images one by one; for each sub-image, according to the encryption method corresponding to the image type of the sub-image, the information fragment corresponding to the sub-image is embedded into the sub-image to obtain a processed sub-image; the multiple processed sub-images are spliced ​​to obtain a processed image; the processed image is provided to the communication application, and the communication application is instructed to share the image to the target object, so that when the processed image is shared in a group, the designated object can decrypt and obtain the special information in the image, and it is difficult for non-designated objects to obtain the special information in the image, thereby improving privacy security and improving image sharing efficiency.

[0069] Figure 2 The flowchart of the image sharing method of one embodiment of the present disclosure is as follows. It should be noted that the image sharing method of the present embodiment can be applied to an image sharing device, which can be configured in an electronic device so that the electronic device can perform an image sharing function.

[0070] The electronic device may be any device with computing capability, for example, a terminal device, a server, a SIM card in a terminal device, etc. In the following embodiments, the execution subject is an example of a SIM card in a first terminal device.

[0071] The terminal device may be, for example, a personal computer (PC), a mobile terminal, etc. The mobile terminal may be, for example, a vehicle-mounted device, a mobile phone, a tablet computer, a personal digital assistant, a wearable device, or other hardware device having various operating systems, a touch screen and / or a display screen, and capable of image sharing processing.

[0072] like Figure 2 As shown, the method comprises the following steps:

[0073] Step 201: Acquire an image to be shared by an original object in a communication application.

[0074] Step 202: divide the image into sub-images according to a first size to obtain a plurality of sub-images having the first size.

[0075] In an embodiment of the present disclosure, the SIM card of the first terminal device can divide the image in sequence according to the first size from left to right and from top to bottom to obtain multiple sub-images with the first size; if the remaining image part does not meet the first size, the remaining image part is discarded.

[0076] In addition, in order to minimize the remaining image portion, the length of the first size can be determined as a number that can be evenly divided by the length of the image; and / or the width of the first size can be determined as a number that can be evenly divided by the width of the image.

[0077] Step 203 : for each sub-image, divide the sub-image according to a second size to obtain a plurality of image blocks of the second size; the second size is smaller than the first size.

[0078] In an embodiment of the present disclosure, for each sub-image, the SIM card of the first terminal device can divide the sub-image in sequence according to the second size from left to right and from top to bottom to obtain multiple image blocks with the second size; if the remaining sub-image part does not meet the second size, the remaining sub-image part is discarded.

[0079] In addition, in order to minimize the remaining sub-image portion, the length of the second size can be determined as a number that can be evenly divided by the length of the first size; and / or the width of the second size can be determined as a number that can be evenly divided by the width of the first size.

[0080] Step 204 , performing quantization coding processing on the multiple image blocks to obtain a quantization value of each image block in the multiple image blocks, a maximum quantization value and a minimum quantization value in the multiple quantization values, and a quantization bitmap of the sub-image.

[0081] In the embodiment of the present disclosure, the quantization coding algorithm may be, for example, Huffman coding.

[0082] Step 205: determine the quantization difference between the maximum quantization value and the minimum quantization value.

[0083] Step 206: Determine the image type of the sub-image according to the quantization difference, the quantization difference threshold, and the quantization bitmap.

[0084] In the embodiment of the present disclosure, the process of the SIM card of the first terminal device executing step 206 may include the following steps: when the quantization difference is less than the quantization difference threshold, determining that the image type of the sub-image is the first type; when the quantization difference is greater than or equal to the quantization difference threshold, determining the first intermediate type of the first intermediate bitmap composed of the part with a value of 0 in the quantization bitmap, and the second intermediate type of the second intermediate bitmap composed of the part with a value of 1 in the quantization bitmap; when there is a first type and a non-first type in the first intermediate type and the second intermediate type, determining that the image type of the sub-image is the second type; when both the first intermediate type and the second intermediate type are non-first types, determining that the image type of the sub-image is the third type.

[0085] In the embodiment of the present disclosure, the process of the SIM card of the first terminal device executing step 206 may also include the following steps: when the first intermediate type and the second intermediate type are both the first type, determining whether a first difference between the maximum pixel value and the minimum pixel value of pixels at multiple first position points in the first intermediate bitmap and multiple first position points in the sub-image is greater than a pixel difference threshold; determining whether a second difference between the maximum pixel value and the minimum pixel value of pixels at multiple second position points in the second intermediate image and multiple second position points in the sub-image is greater than a pixel difference threshold; when the first difference is less than or equal to the pixel difference threshold, or the second difference is less than or equal to the pixel difference threshold, determining that the image type of the sub-image is the fourth type; when the first difference is greater than the pixel difference threshold, and the second difference is greater than the pixel difference threshold, determining that the image type of the sub-image is the fifth type.

[0086] Step 207, obtaining the special information to be embedded in the image and a plurality of information segments in the special information; the plurality of information segments correspond to the plurality of sub-images one by one.

[0087] Step 208 : For each sub-image, according to the encryption method corresponding to the image type of the sub-image, an information fragment corresponding to the sub-image is embedded into the sub-image to obtain a processed sub-image.

[0088] Step 209 , stitching the multiple processed sub-images to obtain a processed image.

[0089] Step 210 , providing the processed image to a communication application, instructing the communication application to share the image to a target object.

[0090] In the image sharing method of the disclosed embodiment, the SIM card of the first terminal device obtains the image to be shared by the original object in the communication application; divides the image according to the first size to obtain multiple sub-images with the first size; for each sub-image, divides the sub-image according to the second size to obtain multiple image blocks with the second size; the second size is smaller than the first size; quantizes and encodes the multiple image blocks to obtain the quantization value of each image block in the multiple image blocks, the maximum quantization value and the minimum quantization value in the multiple quantization values, and the quantization bitmap of the sub-image; determines the quantization difference between the maximum quantization value and the minimum quantization value; determines the image size of the sub-image according to the quantization difference, the quantization difference threshold and the quantization bitmap; The method comprises the steps of: obtaining an image type; obtaining special information to be embedded in the image, and a plurality of information fragments in the special information; the plurality of information fragments correspond to the plurality of sub-images one by one; for each sub-image, embedding the information fragment corresponding to the sub-image into the sub-image according to the encryption method corresponding to the image type of the sub-image, so as to obtain a processed sub-image; performing splicing processing on the plurality of processed sub-images to obtain a processed image; providing the processed image to a communication application, and instructing the communication application to share the image to a target object, so that when the processed image is shared in a group, the designated object can decrypt and obtain the special information in the image, and it is difficult for a non-designated object to obtain the special information in the image, thereby improving privacy security and image sharing efficiency.

[0091] Figure 3 The flowchart of the image sharing method of one embodiment of the present disclosure is as follows. It should be noted that the image sharing method of the present embodiment can be applied to an image sharing device, which can be configured in an electronic device so that the electronic device can perform an image sharing function.

[0092] The electronic device may be any device with computing capability, for example, a terminal device, a server, a SIM card in a terminal device, etc. In the following embodiments, the execution subject is an example of a SIM card in a second terminal device.

[0093] The terminal device may be, for example, a personal computer (PC), a mobile terminal, etc. The mobile terminal may be, for example, a vehicle-mounted device, a mobile phone, a tablet computer, a personal digital assistant, a wearable device, or other hardware device having various operating systems, a touch screen and / or a display screen, and capable of image sharing processing.

[0094] like Figure 3 As shown, the method comprises the following steps:

[0095] Step 301 , obtaining a shared image received by a target object in a communication application and encryption-related information corresponding to the shared image; the encryption-related information includes image tag information of multiple sub-images in the shared image and encryption tag information.

[0096] In the disclosed embodiment, the target object in the communication application of the second terminal device may be an object having a specified relationship with the original object in the communication application of the first terminal device. The specified relationship may be, for example, permission to view special information embedded in the shared image, etc. Among them, special information, such as privacy information, etc., may be set according to actual needs.

[0097] The format of the privacy information, such as text format, image format, voice format, etc., can be set according to actual needs.

[0098] In the disclosed embodiment, the target object in the communication application of the second terminal device can be an object having a specified relationship with the original object in the communication application of the first terminal device, so that the second terminal device can not only obtain the shared image, but also obtain the encryption-related information corresponding to the shared image. It should be noted that the shared image and the encryption-related information corresponding to the shared image can be sent twice. The shared image can be sent in groups, and the encryption-related information corresponding to the shared image can be sent individually.

[0099] In the disclosed embodiment, the terminal device used for the object that does not have a specified relationship with the original object in the communication application of the first terminal device is, for example, a third terminal device. The third terminal device can only obtain the shared image, but cannot obtain the encryption-related information corresponding to the shared image. In the above case, the third terminal device can only obtain the shared image, but it is difficult to parse the shared image to obtain the special information embedded therein.

[0100] In the embodiment of the present disclosure, when the image types of the sub-images are different, the types of the image tag information are different. The encryption tag information is used to indicate the encryption method and encryption-related parameters.

[0101] Wherein, when the image type of the sub-image is the first type, the image marking information of the sub-image may be, for example, the average value of the values ​​of all pixels in the sub-image. When the image type of the sub-image is the second type, the image marking information of the sub-image may be, for example, the minimum quantization value among the quantization values ​​of multiple image blocks of the sub-image. When the image type of the sub-image is the third type, the image marking information of the sub-image may be, for example, empty. When the image type of the sub-image is the fourth type, the image marking information of the sub-image may be, for example, the quantization value of each image block in the first intermediate bitmap composed of the part with a value of 0 in the quantization bitmap of the sub-image. When the image type of the sub-image is the fifth type, the image marking information of the sub-image may be, for example, the pixel value of the first pixel in the sub-image.

[0102] Among them, in the encrypted marking information of the sub-image, if the image type of the sub-image is the first type or the fourth type, the encrypted marking information may be, for example, the least common multiple involved in the key calculation process, and the generated public key and private key; if the image type of the sub-image is the second type, the encrypted marking information may be, for example, the private key when the original object logs in to the first terminal device. If the image type of the sub-image is the third type or the fifth type, the encrypted marking information may be, for example, a rectangular prediction model.

[0103] Step 302 : determining multiple sub-images in the shared image and the image types of the sub-images according to the image tag information.

[0104] In the embodiment of the present disclosure, the SIM card of the second terminal device can divide the shared image to obtain multiple sub-images with a first size; the multiple sub-images are matched one by one with multiple image marking information in sequence; for each sub-image, the image type of the sub-image is determined according to the image marking information corresponding to the sub-image.

[0105] Step 303 , for each sub-image in the shared image, decrypt the sub-image according to the encryption method corresponding to the image type of the sub-image and the encryption mark information to obtain the information fragment corresponding to the sub-image.

[0106] In the disclosed embodiment, for each sub-image in a shared image, the encryption method of the sub-image can be determined according to the image type of the sub-image; the corresponding decryption method can be determined according to the encryption method of the sub-image; the encrypted mark information is used as a decryption parameter; the sub-image is decrypted in combination with the decryption parameter and the decryption method to obtain the information fragment embedded therein.

[0107] Step 304 , splicing the information segments corresponding to the multiple sub-images to obtain the special information embedded in the shared image.

[0108] In the image sharing method of the disclosed embodiment, the SIM card of the second terminal device obtains the shared image received by the target object in the communication application, and the encryption-related information corresponding to the shared image; the encryption-related information includes image marking information and encryption marking information of multiple sub-images in the shared image; according to the image marking information, the multiple sub-images in the shared image and the image type of the sub-image are determined; for each sub-image in the shared image, according to the encryption method corresponding to the image type of the sub-image and the encryption marking information, the sub-image is decrypted to obtain the information fragment corresponding to the sub-image; the information fragments corresponding to the multiple sub-images are spliced ​​to obtain the special information embedded in the shared image, so that after the second terminal device obtains the shared image, the shared image can be decrypted in combination with the encryption-related information corresponding to the shared image to obtain the special information therein; and the terminal device that has not obtained the encryption-related information is prevented from obtaining the special information, thereby improving privacy security and improving image sharing efficiency.

[0109] The following examples are used to illustrate this. Figure 4 The figure shows the interaction between user A (first terminal device), user B (second terminal device), and user C (third terminal device, where the object in the communication software has no specified relationship with the original object in the communication software of the first terminal device). Figure 4 The method includes the following steps: (1) the image to be sent is divided into corresponding NG1-NG5 (first type to fifth type); the privacy information is divided into information segments corresponding to the image type (first type to fifth type); different encryption methods are used to add the privacy information to the NG1-NG5 type images to obtain the basic image information (processed image); the basic image information is encrypted by AES to obtain the image to be transmitted; and the network transmission is performed. (2) After user B receives the image, AES decryption is performed to obtain the basic image information; the basic image information is specially decrypted to obtain the privacy information therein. (3) After user C receives the image, AES decryption is performed to obtain the basic image information.

[0110] Figure 5 It is a structural schematic diagram of an image sharing device according to an embodiment of the present disclosure.

[0111] like Figure 5 As shown, the image sharing device, applied to the SIM card of the first terminal device, may include: a first acquisition module 501 , a second acquisition module 502 , an encryption processing module 503 , a splicing processing module 504 and a providing module 505 .

[0112] Among them, the first acquisition module 501 is used to obtain the image to be shared of the original object in the communication application, multiple sub-images in the image, and the image type of the sub-image; the second acquisition module 502 is used to obtain special information to be embedded in the image, and multiple information fragments in the special information; the multiple information fragments correspond to the multiple sub-images one by one; the encryption processing module 503 is used to embed the information fragment corresponding to the sub-image into the sub-image according to the encryption method corresponding to the image type of the sub-image for each sub-image, so as to obtain a processed sub-image; the splicing processing module 504 is used to splice the multiple processed sub-images to obtain a processed image; the providing module 505 is used to provide the processed image to the communication application, instructing the communication application to share the image to the target object.

[0113] In one embodiment of the present disclosure, the first acquisition module 501 is specifically used to acquire an image of an original object to be shared in a communication application; divide the image according to a first size to obtain a plurality of sub-images having the first size; and determine the image type of each sub-image in the plurality of sub-images.

[0114] In one embodiment of the present disclosure, the first acquisition module 501 is specifically used to, for each sub-image, divide the sub-image according to a second size to obtain multiple image blocks with the second size; the second size is smaller than the first size; perform quantization encoding processing on the multiple image blocks to obtain a quantization value of each image block in the multiple image blocks, a maximum quantization value and a minimum quantization value among the multiple quantization values, and a quantization bitmap of the sub-image; determine a quantization difference between the maximum quantization value and the minimum quantization value; and determine the image type of the sub-image based on the quantization difference, the quantization difference threshold, and the quantization bitmap.

[0115] In one embodiment of the present disclosure, the first acquisition module 501 is specifically used to determine the image type of the sub-image according to the quantization difference, the quantization difference threshold and the quantization bitmap, including: when the quantization difference is less than the quantization difference threshold, determining the image type of the sub-image to be the first type; when the quantization difference is greater than or equal to the quantization difference threshold, determining the first intermediate type of the first intermediate bitmap composed of the portion with a value of 0 in the quantization bitmap, and the second intermediate type of the second intermediate bitmap composed of the portion with a value of 1 in the quantization bitmap; when there is a first type and a non-first type in the first intermediate type and the second intermediate type, determining the image type of the sub-image to be the second type; when both the first intermediate type and the second intermediate type are non-first types, determining the image type of the sub-image to be the third type.

[0116] In one embodiment of the present disclosure, the first acquisition module 501 is specifically used to, when both the first intermediate type and the second intermediate type are of the first type, determine whether a first difference between a maximum pixel value and a minimum pixel value of pixels at multiple first position points in the first intermediate bitmap and multiple first position points in the sub-image is greater than a pixel difference threshold; determine whether a second difference between a maximum pixel value and a minimum pixel value of pixels at multiple second position points in the second intermediate image and multiple second position points in the sub-image is greater than the pixel difference threshold; determine that the image type of the sub-image is the fourth type when the first difference is less than or equal to the pixel difference threshold, or when the second difference is less than or equal to the pixel difference threshold; and determine that the image type of the sub-image is the fifth type when the first difference is greater than the pixel difference threshold and the second difference is greater than the pixel difference threshold.

[0117] In one embodiment of the present disclosure, the second acquisition module 502 is specifically used to acquire the special information to be embedded in the image; and divide the special information according to the number of sub-images in the image to obtain multiple information segments.

[0118] In one embodiment of the present disclosure, the image types include a first type, a second type, a third type, a fourth type and a fifth type; the encryption methods corresponding to the first type and the fourth type are: determining a public key and a private key according to a random prime number; encrypting an information segment corresponding to the sub-image according to the public key; the encryption method corresponding to the second type is: encrypting the sub-image and marking the area in combination with the Hilbert curve, and embedding the information segment corresponding to the sub-image in the marked area; the encryption methods corresponding to the third type and the fifth type are: determining a target position in the sub-image in combination with a rectangular prediction model, and embedding the information segment corresponding to the sub-image in the target position.

[0119] In one embodiment of the present disclosure, the encryption processing module 503 is specifically used to, for each sub-image, when the image type of the sub-image is the first type or the fourth type, obtain a first random prime number and a second random prime number; determine a public key and a private key according to the first random prime number, the second random prime number and a key calculation formula; encrypt an information segment corresponding to the sub-image according to the public key to obtain an encrypted information segment; and embed the encrypted information segment into the sub-image to obtain a processed sub-image.

[0120] In one embodiment of the present disclosure, the encryption processing module 503 is specifically used to, for each sub-image, when the image type of the sub-image is the second type, perform Hilbert curve processing on the sub-image to obtain a one-dimensional digital sequence; perform quantization processing and inverse Hilbert curve processing on the one-dimensional digital sequence to obtain a restored sub-image, and perform quantization area marking processing on the restored sub-image; perform Hilbert curve random scrambling processing on the restored sub-image, and use the private key of the original object when logging into the first terminal device to encrypt the scrambled restored sub-image to obtain an encrypted sub-image; embed the information fragment corresponding to the sub-image in the quantization area marked in the encrypted sub-image to obtain a processed image.

[0121] In one embodiment of the present disclosure, the encryption processing module 503 is specifically used to, for each sub-image, when the image type of the sub-image is the third type or the fifth type, determine the candidate pixels in the sub-image and the predicted values ​​of the candidate pixels in combination with the rectangular prediction model; determine the prediction error value of the candidate pixel based on the pixel value and the predicted value of the candidate pixel; determine the embeddable position in the sub-image based on the prediction error value and the histogram of the candidate pixel; and embed the information fragment corresponding to the sub-image at the embeddable position of the sub-image to obtain the processed sub-image.

[0122] In one embodiment of the present disclosure, the device also includes: a third acquisition module, a fourth acquisition module, a determination module, and a fifth acquisition module; the third acquisition module is used to obtain image marking information of multiple sub-images in the image; wherein, when the image type of the sub-image is different, the type of the image marking information is different; the fourth acquisition module is used to obtain encryption marking information in the process of embedding multiple sub-images into information fragments; wherein, the encryption marking information is used to indicate the encryption method and encryption-related parameters; the determination module is used to determine the encryption-related information corresponding to the image based on the image marking information of the multiple sub-images and the encryption marking information; the fifth acquisition module is used to obtain a first target object having a specified relationship with the original object; the providing module 505 is also used to provide the encryption-related information corresponding to the image to the terminal device to which the first target object belongs, so as to instruct the SIM card of the terminal device to decrypt the received image in combination with the encryption-related information.

[0123] In the image sharing device of the disclosed embodiment, the SIM card of the first terminal device obtains the image to be shared by the original object in the communication application, multiple sub-images in the image, and the image type of the sub-image; obtains special information to be embedded in the image, and multiple information fragments in the special information; the multiple information fragments correspond to the multiple sub-images one by one; for each sub-image, according to the encryption method corresponding to the image type of the sub-image, the information fragment corresponding to the sub-image is embedded into the sub-image to obtain a processed sub-image; the multiple processed sub-images are spliced ​​to obtain a processed image; the processed image is provided to the communication application, and the communication application is instructed to share the image to the target object, so that when the processed image is shared in a group, the designated object can decrypt and obtain the special information in the image, and it is difficult for non-designated objects to obtain the special information in the image, thereby improving privacy security and improving image sharing efficiency.

[0124] Figure 6 It is a structural schematic diagram of an image sharing device according to an embodiment of the present disclosure.

[0125] like Figure 6 As shown, the image sharing device, applied to the SIM card of the second terminal device, may include: an acquisition module 601 , a determination module 602 , a decryption processing module 603 and a splicing processing module 604 .

[0126] Among them, the acquisition module 601 is used to obtain the shared image received by the target object in the communication application, and the encryption-related information corresponding to the shared image; the encryption-related information includes image marking information and encryption marking information of multiple sub-images in the shared image; the determination module 602 is used to determine the multiple sub-images in the shared image and the image type of the sub-image according to the image marking information; the decryption processing module 603 is used to decrypt each sub-image in the shared image according to the encryption method corresponding to the image type of the sub-image and the encryption marking information, and obtain the information fragment corresponding to the sub-image; the splicing processing module 604 is used to splice the information fragments corresponding to multiple sub-images to obtain the special information embedded in the shared image.

[0127] In the image sharing device of the disclosed embodiment, the SIM card of the second terminal device obtains the shared image received by the target object in the communication application, and the encryption-related information corresponding to the shared image; the encryption-related information includes image marking information and encryption marking information of multiple sub-images in the shared image; according to the image marking information, the multiple sub-images in the shared image and the image type of the sub-image are determined; for each sub-image in the shared image, according to the encryption method corresponding to the image type of the sub-image and the encryption marking information, the sub-image is decrypted to obtain the information fragment corresponding to the sub-image; the information fragments corresponding to the multiple sub-images are spliced ​​to obtain the special information embedded in the shared image, so that after the second terminal device obtains the shared image, the shared image can be decrypted in combination with the encryption-related information corresponding to the shared image to obtain the special information therein; and the terminal device that has not obtained the encryption-related information is prevented from obtaining the special information, thereby improving privacy security and improving image sharing efficiency.

[0128] According to a fifth aspect of an embodiment of the present disclosure, there is also provided an electronic device, including: a processor; and a memory for storing instructions executable by the processor, wherein the processor is configured to: implement the image sharing method as described above.

[0129] In order to implement the above embodiments, the present disclosure also proposes a storage medium.

[0130] When the instructions in the storage medium are executed by a processor, the processor is enabled to execute the image sharing method as described above.

[0131] In order to implement the above embodiments, the present disclosure also provides a computer program product.

[0132] When the computer program product is executed by a processor of an electronic device, the electronic device is enabled to execute the above method.

[0133] Figure 7 The figure is a structural block diagram of an electronic device according to an exemplary embodiment. Figure 7 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0134] like Figure 7As shown, the electronic device 1000 includes a processor 111, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 112 or a program loaded from a memory 116 to a random access memory (RAM) 113. In the RAM 113, various programs and data required for the operation of the electronic device 1000 are also stored. The processor 111, the ROM 112, and the RAM 113 are connected to each other via a bus 114. An input / output (I / O) interface 115 is also connected to the bus 114.

[0135] The following components are connected to the I / O interface 115: a memory 116 including a hard disk, etc.; and a communication part 117 including a network interface card such as a local area network (LAN) card, a modem, etc., and the communication part 117 performs communication processing via a network such as the Internet; a drive 118 is also connected to the I / O interface 115 as needed.

[0136] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 117. When the computer program is executed by the processor 111, the above-mentioned functions defined in the method of the present disclosure are executed.

[0137] In an exemplary embodiment, a storage medium including instructions is also provided, such as a memory including instructions, and the instructions can be executed by the processor 111 of the electronic device 1000 to complete the above method. Optionally, the storage medium can be a non-transitory computer-readable storage medium, for example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0138] In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0139] In addition, the word "exemplary" is used herein to indicate serving as an example, instance, or diagram. Any aspect or design described as "exemplary" in this article is not necessarily understood to be advantageous compared to other aspects or designs. On the contrary, the use of the word exemplary is intended to present concepts in a specific way. As used herein, the term "or" is intended to represent an inclusive "or" rather than an exclusive "or". That is, unless otherwise specified or clear from the context, "X applies A or B" is intended to represent any one of the natural inclusive arrangements. That is, if X applies A; X applies B; or X applies both A and B, "X applies A or B" is satisfied under any of the aforementioned examples. In addition, unless otherwise specified or clearly pointed to a singular form from the context, the articles "one" and "an" as used in this application and the appended claims are generally understood to mean "one or more".

[0140] Likewise, although the present disclosure has been shown and described with respect to one or more implementations, equivalent variations and modifications will occur to those skilled in the art after reading and understanding the specification and drawings. The present disclosure includes all such modifications and variations and is limited only by the scope of the claims. In particular, with respect to the various functions performed by the components (e.g., elements, resources, etc.) described above, unless otherwise noted, the terms used to describe such components are intended to correspond to any component (functionally equivalent) that performs the specific functions of the described components, even if the structure is not equivalent to the disclosed structure. In addition, although the specific features of the present disclosure may have been disclosed with respect to only one of several implementations, such features may be combined with one or more other features of other implementations as may be desired and conducive to any given or specific application. In addition, with respect to "including", "having", "having", "having", or variations thereof used in the specific embodiments or claims, such terms are intended to be inclusive in a manner similar to the term "comprising".

[0141] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0142] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. An image sharing method, characterized in that: A SIM card applied to a first terminal device, the method comprising: Get the image to be shared of the original object in the communication application; Dividing the image according to a first size to obtain a plurality of sub-images having the first size; For each sub-image, dividing the sub-image according to a second size to obtain a plurality of image blocks having the second size; the second size is smaller than the first size; Performing quantization encoding processing on the multiple image blocks to obtain a quantization value of each image block in the multiple image blocks, a maximum quantization value and a minimum quantization value in the multiple quantization values, and a quantization bitmap of the sub-image; Determining a quantization difference between the maximum quantization value and the minimum quantization value; Determining an image type of the sub-image according to the quantization difference, the quantization difference threshold, and the quantization bitmap; Acquire special information to be embedded in the image and a plurality of information segments in the special information; the plurality of information segments correspond to a plurality of sub-images one by one; For each sub-image, according to the encryption method corresponding to the image type of the sub-image, an information fragment corresponding to the sub-image is embedded into the sub-image to obtain a processed sub-image; Performing splicing processing on a plurality of processed sub-images to obtain a processed image; The processed image is provided to the communication application, and the communication application is instructed to share the image with a target object.

2. The method according to claim 1, characterized in that The determining the image type of the sub-image according to the quantization difference, the quantization difference threshold and the quantization bitmap includes: When the quantization difference is less than the quantization difference threshold, determining that the image type of the sub-image is a first type; When the quantization difference is greater than or equal to the quantization difference threshold, determining a first intermediate type of a first intermediate bitmap composed of a portion of the quantization bitmap having a value of 0, and a second intermediate type of a second intermediate bitmap composed of a portion of the quantization bitmap having a value of 1; In a case where there is one first type and one non-first type in the first intermediate type and the second intermediate type, determining that the image type of the sub-image is the second type; In a case where both the first intermediate type and the second intermediate type are non-first types, the image type of the sub-image is determined to be a third type.

3. The method according to claim 2, characterized in that The determining the image type of the sub-image according to the quantization difference, the quantization difference threshold and the quantization bitmap further includes: In a case where both the first intermediate type and the second intermediate type are of the first type, determining whether a first difference between a maximum pixel value and a minimum pixel value of pixels at a plurality of first position points in the first intermediate bitmap and a plurality of first position points in the sub-image is greater than a pixel difference threshold; Determine whether a second difference between a maximum pixel value and a minimum pixel value of pixels at a plurality of second position points in the second intermediate bitmap and a plurality of second position points in the sub-image is greater than the pixel difference threshold; When the first difference is less than or equal to the pixel difference threshold, or the second difference is less than or equal to the pixel difference threshold, determining that the image type of the sub-image is a fourth type; When the first difference value is greater than the pixel difference value threshold and the second difference value is greater than the pixel difference value threshold, it is determined that the image type of the sub-image is the fifth type.

4. The method according to claim 1, characterized in that: The obtaining of the special information to be embedded in the image and a plurality of information fragments in the special information includes: Obtaining special information to be embedded in the image; The special information is divided and processed according to the number of sub-images in the image to obtain multiple information fragments.

5. The method according to claim 1, characterized in that The image types include a first type, a second type, a third type, a fourth type and a fifth type; The encryption methods corresponding to the first type and the fourth type are: determining a public key and a private key according to a random prime number; encrypting the information fragment corresponding to the sub-image according to the public key; The encryption method corresponding to the second type is to encrypt the sub-image and mark the region in combination with the Hilbert curve, and embed the information fragment corresponding to the sub-image in the marked region; The encryption method corresponding to the third type and the fifth type is to determine the target position in the sub-image in combination with the rectangular prediction model, and embed the information fragment corresponding to the sub-image at the target position.

6. The method according to claim 5, characterized in that For each sub-image, according to the encryption method corresponding to the image type of the sub-image, the information fragment corresponding to the sub-image is embedded into the sub-image to obtain the processed sub-image, including: For each sub-image, when the image type of the sub-image is the first type or the fourth type, obtaining a first random prime number and a second random prime number; Determine a public key and a private key according to the first random prime number, the second random prime number and a key calculation formula; According to the public key, encrypting the information fragment corresponding to the sub-image to obtain an encrypted information fragment; The encrypted information fragment is embedded into the sub-image to obtain a processed sub-image.

7. The method according to claim 5, characterized in that For each sub-image, according to the encryption method corresponding to the image type of the sub-image, the information fragment corresponding to the sub-image is embedded into the sub-image to obtain the processed sub-image, including: For each sub-image, when the image type of the sub-image is the second type, performing Hilbert curve processing on the sub-image to obtain a one-dimensional digital sequence; Performing quantization processing and inverse Hilbert curve processing on the one-dimensional digital sequence to obtain a restored sub-image, and performing quantization region marking processing on the restored sub-image; Performing Hilbert curve random scrambling processing on the restored sub-image, and using the private key of the original object when logging into the first terminal device, encrypting the restored sub-image after the scrambling processing to obtain an encrypted sub-image; The information fragment corresponding to the sub-image is embedded in the quantized region marked in the encrypted sub-image to obtain a processed image.

8. The method according to claim 5, characterized in that For each sub-image, according to the encryption method corresponding to the image type of the sub-image, the information fragment corresponding to the sub-image is embedded into the sub-image to obtain the processed sub-image, including: For each sub-image, when the image type of the sub-image is the third type or the fifth type, determining candidate pixels in the sub-image and predicted values ​​of the candidate pixels in combination with a rectangular prediction model; Determining a prediction error value of the candidate pixel point according to the pixel value and the prediction value of the candidate pixel point; Determining an embeddable position in the sub-image according to the prediction error value and the histogram of the candidate pixel point; The information fragment corresponding to the sub-image is embedded in the embeddable position of the sub-image to obtain a processed sub-image.

9. The method according to any one of claims 1 to 8, characterized in that The method further comprises: Acquire image tag information of a plurality of sub-images in the image; wherein when the image types of the sub-images are different, the types of the image tag information are different; Acquiring encryption mark information in the process of embedding multiple sub-images into information fragments; wherein the encryption mark information is used to indicate an encryption method and encryption-related parameters; Determining encryption-related information corresponding to the image according to the image marking information of the plurality of sub-images and the encryption marking information; Acquire a first target object having a specified relationship with the original object; The encryption-related information corresponding to the image is provided to the terminal device to which the first target object belongs, so as to instruct the SIM card of the terminal device to decrypt the received image in combination with the encryption-related information.

10. An image sharing method, characterized in that: A SIM card applied to a second terminal device, the method comprising: Acquire a shared image received by a target object in a communication application, and encryption-related information corresponding to the shared image; the encryption-related information includes image tag information and encryption tag information of multiple sub-images in the shared image; Determining, according to the image tag information, a plurality of sub-images in the shared image and image types of the sub-images; For each sub-image in the shared image, decrypt the sub-image according to the encryption method corresponding to the image type of the sub-image and the encrypted mark information to obtain the information fragment corresponding to the sub-image; Splicing the information fragments corresponding to the multiple sub-images to obtain the special information embedded in the shared image; The multiple sub-images in the shared image and the image types of the sub-images are obtained from the SIM card of the terminal device that shares the shared image in the following manner: Get the image to be shared of the original object in the communication application; Dividing the image according to a first size to obtain a plurality of sub-images having the first size; For each sub-image, dividing the sub-image according to a second size to obtain a plurality of image blocks having the second size; the second size is smaller than the first size; Performing quantization encoding processing on the multiple image blocks to obtain a quantization value of each image block in the multiple image blocks, a maximum quantization value and a minimum quantization value in the multiple quantization values, and a quantization bitmap of the sub-image; Determining a quantization difference between the maximum quantization value and the minimum quantization value; The image type of the sub-image is determined according to the quantization difference, the quantization difference threshold and the quantization bitmap.

11. An image sharing device, characterized in that: A SIM card applied to a first terminal device, the device comprising: A first acquisition module is used to acquire an image to be shared by an original object in a communication application, a plurality of sub-images in the image, and image types of the sub-images; A second acquisition module is used to acquire the special information to be embedded in the image and a plurality of information fragments in the special information; the plurality of information fragments correspond to the plurality of sub-images one by one; An encryption processing module, for embedding, for each sub-image, an information fragment corresponding to the sub-image into the sub-image according to an encryption method corresponding to the image type of the sub-image, to obtain a processed sub-image; A splicing processing module, used for splicing a plurality of processed sub-images to obtain a processed image; A providing module, configured to provide the processed image to the communication application, and instruct the communication application to share the image to a target object; The first acquisition module is specifically used for: Get the image to be shared of the original object in the communication application; Dividing the image according to a first size to obtain a plurality of sub-images having the first size; For each sub-image, dividing the sub-image according to a second size to obtain a plurality of image blocks having the second size; the second size is smaller than the first size; Performing quantization encoding processing on the multiple image blocks to obtain a quantization value of each image block in the multiple image blocks, a maximum quantization value and a minimum quantization value in the multiple quantization values, and a quantization bitmap of the sub-image; Determining a quantization difference between the maximum quantization value and the minimum quantization value; The image type of the sub-image is determined according to the quantization difference, the quantization difference threshold and the quantization bitmap.

12. An image sharing device, characterized in that: A SIM card applied to a second terminal device, the device comprising: An acquisition module, used to acquire a shared image received by a target object in a communication application, and encryption-related information corresponding to the shared image; the encryption-related information includes image tag information and encryption tag information of multiple sub-images in the shared image; a determination module, configured to determine a plurality of sub-images in the shared image and image types of the sub-images according to the image tag information; a decryption processing module, configured to decrypt each sub-image in the shared image according to the encryption method corresponding to the image type of the sub-image and the encrypted mark information, and obtain the information fragment corresponding to the sub-image; A splicing processing module, used for splicing information fragments corresponding to multiple sub-images to obtain special information embedded in the shared image; The multiple sub-images in the shared image and the image types of the sub-images are obtained from the SIM card of the terminal device that shares the shared image in the following manner: Get the image to be shared of the original object in the communication application; Dividing the image according to a first size to obtain a plurality of sub-images having the first size; For each sub-image, dividing the sub-image according to a second size to obtain a plurality of image blocks having the second size; the second size is smaller than the first size; Performing quantization encoding processing on the multiple image blocks to obtain a quantization value of each image block in the multiple image blocks, a maximum quantization value and a minimum quantization value in the multiple quantization values, and a quantization bitmap of the sub-image; Determining a quantization difference between the maximum quantization value and the minimum quantization value; The image type of the sub-image is determined according to the quantization difference, the quantization difference threshold and the quantization bitmap.

13. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; Wherein, the processor is configured to: Implement the steps of the image sharing method as claimed in any one of claims 1 to 10. 14 . A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor, enables the processor to perform the image sharing method according to any one of claims 1 to 10.