Data transmission method, device, electronic device and storage medium

By using encrypted image determination keys in data transmission, the problem of low data transmission security is solved, and high-strength data encryption and secure transmission are achieved.

CN114978500BActive Publication Date: 2025-04-11CHINA TELECOM CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210550289.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-20
Publication Date
2025-04-11
Estimated Expiration
2042-05-20

AI Technical Summary

Technical Problem

During data transmission, the data security of the prior art is low and data leakage is prone to occur, which seriously affects the security of user information.

Method used

By acquiring the original data and image information, an encrypted image is randomly generated based on the pre-stored image generation information and image information, the original data is encrypted according to the encrypted image determination key, encrypted data, and the image information and encrypted data are sent to the second terminal.

Benefits of technology

High-strength encryption of the original data is achieved, the security of encrypted data is improved, and the security of data transmission is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114978500B_ABST
    Figure CN114978500B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a data transmission method, device, electronic device and storage medium, the method comprising: obtaining original data and image information; randomly generating an encrypted image according to pre-stored image generation information and image information; encrypting the original data according to a key to obtain encrypted data; determining the key according to the encrypted image; and sending the image information and the encrypted data to a second terminal. According to the embodiment of the present application, the security of data transmission can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of Internet technology, and in particular, relates to data transmission methods, devices, electronic devices and storage media. Background Art

[0002] With the rapid development of information technology and the Internet, information security on the Internet has become particularly important. Especially during data transmission, data leakage often occurs, seriously affecting the security of user information.

[0003] Therefore, there is a great need for a method that can enhance data security during data transmission. Summary of the invention

[0004] The embodiments of the present application provide a data transmission method, device, electronic device and storage medium, which can solve the problem of low data transmission security.

[0005] In a first aspect, an embodiment of the present application provides a data transmission method, applied to a first terminal, the method comprising:

[0006] Obtain raw data and image information;

[0007] randomly generating an encrypted image according to pre-stored image generation information and image information;

[0008] The original data is encrypted according to the key to obtain encrypted data; the key is determined according to the encrypted image;

[0009] The image information and the encrypted data are sent to the second terminal.

[0010] Optionally, the image generation information includes first generation information and second generation information, and randomly generating an encrypted image according to the pre-stored image generation information and image information includes:

[0011] Based on the first generation information, generate a first image according to the image information;

[0012] Based on the second generation information, the first image is encrypted to randomly generate an encrypted image.

[0013] Optionally, based on the second generated information, encrypting the first image to randomly generate an encrypted image includes:

[0014] Based on the second generation information, at least a partial area in the first image is eliminated to generate an encrypted image.

[0015] Optionally, the image information includes a second image, and randomly generating an encrypted image according to pre-stored image generation information and image information includes:

[0016] Based on the image generation information, at least a partial area in the second image is eliminated to generate an encrypted image.

[0017] Optionally, the encrypted image includes at least one image element, and before encrypting the original data according to the key to obtain the encrypted data, the method further includes:

[0018] extracting at least one subkey from the encrypted image based on at least one image element;

[0019] A key is generated based on at least one subkey.

[0020] In a second aspect, an embodiment of the present application provides a data transmission method, which is applied to a second terminal, and the method includes:

[0021] receiving image information and encrypted data sent by the first terminal;

[0022] Generate a decrypted image based on pre-stored image generation information and image information;

[0023] Extract the key from the decrypted image;

[0024] The encrypted data is decrypted according to the key to obtain the original data.

[0025] Optionally, receiving the image information and encrypted data sent by the first terminal includes:

[0026] receiving the encrypted image, image information and encrypted data sent by the first terminal;

[0027] Extract the key from the encrypted image, including:

[0028] In the event that the encrypted image matches the decrypted image, the key is extracted from the decrypted image.

[0029] In a third aspect, an embodiment of the present application provides a data transmission device, which is applied to a first terminal, and the data transmission device includes:

[0030] An acquisition module, used to acquire raw data and image information;

[0031] A first generating module, used for randomly generating an encrypted image according to pre-stored image generation information and image information;

[0032] An encryption module is used to encrypt the original data according to a key to obtain encrypted data; the key is determined according to the encrypted image;

[0033] The sending module is used to send the image information and the encrypted data to the second terminal.

