An electronic seal encryption system, method, apparatus, device, and medium
By encoding and decoding the electronic seal image using an autoencoder, an encrypted electronic seal image is generated and document identification information is added, which solves the security problem in the use of electronic seals and realizes the integrity and security protection of information.
Patent Information
- Application Number
- CN202410816284.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-24
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2044-06-24
AI Technical Summary
How to improve the security of electronic seal usage, especially to prevent information leakage and misuse during encryption and transmission.
An autoencoder is used to encode and decode the electronic seal image to generate an encrypted electronic seal image. Document identification information is added to the image to ensure compliance and uniqueness. The irreversibility of the encoder and decoder is used to protect the security of the original image.
It achieves effective encryption of electronic seal images, ensuring the integrity and security of seal information, preventing information leakage and misuse, and improving user experience and security.
Smart Images

Figure CN118764566B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, and in particular to an electronic seal encryption system, method, device, equipment and medium. BACKGROUND
[0002] With the development of electrification, more and more businesses need to convert physical seals into digital format seals for storage, transmission and management. Electronic seal is a digital format seal that gradually recognized by the public in recent years as a substitute for physical seal, and the electronic file stamped by the electronic seal has the same appearance and legal effect as the paper file stamped by the physical seal.
[0003] However, how to improve the security of the use process of the electronic seal is a technical problem that needs to be solved at present. SUMMARY
[0004] The present application provides an electronic seal encryption system, method, device, equipment and medium to improve the security of the use process of the electronic seal.
[0005] In a first aspect, the present application provides an electronic seal encryption system, which comprises:
[0006] An applicant device is configured to encode a raw electronic seal image to be encrypted based on an obtained encoder, generate a first encoding vector, and send the first encoding vector to an auditor device; wherein the encoder is an encoder in a self-encoder.
[0007] The auditor device is configured to decode the first encoding vector based on a saved decoder in the self-encoder, generate an encrypted electronic seal image, and send the encrypted electronic seal image to the applicant device.
[0008] In a possible implementation, the applicant device is further configured to:
[0009] send a seal identification of the raw electronic seal image to the auditor device;
[0010] The auditor device is further configured to:
[0011] encode a raw electronic seal image corresponding to the seal identification based on the saved encoder, generate a second encoding vector, and compare the first encoding vector and the second encoding vector; if they are the same, then perform the subsequent step of decoding the first encoding vector based on the saved decoder in the self-encoder.
[0012] In a possible implementation, the applicant device is further configured to:
[0013] sending file identification information of an electronic file to be used with the encrypted electronic seal image to the auditing party device;
[0014] The auditing party device is further configured to:
[0015] adding the file identification information at a set position of the encrypted electronic seal image, and sending the encrypted electronic seal image with the file identification information added to the applicant device.
[0016] In a possible implementation, the applicant device is further configured to:
[0017] sending an electronic file containing the encrypted electronic seal image and file identification information corresponding to the electronic file to the auditing party device;
[0018] The auditing party device is further configured to:
[0019] determining whether the encrypted electronic seal image contained in the electronic file is the same as the saved encrypted electronic seal image with the file identification information added, and if so, determining that the electronic seal image of the electronic file is compliant, and if not, determining that the electronic seal image of the electronic file is non-compliant.
[0020] In a possible implementation, the auditing party device is further configured to:
[0021] determining whether the generated encrypted electronic seal image is random code, and if not, performing a subsequent step of sending the encrypted electronic seal image to the applicant device.
[0022] In a possible implementation, the auditing party device is further configured to:
[0023] performing image comparison between the encrypted electronic seal image and an original electronic seal image corresponding to the seal identification, determining whether the two belong to the same seal subject, and if so, performing a subsequent step of sending the encrypted electronic seal image to the applicant device; wherein the seal identification is the seal identification of the original electronic seal image obtained from the applicant device.
[0024] In a possible implementation, the applicant device is further configured to:
[0025] extracting a sub-image of a region where a seal is located in the original electronic seal image, and inputting the extracted sub-image into the encoder.
[0026] In a possible implementation, the encoder obtained by the applicant device is obtained from the auditing party device.
[0027] In a second aspect, the application provides an electronic seal encryption method, which is applied to an auditing party device, and the method comprises the following steps:
[0028] receiving a first encoding vector sent by an applicant device, wherein the first encoding vector is generated by encoding an original electronic seal image to be encrypted based on an obtained encoder in the applicant device, and the encoder is an encoder in a self-encoder;
[0029] decoding the first encoding vector based on a saved decoder in the self-encoder to generate an encrypted electronic seal image, and sending the encrypted electronic seal image to the applicant device.
[0030] In a possible implementation, after the step of receiving the first encoding vector sent by the applicant device, and before the step of decoding the first encoding vector based on the saved decoder in the self-encoder, the method further comprises the following steps:
[0031] encoding an original electronic seal image corresponding to a seal mark based on the saved encoder to generate a second encoding vector, and comparing whether the first encoding vector and the second encoding vector are the same, if yes, then performing the subsequent step of decoding the first encoding vector based on the saved decoder in the self-encoder, wherein the seal mark is a seal mark of the original electronic seal image obtained from the applicant device.
[0032] In a possible implementation, after the step of generating the encrypted electronic seal image, and before the step of sending the encrypted electronic seal image to the applicant device, the method further comprises the following steps:
[0033] adding file identification information at a set position of the encrypted electronic seal image, and sending the encrypted electronic seal image added with the file identification information to the applicant device, wherein the file identification information is file identification information of an electronic file to be used with the encrypted electronic seal image obtained from the applicant device.
[0034] In a possible implementation, the method further comprises the following steps:
[0035] receiving an electronic file containing the encrypted electronic seal image and file identification information corresponding to the electronic file sent by the applicant device;
[0036] judging whether the encrypted electronic seal image contained in the electronic file is the same as the saved encrypted electronic seal image added with the file identification information, if yes, determining that the electronic seal image of the electronic file is compliant, and if no, determining that the electronic seal image of the electronic file is non-compliant.
[0037] In a possible implementation, after the encrypted electronic seal image is generated, and before the encrypted electronic seal image is sent to the applicant device, the method further includes:
[0038] determining whether the generated encrypted electronic seal image is garbled, and if not, performing the subsequent step of sending the encrypted electronic seal image to the applicant device.
[0039] In a possible implementation, after the encrypted electronic seal image is generated, and before the encrypted electronic electronic seal image is sent to the applicant device, the method further includes:
[0040] performing image comparison between the encrypted electronic seal image and an original electronic seal image corresponding to the seal identifier, determining whether they belong to the same seal subject, and if so, performing the subsequent step of sending the encrypted electronic seal image to the applicant device, wherein the seal identifier is the seal identifier of the original electronic seal image obtained from the applicant device.
[0041] In a third aspect, the application provides an electronic seal encryption method, which is applied to an applicant device, and the method includes:
[0042] encoding the original electronic seal image to be encrypted based on the obtained encoder to generate a first encoding vector;
[0043] sending the first encoding vector to an auditor device; wherein the encoder is an encoder in a self-encoder; so that the auditor device decodes the first encoding vector based on the saved decoder in the self-encoder to generate an encrypted electronic seal image, and so that the auditor device sends the encrypted electronic seal image to the applicant device.
[0044] In a possible implementation, the sending of the first encoding vector to the auditor device includes:
[0045] sending the first encoding vector and a seal identifier of the original electronic seal image to the auditor device; so that the auditor device encodes the original electronic seal image corresponding to the seal identifier based on the saved encoder to generate a second encoding vector, and so that the auditor device performs the subsequent step of decoding the first encoding vector based on the saved decoder in the self-encoder when the first encoding vector is the same as the second encoding vector.
[0046] In a possible implementation, the sending of the first encoding vector to the auditor device includes:
[0047] sending the first encoding vector and file identification information of an electronic file to be encrypted with the encrypted electronic seal image to the auditing party device; causing the auditing party device to add the file identification information at a set position of the encrypted electronic seal image, and causing the auditing party device to send the encrypted electronic seal image with the file identification information added to the applicant device.
[0048] In a possible implementation, the method further includes:
[0049] sending an electronic file containing the encrypted electronic seal image and file identification information corresponding to the electronic file to the auditing party device; causing the auditing party device to determine that the electronic seal image of the electronic file is compliant when the encrypted electronic seal image contained in the electronic file is the same as the saved encrypted electronic seal image with the file identification information added; and causing the auditing party device to determine that the electronic seal image of the electronic file is not compliant when the encrypted electronic seal image contained in the electronic file is not the same as the saved encrypted electronic seal image with the file identification information added.
[0050] In a possible implementation, before the encoding of the original electronic seal image to be encrypted based on the obtained encoder to generate a first encoding vector, the method further includes:
[0051] extracting a sub-image of a region where a seal is located in the original electronic seal image, and inputting the extracted sub-image into the encoder.
[0052] In a possible implementation, the obtained encoder is obtained from the auditing party device.
[0053] In a fourth aspect, the application further provides an electronic seal encryption method, and the method includes:
[0054] encoding an original electronic seal image to be encrypted based on an encoder in a self-encoder to generate a first encoding vector;
[0055] decoding the first encoding vector based on a decoder in the self-encoder to generate an encrypted electronic seal image.
[0056] In a fifth aspect, the application provides an electronic seal encryption device, and the device is applied to an auditing party device, and the device includes:
[0057] a receiving module configured to receive a first encoding vector sent by an applicant device, wherein the first encoding vector is generated by the applicant device based on an obtained encoder encoding an original electronic seal image to be encrypted, and the encoder is an encoder in a self-encoder;
[0058] a first decoding module, configured to decode the first encoding vector based on the saved decoder in the autoencoder, to generate an encrypted electronic seal image, and to send the encrypted electronic seal image to the applicant device.
[0059] In a possible implementation, the apparatus further includes:
[0060] a first encoding module, configured to encode the original electronic seal image corresponding to the seal identifier based on the saved encoder, to generate a second encoding vector;
[0061] The first decoding module is further configured to compare whether the first encoding vector and the second encoding vector are the same, and if yes, to perform a subsequent step of decoding the first encoding vector based on the saved decoder in the autoencoder, wherein the seal identifier is the seal identifier of the original electronic seal image obtained from the applicant device.
[0062] In a possible implementation, the first decoding module is further configured to:
[0063] add file identifier information at a set position of the encrypted electronic seal image, and send the encrypted electronic seal image with the added file identifier information to the applicant device, wherein the file identifier information is file identifier information of an electronic file to be used with the encrypted electronic seal image and obtained from the applicant device.
[0064] In a possible implementation, the apparatus further includes:
[0065] a judgment module, configured to receive an electronic file containing the encrypted electronic seal image and file identifier information corresponding to the electronic file sent by the applicant device, to judge whether the encrypted electronic seal image contained in the electronic file is the same as the saved encrypted electronic seal image with the added file identifier information, and if yes, to determine that the electronic seal image of the electronic file is compliant, and if not, to determine that the electronic seal image of the electronic file is not compliant.
[0066] In a possible implementation, the first decoding module is further configured to:
[0067] judge whether the generated encrypted electronic seal image is garbled, and if not, to perform a subsequent step of sending the encrypted electronic seal image to the applicant device.
[0068] In a possible implementation, the first decoding module is further configured to:
[0069] The encrypted electronic seal image is compared with an original electronic seal image corresponding to the seal identifier to determine whether they belong to the same seal subject, and if so, the subsequent step of sending the encrypted electronic seal image to the applicant device is performed, wherein the seal identifier is the seal identifier of the original electronic seal image obtained from the applicant device.
[0070] In a sixth aspect, the present application provides an electronic seal encryption device, which is applied to an applicant device, and the device comprises:
[0071] A second encoding module is configured to encode the original electronic seal image to be encrypted based on the obtained encoder to generate a first encoding vector.
[0072] A sending module is configured to send the first encoding vector to an auditor device, wherein the encoder is an encoder in a self-encoder, so that the auditor device decodes the first encoding vector based on the saved decoder in the self-encoder to generate an encrypted electronic seal image, and the auditor device sends the encrypted electronic seal image to the applicant device.
[0073] In a possible implementation, the sending module is specifically configured to:
[0074] send the first encoding vector and a seal identifier of the original electronic seal image to the auditor device, so that the auditor device encodes an original electronic seal image corresponding to the seal identifier based on the saved encoder to generate a second encoding vector, and the auditor device performs a subsequent step of decoding the first encoding vector based on the saved decoder in the self-encoder when the first encoding vector is the same as the second encoding vector.
[0075] In a possible implementation, the sending module is specifically configured to:
[0076] send the first encoding vector and file identifier information of an electronic file to be used with the encrypted electronic seal image to the auditor device, so that the auditor device adds the file identifier information at a set position of the encrypted electronic seal image, and the auditor device sends the encrypted electronic seal image with the added file identifier information to the applicant device.
[0077] In a possible implementation, the sending module is further configured to:
[0078] sending an electronic file containing the encrypted electronic seal image and file identification information corresponding to the electronic file to the auditing party device; causing the auditing party device to determine that the electronic seal image of the electronic file is compliant when the encrypted electronic seal image contained in the electronic file is the same as the saved encrypted electronic seal image added with the file identification information, and to determine that the electronic seal image of the electronic file is not compliant when the encrypted electronic seal image contained in the electronic file is not the same as the saved encrypted electronic seal image added with the file identification information.
[0079] In a possible implementation, the second encoding module is further configured to:
[0080] extracting a sub-image of a region where the seal is located in the original electronic seal image, and inputting the extracted sub-image into the encoder.
[0081] In a possible implementation, the obtained encoder is obtained from the auditing party device.
[0082] In a seventh aspect, the present application provides an electronic seal encryption device, the device comprising:
[0083] a third encoding module configured to encode an original electronic seal image to be encrypted based on an encoder in a self-encoder to generate a first encoding vector;
[0084] a second decoding module configured to decode the first encoding vector based on a decoder in the self-encoder to generate an encrypted electronic seal image.
[0085] In an eighth aspect, the present application provides an electronic device, comprising:
[0086] a memory configured to store program instructions;
[0087] a processor configured to invoke the program instructions stored in the memory and perform the steps included in the method according to any one of the above aspects according to the obtained program instructions.
[0088] In a ninth aspect, the present application provides a computer readable storage medium, the computer readable storage medium storing a computer program, the computer program comprising program instructions, the program instructions causing the computer to execute the method according to any one of the above aspects when executed by the computer.
[0089] In a tenth aspect, the present application provides a computer program product, the computer program product comprising: computer program code, which, when executed on a computer, causes the computer to execute the method according to any one of the above aspects.
[0090] In the embodiment of the present application, the applicant device can encode the original electronic seal image to be encrypted based on the encoder in the autoencoder to generate a first encoding vector, send the first encoding vector to the reviewer device, the reviewer device can decode the first encoding vector based on the decoder in the autoencoder to generate an encrypted electronic seal image, and send the encrypted electronic seal image to the applicant device for use of the encrypted electronic seal image. Since the electronic seal image can be encoded and decoded using the neural network model of the autoencoder in the embodiment of the present application, the electronic seal image can be encrypted, thereby improving the security of the electronic seal use process.
[0091] In addition, the encoder in the autoencoder can map and convert the input data (original electronic seal image) into a more compact low-dimensional encoding vector (first encoding vector), which can capture the main features of the input data. The decoder in the autoencoder can map and convert the low-dimensional encoding vector into an encrypted approximate representation (encrypted electronic seal image) of the original input data (original electronic seal image). The encrypted electronic seal image output by the decoder can hide the encryption information, so that the encrypted electronic seal image output by the decoder has strong similarity with the original electronic seal image input into the encoder, the encrypted electronic seal image hardly destroys the original seal information such as text in the original electronic seal image, and the visual effect of the encrypted electronic seal image is basically consistent with that of the original electronic seal image. Compared with encrypting the electronic seal by adding dots on the electronic seal image to destroy the original seal information of the seal image, the embodiment of the present application can not only encrypt the electronic seal image and ensure the security of the electronic seal use, but also ensure the integrity of the seal information in the encrypted electronic seal image and improve the user experience.
[0092] In addition, due to the irreversibility of the encoding process of the encoder, even if the attacker intercepts the first encoding vector sent by the applicant device to the reviewer device, the attacker cannot derive the original electronic seal image generating the first encoding vector. Similarly, due to the irreversibility of the decoding process of the decoder, even if the attacker intercepts the encrypted electronic seal image, the attacker cannot derive the original electronic seal image, thereby the security of the original electronic seal image can be ensured to the greatest extent. BRIEF DESCRIPTION OF DRAWINGS
[0093] In order to more clearly illustrate the embodiments of the present application or the implementation manners in the related art, the drawings needed to be used in the embodiment or related art description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can also be obtained by those skilled in the art based on these drawings.
[0094] Figure 1An electronic seal encryption system according to some embodiments is shown in the schematic diagram of Figure 1.
[0095] Figure 2 A first electronic seal encryption process according to some embodiments is shown in the schematic diagram of Figure 2.
[0096] Figure 3 A second electronic seal encryption process according to some embodiments is shown in the schematic diagram of Figure 3.
[0097] Figure 4 A third electronic seal encryption process according to some embodiments is shown in the schematic diagram of Figure 4.
[0098] Figure 5 A fourth electronic seal encryption process according to some embodiments is shown in the schematic diagram of Figure 5.
[0099] Figure 6 A fifth electronic seal encryption process according to some embodiments is shown in the schematic diagram of Figure 6.
[0100] Figure 7 A sixth electronic seal encryption process according to some embodiments is shown in the schematic diagram of Figure 7.
[0101] Figure 8 A seventh electronic seal encryption process according to some embodiments is shown in the schematic diagram of Figure 8.
[0102] Figure 9 An eighth electronic seal encryption process according to some embodiments is shown in the schematic diagram of Figure 9.
[0103] Figure 10 A ninth electronic seal encryption process according to some embodiments is shown in the schematic diagram of Figure 10.
[0104] Figure 11 A tenth electronic seal encryption process according to some embodiments is shown in the schematic diagram of Figure 11.
[0105] Figure 12 An electronic seal encryption apparatus according to some embodiments is shown in the schematic diagram of Figure 12.
[0106] Figure 13 Another electronic seal encryption apparatus according to some embodiments is shown in the schematic diagram of Figure 13.
[0107] Figure 14 Yet another electronic seal encryption apparatus according to some embodiments is shown in the schematic diagram of Figure 14.
[0108] Figure 15 An electronic device structure according to some embodiments is shown in the schematic diagram of Figure 15. DETAILED DESCRIPTION
[0109] In order to make the objects, technical solutions and advantages of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of the present application. The embodiments in the present application and the features in the embodiments can be combined with each other arbitrarily without conflict. In addition, although a logical sequence is shown in the flowchart, in some cases, the steps shown or described can be performed in an order different from the order shown.
[0110] The terms "first" and "second" in the description and claims of the present application and the above drawings are used to distinguish different objects and are not used to describe a specific sequence. In addition, the term "comprising" and any variations thereof are intended to cover non-exclusive protection. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but can optionally include steps or units not listed or can optionally include other steps or units inherent to the process, method, product or device. "Multiple" in the present application can mean at least two, for example, two, three or more, and the embodiments of the present application are not limited.
[0111] The exemplary embodiments of the present application are described below with reference to the accompanying drawings, which include various details of the embodiments of the present application to assist in understanding, and should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of the present disclosure. Also, for the sake of clarity and conciseness, the description below omits the description of well-known functions and structures. It should be noted that in the embodiments of the present application, some software, components, models and other industry solutions can be mentioned, which should be considered as exemplary and only for the purpose of illustrating the feasibility of the implementation of the technical solutions of the present application, but do not mean that the applicant has or will necessarily use the solutions.
[0112] In the technical solutions of the present application, the acquisition, transmission, storage and use of data comply with the requirements of relevant national laws and regulations.
[0113] Before introducing the electronic seal encryption system provided by the embodiments of the present application, in order to facilitate understanding, the technical background of the embodiments of the present application is introduced first.
[0114] An electronic seal is a digital (digital format) seal that uses cryptography and digital signature technology to verify and protect the authenticity, integrity and credibility of a file in an electronic manner. In the related art, the electronic seal is a digital format seal that has gradually been recognized by the public as a replacement for physical seals in recent years, and the electronic file sealed by the electronic seal has the same appearance and legal effect as the paper file sealed by the physical seal. However, how to improve the security of the use process of the electronic seal is a technical problem that needs to be solved at present.
[0115] Therefore, in order to improve the security of the use process of the electronic seal, the embodiments of the present application provide an electronic seal encryption system, method, device, equipment and medium. Some preferred embodiments of the present application are described below in conjunction with the drawings of the specification.
[0116] Embodiment 1:
[0117] Figure 1 An electronic seal encryption system provided by some embodiments is shown in the schematic diagram as shown in Figure 1 The system process is shown in
[0118] The applicant device 11 is configured to encode the original electronic seal image to be encrypted based on the obtained encoder, generate a first encoding vector, and send the first encoding vector to the auditor device 12; wherein the encoder is an encoder in the autoencoder.
[0119] The auditor device 12 is configured to decode the first encoding vector based on the saved decoder in the autoencoder, generate an encrypted electronic seal image, and send the encrypted electronic seal image to the applicant device 11.
[0120] In a possible implementation, in order to improve the security of the use process of the electronic seal, a user (for ease of description, referred to as an applicant) who wants to use a certain electronic seal can trigger a use request for applying to use the electronic seal. The process of the applicant triggering the use request is not specifically limited in the present application. For example, the applicant can input the seal identifier of the electronic seal to be used and click the button of applying to use the seal on the device (for ease of description, referred to as the applicant device) belonging to the applicant. When the applicant device 11 receives the seal identifier of the electronic seal to be used input by the applicant and identifies that the button of applying to use the seal is clicked, it can be considered that the use request for applying to use the electronic seal is received. After receiving the use request, the applicant device 11 can obtain the original electronic seal corresponding to the seal identifier of the electronic seal according to the received seal identifier of the electronic seal (wherein, for ease of description, the electronic seal that has not been encrypted is referred to as the original electronic seal), and can take the original electronic seal as the original electronic seal to be encrypted, encode the original electronic seal image based on the obtained encoder, and obtain (generate) a first encoding vector.
[0121] The application device 11 can obtain the encoder from the audit device 12, that is, the encoder obtained by the application device 11 can be an encoder in the self-encoder stored in the audit device 12. The self-encoder can include an encoder and a decoder. The audit device 12 can store the encoder and the decoder in the self-encoder, and the audit device 12 can disclose the encoder in the self-encoder, and the application device 11 can obtain the encoder. In a possible implementation, the application device 11 can obtain and use the encoder in the self-encoder, and cannot obtain and use the decoder in the self-encoder.
[0122] In a possible implementation, the application device 11 encodes the original electronic seal image to be encrypted based on the obtained encoder, and after obtaining the first encoding vector (encoding result), the application device 11 can send the first encoding vector to the audit device 12. After receiving the first encoding vector, the audit device 12 can decode the first encoding vector based on the decoder in the stored self-encoder to generate an encrypted electronic seal image (for ease of description, referred to as an encrypted electronic seal image).
[0123] In a possible implementation, the audit device 12 can send the generated encrypted electronic seal image to the application device 11, and the application device 11 can use the encrypted electronic seal image to generate an electronic contract or other electronic file, which will not be described here.
[0124] Since the embodiments of the present application can use the self-encoder neural network model to perform encoding and decoding operations on the electronic seal image, the electronic seal image can be encrypted, thereby improving the security of the electronic seal use process.
[0125] In addition, the encoder in the autoencoder can map and convert the input data (original electronic seal image) into a more compact low-dimensional encoding vector (first encoding vector), which can capture the main features of the input data. The decoder in the autoencoder can remap and convert the low-dimensional encoding vector into an encrypted approximate representation (encrypted electronic seal image) of the original input data (original electronic seal image). The encrypted electronic seal image output by the decoder can hide the encryption information, so that the encrypted electronic seal image output by the decoder has strong similarity with the original electronic seal image input into the encoder, and the encrypted electronic seal image hardly destroys the original seal information such as text in the original electronic seal image, and the visual effect of the encrypted electronic seal image is basically consistent with that of the original electronic seal image. Compared with encrypting the electronic seal by adding dots on the electronic seal image to destroy the original seal information of the seal image, the embodiments of the present application can not only encrypt the electronic seal image and ensure the security of the electronic seal, but also ensure the integrity of the seal information in the encrypted electronic seal image and improve the user experience.
[0126] In addition, due to the irreversibility of the encoding process of the encoder, even if the attacker intercepts the first encoding vector sent by the applicant device to the reviewer device, the attacker cannot derive the original electronic seal image generating the first encoding vector. Similarly, due to the irreversibility of the decoding process of the decoder, even if the attacker intercepts the encrypted electronic seal image, the attacker cannot derive the original electronic seal image, so that the security of the original electronic seal image can be ensured to the greatest extent.
[0127] Embodiment 2:
[0128] In order to maximize the security of the encrypted electronic seal image, on the basis of the above embodiments, in the embodiments of the present application, the applicant device is further configured to send file identification information of an electronic file to be used with the encrypted electronic seal image to the reviewer device.
[0129] The reviewer device is further configured to add the file identification information at a set position of the encrypted electronic seal image, and send the encrypted electronic seal image with the added file identification information to the applicant device.
[0130] In a possible implementation, in addition to sending the first encoding vector to the reviewer device, the applicant device can also send file identification information of an electronic file to be used with the encrypted electronic seal image to the reviewer device. The file identification information of the electronic file can be contract code, part of the contract code with a set number of digits such as the last four digits of the contract code, contract signing date, name of the applicant, and the like. The present application does not make specific limitation on the file identification information, which can be flexibly set according to the needs.
[0131] After generating the encrypted electronic seal image, the auditing party device can add the file identification information to the encrypted electronic seal image at a set position. For example, the file identification information can be added in the form of a watermark at a gap between characters, above a character, or the like in the encrypted electronic seal image. The present application does not limit the specific position and specific form of adding the file identification information, and the added file identification information is preferably such that it does not destroy the original seal information such as characters in the encrypted electronic seal image. The auditing party device can send the encrypted electronic seal image with the added file identification information to the applicant party device. The applicant party device can use the encrypted electronic seal image with the added file identification information to generate an electronic file such as an electronic contract.
[0132] In a possible implementation, after the applicant party device uses the encrypted electronic seal image with the added file identification information to generate an electronic file such as an electronic contract, the applicant party device can send the electronic file containing (with) the encrypted electronic seal image with the added file identification information and the file identification information corresponding to the electronic file to the auditing party device. The auditing party device can then determine whether the encrypted electronic seal image contained in the electronic file is the same as the encrypted electronic seal image with the added file identification information locally saved by the auditing party device. If they are the same, it can be considered that the encrypted electronic seal image contained (used) in the electronic file is compliant and reliable. Conversely, if the encrypted electronic seal image contained in the electronic file and the encrypted electronic seal image with the added file identification information locally saved by the auditing party device are two different electronic seal images, it can be considered that the electronic seal image used in the electronic file is non-compliant and unreliable, and the applicant party device can be returned a prompt information that the electronic seal is non-compliant.
[0133] Since the electronic seal image sent by the auditing party device to the applicant party device in the present application is an encrypted electronic seal image with added file identification information, the encrypted electronic seal image can be considered to be an encrypted electronic seal image exclusively used for an electronic file corresponding to the file identification information, thereby avoiding misuse of the encrypted electronic seal image. At the same time, even if an attacker intercepts the encrypted electronic seal image, the attacker cannot use the electronic seal image to generate an electronic file such as an electronic contract, which can improve the security of the electronic seal.
[0134] For ease of understanding, the electronic seal encryption process provided by the present application is described below through a specific embodiment. Referring to Figure 2 , Figure 2 FIG. 1 shows a first electronic seal encryption process provided by some embodiments, which includes the following steps:
[0135] S201: The applicant device encodes the original electronic seal image to be encrypted based on the obtained encoder, generates a first encoding vector, and sends the first encoding vector to the reviewer device; wherein the encoder is an encoder in the autoencoder. At the same time, the applicant device can also send the file identification information of the electronic file of the encrypted electronic seal image to be sent by the reviewer device to the reviewer device.
[0136] S202: The reviewer device decodes the first encoding vector based on the saved decoder in the autoencoder, and generates an encrypted electronic seal image.
[0137] S203: The reviewer device adds file identification information at a set position of the encrypted electronic seal image, and sends the encrypted electronic seal image with the added file identification information to the applicant device.
[0138] S204: The applicant device sends the electronic file containing the encrypted electronic seal image with the added file identification information and the file identification information corresponding to the electronic file to the reviewer device.
[0139] S205: The reviewer device judges whether the encrypted electronic seal image contained in the electronic file is the same as the saved encrypted electronic seal image with the added file identification information received from the applicant device, and if so, determines that the electronic seal image of the electronic file is compliant; otherwise, determines that the electronic seal image of the electronic file is not compliant.
[0140] Embodiment 3:
[0141] In order to improve the security of the electronic seal use process, on the basis of each of the above embodiments, in the embodiments of the present application, the applicant device is further used for:
[0142] sending the seal identification of the original electronic seal image to the reviewer device;
[0143] The reviewer device is further used for:
[0144] encoding the original electronic seal image corresponding to the seal identification based on the saved encoder, generating a second encoding vector; and comparing whether the first encoding vector and the second encoding vector are the same, if the same, then performing the subsequent step of decoding the first encoding vector based on the saved decoder in the autoencoder.
[0145] In a possible implementation, when the first encoding vector is sent to the auditor device, the applicant device can send the seal identifier of the original electronic seal image to the auditor device. The auditor device can obtain the original electronic seal image corresponding to the seal identifier from the locally stored seal image, and can encode the original electronic seal image corresponding to the seal identifier based on the stored encoder in the autoencoder to generate a second encoding vector. The auditor device can verify the credibility and security of the first encoding vector by comparing whether the first encoding vector and the second encoding vector are the same.
[0146] In a possible implementation, when the first encoding vector and the second encoding vector are the same, it can be considered that the first encoding vector and the second encoding vector are generated based on the same original electronic seal image and the same encoder, the auditor device can consider that the applicant device is a safe and credible device, the credibility and security of the first encoding vector are high, and the auditor device can perform a subsequent process of decoding the first encoding vector based on the decoder in the autoencoder to generate an encrypted electronic seal image and sending the encrypted electronic seal image to the applicant device.
[0147] On the contrary, if the first encoding vector and the second encoding vector are different, it can be considered that the credibility and security of the first encoding vector are low, and the subsequent process of decoding the first encoding vector based on the decoder in the autoencoder to generate an encrypted electronic seal image and sending the encrypted electronic seal image to the applicant device can not be performed. Optionally, when the first encoding vector and the second encoding vector are different, the auditor device can send prompt information that the encoding vector fails to pass the audit to the applicant device, which is not limited in the present application.
[0148] For the convenience of understanding, the electronic seal encryption process provided in the present application is explained and described below through a specific embodiment. Referring to Figure 3 , Figure 3 FIG. 2 shows a second electronic seal encryption process provided by some embodiments, which includes the following steps:
[0149] S301: The applicant device encodes the original electronic seal image to be encrypted based on the obtained encoder to generate a first encoding vector, and sends the first encoding vector and the seal identifier of the original electronic seal image to the auditor device; wherein the encoder is an encoder in an autoencoder.
[0150] S302: The auditing party device encodes the original electronic seal image corresponding to the seal mark based on the encoder in the autoencoder to generate a second encoding vector; and compares whether the first encoding vector and the second encoding vector are the same, if the same, decodes the first encoding vector based on the saved decoder in the autoencoder to generate an encrypted electronic seal image, and sends the encrypted electronic seal image to the applicant party device.
[0151] S303: The applicant party device receives the encrypted electronic seal image sent by the auditing party device, and generates an electronic contract or the like using the encrypted electronic seal image.
[0152] Since the auditing party device can encode the original electronic seal image based on the encoder in the autoencoder to generate a second encoding vector, and only decodes the first encoding vector based on the decoder in the autoencoder to generate an encrypted electronic seal image in the case that the second encoding vector and the first encoding vector are the same, the security of the electronic seal in use can be guaranteed to the greatest extent.
[0153] Embodiment 4:
[0154] In order to improve the security of the electronic seal in use, on the basis of the above embodiments, in the embodiments of the present application, the auditing party device is further configured to:
[0155] determine whether the generated encrypted electronic seal image is garbled, if not, then perform the subsequent step of sending the encrypted electronic seal image to the applicant party device.
[0156] In view of the fact that the encoder used by the applicant party device may not be obtained from the auditing party device, the encoder used by the applicant party device may not be consistent with the encoder used by the auditing party device, and the like, resulting in garbled encrypted electronic seal image decoded by the auditing party device, in order to improve the security of the electronic seal in use, etc., the auditing party device can send the encrypted electronic seal image to the applicant party device after generating the encrypted electronic seal image. The applicant party device can identify whether the generated encrypted electronic seal image is garbled before the encrypted electronic seal image is sent to the applicant party device, if it is garbled, it can be considered that the encoder used by the applicant party device is not obtained from the auditing party device, or it can be considered that the applicant party device may not be a secure and trusted device, and then the encrypted electronic seal image can not be sent to the applicant party device.
[0157] In a possible implementation, if the encrypted electronic seal image is not garbled, the encrypted electronic seal image can be sent to the applicant party device.
[0158] For the convenience of understanding, the electronic seal encryption process provided by the present application will be explained and described below through a specific embodiment. Referring to Figure 4 ,Figure 4 A third electronic seal encryption process provided by some embodiments is shown in a schematic diagram, which includes the following steps:
[0159] S401: The applicant device encodes the original electronic seal image to be encrypted based on the obtained encoder, generates a first encoding vector, and sends the first encoding vector to the reviewer device; wherein the encoder is an encoder in a certain autoencoder.
[0160] S402: After the reviewer device receives the first encoding vector, the first encoding vector is decoded based on the decoder in the locally saved autoencoder to generate an encrypted electronic seal image.
[0161] S403: The reviewer device determines whether the generated encrypted electronic seal image is garbled, and if not, sends the encrypted electronic seal image to the applicant device.
[0162] S404: The applicant device receives the encrypted electronic seal image sent by the reviewer device, and uses the encrypted electronic seal image to generate an electronic contract or the like.
[0163] Embodiment 5:
[0164] In order to improve the security of the use process of the electronic seal, on the basis of the above-mentioned embodiments, in the embodiments of the present application, the reviewer device is further used for:
[0165] image comparison between the encrypted electronic seal image and the original electronic seal image corresponding to the seal identifier to determine whether they belong to the same seal subject, and if so, the subsequent step of sending the encrypted electronic seal image to the applicant device is performed; wherein the seal identifier is the seal identifier of the original electronic seal image obtained from the applicant device.
[0166] In a possible implementation, the reviewer device can further determine whether the encrypted electronic seal image and the original electronic seal image corresponding to the seal identifier belong to the same seal subject through image comparison or the like after generating the encrypted electronic seal image and before sending the encrypted electronic seal image to the applicant device, and if so, the encrypted electronic seal image can be sent to the applicant device. On the contrary, if the encrypted electronic seal image and the original electronic seal image corresponding to the seal identifier belong to different seal subjects respectively, it can be considered that the applicant device is not trustworthy or the original electronic seal image used by the applicant device is incorrect, and the encrypted electronic seal image can not be sent to the applicant device.
[0167] In a possible implementation, when judging whether the encrypted electronic seal image and the original electronic seal image corresponding to the seal identifier belong to the same seal subject, the two images can be compared pixel by pixel to obtain a similarity between the two images. If the similarity is higher than a set similarity threshold, it can be considered that the encrypted electronic seal image and the original electronic seal image corresponding to the seal identifier belong to the same seal subject. Otherwise, if the similarity is not higher than the set similarity threshold, it can be considered that the encrypted electronic seal image and the original electronic seal image corresponding to the seal identifier belong to different seal subjects. The similarity threshold is not limited in the present application and can be flexibly set according to requirements.
[0168] In addition, in a possible implementation, when judging whether the encrypted electronic seal image and the original electronic seal image corresponding to the seal identifier belong to the same seal subject, the text in the encrypted electronic seal image and the original electronic seal image can be extracted respectively, and it is judged whether the text in the two seal images is the same. If the text is the same, it can be considered that the encrypted electronic seal image and the original electronic seal image corresponding to the seal identifier belong to the same seal subject. Otherwise, if the text in the two seal images is not the same, it can be considered that the encrypted electronic seal image and the original electronic seal image corresponding to the seal identifier belong to different seal subjects.
[0169] For the convenience of understanding, the electronic seal encryption process provided by the present application is explained and described below through a specific embodiment. Referring to Figure 5 , Figure 5 a fourth electronic seal encryption process provided by some embodiments is shown, which includes the following steps:
[0170] S501: The applicant device encodes the original electronic seal image to be encrypted based on the obtained encoder, generates a first encoding vector, and sends the first encoding vector and the seal identifier of the original electronic seal image to the auditor device; wherein the encoder is an encoder in a certain autoencoder.
[0171] S502: After receiving the first encoding vector, the auditor device decodes the first encoding vector based on the decoder in the locally saved autoencoder to generate an encrypted electronic seal image.
[0172] S503: The auditor device obtains the original electronic seal image corresponding to the seal identifier from the locally saved seal images, and performs image comparison on the encrypted electronic seal image and the original electronic seal image corresponding to the seal identifier to judge whether they belong to the same seal subject. If yes, the encrypted electronic seal image is sent to the applicant device.
[0173] S504: The applicant device receives the encrypted electronic seal image sent by the auditor device, and generates an electronic contract or the like using the encrypted electronic seal image.
[0174] Embodiment 7:
[0175] To improve efficiency, on the basis of the above embodiments, in the embodiments of the present application, the applicant device is further configured to:
[0176] extracting a sub-image of the region where the seal is located in the original electronic seal image, and inputting the extracted sub-image into the encoder.
[0177] In a possible implementation, considering that in addition to the region where the seal is located, the electronic seal image usually also has a blank region, which generally has no information, if the entire original electronic seal image is input into the encoder, the blank region part will also be encoded, which will cause resource waste and reduce efficiency. To improve efficiency, before the original electronic seal image is input into the encoder, a sub-image of the region where the seal is located in the original electronic seal image can be extracted, and only the extracted sub-image of the region where the seal is located is input into the encoder. The encoder only encodes the sub-image of the region where the seal is located. Compared with encoding the entire original electronic seal image including the blank region, efficiency can be improved.
[0178] Optionally, the sub-image of the region where the seal is located in the original electronic seal image can be extracted by using a positioning algorithm, which will not be described here.
[0179] Similarly, before the auditor device needs to generate a second encoding vector and needs to input the original electronic seal image into the encoder, the sub-image of the region where the seal is located in the original electronic seal image can also be extracted based on a positioning algorithm, and the extracted sub-image is input into the encoder, which will not be described here.
[0180] For ease of understanding, the electronic seal encryption process provided by the present application is explained and described below through a specific embodiment. Referring to Figure 6 , Figure 6 a fifth electronic seal encryption process provided by some embodiments is shown, which includes the following steps:
[0181] S601: The applicant device extracts a sub-image of the region where the seal is located in the original electronic seal image, inputs the extracted sub-image into the encoder, encodes the sub-image based on the encoder, generates a first encoding vector, and sends the first encoding vector to the auditor device; wherein the encoder is an encoder obtained from the auditor device, and the encoder is an encoder in the encoder.
[0182] S602: The auditing party device decodes the first encoding vector based on the decoder in the saved autoencoder, generates an encrypted electronic seal image, and sends the encrypted electronic seal image to the applicant party device.
[0183] To facilitate understanding, the electronic seal encryption process provided by the present application is explained and described below through a specific embodiment. Referring to Figure 7 , Figure 7 A schematic diagram of a sixth electronic seal encryption process provided by some embodiments is shown, which includes the following steps:
[0184] S701: The applicant party device extracts a sub-image of the area where the seal is located in the original electronic seal image, inputs the extracted sub-image into the encoder, encodes the sub-image based on the encoder, generates a first encoding vector, and sends the first encoding vector and the seal identifier corresponding to the original electronic seal image to the auditing party device; wherein the encoder is obtained from the auditing party device, and the encoder is the encoder in the autoencoder.
[0185] S702: The auditing party device obtains the original electronic seal image corresponding to the seal identifier from the seal image saved by itself, extracts a sub-image of the area where the seal is located in the original electronic seal image, and inputs the extracted sub-image into the encoder in the locally saved autoencoder, to generate a second encoding vector.
[0186] S703: The auditing party device compares whether the first encoding vector and the second encoding vector are the same, and if they are the same, decodes the first encoding vector based on the decoder in the saved autoencoder, generates an encrypted electronic seal image, and sends the encrypted electronic seal image to the applicant party device.
[0187] To facilitate understanding, the electronic seal encryption process provided by the present application is explained and described below through a specific embodiment. Referring to Figure 8 , Figure 8 A schematic diagram of a seventh electronic seal encryption process provided by some embodiments is shown, assuming that the autoencoder is a 6-layer U-shaped autoencoder, and the applicant party device can use an interpolation algorithm or the like to adjust the size of the original electronic seal image to a set size that meets the requirements of the input layer of the autoencoder before inputting the original electronic seal image into the encoder in the autoencoder, such as adjusting the size of the original electronic seal image to 256 pixels x 256 pixels. The original electronic seal image can correspond to three color channels of RGB, and the image parameter (input image) of the original electronic seal image is represented by WxHxC, wherein W is the original electronic seal image (in pixels), H is the height of the original electronic seal image (in pixels), and C is the number of channels. The image parameter of the original electronic seal image can be 256x256x3.
[0188] After the applicant device inputs the original electronic seal image into the encoder, the original electronic seal image can undergo, for example, 3 convolution operations. Assuming that the first convolution layer corresponds to 96 1x1 convolution kernels, and the convolution step size is configured as 4, after the first convolution operation of the first convolution layer, the image size is reduced to 1 / 4 of the original, and the channel number becomes 96, that is, after the first convolution operation, the image parameters are converted to 64x64x96. The principle of the first convolution operation is the same as the second convolution operation. Assuming that after the second convolution operation, the image parameters are converted to 4x4x256. Assuming that after the third convolution operation, a 1x1x384 encoding vector (first encoding vector) is obtained.
[0189] The applicant device can send the 1x1x384 encoding vector (first encoding vector) to the auditor device. After receiving the encoding vector, the auditor device can input the 1x1x384 encoding vector (first encoding vector) into the decoder in the autoencoder. The first encoding vector can undergo, for example, 3 deconvolution operations in the decoder to output an encrypted electronic seal image. Assuming that after the first deconvolution operation, the image parameters are converted to 4x4x256 image parameters. Assuming that after the second deconvolution operation, the image parameters are converted to 64x64x96, and assuming that after the third deconvolution operation, an encrypted electronic seal image with the same image parameters as the original electronic seal image can be obtained, that is, the image parameters of the encrypted electronic seal image can also be 256x256x3.
[0190] The autoencoder network model in the embodiments of the application is small and light, has low computing power requirements, and can run on devices with limited computing power such as smartphones. The entire electronic seal encryption process is simple and easy to operate, and the security of the electronic seal use process can be improved simply and quickly.
[0191] Embodiment 8:
[0192] Based on the same inventive concept, the application provides an electronic seal encryption method. The method is applied to an auditor device, and the method is described in detail in Embodiment 8. Figure 9 , Figure 9 An eighth electronic seal encryption process schematic diagram provided by some embodiments is shown. The method includes the following steps:
[0193] S901: The auditor device receives the first encoding vector sent by the applicant device, wherein the first encoding vector is generated by the applicant device based on an obtained encoder for encoding the original electronic seal image to be encrypted, and the encoder is an encoder in an autoencoder.
[0194] S902: The auditing party device decodes the first encoding vector based on the saved decoder in the self-encoder, generates an encrypted electronic seal image, and sends the encrypted electronic seal image to the applicant device.
[0195] In a possible implementation, after the receiving of the first encoding vector sent by the applicant device, and before the decoding of the first encoding vector based on the saved decoder in the self-encoder, the method further includes:
[0196] encoding the original electronic seal image corresponding to the seal identifier based on the saved encoder, to generate a second encoding vector; and comparing whether the first encoding vector and the second encoding vector are the same, if yes, then performing the subsequent step of decoding the first encoding vector based on the saved decoder in the self-encoder, wherein the seal identifier is the seal identifier of the original electronic seal image obtained from the applicant device.
[0197] In a possible implementation, after the generation of the encrypted electronic seal image, and before the sending of the encrypted electronic seal image to the applicant device, the method further includes:
[0198] adding file identifier information at a set position of the encrypted electronic seal image, and sending the encrypted electronic seal image with the added file identifier information to the applicant device, wherein the file identifier information is file identifier information of an electronic file to be used with the encrypted electronic seal image obtained from the applicant device.
[0199] In a possible implementation, the method further includes:
[0200] receiving an electronic file containing the encrypted electronic seal image sent by the applicant device and file identifier information corresponding to the electronic file;
[0201] determining whether the encrypted electronic seal image contained in the electronic file is the same as the saved encrypted electronic seal image with the added file identifier information, if yes, then determining that the electronic seal image of the electronic file is compliant; otherwise, determining that the electronic seal image of the electronic file is not compliant.
[0202] In a possible implementation, after the generation of the encrypted electronic seal image, and before the sending of the encrypted electronic seal image to the applicant device, the method further includes:
[0203] determining whether the generated encrypted electronic seal image is garbled, if no, then performing the subsequent step of sending the encrypted electronic seal image to the applicant device.
[0204] In a possible implementation, after the encrypted electronic seal image is generated, and before the encrypted electronic seal image is sent to the applicant device, the method further includes:
[0205] performing image comparison between the encrypted electronic seal image and an original electronic seal image corresponding to the seal identifier, to determine whether the two images belong to the same seal subject, and if so, performing the subsequent step of sending the encrypted electronic seal image to the applicant device, wherein the seal identifier is the seal identifier of the original electronic seal image obtained from the applicant device.
[0206] Based on the same invention concept, the present application also provides an electronic seal encryption method applied to an applicant device, which is described in detail with reference to Figure 10 , Figure 10 a ninth electronic seal encryption process schematic diagram provided by some embodiments is shown, which includes the following steps:
[0207] S1001: The applicant device encodes the original electronic seal image to be encrypted based on the obtained encoder, to generate a first encoding vector.
[0208] S1002: The applicant device sends the first encoding vector to the reviewer device; wherein the encoder is an encoder in a self-encoder; so that the reviewer device generates an encrypted electronic seal image by decoding the first encoding vector based on the saved decoder in the self-encoder, and so that the reviewer device sends the encrypted electronic seal image to the applicant device.
[0209] In a possible implementation, the sending of the first encoding vector to the reviewer device includes:
[0210] sending the first encoding vector and a seal identifier of the original electronic seal image to the reviewer device; so that the reviewer device generates a second encoding vector by encoding an original electronic seal image corresponding to the seal identifier based on the saved encoder, and so that the reviewer device performs the subsequent step of decoding the first encoding vector based on the saved decoder in the self-encoder when the first encoding vector is the same as the second encoding vector.
[0211] In a possible implementation, the sending of the first encoding vector to the reviewer device includes:
[0212] sending the first encoding vector and file identification information of an electronic file to be encrypted with the encrypted electronic seal image to the auditing party device; causing the auditing party device to add the file identification information at a set position of the encrypted electronic seal image, and causing the auditing party device to send the encrypted electronic seal image with the file identification information added to the applicant device.
[0213] In a possible implementation, the method further includes:
[0214] sending an electronic file containing the encrypted electronic seal image and file identification information corresponding to the electronic file to the auditing party device; causing the auditing party device to determine that the electronic seal image of the electronic file is compliant when the encrypted electronic seal image contained in the electronic file is the same as the saved encrypted electronic seal image with the file identification information added; and causing the auditing party device to determine that the electronic seal image of the electronic file is not compliant when the encrypted electronic seal image contained in the electronic file is not the same as the saved encrypted electronic seal image with the file identification information added.
[0215] In a possible implementation, before the step of encoding the original electronic seal image to be encrypted based on the obtained encoder to generate a first encoding vector, the method further includes:
[0216] extracting a sub-image of a region where a seal is located in the original electronic seal image, and inputting the extracted sub-image into the encoder.
[0217] In a possible implementation, the obtained encoder is obtained from the auditing party device.
[0218] Based on the same inventive concept, the present application further provides an electronic seal encryption method, which is described in detail in the following. Figure 11 , Figure 11 Fig. 10 shows a tenth electronic seal encryption process schematic diagram provided by some embodiments, which is applied to an electronic device, which can be a PC, a mobile terminal, or the like, or a server, or the like, and the method includes the following steps:
[0219] S1101: encoding an original electronic seal image to be encrypted based on an encoder in a self-encoder to generate a first encoding vector.
[0220] S1102: decoding the first encoding vector based on a decoder in the self-encoder to generate an encrypted electronic seal image.
[0221] Embodiment 9:
[0222] Based on the same inventive concept, the present application provides an electronic seal encryption device, which is described in detail in the following.Figure 12 , Figure 12 An electronic seal encryption device 1200 provided by some embodiments is shown in a schematic diagram. The device is applied to an auditing party device, and includes:
[0223] A receiving module 1201 is configured to receive a first encoding vector sent by an applicant device, wherein the first encoding vector is generated by the applicant device based on an obtained encoder for encoding an original electronic seal image to be encrypted, and the encoder is an encoder in a self-encoder;
[0224] A first decoding module 1202 is configured to decode the first encoding vector based on a saved decoder in the self-encoder, to generate an encrypted electronic seal image, and send the encrypted electronic seal image to the applicant device.
[0225] In a possible implementation, the device further includes:
[0226] A first encoding module 1203 is configured to encode an original electronic seal image corresponding to a seal identifier based on the saved encoder, to generate a second encoding vector;
[0227] The first decoding module 1202 is further configured to compare whether the first encoding vector and the second encoding vector are the same, and if so, perform a subsequent step of decoding the first encoding vector based on a saved decoder in the self-encoder, wherein the seal identifier is a seal identifier of the original electronic seal image obtained from the applicant device.
[0228] In a possible implementation, the first decoding module 1202 is further configured to:
[0229] add file identifier information at a set position of the encrypted electronic seal image, and send the encrypted electronic seal image with the added file identifier information to the applicant device, wherein the file identifier information is file identifier information of an electronic file to be used with the encrypted electronic seal image, and obtained from the applicant device.
[0230] In a possible implementation, the device further includes:
[0231] A judgment module 1204 is configured to receive an electronic file containing the encrypted electronic seal image and file identifier information corresponding to the electronic file sent by the applicant device, and determine whether the encrypted electronic seal image contained in the electronic file is the same as the saved encrypted electronic seal image with the added file identifier information, and if so, determine that the electronic seal image of the electronic file is compliant, and otherwise, determine that the electronic seal image of the electronic file is not compliant.
[0232] In a possible implementation, the first decoding module 1202 is further configured to:
[0233] determine whether the generated encrypted electronic seal image is random code, and if not, perform a subsequent step of sending the encrypted electronic seal image to the applicant device.
[0234] In a possible implementation, the first decoding module 1202 is further configured to:
[0235] perform image comparison on the encrypted electronic seal image and an original electronic seal image corresponding to the seal identifier, to determine whether the two belong to the same seal subject, and if so, perform a subsequent step of sending the encrypted electronic seal image to the applicant device, wherein the seal identifier is a seal identifier of the original electronic seal image obtained from the applicant device.
[0236] Based on the same invention concept, the present application provides an electronic seal encryption device, which is described in detail with reference to Figure 13 , Figure 13 Another electronic seal encryption device 1300 provided by some embodiments is shown in a schematic diagram, which is applied to an applicant device, and the device comprises:
[0237] a second encoding module 1301 configured to encode an original electronic seal image to be encrypted based on an obtained encoder, to generate a first encoding vector;
[0238] a sending module 1302 configured to send the first encoding vector to an auditor device; wherein the encoder is an encoder in a self-encoder; so that the auditor device decodes the first encoding vector based on a saved decoder in the self-encoder to generate an encrypted electronic seal image, and so that the auditor device sends the encrypted electronic seal image to the applicant device.
[0239] In a possible implementation, the sending module 1302 is specifically configured to:
[0240] send the first encoding vector and a seal identifier of the original electronic seal image to the auditor device; so that the auditor device encodes an original electronic seal image corresponding to the seal identifier based on the saved encoder to generate a second encoding vector, and so that the auditor device performs a subsequent step of decoding the first encoding vector based on a saved decoder in the self-encoder when the first encoding vector is the same as the second encoding vector.
[0241] In a possible implementation, the sending module 1302 is specifically configured to:
[0242] send the first encoding vector and file identification information of an electronic file to be used with the encrypted electronic seal image to the auditing party device; cause the auditing party device to add the file identification information at a set position of the encrypted electronic seal image, and cause the auditing party device to send the encrypted electronic seal image with the file identification information added to the applicant device.
[0243] In a possible implementation, the sending module 1302 is further configured to:
[0244] send an electronic file containing the encrypted electronic seal image and file identification information corresponding to the electronic file to the auditing party device; cause the auditing party device to determine that the electronic seal image of the electronic file is compliant when the encrypted electronic seal image contained in the electronic file is the same as the saved encrypted electronic seal image with the file identification information added, and cause the auditing party device to determine that the electronic seal image of the electronic file is not compliant when the encrypted electronic seal image contained in the electronic file is not the same as the saved encrypted electronic seal image with the file identification information added.
[0245] In a possible implementation, the second encoding module 1301 is further configured to:
[0246] extract a sub-image of a region where a seal is located in the original electronic seal image, and input the extracted sub-image into the encoder.
[0247] In a possible implementation, the obtained encoder is obtained from the auditing party device.
[0248] Based on the same inventive concept, the present application provides an electronic seal encryption device, which is described below with reference to Figure 14 , Figure 14 Another electronic seal encryption device 1400 provided by some embodiments is shown in a schematic diagram, and the device includes:
[0249] A third encoding module 1401 is configured to encode an original electronic seal image to be encrypted based on an encoder in a self-encoder, to generate a first encoding vector.
[0250] A second decoding module 1402 is configured to decode the first encoding vector based on a decoder in the self-encoder, to generate an encrypted electronic seal image.
[0251] Embodiment 10
[0252] Based on the same inventive concept, on the basis of the above-mentioned embodiments, the present application further provides an electronic device, which can realize the functions of the electronic seal encryption device discussed above. Please refer to Figure 15, Figure 15 An electronic device structure diagram provided by some embodiments is shown, which includes a processor 1501, a communication interface 1502, a memory 1503 and a communication bus 1504, wherein the processor 1501, the communication interface 1502 and the memory 1503 complete communication with each other through the communication bus 1504;
[0253] The memory 1503 stores a computer program, which, when executed by the processor 1501, causes the processor 1501 to execute the electronic seal encryption method as any one of the preceding embodiments, and the repeated parts will not be described again.
[0254] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or only one type of bus.
[0255] The communication interface 1502 is used for communication between the above-mentioned electronic device and other devices.
[0256] The memory can include a Random Access Memory (RAM) and can also include a Non-Volatile Memory (NVM), such as at least one disk memory. Optionally, the memory can also be at least one storage device located away from the aforementioned processor.
[0257] The processor mentioned above can be a general-purpose processor, including a central processing unit, a network processor (NP), etc.; it can also be a Digital Signal Processing (DSP), an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc.
[0258] Based on the same inventive concept, the embodiments of the present application provide a computer readable storage medium, a computer program product including: computer program code, when the computer program code runs on a computer, causes the computer to execute the electronic seal encryption method as any one of the preceding embodiments, and the repeated parts will not be described again.
[0259] The above computer-readable storage medium can be any available medium or data storage that a processor in an electronic device can access, including but not limited to a magnetic memory such as a floppy disk, a hard disk, a magnetic tape, a magneto-optical disk (MO), etc., an optical memory such as a CD, a DVD, a BD, a HVD, etc., and a semiconductor memory such as a ROM, an EPROM, an EEPROM, a non-volatile memory (NAND FLASH), a solid state disk (SSD), etc.
[0260] Based on the same inventive concept, the embodiments of the present application also provide a computer program product, which comprises computer program codes, when the computer program codes are run on a computer, the computer program codes make the computer execute the electronic seal encryption method of any one of the preceding embodiments. Since the principle of solving problems of the above computer program product is similar to the electronic seal encryption method, the implementation of the above computer program product can be referred to the implementation of the method, and the repeated parts will not be described herein.
[0261] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to a disk storage, a CD-ROM, an optical storage, etc.) containing computer-usable program codes.
[0262] The present application is described with reference to flowcharts and / or block diagrams of the method, device (system), and computer program product according to the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device implemented in the flowcharts and / or block diagrams. Figure 1 The function specified in one or more flows and / or blocks. Figure 1 The device that implements the function specified in one or more flows and / or blocks.
[0263] These computer program instructions can also be stored in a computer-readable memory capable of guiding a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a manufactured product including instruction devices, which implement the flowcharts and / or block diagrams. Figure 1 The function specified in one or more flows and / or blocks. Figure 1 The device that implements the function specified in one or more flows and / or blocks.
[0264] These computer program instructions can also be loaded into a computer or other programmable data processing devices, so that a series of operational steps are performed on the computer or other programmable data processing devices to generate computer-implemented processes, thus the instructions executed on the computer or other programmable data processing devices provide processes for implementing the functions specified in the flowchart Figure 1 one or more flows and / or blocks Figure 1 one or more blocks or steps of the functions specified in the flowchart
[0265] Obviously, those skilled in the art can make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application belong to the scope of the claims of the present application and their equivalent technologies, the present application also intends to include these modifications and variations.
Claims
1. An electronic seal encryption system, characterized by, The system comprises: An applicant device, configured to encode an original electronic seal image to be encrypted based on an obtained encoder, to generate a first encoding vector, and to send the first encoding vector to an auditor device; wherein the encoder is an encoder in a self-encoder; The auditor device is configured to decode the first encoding vector based on a saved decoder in the self-encoder, to generate an encrypted electronic seal image, and to send the encrypted electronic seal image to the applicant device.
2. The system of claim 1, wherein, The applicant device is further configured to: Send a seal identifier of the original electronic seal image to the auditor device; The auditor device is further configured to: Encode an original electronic seal image corresponding to the seal identifier based on the saved encoder, to generate a second encoding vector; and compare the first encoding vector and the second encoding vector, if they are the same, then perform the subsequent decoding of the first encoding vector based on the saved decoder in the self-encoder.
3. The system of claim 1, wherein, The applicant device is further configured to: Send file identifier information of an electronic file to be used with the encrypted electronic seal image to the auditor device; The auditor device is further configured to: Add the file identifier information at a set position of the encrypted electronic seal image, and send the encrypted electronic seal image with the added file identifier information to the applicant device.
4. The system of claim 3, wherein, The applicant device is further configured to: Send an electronic file containing the encrypted electronic seal image and file identifier information corresponding to the electronic file to the auditor device; The auditor device is further configured to: Determine whether the encrypted electronic seal image contained in the electronic file is the same as the saved encrypted electronic seal image with the added file identifier information, if yes, determine that the electronic seal image of the electronic file is compliant; if no, determine that the electronic seal image of the electronic file is not compliant.
5. The system of claim 1, wherein, The auditor device is further configured to: Determine whether the generated encrypted electronic seal image is random code, if no, then perform the subsequent step of sending the encrypted electronic seal image to the applicant device.
6. The system of claim 1, wherein, The auditor device is further configured to: Perform image comparison between the encrypted electronic seal image and an original electronic seal image corresponding to a seal identifier, to determine whether they belong to the same seal subject, if yes, then perform the subsequent step of sending the encrypted electronic seal image to the applicant device; wherein the seal identifier is the seal identifier of the original electronic seal image obtained from the applicant device.
7. The system of claim 1, wherein, The applicant device is further configured to: Extract a sub-image of a region where a seal is located in the original electronic seal image, and input the extracted sub-image into the encoder.
8. The system according to any one of claims 1-7, characterized in that, The encoder obtained by the applicant device is obtained from the auditor device.
9. An electronic seal encryption method characterized by, The method is applied to an auditor device, and the method comprises: Receiving a first encoding vector sent by an applicant device, wherein the first encoding vector is generated by the applicant device based on an obtained encoder encoding an original electronic seal image to be encrypted, and the encoder is an encoder in a self-encoder; decoding the first encoding vector based on the saved decoder in the autoencoder, to generate an encrypted electronic seal image, and sending the encrypted electronic seal image to the applicant device.
10. The method of claim 9, wherein, After receiving the first encoding vector sent by the applicant device, and before decoding the first encoding vector based on the saved decoder in the autoencoder, the method further comprises: encoding the original electronic seal image corresponding to the seal identifier based on the saved encoder, to generate a second encoding vector; and comparing whether the first encoding vector and the second encoding vector are the same, if yes, then performing the subsequent step of decoding the first encoding vector based on the saved decoder in the autoencoder, wherein the seal identifier is the seal identifier of the original electronic seal image obtained from the applicant device.
11. The method of claim 9, wherein, After generating the encrypted electronic seal image, and before sending the encrypted electronic seal image to the applicant device, the method further comprises: adding file identifier information at a set position of the encrypted electronic seal image, and sending the encrypted electronic seal image with the added file identifier information to the applicant device, wherein the file identifier information is the file identifier information of an electronic file to be used with the encrypted electronic seal image obtained from the applicant device.
12. The method of claim 11, wherein, The method further comprises: receiving an electronic file containing the encrypted electronic seal image sent by the applicant device and file identifier information corresponding to the electronic file; determining whether the encrypted electronic seal image contained in the electronic file and the saved encrypted electronic seal image with the added file identifier information are the same, if yes, then determining that the electronic seal image of the electronic file is compliant; if no, then determining that the electronic seal image of the electronic file is not compliant.
13. The method of claim 9, wherein, After generating the encrypted electronic seal image, and before sending the encrypted electronic seal image to the applicant device, the method further comprises: determining whether the generated encrypted electronic seal image is random code, if no, then performing the subsequent step of sending the encrypted electronic seal image to the applicant device.
14. The method of claim 9, wherein, After generating the encrypted electronic seal image, and before sending the encrypted electronic seal image to the applicant device, the method further comprises: performing image comparison between the encrypted electronic seal image and the original electronic seal image corresponding to the seal identifier, to determine whether they belong to the same seal subject, if yes, then performing the subsequent step of sending the encrypted electronic seal image to the applicant device, wherein the seal identifier is the seal identifier of the original electronic seal image obtained from the applicant device.
15. An electronic seal encryption method characterized by comprising: The method is applied to an applicant device, and the method comprises: encoding the original electronic seal image to be encrypted based on the obtained encoder, to generate a first encoding vector; sending the first encoding vector to an auditor device; wherein the encoder is an encoder in a self-encoder; so that the auditor device decodes the first encoding vector based on a decoder saved in the self-encoder to generate an encrypted electronic seal image, and so that the auditor device sends the encrypted electronic seal image to the applicant device.
16. The method of claim 15, wherein, The sending of the first encoding vector to the auditor device comprises: sending the first encoding vector and a seal identifier of the original electronic seal image to the auditor device; so that the auditor device encodes the original electronic seal image corresponding to the seal identifier based on the saved encoder to generate a second encoding vector, and so that the auditor device, when the first encoding vector is the same as the second encoding vector, performs a subsequent step of decoding the first encoding vector based on a decoder saved in the self-encoder.
17. The method of claim 15, wherein, The sending of the first encoding vector to the auditor device comprises: sending the first encoding vector and file identifier information of an electronic file to be used with the encrypted electronic seal image to the auditor device; so that the auditor device adds the file identifier information at a set position of the encrypted electronic seal image, and so that the auditor device sends the encrypted electronic seal image with the added file identifier information to the applicant device.
18. The method of claim 17, wherein, The method further comprises: sending an electronic file containing the encrypted electronic seal image and file identifier information corresponding to the electronic file to the auditor device; so that the auditor device determines that the electronic seal image of the electronic file is compliant when the encrypted electronic seal image contained in the electronic file is the same as the saved encrypted electronic seal image with the added file identifier information, and so that the auditor device determines that the electronic seal image of the electronic file is not compliant when the encrypted electronic seal image contained in the electronic file is not the same as the saved encrypted electronic seal image with the added file identifier information.
19. The method of claim 15, wherein, Before the encoding of the original electronic seal image to be encrypted based on the obtained encoder to generate a first encoding vector, the method further comprises: extracting a sub-image of a region in the original electronic seal image where a seal is located, and inputting the extracted sub-image into the encoder.
20. The method according to any one of claims 15-19, characterized by, The obtained encoder is obtained from the auditor device.
21. An electronic seal encryption method characterized by, The method comprises: encoding an original electronic seal image to be encrypted based on an encoder in a self-encoder to generate a first encoding vector; decoding the first encoding vector based on a decoder in the self-encoder to generate an encrypted electronic seal image.
22. An electronic seal encryption device, characterized by The device is applied to an auditor device, and the device comprises: a receiving module configured to receive a first encoding vector sent by an applicant device, wherein the first encoding vector is generated by the applicant device based on an obtained encoder encoding an original electronic seal image to be encrypted, and the encoder is an encoder in a self-encoder; a sending module configured to send the first encoding vector to an auditor device; wherein the encoder is an encoder in a self-encoder; so that the auditor device decodes the first encoding vector based on a decoder saved in the self-encoder to generate an encrypted electronic seal image, and so that the auditor device sends the encrypted electronic seal image to the applicant device. The first decoding module is configured to decode the first encoding vector based on the saved decoder in the autoencoder, to generate an encrypted electronic seal image, and to send the encrypted electronic seal image to the applicant device.
23. The apparatus of claim 22, wherein, The apparatus further includes: The first encoding module is configured to encode an original electronic seal image corresponding to a seal identifier based on the saved encoder, to generate a second encoding vector. The first decoding module is further configured to compare the first encoding vector and the second encoding vector to determine whether they are the same, and if so, to perform a subsequent step of decoding the first encoding vector based on the saved decoder in the autoencoder.
24. The apparatus of claim 22, wherein, The first decoding module is further configured to: add file identifier information at a set position of the encrypted electronic seal image, and send the encrypted electronic seal image with the added file identifier information to the applicant device, wherein the file identifier information is file identifier information of an electronic file to be used with the encrypted electronic seal image obtained from the applicant device.
25. The apparatus of claim 24, wherein, The apparatus further includes: The adjudication module is configured to receive an electronic file containing the encrypted electronic seal image and file identifier information corresponding to the electronic file sent by the applicant device, to determine whether the encrypted electronic seal image contained in the electronic file is the same as the saved encrypted electronic seal image with the added file identifier information, and if so, to determine that the electronic seal image of the electronic file is compliant, and if not, to determine that the electronic seal image of the electronic file is non-compliant.
26. The apparatus of claim 22, wherein, The first decoding module is further configured to: determine whether the generated encrypted electronic seal image is garbled, and if not, to perform a subsequent step of sending the encrypted electronic seal image to the applicant device.
27. The apparatus of claim 22, wherein, The first decoding module is further configured to: perform image comparison between the encrypted electronic seal image and an original electronic seal image corresponding to a seal identifier, to determine whether they belong to the same seal subject, and if so, to perform a subsequent step of sending the encrypted electronic seal image to the applicant device, wherein the seal identifier is a seal identifier of the original electronic seal image obtained from the applicant device.
28. An electronic seal encryption device, characterized by The apparatus is applied to an applicant device, and the apparatus includes: The second encoding module is configured to encode an original electronic seal image to be encrypted based on the obtained encoder, to generate a first encoding vector. The sending module is configured to send the first encoding vector to an auditor device, wherein the encoder is an encoder in an autoencoder, so that the auditor device decodes the first encoding vector based on a saved decoder in the autoencoder to generate an encrypted electronic seal image, and so that the auditor device sends the encrypted electronic seal image to the applicant device.
29. The apparatus of claim 28, wherein, The sending module is specifically configured to: sending the first encoding vector and a seal identifier of the original electronic seal image to the auditing party device; causing the auditing party device to generate a second encoding vector based on the saved encoder corresponding to the seal identifier of the original electronic seal image, and causing the auditing party device to perform a subsequent step of decoding the first encoding vector based on a saved decoder in the autoencoder when the first encoding vector is the same as the second encoding vector.
30. The apparatus of claim 28, wherein, The sending module is specifically configured to: sending the first encoding vector and file identifier information of an electronic file to be used with the encrypted electronic seal image to the auditing party device; causing the auditing party device to add the file identifier information at a set position of the encrypted electronic seal image, and causing the auditing party device to send the encrypted electronic seal image with the added file identifier information to the applicant device.
31. The apparatus of claim 30, wherein, The sending module is further configured to: sending an electronic file containing the encrypted electronic seal image and file identifier information corresponding to the electronic file to the auditing party device; causing the auditing party device to determine that the electronic seal image of the electronic file is compliant when the encrypted electronic seal image contained in the electronic file is the same as the saved encrypted electronic seal image with the added file identifier information, and causing the auditing party device to determine that the electronic seal image of the electronic file is not compliant when the encrypted electronic seal image contained in the electronic file is not the same as the saved encrypted electronic seal image with the added file identifier information.
32. The apparatus of claim 28, wherein, The second encoding module is further configured to: extracting a sub-image of a region where a seal is located in the original electronic seal image, and inputting the extracted sub-image into the encoder.
33. The device of any one of claims 28-32, wherein, The obtained encoder is obtained from the auditing party device.
34. An electronic seal encryption device, characterized by The apparatus comprises: a third encoding module configured to encode an original electronic seal image to be encrypted based on an encoder in an autoencoder to generate a first encoding vector; a second decoding module configured to decode the first encoding vector based on a decoder in the autoencoder to generate an encrypted electronic seal image.
35. An electronic device, comprising: comprise: a memory configured to store program instructions; a processor configured to invoke the program instructions stored in the memory and perform steps included in the method according to any one of claims 9-21 according to the obtained program instructions.
36. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program comprises program instructions, which, when executed by a computer, cause the computer to perform the method according to any one of claims 9-21.
37. A computer program product, characterised in that, The computer program product comprises computer program code, which, when executed on a computer, causes the computer to perform the method according to any one of claims 9-21. The computer program product comprises computer program code, which, when executed on a computer, causes the computer to perform the method according to any one of claims 9-21.
Citation Information
Patent Citations
Electronic contract processing method and device and electronic equipment
CN111859439A
Watermark adding method and device, watermark identification method and device, equipment and readable storage medium
CN117615075A