CN117197782B - Electronic signature generation method, device, equipment and readable storage medium - Google Patents

Electronic signature generation method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN117197782B
CN117197782B CN202311462341.6A CN202311462341A CN117197782B CN 117197782 B CN117197782 B CN 117197782B CN 202311462341 A CN202311462341 A CN 202311462341A CN 117197782 B CN117197782 B CN 117197782B
Authority
CN
China
Prior art keywords
target
unit
stroke
units
signature
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311462341.6A
Other languages
Chinese (zh)
Other versions
CN117197782A (en
Inventor
焦震
金鑫
钱毅俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Minxing Tongda Information Technology Co ltd
Original Assignee
Beijing Minxing Tongda Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Minxing Tongda Information Technology Co ltd filed Critical Beijing Minxing Tongda Information Technology Co ltd
Priority to CN202311462341.6A priority Critical patent/CN117197782B/en
Publication of CN117197782A publication Critical patent/CN117197782A/en
Application granted granted Critical
Publication of CN117197782B publication Critical patent/CN117197782B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention provides a method, a device, equipment and a readable storage medium for generating an electronic signature, which relate to the technical field of electronic signatures and comprise the steps of obtaining a signature sample of a target user and a target document; comparing the signature sample with a pre-stored target sample to obtain target similarity; calculating the completeness of the target document; when the integrity of the target document is greater than a second set threshold, determining an initial template based on keywords in the target document; determining a target anti-counterfeiting code based on the initial template; and correspondingly generating a target signature based on the signature sample, the target anti-counterfeiting code and the initial template. The invention judges whether the current target document is the operation of the appointed user by the signature information, after the identity of the operator is confirmed, the integrity of the transmitted target document is detected, the electronic signature is regenerated after the integrity of the document is confirmed, and the electronic signature is arranged at the appointed position in the document, thereby ensuring the integrity and the safety of the target document.

Description

Electronic signature generation method, device, equipment and readable storage medium
Technical Field
The present invention relates to the field of electronic signature technologies, and in particular, to a method, an apparatus, a device, and a readable storage medium for generating an electronic signature.
Background
The electronic contract is rapidly taken into a mode for people to reach an agreement due to the characteristics of convenience, universities, easy preservation and the like, wherein the electronic signature with legal effect is an important point for the electronic contract to take effect, and in the transmission process of the electronic contract, the electronic contract has the problem of being easily acquired by irrelevant personnel and being tampered randomly, so that the authenticity of the electronic contract is influenced.
Disclosure of Invention
The present invention aims to provide a method, a device, equipment and a readable storage medium for generating an electronic signature, so as to improve the problems. In order to achieve the above purpose, the technical scheme adopted by the invention is as follows:
in a first aspect, the present application provides a method for generating an electronic signature, including:
acquiring a signature sample and a target document of a target user;
comparing the signature sample with a pre-stored target sample to obtain target similarity;
when the target similarity is larger than a first set threshold, calculating the completeness of the target document;
when the integrity of the target document is greater than a second set threshold, determining an initial template based on keywords in the target document;
determining a target anti-counterfeiting code based on the initial template;
and correspondingly generating a target signature based on the signature sample, the target anti-counterfeiting code and the initial template.
In a second aspect, the present application further provides an apparatus for generating an electronic signature, including:
the first acquisition unit is used for acquiring a signature sample of a target user and a target document;
the first comparison unit is used for comparing the signature sample with a pre-stored target sample to obtain target similarity;
the first calculation unit is used for calculating the completeness of the target document when the target similarity is larger than a first set threshold value;
the first determining unit is used for determining an initial template based on keywords in the target document when the integrity of the target document is larger than a second set threshold;
the second determining unit is used for determining a target anti-counterfeiting code based on the initial template;
and the generating unit is used for correspondingly generating a target signature based on the signature sample, the target anti-counterfeiting code and the initial template.
In a third aspect, the present application further provides an electronic signature generating apparatus, including:
a memory for storing a computer program;
and the processor is used for realizing the steps of the electronic signature generation method when executing the computer program.
In a fourth aspect, the present application further provides a readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the above-described electronic signature-based generation method.
The beneficial effects of the invention are as follows:
the invention judges whether the current target document is the operation of the appointed user by the signature information, after the identity of the operator is confirmed, the integrity of the transmitted target document is detected, the electronic signature is regenerated after the integrity of the document is confirmed, and the electronic signature is arranged at the appointed position in the document, thereby ensuring the integrity and the safety of the target document.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the embodiments of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for generating an electronic signature according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a contract chapter according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of another chapter of contract according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a time stamp according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic signature generating device according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic signature generating device according to an embodiment of the present invention.
The marks in the figure:
1000. a first acquisition unit; 2000. a first comparing unit; 3000. a first calculation unit; 4000. a first determination unit; 5000. a second determination unit; 6000. a generating unit; 7000. a positioning unit; 8000. a third acquisition unit; 9000. a sixth determination unit; 10000. a fourth acquisition unit; 11000. a setting unit; 2100. a first dividing unit; 2200. a second calculation unit; 2300. a third calculation unit; 2400. a fourth calculation unit; 2301. a third dividing unit; 2302. a fifth calculation unit; 2303. a third determination unit; 2304. a sixth calculation unit; 2305. a second acquisition unit; 2306. a seventh calculation unit; 2307. an eighth calculation unit; 2308. a ninth calculation unit; 2309. a fourth determination unit; 2310. a fifth determination unit; 4100. a fifth acquisition unit; 4200. a seventh determination unit; 4300. an eighth determination unit; 4400. a sixth acquisition unit; 4500. a filling unit; 5100. a second dividing unit; 5200. a first processing unit; 5300. a second processing unit; 5400. a combining unit; 5500. a conversion unit;
800. generating equipment of electronic signature; 801. a processor; 802. a memory; 803. a multimedia component; 804. an I/O interface; 805. a communication component.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. The components of the embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the invention, as presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures. Meanwhile, in the description of the present invention, the terms "first", "second", and the like are used only to distinguish the description, and are not to be construed as indicating or implying relative importance.
Example 1:
the embodiment provides a method for generating an electronic signature.
Referring to fig. 1, the method is shown to include step S1000, step S2000, step S3000, step S4000, step S5000, and step S6000.
S1000, acquiring a signature sample of a target user and a target document;
specifically, the document is usually stored in the cloud disk, the document needs to be logged in through an account number and password, and because the fixed account number and password have the possibility of leakage, if the document needs to be operated after logging in, the identity of the current user needs to be verified, the user can carry out handwriting signature on the current login device, so that whether the user is the target user can be judged, and the user can respond to the corresponding operation after judging, so that the safety of document operation is ensured.
S2000, comparing the signature sample with a pre-stored target sample to obtain target similarity;
specifically, each target user with the operation authority correspondingly stores a signature sample, and the signature can be used for verifying whether the currently executed operation user is the target user or not, so that the operation safety is ensured.
Specifically, the step S2000 specifically includes:
step S2100, dividing a signature sample into a plurality of first stroke units based on the rising and falling points of a target user when writing the signature sample;
specifically, for example, for "writing" a word, five first stroke units, "i", "b", "c", and "a" are split based on the start and stop points.
S2200, calculating a difference value between the number of the first stroke units and the number of strokes corresponding to the target sample to obtain a target difference value;
specifically, as writing habits are different, different writing modes of different people are different aiming at the same text, and the condition of connecting strokes exists, handwriting can be divided into a plurality of strokes through starting points during writing, preliminary screening can be carried out through the number of strokes, and whether a current user is a target user or not is judged.
Step S2300, when the target difference value is smaller than a third set threshold value, calculating local similarity of each stroke unit in the plurality of first stroke units and the same stroke unit corresponding to the target sample respectively to obtain a plurality of local similarity;
specifically, when the difference calculated by the strokes is greater than a set threshold, the current user is considered not to be the target user, the response operation is refused, and the alarm information can be sent to remind the possibility of leakage of account password information based on the prestored contact information of the target user; when the difference between the strokes is smaller than the set threshold, the local similarity between the current signature and the target sample needs to be further calculated, so that an accurate judgment is made as to whether the current operation is the operation of the target user himself, the third set threshold is usually 2, and corresponding setting can be performed based on the device performance used for writing, and the method is not particularly limited.
Specifically, step S2300 specifically includes:
s2301, dividing a plurality of first stroke units into a plurality of second stroke units based on slope characteristics, wherein the slope characteristics are used for splitting strokes with different slopes in the first stroke units;
specifically, since there are horizontal and vertical or horizontal continuous strokes in one stroke, in order to accurately compare writing characteristics of any stroke, the first stroke unit needs to be split again based on a change of a slope, for example, for a "writing" word, the first stroke unit is split into nine second stroke units based on the slope characteristic, including "ㄧ", "ー", "ゝ", "ㄧ", "ー", "ㄧ", "ゝ", "ー", and "ー".
S2302, randomly selecting a preset number of target stroke units from a plurality of second stroke units, and respectively calculating a plurality of first length ratio results among the plurality of target stroke units;
s2303, determining corresponding stroke units in the target sample, and correspondingly calculating a plurality of second length ratio results;
s2304, performing difference calculation on the first length ratio result and the corresponding second length ratio result, and performing summation calculation on the difference result to obtain a difference result;
specifically, it is considered that when a user writes his or her own signature, the writing habit is unchanged regardless of the size of the written font, and the writing method for each font is identical, so that the ratio between strokes constituting the text is also approximately the same.
S2305, when the difference result is smaller than a fourth set threshold value, acquiring the writing time of the target user when writing the signature sample, and correspondingly determining the writing time corresponding to each second stroke unit;
s2306, randomly determining a plurality of test points on all the second stroke units, and calculating the average writing speed and the writing acceleration of all the test points;
s2307, calculating a first distance between each test point on the plurality of second stroke units and a corresponding test point in the target sample based on a dynamic time warping algorithm, wherein the average writing speed of the test points is equal to that of the test points;
s2308, calculating second distances between each test point on the plurality of second stroke units and the corresponding test point in the target sample based on a dynamic time warping algorithm, wherein the second distances are between the respective writing accelerations;
s2309, determining a local distance of the corresponding second stroke unit based on the first distance and the second distance;
s2310, determining local similarity of the second stroke unit based on the local distance;
specifically, when the user writes the signature of the user, the speed and the acceleration of each stroke are basically the same, if a person maliciously imitates the writing mode of the target user, the shape of the font is generally the same, but the writing speed of each stroke and the acceleration of certain points are greatly different, so that the accurate judgment on whether the current login user is the user can be performed through the writing speed and the acceleration of each stroke unit.
And S2400, summing the plurality of local similarities to obtain the target similarity.
Specifically, after the local similarity of the plurality of strokes is obtained, the similarity of the whole signature sample can be determined through summation calculation, so that the difference between the signature sample and the target sample is determined.
S3000, calculating the completeness of a target document when the target similarity is larger than a first set threshold;
specifically, when the similarity is greater than the set threshold, the current login user is considered to be the target user, the corresponding operation can be responded, whether the content of the document is complete or not needs to be determined at the moment, whether the document is changed or not is confirmed, if the document is not changed, subsequent signature processing can be performed, and if the document is changed, alarm information needs to be output to remind a worker of processing.
S4000, determining an initial template based on keywords in the target document when the integrity of the target document is greater than a second set threshold;
specifically, the types of electronic signatures required by different documents are not the same, and the types of the documents and the corresponding required types of the electronic signature templates can be confirmed based on specific position keywords in the documents.
Specifically, the step S4000 specifically includes:
s4100, obtaining keywords of a target document, wherein the keywords comprise document names and document abstracts;
s4200, determining a first template when the document name contains preset characters, wherein the first template is a contract chapter template;
s4300, determining a continuous eight-bit digital combination from the document abstract as a contract number;
s4400, acquiring time for determining a first template as a first target time;
s4500, correspondingly filling the contract number and the first target time to the corresponding position of the first template, and obtaining an initial template;
specifically, as shown in fig. 2, the contract seal template is a contract seal template, and the contract seal template is also required to be filled with a contract number, date, bar-shaped anti-counterfeiting code and a verification two-dimensional code, wherein filling of a corresponding date position is performed according to the time of obtaining the template, and the contract seal template is usually used for signing a contract between enterprises; and acquiring attribute information such as seal manufacturer, contract number and the like from the target document, and filling the attribute information into the corresponding position. Referring to fig. 3, another contract chapter template is provided, and only two-dimensional codes and dates need to be filled in the contract chapter, which is commonly used for contract signing among individuals; as shown in fig. 4, a date stamp template is provided, and the date stamp is required to be filled with a bar-type anti-counterfeiting code, a date and a stamp name, and is generally used for indicating the signed date.
S5000, determining a target anti-counterfeiting code based on an initial template;
specifically, the target anti-counterfeiting code is correspondingly generated for the template used for being filled with part of information, so that the anti-counterfeiting code of each seal is different, and the authenticity of the contract can be judged by verifying the anti-counterfeiting code in subsequent verification.
Specifically, step S5000 specifically includes:
s5100, dividing an initial template based on a preset width to obtain a plurality of dividing units;
s5200, processing a plurality of dividing units based on an asymmetric encryption model to obtain a plurality of corresponding first units;
s5300, processing the plurality of dividing units based on a Reed Solomon model to obtain a plurality of corresponding second units;
s5400, combining the first unit with the corresponding second unit to obtain a data unit;
and S5500, converting the data unit into a target anti-fake code based on an encoder.
Specifically, the initial template is divided into a plurality of dividing units with the same width, the corresponding first unit and second unit are obtained through processing of the Reed Solomon model and the Reed Solomon model, the first unit and the second unit obtained through calculation of the same dividing unit are combined, and then the first unit and the second unit are converted into anti-counterfeiting codes through the encoder, and the anti-counterfeiting codes can have a good anti-counterfeiting effect.
S6000, correspondingly generating a target signature based on the signature sample, the target anti-counterfeiting code and the initial template;
specifically, the target anti-counterfeiting code is arranged at a corresponding position of the initial template to obtain a target template, and the target template is covered on the surface of the signature sample, so that the target signature is obtained.
Specifically, after the target signature is determined, the target signature is also required to be set at a designated position in the document, so that a contract with legal effect is obtained.
S7000, positioning the position of a target character based on a target document, wherein the target character is a preset combination of characters and punctuation marks;
specifically, the signature setting position is typically set in the following manner: after such combination, the document may be searched to determine the position of the combination, thereby determining the signature setting position, and the signature setting position may be set according to the actual situation, but is not particularly limited thereto.
S8000, acquiring four initial signature areas positioned in four directions of the position of the target character, wherein the initial signature areas are rectangular;
s9000, determining a target signature area meeting a set condition in four initial signature areas, wherein the set condition is that the area is a blank area;
s10000, acquiring the left upper corner coordinates of the blank area;
s11000, setting the left upper corner of the target signature at the left upper corner coordinate of the blank area;
specifically, in order to avoid the signature covering the original text information in the document, the signature is generally set in the blank area, and the upper left corner of the signature is aligned to the upper left corner of the blank area, so that an effective document covered by the signature is obtained.
Example 2:
as shown in fig. 5, this embodiment provides an apparatus for generating an electronic signature, where the apparatus includes:
a first obtaining unit 1000 for obtaining a signature sample of a target user and a target document;
a first comparing unit 2000, configured to compare the signature sample with a pre-stored target sample to obtain a target similarity;
a first calculating unit 3000 configured to calculate the integrity of the target document when the target similarity is greater than a first set threshold;
a first determining unit 4000, configured to determine an initial template based on keywords in the target document when the integrity of the target document is greater than a second set threshold;
a second determining unit 5000, configured to determine a target security code based on the initial template;
and a generating unit 6000, configured to correspondingly generate a target signature based on the signature sample, the target anti-counterfeiting code and the initial template.
In a specific embodiment disclosed in the present application, the first comparing unit 2000 includes:
a first dividing unit 2100 for dividing the signature sample into a plurality of first drawing units based on a landing point of the target user when writing the signature sample;
a second calculating unit 2200, configured to calculate a difference between the number of the first stroke units and the number of strokes corresponding to the target sample, to obtain a target difference;
a third calculating unit 2300, configured to calculate, when the target difference value is smaller than a third set threshold, local similarity between each of the plurality of first stroke units and a corresponding same stroke unit in the target sample, respectively, so as to obtain a plurality of local similarities;
the fourth calculating unit 2400 is configured to sum up the plurality of local similarities to obtain the target similarity.
In a specific embodiment disclosed in the present application, the second determining unit 5000 includes:
the second dividing unit 5100 is configured to divide the initial template based on a preset width to obtain a plurality of dividing units;
a first processing unit 5200, configured to process the plurality of dividing units based on the asymmetric encryption model to obtain a plurality of corresponding first units;
the second processing unit 5300 is configured to process the plurality of partition units based on the reed solomon model to obtain a plurality of corresponding second units;
a combining unit 5400, configured to combine the first unit with the corresponding second unit to obtain a data unit;
the conversion unit 5500 is configured to convert the data unit into the target anti-counterfeiting code based on the encoder.
In one embodiment disclosed herein, the third computing unit 2300 includes:
a third dividing unit 2301 for dividing the plurality of first stroke units into a plurality of second stroke units based on a slope characteristic for splitting strokes of different slopes in the first stroke units;
a fifth calculating unit 2302, configured to randomly select a preset number of target stroke units from the plurality of second stroke units, and calculate a plurality of first length ratio results between the plurality of target stroke units respectively;
a third determining unit 2303, configured to determine corresponding stroke units in the target sample, and correspondingly calculate a plurality of second length ratio results;
a sixth calculation unit 2304, configured to perform a difference calculation on the first length ratio result and the corresponding second length ratio result, and perform a summation calculation on the difference result to obtain a difference result;
a second obtaining unit 2305, configured to obtain writing time of the target user when writing the signature sample when the difference result is smaller than the fourth set threshold, and correspondingly determine writing time corresponding to each second writing unit;
a seventh calculation unit 2306, configured to randomly determine a plurality of test points on all the second stroke units, and calculate an average writing speed and writing acceleration of all the test points;
an eighth calculation unit 2307, configured to calculate a first distance between each test point on the plurality of second stroke units and a corresponding test point in the target sample based on a dynamic time warping algorithm, where the average writing speed of each test point is equal to the average writing speed of each test point;
a ninth calculation unit 2308, configured to calculate, based on a dynamic time warping algorithm, a second distance between each test point on the plurality of second stroke units and a corresponding test point in the target sample, and a respective writing acceleration;
a fourth determining unit 2309 configured to determine a local distance of the corresponding second stroke unit based on the first distance and the second distance;
the fifth determining unit 2310 is configured to determine the local similarity of the second stroke unit based on the local distance.
In one embodiment disclosed herein, the apparatus further comprises:
a positioning unit 7000 for positioning the position of the target character based on the target document, wherein the target character is a combination of a preset character and a punctuation mark;
a third obtaining unit 8000, configured to obtain four initial signature areas located in four directions where the target character is located, where the initial signature areas are rectangular;
a sixth determining unit 9000, configured to determine a target signature area satisfying a setting condition, where the setting condition is that the area is a blank area, from among the four initial signature areas;
a fourth acquiring unit 10000, configured to acquire an upper left corner coordinate of the blank area;
a setting unit 11000 for setting the upper left corner of the target signature at the upper left corner coordinates of the blank area.
In one embodiment disclosed herein, the first determining unit 4000 includes:
a fifth acquisition unit 4100 for acquiring keywords of the target document, the keywords including document names and document summaries;
seventh determining unit 4200, configured to determine, when the document name contains a preset text, a first template, where the first template is a contract chapter template;
an eighth determining unit 4300 for determining a combination of consecutive eight digits from the document digest as a contract number;
a sixth acquisition unit 4400 for acquiring a time of determining the first template as a first target time;
and a filling unit 4500, configured to fill the contract number and the first target time to corresponding positions of the first template, so as to obtain an initial template.
It should be noted that, regarding the apparatus in the above embodiments, the specific manner in which the respective modules perform the operations has been described in detail in the embodiments regarding the method, and will not be described in detail herein.
Example 3:
corresponding to the above method embodiment, there is further provided an apparatus for generating an electronic signature in the present embodiment, and the apparatus for generating an electronic signature described below and the method for generating an electronic signature described above may be referred to correspondingly with each other.
Fig. 6 is a block diagram of an electronic signature generation device 800, shown in accordance with an exemplary embodiment. As shown in fig. 6, the electronic signature generating apparatus 800 may include: a processor 801, a memory 802. The electronic signature generation device 800 may also include one or more of a multimedia component 803, an I/O interface 804, and a communication component 805.
The processor 801 is configured to control overall operation of the electronic signature generating apparatus 800 to complete all or part of the steps in the electronic signature generating method described above. The memory 802 is used to store various types of data to support the operation of the device 800 for generating the electronic signature, which may include, for example, instructions for any application or method operating on the device 800 for generating the electronic signature, as well as application related data, such as contact data, messages, pictures, audio, video, and the like. The Memory 802 may be implemented by any type or combination of volatile or non-volatile Memory devices, such as static random access Memory (Static Random Access Memory, SRAM for short), electrically erasable programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM for short), erasable programmable Read-Only Memory (Erasable Programmable Read-Only Memory, EPROM for short), programmable Read-Only Memory (Programmable Read-Only Memory, PROM for short), read-Only Memory (ROM for short), magnetic Memory, flash Memory, magnetic disk, or optical disk. The multimedia component 803 may include a screen and an audio component. Wherein the screen may be, for example, a touch screen, the audio component being for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may be further stored in the memory 802 or transmitted through the communication component 805. The audio assembly further comprises at least one speaker for outputting audio signals. The I/O interface 804 provides an interface between the processor 801 and other interface modules, which may be a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 805 is configured to perform wired or wireless communication between the electronic signature generating device 800 and other devices. Wireless communication, such as Wi-Fi, bluetooth, near field communication (Near FieldCommunication, NFC for short), 2G, 3G or 4G, or a combination of one or more thereof, the respective communication component 805 may thus comprise: wi-Fi module, bluetooth module, NFC module.
In an exemplary embodiment, the electronic signature generating apparatus 800 may be implemented by one or more application specific integrated circuits (Application Specific Integrated Circuit, abbreviated as ASIC), digital signal processor (DigitalSignal Processor, abbreviated as DSP), digital signal processing apparatus (Digital Signal Processing Device, abbreviated as DSPD), programmable logic device (Programmable Logic Device, abbreviated as PLD), field programmable gate array (Field Programmable Gate Array, abbreviated as FPGA), controller, microcontroller, microprocessor, or other electronic component for performing the above-described electronic signature generating method.
In another exemplary embodiment, a computer readable storage medium is also provided, comprising program instructions which, when executed by a processor, implement the steps of the method of generating an electronic signature described above. For example, the computer readable storage medium may be the memory 802 including program instructions described above, which are executable by the processor 801 of the electronic signature generation apparatus 800 to perform the electronic signature generation method described above.
Example 4:
corresponding to the above method embodiment, there is further provided a readable storage medium in this embodiment, and a readable storage medium described below and a method for generating an electronic signature described above may be referred to correspondingly.
A readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method for generating an electronic signature of the above method embodiment.
The readable storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, and the like.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (6)

