Image transmission method and device, storage medium and program product

By performing matrix transformation and sorting reset methods on image data, the problems of data leakage and server downtime in the prior art are solved, and efficient and secure image data transmission is achieved.

CN119484720AActive Publication Date: 2025-02-18AGRICULTURAL BANK OF CHINA
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411709311.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-02-18
Estimated Expiration
2044-11-26

AI Technical Summary

Technical Problem

Existing Internet transmission technology poses a risk of data leakage for plain text transmission of image data, and existing encryption solutions will cause time loss and excessive storage space when processing large-scale image data, resulting in server downtime during peak hours.

Method used

By performing matrix transformation and sorting reset of each pixel in the original image matrix, a random matrix and sorting value mapping table is generated, thereby realizing the encryption processing of image data. The method includes obtaining a random matrix and a sorted value mapping table from the server, transforming the original image based on the random matrix, obtaining an intermediate matrix, and replacing the pixel values ​​in the intermediate matrix based on the sorted value mapping table to obtain an encrypted image.

Benefits of technology

This reduces the data processing volume of image data during encryption, improves the security of image data during plain text transmission, and avoids the risk of server downtime due to processing large amounts of image data during peak periods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119484720A_ABST
    Figure CN119484720A_ABST
Patent Text Reader

Abstract

The invention discloses an image transmission method and device, a storage medium and a program product. The method comprises the following steps: acquiring a predetermined random matrix and a sequencing value mapping table from a server; transforming the original image matrix based on the random matrix to obtain an intermediate matrix; and finally, replacing each pixel value in the intermediate matrix based on the sorting value mapping table to obtain an encrypted image. According to the technical scheme, the encryption processing of the original image is realized by performing matrix transformation and sorting resetting on each pixel in the original image matrix, so that the data processing amount of the image data in the encryption process is reduced, and the security of the image data in the plaintext transmission process is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to an image transmission method, device, storage medium and program product. Background Art

[0002] In recent years, with the rapid development of computer technology, the financial sector is gradually promoting digital transformation, using the Internet as a carrier to provide the society with convenient and high-quality financial services. In the process of financial transactions, it is inevitable that the client and the server need to exchange and transmit highly private data through the Internet, such as deposits, bills, ID card images, facial images, etc.

[0003] Since the existing Internet transmission technology uses plain text transmission, if the transmitted data is not encrypted, attackers may intercept private information through illegal means such as message capture, which brings serious data leakage risks to users. For data in a single field such as account number and password, since its length is generally fixed and the number of bits is not large, the existing encryption scheme can be used for processing. However, for image data with a large amount of data, using encryption schemes to process image data will cause serious time loss and occupy a large storage space. Especially during peak trading hours, when a large amount of image data is transmitted to the server at the same time, the server will be unable to process a large number of transactions in a short period of time, resulting in downtime, which will have a serious impact.

[0004] Therefore, how to provide a technical solution that can conveniently encrypt and transmit image data is a technical problem that needs to be solved urgently by those skilled in the art. Summary of the invention

[0005] The present application provides an image transmission method, device, storage medium and program product, which implements encryption processing of the original image by performing matrix transformation and sorting reset on each pixel in the original image matrix, which not only reduces the data processing amount of the image data during the encryption process, but also effectively improves the security of the image data during the plaintext transmission process.

[0006] According to a first aspect of the present application, there is provided an image transmission method, which is applied to a client, and the method comprises:

[0007] Obtaining a random matrix and a sorting value mapping table from a server; wherein the sorting value mapping table is a correspondence table between pixel values ​​and sorting values;

[0008] Transforming the original image matrix based on the random matrix to obtain an intermediate matrix; wherein the random matrix has the same dimension as the original image matrix, and the dimension of the original image matrix includes the number of rows, the number of columns, and the number of color channels of pixels in the original image;

[0009] Each intermediate pixel value in the intermediate matrix is ​​replaced based on the sorting value mapping table to obtain an encrypted image, and the encrypted image is sent to the server.

[0010] According to a second aspect of the present application, there is provided an image transmission method, which is applied to a server, and the method comprises:

[0011] Generate random matrix and sort value mapping table;

[0012] Sending the random matrix and the sorting value mapping table to a client, so that the client encrypts the original image matrix according to the random matrix and the sorting value mapping table to obtain an encrypted image;

[0013] The encrypted image sent by the client is obtained, and an inverse operation is performed on the encrypted image based on the random matrix and the sorting value mapping table to obtain an original image.

[0014] According to the third aspect of the present application, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the image transmission method described in the first aspect or the second aspect of the present application.

[0015] According to a fourth aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the image transmission method described in the first aspect or the second aspect of the present application when executed.

[0016] According to a fifth aspect of the present application, a computer program product is provided, the computer program product comprising a computer program, and the computer program, when executed by a processor, implements the image transmission method described in the first aspect or the second aspect of the present application.

[0017] The technical solution provided by the present application obtains a predetermined random matrix and a sorting value mapping table from a server; then transforms the original image matrix based on the random matrix to obtain an intermediate matrix; and finally replaces each pixel value in the intermediate matrix based on the sorting value mapping table to obtain an encrypted image. The present technical solution performs matrix transformation and sorting reset on each pixel in the original image matrix to achieve encryption processing of the original image, which not only reduces the amount of data processing in the encryption process of the image data, but also effectively improves the security of the image data in the plaintext transmission process.

[0018] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0020] Figure 1 A flowchart of an image transmission method provided in Example 1 of the present application.

[0021] Figure 2 A schematic diagram of an encrypted image provided in Example 1 of the present application.

[0022] Figure 3 A flowchart of an image transmission method provided in Example 2 of the present application.

[0023] Figure 4 It is a structural schematic diagram of a device for implementing an image transmission method in an embodiment of the present application. DETAILED DESCRIPTION

[0024] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0025] It should be noted that the terms "original", "intermediate", "target", "control", "first", "second", etc. in the specification and claims of the present application 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 interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0026] Embodiment 1

[0027] Figure 1 This is a flowchart of an image transmission method provided in the first embodiment of the present application. This embodiment is applicable to the case where the client encrypts and transmits image data. The method can be executed by an image encryption device. The image encryption device can be implemented in the form of hardware and / or software. The image encryption device can be configured in a device with data processing capabilities. Figure 1 As shown, the method includes the following steps.

[0028] S110, obtaining a random matrix and a sorting value mapping table from a server.

[0029] The ranking value mapping table is a corresponding relationship table between pixel values ​​and ranking values.

[0030] The client can be a program used to provide local services to customers. For example, in the banking field, the client can be a bank mobile app or web page. When a customer wants to make a transaction, the customer can open the bank's mobile app or the relevant web page, enter personal information as required, and submit the data after entering. The client will send the user's filled-in data to the bank's server via the Internet. After the server processes the user's request, the client will receive the processing result returned by the server and feedback the transaction processing result to the customer.

[0031] The server can be a high-performance computer and its corresponding database system used to process data sent by the client. When the server receives the data sent by the client, it will automatically process the data according to the established logical rules, save the processed results to the database, and finally feedback to the client whether the processing is completed.

[0032] Specifically, a connection can be established between the client and the server based on the network protocol, and the client sends a request instruction to the server. After the server authenticates the request sent by the client, it sends a random matrix and sorting value mapping table to the client; or the server actively sends a random matrix and sorting value mapping table to the client with which a secure connection has been established.

[0033] The random matrix and the sorting value mapping table may be used to encrypt the image data sent by the client.

[0034] S120. Transform the original image matrix based on the random matrix to obtain an intermediate matrix.

[0035] The dimensions of the original image matrix include the number of rows, the number of columns and the number of color channels of pixels in the original image.

[0036] In the present application, the image data can be regarded as a pixel matrix, and each element in the original image matrix is ​​changed by a random matrix of the same dimension. For example, the original image is regarded as a three-dimensional matrix O, and the dimension of O is W×H×C, where W is the width of the original image, H is the height of the original image, and C is the number of color channels of the original image. Taking a 1920×1080RGB color image as an example, the width of the image is 1920, each row has 1920 pixel values, the height is 1080, each column has 1080 pixels, and the image is a color RGB image, so the image has three color channels, that is, the number of channels of the image is 3, so the dimension of the image matrix is ​​1920×1080×3.

