Privacy protection method and device for financial data and computer program product
Through multi-level pixel scrambling and encryption processing technology, the problem of insufficient image privacy data protection in the prior art is solved, and high-security storage of sensitive images in bank databases is achieved, ensuring the privacy and security of data.
Patent Information
- Application Number
- CN202411334166.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-01-07
AI Technical Summary
The existing data protection methods that restrict access rights are not enough to meet the secure storage needs of bank private data, especially in the face of mature hacking technologies and cyber attacks, it cannot effectively protect image privacy data.
Using multi-level encryption processing methods, including building an image scrambling model and a key model, processing sensitive images through pixel scrambling, scrambling and encryption, generating a scrambling key sequence, scrambling key sequence and encryption key sequence, and performing multiple times. Pixel scrambling and encryption processing make the image invisible.
It ensures the storage security of sensitive images. Even if criminals invade the database, they cannot obtain real image data, effectively protecting the privacy of sensitive images in bank databases.
Smart Images

Figure CN119272329A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of privacy protection, and specifically relates to a method, device and computer program product for privacy protection of financial data. Background Art
[0002] Among the many businesses of banks, most involve cooperation with individuals or companies. Therefore, in the course of business dealings, banks will store a large amount of personal and company-related data. For example, when applying for a loan online, photos of ID cards and bank cards will be uploaded, and real-time facial recognition will be performed. Based on this, the data stored by banks often involves a large amount of image privacy data. Therefore, how to ensure the storage security of image privacy data is an important part of bank data protection.
[0003] At present, most banks limit users' access rights by setting account permissions, so as to achieve the purpose of protecting image privacy data. However, with the rapid development of network technology, hacker technology is becoming more and more mature. Therefore, criminals can easily crack the loopholes of the bank system to invade, intercept and tamper with the image privacy data stored in the bank database. Once the image privacy data of an individual or a company is leaked, it will bring immeasurable losses to the individual and the company. Therefore, the existing data protection method of restricting access rights is not enough to meet the safe storage needs of bank privacy data. Based on this, how to provide a highly secure privacy protection method for financial data has become an urgent problem to be solved. Summary of the invention
[0004] The purpose of the present invention is to provide a financial data privacy protection method, device and computer program product to solve the problem of low security protection of image privacy data in the prior art.
[0005] In order to achieve the above object, the present invention adopts the following technical solutions:
[0006] In a first aspect, a method for protecting the privacy of financial data is provided, comprising:
[0007] Access sensitive images in financial databases;
[0008] An image scrambling model is constructed, and based on the image scrambling model, a first pixel scrambling process is performed on the sensitive image to obtain a first-level scrambled sensitive image;
[0009] Constructing a key model, and generating a key sequence according to the sensitive image and the key model, wherein the key sequence includes a scrambled key sequence, a disrupted key sequence and an encrypted key sequence;
[0010] Using the scrambled key sequence in the key sequence, performing a second pixel scrambling process on the primary scrambled sensitive image to obtain a secondary scrambled sensitive image;
[0011] Based on the scrambled key sequence in the key sequence, performing pixel scrambling processing on the secondary scrambled sensitive image to obtain a scrambled sensitive image after the pixel scrambling processing;
[0012] According to the encryption key sequence in the key sequence, pixel encryption processing is performed on the disturbed sensitive image to obtain an encrypted sensitive image after the pixel encryption processing.
[0013] Based on the above disclosed content, after acquiring the sensitive image in the financial database, the present invention first constructs an image scrambling model, and based on the model, performs a first pixel scrambling process on the sensitive image to obtain a first-level scrambled sensitive image; then, a key model is constructed, and a scrambling key sequence, a scrambling key sequence and an encryption key sequence are generated according to the key model; then, the scrambling key sequence is used to perform a second pixel scrambling process on the aforementioned first-level scrambled sensitive image to obtain a second-level scrambled sensitive image; then, based on the scrambling key sequence, the second-level scrambled sensitive image is subjected to pixel scrambling to obtain a scrambled sensitive image; finally, the encryption key sequence can be used to encrypt the scrambled sensitive image, so that after the encryption process, an encrypted sensitive image is obtained; in this way, the present invention performs multi-level encryption processing on the sensitive image, making the original image invisible; based on this, even if criminals invade the database, they cannot obtain the real image data. Therefore, the present invention ensures the storage security of sensitive images in the database, and is very suitable for large-scale application and promotion in the field of privacy data protection technology.
[0014] In a possible design, based on the image scrambling model, performing a first pixel scrambling process on the sensitive image to obtain a first-level scrambled sensitive image includes:
[0015] Selecting a number of pixels from the sensitive image, and dividing the number of pixels into a first pixel set and a second pixel set, wherein the number of pixels in the first pixel set and the number of pixels in the second pixel set are the same;
[0016] Calculating a pixel average value of all pixels in the first pixel point set and a pixel average value of all pixels in the second pixel point set to obtain a first mean value and a second mean value, respectively;
[0017] Based on the first mean and the second mean, generating initial parameters of the image scrambling model;
[0018] Generate an image scrambling parameter sequence using the initial parameters and the image scrambling model;
[0019] Randomly selecting an image scrambling parameter from the image scrambling parameter sequence, and performing rounding processing on the selected image scrambling parameter to obtain a rounding result;
[0020] Based on the rounding result, an image scrambling label is generated, and according to the image scrambling label, an image scrambling mode is determined from an image scrambling database, wherein the image scrambling database stores a plurality of image scrambling modes, and each image scrambling mode is provided with an image scrambling label;
[0021] performing channel separation processing on the sensitive image to obtain a red component image, a green component image and a blue component image, and performing rotation processing on the red component image, the green component image and the blue component image to obtain a rotated red component image, a rotated green component image and a rotated blue component image, respectively, wherein the rotation angles of the red component image, the green component image and the blue component image are different;
[0022] Using the determined image scrambling method, performing a first pixel scrambling process on the rotated red component image, the rotated green component image, and the rotated blue component image, so as to obtain a scrambled red component image, a scrambled green component image, and a scrambled blue component image after the first pixel scrambling process;
[0023] The scrambled red component image, the scrambled green component image, and the scrambled blue component image are horizontally spliced to obtain the primary scrambled sensitive image after the horizontal splicing.
[0024] In a possible design, generating a key sequence according to the sensitive image and the key model includes:
[0025] Performing a hash operation on the sensitive image to obtain a hash value sequence;
[0026] Obtaining an initial value index set of the key model, wherein the initial value index set includes three groups of initial value indexes, and each group of initial value indexes includes three index values;
[0027] Generate, according to the initial value index set, initial control parameters corresponding to each index value in each group of initial value indexes;
[0028] Using the initial control parameters corresponding to the respective index values, extracting the hash value subsequences corresponding to the respective index values from the hash value sequence;
[0029] Based on the hash value subsequences corresponding to the index values, the model initial values corresponding to the three groups of initial value indexes are calculated;
[0030] Substituting three groups of model initial values into the key model respectively to generate the scrambling key sequence, the disrupting key sequence and the encryption key sequence respectively;
[0031] The key sequence is composed by using a scrambled key sequence, a disrupted key sequence and an encrypted key sequence.
[0032] In a possible design, generating initial control parameters corresponding to each index value in each group of initial value indexes according to the initial value index set includes:
[0033] For any index value, the first initial parameter and the second initial parameter corresponding to the any index value are calculated according to the following formula (1) and formula (2);
[0034] b1=δ×(p-1)+1 (1)
[0035] b2=δ×(p-1)+40 (2)
[0036] In the above formula (1), b1 represents the first initial parameter, p represents any index value, and δ represents a control factor;
[0037] In the above formula (2), b2 represents the second initial parameter;
[0038] Using the first initial parameter and the second initial parameter, an initial control parameter corresponding to any index value is formed;
[0039] Wherein, using the initial control parameters corresponding to each index value, extracting the hash value subsequence corresponding to each index value from the hash value sequence includes:
[0040] For any index value, extract hash values between the a-th hash value and the k-th hash value in the hash value sequence, so as to form a hash value subsequence corresponding to the any index value using the extracted hash values, wherein a is a first initial parameter corresponding to the any index value, and k is a second initial parameter corresponding to the any index value;
[0041] Correspondingly, based on the hash value subsequences corresponding to the index values, the model initial values corresponding to the three groups of initial value indexes are calculated, including:
[0042] For any group of initial value indexes, the model initial value corresponding to the group of initial value indexes is calculated according to the following formula (3);
[0043]
[0044] In the above formula (3), x, y, z all represent the model initial values corresponding to any one of the groups of initial value indexes, p1 represents the hash value subsequence corresponding to the first index value in any one of the groups of initial value indexes, p2 represents the hash value subsequence corresponding to the second index value in any one of the groups of initial value indexes, p3 represents the hash value subsequence corresponding to the third index value in any one of the groups of initial value indexes, and BIN2DEC() represents a decimal conversion function.
[0045] In a possible design, the length of the scrambling key sequence is equal to the total number of pixels of the primary scrambling sensitive image;
[0046] The method of performing a second pixel scrambling process on the primary scrambled sensitive image by using the scrambled key sequence in the key sequence to obtain a secondary scrambled sensitive image includes:
[0047] Arranging the scrambled key sequence by columns and rows to obtain a first matrix and a second matrix respectively, wherein the number of rows of the first matrix and the second matrix is U, the number of columns is R, and the size of the primary scrambled sensitive image is U×R;
[0048] Based on the first matrix, determine the first matrix element corresponding to each pixel point in the primary scrambled sensitive image, and based on the second matrix, determine the second matrix element corresponding to each pixel point in the primary scrambled sensitive image;
[0049] According to the first matrix, a coordinate index is established for each pixel point in the first-level scrambled sensitive image to obtain a first coordinate matrix, and according to the second matrix, a coordinate index is established for each pixel point in the first-level scrambled sensitive image to obtain a second coordinate matrix, wherein the first coordinate of any pixel point in the first-level scrambled sensitive image in the first coordinate matrix is (X1, Y), X1 is the first matrix element corresponding to the any pixel point, Y is the ordinate of the any pixel point in the first-level scrambled sensitive image, and the second coordinate of any pixel point in the second coordinate matrix is (X, Y1), X is the abscissa of the any pixel point in the first-level scrambled sensitive image, and Y1 is the second matrix element corresponding to the any pixel point;
[0050] For any pixel point in the primary scrambled sensitive image, determine the first coordinate of the any pixel point from the first coordinate matrix, and determine the second coordinate that is the same as the first coordinate from the second coordinate matrix as the replacement pixel coordinate;
[0051] According to the replacement pixel coordinates, a replacement pixel point is determined from the primary scrambled sensitive image, and any pixel point is replaced by the replacement pixel point to complete the second pixel scrambling processing of any pixel point, and after all pixel points in the primary scrambled sensitive image are polled, the secondary scrambled sensitive image is obtained.
[0052] In a possible design, the length of the scrambling key sequence is equal to the total number of pixels of the secondary scrambled sensitive image;
[0053] The method of performing pixel scrambling processing on the secondary scrambled sensitive image based on the scrambled key sequence in the key sequence to obtain a scrambled sensitive image after the pixel scrambling processing comprises:
[0054] Performing row permutation processing on the scrambled key sequence to obtain a key matrix after the row permutation processing;
[0055] For the qth row in the secondary scrambled sensitive image, based on the key matrix and according to the following formula (4), pixel scrambling processing is performed on the qth row to obtain a pixel scrambled row corresponding to the qth row, so as to obtain the scrambled sensitive image when q is polled from 1 to Q;
[0056]
[0057] In the above formula (4), g q represents the qth row in the secondary scrambled sensitive image, r q represents the pixel disturbance row corresponding to the qth row, m q represents the qth row in the key matrix, r q-1 represents the pixel disturbance row corresponding to the q-1th row, g Q represents the Qth row in the secondary scrambled sensitive image, g Q-1 represents the Q-1th row in the secondary scrambled sensitive image, Q represents the total number of rows of the secondary scrambled sensitive image, and λ represents the disturbance control factor, wherein, represents a floor operation, and mod represents a modulo operation.
[0058] In one possible design, performing pixel encryption processing on the disrupted sensitive image according to the encryption key sequence in the key sequence to obtain an encrypted sensitive image after the pixel encryption processing includes:
[0059] Converting the encryption key sequence into a binary matrix, wherein the number of rows and the number of columns of the binary matrix are the same as the number of rows and the number of columns of the disrupted sensitive image;
[0060] For any pixel in the disturbance-sensitive image, determining a binary number corresponding to the any pixel from the binary matrix;
[0061] Determine whether the binary number is 1;
[0062] If yes, then obtain the next pixel point of any pixel point, and perform an XOR operation on the pixel value of any pixel point and the pixel value of the next pixel point of any pixel point to obtain an XOR operation result;
[0063] The pixel value of any pixel point is replaced by the result of XOR operation, so as to complete the encryption processing of any pixel point after the replacement, and obtain the encrypted sensitive image when all the pixels in the disturbed sensitive image are polled.
[0064] In a second aspect, a financial data privacy protection device is provided, comprising:
[0065] An acquisition unit, used for acquiring sensitive images in a financial database;
[0066] A pixel scrambling unit, used to construct an image scrambling model, and based on the image scrambling model, perform a first pixel scrambling process on the sensitive image to obtain a primary scrambled sensitive image;
[0067] A key generation unit, configured to construct a key model and generate a key sequence according to the sensitive image and the key model, wherein the key sequence includes a scrambled key sequence, a disrupted key sequence and an encrypted key sequence;
[0068] The pixel scrambling unit is further used to perform a second pixel scrambling process on the primary scrambled sensitive image using a scrambled key sequence in the key sequence to obtain a secondary scrambled sensitive image;
[0069] a pixel scrambling unit, configured to perform pixel scrambling processing on the secondary scrambled sensitive image based on the scrambling key sequence in the key sequence, so as to obtain a scrambled sensitive image after the pixel scrambling processing;
[0070] The encryption unit is used to perform pixel encryption processing on the disturbed sensitive image according to the encryption key sequence in the key sequence, so as to obtain an encrypted sensitive image after the pixel encryption processing.
[0071] According to a third aspect, another privacy protection device for financial data is provided. Taking the device as an electronic device as an example, the device includes a memory, a processor and a transceiver which are communicatively connected in sequence, wherein the memory is used to store computer programs, the transceiver is used to send and receive messages, and the processor is used to read the computer program to execute the privacy protection method for financial data as described in the first aspect or any one of the possible designs in the first aspect.
[0072] In a fourth aspect, a storage medium is provided, on which instructions are stored. When the instructions are executed on a computer, the privacy protection method for financial data as in the first aspect or any possible design of the first aspect is executed.
[0073] In a fifth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, causes the computer to execute the financial data privacy protection method as described in the first aspect or any possible design of the first aspect.
[0074] Beneficial effects:
[0075] (1) The present invention performs multi-level encryption processing on sensitive images, making the original images invisible; based on this, even if criminals invade the database, they cannot obtain the real image data. Therefore, the present invention ensures the storage security of sensitive images in the database and is very suitable for large-scale application and promotion in the field of privacy data protection technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] Figure 1 A schematic diagram of the steps of the method for protecting the privacy of financial data provided by an embodiment of the present invention;
[0077] Figure 2 A schematic diagram of the structure of a privacy protection device for financial data provided by an embodiment of the present invention;
[0078] Figure 3 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0079] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the present invention will be briefly introduced below in combination with the drawings and the description of the embodiments or the prior art. Obviously, the following description of the structure of the drawings is only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. It should be noted that the description of these embodiments is used to help understand the present invention, but does not constitute a limitation of the present invention.
[0080] It should be understood that although the terms first, second, etc. may be used herein to describe various units, these units should not be limited by these terms. These terms are only used to distinguish one unit from another unit. For example, a first unit can be referred to as a second unit, and similarly, a second unit can be referred to as a first unit without departing from the scope of the exemplary embodiments of the present invention.
[0081] It should be understood that the term "and / or" that may appear in this article is merely a description of the association relationship between associated objects, indicating that three relationships may exist. For example, A and / or B can represent three situations: A exists alone, B exists alone, and A and B exist at the same time. The term " / and" that may appear in this article describes another type of association object relationship, indicating that two relationships may exist. For example, A / and B can represent two situations: A exists alone, and A and B exist alone. In addition, the character " / " that may appear in this article generally indicates that the previous and next associated objects are in an "or" relationship.
[0082] Example:
[0083] See also Figure 1 As shown, the privacy protection method for financial data provided by the present embodiment constructs a pixel scrambling model and a corresponding key sequence to perform a multi-level encryption processing flow including pixel scrambling, pixel disturbance and encryption of pixels after pixel disturbance on sensitive images. In this way, the stored original image can be made invisible. Based on this, even if criminals invade the database, they cannot obtain the real image data; therefore, the present method ensures the storage security of sensitive images in the database, and is very suitable for large-scale application and promotion in the field of privacy data protection technology; among them, for example, the present method can be but not limited to running on the bank server side. It can be understood that the aforementioned execution subject does not constitute a limitation on the embodiments of the present application. Accordingly, the operation steps of the present method can be but not limited to the following steps S1 to S6.
[0084] S1. Acquire sensitive images in the financial database; in this embodiment, examples of sensitive images may include but are not limited to ID card photos, bank card photos, user face images, and various bank contract scans, etc.; of course, the type of sensitive images can be specifically set according to actual use, and is not limited to the aforementioned examples.
[0085] After obtaining the sensitive image in the financial database, it can be encrypted. In this embodiment, the sensitive image is encrypted mainly in three stages, namely, the pixel scrambling stage, the pixel disturbance stage and the encryption stage of the pixel points after the pixel disturbance. Based on this, the encrypted image can be greatly different from the original image, so that the original image is invisible. The pixel scrambling process can be but not limited to the following step S2.
[0086] S2. Construct an image scrambling model, and based on the image scrambling model, perform a first pixel scrambling process on the sensitive image to obtain a first-level scrambled sensitive image; in a specific implementation, one of the expressions of the following public image scrambling model may be, but is not limited to, as shown in the following formula (5).
[0087] Y l+1=cos(τarccosY l ) (5)
[0088] In the above formula (5), Y l represents the model value of the image scrambling model at the lth iteration, Y l+1 represents the model value of the image scrambling model at the l+1th iteration, τ represents the scrambling control parameter, where τ is greater than or equal to 2, and Y l ∈[-1,1].
[0089] Thus, this embodiment generates an image scrambling parameter based on the aforementioned formula (5), and then implements the first pixel scrambling processing of the sensitive image based on the image scrambling parameter; wherein the first pixel scrambling processing process may be, but is not limited to, as shown in the following steps S21 to S29.
[0090] S21. Select a number of pixels from the sensitive image, and divide the pixels into a first pixel set and a second pixel set, wherein the number of pixels in the first pixel set is the same as the number of pixels in the second pixel set; in a specific implementation, the sensitive image is first binarized, and then a number of pixels are selected from the binarized image for pixel division; optionally, for example, but not limited to, 100 pixels are selected from the binarized image and then evenly divided to obtain the aforementioned first pixel set and second pixel set.
[0091] In this way, after completing the averaging of the pixels, the initial parameters of the aforementioned image scrambling model can be generated based on the set of pixels obtained by averaging, so as to generate the image scrambling parameters based on the initial parameters; wherein, the generation process of the initial parameters of the image scrambling model can be but is not limited to as shown in the following steps S22 and S23.
[0092] S22. Calculate the pixel average of all pixels in the first pixel set and the pixel average of all pixels in the second pixel set to obtain a first mean and a second mean, respectively. In this embodiment, as described above, the selected pixels are pixels in the binarized sensitive image. Therefore, the pixel value of any pixel is 1 or 0. Based on this, the value range of the first mean and the second mean is (0, 1]; thus, the above Y l Based on this, the first mean and the second mean can be used to determine the initial parameters of the image scrambling model, and the determination process can be but not limited to the following step S23.
[0093] S23. Based on the first mean and the second mean, generate initial parameters of the image scrambling model; in this embodiment, the initial parameters include the scrambling control parameters in the aforementioned formula (1) and the model value when the number of iterations is 1, wherein the first mean can be directly used as Y1, and the first mean is added with 2 to obtain the scrambling control parameters; in this way, after obtaining the aforementioned initial parameters, an image scrambling parameter sequence can be determined based on this, so that the image scrambling parameters can be generated according to the image scrambling parameter sequence later; optionally, the generation process of the image scrambling parameter sequence can be but is not limited to the following step S24.
[0094] S24. Generate an image scrambling parameter sequence using the initial parameters and the image scrambling model. In this embodiment, the initial parameters are substituted into the aforementioned formula (1), and after multiple iterations, a model value can be obtained in each iteration process. Based on this, after the iteration is completed, an image scrambling parameter sequence can be formed, that is, each image scrambling parameter in the image scrambling parameter sequence is a model value at different iteration times in formula (1).
[0095] After the image scrambling parameter sequence is obtained, the image scrambling parameters may be determined based on the sequence, and the process may be, but is not limited to, as shown in the following step S25.
[0096] S25. Randomly select an image scrambling parameter from the image scrambling parameter sequence, and perform rounding on the selected image scrambling parameter to obtain a rounding result; in this embodiment, as described above, Y l The value range of is [-1,1]. Therefore, the rounding process can be, but is not limited to, as follows: if the image scrambling parameter is 1, 0 or -1, the rounding result is itself; at the same time, if the image scrambling parameter is in (0,0.5], the rounding result is 0, and if the image scrambling parameter is in (0.5,1), the rounding result is 1; similarly, if the image scrambling parameter is in [-0.5,0), the rounding result is 0, and if the image scrambling parameter is in (-1,-0.5), the rounding result is -1.
[0097] Based on this, after obtaining the rounding result, an image scrambling label can be generated so that the image scrambling method can be matched based on the image scrambling label later; wherein the image scrambling method matching process can be but is not limited to as shown in the following step S26.
[0098] S26. Based on the rounding result, an image scrambling label is generated, and according to the image scrambling label, an image scrambling method is determined from an image scrambling database, wherein the image scrambling database stores a plurality of image scrambling methods, and each image scrambling method is provided with an image scrambling label; in a specific implementation, for example, a Fibonacci scrambling method, an Arno ld scrambling method and a Zigzag scrambling method exist in the image scrambling database; optionally, for example, the image scrambling labels corresponding to the above three scrambling methods are -1, 0, and 1 respectively; therefore, the corresponding image scrambling method can be matched in the image scrambling database according to the rounding result.
[0099] After the image scrambling mode is obtained, the first pixel scrambling process of the sensitive image may be performed based on the matched image scrambling mode, and the process may be but not limited to the following steps S27 to S29.
[0100] S27. Perform channel separation processing on the sensitive image to obtain a red component image, a green component image and a blue component image, and rotate the red component image, the green component image and the blue component image to obtain a rotated red component image, a rotated green component image and a rotated blue component image, respectively, wherein the rotation angles of the red component image, the green component image and the blue component image are different; in specific applications, for example, the rotation angles of the red component image, the green component image and the blue component image can be, but not limited to, 90°, 180° and 270°, respectively; in this way, after rotating the images of the three color components, the above-mentioned determined image scrambling method can be used to perform pixel scrambling processing of the image, and the process is shown in the following step S28.
[0101] S28. Using the determined image scrambling method, perform a first pixel scrambling process on the rotated red component image, the rotated green component image, and the rotated blue component image, so as to obtain a scrambled red component image, a scrambled green component image, and a scrambled blue component image after the first pixel scrambling process; in this embodiment, the aforementioned scrambling method is a commonly used technology for image scrambling, and its principle will not be repeated.
[0102] In this way, after obtaining the scrambled red, blue and green component images, image stitching can be performed to obtain the aforementioned primary scrambled sensitive image; wherein the image stitching process can be but is not limited to as shown in the following step S29.
[0103] S29. Horizontally splicing the scrambled red component image, the scrambled green component image, and the scrambled blue component image to obtain the primary scrambled sensitive image after the horizontal splicing process.
[0104] In this way, through the aforementioned steps S21 to S29, the image scrambling model can be used to complete the first step of pixel scrambling processing of the sensitive image; then, a key model can be constructed, and different keys can be generated based on it to perform multiple encryption processing on the first-level scrambled sensitive image; wherein, the key sequence generation process can be but is not limited to as shown in the following step S3.
[0105] S3. Construct a key model, and generate a key sequence based on the sensitive image and the key model, wherein the key sequence includes a scrambled key sequence, a disrupted key sequence and an encrypted key sequence; in a specific implementation, one of the following forms of the public key model may be, but is not limited to, as shown in the following formula (6).
[0106]
[0107] In the above formula (6), x(σ), y(σ), z(σ) all represent state variables at the σth iteration (that is, the key value at the σth iteration), x(σ+1), y(σ+1), z(σ+1) represent state variables at the σ+1th iteration, and ψ, ω all represent key control factors; wherein tri[] represents a triangular wave function, whose function value range is [-1, 1], and for example, ψ, ω can be set to 10 and 0.06 respectively but not limited to, respectively.
[0108] Thus, based on the aforementioned formula (6), it can be known that the key sequence is actually a hyperchaotic system. Therefore, it is only necessary to determine its initial value to iteratively generate the key sequence. For example, but not limited to, the following steps S11 to S37 can be used to generate the aforementioned key sequence.
[0109] S31. Perform a hash operation on the sensitive image to obtain a hash value sequence. In a specific implementation, for example, but not limited to, a SHA-256 hash function is used to perform a hash operation on the sensitive image to obtain a 256-bit hash value sequence. After obtaining the hash value sequence, the initial value of the key model can be calculated based on the hash value sequence. The process can be, but not limited to, as shown in the following steps S32 to S35.
[0110] S32. Obtain an initial value index set of the key model, wherein the initial value index set includes three groups of initial value indexes, and each group of initial value indexes includes three index values; in this embodiment, the three groups of initial value indexes are taken as examples (1, 5, 8); (2, 6, 9); (3, 7, 10); thus, after obtaining the initial value index set, the initial control parameters of each index value can be generated based on the set, and the determination process can be but is not limited to as shown in the following step S33.
[0111] S33. Generate initial control parameters corresponding to each index value in each group of initial value indexes according to the initial value index set; in specific implementation, take any index value as an example to illustrate the generation process of its corresponding initial control parameters, which can be but not limited to: (1) for any index value, first calculate the first initial parameter and the second initial parameter corresponding to the any index value; (2) use the first initial parameter and the second initial parameter to form the initial control parameter corresponding to the any index value.
[0112] Optionally, for example, but not limited to, formula (1) and formula (2) may be used to calculate the first initial parameter and the second initial parameter corresponding to any index value.
[0113] b1=δ×(p-1)+1 (1)
[0114] b2=δ×(p-1)+40 (2)
[0115] In the above formula (1), b1 represents the first initial parameter, p represents any index value, and δ represents the control factor; in the above formula (2), b2 represents the second initial parameter; wherein, the control factor can be, but is not limited to, 5; thus, assuming that any index value is 1, then the first initial parameter is 1 and the second initial parameter is 40; similarly, when the index values are different, the calculation process of the corresponding first and second initial parameters is the same as the above example, and will not be repeated here.
[0116] After the initial control parameters of each index value are calculated based on the above formula (1) and formula (2), the hash value subsequence corresponding to each index value can be intercepted based on this, and the process can be but not limited to the following step S34.
[0117] S34. Using the initial control parameters corresponding to each index value, extract the hash value subsequence corresponding to each index value from the hash value sequence; in the specific implementation, any index value is taken as an example for explanation, and the corresponding hash value subsequence extraction process is: extract the hash values between the a-th hash value and the k-th hash value in the hash value sequence, and use the extracted hash values to form the hash value subsequence corresponding to any index value, wherein a is the first initial parameter corresponding to any index value, and k is the second initial parameter corresponding to any index value; optionally, the explanation is still based on the above example, assuming that any index value is 1, then the hash values between the 1st and 40th bits in the hash value sequence are extracted to form the hash value subsequence corresponding to any of the above index values.
[0118] Thus, after obtaining the hash value subsequences corresponding to the index values based on the aforementioned step S34, the model initial values corresponding to the three groups of initial value indexes can be calculated based on this, and the process can be but not limited to as shown in the following step S35.
[0119] S35. Based on the hash value subsequences corresponding to the respective index values, the model initial values corresponding to the three groups of initial value indexes are calculated; in specific applications, for any group of initial value indexes, the model initial values corresponding to the said any group of initial value indexes can be calculated by, for example but not limited to, the following formula (3).
[0120]
[0121] In the above formula (3), x, y, z all represent the model initial values corresponding to any one of the groups of initial value indexes, p1 represents the hash value subsequence corresponding to the first index value in any one of the groups of initial value indexes, p2 represents the hash value subsequence corresponding to the second index value in any one of the groups of initial value indexes, p3 represents the hash value subsequence corresponding to the third index value in any one of the groups of initial value indexes, and BIN2DEC() represents a decimal conversion function.
[0122] In this embodiment, the aforementioned group of initial value indexes (1, 5, 8) is taken as an example, that is, p1 is the hash value subsequence corresponding to 1 (that is, the first to fortieth hash values in the hash value sequence), p2 is the hash value subsequence corresponding to 5, and p3 is the hash value subsequence corresponding to 8. Based on this, the hash value subsequences of the aforementioned index values are substituted into the aforementioned formula (3) to obtain a group of model initial values; then, using the same principle, the remaining two groups of model initial values can be calculated.
[0123] After the three groups of model initial values are calculated, the aforementioned key sequence can be generated based on them, and the process can be but not limited to as shown in the following steps S36 and S37.
[0124] S36. Substitute the three groups of model initial values into the key model respectively to generate the scrambling key sequence, the disrupted key sequence and the encrypted key sequence respectively; in this embodiment, the three groups of model initial values are substituted into the aforementioned key model respectively to generate three different groups of keys, and these three groups of keys can be used as the scrambling key sequence, the disrupted key sequence and the encrypted key sequence respectively; finally, the aforementioned three groups of keys can be used to form a key sequence, and the process is shown in the following step S37.
[0125] S37. The key sequence is composed of a scrambled key sequence, a disrupted key sequence and an encrypted key sequence; in this embodiment, the length of the aforementioned three groups of key sequences is taken as U×R, where U×R is the size of the first-level scrambled sensitive image; wherein, after the initial values of the three groups of models are substituted into the aforementioned key model, the initial length of the three groups of keys generated is: U×R+2000; therefore, the first 2000 keys can be discarded, and only the last U×R keys are retained to form a scrambled key sequence, a disrupted key sequence and an encrypted key sequence; in this way, the length of the aforementioned scrambled key sequence, the disrupted key sequence and the encrypted key sequence is equal to the total number of pixels of the first-level scrambled sensitive image.
[0126] Therefore, based on the aforementioned steps S31 to S37, after the random key sequence, the scrambled key sequence and the encrypted key sequence are generated, multiple encryptions of the primary scrambled sensitive image can be performed based on them; wherein, in this embodiment, the second pixel scrambling processing of the primary scrambled sensitive image is first performed (i.e., pixel scrambling is performed again); then, pixel scrambling is performed again; finally, the pixel points after pixel scrambling can be encrypted to obtain an encrypted sensitive image; optionally, the secondary pixel scrambling processing process can be but is not limited to as shown in the following step S4.
[0127] S4. Using the scrambled key sequence in the key sequence, perform a second pixel scrambling process on the primary scrambled sensitive image to obtain a secondary scrambled sensitive image; in this embodiment, for example, but not limited to, the following steps S41 to S45 can be used to complete the secondary pixel scrambling process of the primary scrambled sensitive image.
[0128] S41. Arrange the scrambled key sequence by columns and rows to obtain a first matrix and a second matrix respectively, wherein the number of rows of the first matrix and the second matrix is U, the number of columns is R, and the size of the first-level scrambled sensitive image is U×R; in specific applications, the column arrangement is to arrange the scrambled keys in the scrambled key sequence in column order. For example, assuming that the scrambled keys in the scrambled key sequence are 1-9, the first column in the first matrix is 1-3, the second column is 4-6, and the third column is 7-9; similarly, the first column in the second matrix is 1, 4 and 7, the second column is 2, 5, 8, and the third column is 3, 6, 9; of course, the above examples are only for illustration, and the scrambled key sequence is not limited to this.
[0129] After obtaining the first matrix and the second matrix, element matching can be performed on each pixel point in the first-level scrambled sensitive image based on this to obtain the first matrix element and the second matrix element corresponding to each pixel point; wherein the element matching process can be but is not limited to as shown in the following step S42.
[0130] S42. Based on the first matrix, determine the first matrix element corresponding to each pixel point in the first-level scrambled sensitive image, and based on the second matrix, determine the second matrix element corresponding to each pixel point in the first-level scrambled sensitive image; in this embodiment, the first-level scrambled sensitive image is actually also a matrix, and the size is the same as the first matrix and the second matrix; therefore, the position of each pixel point in the pixel matrix corresponding to the first-level scrambled sensitive image is one-to-one corresponding to the first matrix and the second matrix; for example, the pixel point in the lower left corner of the pixel matrix, its corresponding first matrix element is 3, and the corresponding second matrix element is 7; of course, the matching process of the first matrix elements and the second matrix elements corresponding to the remaining pixel points is the same as the above example, and they are all matched according to the position in the matrix, and the process will not be repeated one by one.
[0131] In this way, after obtaining the second matrix elements corresponding to each pixel point in the first-level scrambling sensitive image, a coordinate index can be established based on this, so that the pixel point scrambling processing can be performed based on the coordinate index subsequently; wherein, the coordinate index establishment process can be but is not limited to as shown in the following step S43.
[0132] S43. According to the first matrix, a coordinate index is established for each pixel point in the first-level scrambled sensitive image to obtain a first coordinate matrix, and according to the second matrix, a coordinate index is established for each pixel point in the first-level scrambled sensitive image to obtain a second coordinate matrix, wherein the first coordinate of any pixel point in the first-level scrambled sensitive image in the first coordinate matrix is (X1, Y), X1 is the first matrix element corresponding to the any pixel point, Y is the vertical coordinate of the any pixel point in the first-level scrambled sensitive image, and the second coordinate of any pixel point in the second coordinate matrix is (X, Y1), X is the horizontal coordinate of the any pixel point in the first-level scrambled sensitive image, and Y1 is the second matrix element corresponding to the any pixel point.
[0133] In this embodiment, the aforementioned step S43 is explained by taking an example. Assuming that the pixel coordinates of any pixel point are (2,0), the corresponding first matrix element is 6, and the corresponding second matrix element is 8, then the first coordinate of any pixel point is (6,0); the corresponding second coordinate is (2,8); based on this, it is equivalent to that the vertical coordinate of the first coordinate remains unchanged, and the horizontal coordinate becomes the corresponding first matrix element; similarly, the horizontal coordinate of the second coordinate remains unchanged, and the vertical coordinate becomes the corresponding second matrix element; of course, the process of establishing the coordinate indexes corresponding to the remaining pixel points is the same as the aforementioned example, and the process will not be repeated.
[0134] After the first coordinate matrix and the second coordinate matrix are established, pixel scrambling processing can be performed based on them, and the process can be but is not limited to the following steps S44 and S45.
[0135] S44. For any pixel point in the first-level scrambling sensitive image, determine the first coordinate of the any pixel point from the first coordinate matrix, and determine the second coordinate that is the same as the first coordinate from the second coordinate matrix as the replacement pixel coordinate; in this embodiment, it is still explained on the basis of the above example, that is, assuming that the pixel coordinate of any pixel point is (2,0), and its first coordinate in the first coordinate matrix is (6,0), then, the second coordinate of (6,0) is determined in the second coordinate matrix, and then (6,0) in the second coordinate matrix is used as the replacement pixel coordinate; then, the pixel point scrambling processing can be performed based on the replacement pixel coordinate, and the processing process can be but is not limited to the following step S45.
[0136] S45. According to the replacement pixel coordinates, a replacement pixel point is determined from the primary scrambled sensitive image, and any pixel point is replaced by the replacement pixel point to complete the second pixel scrambling processing of any pixel point, and after all the pixel points in the primary scrambled sensitive image are polled, the secondary scrambled sensitive image is obtained; in a specific implementation, assuming that in the second coordinate matrix, the element with the second coordinate (6,0) has the pixel coordinate (1,3) of the corresponding pixel point, then any pixel point is replaced by a pixel point with the pixel coordinate (1,3), at this time, the pixel scrambling processing of any pixel point can be completed; then, according to the same principle as above, the scrambling processing of the remaining pixel points in the primary scrambled sensitive image can be completed, thereby obtaining the secondary scrambled sensitive image.
[0137] Thus, through the aforementioned steps S41 to S45, the second pixel scrambling processing of the primary scrambled sensitive image can be completed; then, the pixel scrambling processing of the secondary scrambled sensitive image can be performed with the help of the scrambling key sequence, and the processing process can be but is not limited to the following step S5.
[0138] S5. Based on the scrambled key sequence in the key sequence, the secondary scrambled sensitive image is subjected to pixel scrambling processing, so as to obtain a scrambled sensitive image after the pixel scrambling processing; in specific applications, for example, but not limited to, the scrambled key sequence is first subjected to row arrangement processing, so as to obtain a key matrix after the row arrangement processing; then, the aforementioned key matrix is used to perform pixel scrambling processing on each row of pixel points in the secondary scrambled sensitive image, so as to obtain a scrambled sensitive image after the pixel scrambling processing; in this embodiment, the row arrangement process of the scrambled key sequence has been explained above, and its principle will not be repeated here.
[0139] At the same time, for the qth row in the secondary scrambled sensitive image, the following formula (4) may be used, for example but not limited to, to perform pixel scrambling processing on the qth row to obtain pixel scrambling corresponding to the qth row.
[0140]
[0141] In the above formula (4), g q represents the qth row in the secondary scrambled sensitive image, r q represents the pixel disturbance row corresponding to the qth row, m q represents the qth row in the key matrix, r q-1 represents the pixel disturbance row corresponding to the q-1th row, g Q represents the Qth row in the secondary scrambled sensitive image, g Q-1 represents the Q-1th row in the secondary scrambled sensitive image, Q represents the total number of rows of the secondary scrambled sensitive image, and λ represents the disturbance control factor, wherein, represents a rounding down operation, and mod represents a modulo operation; in this embodiment, the disturbance control factor may be, but is not limited to, 256, and It represents the exclusive OR operation.
[0142] In this way, based on the aforementioned formula (4), the pixel disturbance processing of the qth row of pixels in the secondary scrambled sensitive image can be realized; then, the remaining rows are processed by the same principle until q is polled from 1 to Q, and the disturbance sensitive image can be obtained; further, in this embodiment, the disturbance sensitive image can also be subjected to secondary pixel disturbance processing, and its principle is the same as the aforementioned primary pixel disturbance processing, which will not be repeated here.
[0143] Based on this, after obtaining the disturbed sensitive image, the encryption key sequence can be used to implement encryption processing of each pixel in the disturbed sensitive image, and the process can be but not limited to the following step S6.
[0144] S6. According to the encryption key sequence in the key sequence, the disrupted sensitive image is subjected to pixel encryption processing to obtain an encrypted sensitive image after the pixel encryption processing; in specific implementation, for example, but not limited to, the following steps S61 to S65 can be used to complete the encryption processing of the disrupted sensitive image.
[0145] S61. Convert the encryption key sequence into a binary matrix, wherein the number of rows and columns of the binary matrix are the same as the number of rows and columns of the disrupted sensitive image. In this embodiment, a key threshold (such as the mean of all encryption keys in the encryption key sequence) may be set first, but is not limited to, for any encryption key in the encryption key sequence, if the any encryption key is less than the aforementioned key threshold, then the any encryption key is set to 0; otherwise, the any encryption key is set to 1. In this way, according to the aforementioned principle, the encryption key sequence can be converted into a binary matrix. Then, based on the binary matrix, encryption processing of the disrupted sensitive image can be performed, and the process may be but is not limited to the following steps S62 to S65.
[0146] S62. For any pixel in the disturbance-sensitive image, determine the binary number corresponding to the any pixel from the binary matrix; in the present embodiment, since the length of the encryption key sequence is the same as the total number of pixels in the first-level scrambled sensitive image, and the image size has not changed during the aforementioned second pixel scrambling and pixel scrambling processing; therefore, the size of the binary matrix is the same as the size of the matrix formed by the pixels corresponding to the disturbance-sensitive image; based on this, each pixel in the disturbance-sensitive image corresponds to a binary number in the binary matrix; in this way, after determining the binary number corresponding to any pixel, pixel encryption processing can be performed based on the binary number, and the process can be but not limited to as shown in the following steps S63 and S64.
[0147] S63. Determine whether the binary number is 1.
[0148] S64. If so, obtain the next pixel of any pixel, and perform an XOR operation on the pixel value of any pixel and the pixel value of the next pixel to obtain an XOR operation result; in this embodiment, if any pixel is the last pixel, then its next pixel may be but is not limited to the first pixel in the disturbed sensitive image; in this way, after performing an XOR operation on the pixel value of any pixel and the next pixel, the XOR operation result may be used to replace the any pixel, and the process may be but is not limited to the following step S65.
[0149] S65. Replace the pixel value of any pixel point with the result of XOR operation, so as to complete the encryption processing of any pixel point after the replacement, and obtain the encrypted sensitive image when all the pixels in the disturbed sensitive image are polled; in this embodiment, if the binary number corresponding to any of the aforementioned pixels is 0, then no processing is performed.
[0150] In this way, through the aforementioned steps S61 to S65, after each pixel in the disturbed sensitive image is encrypted, the corresponding pixel value is 1 or 0, and displayed on the image, it is black or white. Therefore, part or all of the pixels in the entire disturbed sensitive image can be changed to a black and white background, thereby achieving the purpose of covering up the original image.
[0151] Therefore, through the privacy protection method of financial data described in detail in the aforementioned steps S1 to S6, the present invention constructs a pixel scrambling model and a corresponding key sequence to perform a multi-level encryption processing flow including pixel scrambling, pixel disturbance and encryption of pixel points after pixel disturbance on sensitive images. In this way, the stored original image can be made invisible. Based on this, even if criminals invade the database, they cannot obtain the real image data; therefore, the present invention ensures the storage security of sensitive images in the database, and is very suitable for large-scale application and promotion in the field of privacy data protection technology.
[0152] like Figure 2 As shown, the second aspect of this embodiment provides a hardware device for implementing the financial data privacy protection method described in the first aspect of the embodiment, including:
[0153] The acquisition unit is used to acquire sensitive images in the financial database.
[0154] The pixel scrambling unit is used to construct an image scrambling model, and based on the image scrambling model, perform a first pixel scrambling process on the sensitive image to obtain a first-level scrambled sensitive image.
[0155] The key generation unit is used to construct a key model and generate a key sequence according to the sensitive image and the key model, wherein the key sequence includes a scrambled key sequence, a disrupted key sequence and an encrypted key sequence.
[0156] The pixel scrambling unit is further used to perform a second pixel scrambling process on the primary scrambled sensitive image using a scrambled key sequence in the key sequence to obtain a secondary scrambled sensitive image.
[0157] The pixel scrambling unit is used to perform pixel scrambling processing on the secondary scrambled sensitive image based on the scrambling key sequence in the key sequence, so as to obtain a scrambled sensitive image after the pixel scrambling processing.
[0158] The encryption unit is used to perform pixel encryption processing on the disturbed sensitive image according to the encryption key sequence in the key sequence, so as to obtain an encrypted sensitive image after the pixel encryption processing.
[0159] The working process, working details and technical effects of the device provided in this embodiment can be found in the first aspect of the embodiment and will not be described in detail here.
[0160] like Figure 3 As shown, the third aspect of this embodiment provides another privacy protection device for financial data. Taking the device as an electronic device as an example, it includes: a memory, a processor and a transceiver that are communicatively connected in sequence, wherein the memory is used to store computer programs, the transceiver is used to send and receive messages, and the processor is used to read the computer program to execute the privacy protection method for financial data as described in the first aspect of the embodiment.
[0161] For example, the memory may include, but is not limited to, random access memory (RAM), read-only memory (ROM), flash memory, first-in-first-out memory (FIFO) and / or first-in-last-out memory (FILO), etc. Specifically, the processor may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). At the same time, the processor may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state.
[0162] In some embodiments, the processor may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. For example, the processor may not be limited to a microprocessor of the STM32F105 series, a reduced instruction set computer (RISC) microprocessor, an X86 or other architecture processor, or a processor with an integrated embedded neural network processor (NPU); the transceiver may be, but is not limited to, a wireless fidelity (WIFI) wireless transceiver, a Bluetooth wireless transceiver, a general packet radio service technology (Genera l Packet Rad ioService, GPRS) wireless transceiver, a ZigBee protocol (a low-power LAN protocol based on the IEEE 802.15.4 standard, ZigBee) wireless transceiver, a 3G transceiver, a 4G transceiver and / or a 5G transceiver, etc. In addition, the device may also include, but is not limited to, a power module, a display screen and other necessary components.
[0163] The working process, working details and technical effects of the electronic device provided in this embodiment can be found in the first aspect of the embodiment and will not be described in detail here.
[0164] The fourth aspect of this embodiment provides a storage medium that stores instructions including the method for protecting the privacy of financial data described in the first aspect of the embodiment, that is, the storage medium stores instructions, and when the instructions are run on a computer, the method for protecting the privacy of financial data described in the first aspect of the embodiment is executed.
[0165] The storage medium refers to a carrier for storing data, which may include but is not limited to a floppy disk, a CD, a hard disk, a flash memory, a USB flash drive and / or a memory stick, etc. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
[0166] The working process, working details and technical effects of the storage medium provided in this embodiment can be found in the first aspect of the embodiment and will not be described in detail here.
[0167] The fifth aspect of this embodiment provides a computer program product containing instructions, which, when executed on a computer, enables the computer to execute the method for protecting the privacy of financial data as described in the first aspect of the embodiment, wherein the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
[0168] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for protecting the privacy of financial data, characterized in that: include: Access sensitive images in financial databases; An image scrambling model is constructed, and based on the image scrambling model, a first pixel scrambling process is performed on the sensitive image to obtain a first-level scrambled sensitive image; Constructing a key model, and generating a key sequence according to the sensitive image and the key model, wherein the key sequence includes a scrambled key sequence, a disrupted key sequence and an encrypted key sequence; Using the scrambled key sequence in the key sequence, performing a second pixel scrambling process on the primary scrambled sensitive image to obtain a secondary scrambled sensitive image; Based on the scrambled key sequence in the key sequence, performing pixel scrambling processing on the secondary scrambled sensitive image to obtain a scrambled sensitive image after the pixel scrambling processing; According to the encryption key sequence in the key sequence, pixel encryption processing is performed on the disturbed sensitive image to obtain an encrypted sensitive image after the pixel encryption processing.
2. The method according to claim 1, characterized in that Based on the image scrambling model, performing a first pixel scrambling process on the sensitive image to obtain a first-level scrambled sensitive image includes: Selecting a number of pixels from the sensitive image, and dividing the number of pixels into a first pixel set and a second pixel set, wherein the number of pixels in the first pixel set and the number of pixels in the second pixel set are the same; Calculating a pixel average value of all pixels in the first pixel point set and a pixel average value of all pixels in the second pixel point set to obtain a first mean value and a second mean value, respectively; Based on the first mean and the second mean, generating initial parameters of the image scrambling model; Generate an image scrambling parameter sequence using the initial parameters and the image scrambling model; Randomly selecting an image scrambling parameter from the image scrambling parameter sequence, and performing rounding processing on the selected image scrambling parameter to obtain a rounding result; Based on the rounding result, an image scrambling label is generated, and according to the image scrambling label, an image scrambling mode is determined from an image scrambling database, wherein the image scrambling database stores a plurality of image scrambling modes, and each image scrambling mode is provided with an image scrambling label; performing channel separation processing on the sensitive image to obtain a red component image, a green component image and a blue component image, and performing rotation processing on the red component image, the green component image and the blue component image to obtain a rotated red component image, a rotated green component image and a rotated blue component image, respectively, wherein the rotation angles of the red component image, the green component image and the blue component image are different; Using the determined image scrambling method, performing a first pixel scrambling process on the rotated red component image, the rotated green component image, and the rotated blue component image, so as to obtain a scrambled red component image, a scrambled green component image, and a scrambled blue component image after the first pixel scrambling process; The scrambled red component image, the scrambled green component image, and the scrambled blue component image are horizontally spliced to obtain the primary scrambled sensitive image after the horizontal splicing.
3. The method according to claim 1, characterized in that Generating a key sequence according to the sensitive image and the key model, including: Performing a hash operation on the sensitive image to obtain a hash value sequence; Obtaining an initial value index set of the key model, wherein the initial value index set includes three groups of initial value indexes, and each group of initial value indexes includes three index values; Generate, according to the initial value index set, initial control parameters corresponding to each index value in each group of initial value indexes; Using the initial control parameters corresponding to the respective index values, extracting the hash value subsequences corresponding to the respective index values from the hash value sequence; Based on the hash value subsequences corresponding to the index values, the model initial values corresponding to the three groups of initial value indexes are calculated; Substituting three groups of model initial values into the key model respectively to generate the scrambling key sequence, the disrupting key sequence and the encryption key sequence respectively; The key sequence is composed by using a scrambled key sequence, a disrupted key sequence and an encrypted key sequence.
4. The method according to claim 3, characterized in that Generating initial control parameters corresponding to each index value in each group of initial value indexes according to the initial value index set includes: For any index value, the first initial parameter and the second initial parameter corresponding to the any index value are calculated according to the following formula (1) and formula (2); b1=δ×(p-1)+1 (1) b2=δ×(p-1)+40 (2) In the above formula (1), b1 represents the first initial parameter, p represents any index value, and δ represents a control factor; In the above formula (2), b2 represents the second initial parameter; Using the first initial parameter and the second initial parameter, an initial control parameter corresponding to any index value is formed; Wherein, using the initial control parameters corresponding to each index value, extracting the hash value subsequence corresponding to each index value from the hash value sequence includes: For any index value, extract hash values between the a-th hash value and the k-th hash value in the hash value sequence, so as to form a hash value subsequence corresponding to the any index value using the extracted hash values, wherein a is a first initial parameter corresponding to the any index value, and k is a second initial parameter corresponding to the any index value; Correspondingly, based on the hash value subsequences corresponding to the index values, the model initial values corresponding to the three groups of initial value indexes are calculated, including: For any group of initial value indexes, the model initial value corresponding to the group of initial value indexes is calculated according to the following formula (3); In the above formula (3), x, y, z all represent the model initial values corresponding to any one of the groups of initial value indexes, p1 represents the hash value subsequence corresponding to the first index value in any one of the groups of initial value indexes, p2 represents the hash value subsequence corresponding to the second index value in any one of the groups of initial value indexes, p3 represents the hash value subsequence corresponding to the third index value in any one of the groups of initial value indexes, and BIN2DEC() represents a decimal conversion function.
5. The method according to claim 1, characterized in that The length of the scrambling key sequence is equal to the total number of pixels of the primary scrambling sensitive image; The method of performing a second pixel scrambling process on the primary scrambled sensitive image by using the scrambled key sequence in the key sequence to obtain a secondary scrambled sensitive image includes: Arranging the scrambled key sequence by columns and rows to obtain a first matrix and a second matrix respectively, wherein the number of rows of the first matrix and the second matrix is U, the number of columns is R, and the size of the primary scrambled sensitive image is U×R; Based on the first matrix, determine the first matrix element corresponding to each pixel point in the primary scrambled sensitive image, and based on the second matrix, determine the second matrix element corresponding to each pixel point in the primary scrambled sensitive image; According to the first matrix, a coordinate index is established for each pixel point in the first-level scrambled sensitive image to obtain a first coordinate matrix, and according to the second matrix, a coordinate index is established for each pixel point in the first-level scrambled sensitive image to obtain a second coordinate matrix, wherein the first coordinate of any pixel point in the first-level scrambled sensitive image in the first coordinate matrix is (X1, Y), X1 is the first matrix element corresponding to the any pixel point, Y is the ordinate of the any pixel point in the first-level scrambled sensitive image, and the second coordinate of any pixel point in the second coordinate matrix is (X, Y1), X is the abscissa of the any pixel point in the first-level scrambled sensitive image, and Y1 is the second matrix element corresponding to the any pixel point; For any pixel point in the primary scrambled sensitive image, determine the first coordinate of the any pixel point from the first coordinate matrix, and determine the second coordinate that is the same as the first coordinate from the second coordinate matrix as the replacement pixel coordinate; According to the replacement pixel coordinates, a replacement pixel point is determined from the primary scrambled sensitive image, and any pixel point is replaced by the replacement pixel point to complete the second pixel scrambling processing of any pixel point, and after all pixel points in the primary scrambled sensitive image are polled, the secondary scrambled sensitive image is obtained.
6. The method according to claim 1, characterized in that The length of the scrambling key sequence is equal to the total number of pixels of the secondary scrambling sensitive image; The method of performing pixel scrambling processing on the secondary scrambled sensitive image based on the scrambled key sequence in the key sequence to obtain a scrambled sensitive image after the pixel scrambling processing comprises: Performing row permutation processing on the scrambled key sequence to obtain a key matrix after the row permutation processing; For the qth row in the secondary scrambled sensitive image, based on the key matrix and according to the following formula (4), pixel scrambling processing is performed on the qth row to obtain a pixel scrambled row corresponding to the qth row, so as to obtain the scrambled sensitive image when q is polled from 1 to Q; In the above formula (4), g q represents the qth row in the secondary scrambled sensitive image, r q represents the pixel disturbance row corresponding to the qth row, m q represents the qth row in the key matrix, r q-1 represents the pixel disturbance row corresponding to the q-1th row, g Q represents the Qth row in the secondary scrambled sensitive image, g Q-1 represents the Q-1th row in the secondary scrambled sensitive image, Q represents the total number of rows of the secondary scrambled sensitive image, and λ represents the disturbance control factor, wherein, represents a floor operation, and mod represents a modulo operation.
7. The method according to claim 1, characterized in that According to the encryption key sequence in the key sequence, pixel encryption processing is performed on the disturbed sensitive image to obtain an encrypted sensitive image after the pixel encryption processing, including: Converting the encryption key sequence into a binary matrix, wherein the number of rows and the number of columns of the binary matrix are the same as the number of rows and the number of columns of the disrupted sensitive image; For any pixel in the disturbance-sensitive image, determining a binary number corresponding to the any pixel from the binary matrix; Determine whether the binary number is 1; If yes, then obtain the next pixel point of any pixel point, and perform an XOR operation on the pixel value of any pixel point and the pixel value of the next pixel point of any pixel point to obtain an XOR operation result; The pixel value of any pixel point is replaced by the XOR operation result, so as to complete the encryption processing of any pixel point after the replacement, and obtain the encrypted sensitive image when all the pixels in the disturbed sensitive image are polled.
8. A privacy protection device for financial data, characterized in that: include: An acquisition unit, used for acquiring sensitive images in a financial database; A pixel scrambling unit, used to construct an image scrambling model, and based on the image scrambling model, perform a first pixel scrambling process on the sensitive image to obtain a primary scrambled sensitive image; A key generation unit, configured to construct a key model and generate a key sequence according to the sensitive image and the key model, wherein the key sequence includes a scrambled key sequence, a disrupted key sequence and an encrypted key sequence; The pixel scrambling unit is further used to perform a second pixel scrambling process on the primary scrambled sensitive image using a scrambled key sequence in the key sequence to obtain a secondary scrambled sensitive image; a pixel scrambling unit, configured to perform pixel scrambling processing on the secondary scrambled sensitive image based on a scrambling key sequence in the key sequence, so as to obtain a scrambled sensitive image after the pixel scrambling processing; The encryption unit is used to perform pixel encryption processing on the disturbed sensitive image according to the encryption key sequence in the key sequence, so as to obtain an encrypted sensitive image after the pixel encryption processing.
9. A privacy protection device for financial data, characterized in that: include: A memory, a processor and a transceiver which are sequentially communicatively connected, wherein the memory is used to store a computer program, the transceiver is used to send and receive messages, and the processor is used to read the computer program, and execute a method for protecting the privacy of financial data as described in any one of claims 1 to 7.
10. A computer program product comprising instructions, characterized in that When the instructions are executed on a computer, the computer is caused to execute a method for protecting privacy of financial data as described in any one of claims 1 to 7.
Citation Information
Cited By
Financial Data Intelligent Management System
CN119762258A