Print file encryption and backup method and device, and electronic equipment
By generating Gaussian random noise data in printed files and utilizing redundant space for privacy data hiding, the problems of insufficient anti-tampering capability and low data integrity in printed file encryption and backup are solved, thereby improving security and integrity.
Patent Information
- Application Number
- CN202511048629.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-29
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2045-07-29
AI Technical Summary
Existing technologies lack tamper resistance when encrypting and backing up printed documents, leading to the leakage of private data. Furthermore, the data cannot be hidden without the user's awareness, resulting in low data integrity.
By generating Gaussian random noise data, using the redundant space of printed documents to hide private data, and performing data verification and noise data extraction, encrypted Gaussian random noise data is generated, achieving zero-perceptible hiding and data integrity.
It improves the security and integrity of data backup, reduces the possibility of privacy data leakage, and avoids data integrity issues caused by changes in file size.
Smart Images

Figure CN120995505A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present disclosure relate to the field of computer technology, in particular to a printing file encryption and backup method and device and electronic equipment. BACKGROUND
[0002] The printing file encryption and backup is a technology for encrypting and backing up a printing file. At present, when encrypting and backing up a printing file, a commonly used method is to directly send the printing file to be encrypted and backed up into a print queue or replace the privacy data in the printing file.
[0003] However, when the printing file is encrypted and backed up by using the above method, the following technical problems often exist:
[0004] Directly sending the printing file to be encrypted and backed up into the print queue lacks tamper resistance and may be intercepted, resulting in privacy data leakage and low security of data backup. In addition, when hiding the privacy data in the printing file, zero-aware hiding cannot be achieved, resulting in a change in the size of the printing file and low data integrity. SUMMARY
[0005] The summary part of the present disclosure is used to introduce the concepts in a brief form, which will be described in detail in the specific embodiments part. The summary part of the present disclosure is not intended to identify the key features or essential features of the claimed technical solutions, nor is it intended to limit the scope of the claimed technical solutions.
[0006] Some embodiments of the present disclosure provide a printing file encryption and backup method, device and electronic equipment to solve the technical problems mentioned in the background part.
[0007] In a first aspect, some embodiments of the present disclosure provide a printing file encryption and backup method, which comprises: generating Gaussian random noise data according to privacy data in a to-be-printed file and preset seed number random interference; selecting a redundant space of a header file of the to-be-printed file to obtain a header file redundant space; generating an embedded to-be-printed file header according to the header file redundant space and the Gaussian random noise data; performing data verification on the embedded to-be-printed file header to generate a verification result, wherein the verification result represents a consistent verification result and an inconsistent verification result; in response to determining that the verification result represents the consistent verification result, extracting noise data from the embedded to-be-printed file header corresponding to the verification result to generate encrypted Gaussian random noise data; generating a privacy data value according to the encrypted Gaussian random noise data; and converting the privacy data value to generate original privacy data.
[0008] In a second aspect, some embodiments of the present disclosure provide a printing file encryption and backup apparatus, the apparatus comprising: a first generating unit configured to generate Gaussian random noise data according to random interference of privacy data in a to-be-printed file and a preset seed number; a selecting unit configured to perform redundancy space selection on the to-be-printed file to obtain a header file redundancy space; a second generating unit configured to generate an embedded to-be-printed file header according to the header file redundancy space and the Gaussian random noise data; a checking unit configured to perform data checking on the embedded to-be-printed file header to generate a checking result, wherein the checking result represents a consistent checking result and an inconsistent checking result; an extracting unit configured to, in response to determining that the checking result represents the consistent checking result, perform noise data extraction on the embedded to-be-printed file header corresponding to the checking result to generate encrypted Gaussian random noise data; and a third generating unit configured to generate privacy data values according to the encrypted Gaussian random noise data; and a converting unit configured to perform character conversion on the privacy data values to generate original privacy data.
[0009] In a third aspect, some embodiments of the present disclosure provide an electronic device, comprising: one or more processors; and a storage device having one or more programs stored thereon, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method described in any implementation manner of the first aspect.
[0010] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method described in any implementation manner of the first aspect.
[0011] The above various embodiments of the present disclosure have the following beneficial effects: through the print file encryption and backup method of some embodiments of the present disclosure, the possibility of privacy data leakage is reduced, the security of data backup is improved, and the integrity of data is improved. Specifically, the reason for causing privacy data leakage, low security of data backup, and low integrity of data is that the print file to be encrypted and backed up is directly sent to the print queue, lacks tamper resistance, and may be intercepted, resulting in privacy data leakage and low security of data backup. Moreover, when hiding privacy data in the print file, zero-awareness hiding cannot be achieved, resulting in a change in the size of the print file and low integrity of data. Based on this, the print file encryption and backup method of some embodiments of the present disclosure first generates Gaussian random noise data according to the privacy data in the to-be-printed file and the preset seed number random interference. Thus, subsequent processing can be facilitated, and the preset seed number random interference is used to protect the privacy data in the to-be-printed file, thereby improving the security of data backup. Then, the redundant space of the to-be-printed file is selected to obtain a header file redundant space. Thus, the redundant space of the print file can be used for privacy data hiding, without changing the size of the print file, thereby achieving zero-awareness hiding and improving the integrity of data. Next, the header file of the embedded to-be-printed file is generated according to the header file redundant space and the Gaussian random noise data. Thus, the utilization of the header file redundant space can be maximized. Then, data verification is performed on the embedded to-be-printed file header to generate a verification result, wherein the verification result represents a consistent verification result and an inconsistent verification result. Thus, the security of the embedded to-be-printed file header can be ensured. Second, in response to determining that the verification result represents a consistent verification result, noise data extraction is performed on the embedded to-be-printed file header corresponding to the verification result to generate encrypted Gaussian random noise data. Thus, the Gaussian random noise data can be completely recovered, and the integrity of data can be ensured. Third, the privacy data value is generated according to the encrypted Gaussian random noise data. Thus, the tamper resistance of the privacy data value can be improved, interception can be avoided, and the possibility of privacy data leakage is reduced. Finally, character conversion is performed on the privacy data value to generate original privacy data. Thus, the possibility of privacy data leakage is reduced, the security of data backup is improved, and the integrity of data is improved. BRIEF DESCRIPTION OF DRAWINGS
[0012] The above and other features, advantages, and aspects of the embodiments of the present disclosure will become more apparent upon consideration of the following detailed description, taken in conjunction with the accompanying drawings. Throughout the drawings, like or similar reference numerals designate identical or similar elements throughout the several views. It should be understood that the drawings are schematic and elements and features are not necessarily to scale.
[0013] Figure 1is a schematic diagram of one application scenario of the print file encryption and backup method of some embodiments of the present disclosure;
[0014] Figure 2 is a flow chart of some embodiments of the print file encryption and backup method according to the present disclosure;
[0015] Figure 3 is a structural schematic diagram of some embodiments of the print file encryption and backup device according to the present disclosure;
[0016] Figure 4 is a structural schematic diagram of an electronic device suitable for implementing some embodiments of the present disclosure;
[0017] Figure 5 is a print file hiding structure diagram of some embodiments of the print file encryption and backup device according to the present disclosure. DETAILED DESCRIPTION
[0018] Embodiments of the present disclosure will be described in more detail with reference to the drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms, and should not be interpreted as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided so as to more thoroughly and completely understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes, and are not intended to limit the scope of protection of the present disclosure.
[0019] In addition, it should be further noted that only the parts related to the present application are shown in the drawings for ease of description. The embodiments in the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0020] It should be noted that the concepts of "first", "second", etc. mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not intended to limit the order or interdependence of the functions performed by these devices, modules or units.
[0021] It should be noted that the adjectives "one", "multiple" mentioned in the present disclosure are illustrative and not limiting, and those skilled in the art should understand that unless otherwise explicitly stated in the context, it should be understood as "one or more".
[0022] The names of the messages or information exchanged between the devices in the embodiments of the present disclosure are only for illustrative purposes, and are not intended to limit the scope of these messages or information.
[0023] The present disclosure will be described in detail below with reference to the drawings and in conjunction with the embodiments.
[0024] Figure 1is a schematic diagram of one application scenario of the print file encryption and backup method of some embodiments of the present disclosure.
[0025] In Figure 1 In the application scenario of, firstly, Gaussian random noise data 103 is generated according to the privacy data 101 in the to-be-printed file and the preset seed number random interference 102. The above-mentioned to-be-printed file is subjected to redundant space selection to obtain a header file redundant space. The above-mentioned header file redundant space and the above-mentioned Gaussian random noise data are used to generate an embedded to-be-printed file header file 104. Data verification is performed on the above-mentioned embedded to-be-printed file header file to generate a verification result 105, wherein the above-mentioned verification result represents a consistent verification result and an inconsistent verification result.
[0026] It should be noted that the computing device can be hardware or software. When the computing device is hardware, it can be implemented as a distributed cluster composed of multiple servers or terminal devices, or as a single server or a single terminal device. When the computing device is software, it can be installed in the above-mentioned hardware devices. It can be implemented as, for example, multiple software or software modules for providing distributed services, or as a single software or software module. Herein, no specific limitation is made. It should be understood that Figure 1 The number of privacy data in the to-be-printed file in can have any number according to implementation needs.
[0027] With reference to Figure 2 , a flow 200 according to some embodiments of the print file encryption and backup method of the present disclosure is shown. The print file encryption and backup method includes the following steps:
[0028] Step 201, generating Gaussian random noise data according to the privacy data in the to-be-printed file and the preset seed number random interference.
[0029] In some embodiments, the execution subject (for example, the computing device) of the print file encryption and backup method can generate Gaussian random noise data according to the privacy data in the to-be-printed file and the preset seed number random interference.
[0030] Herein, the to-be-printed file can refer to a file waiting to be printed. For example, the to-be-printed file can refer to a PDF, word, EXE, DLL, OCX, SYS, COM format file waiting to be printed. The privacy data can refer to a string in the file. The preset seed number random interference can refer to a fixed number of seed number random interferences. For example, the fixed number can refer to 42. The preset seed number random interference can refer to [0.3745, 0.9507, 0.7320, 0.5987, 0.1560]. The Gaussian random noise data can refer to noise data after Gaussian transformation. For example, the Gaussian random noise data can refer to [0.23, -1.02, -0.56, -0.89, 1.45].
[0031] Optionally, the execution subject can generate Gaussian random noise data according to the privacy data in the to-be-printed file and the preset seed number random interference by the following steps:
[0032] Firstly, character conversion is performed on the privacy data in the to-be-printed file to generate a privacy data numerical sequence.
[0033] As an example, the execution subject can convert the privacy data in the to-be-printed file into ASCII code values to generate a privacy data numerical sequence. For example, the privacy data in the to-be-printed file is "Hello", wherein "H" is converted into an ASCII code value of 72, "e" is converted into an ASCII code value of 101, "l" is converted into an ASCII code value of 108, and "o" is converted into an ASCII code value of 111. Thus, the privacy data numerical sequence is [72, 101, 108, 108, 111].
[0034] Secondly, normalization processing is performed on the privacy data numerical sequence to generate a normalized privacy data numerical sequence.
[0035] As an example, the execution subject can assume that the maximum value is 114 (the ASCII code of "r") and the minimum value is 32 (the ASCII code of space). Thus, the normalized privacy data numerical sequence after normalization is [0.4386, 0.6930, 0.7544, 0.7544, 0.7719].
[0036] Thirdly, modulo operation processing is performed on the normalized privacy data numerical sequence and the preset seed number random interference to generate a processed privacy data numerical sequence.
[0037] As an example, the execution subject can perform an addition operation on the normalized privacy data value sequence and the preset seed number random interference to generate a processed privacy data value sequence. For example, the processed privacy data value sequence is [0.8131, 0.6437, 0.4864, 0.3531, 0.9279].
[0038] In the fourth step, the processed privacy data value sequence is subjected to Gaussian transformation to generate Gaussian random noise data.
[0039] As an example, the execution subject can perform Gaussian transformation on the processed privacy data value sequence by a standard normal distribution to generate Gaussian random noise data. For example, the Gaussian random noise data is [0.23, -1.02, -0.56, -0.89, 1.45].
[0040] In step 202, the redundant space of the to-be-printed file is selected to obtain a header file redundant space.
[0041] In some embodiments, the execution subject can select the redundant space of the to-be-printed file to obtain a header file redundant space.
[0042] Here, the header file redundant space can refer to a space in the header file of the print file for hiding privacy data.
[0043] As an example, the execution subject can locate the header file region (e.g., e_lfnew offset) of the to-be-printed file to generate a header file region. The continuous redundant bytes in the header file region are selected as the header file redundant space. The continuous redundant bytes can refer to 100 continuous bytes.
[0044] In step 203, the header file of the embedded to-be-printed file is generated according to the header file redundant space and the Gaussian random noise data.
[0045] In some embodiments, the execution subject can generate the embedded to-be-printed file header according to the header file redundant space and the Gaussian random noise data.
[0046] Here, the embedded to-be-printed file header can refer to a to-be-printed file header containing the "hidden identifier, hidden data quantity, hidden data content, seed number and slice code" format.
[0047] Optionally, the execution subject can generate the embedded to-be-printed file header according to the header file redundant space and the Gaussian random noise data by the following steps:
[0048] In a first step, a hidden identifier is constructed from the header file redundant space to generate a hidden identifier, wherein the hidden identifier is an identifier containing information related to the private data. For example, the format of the hidden identifier is [hidden identifier].
[0049] Here, the hidden identifier can refer to an identifier containing information related to the private data. For example, the hidden identifier can refer to 0xCAFEF00D.
[0050] As an example, the execution subject can write the hidden identifier to the first free contiguous 4 bytes in the header file redundant space to obtain the hidden identifier. For example, assuming that the header file redundant space is 00 00 00 00 00 00 00 00 0000 00 00…, after writing the hidden identifier 0xCAFEF00D to the header file redundant space, it becomes CA FE F0 0D 00 00 00 0000 0000 00….
[0051] In a second step, the number of hidden data is set from the header file redundant space to generate a hidden data number, wherein the hidden data number represents the precision of the hidden data.
[0052] Here, the hidden data number can refer to 28. For example, the format of the hidden data number can refer to [hidden data number].
[0053] As an example, the execution subject can write the hidden data number to the second free contiguous 4 bytes in the header file redundant space to obtain the hidden data number. For example, assuming that the header file redundant space is 00 00 00 00 00 0000 00 00 00 00 00…, after writing the hidden data number 0x0000001C to the header file redundant space, it becomes 00 00 00 0000 00 00 1C 0000 00 00….
[0054] Here, the hidden data content can refer to [0.23, -1.02, -0.56, -0.89, 1.45]. For example, the format of the hidden data content can refer to [hidden data content].
[0055] As an example, the execution subject can first write the hidden data content to the first free contiguous 28 bytes in the header file redundant space to obtain the hidden data content.
[0056] Here, the seed number can refer to 42. For example, the format of the seed number can refer to [seed number].
[0057] As an example, the execution subject can write the seed number into the third continuous 4 bytes of the free space in the header file redundancy space, to obtain the seed number.
[0058] In the fifth step, the header file redundancy space is sliced and coded to generate a hidden data slice code, wherein the hidden data slice code is the serial number of the private data.
[0059] Here, the hidden data slice code can be 0x0001. 0x0001 represents the first private data slice. For example, the format of the hidden data slice code can be [hidden data slice code].
[0060] As an example, the execution subject can write the slice code into the first continuous 2 bytes of the free space after the seed number in the header file redundancy space, to obtain the slice code.
[0061] In the sixth step, the hidden identifier, the hidden data quantity, the hidden data content, the hidden data seed number, and the hidden data slice code are combined into a print file hidden structure.
[0062] Here, the combination can be splicing. For example, the print file hidden structure is [hidden identifier] [hidden data quantity] [hidden data content] [seed number] [hidden data slice code]. That is, [0xCAFEF00D]
[28] [0.23, -1.02, -0.56, -0.89, 1.45]
[42] [0x0001]. As shown in Figure 5 Figure 5 is a print file hidden structure diagram of a print file encryption and backup method of some embodiments of the present disclosure.
[0063] In the seventh step, the Gaussian random noise data is embedded into the header file redundancy space according to the print file hidden structure, to obtain an embedded print file header file.
[0064] Here, the Gaussian random noise data can be [0.23, -1.02, -0.56, -0.89, 1.45], and after filling according to the print file hidden structure, it becomes [0xCAFEF00D]
[13] [0.23, -1.02, -0.56, -0.89, 1.45]
[42] [0x0001]. Then, the filled print file hidden structure is written into the header file redundancy space, to obtain an embedded print file header file.
[0065] In step 204, data verification is performed on the embedded print file header file to generate a verification result.
[0066] In some embodiments, the execution subject can perform data verification on the embedded to-be-printed file header file to generate a verification result, wherein the verification result represents a consistent verification result and an inconsistent verification result.
[0067] Optionally, the execution subject can perform data verification on the embedded to-be-printed file header file to generate a verification result by the following steps:
[0068] Firstly, the embedded to-be-printed file header file is matched with the hidden identifier to generate a matching result.
[0069] For example, the execution subject can perform byte-by-byte sliding on the embedded to-be-printed file header file, and determine the byte of the prefix hit as the matching hidden identifier. For example, the original hexadecimal data of the embedded to-be-printed file header file is as follows (the address starts from 0x0000): 0000: 00 00 00 00 00 CA FE F0 0D 13 00 00 00 DEAD BE EF… The 5th-8th byte is CA FE F0 0D, which represents the prefix hit, and the offset pos=0x0005. The content of 0x0005 is matched as the matching result of the hidden identifier.
[0070] Secondly, in response to determining that the matching result represents a consistent matching result, the number of hidden data in the embedded to-be-printed file header file is verified to generate a verification result.
[0071] Here, the consistent matching result represents that the matching result contains the hidden identifier. The verification result represents a verification pass result and a verification failure result. The verification can mean comparison. For example, the number of hidden data in the embedded to-be-printed file header file is 12, which is compared with the number of hidden data in the print file hidden structure. If the number of hidden data is the same, the verification result represents a verification pass result. If the number of hidden data is different, the verification result represents a verification failure result.
[0072] Thirdly, in response to determining that the verification result represents a verification pass, the number of seeds in the embedded to-be-printed file header file is verified to generate a seed number verification result.
[0073] For example, the number of hidden data in the embedded to-be-printed file header file is 42, which is compared with the number of seeds in the print file hidden structure. If the number of seeds is the same, the seed number verification result represents a consistent seed number verification result. If the number of seeds is different, the seed number verification result represents an inconsistent verification result.
[0074] In the fourth step, in response to determining that the seed number verification result represents that the seed number verification is consistent, the execution subject performs data integrity verification on the embedded to-be-printed file header file to generate a verification result.
[0075] As an example, the execution subject can perform slice code verification on the embedded to-be-printed file header file to generate a slice code verification result. Then, in response to determining that the slice code verification result represents a consistent slice code verification result, the slice code verification result is determined as the verification result.
[0076] In the fourth step, in response to determining that the seed number verification result represents that the seed number verification is consistent, the execution subject performs data integrity verification on the embedded to-be-printed file header file to generate a verification result.
[0077] In some embodiments, in response to determining that the verification result represents a consistent verification result, the execution subject can extract noise data from the embedded to-be-printed file header file corresponding to the verification result to generate encrypted Gaussian random noise data.
[0078] Here, the encrypted Gaussian random noise data can refer to Gaussian random noise data in the print file hidden structure embedded in the embedded to-be-printed file header file. That is, [0.23, -1.02, -0.56, -0.89, 1.45].
[0079] As an example, the execution subject can extract noise data from the embedded to-be-printed file header file corresponding to the verification result by wavelet transform to generate encrypted Gaussian random noise data.
[0080] In the sixth step, the execution subject generates a privacy data value according to the encrypted Gaussian random noise data.
[0081] In some embodiments, the execution subject can generate a privacy data value according to the encrypted Gaussian random noise data.
[0082] Optionally, the execution subject can generate a privacy data value according to the encrypted Gaussian random noise data by the following steps:
[0083] In the first step, the execution subject performs inverse Gaussian transformation processing on the encrypted Gaussian random noise data to generate Gaussian random noise privacy data.
[0084] As an example, the execution subject can perform inverse Gaussian transformation processing on the encrypted Gaussian random noise data by an inverse cumulative distribution function (ICDF) to generate Gaussian random noise privacy data.
[0085] Secondly, inverse modulo operation is performed on the Gaussian random noise privacy data to generate a privacy data value.
[0086] As an example, the execution subject can restore the value of the Gaussian random noise privacy data by multiplication inverse element to obtain the privacy data value.
[0087] In the process of adopting the technical solutions to solve the problems mentioned in the background, the following problems are often accompanied:
[0088] When hiding privacy data in a printed file, the size of the file is likely to change, resulting in reduced security of the privacy data. The privacy data may fail to be restored during printing, which may cause page order disorder or partial data loss, resulting in physical level failure.
[0089] In the face of the above technical problems, the inventors decided to adopt the following solutions:
[0090] Optionally, the execution subject can generate a privacy data value from the encrypted Gaussian random noise data by the following steps:
[0091] Firstly, encode the encrypted Gaussian random noise data to generate a noise data integer sequence.
[0092] As an example, the execution subject can encode the encrypted Gaussian random noise data by UTF-8 encoding to generate a noise data integer sequence.
[0093] Secondly, interval mapping is performed on the noise data integer sequence to generate a mapped noise data sequence.
[0094] As an example, the execution subject can divide each noise data integer in the noise data integer sequence by the difference between the maximum value and the minimum value in the noise data integer sequence to generate a mapped noise data, thereby obtaining a mapped noise data sequence.
[0095] Thirdly, the mapped noise data sequence is encrypted to generate a ciphertext vector.
[0096] As an example, the execution subject can encrypt the mapped noise data sequence by CKKS public key to generate a ciphertext vector.
[0097] Fourthly, homomorphic addition is performed on the preset seed number and the ciphertext vector to generate a noise ciphertext.
[0098] As an example, the execution subject can first truncate the preset seed number to obtain a truncated seed number. For example, if the preset seed number is 42, the truncated seed number is 16. Then, the truncated seed number is added to the ciphertext vector and the result is taken modulo to obtain a noise ciphertext.
[0099] In the fifth step, the noise ciphertext is mapped to a Gaussian distribution ciphertext, and the Gaussian distribution ciphertext is sparsified and compressed to generate a sparse ciphertext sequence.
[0100] As an example, the execution subject can read the noise ciphertext from the Gaussian value table to generate a Gaussian distribution ciphertext. Then, the preset percentage of elements with the largest absolute value in the Gaussian distribution ciphertext are stored, and the part outside the preset percentage is set to 0. The preset percentage is 30%.
[0101] In the sixth step, the sparse ciphertext sequence is encoded to generate a binary embedding stream.
[0102] As an example, the execution subject can encode the sparse ciphertext sequence by Golomb-Rice coding to generate a binary embedding stream.
[0103] In the seventh step, a preset number of non-contiguous redundancy areas are demarcated in the print header file.
[0104] Here, the preset number of non-contiguous redundancy areas can refer to 4 non-contiguous blank areas set in advance.
[0105] As an example, the execution subject can demarcate before the cross-reference table of the print header file.
[0106] In the eighth step, the binary embedding stream is redundantly fragmented to generate a fragmented data set, wherein the number of fragmented data in the fragmented data set is equal to the corresponding number of the preset number of segments.
[0107] As an example, the execution subject can divide the binary embedding stream into equal bytes by RS(255,223) erasure code to generate a fragmented data set. The equal byte can refer to 3 bytes.
[0108] In the ninth step, the fragmented data set is embedded into the header file redundancy space to obtain an embedded file.
[0109] As an example, the execution subject can write the fragmented data in the fragmented data set into the header file redundancy space in sequence to obtain an embedded file. For example, 4 pieces of data fall in 0x80, 0x120, 0x1C0, 0x240 offset, and the total embedding is 256 bytes.
[0110] The tenth step is to homomorphically decrypt the embedded file to generate a noisy normalized vector.
[0111] As an example, the execution subject can recombine the embedded file to generate a recombined embedded file. Then, the execution subject can add an additive inverse to the recombined embedded file, and normalize the additive inverse vector to obtain a noisy normalized vector.
[0112] The eleventh step is to de-normalize the noisy normalized vector to generate a processed vector.
[0113] As an example, the execution subject can amplify the noisy normalized vector to the integer range of ASCII code to generate a processed vector.
[0114] The twelfth step is to convert the processed vector to a character to generate a privacy data value.
[0115] As an example, the execution subject can convert the processed vector to an ASCII code value to generate a privacy data value. For example, the processed vector is “72”, and the ASCII code value of “72” is “H”.
[0116] As the related content in the first step to the twelfth step above is an application point of the present disclosure, it solves the technical problem of "reduction of privacy data security, resulting in page sequence disorder or partial data loss, causing physical level failure". The factors that cause page sequence disorder or partial data loss, and cause physical level failure are often as follows: when hiding privacy data in a printed file, the size of the file is likely to change, resulting in a reduction in the security of the privacy data. Privacy data restoration failure may occur during printing, which may cause page sequence disorder or partial data loss, and cause physical level failure. If the above factors are solved, the security of the privacy data can be improved, and page sequence disorder or partial data loss can be avoided. In order to achieve this effect, first, the above encrypted Gaussian random noise data is encoded to generate a noise data integer sequence. Then, the noise data integer sequence is interval mapped to generate a mapped noise data sequence. In this way, the size of the file can remain unchanged, providing convenience for subsequent processing. Then, the mapped noise data sequence is encrypted to generate a ciphertext vector. In this way, the security of the privacy data can be improved. Next, the preset seed number and the ciphertext vector are homomorphically added to generate a noise ciphertext. In this way, the security of the privacy data can be improved. The noise ciphertext is mapped to a Gaussian distribution ciphertext, and the Gaussian distribution ciphertext is sparsified and compressed to generate a sparse ciphertext sequence. Next, the sparse ciphertext sequence is encoded to generate a binary embedding stream. In this way, the sparse ciphertext sequence can be more concise. Secondly, a predetermined number of non-contiguous redundancy areas are demarcated in the print file header file. Thirdly, the binary embedding stream is redundantly fragmented to generate a fragmented data set, wherein the number of fragmented data in the fragmented data set is equal to the corresponding number of the predetermined number of segments. In this way, the utilization rate of the redundancy space can be improved. Then, the fragmented data set is embedded into the header file redundancy space to obtain an embedded file. In this way, data restoration can be facilitated, and page sequence disorder or partial data loss can be avoided, thereby avoiding physical level failure. Next, the embedded file is homomorphically decrypted to generate a noisy normalized vector. In this way, the intermediate plaintext can be exposed during decryption. Then, the noisy normalized vector is de-normalized to generate a processed vector. In this way, the privacy data can be restored, and page sequence disorder or partial data loss can be avoided. Finally, the processed vector is character converted to generate a privacy data value. Therefore, the security of the privacy data is improved. Page sequence disorder or partial data loss is avoided, thereby avoiding physical level failure.
[0117] Step 207, character converting the privacy data value to generate original privacy data.
[0118] In some embodiments, the execution subject can perform character conversion on the privacy data value to generate original privacy data.
[0119] Here, the character conversion can be exponential value to ASCII code conversion. For example, the privacy data value is 0.5647, and after character conversion, 0.5647*127 is approximately equal to 72, i.e., the character is H.
[0120] Optionally, after the above "step 207", the method further includes:
[0121] Firstly, in response to the receiving end receiving a plurality of to-be-printed files, original privacy data sets and slice code sets are generated according to the plurality of to-be-printed files.
[0122] As an example, the execution subject can perform Gaussian random noise data determination on each of the plurality of to-be-printed files to generate Gaussian random noise data, thereby obtaining a Gaussian random noise data set. Then, the Gaussian random noise data set is inversely Gaussian transformed by an inverse cumulative distribution function (ICDF) to obtain an inverse transformation noise data set. Then, each inverse transformation noise data in the inverse transformation noise data set is converted into an ASCII code to generate original privacy data, thereby obtaining an original privacy data set. The print file hidden structure of each of the plurality of to-be-printed files is read by a slice code to generate a slice code, thereby obtaining a slice code set.
[0123] Secondly, the slice code set is sorted in a preset sequence to generate a slice code sequence.
[0124] Here, the preset sequence can refer to a sequence from the first to the last.
[0125] As an example, the execution subject can sort the slice code set from the first to the last to generate a slice code sequence. For example, the slice code set is "el" "H" "lo", and the slice code sequence sorted from the first to the last is [H][el][lo].
[0126] Thirdly, according to the slice code sequence, data aggregation backup is performed on the original privacy data set to generate aggregated backup privacy data.
[0127] As an example, the execution subject can first splice the original privacy data set according to the order of the slice code sequence to generate spliced privacy data, for example, the spliced privacy data is "Hello". Then, the spliced privacy data is stored in the storage device. For example, the storage device can be a hard disk.
[0128] In the process of using the technical solutions to solve the problems mentioned in the background, the following problems often occur:
[0129] Since the slice code itself is stored in plaintext form, it is easy to be tampered with, resulting in disordered order of aggregated backup. Because physical noise is easily introduced when the original privacy data set is aggregated and backed up, random deviation of the slice code is caused, resulting in low security of the privacy data aggregation backup.
[0130] In the face of the above technical problems, the inventors decided to use the following solutions:
[0131] Optionally, the execution subject can aggregate and backup the original privacy data set according to the slice code sequence by the following steps to generate aggregated backup privacy data:
[0132] First, add mixed noise to the slice code sequence to generate a slice code noise sequence.
[0133] Here, the mixed noise can be Laplace noise and Gaussian noise. For example, the Gaussian noise is g~N(0, 0.1), that is, [0.05, -0.08, 0.12, -0.03], the Laplace noise is 1~Lap(0, 0.2), that is, [0.18, -0.10, -0.07, 0.25], and the mixed noise is n=g+1, that is, [0.23, -0.18, 0.05, 0.22]. Assuming that the integer representation of the slice code sequence is C=[3, 1, 4, 2], the slice code noise sequence is C'=C+n=[3.23, 0.82, 4.05, 2.22].
[0134] Second, normalize the slice code noise sequence to generate a normalized slice code noise sequence.
[0135] As an example, the execution subject can normalize the slice code noise sequence by Z-score to generate a normalized slice code noise sequence. The normalized slice code noise in the normalized slice code noise sequence ranges from 0 to 1. For example, the minimum value of C' is 0.82 and the maximum value is 4.05, and the normalized slice code noise sequence is obtained by subtracting the minimum value from each slice code noise in the slice code noise sequence and dividing the result by the difference between the maximum value and the minimum value, i.e., (3.23-0.82) divided by (4.05-0.82) = 0.74. That is, the normalized slice code noise sequence is [0.74, 0.00, 1.00, 0.45].
[0136] Thirdly, the normalized slice code noise sequence is threshold filtered to obtain a denoised slice code value sequence.
[0137] As an example, the execution subject can replace the normalized slice code values in the normalized slice code value sequence that are less than a preset threshold with a value to obtain a denoised slice code value sequence. For example, the normalized slice code noise sequence is S = [s1, s2, …, sN], and the preset threshold is T. For each element in S, if |s|≤T, then s' = 0, otherwise, the original value is retained, i.e., s' = s. The obtained S' = [s1', s2', …, sN'] is the denoised slice code value sequence. Here, the preset threshold is determined by the preset seed number through a pseudo-random number generator. Assuming that T = 0.5, the denoised slice code value sequence S' is [0.74, 0.00, 1.00, 0.00]. n i i i i n
[0138] Fourthly, the denoised slice code value sequence is de-normalized to generate an original integer slice code sequence.
[0139] As an example, the execution subject can multiply each denoised slice code value in the denoised slice code value sequence by a standard deviation and add the result to the minimum value of the slice code noise sequence to generate an original integer slice code, thereby obtaining an original integer slice code sequence. The standard deviation is the difference between the maximum value and the minimum value in the slice code noise sequence. For example, the original integer slice code in the original integer slice code sequence is 0.74 × (4.05-0.82) + 0.82 = 3.23, which is rounded to 3. That is, the original integer slice code sequence is [3, 1, 4, 1].
[0140] Fifthly, an index table is established based on the original integer slice code sequence to obtain a slice code index table.
[0141] As an example, the execution subject can map each of the original integer slice codes in the original integer slice code sequence to a file slice physical location to generate a slice code index table. For example, the slice code index table is {3:0, 1:1, 4:2}.
[0142] In the sixth step, each original privacy data in the original privacy data set is subjected to a hash check according to the slice code index table to generate a hash check result, and a hash check result set is obtained.
[0143] As an example, the execution subject can perform SHA-256 determination on each original privacy data in the original privacy data set to generate an original privacy data result, and an original privacy data result set is obtained. Then, each original privacy data result in the original privacy data result set is compared with the slice code index table to generate a hash check result, and a hash check result set is obtained. The hash check result in the hash check result set represents a hash check success result set and a hash check failure result set.
[0144] In the seventh step, in response to determining that the hash check results in the hash check result set all represent check pass results, the original privacy data set is spliced according to the order of the slice code index table to generate spliced privacy data as the aggregated backup privacy data.
[0145] The related content in the above first step-seventh step is an application point of the present disclosure, which solves the technical problem of "causing random deviation of the slice code, resulting in low security of the aggregated backup of the privacy data". The factors that cause the random deviation of the slice code, resulting in low security of the aggregated backup of the privacy data, are often as follows: because the slice code itself is stored in plaintext form, it is easy to be tampered with, resulting in disordered order of the aggregated backup. Because physical noise is easily introduced when the original privacy data set is aggregated, the slice code is randomly deviated, resulting in low security of the aggregated backup of the privacy data. If the above factors are solved, the security of the aggregated backup of the privacy data can be improved. In order to achieve this effect, first, the above slice code sequence is mixed with noise to generate a slice code noise sequence. In this way, the security of the slice code sequence can be improved. Then, the above slice code noise sequence is normalized to generate a normalized slice code noise sequence. The normalized slice code noise sequence is threshold filtered to obtain a denoised slice code value sequence. In this way, the accuracy of the order of the aggregated backup can be improved, and the random deviation of the slice code is avoided. The denoised slice code value sequence is de-normalized to generate an original integer slice code sequence. The original integer slice code sequence is indexed to obtain a slice code index table. Then, according to the slice code index table, each original privacy data in the original privacy data set is hashed to generate a hash check result, and a hash check result set is obtained. In this way, the security of the aggregated backup of the privacy data can be improved. Then, in response to determining that the hash check results in the hash check result set all represent check pass results, the original privacy data set is spliced according to the order of the slice code index table to generate spliced privacy data as the aggregated backup privacy data. Therefore, after threshold filtering, the accuracy of the order of the aggregated backup is improved, the random deviation of the slice code is avoided, and the security of the aggregated backup of the privacy data is improved.
[0146] Further reference Figure 3 , as an implementation of the method shown in the above figures, the present disclosure provides some embodiments of a print file encryption and backup device, which device embodiments correspond to those method embodiments shown in Figure 2 , the print file encryption and backup device can be applied in various electronic devices.
[0147] As Figure 3As shown, the printing file encryption and backup device 300 of some embodiments includes a first generating unit 301, a selecting unit 302, a second generating unit 303, a checking unit 304, an extracting unit 305, a third generating unit 306, and a converting unit 307. The first generating unit 301 is configured to generate Gaussian random noise data according to random interference of privacy data in a to-be-printed file and a preset seed number. The selecting unit 302 is configured to select a redundant space of a header file of the to-be-printed file to obtain a header file redundant space. The second generating unit 303 is configured to generate an embedded to-be-printed file header according to the header file redundant space and the Gaussian random noise data. The checking unit 304 is configured to perform data checking on the embedded to-be-printed file header to generate a checking result, wherein the checking result represents a consistent checking result and an inconsistent checking result. The extracting unit 305 is configured to, in response to determining that the checking result represents the consistent checking result, extract noise data from the embedded to-be-printed file header corresponding to the checking result to generate encrypted Gaussian random noise data. The third generating unit 306 is configured to generate a privacy data value according to the encrypted Gaussian random noise data. The converting unit 307 is configured to perform character conversion on the privacy data value to generate original privacy data.
[0148] It can be understood that the units described in the printing file encryption and backup device 300 correspond to the respective steps in the method described above. Figure 2 Therefore, the operations, features, and advantages described above with respect to the method also apply to the printing file encryption and backup device 300 and the units included therein, which will not be described here again.
[0149] Reference is made below to Figure 4 which shows a structural schematic diagram of an electronic device (e.g., a computing device) suitable for implementing some embodiments of the present disclosure. Figure 4 The electronic device shown is merely an example and should not impose any limitation on the functions and use range of the embodiments of the present disclosure. As Figure 4 shown, the computer device includes a processor, a memory, and a network interface connected through a system bus, wherein the memory can include a non-volatile storage medium and an internal memory. The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions which, when executed, can cause the processor to perform any of the above methods. The processor is used to provide computing and control capabilities to support the operation of the entire computer device. The internal memory provides an environment for the computer program in the non-volatile storage medium to run, which, when executed by the processor, can cause the processor to perform any of the above methods. The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art can understand that Figure 4The structure shown is merely a block diagram of a portion of the structure related to the present disclosure and does not constitute a limitation on the computer device to which the present disclosure is applied. A specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0150] It should be understood that the processor can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among these, a general-purpose processor can be a microprocessor or any conventional processor.
[0151] In one embodiment, the processor is configured to run a computer program stored in a memory to perform the following steps: generating Gaussian random noise data based on privacy data in a file to be printed and random interference with a preset seed number; selecting redundancy space for the file to be printed to obtain header file redundancy space; generating an embedded header file for the file to be printed based on the header file redundancy space and the Gaussian random noise data; performing data verification on the embedded header file to generate a verification result, wherein the verification result represents a verification consistency result and a verification inconsistency result; in response to determining that the verification result represents a verification consistency result, extracting noise data from the embedded header file to be printed corresponding to the verification result to generate encrypted Gaussian random noise data; generating privacy data values based on the encrypted Gaussian random noise data; and performing character conversion on the privacy data values to generate original privacy data.
[0152] This disclosure also provides a computer-readable storage medium storing a computer program, the computer program including program instructions, and the method implemented when the program instructions are executed can be referred to the various embodiments of the print document encryption and backup method of this disclosure.
[0153] The computer readable storage medium can be an internal storage unit of the computer device, such as a hard disk or a memory of the computer device. The computer readable storage medium can also be an external storage device of the computer device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, and the like.
[0154] It should be noted that, in this document, the terms "comprising", "including", or any other variant thereof are intended to cover a non-exclusive inclusion, such that processes, methods, articles, or systems that comprise a list of elements do not include only those elements in the list, but can also include other elements not expressly listed or inherent to such processes, methods, articles, or systems. Without further limitation, an element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article, or system that includes the element.
[0155] The above description is merely some preferred embodiments of the present disclosure and a description of the principles of the technology applied. Those skilled in the art should understand that the scope of the application involved in the embodiments of the present disclosure is not limited to the technical solutions formed by the specific combinations of the above technical features, and should also cover other technical solutions formed by any combinations of the above technical features or their equivalent features without departing from the above inventive concept. For example, the above features and the technical features disclosed in the embodiments of the present disclosure (but not limited to) with similar functions can be replaced with each other to form
[0156] a technical solution. The above description is merely some preferred embodiments of the present disclosure and a description of the principles of the technology applied. Those skilled in the art should understand that the scope of the application involved in the embodiments of the present disclosure is not limited to the technical solutions formed by the specific combinations of the above technical features, and should also cover other technical solutions formed by any combinations of the above technical features or their equivalent features without departing from the above inventive concept. For example, the above features and the technical features disclosed in the embodiments of the present disclosure (but not limited to) with similar functions can be replaced with each other to form
[0157] a technical solution.
Claims
1. A method for encrypting and backing up printed documents, characterized in that, include: Gaussian random noise data is generated based on the privacy data in the file to be printed and random interference with a preset seed number. Redundancy space is selected from the file to be printed to obtain header file redundancy space; Based on the header file redundancy space and the Gaussian random noise data, generate the embedded header file for the document to be printed. The embedded header file to be printed is subjected to data verification to generate verification results, wherein the verification results represent verification consistency results and verification inconsistency results; In response to determining that the verification result represents a verification consistency result, noise data is extracted from the embedded header file of the file to be printed corresponding to the verification result to generate encrypted Gaussian random noise data; Generate privacy data values based on the encrypted Gaussian random noise data; The privacy data values are converted into characters to generate the original privacy data.
2. The method for encrypting and backing up printed documents according to claim 1, characterized in that, The method further includes: In response to the receiving end receiving multiple files to be printed, an original privacy dataset and a slice code set are generated based on the multiple files to be printed; The slice code set is sorted according to a preset sequence to generate a slice code sequence; Based on the slice code sequence, the original privacy dataset is aggregated and backed up to generate aggregated backup privacy data.
3. The method for encrypting and backing up printed documents according to claim 1, characterized in that, The step of generating Gaussian random noise data based on privacy data in the file to be printed and random interference with a preset seed number includes: The privacy data in the print file is converted into characters to generate a sequence of privacy data values; The privacy data numerical sequence is normalized to generate a normalized privacy data numerical sequence. Modular operation is performed on the normalized privacy data numerical sequence and the preset seed number random interference to generate a processed privacy data numerical sequence; A Gaussian transform is applied to the processed privacy data numerical sequence to generate Gaussian random noise data.
4. The method for encrypting and backing up printed documents according to claim 1, characterized in that, The step of generating privacy data values based on the encrypted Gaussian random noise data includes: The encrypted Gaussian random noise data is subjected to inverse Gaussian transform processing to generate Gaussian random noise privacy data; The Gaussian random noise privacy data is subjected to inverse modulo operation to generate privacy data values.
5. The method for encrypting and backing up printed documents according to claim 1, characterized in that, The step of performing data verification on the embedded header file of the document to be printed to generate a verification result includes: The hidden identifier of the embedded header file to be printed is matched to generate a matching result; In response to determining that the matching result represents a consistent matching result, the number of hidden data in the embedded header file to be printed is verified to generate a verification result; In response to determining that the verification result indicates that the verification has passed, the seed number verification is performed on the embedded header file to be printed to generate a seed number verification result; In response to determining that the seed number verification result indicates that the seed number verification is consistent, data integrity verification is performed on the embedded header file to be printed to generate a verification result.
6. The method for encrypting and backing up printed documents according to claim 1, characterized in that, The step of generating the embedded header file for the document to be printed based on the header file redundancy space and the Gaussian random noise data includes: A hidden identifier is constructed for the redundant space of the header file to generate a hidden identifier, wherein the hidden identifier is an identifier containing information related to privacy data; The number of hidden data is set in the header file redundancy space to generate a number of hidden data, wherein the number of hidden data represents the precision of the hidden data; Hidden data content is constructed from the redundant space of the header file to generate hidden data content, wherein the hidden data content is privacy data; Set the seed number for header file redundancy space to generate the seed number for hidden data; The redundant space of the header file is used to construct a slice code to generate a hidden data slice code, wherein the hidden data slice code is the sequence number of the privacy data; The hidden identifier, the number of hidden data, the content of the hidden data, the number of hidden data seeds, and the hidden data slice code are combined into a hidden structure for the printed file; The Gaussian random noise data is embedded into the header file redundancy space according to the print file hidden structure to obtain the embedded print file header file.
7. A device for encrypting and backing up printed documents, characterized in that, include: The first generation unit is configured to generate Gaussian random noise data based on privacy data in the file to be printed and random interference with a preset number of seeds. The selection unit is configured to select redundant space for the file to be printed, thereby obtaining header file redundant space; The second generation unit is configured to generate an embedded header file for the document to be printed based on the header file redundancy space and the Gaussian random noise data. The verification unit is configured to perform data verification on the embedded header file of the file to be printed in order to generate a verification result, wherein the verification result represents a verification consistency result and a verification inconsistency result; The extraction unit is configured to extract noise data from the embedded header file of the file to be printed corresponding to the verification result in response to determining that the verification result represents a verification consistency result, so as to generate encrypted Gaussian random noise data. The third generation unit is configured to generate privacy data values based on the encrypted Gaussian random noise data; The conversion unit is configured to perform character conversion on the privacy data values to generate the original privacy data.
8. An electronic device, characterized in that, include: One or more processors; A storage device on which one or more programs are stored; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1 to 6.
9. A computer-readable medium, characterized in that, It stores a computer program thereon, wherein the computer program, when executed by a processor, implements the method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Large-data storage and optimization method
CN103440244A
PEKS (public-key encryption with keyword search) method for lattice-based cloud stored cyphertext data under standard model
CN106789044A
Private data processing method, device and system, electronic equipment and storage medium
CN114465708A
Private data processing method and device, electronic equipment and readable storage medium
CN116561789A
Big data privacy aggregation encryption method based on polymorphic fuzzy logic
CN119538315A