[0037] Since the existing transmission methods all use plain text transmission, and the data packets are not encrypted during the transmission process, it is possible for attackers to obtain the original data packets transmitted through the Internet by illegal means, and then extract the key text, images and other data uploaded by the user. In order to avoid data leakage, this application adopts the matrix transformation method to pre-process the original image before transmitting the image to change the original pixel value in the original image to prevent attackers from obtaining the original image.

[0038] Specifically, the random matrix and the original image matrix can be added or multiplied to change the pixel values ​​in the original image matrix. It should be noted that each element in the random matrix is ​​a random positive integer, and each element is independent of the other and does not affect the other.

[0039] For example, if the random matrix and the original image matrix are multiplied, it is necessary to ensure that the number of columns of the random matrix is ​​equal to the number of rows of the original image matrix, or the number of rows of the random matrix is ​​equal to the number of columns of the original image matrix.

[0040] Optionally, the random matrix has the same dimension as the original image matrix; accordingly, the original image matrix is ​​transformed based on the random matrix to obtain an intermediate matrix, including: traversing each original pixel point in the original image matrix, determining the reference pixel points in the random matrix that are at the same position as each original pixel point; and adding the original pixel points and the reference pixel points at the same position respectively to obtain an intermediate matrix.

[0041] Specifically, the dimension of the original image matrix O is W×H×C. All original pixel points O[i,j,k] (1≤i≤W, 1≤j≤H, 1≤k≤C) in the original image matrix are traversed, and the reference pixel points R[i,j,k] with the same position as the original pixel points are determined in the random matrix R. The original pixel points and the reference pixel points at the same position are added using the following formula.

[0042] T[i,j,k]=O[i,j,k]+R[i,j,k];

[0043] Where T[i,j,k] represents the pixel point of the intermediate matrix.

[0044] The above formula is used to add the pixels at each position in turn, and each original pixel point O[i,j,k] in the original image matrix is ​​replaced by a new pixel point T[i,j,k] in turn to obtain an intermediate matrix T.

[0045] Since the intermediate matrix T is obtained by adding the random matrix R to the original image matrix O, compared with the original image matrix O, each pixel value in the intermediate matrix T has undergone a huge change compared to the original pixel value. With only the intermediate matrix T, it is difficult for the attacker to recover the original image matrix.

[0046] S130, replacing each intermediate pixel value in the intermediate matrix based on the sorting value mapping table to obtain an updated matrix, generating an encrypted image according to the updated matrix, and sending the encrypted image to the server.

[0047] The sorting value mapping table is a correspondence table between pixel values ​​and sorting values.

[0048] For example, if a pixel value sequence is {1, 3, 5, 6, 8}, then according to the sorting position of the pixel values ​​in the sequence, the sorting value corresponding to pixel value 1 is 1, the sorting value corresponding to pixel value 3 is 2, the sorting value corresponding to pixel value 5 is 3, the sorting value corresponding to pixel value 6 is 4, and the sorting value corresponding to pixel value 8 is 5.

[0049] For another example, the intermediate pixel values ​​in the intermediate matrix may be sorted in a certain order to determine the sorting value, such as from top to bottom and from left to right, and the pixel values ​​in the sorting value mapping table and the intermediate matrix with the same sorting value may be replaced. For example, if the sequence of the intermediate pixel values ​​in the intermediate matrix sorted in a preset order is {25, 10, 2, 80, 60}, then according to the sorting value mapping table in the above example, it is replaced with {1, 3, 5, 6, 8}.

[0050] Furthermore, the update matrix can be converted into a visual image format according to the pixel values ​​of each position in the update matrix. For example, an original image is a photocopy of a purchase and sales contract of a product, and its content contains important information such as the product amount and product quantity. After the photocopy image is encrypted by the encryption method described above in the present application, the following is obtained: Figure 2 The encrypted image shown. Figure 2 It can be found that the processed image has undergone tremendous visual changes compared to the original image, and can well hide the key information in the original image, thereby achieving the purpose of protecting the privacy of the original image.