[0034] In a fourth aspect, an embodiment of the present application provides a data transmission device, which is applied to a second terminal, and the data transmission device includes:

[0035] A receiving module, used for receiving image information and encrypted data sent by the first terminal;

[0036] A second generating module, used to generate a decrypted image according to pre-stored image generation information and image information;

[0037] An extraction module, used for extracting a key from a decrypted image;

[0038] The decryption module is used to decrypt the encrypted data according to the key to obtain the original data.

[0039] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, it implements the method in the first aspect or any possible implementation of the first aspect.

[0040] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by a processor, the method in the first aspect or any possible implementation of the first aspect is implemented.

[0041] In the embodiment of the present application, by acquiring the original data and image information, an encrypted image is randomly generated according to the pre-stored image generation information and image information, and the original data is encrypted according to the key to obtain encrypted data, wherein the key is determined according to the encrypted image. Since the encrypted image is randomly generated, that is, the encrypted image has high randomness, the randomness of the key determined according to the encrypted image is also high. The encrypted data obtained by encrypting the original data according to the strong random key can realize high-intensity encryption of the original data and improve the security of the encrypted data. Finally, the image information and the highly secure encrypted data are sent to the second terminal, which can improve the security of data transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0043] Figure 1 is a flow chart of a data transmission method provided in an embodiment of the present application;

[0044] Figure 2 is a schematic diagram of a first image provided in an embodiment of the present application;

[0045] Figure 3 is a schematic diagram of randomly generating an encrypted image provided by an embodiment of the present application;

[0046] Figure 4 is a schematic diagram of an encrypted image provided by an embodiment of the present application;

[0047] Figure 5 is a flow chart of another data transmission method provided by an embodiment of the present application;

[0048] Figure 6 It is a structural schematic diagram of a data transmission device provided in an embodiment of the present application;

[0049] Figure 7 is a structural schematic diagram of another data transmission device provided in an embodiment of the present application;

[0050] Figure 8 It is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0051] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only configured to explain the present application and are not configured to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.

[0052] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0053] The data transmission method provided in the embodiment of the present application can be applied to at least the following application scenarios, which are described below.

[0054] With the rapid development of the Internet, it has become an important part of people's life, work and entertainment. Information security on the Internet has also become particularly important. Especially during data transmission, data leakage often occurs, seriously affecting the security of user information.

[0055] Based on the above scenario, this application provides a data transmission method, which is described below:

[0056] Figure 1 It is a flow chart of a data transmission method provided in an embodiment of the present application.

[0057] like Figure 1 As shown, the data transmission method may include steps 110 to 140, and the method is applied to the first terminal, as shown below:

[0058] Step 110, obtaining original data and image information.

[0059] Step 120: randomly generate an encrypted image based on pre-stored image generation information and image information.

[0060] Step 130, encrypting the original data according to the key to obtain encrypted data; the key is determined according to the encrypted image.

[0061] Step 140: Send the image information and the encrypted data to the second terminal.

[0062] In the embodiment of the present application, by acquiring the original data and image information, an encrypted image is randomly generated according to the pre-stored image generation information and image information, and the original data is encrypted according to the key to obtain encrypted data, wherein the key is determined according to the encrypted image. Since the encrypted image has high randomness, the randomness of the key determined according to the encrypted image is also high. The encrypted data obtained by encrypting the original data according to the strong random key can realize high-intensity encryption of the original data and improve the security of the encrypted data. Finally, the image information and the highly secure encrypted data are sent to the second terminal, which can improve the security of data transmission.

[0063] The contents of step 110 to step 140 are described below respectively:

[0064] This involves step 110 .

[0065] Get raw data and image information.

[0066] The original data is the data that the first terminal is going to transmit to the second terminal.

[0067] The image information is used to describe the characteristics of the image, that is, the image can be generated according to the image information. The image information may include: image size and image element information, wherein the image element information includes: the number of image elements, shape characteristics of image elements and color characteristics of image elements.

[0068] For example, the image information may include: two random numbers X and Y, where X and Y are used to represent the image size, where X is the length of a horizontal column and Y is the length of a vertical column. Figure 2 shown.

[0069] The image information may also include a random number Z, which is used to represent the image element information. The number of Z values ​​is the product of X and Y. For example, if X is 3 and Y is 2, the number of Z values ​​is 6.