1. A method for generating an electronic signature, comprising:
acquiring a signature sample and a target document of a target user;
comparing the signature sample with a pre-stored target sample to obtain target similarity;
when the target similarity is larger than a first set threshold, calculating the completeness of the target document;
when the integrity of the target document is greater than a second set threshold, determining an initial template based on keywords in the target document;
determining a target anti-counterfeiting code based on the initial template;
correspondingly generating a target signature based on the signature sample, the target anti-counterfeiting code and the initial template;
comparing the signature sample with a pre-stored target sample to obtain target similarity, wherein the method comprises the following steps:
dividing the signature sample into a plurality of first stroke units based on a starting point of the target user when writing the signature sample;
calculating the difference value between the number of the first stroke units and the number of strokes corresponding to the target sample to obtain a target difference value;
when the target difference value is smaller than a third set threshold value, calculating local similarity of each stroke unit in the plurality of first stroke units and the same stroke unit corresponding to the target sample respectively to obtain a plurality of local similarity;
summing up and calculating a plurality of local similarity to obtain the target similarity;
wherein obtaining a plurality of local similarities comprises:
dividing a plurality of first stroke units into a plurality of second stroke units based on slope characteristics, wherein the slope characteristics are used for splitting strokes with different slopes in the first stroke units;
randomly selecting a preset number of target stroke units from the plurality of second stroke units, and respectively calculating a plurality of first length ratio results among the plurality of target stroke units;
determining corresponding stroke units in the target sample, and correspondingly calculating a plurality of second length ratio results;
performing difference calculation on the first length ratio result and the corresponding second length ratio result, and performing summation calculation on the difference result to obtain a difference result;
when the difference result is smaller than a fourth set threshold value, acquiring the writing time of the target user when writing the signature sample, and correspondingly determining the writing time corresponding to each second stroke unit;
randomly determining a plurality of test points on all the second stroke units, and calculating the average writing speed and writing acceleration of all the test points;
calculating a first distance between each test point on the plurality of second stroke units and a corresponding test point in the target sample based on a dynamic time warping algorithm, wherein the average writing speed of each test point is equal to the first distance;
calculating a second distance between each test point on the plurality of second stroke units and a corresponding test point in the target sample based on a dynamic time warping algorithm, wherein the second distance is between the respective writing acceleration;
determining a local distance of the corresponding second stroke unit based on the first distance and the second distance;
and determining the local similarity of the second stroke unit based on the local distance.
2. The method of generating an electronic signature as recited in claim 1, wherein determining a target security code based on the initial template comprises:
dividing the initial template based on a preset width to obtain a plurality of dividing units;
processing the plurality of dividing units based on the asymmetric encryption model to obtain a plurality of corresponding first units;
processing the plurality of divided units based on the Reed Solomon model to obtain a plurality of corresponding second units;
combining the first unit with the corresponding second unit to obtain a data unit;
and converting the data unit into the target anti-counterfeiting code based on an encoder.
3. An electronic signature generating apparatus, comprising:
the first acquisition unit is used for acquiring a signature sample of a target user and a target document;
the first comparison unit is used for comparing the signature sample with a pre-stored target sample to obtain target similarity;
the first calculation unit is used for calculating the completeness of the target document when the target similarity is larger than a first set threshold value;
the first determining unit is used for determining an initial template based on keywords in the target document when the integrity of the target document is larger than a second set threshold;
the second determining unit is used for determining a target anti-counterfeiting code based on the initial template;
the generating unit is used for correspondingly generating a target signature based on the signature sample, the target anti-counterfeiting code and the initial template;
the first comparing unit includes:
a first dividing unit for dividing the signature sample into a plurality of first stroke units based on a start point of the target user when writing the signature sample;
the second calculation unit is used for calculating the difference value between the number of the first stroke units and the number of strokes corresponding to the target sample to obtain a target difference value;
the third calculation unit is used for respectively calculating the local similarity of each stroke unit in the plurality of first stroke units and the same stroke unit corresponding to the target sample when the target difference value is smaller than a third set threshold value, so as to obtain a plurality of local similarities;
the fourth calculation unit is used for carrying out summation calculation on the plurality of local similarities to obtain the target similarity;
the third computing unit includes:
the third dividing unit is used for dividing the plurality of first stroke units into a plurality of second stroke units based on slope characteristics, and the slope characteristics are used for dividing strokes with different slopes in the first stroke units;
a fifth calculation unit, configured to randomly select a preset number of target stroke units from the plurality of second stroke units, and calculate a plurality of first length ratio results between the plurality of target stroke units respectively;
the third determining unit is used for determining corresponding stroke units in the target sample and correspondingly calculating a plurality of second length ratio results;
a sixth calculation unit, configured to perform a difference calculation on the first length ratio result and the second length ratio result that corresponds to the first length ratio result, and perform a summation calculation on the difference result to obtain a difference result;
the second obtaining unit is used for obtaining the writing time of the target user when writing the signature sample when the difference result is smaller than a fourth set threshold value, and correspondingly determining the writing time corresponding to each second stroke unit;
a seventh calculation unit, configured to randomly determine a plurality of test points on all the second stroke units, and calculate an average writing speed and writing acceleration of all the test points;
an eighth calculation unit, configured to calculate, based on a dynamic time warping algorithm, a first distance between each test point on the plurality of second stroke units and a corresponding test point in the target sample, where the average writing speed of each test point is equal to the average writing speed of each test point;
a ninth calculation unit, configured to calculate, based on a dynamic time warping algorithm, a second distance between each test point on the plurality of second stroke units and a corresponding test point in the target sample, where each test point is a writing acceleration;
a fourth determining unit, configured to determine a local distance of the corresponding second stroke unit based on the first distance and the second distance;
and a fifth determining unit, configured to determine a local similarity of the second stroke unit based on the local distance.
4. The apparatus according to claim 3, wherein the second determination unit includes:
the second dividing unit is used for dividing the initial template based on a preset width to obtain a plurality of dividing units;
the first processing unit is used for processing the plurality of dividing units based on the asymmetric encryption model to obtain a plurality of corresponding first units;
the second processing unit is used for processing the plurality of dividing units based on the Reed Solomon model to obtain a plurality of corresponding second units;
a combining unit, configured to combine the first unit with the corresponding second unit to obtain a data unit;
and the conversion unit is used for converting the data unit into the target anti-counterfeiting code based on an encoder.
5. An electronic signature generating apparatus, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the method of generating an electronic signature according to any one of claims 1 to 2 when executing said computer program.
6. A readable storage medium, characterized in that the readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the method of generating an electronic signature according to any of claims 1 to 2.
CN202311462341.6A 2023-11-06 2023-11-06 Electronic signature generation method, device, equipment and readable storage medium Active CN117197782B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311462341.6A CN117197782B (en) 2023-11-06 2023-11-06 Electronic signature generation method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311462341.6A CN117197782B (en) 2023-11-06 2023-11-06 Electronic signature generation method, device, equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN117197782A CN117197782A (en) 2023-12-08
CN117197782B true CN117197782B (en) 2024-01-12