[0051] Optionally, each intermediate pixel value in the intermediate matrix is ​​replaced based on the sorting value mapping table to obtain an updated matrix, including: respectively determining the first sorting value corresponding to each intermediate pixel value in the sorting value mapping table; for each intermediate pixel value in the intermediate matrix, replacing the intermediate pixel value with the first sorting value corresponding to the intermediate pixel value to obtain an updated matrix.

[0052] In the present application, the intermediate matrix can be divided into at least one two-dimensional matrix according to the number of color channels; the first sorting values ​​corresponding to each pixel value in the two-dimensional matrix in the sorting value mapping table are determined respectively, and each pixel value is replaced with the first sorting value corresponding to each pixel value in turn.

[0053] For example, if the pixel value sequence of a certain sorting value mapping table is {1,3,5,6,8}, according to the sorting position of the pixel value in the sequence, the sorting value corresponding to pixel value 1 is determined to be 1, the sorting value corresponding to pixel value 3 is 2, the sorting value corresponding to pixel value 5 is 3, the sorting value corresponding to pixel value 6 is 4, and the sorting value corresponding to pixel value 8 is 5. According to each intermediate pixel value of the intermediate matrix, the first sorting value corresponding to the intermediate pixel value is searched in the sorting value mapping table and replaced. For example, if an intermediate pixel value is 5, it is replaced with 3; for another example, if another intermediate pixel value is 8, it is replaced with 5.

[0054] Optionally, after replacing each intermediate pixel value in the intermediate matrix based on the sorting value mapping table to obtain an updated matrix, the method further includes: if the maximum element value of the updated matrix is ​​greater than the maximum pixel value, determining a scaling ratio based on the maximum element value and the maximum pixel value; and scaling the updated matrix based on the scaling ratio to obtain a scaled matrix.

[0055] It is understandable that in the update matrix after random matrix processing and sorting reset processing of the original image matrix, there may be a case where the element value is greater than the maximum pixel value. For example, the value of a certain element in the update matrix is ​​280, which is greater than the maximum pixel value 255. At this time, if an encrypted image is generated based on the update matrix, image conversion may fail or be abnormal.

[0056] Therefore, the present application determines the scaling ratio of the maximum element value and the maximum pixel value, thereby reducing the update matrix to obtain matrix data capable of converting the image.

[0057] Specifically, the ratio of the maximum pixel value to the maximum element value can be determined as the scaling ratio. For example, if the maximum element value in the update matrix is ​​510 and the maximum pixel value is 255, the scaling ratio can be determined to be 0.5 times. For another example, if the maximum element value in the update matrix is ​​600 and the maximum pixel value is 255, the ratio is approximately equal to 0.425. In order to facilitate the scaling process, the scaling ratio can be determined to be 0.4.

[0058] The embodiment of the present invention provides an image transmission method, which obtains a predetermined random matrix and a sorting value mapping table from a server; then transforms the original image matrix based on the random matrix to obtain an intermediate matrix; and finally replaces each pixel value in the intermediate matrix based on the sorting value mapping table to obtain an encrypted image. This technical solution implements encryption processing of the original image by performing matrix transformation and sorting reset on each pixel in the original image matrix, which not only reduces the amount of data processing in the encryption process of the image data, but also effectively improves the security of the image data in the plaintext transmission process.

[0059] Embodiment 2

[0060] Figure 3 This is a flowchart of an image transmission method provided in the second embodiment of the present application. The method is applied to a server. This embodiment is applicable to the case where the server decrypts and transmits image data. The method can be executed by an image transmission device, which can be implemented in the form of hardware and / or software. The image transmission device can be configured in a device with data processing capabilities. Figure 3 As shown, the method of this embodiment specifically includes the following steps.

[0061] S210: Generate a random matrix and a sort value mapping table.