[0070] For example, Z=(1, 2, 3, 4, 5, 6), and its values ​​represent the colors of the image elements to be randomly acquired, namely, red, orange, yellow, green, blue, and purple, that is, the image element information of the first image element is red, the image element information of the second image element is orange, and so on.

[0071] In addition, the image element information may also include shape features, such as triangle, rectangle, and circle.

[0072] This involves step 120 .

[0073] An encrypted image is randomly generated based on pre-stored image generation information and image information.

[0074] The image generation information is information pre-agreed between the first terminal and the second terminal, and the image generation information is used to describe a generation method of the encrypted image.

[0075] In a possible embodiment, the image generation information includes first generation information and second generation information. Step 120 may specifically include the following steps:

[0076] Based on the first generation information, generate a first image according to the image information;

[0077] Based on the second generation information, the first image is encrypted to randomly generate an encrypted image.

[0078] The first generation information may be used to describe the arrangement of the encrypted image. For example, the first generation information may include: forward arrangement, forward serpentine arrangement, reverse serpentine arrangement, serpentine arrangement, etc. Figure 2 As shown, Figure 2 is the first image generated by the forward serpentine arrangement.

[0079] The first generation information is information pre-agreed between the first terminal and the second terminal, and the first generation information is used to describe a generation method of the first image.

[0080] The second generation information can be used to describe the elimination method of the first image. For example, the second generation information may include: three identical image elements adjacent in a horizontal or vertical column form a straight line elimination, three identical image elements form a triangle elimination, and three identical image elements adjacent in a diagonal direction form a straight line elimination.

[0081] The second generation information can also be used to describe the adjustment method of the first image. For example, the second generation information may include: three identical image elements adjacent in horizontal or vertical columns are replaced with preset image elements, three identical image elements forming a triangle are replaced with preset image elements, and three identical image elements adjacent diagonally are replaced with preset image elements.

[0082] The “three” identical image elements mentioned above are only exemplary descriptions and may also be other positive integers.

[0083] Thus, based on the first generation information pre-agreed between the first terminal and the second terminal, a first image with strong security can be generated according to the image information, and then based on the second generation information, the first image is encrypted to generate an encrypted image with strong randomness.

[0084] Taking adjacent oblique lines elimination as an example, at least a portion of the area to be eliminated in the first image can be as follows: Figure 3 As shown; the encrypted image obtained by eliminating adjacent diagonal lines is as follows Figure 4 shown.

[0085] The above-mentioned step of encrypting the first image based on the second generated information to randomly generate an encrypted image may specifically include the following steps:

[0086] Based on the second generation information, at least a partial area in the first image is eliminated to generate an encrypted image.

[0087] The second generated information is information pre-agreed between the first terminal and the second terminal, and the second generated information is used to describe a method of eliminating at least a partial area of ​​the first image.

[0088] Based on the second generation information, at least a partial area in the first image is eliminated to randomly generate an encrypted image, wherein after the elimination process, positions of other image elements in the first image except for at least a partial area remain unchanged.

[0089] For example, the first image may be Figure 3 As shown; the second generated information may be that three adjacent identical straight lines are eliminated diagonally. The encrypted image obtained by eliminating at least a portion of the first image based on the second generated information may be as follows Figure 4 shown.

[0090] If the second generation information is not obtained in advance, the partial area cannot be determined from the first image. Therefore, at least a partial area determined from the first image based on the second generation information is random, and the encrypted image generated by eliminating at least a partial area in the first image is also random, that is, the encrypted image is randomly generated.

[0091] Therefore, based on the second generation information, at least a partial area in the first image is eliminated to randomly generate an encrypted image, thereby ensuring the diversity and randomness of the encrypted image.

[0092] In a possible embodiment, the image information includes the second image, and step 120 may specifically include the following steps:

[0093] Based on the image generation information, at least a partial area in the second image is eliminated to generate an encrypted image.

[0094] The image information may include the second image, that is, at least a part of the second image may be eliminated directly based on the image generation information to randomly generate an encrypted image.

[0095] Among them, the image generation information can be used to describe the elimination method of the second image. For example, the second generation information may include: three identical image elements adjacent in horizontal or vertical columns form a straight line elimination, three identical image elements form a triangle elimination, and three identical image elements adjacent in diagonal directions form a straight line elimination.

