A GPU output data encryption method, system and storage medium

By receiving the image tag and encryption level in the graphics processor, using preset parameters to determine the pixel point difference and encryption area, and performing image fitting and score correction, the problem of loss of readability during the image encryption process is solved and the encryption process is achieved. Valid identification of the image.

CN118354010BActive Publication Date: 2024-08-30LANYUN NET
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410772732.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-17
Publication Date
2024-08-30
Estimated Expiration
2044-06-17

AI Technical Summary

Technical Problem

It is difficult for existing graphics processors to retain the readability of images during the image encryption process, making it difficult to confirm the identity of the encrypted image.

Method used

By receiving the image label and encryption level input by the user, the preset table is used to query and calculate the radius, vein threshold and standard deviation threshold, determine the pixel point difference and generate data veins, extract the encryption area for fitting, and form a decryption layer and output Layer, the output layer is randomly selected for encryption score correction, and the encryption parameters are adjusted to preserve image readability.

Benefits of technology

Under the premise of ensuring the degree of encryption, the readability of the encrypted image is retained, which facilitates the subsequent image identity confirmation process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118354010B
    Figure CN118354010B
Patent Text Reader

Abstract

The present invention relates to the technical field of CPU output data processing, and specifically discloses a GPU output data encryption method, system and storage medium, the method comprising receiving a user input image label and its encryption level, and determining encryption parameters according to the encryption level; when the GPU output data about the image label is detected, generating a data pulse according to the encryption parameter, and expanding the data pulse to obtain an encryption area; extracting the encryption area from the output data, fitting the output data after the encryption area is extracted, using the extracted encryption area as a decryption layer, and using the fitted output data as an output layer. The present invention extracts the encryption area from the image to be encrypted, maps the remaining image to the frequency domain, performs equalization, and then performs inverse conversion, and retains the readability of the encrypted image under the premise of ensuring the encryption degree, which is convenient for the subsequent image identity confirmation process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of CPU output data processing, and in particular to a GPU output data encryption method, system and storage medium. Background Art

[0002] A graphics processing unit (GPU), also known as a display core, visual processor, or display chip, is a microprocessor that is specifically used to perform image and graphics-related calculations on personal computers, workstations, game consoles, and some mobile devices (such as tablets, smart phones, etc.).

[0003] When processing images, GPUs sometimes face encryption requirements. Most of the current image encryption requirements use the most basic compression algorithm combined with an encryption code. This method is extremely convenient, but the encrypted data completely loses readability, and it is difficult to determine the identity of the image. It can only be determined through an independent naming scheme, which is relatively cumbersome. How to retain a certain readability during the encryption process is a technical problem that the technical solution of the present invention wants to solve. Summary of the invention

[0004] The object of the present invention is to provide a GPU output data encryption method, system and storage medium to solve the problems raised in the above background technology.

[0005] To achieve the above object, the present invention provides the following technical solutions:

[0006] A method for encrypting GPU output data, the method comprising:

[0007] Receive image tags input by users;

[0008] receiving user input of an encryption level for each image tag;

[0009] The calculation radius, pulse drop threshold and standard deviation threshold are queried in a preset table according to the encryption level; the table contains encryption level items, calculation radius items, pulse drop threshold items and standard deviation threshold items.

[0010] Inserting an adjustment port in the table for receiving correction instructions directed to calculating a radius item, a pulse drop threshold item, and a standard deviation threshold item;

[0011] When the output data of the GPU about the image tag is detected, the difference of each pixel in the output data is determined according to the calculation radius, when the difference of a certain pixel reaches the pulse drop threshold, the pixel is selected to generate a data pulse, and the data pulse is expanded based on the standard deviation threshold to obtain an encrypted area;

[0012] Extracting an encrypted area from the output data, fitting the output data after the encrypted area is extracted, using the extracted encrypted area as a decryption layer, and using the fitted output data as an output layer; the output layer and the decryption layer correspond one to one;

[0013] An output layer is randomly selected and sent to the evaluation end, an encrypted score fed back by the evaluation end is received, and the calculation radius item, the pulse drop threshold item and the standard deviation threshold item in the table are corrected based on the encrypted score.

[0014] As a further solution of the present invention, the step of receiving the encryption level of each image tag input by the user includes:

[0015] receiving an automatic grading request input by a user;

[0016] Locate the encrypted target based on the image label and obtain the histogram of the encrypted target in different channels;

[0017] Calculating the amount of information in each channel based on the histogram;

[0018] Accumulate the amount of information in each channel to get the total amount of information, and determine the encryption level based on the total amount of information;

