Summary of the invention
This specification embodiment provides and a kind of signature recording method, verification method, device and storage medium.
In a first aspect, this specification embodiment provides a kind of signature recording method, comprising:
Whether detection signature apparatus executes signature movement, and the signature movement is that target user uses the signature apparatus label
The movement executed when name;
When the signature apparatus executes signature movement, the signature character of the signature is obtained;
The signature character is sent in the destination node of block chain, so that the signature character is saved to the target
In node, to call the signature character in the destination node when verifying to the signature.
Second aspect, this specification embodiment provide a kind of signature verification method, comprising:
Signature character to be verified is obtained in the destination node in block chain;
Obtain the Target Signature of the corresponding target user of the signature character to be verified;
According to the signature character to be verified and the Target Signature, the corresponding label of the signature character to be verified are determined
Name whether be the target user signature.
The third aspect, this specification embodiment provide a kind of signature recording device, comprising:
Detection module, for detecting whether signature apparatus executes signature movement, the signature movement is that target user uses
The movement that the signature apparatus executes when signing;
Signature character obtains module, for obtaining the signature of the signature when the signature apparatus executes signature movement
Feature;
Communication module, for the signature character to be sent in the destination node of block chain, so that the signature character
It saves into the destination node, to call the signature in the destination node when verifying to the signature
Feature.
Fourth aspect, this specification embodiment provide a kind of signature verification device, comprising:
First obtains module, for obtaining signature character to be verified in the destination node in block chain;
Second obtains module, for obtaining the Target Signature of the corresponding target user of the signature character to be verified;
Authentication module, for determining the signed certificate to be tested according to the signature character to be verified and the Target Signature
Name feature it is corresponding signature whether be the target user signature.
5th aspect, this specification embodiment provide a kind of signature apparatus, comprising:
Controller, signature character collector and transceiver, the signature character collector and transceiver difference
It is connected with the controller;
The controller is executed for detecting whether the signature apparatus executes signature movement, and in the signature apparatus
When signature acts, the signature character collector starting is controlled;
The signature character collector is used to acquire signature character of the signature apparatus when executing signature movement,
And the signature character is sent to the controller;
The controller is also used to the collected signature character of the signature character collector being sent to the receipts
Send out device;
The transceiver is used for when receiving the signature character, and the signature character is sent to the target of block chain
In node.
6th aspect, this specification embodiment provide a kind of signature verification device, including memory, processor and are stored in
On memory and the computer program that can run on a processor, the processor execute the step of above-mentioned second aspect the method
Suddenly.
7th aspect, this specification embodiment provide a kind of computer readable storage medium, are stored thereon with computer journey
Sequence, when which is executed by processor the step of realization any of the above-described the method.
This specification embodiment has the beneficial effect that:
In the signature recording method that this specification embodiment provides, detecting signature apparatus in execution signature movement
When, obtain the signature character of signature, and signature character is sent in the destination node of block chain, by signature character save to
In destination node, when subsequent needs verify signature, signature character can be called directly in destination node to carry out
Verifying.Scheme in this specification embodiment is carried out above-mentioned steps during each signature, i.e., to sign every time into
Row detection, the signature character signed every time is saved into the destination node of block chain, by being recorded to each signature,
It realizes to provide for subsequent signature verification and believable deposits card.
Specific embodiment
In order to better understand the above technical scheme, below by attached drawing and specific embodiment to this specification embodiment
Technical solution be described in detail, it should be understood that the specific features in this specification embodiment and embodiment are to this explanation
The detailed description of book embodiment technical solution, rather than the restriction to this specification technical solution, in the absence of conflict,
Technical characteristic in this specification embodiment and embodiment can be combined with each other.
In a first aspect, this specification embodiment provides a kind of signature recording method, as shown in Figure 1, implementing for this specification
The flow chart for the signature recording method that example provides, method includes the following steps:
Step S11: whether detection signature apparatus executes signature movement, and the signature movement is that target user uses the label
The movement executed when name device signature;
In this specification embodiment, signature apparatus be can be for the pen signed or other signature devices.Implement at one
In example, which can be the pen of special record signature, can be set in the signature apparatus processor, controller,
The components such as sensor, for detecting and recording the signature of user.In another embodiment, signature apparatus can be by common pen
And the external device composition on pen is set, processor, the controller, biography of detection and record signature are provided in external device
The components such as sensor.
Target user can be any user to sign using signature apparatus, when target user holds signature apparatus
When, signature movement can be can be carried out, it is also possible to not carry out signature movement, such as rock signature apparatus and do not write.This explanation
In book embodiment, in order to effectively record signature character, is acted when signature apparatus executes signature, carries out writing activity Shi Caijin
Row signature record, when signature apparatus is not carried out signature movement, without record.
The mode whether detection signature apparatus executes signature movement can be selected according to actual needs, in a reality
It applies in example, the identification that can be taken pictures by camera works as camera for example, user is signed on paper material using signature apparatus
There are person's handwritings then to show that signature apparatus is executing signature movement in the photo of shooting.
Step S12: when the signature apparatus executes signature movement, the signature character of the signature is obtained;
In this specification embodiment, signature character may include handwriting signature feature, sequential write feature of stroke etc..Root
Different according to the type of signature character, the mode for obtaining signature character is also different.For example, when signature character is handwriting signature feature
When, handwriting signature feature can be obtained by acceleration transducer, laser etc..When the sequential write that signature character is stroke is special
When sign, the sequential write feature of stroke can be recorded by camera.It is, of course, also possible to sign by other means
The acquisition of feature, here without limitation.
Step S13: the signature character being sent in the destination node of block chain so that the signature character save to
In the destination node, to call the signature character in the destination node when verifying to the signature.
In this specification embodiment, the destination node of block chain can be selected according to actual needs, for example, target section
Point can be any node in block chain, and destination node can also be the node or target section nearest apart from signature apparatus
Point is a certain node pre-set.
In one embodiment, communication module can be set in signature apparatus, can have been carried out with the node in block chain
Signature character, after obtaining signature character, is sent at destination node, by the signature by communication connection by communication module
Feature is stored in destination node.
It should be understood that can carry out above-mentioned steps when user signs every time, to obtain the label signed every time
Name feature and send signature character at destination node saves, in this way, if subsequent need to test certain signature
When card, the signature character verified required for being directly read at destination node, and carry out signature verification.Therefore, this explanation
Scheme in book embodiment can save each signature character of user, even sign in paper material,
Signature can be saved according to signature character, provide can be used for the validity that verifying is signed and deposit card.
Optionally, write detection sensor is provided in the signature apparatus, whether the detection signature apparatus executes label
Name movement, comprising: control the write detection sensor and detect whether the signature apparatus is in writing state, wherein work as institute
When stating signature apparatus and being in the writing state, determine that the signature apparatus executes the signature movement.
Write detection sensor can be set in this specification embodiment, in signature apparatus, for determining that user is current
Whether activity of writing is carried out.Write detection sensor can be configured according to actual needs.In one embodiment, inspection is write
Surveying sensor can be the sensor of detection pen tip ball rotation, when user writes on paper, on the pen tip that contacts with paper
Ball can rotate, if detecting that ball rotates, show to be carrying out signature movement, if not detecting that ball rotates,
Show to be not carried out signature movement.In another embodiment, write detection sensor can be camera, and camera can be by
It takes pictures according to a preset frequency, when having ink marks on paper as the result is shown of taking pictures, shows to be carrying out signature movement.
Optionally, it is provided with person's handwriting identification sensor in the signature apparatus, the signature character for obtaining the signature,
Include: the control person's handwriting identification sensor obtain stroke presentation direction feature corresponding with the signature and stroke writing away from
From feature.
This illustrates in embodiment, and person's handwriting identification sensor can be acceleration transducer, gyroscope or other sensors, this
In without limitation.In one embodiment, person's handwriting identification sensor is acceleration transducer, when signature apparatus signature, is accelerated
Spend the stroke presentation direction in available tri- directions X, Y, Z of sensor and the Writing distance in each direction.In another reality
Apply in example, person's handwriting identification sensor can be acceleration transducer, gyroscope and camera, by acceleration transducer and
Gyroscope obtains the presentation direction and Writing distance of stroke, the sequential write of stroke is recorded by camera, by writing side
To, Writing distance and sequential write as signature character.
Optionally, before in the destination node that the signature character is sent to block chain, the method is also wrapped
It includes: obtaining signing messages corresponding with the signature, the signing messages includes that signature time and/or the corresponding signature of signature are closed
Same information;In the destination node that the signature character is sent to block chain, comprising: by the signing messages and described
Signature character is sent in the destination node.
In this specification embodiment, in order to which each signature to be marked, signing messages can be obtained in signature, passed through
Signing messages distinguishes the signature character obtained every time.In one embodiment, when signing messages may include signature
Between and/or signature belonging to contract information, contract information may include the title of contract, contract signature two-sided information, contract
Sign the information such as place.Certainly, signing messages can also be other information, here without limitation.The signature that will be signed every time
Information is mapped with signature character and is stored, can be according to signing messages in destination node in subsequent authentication signature
Read corresponding signature character.
Optionally, after the signature character for obtaining the signature, the method also includes: in a manner of predetermined encryption pair
The signature character is encrypted, and encrypted signature character is obtained;The mesh that the signature character is sent to block chain
It marks in node, comprising: the encrypted signature character is sent in the destination node.
It is not tampered in order to ensure being sent to the signature character of destination node, it, can be to signature in this specification embodiment
Feature is encrypted.Predetermined encryption mode can be set according to actual needs, such as predetermined encryption mode is asymmetric secret
Key is encrypted, hash algorithm encrypts or other cipher modes.Encrypted signature character is saved to destination node.When subsequent
When needing to verify signature, corresponding ciphering signature feature is obtained at destination node, using corresponding with cipher mode
Manner of decryption after ciphering signature feature is decrypted, obtains signature character.In one embodiment, target user can adopt
Signature character is encrypted with the private key of oneself, encrypted signature character is uploaded to destination node, when verifying signature,
Encrypted signature character is decrypted by public key corresponding with private key, to obtain signature character.
Second aspect, this specification embodiment provide a kind of signature verification method, as shown in Fig. 2, implementing for this specification
The flow chart for the signature verification method that example provides, method includes the following steps:
Step S21: signature character to be verified is obtained in the destination node in block chain;
Step S22: the Target Signature of the corresponding target user of the signature character to be verified is obtained;
Step S23: according to the signature character to be verified and the Target Signature, the signature character to be verified is determined
It is corresponding signature whether be the target user signature.
In the step s 21, it when needing to verify certain signature, can directly be read at the destination node of block chain
Take signature character corresponding with signature, i.e., signature character to be verified.In one embodiment, due to that may be saved in destination node
There is a large amount of signature character, therefore signature character to be verified can be obtained at destination node according to the signing messages of signature, e.g.,
It is determined in the signature character saved in destination node according to the signature temporal information of signature or information of signing a contract to be verified
Signature character.In one embodiment, signature character is also recorded while storing signature character and is signed time, contract title
Corresponding relationship, for example, the signature character A corresponding signature time is 9 points of the morning of January 1 in 2018, the corresponding conjunction of signature character A
With entitled ABC, when obtaining signature character, it can uniquely determine that a signature is special according to signature time and contract title
Sign.
In step S22, Target Signature can be target user and be write again using signature apparatus described in first aspect
What signature obtained, target user can also be made to write what signature obtained again using common pen, can also be that target user makes
It is used to verify the Standard signatures used with what signature apparatus pre-saved, obtains Target Signature by reading Standard signatures, this
In without limitation.
It should be understood that the verifying in step S23, for various forms of Target Signatures, to signature character to be verified
Mode is also different, below by taking two kinds of implementations as an example, is illustrated to treat the verification process of signature character.
The first implementation: the signature character to be verified is subjected to signature reduction, the signed certificate to be tested after being restored
Name;According between the signature to be verified and the Target Signature similarity and default similarity threshold, determine it is described to
Verifying signature whether be the target user signature, wherein it is described it is to be verified signature the Target Signature between phase
When being greater than the default similarity threshold like degree, determine that the signature to be verified is the signature of the target user.
In the first implementation, Target Signature can be signature that target user write using conventional pen,
It can be the signature write using signature apparatus.In one embodiment, when needing the signature to A contract to verify
When, the signature character to be verified that target user uploads when signing A contract is obtained first in destination node, for example, to be verified
When signature character is stroke presentation direction feature and stroke Writing distance feature, it can be restored according to these features and be signed at that time
Signature when administration's contract.Then conventional pen can be used in target user or signature apparatus writes once signed again, twice to this
Signature carries out similarity-rough set, if the similarity signed twice is greater than default similarity threshold, it is determined that signature to be verified is
The signature of this person writing of target user.It should be understood that default similarity threshold can be set according to actual needs, such as
90%, 95% etc., here without limitation.
Second of implementation: writing the Target Signature by signature apparatus and obtains the corresponding mesh of the Target Signature
Tag name feature;According to the signature character to be verified and the Target Signature feature, the signature character pair to be verified is determined
Answer signature whether be the target user signature.
In the second implementation, Target Signature is write by signature apparatus, is using signature apparatus book
When writing Target Signature, it is special the corresponding Target Signature of Target Signature can be obtained by the signature recording method that first aspect provides
Sign.In one embodiment, when needing to target user when the contractual signature of B is verified, first on the target node
The signature character to be verified that target user uploads when signing B contract is read, e.g., signature character to be verified is stroke presentation direction
Feature and stroke Writing distance feature.Then target user writes signature using signature apparatus again, obtains Target Signature spy
Sign writes stroke presentation direction feature and stroke Writing distance feature that signature obtains again.By Target Signature feature with
Signature character to be verified is compared, for example, by the stroke writing side of stroke presentation direction feature and Target Signature to be verified
Be compared to feature, if the error of the two meets preset deflection error range, further by writing to be verified away from
It is compared from feature with the stroke Writing distance feature of Target Signature, if the error of the two meets preset range error model
It encloses, it is determined that signature character to be verified is the signature of this person writing of target user.If direction character error is unsatisfactory for preset
Deflection error range and/or distance feature error are unsatisfactory for preset range error range, it is determined that signature character to be verified is not
It is the signature of this person writing of target user.
In addition, in addition to above two verification mode, other verification modes can also be used, for example, target user can be with
The signature of one standard or the signature character of standard are set, the signature character of the signature of standard or standard is stored in block chain
In a certain node, when needing the signature character primary to certain to verify, the signature of standard or the signature of standard are called directly
Feature is compared with signature character to be verified, is verified result.
It should be understood that, when being verified to signature character, being needed when signature character is encrypted signature character
According to the cipher mode of signature character, obtain corresponding manner of decryption and encrypted signature character be decrypted, with obtain to
The signature character of verifying.
The third aspect, this specification embodiment provides a kind of signature recording device, referring to FIG. 3, including:
Detection module 31, for detecting whether signature apparatus executes signature movement, the signature movement makes for target user
The movement executed when being signed with the signature apparatus;
Signature character obtains module 32, for obtaining the label of the signature when the signature apparatus executes signature movement
Name feature;
Communication module 33, for the signature character to be sent in the destination node of block chain, so that the signature is special
Sign is saved into the destination node, to call the label in the destination node when verifying to the signature
Name feature.
In a kind of optional implementation, write detection sensor is provided in the signature apparatus, detection module 31 wraps
It includes:
First control module detects whether the signature apparatus is in writing shape for controlling the write detection sensor
State, wherein when the signature apparatus is in the writing state, determine that the signature apparatus executes the signature movement.
In a kind of optional implementation, person's handwriting identification sensor is provided in the signature apparatus, signature character obtains
Module 32 includes:
Second control module obtains stroke writing side corresponding with the signature for controlling the person's handwriting identification sensor
To feature and stroke Writing distance feature.
In a kind of optional implementation, the signature recording device further include: signing messages obtains module, for obtaining
Signing messages corresponding with the signature, the signing messages include signature time and/or the corresponding information of signing a contract of signature;
Communication module 33 is used for: the signing messages and the signature character are sent in the destination node.
In a kind of optional implementation, the signature recording device further include: encrypting module, for predetermined encryption side
Formula encrypts the signature character, obtains encrypted signature character;
Communication module 33 is used for: the encrypted signature character is sent in the destination node.
About above-mentioned apparatus, wherein the concrete function of modules is in signature record side provided in an embodiment of the present invention
It is described in detail in the embodiment of method, no detailed explanation will be given here.
Fourth aspect, this specification embodiment provides a kind of signature verification device, referring to FIG. 4, including:
First obtains module 41, for obtaining signature character to be verified in the destination node in block chain;
Second obtains module 42, for obtaining the Target Signature of the corresponding target user of the signature character to be verified;
Authentication module 43, for determining described to be verified according to the signature character to be verified and the Target Signature
Signature character it is corresponding signature whether be the target user signature.
In a kind of optional implementation, authentication module 43 is used for:
The signature character to be verified is subjected to signature reduction, the signature to be verified after being restored;
According to the similarity to be verified signed between the Target Signature and default similarity threshold, determine
It is described it is to be verified signature whether be the target user signature, wherein it is described it is to be verified signature and the Target Signature it
Between similarity be greater than the default similarity threshold when, determine it is described it is to be verified signature be the target user signature.
In a kind of optional implementation, the second acquisition module 42 is used for: writing the Target Signature by signature apparatus
And obtain the corresponding Target Signature feature of the Target Signature;
Authentication module 43 is used for: according to the signature character to be verified and the Target Signature feature, being determined described to be tested
Card signature character it is corresponding signature whether be the target user signature.
About above-mentioned apparatus, wherein the concrete function of modules is in signature verification side provided in an embodiment of the present invention
It is described in detail in the embodiment of method, no detailed explanation will be given here.
5th aspect, this specification embodiment provides a kind of signature apparatus 50, referring to FIG. 5, including:
Controller 51, signature character collector 52 and transceiver 53, signature character collector 52 and transceiver 53 divide
It is not connected with controller 51;
Controller 51 is used to detect whether signature apparatus 50 to execute signature movement, and executes signature in the signature apparatus
When movement, the signature character collector starting is controlled;
Signature character collector 52 is used to acquire signature character of the signature apparatus 50 when executing signature movement, and will
The signature character is sent to controller 51;
Controller 51 is also used to the collected signature character of the signature character collector being sent to the transmitting-receiving
Device;
Transceiver 53 is used for when receiving the signature character, and the signature character is sent to the target section of block chain
Point in.
In this specification embodiment, controller 51 can be made of write detection sensor and processor, wherein write inspection
Surveying sensor can detecte the state of signature apparatus, and the state of signature apparatus may include writing state and non-writing state.
Processor can judge whether signature apparatus 50 executes signature movement according to the state of signature apparatus.In one embodiment,
Write detection sensor is the sensor for detecting the pearl rotation of signature apparatus, determines signature apparatus when detecting that a pearl rotates
50 are in writing state, determine that signature apparatus 50 is in non-writing state when a pearl is not detected and rotates.Processor is when reception
To write detection sensor send writing state when, determine signature apparatus 50 execute signature movement.In this specification embodiment,
When processor determines that signature apparatus 50 executes signature movement, control signature character collector 52 starts.
Signature character collector 52 can be person's handwriting identification sensor, for acquiring when user is signed using signature apparatus
Stroke presentation direction feature and stroke Writing distance feature.Person's handwriting identification sensor can with acceleration transducer, gyroscope, take the photograph
As first-class device, here without limitation.
Signature character collector 52 is sent to controller 51, controller 51 after collecting signature character, by signature character
Signature character is sent to transceiver 53, transceiver 53 can be communicated to connect with the node on block chain, be received in transceiver 53
When to signature character, signature character is sent to the destination node on block chain.Destination node can be any on block chain
Node is also possible to the node nearest apart from signature apparatus.
In addition, signature apparatus 50 is also provided with encryption device 54, and for being encrypted to signature character, cipher mode
It can be set according to actual needs, such as the encryption of asymmetric-key encryption mode, hash algorithm.Transceiver 53 can will add
Signature character after close is sent to destination node and is saved.
6th aspect, is based on inventive concept same as signature verification method in previous embodiment, the present invention also provides one
Kind signature verification device, as shown in fig. 6, including memory 604, processor 602 and being stored on memory 604 and can handle
The computer program run on device 602, the processor 602 realize previously described signature verification method when executing described program
Either method the step of.
Wherein, in Fig. 6, bus architecture (is represented) with bus 600, and bus 600 may include any number of interconnection
Bus and bridge, bus 600 will include the one or more processors represented by processor 602 and what memory 604 represented deposits
The various circuits of reservoir link together.Bus 600 can also will peripheral equipment, voltage-stablizer and management circuit etc. it
Various other circuits of class link together, and these are all it is known in the art, therefore, no longer carry out further to it herein
Description.Bus interface 606 provides interface between bus 600 and receiver 601 and transmitter 603.Receiver 601 and transmitter
603 can be the same element, i.e. transceiver, provide the unit for communicating over a transmission medium with various other devices.Place
It manages device 602 and is responsible for management bus 600 and common processing, and memory 604 can be used for storage processor 602 and execute behaviour
Used data when making.
7th aspect, based on in previous embodiment based on signature recording method and signature verification method invention structure
Think, the present invention also provides a kind of computer readable storage mediums, are stored thereon with computer program, which is executed by processor
Shi Shixian it is described previously based on signature either recording method or signature verification method method the step of.
This specification is referring to the method, equipment (system) and computer program product according to this specification embodiment
Flowchart and/or the block diagram describes.It should be understood that can be realized by computer program instructions every in flowchart and/or the block diagram
The combination of process and/or box in one process and/or box and flowchart and/or the block diagram.It can provide these computers
Processor of the program instruction to general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices
To generate a machine, so that generating use by the instruction that computer or the processor of other programmable data processing devices execute
In setting for the function that realization is specified in one or more flows of the flowchart and/or one or more blocks of the block diagram
It is standby.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of equipment, the commander equipment realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
Although preferred embodiments of the present invention have been described, it is created once a person skilled in the art knows basic
Property concept, then additional changes and modifications may be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted as
It selects embodiment and falls into all change and modification of the scope of the invention.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art
Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to include these modifications and variations.