[0096] The image generation information can also be used to describe the adjustment method of the second image. For example, the second generation information may include: three identical image elements adjacent in horizontal or vertical columns are replaced with preset image elements, three identical image elements forming a triangle are replaced with preset image elements, and three identical image elements adjacent diagonally are replaced with preset image elements.

[0097] For example, the second image may be Figure 3 As shown, the image generation information may be: three adjacent identical straight lines are eliminated diagonally; based on the image generation information, at least a portion of the second image is eliminated to obtain an encrypted image such as Figure 4 shown.

[0098] Therefore, based on the image generation information, at least a partial area in the second image is eliminated to randomly generate an encrypted image, thereby ensuring the diversity and randomness of the encrypted image.

[0099] This involves step 130 .

[0100] The original data is encrypted according to the key to obtain encrypted data; the key is determined according to the encrypted image.

[0101] The key can be determined by determining the order of appearance of each type of image element in the generated encrypted image and the number of appearances of each type of image element, and then encrypting the original data according to the key to obtain encrypted data.

[0102] Here, since the key is determined based on the encrypted image, the encrypted image determined based on the above steps has high randomness, so the randomness of the key determined based on the encrypted image is also high. The encrypted data obtained by encrypting the original data according to the strong random key can achieve highly random encryption of the original data, thereby improving the security of the encrypted data.

[0103] In a possible embodiment, the encrypted image includes at least one image element. Before step 130, the method further includes:

[0104] extracting at least one subkey from the encrypted image based on at least one image element;

[0105] A key is generated based on at least one subkey.

[0106] The image elements may be graphics, characters, and marks, etc.

[0107] Among them, the above-mentioned step of extracting at least one sub-key from the encrypted image based on at least one image element can specifically include the following steps: determining the order of appearance of each type of image elements in the encrypted image, and determining the number of appearances of each type of image elements, and determining the sub-key based on the order of appearance and the number of appearances.

[0108] Among them, the above-mentioned step of extracting at least one sub-key from the encrypted image based on at least one image element may also specifically include the following steps: determining the order of appearance of target image elements, the number of appearances of the target image elements is greater than a first preset threshold, or the number of appearances of the target image elements is less than a second preset threshold, and determining the sub-key based on the order of appearance of the target image elements.

[0109] For example, Figure 4 The red ball appeared first, and it appeared 13 times; the yellow ball appeared second, and it appeared 13 times; the green ball appeared third, and it appeared 13 times; the blue ball appeared fourth, and it appeared 27 times; and the purple ball appeared fifth, and it appeared 11 times.

[0110] The subkeys can be: 1×13, 2×13, 3×13, 4×27 and 5×11.

[0111] The step of generating a key according to at least one subkey may specifically include: performing concatenation processing on at least one subkey to obtain a key, namely, 13263910855.

[0112] In addition, other encryption operations may be performed on at least one subkey to generate a key, such as using a hash algorithm or compiling the subkey.

[0113] This involves step 140 .

[0114] The image information and the encrypted data are sent to the second terminal.

[0115] Specifically, the image information (X, Y and Z) may be encapsulated into an array as a request parameter and sent to the second terminal together with the encrypted data.

[0116] In the embodiment of the present application, by acquiring the original data and image information, an encrypted image is randomly generated according to the pre-stored image generation information and image information, and the original data is encrypted according to the key to obtain encrypted data, wherein the key is determined according to the encrypted image. Since the encrypted image has high randomness, the randomness of the key determined according to the encrypted image is also high. The encrypted data obtained by encrypting the original data according to the strong random key can realize high-intensity encryption of the original data and improve the security of the encrypted data. Finally, the image information and the highly secure encrypted data are sent to the second terminal, which can improve the security of data transmission.

[0117] Figure 5 It is a flow chart of a data transmission method provided in an embodiment of the present application.

[0118] like Figure 5 As shown, the data transmission method may include steps 510 to 540, and the method is applied to the second terminal, as shown below:

[0119] Step 510, receiving image information and encrypted data sent by the first terminal;

[0120] Step 520: Generate a decrypted image based on pre-stored image generation information and image information.

[0121] Step 530, extracting the key from the decrypted image.

[0122] Step 540: decrypt the encrypted data according to the key to obtain the original data.

[0123] In the embodiment of the present application, by receiving the image information and encrypted data sent by the first terminal, since the encrypted data is obtained by encrypting the original data according to the strong random key, the key is extracted from the decrypted image generated according to the pre-stored image generation information and the image information, here, only the terminal allowed to decrypt can generate a valid decrypted image, and only the terminal allowed to decrypt can extract the key from the decrypted image. The security of the key can be guaranteed, and thus, the encrypted data is decrypted according to the key, and the security of the original data can be guaranteed.

[0124] The contents of step 510 to step 540 are described below respectively:

[0125] Involves step 510.

[0126] Receive the image information and encrypted data sent by the first terminal.

[0127] The first two digits of the image information represent X, and the last two digits represent Y. For example, the image information is 1010, that is, X=10, Y=10. At the same time, the encrypted image sent by the first terminal is received.

[0128] In a possible embodiment, step 510 may specifically include the following steps:

[0129] receiving the encrypted image, image information and encrypted data sent by the first terminal;

[0130] Accordingly, step 530 may specifically include the following steps:

[0131] In the event that the encrypted image matches the decrypted image, the key is extracted from the decrypted image.

[0132] By comparing the encrypted image with the decrypted image, it is determined whether the verification is passed. Specifically, it is necessary to compare the position of the image elements, the shape of the image elements, and the color of the image elements.

[0133] If the encrypted image is exactly the same as the decrypted image, the verification is successful and the next step is to extract the key from the decrypted image.

[0134] If the encrypted image is different from the decrypted image, it means that the verification fails and the subsequent data processing steps are abandoned.

[0135] Here, the reason for the encrypted image and the decrypted image may be that the image information sent by the first terminal is different from the image information received by the second terminal, or the image generation information stored in the first terminal is different from the image generation information stored in the second terminal, or the method of extracting the key from the image information is different. If the encrypted image is different from the decrypted image, it means that the verification fails, and the subsequent steps are stopped at this time, which can reduce the amount of data processing and ensure data security.

[0136] Involves step 520.

[0137] A decrypted image is generated based on pre-stored image generation information and image information.

[0138] Specifically, a third image is generated according to the first generation information and the image information, and then a partial area in the third image is eliminated according to the second generation information to generate a decrypted image.

[0139] Involves step 530 .

[0140] Extract the key from the decrypted image.

[0141] The key can be determined by determining a first value of the number of times each type of image element of the generated encrypted image appears and a second value of the number of times each type of image element appears, and then the key is determined according to the first value and the second data. The original data is encrypted according to the key to obtain the encrypted data.

[0142] Involves step 540.

[0143] The encrypted data is decrypted according to the key to obtain the original data.

[0144] Here, the encrypted data is obtained by encrypting the original data according to a strongly random key. Here, a valid key can be obtained through the above steps, which can ensure that the encrypted data is only decrypted by a terminal that is allowed to decrypt, thereby ensuring the security of the original data.

[0145] In the embodiment of the present application, by receiving the image information and encrypted data sent by the first terminal, since the encrypted data is obtained by encrypting the original data according to the strong random key, the key is extracted from the decrypted image generated according to the pre-stored image generation information and the image information, here, only the terminal allowed to decrypt can generate a valid decrypted image, and only the terminal allowed to decrypt can extract the key from the decrypted image. The security of the key can be guaranteed, and thus, the encrypted data is decrypted according to the key, and the security of the original data can be guaranteed.

[0146] Based on the above Figure 1 The data transmission method shown in the embodiment of the present application also provides a data transmission device, which is applied to a first terminal, such as Figure 6 As shown, the data transmission device 600 may include:

[0147] The acquisition module 610 is used to acquire original data and image information.

[0148] The first generating module 620 is used to randomly generate an encrypted image according to pre-stored image generation information and image information.

[0149] The encryption module 630 is used to encrypt the original data according to the key to obtain encrypted data; the key is determined according to the encrypted image.

[0150] The sending module 640 is used to send the image information and the encrypted data to the second terminal.

[0151] In a possible embodiment, the first generating module 620 is specifically configured to:

[0152] Based on the first generation information, generate a first image according to the image information;

[0153] Based on the second generation information, the first image is encrypted to randomly generate an encrypted image.

[0154] In a possible embodiment, the first generating module 620 is specifically configured to:

[0155] Based on the second generation information, at least a partial area in the first image is eliminated to generate an encrypted image.

[0156] In a possible embodiment, the image information includes a second image, and the first generating module 620 is specifically configured to:

[0157] Based on the image generation information, at least a partial area in the second image is eliminated to generate an encrypted image.

[0158] In a possible embodiment, the encrypted image includes at least one image element, and the data transmission device 600 may further include:

[0159] The key generation module is used to: extract at least one subkey from the encrypted image according to at least one image element; and generate a key according to the at least one subkey.

[0160] In the embodiment of the present application, by acquiring the original data and image information, an encrypted image is randomly generated according to the pre-stored image generation information and image information, and the original data is encrypted according to the key to obtain the encrypted data, wherein the key is determined according to the encrypted image. Since the encrypted image has high randomness, the randomness of the key determined according to the encrypted image is also high. The encrypted data obtained by encrypting the original data according to the strong random key can achieve high-intensity encryption of the original data and improve the security of the encrypted data. Finally, the image information and the highly secure encrypted data are sent to the second terminal, which can improve the security of data transmission.

[0161] Based on the above Figure 5 The data transmission method shown in the embodiment of the present application also provides a data transmission device, which is applied to a second terminal, such as Figure 7As shown, the data transmission device 700 may include:

[0162] The receiving module 710 is used to receive the image information and encrypted data sent by the first terminal.

[0163] The second generating module 720 is used to generate a decrypted image according to pre-stored image generation information and image information.

[0164] The extraction module 730 is used to extract the key from the decrypted image.

[0165] The decryption module 740 is used to decrypt the encrypted data according to the key to obtain the original data.

[0166] In a possible embodiment, the receiving module 710 is specifically configured to receive an encrypted image, image information, and encrypted data sent by the first terminal.

[0167] The extraction module 730 is specifically used for:

[0168] In the event that the encrypted image matches the decrypted image, the key is extracted from the decrypted image.

[0169] In the embodiment of the present application, by receiving the image information and encrypted data sent by the first terminal, since the encrypted data is obtained by encrypting the original data according to the strong random key, the key is extracted from the decrypted image generated according to the pre-stored image generation information and the image information, here, only the terminal allowed to decrypt can generate a valid decrypted image, and only the terminal allowed to decrypt can extract the key from the decrypted image. The security of the key can be guaranteed, and thus, the encrypted data is decrypted according to the key, and the security of the original data can be guaranteed.

[0170] Figure 8 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.

[0171] The electronic device may include a processor 801 and a memory 802 storing computer program instructions.

[0172] Specifically, the processor 801 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0173] The memory 802 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 802 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 802 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 802 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 802 is a non-volatile solid-state memory. In a specific embodiment, the memory 802 includes a read-only memory (ROM). In appropriate cases, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM) or a flash memory or a combination of two or more of these.

[0174] The processor 801 implements any one of the data transmission methods in the embodiments shown in the figure by reading and executing the computer program instructions stored in the memory 802.

[0175] In one example, the electronic device may further include a communication interface 803 and a bus 810. Figure 8 As shown, the processor 801, the memory 802, and the communication interface 803 are connected via a bus 810 and communicate with each other.

[0176] The communication interface 803 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.

[0177] Bus 810 includes hardware, software or both, and the parts of electronic equipment are coupled to each other.For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 810 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application considers any suitable bus or interconnection.

[0178] The electronic device can execute the data transmission method in the embodiment of the present application, thereby realizing the combination Figure 1 Describes the data transfer method.

[0179] In addition, in combination with the data transmission method in the above embodiment, the embodiment of the present application can provide a computer-readable storage medium to implement. The computer-readable storage medium stores computer program instructions; when the computer program instructions are executed by the processor, the Figure 1 data transmission method.

[0180] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.

[0181] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0182] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.

[0183] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.

Claims

1. A data transmission method, characterized in that: Applied to a first terminal, the method includes: Obtain raw data and image information; Randomly generate an encrypted image according to pre-stored image generation information and the image information; the image generation information includes first generation information and second generation information, the first generation information is used to describe the arrangement method of the encrypted image, based on the first generation information, a first image is generated according to the image information; the second generation information is used to describe the elimination method of the first image, and the second generation information is also used to describe the adjustment method of the first image; Determining the order of appearance of each type of image element in the generated encrypted image, and determining the number of appearances of each type of image element; Determine the key based on the order and number of occurrences; Encrypting the original data according to a key to obtain encrypted data; the key is determined according to the encrypted image; The image information and the encrypted data are sent to a second terminal.

2. The method according to claim 1, characterized in that The randomly generating an encrypted image according to the pre-stored image generation information and the image information includes: encrypting the first image based on the second generation information to randomly generate the encrypted image.

3. The method according to claim 2, characterized in that The step of encrypting the first image based on the second generated information to randomly generate the encrypted image includes: Based on the second generation information, at least a partial area in the first image is eliminated to generate the encrypted image.

4. The method according to claim 1, characterized in that: The image information includes a second image, and the step of randomly generating an encrypted image according to pre-stored image generation information and the image information includes: Based on the image generation information, at least a partial area in the second image is eliminated to generate the encrypted image.

5. The method according to claim 1, characterized in that The encrypted image includes at least one image element. Before encrypting the original data according to the key to obtain the encrypted data, the method further includes: extracting at least one subkey from the encrypted image based on the at least one image element; The key is generated based on the at least one subkey.

6. A data transmission method, characterized in that: Applied to the second terminal, the method includes: receiving image information and encrypted data sent by the first terminal; Generate a decrypted image according to pre-stored image generation information and the image information; the image generation information includes first generation information and second generation information, the first generation information is used to describe the arrangement of the decrypted image, generate a third image according to the first generation information and the image information, and then eliminate a part of the third image according to the second generation information to generate a decrypted image; Determining the order of appearance of each type of image element in the generated decrypted image, and determining the number of appearances of each type of image element; Determine the key based on the order and number of occurrences; extracting a key from the decrypted image; Decrypting the encrypted data according to the key to obtain original data; The receiving of the image information and the encrypted data sent by the first terminal includes: receiving the encrypted image, the image information and the encrypted data sent by the first terminal; The step of extracting a key from the decrypted image comprises: In the event that the encrypted image matches the decrypted image, the key is extracted from the decrypted image.

7. A data transmission device, characterized in that: Applied to a first terminal, the data transmission device comprises: An acquisition module, used to acquire raw data and image information; A first generating module, configured to randomly generate an encrypted image according to pre-stored image generating information and the image information; the image generating information includes first generating information and second generating information, the first generating information is used to describe an arrangement method of the encrypted image, and based on the first generating information, a first image is generated according to the image information; the second generating information is used to describe an elimination method of the first image, and the second generating information is also used to describe an adjustment method of the first image; A determination module, used to determine the order of appearance of each type of image element in the generated encrypted image, and to determine the number of appearances of each type of image element; The determination module is further used to determine the key according to the order of occurrence and the number of occurrences; An encryption module, used for encrypting the original data according to a key to obtain encrypted data; the key is determined according to the encrypted image; The sending module is used to send the image information and the encrypted data to the second terminal.

8. A data transmission device, characterized in that: Applied to the second terminal, the data transmission device includes: A receiving module, used for receiving image information and encrypted data sent by the first terminal; A second generating module is used to generate a decrypted image according to pre-stored image generating information and the image information; the image generating information includes first generating information and second generating information, the first generating information is used to describe the arrangement mode of the decrypted image, a third image is generated according to the first generating information and the image information, and then a partial area in the third image is eliminated according to the second generating information to generate a decrypted image; A determination module, used to determine the order of appearance of each type of image element in the generated decrypted image, and to determine the number of appearances of each type of image element; The determination module is further used to determine the key according to the order of occurrence and the number of occurrences; An extraction module, used for extracting a key from the decrypted image; A decryption module, used to decrypt the encrypted data according to the key to obtain the original data; The receiving module is specifically used for: receiving the encrypted image, the image information and the encrypted data sent by the first terminal; The extraction module is specifically used for: In the event that the encrypted image matches the decrypted image, the key is extracted from the decrypted image.

9. An electronic device, characterized in that: The electronic device comprises: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the method according to any one of claims 1 to 6 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Face image biological key generating method

    CN103886235A

  • Image processing method, client equipment, image verification method and server

    CN105429959A