Family

ID=88992770

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311462341.6A Active CN117197782B (en) 2023-11-06 2023-11-06 Electronic signature generation method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN117197782B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11143969A (en) * 1997-11-07 1999-05-28 Ffc:Kk Authentication device for electronic seal impression
CN107133312A (en) * 2017-05-02 2017-09-05 深圳乐信软件技术有限公司 A kind of electronic signature method and device
CN109726571A (en) * 2018-12-25 2019-05-07 航天信息股份有限公司 Electronic signature method, device, storage medium and the electronic equipment of document
CN111859431A (en) * 2020-07-24 2020-10-30 招商局通商融资租赁有限公司 Electronic file signature method and device, electronic equipment and storage medium
CN112214739A (en) * 2020-09-09 2021-01-12 东莞市惠峰商业有限公司 Method and device for realizing electronic signature
CN112464181A (en) * 2020-12-10 2021-03-09 国机工业互联网研究院(河南)有限公司 Method and system for preventing counterfeiting of electronic signature printed paper document
CN114676451A (en) * 2020-12-24 2022-06-28 航天信息股份有限公司 Electronic document signature method and device, storage medium and electronic equipment
CN115131002A (en) * 2022-07-22 2022-09-30 邓兴尧 Method for signing electronic data and managing electronic files
CN116052199A (en) * 2022-12-07 2023-05-02 国网河南省电力公司 AI-based engineering construction archive file electronization method and device
CN116452376A (en) * 2023-04-14 2023-07-18 武汉大数据产业发展有限公司 Electronic document, and corresponding electronic signature generation method, device and equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101311950B (en) * 2007-05-25 2012-01-18 北京书生国际信息技术有限公司 Electronic stamp realization method and device
CN111539001B (en) * 2020-04-17 2022-06-28 福建福昕软件开发股份有限公司 Method and system for simplifying PDF document electronic signature based on enterprise user

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11143969A (en) * 1997-11-07 1999-05-28 Ffc:Kk Authentication device for electronic seal impression
CN107133312A (en) * 2017-05-02 2017-09-05 深圳乐信软件技术有限公司 A kind of electronic signature method and device
CN109726571A (en) * 2018-12-25 2019-05-07 航天信息股份有限公司 Electronic signature method, device, storage medium and the electronic equipment of document
CN111859431A (en) * 2020-07-24 2020-10-30 招商局通商融资租赁有限公司 Electronic file signature method and device, electronic equipment and storage medium
CN112214739A (en) * 2020-09-09 2021-01-12 东莞市惠峰商业有限公司 Method and device for realizing electronic signature
CN112464181A (en) * 2020-12-10 2021-03-09 国机工业互联网研究院(河南)有限公司 Method and system for preventing counterfeiting of electronic signature printed paper document
CN114676451A (en) * 2020-12-24 2022-06-28 航天信息股份有限公司 Electronic document signature method and device, storage medium and electronic equipment
CN115131002A (en) * 2022-07-22 2022-09-30 邓兴尧 Method for signing electronic data and managing electronic files
CN116052199A (en) * 2022-12-07 2023-05-02 国网河南省电力公司 AI-based engineering construction archive file electronization method and device
CN116452376A (en) * 2023-04-14 2023-07-18 武汉大数据产业发展有限公司 Electronic document, and corresponding electronic signature generation method, device and equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于 LIMS 系统电子签章应用的探讨;胡楠 等;药事管理;第39卷(第2期);第121-124页 *
基于身份的电子签章系统设计研究;刘宏伟;;计算机工程与设计(07);第1735-1738页 *

