Electronic file processing method, device, system, equipment and medium
By generating and embedding unique encoding combinations in electronic files, the problem of insufficient anti-counterfeiting of traditional electronic files is solved, achieving higher anti-counterfeiting and traceability, and ensuring the integrity of the file content.
Patent Information
- Application Number
- CN202410509921.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-25
- Publication Date
- 2024-09-10
AI Technical Summary
The anti-counterfeiting properties of traditional electronic documents are insufficient, and single watermark information is easily leaked. As a result, the anti-counterfeiting properties of electronic documents need to be improved.
The first coding combination is generated by obtaining the seal number, production date number and owner number of the electronic seal, and is recombined with the unique coding combination of the electronic file to form the target coding combination as watermark information, which is embedded in the electronic seal image and combined with the coding database for matching and verification to ensure document integrity and traceability.
It improves the anti-counterfeiting and traceability of electronic files, confirms the integrity of file content through watermark information, and enhances file verification capabilities.
Smart Images

Figure CN118627033A
Abstract
Description
Technical Field
[0001] The present application relates to the field of information processing technology, and in particular to an electronic file processing method, device, system, equipment and medium. Background Art
[0002] With the development of random information technology, the current society uses electronic files more and more frequently, and the corresponding electronic file application scenarios are becoming more and more extensive. For example, electronic files include electronic contract documents, electronic reports, and electronic letters.
[0003] In the above-mentioned electronic documents, in order to prevent counterfeiting and tampering, an electronic seal with watermark information is usually stamped on the electronic document. However, in traditional solutions, it is generally based on the electronic seal of the electronic document directly embedded with conventional watermark information, but conventional watermark information is generally one-sided information and easy to leak, resulting in the anti-counterfeiting of electronic documents in this way needs to be improved. Summary of the invention
[0004] Based on this, it is necessary to provide an electronic document processing method, device, system, equipment and medium to address the above technical issues and solve the technical problem that the anti-counterfeiting of electronic documents needs to be improved.
[0005] In order to solve the above technical problems, the following technical solutions are provided:
[0006] In a first aspect, a method for processing an electronic file is provided, the method comprising:
[0007] Acquire seal identification information of the electronic seal image, and generate a first coding combination according to the seal identification information, wherein the seal identification information includes a seal number, a production date number, and an owner number of the electronic seal;
[0008] A second coding combination generated based on the electronic file and uniquely corresponding to the electronic file;
[0009] Based on a preset coding combination mode, the first coding combination and the second coding combination are recombined to generate a target coding combination as watermark information, and the target coding combination is embedded into the electronic seal image to obtain a target electronic seal image;
[0010] The target electronic seal image is added to the electronic file to generate a target electronic file.
[0011] Furthermore, after the first coding combination and the second coding combination are recombined based on a preset coding combination mode to generate a target coding combination as watermark information, the method further includes:
[0012] Combining the encoding mode information with the target encoding, and storing them in an encoding database in association;
[0013] The coding mode information represents the way in which the preset coding combination mode recombine and combines the first coding combination and the second coding combination.
[0014] Furthermore, after adding the target electronic seal image to the electronic file to generate the target electronic file, the method further includes:
[0015] Receive a verification query instruction sent by a user, wherein the verification query instruction includes a query code parsed by a code scanning terminal scanning a target electronic seal of the target electronic file;
[0016] Matching the query code with the codes in the code database;
[0017] When the target encoding mode information corresponding to the query code is matched, the query code is disassembled and reassembled according to the target encoding mode information to obtain a second encoding combination;
[0018] According to the second coding combination, the file element information of the target electronic file is queried.
[0019] Furthermore, embedding into the electronic seal image includes:
[0020] Splitting the electronic seal image into a plurality of non-overlapping image blocks;
[0021] Performing discrete cosine transform on a plurality of non-overlapping image blocks to obtain discrete frequency domain coefficients corresponding to the electronic seal image;
[0022] According to the embedding strength parameter, each code in the target code combination is embedded into a preset frequency domain position of the discrete frequency domain coefficient to obtain an embedded discrete frequency domain coefficient;
[0023] Performing inverse discrete cosine transform on the embedded discrete frequency domain coefficients to obtain a plurality of non-overlapping image blocks embedded with watermarks;
[0024] All the multiple non-overlapping image blocks embedded with watermarks are reassembled to obtain the target electronic seal image.
[0025] Furthermore, embedding into the electronic seal image includes:
[0026] Determine the pixel values of all pixels in the electronic seal image;
[0027] Determine a target pixel bit according to the pixel values of all the pixels, the number of the target pixel bits is the same as the number of codes in the target coding combination, and the target pixel bit represents the position corresponding to the lowest bit in the pixel values of all the pixels;
[0028] Each code in the target code combination is sequentially embedded into the target pixel position in the electronic seal image to obtain the target electronic seal image.
[0029] Furthermore, generating a first coding combination according to the seal identification information includes:
[0030] According to the watermark embedding requirement information, randomly extracting numbers with preset digits from all the numbers in the seal number, the production date number and the owner number of the electronic seal and combining them to obtain a first coding combination;
[0031] or;
[0032] The seal number, production date number and owner number of the electronic seal are arranged in sequence to obtain a first coding combination.
[0033] In a second aspect, an electronic document processing device is provided, the device comprising:
[0034] An acquisition module, used for acquiring seal identification information of the electronic seal image, and generating a first coding combination according to the seal identification information, wherein the seal identification information includes a seal number, a production date number and an owner number of the electronic seal;
[0035] A combination module, used for generating a second coding combination based on the electronic file and uniquely corresponding to the electronic file;
[0036] a recombining module, configured to recombine the first coding combination and the second coding combination based on a preset coding combination mode, so as to generate a target coding combination as watermark information;
[0037] An embedding module, used for embedding the target number combination into the electronic seal image to obtain a target electronic seal image;
[0038] The generating module is used to add the target electronic seal image to the electronic file to generate the target electronic file.
[0039] In a third aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the electronic file processing method as described in any one of the preceding items when executing the computer program.
[0040] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the electronic file processing method as described in any one of the above are implemented.
[0041] It can be seen that in one of the solutions provided by the present application, a first coding combination is obtained according to the seal number, production date number and owner number of the electronic seal; a second coding combination generated by the electronic file is obtained; based on a preset coding combination method, the first coding combination and the second coding combination are recombined to generate a target coding combination; the target number combination obtained based on the two codes is used as watermark information and embedded into the electronic seal image to obtain a target electronic seal image; based on the target electronic seal image and the electronic file, a target electronic file is generated. Since the watermark is generated and embedded using the unique correlation coding combination of the electronic seal and the unique correlation combination of the electronic file, the relevant information of the electronic file is implicitly embedded in the watermark, which improves the anti-counterfeiting property of the generated target electronic file. In addition, the integrity of the content of the electronic file can be confirmed through the watermark information to ensure the traceability of the file, that is, it acts as a normal watermark and can also ensure the verification of the file content. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0043] Figure 1 is a flow chart of an electronic document processing system in one embodiment of the present application;
[0044] Figure 2 is a flowchart of an electronic file processing method in one embodiment of the present application;
[0045] Figure 3 is a structural schematic diagram of an electronic document processing device in one embodiment of the present application;
[0046] Figure 4 It is a structural diagram of a computer device in one embodiment of the present application. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0048] The present application embodiment provides an electronic file processing method, which can be based on Figure 1 The electronic file processing system provided is implemented, and the electronic file processing system includes an electronic file uploading device and an electronic file processing device, and the electronic file processing device is used to implement the steps of the electronic file processing method provided in the embodiment of the present application based on the electronic file uploaded by the electronic file uploading device. Among them, the user can upload the original electronic file to the electronic file processing device through the electronic file uploading device, and the electronic file uploading device can include but is not limited to mobile phones, tablets, computers and other devices; the electronic file processing device can be implemented by a server, and the electronic file processing device can be a server or a cluster of multiple servers, which is not specifically limited.
[0049] It should be noted that the electronic file processing method provided in the embodiment of the present application can be applied to a variety of application scenarios, without specific limitation. For example, by way of example, the electronic file may include but is not limited to electronic contract files, electronic bill files (which may be in form of tables or text, etc.), and other electronic files with anti-counterfeiting and file integrity requirements. For ease of explanation, the description of the subsequent embodiments will be explained using contract files as an example. Below, each embodiment provided in the embodiment of the present application is described in detail.
[0050] like Figure 2 As shown, in one embodiment, a method for processing an electronic file is provided, the method comprising:
[0051] S10: Acquire an electronic seal image, and generate a first coding combination according to the seal identification information, wherein the seal identification information includes a seal number, a production date number, and an owner number of the electronic seal.
[0052] S20: generating a second coding combination based on the electronic file and uniquely corresponding to the electronic file,
[0053] The process of steps S10 to S20 mainly includes the process of obtaining the electronic seal image and seal identification information, obtaining the electronic file, and obtaining the two code combinations.
[0054] In the acquisition of the first coding combination, the electronic seal image refers to the seal image required for the electronic file. For example, in an electronic contract document, a seal is required, usually the company seal of the contract signing entity. In addition, it is necessary to obtain the seal identification information that uniquely corresponds to the electronic seal, wherein the seal identification information includes the seal number, production date number and owner number of the electronic seal. The seal number represents the attribute number of the seal, such as the tax registration number included in the general company seal; the production date number represents the production date of the electronic seal, for example, 20240321, indicating that it is March 21, 2024, and so on. The owner number represents the entity that provides the electronic seal, for example, in the signed contract document, the number corresponding to the signing entity. It can be seen that the obtained seal identification information is uniquely corresponding to and associated with the electronic seal.
[0055] Then, according to the seal number, production date number and owner number of the electronic seal, a first coding combination is obtained. That is to say, the first coding combination in the embodiment of the present application is generated based on the seal number, production date number and owner number that are uniquely corresponding to the electronic seal. This ensures the uniqueness of the first coding combination and its relevance to the electronic seal. In this process, the embodiment of the present application provides a specific combination method and characteristics, which will be described in subsequent embodiments.
[0056] During the process of obtaining the second coding combination, the user can generate the required electronic file by scanning or electronic editing, and then upload it to the electronic file processing device through the electronic file uploading device to obtain the electronic file. For example, in an application example scenario, the electronic file may refer to an electronic contract document. When a contract document needs to be signed, the required electronic contract document can be generated based on the electronic contract document template, without specific limitation. In addition, the embodiment of the present application will also obtain a second coding combination generated based on the electronic file, wherein the second coding combination is generated based on the electronic file and uniquely corresponds to the electronic file.
[0057] It should be noted that the second coding combination can be obtained based on a variety of methods, as long as a number uniquely corresponding to the electronic file can be obtained, and there is no specific limitation. For example, the electronic file can be hashed according to a preset hash algorithm to obtain a hash value uniquely corresponding to the electronic file, and the hash value is used as the second coding combination. The preset hash algorithm includes but is not limited to the MD5 hash algorithm, or other unique codes that represent the electronic file.
[0058] Furthermore, each code in the first coding combination and / or the second coding combination may be a digital code or a symbolic code, which is not specifically limited.
[0059] S30: Based on a preset coding combination mode, the first coding combination and the second coding combination are recombined to generate a target coding combination as watermark information, and the target coding combination is embedded into the electronic seal image to obtain a target electronic seal image.
[0060] It can be seen that the preset coding combination method is not determined in the embodiment of the present application. There can be many ways. Assuming that the first coding combination is recorded as "A" and the second coding combination is recorded as "B", the first coding combination A and the second coding combination B can be arranged in sequence, and the target coding combination can be expressed as "AB"; or the second coding combination B and the first coding combination A can be arranged in sequence, and the target coding combination can be expressed as "BA"; or the codes of the second coding combination A and the first coding combination B can be shuffled and reorganized, and there is no specific limitation.
[0061] S40: Adding the target electronic seal image to the electronic file to generate a target electronic file.
[0062] Steps S30-S40 include the process of embedding the watermark and generating the target electronic file that ultimately carries the watermark information. After obtaining the first coding combination associated with the electronic seal and the second coding combination associated with the electronic file, the two can be recombined. Based on a preset coding combination method, the first coding combination and the second coding combination are recombined to generate a target coding combination.
[0063] After obtaining the target code combination, the target number combination can be used as watermark information and embedded into the electronic seal image in a watermark embedding manner to obtain the target electronic seal image, and finally the target electronic file is generated based on the target electronic seal image and the electronic file. For example, the target electronic contract file is generated based on the electronic contract file and the target code combination corresponding to the electronic contract file.
[0064] In the process of generating the target electronic file based on the target electronic seal image and the electronic file, there are multiple ways to complete the import of the target electronic seal image, which can be achieved with the help of existing tools. For example, the process may include the following processing:
[0065] Select the target electronic seal image: the anti-counterfeiting electronic seal image can be embedded, that is, the target electronic seal image: select a target electronic seal image with anti-counterfeiting features. For example, ensure that the target electronic seal image size is 512*512, the resolution is 300dpi*300dpi, has high quality, clear and visible features, and meets the format requirements of the required electronic file.
[0066] Open PDF Editor: Use existing professional PDF editor software to open the contract PDF file to be edited.
[0067] Import the target electronic seal image: In the PDF editor, select the option to insert a picture or embed an object, and then select the anti-counterfeiting electronic seal image to import. This can usually be done by dragging and dropping the image into the PDF file or using the menu options.
[0068] Adjust the image position and size: Select the target electronic seal image to be embedded and select a suitable position in the PDF file. Adjust the size and scaling of the target electronic seal image to ensure that it fits the electronic file and does not cover important content in the electronic file.
[0069] Set transparency: As needed, adjust the transparency of the target electronic seal image to 0.7 to make it blend better with the electronic file. The transparency setting can make the target electronic seal image more realistic and match the background.
[0070] Lock image position: After completing the adjustment, lock the position of the target electronic seal image to prevent accidental movement or adjustment. This can be achieved through the lock or fix option of the PDF editor.
[0071] Save electronic PDF files: Save the edited electronic PDF files and ensure that the saved files remain editable. In this way, you can still process them further if modifications or verifications are required.
[0072] It can be seen that in this embodiment, since the watermark is generated and embedded using the unique association code combination of the electronic seal and the unique association combination of the electronic file, the relevant information of the electronic file is implicitly embedded in the watermark, which improves the anti-counterfeiting property of the generated target electronic file. In addition, the integrity of the content of the electronic file can also be confirmed through the watermark information to ensure the traceability of the file, that is, it acts as a normal watermark and can also ensure the verification of the file content.
[0073] It should be noted that in step S10, that is, in the process of generating the first coding combination according to the seal identification information, there may be multiple implementation methods, which are not specifically limited.
[0074] In one embodiment, generating a first coding combination according to the seal identification information includes:
[0075] S10A: According to the watermark embedding requirement information, randomly extracting numbers with a preset number of digits from all the numbers including the seal number, the production date number and the owner number of the electronic seal, and combining them to obtain a first coding combination;
[0076] or;
[0077] S10B: Arrange the seal number, production date number and owner number of the electronic seal in sequence to obtain a first coding combination.
[0078] In this embodiment, two methods of obtaining the first coding combination are mainly provided. It is assumed that the seal number of the electronic seal is recorded as "a1", the production date number is recorded as "a2", and the owner number is "a3". The seal number a1, the production date number a2 and the owner number a3 of the electronic seal can include one or more digit numbers. For example, the seal number a1 of the electronic seal can include one or more digit numbers.
[0079] In the scheme indicated by S10A, it is necessary to randomly extract numbers with preset digits (such as 5 or 6 digits, etc.) from all the numbers in the seal number a1, the production date number a2 and the owner number a3 according to the watermark embedding requirement information to combine them and obtain the first coding combination, that is, randomly extract codes with preset digits from all the codes in the seal number a1, the production date number a2 and the owner number a3 to combine them. Among them, the watermark embedding requirement information can refer to the indication of the number of embedded digits, or indicate whether the amount of embedded data is large or small, the smaller the number of embedded digits, and the larger the number of embedded digits. It should be noted that due to the different contents of electronic files and the various situations of electronic seals. In order to make the final first coding combination meet the subsequent watermark generation, the first coding combination is generated here by the watermark embedding requirement information, which can effectively ensure the adaptability of subsequent watermark information. In addition, due to the random scattering process, security can be further improved.
[0080] In the method indicated by S10B, the seal number a1, the production date number a2 and the owner number a3 of the electronic seal are arranged in sequence to obtain the first coding combination. For example, the seal number a1, the production date number a2 and the owner number a3 of the electronic seal are arranged in sequence, and the target coding combination can be expressed as "a1a2a3"; or the production date number a2, the seal number a1 of the electronic seal and the owner number a3 are arranged in sequence, and the target coding combination can be expressed as "a2a1a3"; or, the owner number a3, the production date number a2 and the seal number a1 of the electronic seal are arranged in sequence, and the target coding combination can be expressed as "a3a2a1", and there is no specific limitation. In this way, this can maximize the integrity of the original code, which is more conducive to subsequent file tracing and numbering management.
[0081] It should be noted that there may be multiple implementation methods for embedding watermark information based on the target number combination, depending on the needs. In the embodiment of the present application, two embedding methods are provided, which are described below respectively.
[0082] In one embodiment, step S30, that is, embedding into the electronic seal image, includes the following steps:
[0083] S31A: splitting the electronic seal image into a plurality of non-overlapping image blocks;
[0084] S32A: performing discrete cosine transform on a plurality of non-overlapping image blocks to obtain discrete frequency domain coefficients corresponding to the electronic seal image;
[0085] S33A: embedding each code in the target code combination into a preset frequency domain position of the discrete frequency domain coefficient according to the embedding strength parameter to obtain the embedded discrete frequency domain coefficient;
[0086] S34A: performing inverse discrete cosine transform on the embedded discrete frequency domain coefficients to obtain a plurality of non-overlapping image blocks embedded with watermarks;
[0087] S35A: Recombining all the multiple non-overlapping image blocks embedded with watermarks to obtain the target electronic seal image.
[0088] In step S31A to step S35A, a method of embedding the target code combination as watermark information into the electronic seal image by using frequency domain embedding is provided. First, the electronic seal image is split into a plurality of non-overlapping image blocks, for example, divided into 8x8 pixel image blocks, wherein the non-overlapping is for the convenience of subsequent restoration to the image format and image integrity; then, a discrete cosine transform is applied to each of the divided image blocks, thereby converting the electronic seal image into a frequency domain expression, and the frequency domain expression can be shown in the following formula 1, that is:
[0089] Formula 1: F(u,v)=α(u)α(v)∑[x=0to 7]∑[y=0to 7]f(x,y)cos((2x+1)uπ / 16)cos((2y+1)vπ / 16)
[0090] Among them, F(u,v) is the discrete frequency domain coefficient after discrete cosine transform, f(x,y) is the pixel value of the divided pixel image block, α(u) and α(v) are normalization coefficients, x and y represent the xy position of the pixel point in the 8x8 pixel image block, x=0 to 7, y=0 to 7, a total of 64 pixels.
[0091] Then, according to the embedding strength parameter, each code in the target code combination is embedded into the preset frequency domain position of the discrete frequency domain coefficient to obtain the embedded discrete frequency domain coefficient. This process can be expressed as shown in the following formula 2:
[0092] Formula 2: F'(u,v)=F(u,v)+α(u)α(v)W(u,v)*λ
[0093] Among them, F'(u,v) is the discrete frequency domain coefficient after embedding the watermark, W(u,v) is the discrete frequency domain coefficient of the watermark information, and λ is the embedding strength parameter, which is an empirical value or can be set.
[0094] After embedding, it needs to be converted into the spatial domain and restored to the image format to get the target electronic seal image with embedded watermark information. The process can be expressed as shown in the following formula 3, that is:
[0095] Formula 3: f'(x,y)=∑[u=0to 7]∑[v=0to 7]α(u)α(v)F'(u,v)cos((2x+1)uπ / 16)cos((2y+1)vπ / 16)
[0096] Among them, f'(x,y) is the pixel value of the pixel image block after embedding the watermark,
[0097] Finally, all pixel image blocks embedded with watermarks are reassembled into the final watermarked image, that is, the target electronic seal image, according to the original division method.
[0098] In this embodiment, a specific implementation method of embedding a target code combination as a watermark into an electronic seal image is provided. The original electronic seal image is converted into a frequency domain discrete cosine transform for processing, and the values of the discrete frequency domain coefficients corresponding to the electronic seal image are adjusted to embed the watermark information of the target code combination into the electronic seal image. During embedding, the embedding strength is controlled according to the embedding strength requirement, so that the watermark information is imperceptible to the human eye, which greatly improves the imperceptibility of the watermark embedded information, and can minimize the changes to the original electronic seal image, thereby ensuring the graphic fidelity of the generated electronic seal image and having strong image stability.
[0099] It is worth noting that if this method is used to embed watermarks, when the watermark information is parsed out from the target electronic seal image embedded with the watermark information, the corresponding parsing process can be implemented according to the embedding method. For example, taking the above-listed examples as an example, the corresponding watermark detection specifically includes: Image segmentation: Divide the target electronic seal image with watermark to be detected into non-overlapping image blocks of the same size as the image blocks used during embedding. Discrete cosine transform: Apply discrete cosine transform to each image block and convert it to the frequency domain. Extract watermark: Extract watermark information from the frequency domain coefficients. Formula 4: W(u,v)=(F'(u,v)-F(u,v)) / (α(u)α(v)*λ). Among them, W(u,v) is the discrete frequency domain coefficient of the extracted watermark information, F'(u,v) is the discrete frequency domain coefficient of the target electronic seal image with watermark, F(u,v) is the discrete frequency domain coefficient of the original electronic seal image block, and λ is the embedding strength parameter.
[0100] In addition to the above watermark embedding method, the embodiment of the present application also provides another solution for embedding watermark information. In another embodiment, step S30, that is, embedding into the electronic seal image, includes the following steps:
[0101] S31B: Determine the pixel values of all pixels in the electronic seal image;
[0102] S32B: Determine a target pixel bit according to the pixel values of all the pixels, the number of the target pixel bits is the same as the number of codes in the target coding combination, and the target pixel bit represents the position corresponding to the lowest bit in the pixel values of all the pixels;
[0103] S34B: embedding each code in the target code combination into the target pixel position in the electronic seal image in sequence to obtain the target electronic seal image.
[0104] In this embodiment, the pixel values of all pixels in the electronic seal image are first determined; then, according to the pixel values of all pixels, the target pixel bits are determined, the number of the target pixel bits is the same as the number of codes in the target coding combination, and the target pixel bits represent the position corresponding to the lowest bit in the pixel values of all pixels, and finally, each code in the target coding combination is sequentially embedded into the target pixel bits in the electronic seal image, so that the target electronic seal image is equivalent to embedding the target code into the least significant bit of the pixel in the original electronic seal image. Since the change of the least significant bit in the electronic seal image is imperceptible to the human eye, the watermark information is not easy to be discovered.
[0105] It should be noted that in the process of embedding into the target pixel position, embedding parameters such as embedding strength, embedding position and size of watermark information can be adjusted according to specific needs and security requirements to ensure that the watermark information can be accurately embedded and maintain reliability during the extraction process.
[0106] In this embodiment, another specific implementation method of embedding the target code combination as a watermark into the electronic seal image is provided to ensure the feasibility of the solution. Since the processing process is simple and the processing efficiency is relatively high, the watermark can be embedded quickly.
[0107] It should be noted that, in the embodiment of the present application, the target number combination is used as watermark information and embedded into the electronic seal image to obtain the target electronic seal image. In order to further improve the watermark embedding quality, before embedding, the electronic seal image can be further converted into a picture format suitable for watermark embedding. For example, common formats include JPEG, PNG, etc., and it is ensured that the conversion process does not reduce the image quality. In addition, in the watermark embedding process, the embedding position can also be selected, for example, a suitable position is selected in the picture to embed the digital watermark information. Usually, the five-pointed star area of the electronic seal image is selected for embedding, so that the watermark information can be guaranteed to be relatively stable and not easily affected by image modification.
[0108] It should be noted that the above two main combinations can be selected according to needs to adapt to the best usage scenario and purpose.
[0109] In one embodiment, after step S30, that is, after the first coding combination and the second coding combination are recombined based on the preset coding combination mode to generate a target coding combination as watermark information, the method further includes:
[0110] S50: combining the encoding mode information with the target encoding, and storing them in an encoding database in association;
[0111] The coding mode information represents the way in which the preset coding combination mode recombine and combines the first coding combination and the second coding combination.
[0112] In this embodiment, after the first coding combination and the second coding combination are reorganized based on a preset coding combination method to generate a target coding combination, the coding method information corresponding to the preset coding combination method, the coding method information and the target coding combination are stored in a coding database in association with each other for the convenience of subsequent query and management. For example, after obtaining the target coding combination by using the two coding combination methods mentioned in the aforementioned embodiment, the coding method information and the target coding combination are stored in a coding database in association with each other. Taking the first coding combination A and the second coding combination B mentioned in the aforementioned embodiment as an example, the target coding combination can be represented as "AB". In this embodiment of the present application, the "AB" combination method representing the first coding combination A and the second coding combination B can be associated with the target coding combination "AB" and stored and sent to the coding database.
[0113] In this way, since the "AB" combination representing the first coding combination A and the second coding combination B is associated with the target coding combination "AB", stored and sent to the coding database, an effective verification method can be provided in the electronic file verification process based on the above-mentioned associated information, thereby verifying the authenticity of the electronic file or whether it has been tampered with, thereby facilitating the verification of the traceability of the electronic file.
[0114] As explained above, after the encoding method information is combined with the target encoding and stored in the encoding database, effective electronic verification and information query applications can be realized based on this. In one embodiment, after adding the target electronic seal image to the electronic file to generate the target electronic file, the method further includes the following steps:
[0115] S60: receiving a verification query instruction sent by a user, wherein the verification query instruction includes a query code parsed by a code scanning terminal when scanning a target electronic seal of the target electronic file;
[0116] S70: Matching the query code with the codes in the code database;
[0117] S80: When the target encoding mode information corresponding to the query code is matched, the query code is disassembled and reassembled according to the target encoding mode information to obtain a second encoding combination;
[0118] S90: Query the file element information of the target electronic file according to the second coding combination.
[0119] In this embodiment, based on the above-mentioned associated storage setting, electronic and effective file element query can be realized. Specifically, for the user who receives the target electronic file, he can use a scanning terminal device with a scanning function such as a mobile phone to scan the target electronic seal in the target electronic file to obtain the code carried in the target electronic seal, thereby obtaining the query code. For example, the electronic seal in the target electronic contract file is scanned to obtain the query code carried in the electronic seal.
[0120] It should be noted that in this process, if the target electronic file has been forged or tampered with, then the correct query code cannot be successfully scanned and parsed, or the parsed query code is wrong, which means that the electronic file at this time may have been forged or tampered with, and the integrity and authenticity of the content of the electronic file is also questionable. In addition, in the process of parsing the query code obtained by scanning the target electronic seal of the target electronic file at the scanning end, the embedding process of the target code combined with the target code as the watermark information is the opposite process, that is, it depends on the specific watermark information embedding method in step S30, which can be referred to the corresponding description of the above embodiment, and will not be repeated here.
[0121] The electronic processing device can receive the verification query instruction including the parsed query code sent by the query receiving end, and respond to the verification query instruction by matching the query code in the instruction with the code in the code database. When the target encoding method information corresponding to the query code is matched, the query code is disassembled and reassembled according to the target encoding method information to obtain a second code combination; since the second code combination is generated based on the original electronic file, the file element information of the target electronic file can be queried according to the second code combination, including file element information such as name, seal name, and even signature information.
[0122] In addition, after the target electronic file is generated, a pseudo-printing prevention process may be further implemented based on the target electronic file, including the following process flow:
[0123] Choose Ricoh printing devices with higher security, such as special anti-counterfeiting printers with anti-counterfeiting ink cartridges, infrared detection, etc. These devices have special printer chips and security measures to increase the anti-counterfeiting of printing.
[0124] Choose specially designed security printing media, such as security paper, special textured paper, fluorescent paper, etc. These media usually have special textures, anti-counterfeiting marks or fluorescent properties to provide additional anti-counterfeiting protection.
[0125] Ensure that only authorized personnel can access and operate printing devices. Implement access control measures to limit physical and network access to printing devices.
[0126] Establish a printing monitoring system to record detailed information of each printing, including printing time, printing personnel, printing equipment information, etc. This allows the printing operation to be traced and audited.
[0127] To obtain the original printed document, the applicant needs to log in to the Ruiyin system, query the printing tasks for the current period and complete the printing operation, which ensures the high credibility of the document and avoids any confusion in the printing process.
[0128] Ensure safekeeping and secure delivery of contract documents once printed. Take appropriate physical and electronic measures to prevent unauthorized access and tampering.
[0129] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0130] In one embodiment, an electronic document processing device is provided, the electronic document processing device comprising an acquisition module 101, a combination module 102, a reorganization module 103, an embedding module 104 and a generation module 105. Figure 3 As shown, the electronic document processing device includes:
[0131] The acquisition module 101 is used to acquire seal identification information of the electronic seal image and generate a first coding combination according to the seal identification information, wherein the seal identification information includes a seal number, a production date number and an owner number of the electronic seal;
[0132] A combination module 102, configured to generate a second coding combination based on the electronic file and uniquely corresponding to the electronic file;
[0133] A recombining module 103, configured to recombine the first coding combination and the second coding combination based on a preset coding combination mode to generate a target coding combination as watermark information;
[0134] An embedding module 104, used for embedding the target serial number combination into the electronic seal image to obtain a target electronic seal image;
[0135] The generating module 105 is used to add the target electronic seal image to the electronic file to generate the target electronic file.
[0136] Furthermore, the electronic document processing device also includes a storage module;
[0137] The storage module is used to associate the encoding method information with the target encoding combination and store them in the encoding database; wherein the encoding method information represents the way in which the preset encoding combination method recombines and combines the first encoding combination and the second encoding combination.
[0138] Furthermore, the electronic document processing device further includes a receiving module, a first query module, a disassembly module and a second query module;
[0139] A receiving module, used for receiving a verification query instruction sent by a user, wherein the verification query instruction includes a query code parsed by a code scanning terminal scanning a target electronic seal of the target electronic file;
[0140] A first query module, used for matching the query code with the codes in the code database;
[0141] a disassembly module, configured to, when the target encoding mode information corresponding to the query code is matched, disassemble and reassemble the query code according to the target encoding mode information to obtain a second encoding combination;
[0142] The second query module is used to query the file element information of the target electronic file according to the second coding combination.
[0143] Furthermore, the embedded module is used for:
[0144] Splitting the electronic seal image into a plurality of non-overlapping image blocks;
[0145] Performing discrete cosine transform on a plurality of non-overlapping image blocks to obtain discrete frequency domain coefficients corresponding to the electronic seal image;
[0146] According to the embedding strength parameter, each code in the target code combination is embedded into a preset frequency domain position of the discrete frequency domain coefficient to obtain an embedded discrete frequency domain coefficient;
[0147] Performing inverse discrete cosine transform on the embedded discrete frequency domain coefficients to obtain a plurality of non-overlapping image blocks embedded with watermarks;
[0148] All the multiple non-overlapping image blocks embedded with watermarks are reassembled to obtain the target electronic seal image.
[0149] Furthermore, the embedded module is used for:
[0150] Determine the pixel values of all pixels in the electronic seal image;
[0151] Determine a target pixel bit according to the pixel values of all the pixels, the number of the target pixel bits is the same as the number of codes in the target coding combination, and the target pixel bit represents the position corresponding to the lowest bit in the pixel values of all the pixels;
[0152] Each code in the target code combination is sequentially embedded into the target pixel position in the electronic seal image to obtain the target electronic seal image.
[0153] Furthermore, the recombinant module 103 is specifically used for:
[0154] According to the watermark embedding requirement information, randomly extracting numbers with preset digits from all the numbers in the seal number, the production date number and the owner number of the electronic seal and combining them to obtain a first coding combination;
[0155] or;
[0156] The seal number, production date number and owner number of the electronic seal are arranged in sequence to obtain a first coding combination.
[0157] It can be seen that in the electronic document processing device provided by the present application, since the watermark is generated and embedded using the unique association code combination of the electronic seal and the unique association combination of the electronic file, the relevant information of the electronic file is implicitly embedded in the watermark, thereby improving the anti-counterfeiting property of the generated target electronic file. In addition, the integrity of the content of the electronic file can also be confirmed through the watermark information to ensure the traceability of the file, that is, it acts as a normal watermark and can also ensure the verification of the file content.
[0158] Among them, for the specific implementation details or steps of each module in the electronic document processing device, please refer to the corresponding descriptions in the aforementioned electronic document processing device embodiment, and the technical effects of the corresponding improved scheme can also refer to the description of the aforementioned method embodiment. In order to avoid redundant description, the description will not be repeated here.
[0159] In one embodiment, a computer device is provided, which is used in the steps of an electronic file processing method, and its internal structure diagram can be as follows: Figure 4 As shown. The computer device includes a processor and a memory connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The computer device also includes a computer-readable storage medium and a memory. When the computer-readable instructions are executed by the processor, the functions or steps of an electronic file processing method are implemented. The computer-readable storage medium provided in this embodiment includes a non-volatile readable storage medium and a volatile readable storage medium.
[0160] In one embodiment, a computer device is provided, including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, wherein the processor implements the steps or functions of the aforementioned electronic document processing method when executing the computer-readable instructions.
[0161] In one embodiment, a computer device is provided, including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer-readable instructions:
[0162] Acquire seal identification information of the electronic seal image, and generate a first coding combination according to the seal identification information, wherein the seal identification information includes a seal number, a production date number, and an owner number of the electronic seal;
[0163] A second coding combination generated based on the electronic file and uniquely corresponding to the electronic file;
[0164] Based on a preset coding combination mode, the first coding combination and the second coding combination are recombined to generate a target coding combination as watermark information, and the target coding combination is embedded into the electronic seal image to obtain a target electronic seal image;
[0165] The target electronic seal image is added to the electronic file to generate a target electronic file.
[0166] In one embodiment, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps or functions in the aforementioned electronic file processing method are implemented.
[0167] In one embodiment, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0168] Acquire seal identification information of the electronic seal image, and generate a first coding combination according to the seal identification information, wherein the seal identification information includes a seal number, a production date number, and an owner number of the electronic seal;
[0169] A second coding combination generated based on the electronic file and uniquely corresponding to the electronic file;
[0170] Based on a preset coding combination mode, the first coding combination and the second coding combination are recombined to generate a target coding combination as watermark information, and the target coding combination is embedded into the electronic seal image to obtain a target electronic seal image;
[0171] The target electronic seal image is added to the electronic file to generate a target electronic file.
[0172] A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the steps or functions in the aforementioned method for processing electronic documents.
[0173] It can be seen that in the device, medium or product provided by the above embodiment, the target number combination obtained based on the two codes is used as watermark information and embedded into the electronic seal image to obtain the target electronic seal image; based on the target electronic seal image and the electronic file, the target electronic file is generated. Since the watermark is generated and embedded using the unique association code combination of the electronic seal and the unique association combination of the electronic file, the relevant information of the electronic file is implicitly embedded in the watermark, which improves the anti-counterfeiting property of the generated target electronic file. In addition, the integrity of the content of the electronic file can also be confirmed through the watermark information to ensure the traceability of the file, that is, it acts as a normal watermark and can also ensure the verification of the file content.
[0174] It should be noted that for more details and technical effects achieved by the computer device or computer-readable storage medium, please refer to the records of the aforementioned method embodiments, and the specific description will not be repeated here.
[0175] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through computer-readable instructions, and the computer-readable instructions can be stored in a non-volatile readable storage medium or a volatile readable storage medium. When the computer-readable instructions are executed, they may include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0176] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0177] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. An electronic file processing method, used for processing electronic files, characterized in that: The method comprises: Acquire seal identification information of the electronic seal image, and generate a first coding combination according to the seal identification information, wherein the seal identification information includes a seal number, a production date number, and an owner number of the electronic seal; A second coding combination generated based on the electronic file and uniquely corresponding to the electronic file; Based on a preset coding combination mode, the first coding combination and the second coding combination are recombined to generate a target coding combination as watermark information, and the target coding combination is embedded into the electronic seal image to obtain a target electronic seal image; The target electronic seal image is added to the electronic file to generate a target electronic file.
2. The electronic file processing method according to claim 1, characterized in that: After the first coding combination and the second coding combination are recombined based on the preset coding combination mode to generate a target coding combination as watermark information, the method further includes: Combining the encoding mode information with the target encoding, and storing them in an encoding database in association; The coding mode information represents the way in which the preset coding combination mode recombine and combines the first coding combination and the second coding combination.
3. The electronic file processing method according to claim 2, characterized in that: After adding the target electronic seal image to the electronic file to generate the target electronic file, the method further includes: Receive a verification query instruction sent by a user, wherein the verification query instruction includes a query code parsed by a code scanning terminal scanning a target electronic seal of the target electronic file; Matching the query code with the codes in the code database; When the target encoding mode information corresponding to the query code is matched, the query code is disassembled and reassembled according to the target encoding mode information to obtain a second encoding combination; According to the second coding combination, the file element information of the target electronic file is queried.
4. The electronic file processing method according to claim 1, characterized in that: The embedding into the electronic seal image comprises: Splitting the electronic seal image into a plurality of non-overlapping image blocks; Performing discrete cosine transform on a plurality of non-overlapping image blocks to obtain discrete frequency domain coefficients corresponding to the electronic seal image; According to the embedding strength parameter, each code in the target code combination is embedded into a preset frequency domain position of the discrete frequency domain coefficient to obtain an embedded discrete frequency domain coefficient; Performing inverse discrete cosine transform on the embedded discrete frequency domain coefficients to obtain a plurality of non-overlapping image blocks embedded with watermarks; All the multiple non-overlapping image blocks embedded with watermarks are reassembled to obtain the target electronic seal image.
5. The electronic file processing method according to claim 1, characterized in that: The embedding into the electronic seal image comprises: Determine the pixel values of all pixels in the electronic seal image; Determine a target pixel bit according to the pixel values of all the pixels, the number of the target pixel bits is the same as the number of codes in the target coding combination, and the target pixel bit represents the position corresponding to the lowest bit in the pixel values of all the pixels; Each code in the target code combination is sequentially embedded into the target pixel position in the electronic seal image to obtain the target electronic seal image.
6. The electronic file processing method according to any one of claims 1 to 5, characterized in that: The step of generating a first coding combination according to the seal identification information includes: According to the watermark embedding requirement information, randomly extracting numbers with a preset number of digits from all the numbers in the seal number, the production date number and the owner number, and combining them to obtain a first coding combination; or; The seal number, production date number and owner number are arranged in sequence to obtain a first coding combination.
7. An electronic document processing device, characterized in that: The device comprises: An acquisition module, used for acquiring seal identification information of the electronic seal image, and generating a first coding combination according to the seal identification information, wherein the seal identification information includes a seal number, a production date number and an owner number of the electronic seal; A combination module, used for generating a second coding combination based on the electronic file and uniquely corresponding to the electronic file; a recombining module, configured to recombine the first coding combination and the second coding combination based on a preset coding combination mode, so as to generate a target coding combination as watermark information; An embedding module, used for embedding the target number combination into the electronic seal image to obtain a target electronic seal image; The generating module is used to add the target electronic seal image to the electronic file to generate the target electronic file.
8. An electronic file processing system, comprising an electronic file uploading device and an electronic file processing device, wherein the electronic file processing device is used to implement the steps of the electronic file processing method according to any one of claims 1 to 6 based on the electronic file uploaded by the electronic file uploading device.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the electronic document processing method according to any one of claims 1 to 6 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the electronic document processing method according to any one of claims 1 to 6 are implemented.