[0062] The random matrix and the sorting value mapping table can be generated by the server for images of different resolutions. For example, common image resolutions include 640×480, 1024×768, 2048×1536, etc.

[0063] Optionally, generating a sorting value mapping table includes: generating a first sequence including a first preset number of integer values ​​and a second preset number of floating-point values; sorting the first sequence in ascending order to obtain a second sequence, and generating a sorting value mapping table according to each integer value in the second sequence and a second sorting value corresponding to each integer value.

[0064] After the random matrix transformation, in order to further change the original pixel value, the present application further improves the security of image transmission by using nonlinear transformation to process the matrix after the matrix transformation.

[0065] Specifically, we can first generate an empty sequence P, and then add integer values ​​0-255 to the empty sequence P. At this time, there are 256 different pixel values ​​in the sequence P. Then, we generate n different random floating point numbers q1-q n And add it to the sequence P, and sort the sequence P in ascending order. The sorting algorithm used in the sorting process can be flexibly selected, for example, an efficient quick sort can be used.

[0066] Assume that the new sequence obtained by sorting sequence P is H. In the new sequence H, the subscript of the minimum value is 0, and the subscript of the maximum value is 255+n. Each item in the sorting mapping table is (x, i), where x is the value in sequence H and i is the subscript value of x. After the server generates the sorting value mapping table, it can send the table to the client.

[0067] Optionally, the value of each pixel point in the random matrix is ​​greater than or equal to a first preset threshold and less than or equal to a second preset threshold; accordingly, the integer value in the first sequence is greater than or equal to the first preset threshold and less than or equal to the sum of the second preset threshold and the maximum pixel value.

[0068] Specifically, the value range of any pixel point R[i,j,k] in the random matrix is ​​[0,t], where t is the maximum value of the value range of each pixel point in the random matrix, that is, the second preset threshold.

[0069] Accordingly, in order to ensure that the server can completely decrypt the encrypted image, the maximum value of the integer value in the first sequence should be 255+t.

[0070] The present application ensures that the server can completely decrypt the encrypted image by limiting the size relationship between the integer values ​​in the sorting mapping table and the values ​​of each pixel in the random matrix.

[0071] S220: Send the random matrix and the ranking value mapping table to the client, so that the client encrypts the original image matrix according to the random matrix and the ranking value mapping table to obtain an encrypted image.

[0072] S230: Acquire the encrypted image sent by the client, and perform an inverse operation on the encrypted image based on the random matrix and the sorting value mapping table to obtain an original image.

[0073] Specifically, the encrypted image matrix may be firstly inversely operated by the sorting value mapping table, then multiplied by the inverse matrix of the random matrix to obtain the original image matrix, and finally the original image matrix is ​​used to generate the original image.

[0074] The embodiment of the present invention provides an image transmission method, which is applied to a server, by generating a random matrix and a sorting value mapping table; sending the random matrix and the sorting value mapping table to a client, so that the client encrypts the original image matrix according to the random matrix and the sorting value mapping table to obtain an encrypted image; obtaining the encrypted image sent by the client, and performing an inverse operation on the encrypted image based on the random matrix and the sorting value mapping table to obtain the original image. This technical solution generates a random matrix and a sorting value mapping table on the server side, and sends them to the client so that it encrypts the image according to preset rules, thereby reducing the amount of data processing in the encryption process of the image data, and effectively improving the security of the image data in the plaintext transmission process.

[0075] Embodiment 3

[0076] Figure 4 A schematic diagram of a device 10 that can be used to implement an embodiment of the present application is shown. The device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.

[0077] like Figure 4 As shown, the device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the device 10 can also be stored. The processor 11, ROM 12 and RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0078] A number of components in the device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0079] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as an image transmission method.

[0080] In some embodiments, the image transmission method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the image transmission method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the image transmission method in any other suitable manner (e.g., by means of firmware).

[0081] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0082] The computer programs for implementing the methods of the present application may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer programs are executed by the processor, the functions / operations specified in the flow charts and / or block diagrams are implemented. The computer programs may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0083] In the context of the present application, a computer readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device or equipment. A computer readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer readable storage medium may be a machine readable signal medium. A more specific example of a machine readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0084] To provide interaction with a user, the systems and techniques described herein can be implemented on a device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0085] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0086] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0087] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution of this application can be achieved, and this document is not limited here.

[0088] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.

Claims

1. An image transmission method, characterized in that: Applied to a client, the method comprises: Obtaining a random matrix and a sorting value mapping table from a server; wherein the sorting value mapping table is a correspondence table between pixel values ​​and sorting values; Transforming the original image matrix based on the random matrix to obtain an intermediate matrix; wherein the dimensions of the original image matrix include the number of rows, the number of columns, and the number of color channels of pixels in the original image; Based on the sorting value mapping table, each intermediate pixel value in the intermediate matrix is ​​replaced to obtain an updated matrix, and an encrypted image is generated according to the updated matrix, and the encrypted image is sent to the server.

2. The method according to claim 1, characterized in that Replacing each intermediate pixel value in the intermediate matrix based on the sort value mapping table to obtain an updated matrix includes: Determine respectively the first ranking value corresponding to each intermediate pixel value in the ranking value mapping table; For each of the intermediate pixel values ​​in the intermediate matrix, the intermediate pixel value is replaced with a first ranking value corresponding to the intermediate pixel value to obtain an updated matrix.

3. The method according to claim 2, characterized in that After replacing each intermediate pixel value in the intermediate matrix based on the sort value mapping table to obtain an updated matrix, the method further includes: If the maximum element value of the update matrix is ​​greater than the maximum pixel value, determining a scaling ratio according to the maximum element value and the maximum pixel value; The update matrix is ​​scaled based on the scaling ratio to obtain a scaling matrix.

4. The method according to claim 1, characterized in that: The random matrix has the same dimension as the original image matrix; Accordingly, the original image matrix is ​​transformed based on the random matrix to obtain an intermediate matrix, including: Traversing each original pixel point in the original image matrix, and determining a control pixel point having the same position as each original pixel point in the random matrix; The pixel values ​​of the original pixel and the reference pixel at the same position are added together to obtain an intermediate matrix.

5. An image transmission method, characterized in that: Applied to a server, the method comprises: Generate random matrix and sort value mapping table; Sending the random matrix and the sorting value mapping table to a client, so that the client encrypts the original image matrix according to the random matrix and the sorting value mapping table to obtain an encrypted image; The encrypted image sent by the client is obtained, and an inverse operation is performed on the encrypted image based on the random matrix and the sorting value mapping table to obtain an original image.

6. The method according to claim 5, characterized in that Generate a sort value mapping table, including: generating a first sequence including a first preset number of integer values ​​and a second preset number of floating-point values; The first sequence is sorted in ascending order to obtain a second sequence, and a sorting value mapping table is generated according to each integer value in the second sequence and a second sorting value corresponding to each integer value.

7. The method according to claim 6, characterized in that The value of each pixel in the random matrix is ​​greater than or equal to a first preset threshold and less than or equal to a second preset threshold; Correspondingly, the integer value in the first sequence is greater than or equal to a first preset threshold, and less than or equal to the sum of a second preset threshold and a maximum pixel value.

8. An electronic device, characterized in that: The device comprises: At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the image transmission method described in any one of claims 1-4 or 5-7.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the image transmission method according to any one of claims 1-4 or 5-7 when executed.

10. A computer program product, characterized in that The computer program product comprises a computer program, which, when executed by a processor, implements the image transmission method according to any one of claims 1-4 or 5-7.

Citation Information

Patent Citations

  • Image encryption method, device and equipment and readable storage medium

    CN110535623A

  • Color image encryption method based on two-dimensional chaotic mapping

    CN112800444A

  • Latin square-based chaotic image encryption method

    CN113300827A

  • Image encryption method and device, electronic equipment and storage medium

    CN115277976A

  • Encryption device, decryption device, security system comprising encryption device and decryption device, program executed in encryption device and decryption device, and computer readable recording medium in which program is recorded

    JP2015170954A