[0019] The calculation process of the information volume is as follows:

[0020] ; In the formula, is the amount of information, The pixel value is The ratio of the number of pixels to the total number of pixels; The value of is [0,255].

[0021] As a further solution of the present invention, when the output data of the GPU about the image tag is detected, the difference of each pixel in the output data is determined according to the calculation radius, when the difference of a certain pixel reaches the pulse drop threshold, the pixel is selected to generate a data pulse, and the data pulse is expanded based on the standard deviation threshold to obtain the encryption area. The step includes:

[0022] When the GPU output data about the image tag is detected, the difference of each pixel in the output data is calculated based on the calculation radius;

[0023] Count the differences of each pixel point according to the format of output data to obtain a difference matrix;

[0024] Normalizing the difference matrix, marking row and column positions in the normalized difference matrix according to a preset pulse drop threshold, and obtaining a data pulse drop;

[0025] Locating the encryption area based on the data pulse;

[0026] The generation process of the difference matrix is:

[0027] ;

[0028] Where b is the calculation radius, n and m are variables, and their values ​​are integers. The difference between the quadratic root of the sum of the squares of n and m and b is less than the preset threshold;

[0029] The calculation radius is the pixel distance within which the pixel points are selected to calculate the color value difference during the difference calculation process.

[0030] As a further solution of the present invention, the step of locating the encryption area based on the data pulse includes:

[0031] Traverse the pixel points in the data pulse in the preset direction, and when there is no next pixel point within the preset angle range, mark the current pixel point as the initial inspection point;

[0032] Taking the initial inspection point as the center, determining the inspection line at every preset angle;

[0033] Taking the initial inspection point as the starting point, the color value difference of adjacent pixels on the inspection line is calculated in sequence;

[0034] When the color value difference is less than a preset color value threshold, mark the corresponding pixel point;

[0035] Intercept line segments on the detection line according to the marked pixel points;

[0036] A center point is determined according to the line segment, and an encrypted area is determined according to the center point.

[0037] As a further solution of the present invention, the steps of determining the center point according to the line segment and determining the encrypted area according to the center point include:

[0038] Construct a vector with the initial inspection point as the starting point and the line segment as the modulus length;

[0039] Calculate the resultant vector of all vectors and use the end point of the resultant vector as the new center point;

[0040] Construct a circular area with increasing radius based on the new center point;

[0041] The color value standard deviation in the circular area is calculated in real time. When the color value standard deviation reaches the standard deviation threshold, the radius is determined and the circular area is output as the encryption area.

[0042] As a further solution of the present invention, the steps of extracting the encrypted area from the output data, fitting the output data after extracting the encrypted area, using the extracted encrypted area as a decryption layer, and using the fitted output data as the output layer include:

[0043] Extract the encrypted area in the output data to obtain the decrypted layer;

[0044] Obtain a frequency domain image of the output data after the encrypted area is extracted, and equalize the frequency domain image;

[0045] Perform inverse transformation on the equalized frequency domain image to obtain the output layer.

[0046] As a further solution of the present invention, the steps of randomly selecting an output layer, sending it to an evaluation end, receiving an encrypted score fed back by the evaluation end, and correcting the calculation radius item, the pulse drop threshold item, and the standard deviation threshold item in the table based on the encrypted score include:

[0047] Randomly select the output layer and send it to the evaluation end;

[0048] Receive the encrypted score fed back by the evaluation end, and determine the correction range of the calculation radius item, the pulse drop threshold item and the standard deviation threshold item according to the encrypted score;

[0049] Send the correction amplitude to the adjustment port;

[0050] Among them, the calculation radius is proportional to the encryption score, the pulse drop threshold is proportional to the encryption score, and the standard deviation threshold is inversely proportional to the encryption score.

[0051] The technical solution of the present invention also provides a GPU output data encryption system, the system comprising:

[0052] An index receiving module, used for receiving image tags input by users;

[0053] An encryption level receiving module, used for receiving the encryption level of each image tag input by a user;

[0054] A data query module, used to query the calculation radius, pulse drop threshold and standard deviation threshold in a preset table according to the encryption level; the table contains encryption level items, calculation radius items, pulse drop threshold items and standard deviation threshold items;

[0055] A port insertion module, used for inserting an adjustment port in the table, and for receiving correction instructions directed to calculating a radius item, a pulse drop threshold item, and a standard deviation threshold item;

[0056] The encryption area positioning module is used to determine the difference of each pixel in the output data according to the calculation radius when the output data of the GPU about the image tag is detected, and when the difference of a certain pixel reaches the pulse drop threshold, the pixel is selected to generate a data pulse, and the data pulse is expanded based on the standard deviation threshold to obtain an encryption area;

[0057] The data splitting module is used to extract the encrypted area from the output data, fit the output data after the encrypted area is extracted, use the extracted encrypted area as the decryption layer, and use the output data after fitting as the output layer; the output layer and the decryption layer correspond one to one;

[0058] The parameter correction module is used to randomly select an output layer, send it to the evaluation end, receive the encrypted score fed back by the evaluation end, and correct the calculation radius item, pulse drop threshold item and standard deviation threshold item in the table based on the encrypted score.

[0059] As a further solution of the present invention, the encryption level receiving module includes:

[0060] A request receiving unit, used for receiving an automatic rating request input by a user;

[0061] The target positioning unit is used to locate the encrypted target based on the image label and obtain the histogram of the encrypted target under different channels;

[0062] An information amount calculation unit, used for calculating the amount of information in each channel based on the histogram;

[0063] The cumulative application unit is used to accumulate the amount of information under each channel to obtain the total amount of information, and determine the encryption level according to the total amount of information;

[0064] The calculation process of the information volume is as follows:

[0065] ; In the formula, is the amount of information, The pixel value is The ratio of the number of pixels to the total number of pixels; The value of is [0,255].

[0066] The technical solution of the present invention further provides a storage medium, in which at least one program code is stored. When the program code is loaded and executed by a processor, the above-mentioned GPU output data encryption method is implemented.

[0067] Compared with the prior art, the present invention has the following beneficial effects:

[0068] The present invention extracts the encryption area from the image to be encrypted, maps the remaining image to the frequency domain, performs equalization, and then performs inverse conversion. Under the premise of ensuring the degree of encryption, the readability of the encrypted image is retained, which is convenient for the subsequent image identity confirmation process. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention.

[0070] Figure 1 A general flow chart of the method for encrypting GPU output data.

[0071] Figure 2 Block diagram of the system for encrypting data for GPU output. DETAILED DESCRIPTION

[0072] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0073] Figure 1 The figure is a general flow chart of a method for encrypting GPU output data. In an embodiment of the present invention, a method for encrypting GPU output data includes:

[0074] Step S100: receiving an image tag input by a user;

[0075] The image tag is the index of the image, which is used to locate the image and indicates which images the user wants to encrypt. The number of image tags is generally not unique, and the user can upload multiple image tags in batches. After receiving the image tag, the execution subject of this method can locate the image to be encrypted according to the image tag, that is, the image processed by the GPU corresponding to the image tag.

[0076] Step S200: receiving the encryption level of each image tag input by the user;

[0077] Different image tags have different encryption levels, which are input by the user. The process of the user inputting the encryption level is not complicated. The execution subject of this method can provide a default level. When the user needs it, he can select one or several batches of images and adjust the encryption level.

[0078] Step S300: querying the calculation radius, pulse drop threshold and standard deviation threshold in a preset table according to the encryption level; the table contains encryption level items, calculation radius items, pulse drop threshold items and standard deviation threshold items.

[0079] Before executing this method, the administrator needs to pre-set a table, which includes encryption level items, calculation radius items, pulse drop threshold items and standard deviation threshold items. In the actual application stage, the table is regarded as the default known data, and the calculation radius, pulse drop threshold and standard deviation threshold can be quickly queried in the table based on the encryption level.

[0080] Among them, regarding the three parameters of calculation radius, pulse drop threshold and standard deviation threshold, the calculation radius is a parameter involved in calculating the difference, and the difference reflects the difference between each pixel in the image; the pulse drop threshold is a pre-set value used to screen the calculated difference. When the difference reaches the pulse drop threshold, the corresponding pixel is marked as a data pulse drop; then, based on the data pulse drop, the area is expanded to obtain multiple areas. The size of the expanded range is determined by the standard deviation threshold. Specifically, the standard deviation of the color values ​​of the pixels in the area is calculated in real time. When the standard deviation reaches the standard deviation threshold, the expansion ends.

[0081] Step S400: inserting an adjustment port in the table for receiving correction instructions directed to calculating a radius item, a pulse drop threshold item, and a standard deviation threshold item;

[0082] Furthermore, the table generated in step S300 contains an adjustment port, the function of which is to adjust the calculation radius item, pulse drop threshold item and standard deviation threshold item according to the correction instruction, thereby adjusting the encryption degree, which is a further expansion of the original technical solution.

[0083] Step S500: when the output data of the GPU about the image tag is detected, the difference of each pixel in the output data is determined according to the calculation radius, when the difference of a certain pixel reaches the pulse drop threshold, the pixel is selected to generate a data pulse, and the data pulse is expanded based on the standard deviation threshold to obtain an encrypted area;

[0084] When the GPU output data about the image label is detected, the color values ​​of adjacent pixels are obtained and compared in turn, and the difference of each pixel is calculated. The difference reflects the degree of differentiation between the current pixel and the surrounding pixels. The difference is analyzed, and pixels are selected in the image (output data) processed by the GPU, which is called data pulse. The data pulse is extended, and an area is selected in the image to obtain an encrypted area.

[0085] Step S600: extracting an encrypted area from the output data, fitting the output data after the encrypted area is extracted, using the extracted encrypted area as a decryption layer, and using the fitted output data as an output layer; the output layer and the decryption layer correspond one to one;

[0086] The function of step S500 is to select the encrypted area in the output data. After the encrypted area is selected, the encrypted area is separated (extracted) from the output data to obtain the encrypted layer, which is called the decrypted layer. Then, in order to ensure that the remaining data has a certain readability, it is fitted and output to obtain the output layer. Considering the decryption requirements, the fitting process needs to be recorded in real time. When decryption is required, the fitting process is reversed, and the decrypted layer is superimposed to obtain the original output data.

[0087] Step S700: randomly selecting an output layer, sending it to the evaluation end, receiving the encrypted score fed back by the evaluation end, and correcting the calculation radius item, the pulse drop threshold item and the standard deviation threshold item in the table based on the encrypted score;

[0088] In actual application, an output layer is randomly selected and sent to the evaluation end. The evaluation end can have built-in evaluation software or be directly facing the evaluator. Its function is to feedback the encryption score to indicate the degree of encryption. The higher the score, the higher the degree of encryption. The encryption score can determine the correction range of the calculation radius, pulse drop threshold and standard deviation threshold, and then adjust them with the help of the adjustment port in the table.

[0089] In some examples of the present invention, the step of receiving the encryption level of each image tag input by the user includes:

[0090] receiving an automatic grading request input by a user;

[0091] Locate the encrypted target based on the image label and obtain the histogram of the encrypted target in different channels;

[0092] Calculating the amount of information in each channel based on the histogram;

[0093] Accumulate the amount of information in each channel to get the total amount of information, and determine the encryption level based on the total amount of information;

[0094] In the above content, the encryption level is input by the user. In some cases, the user may find the input process cumbersome. Therefore, the present application provides an adaptive adjustment scheme, which calculates the amount of information under each channel (R, G and B), accumulates it, and obtains the total amount of information. The encryption level is determined according to the threshold reached by the total amount of information. Generally, the larger the total amount of information, the higher the encryption level.

[0095] One of the information calculation processes is:

[0096] ; In the formula, is the amount of information, The pixel value is The ratio of the number of pixels to the total number of pixels; The value of is [0,255].

[0097] In some examples of the technical solution of the present invention, when the output data of the GPU about the image tag is detected, the difference of each pixel in the output data is determined according to the calculation radius, when the difference of a certain pixel reaches the pulse drop threshold, the pixel is selected to generate a data pulse, and the data pulse is expanded based on the standard deviation threshold to obtain the encryption area. The step includes:

[0098] When the GPU output data about the image tag is detected, the difference of each pixel in the output data is calculated based on the calculation radius;

[0099] Count the differences of each pixel point according to the format of output data to obtain a difference matrix;

[0100] Normalizing the difference matrix, marking row and column positions in the normalized difference matrix according to a preset pulse drop threshold, and obtaining a data pulse drop;

[0101] Locating the encryption area based on the data pulse;

[0102] The generation process of the difference matrix is:

[0103] ;

[0104] Wherein, b is the calculation radius, n and m are variables, and their values ​​are integers. The difference between the quadratic root of the sum of the squares of n and m and b is less than the preset threshold.

[0105] Among them, regarding the calculation radius, the calculation radius is the pixel distance at which another pixel point is selected during the differential calculation process, that is, within a large range, to calculate the color value difference between it and the center pixel point. Generally, b takes the value of 1.

[0106] The above content limits the process of determining the data pulse and encryption area. It should be noted that this is only one of the area selection schemes. In practical applications, there are some other rules for selecting and extracting areas in the output data. The focus of this application is to divide the output data into two, one as the decryption layer and the other as the encrypted output data.

[0107] The above scheme is described in detail as follows:

[0108] For each point, take it as the center and query the maximum difference within the calculation radius as the difference of the point. Arrange the differences according to the arrangement order of the pixels to obtain the difference matrix.

[0109] The difference matrix is ​​normalized. The normalization means limiting all values ​​in the difference matrix to a range, such as 0 to 1. The normalization process is very simple. The simplest function is: ; x is the value before normalization, and y is the value after normalization.

[0110] Pixel points are selected by the read pulse threshold, and the set of all selected pixel points is called a data pulse. On this basis, connectivity conditions can be introduced into the data pulse. For example, only when the selected pixel points are adjacent to each other can they be regarded as data pulses, so that some noise points can be eliminated.

[0111] The process of selecting pixel points based on the read pulse drop threshold is: comparing the normalized difference with the pulse drop threshold, and when the normalized difference reaches the pulse drop threshold, selecting the corresponding pixel point. The pulse drop threshold is a simple threshold.

[0112] In some examples of the technical solution of the present invention, the step of locating the encryption area based on the data pulse includes:

[0113] Traverse the pixel points in the data pulse in the preset direction, and when there is no next pixel point within the preset angle range, mark the current pixel point as the initial inspection point;

[0114] Taking the initial inspection point as the center, determining the inspection line at every preset angle;

[0115] Taking the initial inspection point as the starting point, the color value difference of adjacent pixels on the inspection line is calculated in sequence;

[0116] When the color value difference is less than a preset color value threshold, mark the corresponding pixel point;

[0117] Intercept line segments on the detection line according to the marked pixel points;

[0118] A center point is determined according to the line segment, and an encrypted area is determined according to the center point.

[0119] The above content defines the generation process of the encryption zone, which is essentially an extension of the data pulse, expanding the point into an area. The specific description is as follows:

[0120] Read the pixels in the data pulse in sequence according to the preset direction, for example, from left to right, from top to bottom; the reading process is: for each pixel, determine a detection line every 30 degrees (can be other angles), for each detection line, calculate the difference between the color value of the next pixel and the color value of the current pixel in sequence, if the difference is small (relative to the color value threshold), it means that the two pixels are similar, at this time, read the next pixel, perform color value comparison analysis, and so on, until the color value difference is greater than the color value threshold, mark the point on each detection line that is farthest from the pixel.

[0121] A radial vector can be established based on the pixel points and the marked points, and the resultant vector of the vector is calculated. The end point of the resultant vector is used as the center point, and a circular area is created with the center point as the center of the circle, which is called the encryption area.

[0122] The specific process of determining the encryption zone is described as follows:

[0123] The steps of determining the center point according to the line segment and determining the encrypted area according to the center point include:

[0124] Construct a vector with the initial inspection point as the starting point and the line segment as the modulus length;

[0125] Calculate the resultant vector of all vectors and use the end point of the resultant vector as the new center point;

[0126] Construct a circular area with increasing radius based on the new center point;

[0127] The color value standard deviation in the circular area is calculated in real time. When the color value standard deviation reaches the standard deviation threshold, the radius is determined and the circular area is output as the encryption area.

[0128] With the center point as the center, a circular area is created, called the encryption area. The radius of the circular area is constantly increasing. In the real-time increase process, the number of pixels in the circular area continues to increase. The mean of the color values ​​of all pixels is calculated, and then the standard deviation is calculated. When the standard deviation is large enough, the radius stops increasing, and the circular area based on the maximum radius is output as the encryption area.

[0129] In layman's terms, this process is the extension of the data pulse, expanding each pixel in the data pulse into a circular area.

[0130] In some examples of the technical solution of the present invention, the steps of extracting the encrypted area from the output data, fitting the output data after extracting the encrypted area, using the extracted encrypted area as the decryption layer, and using the fitted output data as the output layer include:

[0131] Extract the encrypted area in the output data to obtain the decrypted layer;

[0132] Obtain a frequency domain image of the output data after the encrypted area is extracted, and equalize the frequency domain image;

[0133] Perform inverse transformation on the equalized frequency domain image to obtain the output layer.

[0134] The above content processes the output data after the encrypted area is extracted. The processing method is to first convert the output data after the encrypted area is extracted into the frequency domain, then equalize the histogram, and finally perform an inverse conversion. This process is to convert the image into the frequency domain for fitting.

[0135] In fact, there are some other fitting schemes, such as copying adjacent areas for filling, which can be compared to the Clone Stamp Tool.

[0136] In some examples of the technical solution of the present invention, the steps of randomly selecting an output layer, sending it to an evaluation end, receiving an encrypted score fed back by the evaluation end, and correcting the calculation radius item, the pulse drop threshold item, and the standard deviation threshold item in the table based on the encrypted score include:

[0137] Randomly select the output layer and send it to the evaluation end;

[0138] Receive the encrypted score fed back by the evaluation end, and determine the correction range of the calculation radius item, the pulse drop threshold item and the standard deviation threshold item according to the encrypted score;

[0139] Send the correction amplitude to the adjustment port;

[0140] Among them, the calculation radius is proportional to the encryption score, the pulse drop threshold is proportional to the encryption score, and the standard deviation threshold is inversely proportional to the encryption score.

[0141] In the technical solution of the present invention, the larger the calculation radius, the larger the calculation span of the difference, the fewer the number of pixel points of the data pulse, the smaller the area of ​​the encryption zone, and the worse the encryption effect. Therefore, when the encryption score is high, the encryption effect is very good. At this time, the encryption effect can be reduced, that is, the calculation radius is increased. Therefore, the calculation radius is proportional to the encryption score.

[0142] Correspondingly, the larger the pulse drop threshold is, the fewer pixels of data pulse drop are, the smaller the encryption area is, and the worse the encryption effect is. Therefore, when the encryption score is high, the encryption effect is very good. At this time, the encryption effect can be reduced, that is, the pulse drop threshold is increased. The pulse drop threshold is proportional to the encryption score.

[0143] Furthermore, the larger the standard deviation threshold is, the larger the radius of the encryption zone is, and the better the encryption effect is. Therefore, when the encryption score is high, the encryption effect is very good. At this time, the encryption effect can be reduced, that is, the standard deviation threshold is reduced. The standard deviation threshold is inversely proportional to the encryption score.

[0144] Figure 2 : is a structural diagram of a GPU output data encryption system. In an embodiment of the present invention, a GPU output data encryption system, the system 10 includes:

[0145] An index receiving module 11, used for receiving an image tag input by a user;

[0146] An encryption level receiving module 12 is used to receive the encryption level of each image tag input by a user;

[0147] The data query module 13 is used to query the calculation radius, pulse drop threshold and standard deviation threshold in a preset table according to the encryption level; the table contains encryption level items, calculation radius items, pulse drop threshold items and standard deviation threshold items;

[0148] A port insertion module 14, used for inserting an adjustment port in the table, used for receiving correction instructions directed to calculating a radius item, a pulse drop threshold item and a standard deviation threshold item;

[0149] The encryption area positioning module 15 is used to determine the difference of each pixel in the output data according to the calculation radius when the output data of the GPU about the image tag is detected, and when the difference of a certain pixel reaches the pulse drop threshold, the pixel is selected to generate a data pulse, and the data pulse is expanded based on the standard deviation threshold to obtain an encryption area;

[0150] The data splitting module 16 is used to extract the encrypted area from the output data, fit the output data after the encrypted area is extracted, use the extracted encrypted area as the decryption layer, and use the output data after fitting as the output layer; the output layer and the decryption layer correspond one to one;

[0151] The parameter correction module 17 is used to randomly select an output layer, send it to the evaluation end, receive the encrypted score fed back by the evaluation end, and correct the calculation radius item, pulse drop threshold item and standard deviation threshold item in the table based on the encrypted score.

[0152] Furthermore, the encryption level receiving module 12 includes:

[0153] A request receiving unit, used for receiving an automatic rating request input by a user;

[0154] The target positioning unit is used to locate the encrypted target based on the image label and obtain the histogram of the encrypted target under different channels;

[0155] An information amount calculation unit, used for calculating the amount of information in each channel based on the histogram;

[0156] The cumulative application unit is used to accumulate the amount of information under each channel to obtain the total amount of information, and determine the encryption level according to the total amount of information;

[0157] The calculation process of the information volume is as follows:

[0158] ; In the formula, is the amount of information, The pixel value is The ratio of the number of pixels to the total number of pixels; The value of is [0,255].

[0159] The functions that can be implemented by the GPU output data encryption method are all completed by a computer device, which includes one or more processors and one or more memories, and at least one program code is stored in the one or more memories. The program code is loaded and executed by the one or more processors to implement the GPU output data encryption method.

[0160] The processor takes out instructions from the memory one by one, analyzes the instructions, and then completes the corresponding operations according to the instruction requirements, generating a series of control commands, so that the various parts of the computer can automatically, continuously and coordinately move to become an organic whole, realize the input of programs, the input of data, and the calculation and output of results. The arithmetic operations or logical operations generated in this process are all completed by the operator; the memory includes a read-only memory (ROM), which is used to store computer programs, and a protection system is provided outside the memory.

[0161] Exemplarily, the computer program may be divided into one or more modules, one or more modules are stored in a memory and executed by a processor to implement the present invention. One or more modules may be a series of computer program instruction segments capable of implementing specific functions, and the instruction segments are used to describe the execution process of the computer program in a terminal device.

[0162] Those skilled in the art will understand that the description of the above service equipment is merely an example and does not constitute a limitation on the terminal equipment. It may include more or fewer components than described above, or a combination of certain components, or different components, for example, it may include input and output devices, network access devices, buses, etc.

[0163] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the terminal device, and uses various interfaces and lines to connect various parts of the entire staff terminal.

[0164] The above-mentioned memory can be used to store computer programs and / or modules. The above-mentioned processor realizes various functions of the above-mentioned terminal device by running or executing the computer programs and / or modules stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as an information collection template display function, a product information release function, etc.), etc.; the data storage area can store data created according to the use of the berth status display system (such as product information collection templates corresponding to different product types, product information that different product providers need to release, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0165] If the module / unit integrated in the terminal device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable medium. Based on this understanding, the present invention implements all or part of the modules / units in the above-mentioned embodiment system, and can also be completed by instructing the relevant hardware through a computer program. The above-mentioned computer program can be stored in a computer-readable medium, and the computer program can realize the functions of the above-mentioned various system embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or system that can carry computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal and software distribution medium, etc.

[0166] It should be noted that, in this article, the term "comprises" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0167] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A GPU output data encryption method, characterized in that: The method comprises: Receive image tags input by users; receiving user input of an encryption level for each image tag; The calculation radius, the vein threshold and the standard deviation threshold are queried in a preset table according to the encryption level; the table contains encryption level items, calculation radius items, vein threshold items and standard deviation threshold items; Among them, regarding the three parameters of calculation radius, context threshold and standard deviation threshold, the calculation radius is the parameter involved in calculating the difference, and the difference reflects the difference between each pixel in the image; the context threshold is a pre-set value, which is used to screen the calculated difference. When the difference reaches the context threshold, the corresponding pixel is marked as the data context; then, based on the data context, the region is expanded to obtain multiple regions, and the size of the expanded range is determined by the standard deviation threshold; Inserting an adjustment port in the table for receiving correction instructions directed to calculating a radius item, a vein threshold item, and a standard deviation threshold item; When the output data of the GPU about the image tag is detected, the difference of each pixel in the output data is determined according to the calculation radius, when the difference of a certain pixel reaches the context threshold, the pixel is selected to generate a data context, and the data context is expanded based on the standard deviation threshold to obtain an encrypted area; Extracting an encrypted area from the output data, fitting the output data after the encrypted area is extracted, using the extracted encrypted area as a decryption layer, and using the fitted output data as an output layer; the output layer and the decryption layer correspond one to one; Randomly select an output layer, send it to the evaluation end, receive the encrypted score fed back by the evaluation end, and modify the calculation radius item, the vein threshold item and the standard deviation threshold item in the table based on the encrypted score; The step of receiving the encryption level of each image tag input by the user comprises: receiving an automatic grading request input by a user; Locate the encrypted target based on the image label and obtain the histogram of the encrypted target in different channels; Calculate the amount of information in each channel based on the histogram; The amount of information in each channel is accumulated to obtain the total amount of information, and the encryption level is determined based on the total amount of information; The calculation process of the information volume is as follows: ; In the formula, is the amount of information, The pixel value is The ratio of the number of pixels to the total number of pixels; The value of is [0,255]; The steps of extracting the encrypted area from the output data, fitting the output data after the encrypted area is extracted, using the extracted encrypted area as the decryption layer, and using the output data after fitting as the output layer include: Extract the encrypted area in the output data to obtain the decrypted layer; Obtain a frequency domain image of the output data after the encrypted area is extracted, and equalize the frequency domain image; Perform inverse transformation on the equalized frequency domain image to obtain the output layer.

2. The GPU output data encryption method according to claim 1, characterized in that: The step of determining the difference of each pixel in the output data according to the calculation radius when the output data of the GPU about the image tag is detected, selecting the pixel to generate the data context when the difference of a certain pixel reaches the context threshold, and expanding the data context based on the standard deviation threshold to obtain the encryption area comprises: When the GPU output data about the image tag is detected, the difference of each pixel in the output data is calculated based on the calculation radius; Count the differences of each pixel point according to the format of output data to obtain a difference matrix; Normalizing the difference matrix, marking row and column positions in the normalized difference matrix according to a preset context threshold, and obtaining data context; Locating the encryption area based on the data context; The generation process of the difference matrix is: ; Where b is the calculation radius, n and m are variables, and their values ​​are integers. The difference between the quadratic root of the sum of the squares of n and m and b is less than the preset threshold; The calculation radius is the pixel distance within which the pixel points are selected to calculate the color value difference during the difference calculation process.