Also Published As

Publication number Publication date
CN117197782A (en) 2023-12-08

Similar Documents

Publication Publication Date Title
CN102067150B (en) Method and system for graphical passcode security
US10706627B2 (en) Method of controlling a device for generating an augmented reality environment
US11194368B2 (en) Accelerometer-based biometric data
CN110222671A (en) The method and system that point reading based on dot matrix is write
CN113723347B (en) Information extraction method and device, electronic equipment and storage medium
CN104318196B (en) Project quality examining report two-dimension code anti-fake verifying method
US8522138B2 (en) Content analysis apparatus and method
EP3455766A1 (en) Authenticating a user
EP2590391B1 (en) Method and apparatus for controlling playback speed of animation message in mobile terminal
CN105516296A (en) Configuration method and device of group identification image
CN110703977A (en) H5 webpage input keyboard implementation method, device, equipment and storage medium
JP2012038286A5 (en)
CN112686015A (en) Chart generation method, device, equipment and storage medium
JP2008505388A (en) Data processing in electronic pens
CN117197782B (en) Electronic signature generation method, device, equipment and readable storage medium
JP7450868B2 (en) Gesture stroke recognition in touch-based user interface input
CN108964915A (en) A kind of printed matter non-intrusive interaction method based on two dimensional code auxiliary
US20190208077A1 (en) Pixelation density increment for embedding information
CN115270711A (en) Electronic signature method, electronic signature device, electronic apparatus, and storage medium
CN110942068B (en) Information processing apparatus, storage medium, and information processing method
CN108985799B (en) Product fidelity method based on random trace characteristics
CN111062046A (en) Handwritten endorsement data security management method and endorsement terminal
US20150139548A1 (en) Methods and systems for recognizing handwriting in handwritten documents
KR102300439B1 (en) Font verification server to verify whether the font applied to a document is authorized and operating method thereof
CN110532308B (en) Cultural relic substance identification method and device and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant