Electronic seal dynamic secret key intelligent storage method and system
By converting electronic documents into binary documents, constructing virtual binary images and performing sampling and filling to generate electronic seals, the problems of complex and inefficient electronic seal generation process are solved, and efficient electronic seal generation and document security verification are achieved.
Patent Information
- Application Number
- CN202510721421.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-09-23
AI Technical Summary
The existing electronic seal generation process algorithm is complex, requires a lot of computing power, and is inefficient.
The electronic document is converted into a binary document, the number of data sampling times is determined by counting the number of characters, a virtual binary image is constructed, independent sampling areas are divided, and multiple sampling and filling are performed to generate electronic seal and verification function data.
It simplifies the electronic seal generation process, improves efficiency, and ensures the security and integrity of electronic documents through verification functions.
Smart Images

Figure CN120689189A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of electronic digital data processing, and in particular relates to an intelligent storage method and system for dynamic keys of electronic seals. Background Art
[0002] An electronic seal is a legally recognized digital form that simulates the functions of a traditional physical seal, based on digital technology. It is primarily used to affix electronic documents to a document, similar to a stamp on a paper document, ensuring the integrity and non-repudiation of electronic documents and endowing them with the same legal force as a physical seal.
[0003] Existing electronic seals generate data summaries based on document content, and the two are not mutually inferable. Therefore, during the generation process of existing electronic seals, the algorithm is relatively complex, requires large computing power, and has relatively low efficiency. Summary of the Invention
[0004] The purpose of the present invention is to provide an intelligent storage method for dynamic keys of electronic seals, aiming to solve the problems that in the process of generating existing electronic seals, the algorithm is relatively complex, the computing power required is large, and the efficiency is relatively low.
[0005] The present invention is achieved by providing a method for intelligently storing a dynamic key for an electronic seal, the method comprising:
[0006] Obtaining the electronic document to be processed, and converting the electronic document to be processed into a binary electronic document;
[0007] Counting the number of binary characters in the binary electronic document, determining a data sampling number based on the data size of the electronic document to be processed, and constructing a blank virtual binary image, wherein a side length parameter of the virtual binary image is determined according to the data sampling number;
[0008] Based on the binary electronic document, the binary electronic document is mapped into a virtual binary image according to a preset order, and independent sampling areas are divided;
[0009] The independent sampling area is sampled multiple times according to the data sampling times, the idle area is filled during the sampling period, and an electronic seal and verification function data are generated based on the sampling results. The verification function data at least includes a verification function, data sampling times and fitting accuracy data.
[0010] Preferably, the step of counting the number of binary characters in the binary electronic document, determining the number of data sampling times based on the data size of the electronic document to be processed, and constructing a blank virtual binary image specifically includes:
[0011] Counting the number of binary characters in the binary electronic document to obtain preset electronic seal parameters, wherein the electronic seal parameters at least include memory usage;
[0012] Extract the data size of the electronic document to be processed and calculate the number of data sampling times based on the memory usage;
[0013] The size and number of independent sampling areas are determined based on the data sampling times, and a blank virtual binary image is generated.
[0014] Preferably, the step of mapping the binary electronic document into a virtual binary image according to a preset order based on the binary electronic document and dividing the independent sampling areas specifically includes:
[0015] Reading a binary electronic document, determining a mapping relationship between binary characters, and obtaining a mapping relationship table;
[0016] Mapping binary characters in a binary electronic document into a virtual binary image according to a preset sequence and a mapping relationship table;
[0017] According to the calculated size of the independent sampling area, the independent sampling area is divided according to a preset order to obtain a plurality of independent sampling areas.
[0018] Preferably, the steps of sampling the independent sampling area multiple times according to the number of data sampling times, filling the idle area during the sampling period, and generating the electronic seal and verification function data based on the sampling results specifically include:
[0019] Randomly fill the blank pixels in the independent sampling area, and the randomly filled data is the filling data;
[0020] Divide the independent sampling area into multiple sampling matrices, merge the elements in the sampling matrices to obtain the sampling results;
[0021] Repeatedly sample and fill pixels for specific base characters until the number of sampling times meets the conditions to generate electronic seal and verification function data.
[0022] Preferably, in the step of converting the elements in the sampling matrix into characters of a specific base, the conversion is performed according to a preset character conversion mapping table, and each character in the character conversion mapping table is provided with a corresponding binary character expression.
[0023] Another object of the present invention is to provide an electronic seal dynamic key intelligent storage system, the system comprising:
[0024] A document conversion module is used to obtain the electronic document to be processed and convert the electronic document to be processed into a binary electronic document;
[0025] An image generation module is configured to count the number of binary characters in a binary electronic document, determine a data sampling number based on the data size of the electronic document to be processed, and construct a blank virtual binary image, wherein a side length parameter of the virtual binary image is determined according to the data sampling number;
[0026] A sampling area division module is used to map the binary electronic document into a virtual binary image according to a preset order based on the binary electronic document, and divide the independent sampling areas;
[0027] The data sampling module is used to sample the independent sampling area multiple times according to the data sampling times, fill the idle area during the sampling period, and generate an electronic seal and verification function data based on the sampling results. The verification function data at least includes a verification function, the data sampling times and fitting accuracy data.
[0028] Preferably, the image generation module includes:
[0029] A parameter acquisition unit, configured to count the number of binary characters in the binary electronic document and acquire preset electronic seal parameters, wherein the electronic seal parameters at least include memory usage;
[0030] A sampling times calculation unit, used to extract the data size of the electronic document to be processed and calculate the data sampling times according to the memory usage;
[0031] The virtual image generating unit is used to determine the size and number of independent sampling areas based on the number of data sampling times, and generate a blank virtual binary image.
[0032] Preferably, the sampling area division module includes:
[0033] A document reading unit, configured to read a binary electronic document, determine a mapping relationship between binary characters, and obtain a mapping relationship table;
[0034] A character mapping unit, configured to map binary characters in a binary electronic document into a virtual binary image according to a preset sequence and a mapping relationship table;
[0035] The area division unit is used to divide the independent sampling area according to the calculated size of the independent sampling area in a preset order to obtain multiple independent sampling areas.
[0036] Preferably, the data sampling module includes:
[0037] The area filling unit is used to randomly fill the blank pixels in the independent sampling area, and the randomly filled data is the filling data;
[0038] A data conversion unit is used to divide the independent sampling area into multiple sampling matrices, merge the elements in the sampling matrices, and obtain sampling results;
[0039] The seal generation unit is used to repeatedly sample specific base characters and perform pixel filling until the sampling times meet the conditions to generate the electronic seal and verification function data.
[0040] Preferably, in the step of converting the elements in the sampling matrix into characters of a specific base, the conversion is performed according to a preset character conversion mapping table, and each character in the character conversion mapping table is provided with a corresponding binary character expression.
[0041] The present invention provides an intelligent storage method for dynamic keys of electronic seals. The method processes electronic documents and converts them into virtual binary documents, thereby defining independent sampling areas. The independent sampling areas are downsampled multiple times to achieve data text compression, and finally an electronic seal is obtained. The entire data processing process is simple and an electronic seal matching the document can be quickly obtained without using complex algorithms, thereby ensuring the security of the electronic seal. In addition, the compressed transmission of the electronic document can be completed based on the electronic seal. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A flowchart of a method for intelligently storing dynamic keys for electronic seals provided by an embodiment of the present invention;
[0043] Figure 2 A flowchart of the steps of counting the number of binary characters in a binary electronic document, determining the number of data sampling times based on the data size of the electronic document to be processed, and constructing a blank virtual binary image provided by an embodiment of the present invention;
[0044] Figure 3 A flowchart of the steps of mapping a binary electronic document into a virtual binary image according to a preset order and dividing independent sampling areas based on a binary electronic document provided in an embodiment of the present invention;
[0045] Figure 4 A flowchart of the steps of performing multiple sampling of an independent sampling area according to the number of data sampling times, filling an idle area during the sampling period, and generating an electronic seal and verification function data based on the sampling results, provided by an embodiment of the present invention;
[0046] Figure 5 An architectural diagram of an electronic seal dynamic key intelligent storage system provided by an embodiment of the present invention;
[0047] Figure 6 An architectural diagram of an image generation module provided by an embodiment of the present invention;
[0048] Figure 7 An architectural diagram of a sampling area division module provided in an embodiment of the present invention;
[0049] Figure 8 This is an architectural diagram of a data sampling module provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0051] It is understood that the terms "first," "second," etc., used herein may be used to describe various elements, but unless otherwise specified, these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, a first xx script may be referred to as a second xx script, and similarly, a second xx script may be referred to as a first xx script without departing from the scope of this application.
[0052] like Figure 1 FIG. 1 is a flow chart of a method for intelligently storing a dynamic key for an electronic seal according to an embodiment of the present invention, the method comprising:
[0053] S100: Obtain an electronic document to be processed, and convert the electronic document to be processed into a binary electronic document.
[0054] In this step, the electronic document to be processed is obtained. For documents that need to be stamped with an electronic seal, they are converted into binary electronic documents, that is, represented by the characters "0" and "1". No matter what format the electronic document to be processed is stored in, it can be converted into binary data.
[0055] S200 , counting the number of binary characters in the binary electronic document, determining the number of data sampling times based on the data size of the electronic document to be processed, and constructing a blank virtual binary image, wherein a side length parameter of the virtual binary image is determined according to the number of data sampling times.
[0056] In this step, the number of binary characters in the binary electronic document is counted, and the data volume of the electronic document to be processed is determined. When generating an electronic seal, the data volume of the electronic seal needs to be controlled, that is, the data volume of the electronic seal is within a preset range. Therefore, the number of data sampling times needs to be determined based on the range of the data volume of the electronic seal. When performing data sampling, the amount of memory occupied by the electronic document to be processed will be reduced accordingly after each sampling until its data occupancy meets the preset range corresponding to the electronic seal. The number of data sampling times is determined based on this, and a blank virtual binary image is constructed. For the virtual binary image, the number of pixels contained in one side is a multiple of 8. A preset single-side length random function is called to generate a random number. The number of pixels contained in the single-side length is determined based on the random number. Then, based on the total data volume of the binary electronic document, the number of binary characters contained in the binary electronic document is less than the number of pixels in the pseudo-binary image.
[0057] S300 , based on the binary electronic document, mapping the binary electronic document into a virtual binary image according to a preset order, and dividing the image into independent sampling areas.
[0058] In this step, a binary electronic document is read, and based on a preset character-pixel mapping relationship, binary characters in the binary electronic document are mapped to binary pixels, such as character "1" is mapped to the first pixel, and character "0" is mapped to the second pixel. The pixel numbers are determined in order from left to right and from top to bottom, and then the binary characters are read starting from the head of the binary electronic document. The grayscale value of the corresponding pixel is determined according to the binary character, and the grayscale value of each pixel in the virtual binary image is determined one by one. The grayscale values of the first pixel and the second pixel are different, and independent sampling areas are divided. The independent sampling area is the smallest unit for data sampling.
[0059] S400, sampling the independent sampling area multiple times according to the data sampling times, filling the idle area during the sampling period, and generating an electronic seal and verification function data based on the sampling results, wherein the verification function data at least includes a verification function, data sampling times and fitting accuracy data.
[0060] In this step, the independent sampling area is sampled multiple times according to the number of data sampling times, and the data in each independent sampling area is replaced with new characters according to the preset data conversion method to complete the data sampling. After multiple data sampling, the data in each independent sampling area is compressed multiple times to obtain an electronic seal. During the sampling period, if the number of binary characters contained in the binary electronic document is less than the number of pixels in the virtual binary image, the blank area is filled with random binary pixels. The grayscale value recorded in the random binary pixel is the filling data. The filling data is recorded each time the data is sampled, and the filling data is converted into a numerical value, so that the sampling number is used as the horizontal axis and the numerical value converted from the filling data is used as the vertical axis. The method comprises the following steps: first, constructing a filling coordinate, performing function fitting on the filling coordinate, obtaining a verification function, determining the fitting accuracy of each point during the fitting process, recording the fitting accuracy data, storing the electronic seal and the fitting accuracy data, and storing them in a server. When it is necessary to verify whether the electronic document has been tampered with, the server is requested for verification function data. The user extracts the filling coordinate based on the verification function, fitting accuracy data, and data sampling times contained in the verification function data. The electronic document is converted into a virtual binary image. The filling data at each data sampling is determined based on the filling coordinate, thereby generating verification data. The verification data is compared with the electronic seal to determine whether the electronic document has been tampered with, thereby ensuring the security of the electronic document.
[0061] like Figure 2 As shown, as a preferred embodiment of the present invention, the steps of counting the number of binary characters in the binary electronic document, determining the number of data sampling times based on the data size of the electronic document to be processed, and constructing a blank virtual binary image specifically include:
[0062] S201: Count the number of binary characters in the binary electronic document and obtain preset electronic seal parameters, where the electronic seal parameters at least include memory usage.
[0063] In this step, the number of binary characters in the binary electronic document is counted. When creating a blank virtual binary image, the number of pixels of the virtual binary image is greater than the number of binary characters. The preset electronic seal parameters are obtained. The electronic seal parameters are the size of the memory space that the electronic seal is ultimately allowed to occupy.
[0064] S202: extracting the data size of the electronic document to be processed and calculating the number of data sampling times according to the memory usage.
[0065] In this step, the data size of the electronic document to be processed is extracted. In the present invention, the electronic seal is obtained based on the sampling of the electronic document. Each time the sampling is performed, the data volume of the electronic document will be reduced exponentially. After a sufficient number of data samplings, the data volume of the electronic document falls within the available range of the electronic seal. At this time, the sampled electronic document is the electronic seal. Then, based on the data volume between the two, the number of data samplings can be calculated. The data size of the electronic document to be processed is P, the allowable data volume range of the electronic seal is between K1 and K2, the number of data samplings L is between P / K1 and P / K2, and the number of data samplings is rounded so that P / L is between K1 and K2.
[0066] S203 : Determine the size and number of independent sampling areas based on the number of data sampling times, and generate a blank virtual binary image.
[0067] In this step, the size and number of independent sampling areas are determined based on the number of data sampling times. The size of the independent sampling area is determined according to the number of data sampling times. The cardinality of the independent sampling area is A. Generally speaking, A is 16 binary characters. The final size of the independent sampling area is A. L If L=3, the number of binary characters contained in the independent sampling area is 16 3 , the number of independent sampling areas is [P / (16 3 )], where [] indicates rounding up, such as [P / (16 3 )]=56.2, then the number of independent sampling areas is 57, generating a blank virtual binary image. At this time, the number of pixels contained in the blank virtual binary image is the product of the number of independent sampling areas and the number of binary characters contained in the independent sampling areas.
[0068] like Figure 3 As shown, as a preferred embodiment of the present invention, the step of mapping the binary electronic document into a virtual binary image according to a preset order based on the binary electronic document and dividing the independent sampling areas specifically includes:
[0069] S301, reading a binary electronic document, determining a mapping relationship of binary characters, and obtaining a mapping relationship table.
[0070] In this step, a binary electronic document is read. The binary electronic document is represented by binary characters "1" and "0". The mapping relationship of the binary characters records the matching relationship between the binary characters and the grayscale values, that is, the binary character "1" corresponds to the first grayscale value, that is, the first pixel, and the binary character "2" corresponds to the second grayscale value, that is, the second pixel.
[0071] S302 : Mapping binary characters in the binary electronic document into a virtual binary image according to a preset sequence and a mapping relationship table.
[0072] In this step, character mapping is performed according to the preset order and mapping relationship table. Each time a binary character in a binary electronic document is read, the corresponding grayscale value is determined based on the binary character, and it is filled into the corresponding pixel of the virtual binary image. After the binary characters are mapped, there will be some pixels that have not yet been assigned a grayscale value, that is, blank pixels.
[0073] S303 : Divide the independent sampling area according to the calculated size of the independent sampling area in a preset order to obtain a plurality of independent sampling areas.
[0074] In this step, the independent sampling areas are divided according to the calculated sizes. The independent sampling areas are square matrices with the same number of pixels on both sides. The positions of the independent sampling areas are determined in order from left to right and from top to bottom.
[0075] like Figure 4 As shown, as a preferred embodiment of the present invention, the steps of sampling the independent sampling area multiple times according to the number of data sampling times, filling the idle area during the sampling period, and generating the electronic seal and verification function data based on the sampling results specifically include:
[0076] S401 , randomly filling blank pixels in the independent sampling area, where the randomly filled data is the filling data.
[0077] In this step, the blank pixels in the independent sampling area are randomly filled. At this time, the randomly filled data is recorded, that is, the grayscale values of the filled blank pixels are recorded, which is the filled data.
[0078] S402: Divide the independent sampling area into multiple sampling matrices, merge the elements in the sampling matrices, and obtain sampling results.
[0079] In this step, the independent sampling area is divided into multiple sampling matrices. The sampling matrix contains a square matrix of 16 binary characters. The average value of the corresponding values of the characters in the 16 binary character square matrix is calculated. The sampling result Among them, S i is the value of the decimal number represented by the binary character, then a sampling matrix is merged into a sampling result, and the electronic document after the first data sampling is obtained, which is defined as the first electronic document.
[0080] S403, repeatedly sampling the specific base character and performing pixel filling until the sampling times meet the conditions to generate the electronic seal and verification function data.
[0081] In this step, the first electronic document is regarded as an electronic document to be processed, and data sampling is repeated to reach the calculated number of data sampling times. The data of each pixel filling is recorded, which is the filling data. After the data sampling is completed, the final electronic document obtained is the electronic seal. For the collected filling data, the filling data is converted into a numerical value, so that the sampling number is used as the horizontal coordinate and the numerical value converted from the filling data is used as the vertical coordinate to construct the filling coordinate. The filling coordinate is fitted with a function to obtain a verification function. In the fitting process, the fitting accuracy of each point is determined, the fitting accuracy data is recorded, the electronic seal and the fitting accuracy data are stored, and the data are stored in the server. In the server, specifically, the filling data contains multiple grayscale values, the grayscale values are the first grayscale value and the second grayscale value, which are converted into binary characters, that is, the filling data is converted into a binary string, and the binary characters are converted into decimal numbers, that is, the vertical coordinate is obtained. The number of data sampling times is the same as the number of filling coordinates. Function fitting software is used for fitting to obtain a set of verification functions. When fitting, the fitting accuracy of each filling coordinate is determined. The fitting accuracy is the calculated value obtained after substituting the horizontal coordinate into the verification function. The number of truncated digits of the calculated value is the fitting accuracy. The calculated value is truncated according to the fitting accuracy, and the obtained value is the value corresponding to the vertical coordinate of the filling coordinate.
[0082] like Figure 5 As shown in FIG, an electronic seal dynamic key intelligent storage system provided by an embodiment of the present invention includes:
[0083] The document conversion module 100 is used to obtain the electronic document to be processed and convert the electronic document to be processed into a binary electronic document.
[0084] In this system, the document conversion module 100 obtains the electronic document to be processed, and converts the document that needs to be stamped with an electronic seal into a binary electronic document, that is, it is represented by the characters "0" and "1". No matter what format the electronic document to be processed is stored in, it can be converted into binary data.
[0085] The image generation module 200 is used to count the number of binary characters in the binary electronic document, determine the number of data sampling times based on the data size of the electronic document to be processed, and construct a blank virtual binary image. The side length parameter of the virtual binary image is determined according to the number of data sampling times.
[0086] In this system, the image generation module 200 counts the number of binary characters in the binary electronic document and determines the data volume of the electronic document to be processed. When generating an electronic seal, the data volume of the electronic seal needs to be controlled, that is, the data volume of the electronic seal is within a preset range. Therefore, the number of data sampling times needs to be determined based on the range of the data volume of the electronic seal. When performing data sampling, the amount of memory occupied by the electronic document to be processed will be reduced accordingly after each sampling until its data occupancy meets the preset range corresponding to the electronic seal. The number of data sampling times is determined based on this, and a blank virtual binary image is constructed. For the virtual binary image, the number of pixels contained in one side is a multiple of 8. A preset single-side length random function is called to generate a random number. The number of pixels contained in the single-side length is determined based on the random number. Then, based on the total data volume of the binary electronic document, the number of binary characters contained in the binary electronic document is less than the number of pixels in the pseudo-binary image.
[0087] The sampling region division module 300 is configured to map the binary electronic document into a virtual binary image according to a preset order based on the binary electronic document, and to divide the image into independent sampling regions.
[0088] In this system, the sampling area division module 300 reads a binary electronic document and maps the binary characters in the binary electronic document to binary pixels based on a preset character-pixel mapping relationship. For example, the character "1" is mapped to the first pixel and the character "0" is mapped to the second pixel. The pixel numbers are determined in order from left to right and from top to bottom. Then, the binary characters are read starting from the head of the binary electronic document. The grayscale value of the corresponding pixel is determined based on the binary character. The grayscale value of each pixel in the virtual binary image is determined one by one. The grayscale values of the first pixel and the second pixel are different, and independent sampling areas are divided. The independent sampling area is the smallest unit for data sampling.
[0089] The data sampling module 400 is used to sample the independent sampling area multiple times according to the data sampling times, fill the idle area during the sampling period, and generate an electronic seal and verification function data based on the sampling results. The verification function data at least includes a verification function, data sampling times and fitting accuracy data.
[0090] In this system, the data sampling module 400 samples the independent sampling area multiple times according to the number of data samplings, and replaces the data in each independent sampling area with new characters according to the preset data conversion method to complete the data sampling. After multiple data samplings, the data in each independent sampling area is compressed multiple times to obtain an electronic seal. During the sampling period, if the number of binary characters contained in the binary electronic document is less than the number of pixels in the virtual binary image, the blank area is filled with random binary pixels. The grayscale value recorded in the random binary pixels is the filling data. The filling data is recorded each time the data is sampled, and the filling data is converted into a numerical value, so that the sampling number is used as the horizontal axis to calculate the value of the conversion of the filling data. The numerical value is the vertical coordinate, the filling coordinate is constructed, and the function is fitted to the filling coordinate to obtain the verification function. During the fitting process, the fitting accuracy of each point is determined, the fitting accuracy data is recorded, the electronic seal and the fitting accuracy data are stored, and the data are stored in the server. When it is necessary to verify whether the electronic document has been tampered with, the verification function data is requested from the server. The user extracts the filling coordinate based on the verification function, fitting accuracy data and data sampling times contained in the verification function data, and the electronic document is converted into a virtual binary image. The filling data at each data sampling is determined based on the filling coordinate, thereby generating verification data, and comparing the verification data with the electronic seal to determine whether the electronic document has been tampered with, thereby ensuring the security of the electronic document.
[0091] like Figure 6 As shown, as a preferred embodiment of the present invention, the image generation module 200 includes:
[0092] The parameter acquisition unit 201 is used to count the number of binary characters in the binary electronic document and acquire preset electronic seal parameters, where the electronic seal parameters at least include memory usage.
[0093] In this module, the parameter acquisition unit 201 counts the number of binary characters in the binary electronic document. When creating a blank virtual binary image, the number of pixels of the virtual binary image is greater than the number of binary characters, and the preset electronic seal parameters are obtained. The electronic seal parameters are the size of the memory space that the electronic seal is ultimately allowed to occupy.
[0094] The sampling times calculation unit 202 is used to extract the data size of the electronic document to be processed and calculate the data sampling times according to the memory usage.
[0095] In this module, the sampling times calculation unit 202 extracts the data size of the electronic document to be processed. In the present invention, the electronic seal is obtained based on the sampling of the electronic document. Each time a sampling is performed, the data volume of the electronic document will be reduced exponentially. After a sufficient number of data samplings, the data volume of the electronic document falls within the available range of the electronic seal. At this time, the sampled electronic document is the electronic seal. Then, based on the data volume between the two, the data sampling times can be calculated. The data size of the electronic document to be processed is P, the allowable data volume range of the electronic seal is between K1 and K2, the data sampling times L is between P / K1 and P / K2, and the data sampling times are rounded so that P / L is between K1 and K2.
[0096] The virtual image generating unit 203 is configured to determine the size and number of independent sampling regions based on the number of data sampling times, and generate a blank virtual binary image.
[0097] In this module, the virtual image generation unit 203 determines the size and number of independent sampling areas based on the number of data sampling times. The size of the independent sampling area is determined according to the number of data sampling times. The cardinality of the independent sampling area is A. Generally speaking, A is 16 binary characters. The final size of the independent sampling area is A. L If L=3, the number of binary characters contained in the independent sampling area is 16 3 , the number of independent sampling areas is [P / (16 3 )], where [] indicates rounding up, such as [P / (16 3 )]=56.2, then the number of independent sampling areas is 57, generating a blank virtual binary image. At this time, the number of pixels contained in the blank virtual binary image is the product of the number of independent sampling areas and the number of binary characters contained in the independent sampling areas.
[0098] like Figure 7 As shown, as a preferred embodiment of the present invention, the sampling area division module 300 includes:
[0099] The document reading unit 301 is used to read a binary electronic document, determine a mapping relationship between binary characters, and obtain a mapping relationship table.
[0100] In this module, the document reading unit 301 reads a binary electronic document. The binary electronic document is represented by binary characters "1" and "0". The mapping relationship of binary characters records the matching relationship between binary characters and grayscale values, that is, the binary character "1" corresponds to the first grayscale value, that is, the first pixel, and the binary character "2" corresponds to the second grayscale value, that is, the second pixel.
[0101] The character mapping unit 302 is configured to map binary characters in the binary electronic document into a virtual binary image according to a preset sequence and a mapping relationship table.
[0102] In this module, the character mapping unit 302 performs character mapping according to a preset order and a mapping relationship table. Each time a binary character in a binary electronic document is read, the corresponding grayscale value is determined based on the binary character, and the grayscale value is filled into the corresponding pixel of the virtual binary image. After all the binary characters are mapped, there will be some pixels that have not yet been assigned a grayscale value, that is, blank pixels.
[0103] The region dividing unit 303 is configured to divide the independent sampling region according to the calculated size of the independent sampling region and in a preset order to obtain a plurality of independent sampling regions.
[0104] In this module, the area division unit 303 divides the independent sampling area according to the calculated size of the independent sampling area. The independent sampling area is a square matrix with the same number of pixels on its two sides. The position of each independent sampling area is determined in order from left to right and from top to bottom.
[0105] like Figure 8 As shown, as a preferred embodiment of the present invention, the data sampling module 400 includes:
[0106] The area filling unit 401 is used to randomly fill blank pixels in the independent sampling area, and the randomly filled data is the filling data.
[0107] In this module, the area filling unit 401 randomly fills the blank pixels in the independent sampling area. At this time, the randomly filled data is recorded, that is, the grayscale value of the filled blank pixels is recorded, which is the filling data.
[0108] The data conversion unit 402 is configured to divide the independent sampling area into multiple sampling matrices, and merge the elements in the sampling matrices to obtain sampling results.
[0109] In this module, the data conversion unit 402 divides the independent sampling area into multiple sampling matrices. The sampling matrix contains a square matrix of 16 binary characters. The average value of the corresponding values of the characters in the 16 binary character square matrix is calculated. The sampling result Among them, S i is the value of the decimal number represented by the binary character, then a sampling matrix is merged into a sampling result, and the electronic document after the first data sampling is obtained, which is defined as the first electronic document.
[0110] The seal generating unit 403 is used to repeatedly sample characters of a specific base and perform pixel filling until the number of sampling times meets a condition to generate an electronic seal and verification function data.
[0111] In this module, the seal generation unit 403 regards the first electronic document as an electronic document to be processed, repeatedly performs data sampling to reach the calculated number of data sampling times, records the data of each pixel filling, that is, the filling data, and after the data sampling is completed, the final electronic document obtained is the electronic seal. For the collected filling data, the filling data is converted into a numerical value, so that the sampling times are used as the horizontal coordinate and the numerical value converted from the filling data is used as the vertical coordinate to construct the filling coordinate, perform function fitting on the filling coordinate to obtain the verification function, and in the fitting process, determine the fitting accuracy of each point, record the fitting accuracy data, store the electronic seal and the fitting accuracy data, and save it. It is stored in the server. Specifically, the filling data contains multiple grayscale values, and the grayscale values are the first grayscale value and the second grayscale value. Convert them into binary characters, that is, convert the filling data into a binary string, and convert the binary characters into decimal numbers to obtain the vertical coordinate. The number of data sampling times is the same as the number of filling coordinates. Use function fitting software to fit and obtain a set of verification functions. When fitting, determine the fitting accuracy of each filling coordinate. The fitting accuracy is the calculated value obtained after substituting the horizontal coordinate into the verification function. The number of truncated digits of the calculated value is the fitting accuracy. The calculated value is truncated according to the fitting accuracy, and the obtained value is the value corresponding to the vertical coordinate of the filling coordinate.
[0112] It should be understood that, although the various steps in the flow chart of each embodiment of the present invention are shown in sequence according to the indication of the arrows, these steps are not necessarily performed in sequence according to the order indicated by the arrows. Unless otherwise specified herein, the execution of these steps is not strictly limited in order, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each embodiment may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.
[0113] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can 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 can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various 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).
[0114] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0115] The above-described embodiments merely illustrate several implementations of the present invention, and while their descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art would be able to make numerous variations and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be determined by the appended claims.
[0116] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for intelligent storage of dynamic keys for electronic seals, characterized in that: The method comprises: Obtaining the electronic document to be processed, and converting the electronic document to be processed into a binary electronic document; Counting the number of binary characters in the binary electronic document, determining a data sampling number based on the data size of the electronic document to be processed, and constructing a blank virtual binary image, wherein a side length parameter of the virtual binary image is determined according to the data sampling number; Based on the binary electronic document, the binary electronic document is mapped into a virtual binary image according to a preset order, and independent sampling areas are divided; The independent sampling area is sampled multiple times according to the data sampling times, the idle area is filled during the sampling period, and an electronic seal and verification function data are generated based on the sampling results. The verification function data at least includes a verification function, data sampling times and fitting accuracy data.
2. The electronic seal dynamic key intelligent storage method according to claim 1, characterized in that: The steps of counting the number of binary characters in the binary electronic document, determining the number of data sampling times based on the data size of the electronic document to be processed, and constructing a blank virtual binary image specifically include: Counting the number of binary characters in the binary electronic document to obtain preset electronic seal parameters, wherein the electronic seal parameters at least include memory usage; Extract the data size of the electronic document to be processed and calculate the number of data sampling times based on the memory usage; The size and number of independent sampling areas are determined based on the data sampling times, and a blank virtual binary image is generated.
3. The electronic seal dynamic key intelligent storage method according to claim 2, characterized in that: The step of mapping the binary electronic document into a virtual binary image according to a preset order based on the binary electronic document and dividing the independent sampling areas specifically includes: Reading a binary electronic document, determining a mapping relationship between binary characters, and obtaining a mapping relationship table; Mapping binary characters in a binary electronic document into a virtual binary image according to a preset sequence and a mapping relationship table; According to the calculated size of the independent sampling area, the independent sampling area is divided according to a preset order to obtain a plurality of independent sampling areas.
4. The electronic seal dynamic key intelligent storage method according to claim 1, characterized in that: The steps of sampling the independent sampling area multiple times according to the number of data sampling times, filling the idle area during the sampling period, and generating the electronic seal and verification function data based on the sampling results specifically include: Randomly fill the blank pixels in the independent sampling area, and the randomly filled data is the filling data; Divide the independent sampling area into multiple sampling matrices, merge the elements in the sampling matrices to obtain the sampling results; Repeatedly sample and fill pixels for specific base characters until the number of sampling times meets the conditions to generate electronic seal and verification function data.
5. The electronic seal dynamic key intelligent storage method according to claim 4, characterized in that: In the step of converting the elements in the sampling matrix into characters of a specific base, the conversion is performed according to a preset character conversion mapping table, and each character in the character conversion mapping table is provided with a corresponding binary character expression.
6. An electronic seal dynamic key intelligent storage system, characterized in that: The system comprises: A document conversion module is used to obtain the electronic document to be processed and convert the electronic document to be processed into a binary electronic document; An image generation module is configured to count the number of binary characters in a binary electronic document, determine a data sampling number based on the data size of the electronic document to be processed, and construct a blank virtual binary image, wherein a side length parameter of the virtual binary image is determined according to the data sampling number; A sampling area division module is used to map the binary electronic document into a virtual binary image according to a preset order based on the binary electronic document, and divide the independent sampling areas; The data sampling module is used to sample the independent sampling area multiple times according to the data sampling times, fill the idle area during the sampling period, and generate an electronic seal and verification function data based on the sampling results. The verification function data at least includes a verification function, the data sampling times and fitting accuracy data.
7. The electronic seal dynamic key intelligent storage system according to claim 6, characterized in that: The image generation module includes: A parameter acquisition unit, configured to count the number of binary characters in the binary electronic document and acquire preset electronic seal parameters, wherein the electronic seal parameters at least include memory usage; A sampling times calculation unit, used to extract the data size of the electronic document to be processed and calculate the data sampling times according to the memory usage; The virtual image generating unit is used to determine the size and number of independent sampling areas based on the number of data sampling times, and generate a blank virtual binary image.
8. The electronic seal dynamic key intelligent storage system according to claim 7, characterized in that: The sampling area division module includes: A document reading unit, configured to read a binary electronic document, determine a mapping relationship between binary characters, and obtain a mapping relationship table; A character mapping unit, configured to map binary characters in a binary electronic document into a virtual binary image according to a preset sequence and a mapping relationship table; The area division unit is used to divide the independent sampling area according to the calculated size of the independent sampling area in a preset order to obtain multiple independent sampling areas.
9. The electronic seal dynamic key intelligent storage system according to claim 6, characterized in that: The data sampling module includes: The area filling unit is used to randomly fill the blank pixels in the independent sampling area, and the randomly filled data is the filling data; A data conversion unit is used to divide the independent sampling area into multiple sampling matrices, merge the elements in the sampling matrices, and obtain sampling results; The seal generation unit is used to repeatedly sample specific base characters and perform pixel filling until the sampling times meet the conditions to generate the electronic seal and verification function data.
10. The electronic seal dynamic key intelligent storage system according to claim 9, characterized in that: In the step of converting the elements in the sampling matrix into characters of a specific base, the conversion is performed according to a preset character conversion mapping table, and each character in the character conversion mapping table is provided with a corresponding binary character expression.