3. The GPU output data encryption method according to claim 2, characterized in that: The step of locating the encryption area based on the data context comprises: Traverse the pixel points in the data context in a preset direction, and when there is no next pixel point within the preset angle range, mark the current pixel point as the initial inspection point; Taking the initial inspection point as the center, determining the inspection line at every preset angle; Taking the initial inspection point as the starting point, the color value difference of adjacent pixels on the inspection line is calculated in sequence; When the color value difference is less than a preset color value threshold, mark the corresponding pixel point; Intercept line segments on the detection line according to the marked pixel points; A center point is determined according to the line segment, and an encrypted area is determined according to the center point.

4. The GPU output data encryption method according to claim 3, characterized in that: The steps of determining the center point according to the line segment and determining the encrypted area according to the center point include: Construct a vector with the initial inspection point as the starting point and the line segment as the modulus length; Calculate the resultant vector of all vectors and use the end point of the resultant vector as the new center point; Construct a circular area with increasing radius based on the new center point; The color value standard deviation in the circular area is calculated in real time. When the color value standard deviation reaches the standard deviation threshold, the radius is determined and the circular area is output as the encryption area.

5. The GPU output data encryption method according to claim 1, characterized in that: The steps of randomly selecting an output layer, sending it to the evaluation end, receiving an encrypted score fed back by the evaluation end, and correcting the calculation radius item, the vein threshold item, and the standard deviation threshold item in the table based on the encrypted score include: Randomly select the output layer and send it to the evaluation end; Receive the encrypted score fed back by the evaluation end, and determine the correction range of the calculation radius item, the vein threshold item and the standard deviation threshold item according to the encrypted score; Send the correction amplitude to the adjustment port; Among them, the calculation radius is proportional to the encryption score, the vein threshold is proportional to the encryption score, and the standard deviation threshold is inversely proportional to the encryption score.

6. A GPU output data encryption system, characterized in that: The system is used to implement the GPU output data encryption method according to any one of claims 1 to 5, and the system includes: An index receiving module, used for receiving image tags input by users; An encryption level receiving module, used for receiving the encryption level of each image tag input by a user; A data query module, used to query the calculation radius, the vein threshold and the standard deviation threshold in a preset table according to the encryption level; the table contains encryption level items, calculation radius items, vein threshold items and standard deviation threshold items; A port insertion module, used for inserting an adjustment port in the table, used for receiving correction instructions directed to calculating a radius item, a vein threshold item, and a standard deviation threshold item; The encryption area positioning module is used to determine the difference of each pixel in the output data according to the calculation radius when the output data of the GPU about the image tag is detected, and when the difference of a certain pixel reaches the context threshold, the pixel is selected to generate the data context, and the data context is expanded based on the standard deviation threshold to obtain the encryption area; The data splitting module is used to extract the encrypted area from the output data, fit the output data after the encrypted area is extracted, use the extracted encrypted area as the decryption layer, and use the output data after fitting as the output layer; the output layer and the decryption layer correspond one to one; The parameter correction module is used to randomly select an output layer, send it to the evaluation end, receive the encrypted score fed back by the evaluation end, and correct the calculation radius item, the vein threshold item and the standard deviation threshold item in the table based on the encrypted score.

7. The GPU output data encryption system according to claim 6, characterized in that: The encryption level receiving module comprises: A request receiving unit, used for receiving an automatic rating request input by a user; A target positioning unit is used to locate the encrypted target based on the image label and obtain the histogram of the encrypted target under different channels; An information amount calculation unit, used for calculating the amount of information in each channel based on the histogram; The cumulative application unit is used to accumulate the amount of information under each channel to obtain the total amount of information, and determine the encryption level according to the total amount of information; The calculation process of the information volume is as follows: ; In the formula, is the amount of information, The pixel value is The ratio of the number of pixels to the total number of pixels; The value of is [0,255].

8. A storage medium, characterized in that: The storage medium stores at least one program code, and when the program code is loaded and executed by the processor, the GPU output data encryption method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Encryption transmission method and system

    CN115001869A

  • GPU (Graphics Processing Unit) bare metal computing power resource allocation scheduling method and device and storage medium

    CN117636137A