Online signature authentication method and device, computer equipment, computer readable storage medium and computer program product
By extracting and enhancing the signature image and timing information of the online signature, enhancing dynamic features are generated, and the problem of low accuracy of online signature authentication in the prior art is solved, and higher authentication accuracy is achieved.
Patent Information
- Application Number
- CN202411031058.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-07-30
AI Technical Summary
In the existing online signature authentication method, authentication based on global representation learning weakens timing details, while authentication based on local representation learning ignores global structural information, resulting in low authentication accuracy.
Through the pre-trained signature authentication model, the signed image of the online signature is extracted static feature, the global structure information is obtained, and the timing information is dynamic feature extraction is performed. The dynamic feature is enhanced by combining static features to generate enhanced dynamic features for signature Certification.
It improves the accuracy of online signature authentication, considers both the global structural information of the signature and the timing details, and enhances the accuracy of authentication.
Smart Images

Figure CN119131911A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to an online signature authentication method, apparatus, computer device, computer-readable storage medium and computer program product. Background Art
[0002] Signature authentication is the process of comparing a signature purporting to be from a certain user with the user's real template signature to determine its authenticity.
[0003] In the related art, online signature authentication can usually be divided into authentication based on global representation learning and authentication based on local representation learning. However, authentication based on global representation learning weakens the timing details of online signatures, and authentication based on local representation learning ignores the global structural information that is particularly critical to signature authentication. Therefore, both authentication based on global representation learning and authentication based on local representation learning result in low authentication accuracy of online signatures. Summary of the invention
[0004] Based on this, it is necessary to provide an online signature authentication method, apparatus, computer device, computer-readable storage medium and computer program product that can improve the online signature authentication accuracy in order to address the technical problem of the low authentication accuracy of the online signature.
[0005] In a first aspect, the present application provides an online signature authentication method, comprising:
[0006] Based on the signature sequence of the online signature to be authenticated, a signature image of the online signature and timing information of the online signature are obtained; the timing information is used to characterize the timing characteristics of the writing trajectory of the online signature;
[0007] Performing static feature extraction processing on the signature image through a pre-trained signature authentication model to obtain static features of the online signature, and performing dynamic feature extraction processing on the time series information to obtain dynamic features of the online signature;
[0008] According to the signature authentication model and the static feature, the dynamic feature is enhanced to obtain the enhanced dynamic feature of the online signature;
[0009] According to the signature authentication model and the enhanced dynamic features of the online signature, a signature distance between the online signature and a template signature of a target user corresponding to the online signature is determined, and signature authentication is performed on the online signature based on the signature distance.
[0010] In one of the embodiments, the dynamic feature includes a plurality of dynamic feature elements;
[0011] The step of enhancing the dynamic feature according to the signature authentication model and the static feature to obtain the enhanced dynamic feature of the online signature includes:
[0012] Determine, based on the signature authentication model and the static features, a static temporal attention weight corresponding to each dynamic feature element in the dynamic features;
[0013] Based on the signature authentication model and the static temporal attention weights corresponding to the dynamic feature elements, the dynamic feature elements are enhanced to obtain the enhanced dynamic features of the online signature.
[0014] In one embodiment, determining the static temporal attention weight corresponding to each dynamic feature element in the dynamic feature based on the signature authentication model and the static feature includes:
[0015] Through the signature authentication model, the static feature and each dynamic feature element in the dynamic feature are respectively spliced to obtain a spliced dynamic feature element corresponding to each dynamic feature element;
[0016] Based on the signature authentication model and each spliced dynamic feature element, a static temporal attention weight corresponding to each dynamic feature element is obtained.
[0017] In one embodiment, the method of enhancing each dynamic feature element based on the signature authentication model and the static temporal attention weights corresponding to each dynamic feature element to obtain the enhanced dynamic features of the online signature includes:
[0018] By means of the signature authentication model, the dynamic feature elements and the static temporal attention weights corresponding to the dynamic feature elements are respectively fused to obtain first enhanced dynamic feature elements corresponding to the dynamic feature elements;
[0019] Through the signature authentication model, the dynamic feature elements and the first enhanced dynamic feature elements corresponding to the dynamic feature elements are respectively spliced to obtain the second enhanced dynamic feature elements corresponding to the dynamic feature elements;
[0020] The second enhanced dynamic feature elements are combined through the signature authentication model to obtain the enhanced dynamic feature of the online signature.
[0021] In one of the embodiments, the signature sequence of the online signature includes the position information and writing pressure of the online signature at each sampling time point;
[0022] The step of obtaining the signature image of the online signature and the timing information of the online signature based on the signature sequence of the online signature to be authenticated includes:
[0023] Based on the position information and writing pressure of the online signature at each sampling time point, a signature image of the online signature is drawn, and a time function of the online signature corresponding to a preset motion parameter is constructed;
[0024] The time function is determined as the timing information of the online signature.
[0025] In one embodiment, determining the signature distance between the online signature and a template signature of a target user corresponding to the online signature according to the signature authentication model and the enhanced dynamic feature of the online signature includes:
[0026] In the case where there are multiple template signatures, based on the enhanced dynamic features of each template signature, determine the intra-class distance between the multiple template signatures, and use the intra-class distance as a reference distance, and respectively determine the feature distance between the enhanced dynamic features of the online signature and the enhanced dynamic features of each template signature;
[0027] Based on each feature distance and the reference distance, a signature distance between the online signature and the plurality of template signatures is determined.
[0028] In a second aspect, the present application also provides an online signature authentication device, comprising:
[0029] An information acquisition module, used to obtain a signature image of the online signature and timing information of the online signature based on the signature sequence of the online signature to be authenticated; the timing information is used to characterize the timing characteristics of the writing trajectory of the online signature;
[0030] A feature extraction processing module, used to perform static feature extraction processing on the signature image through a pre-trained signature authentication model to obtain static features of the online signature, and to perform dynamic feature extraction processing on the time series information to obtain dynamic features of the online signature;
[0031] An enhancement processing module, used to enhance the dynamic feature according to the signature authentication model and the static feature to obtain an enhanced dynamic feature of the online signature;
[0032] The signature authentication module is used to determine the signature distance between the online signature and the template signature of the target user corresponding to the online signature according to the signature authentication model and the enhanced dynamic characteristics of the online signature, and perform signature authentication on the online signature based on the signature distance.
[0033] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0034] Based on the signature sequence of the online signature to be authenticated, a signature image of the online signature and timing information of the online signature are obtained; the timing information is used to characterize the timing characteristics of the writing trajectory of the online signature;
[0035] Performing static feature extraction processing on the signature image through a pre-trained signature authentication model to obtain static features of the online signature, and performing dynamic feature extraction processing on the time series information to obtain dynamic features of the online signature;
[0036] According to the signature authentication model and the static feature, the dynamic feature is enhanced to obtain the enhanced dynamic feature of the online signature;
[0037] According to the signature authentication model and the enhanced dynamic features of the online signature, a signature distance between the online signature and a template signature of a target user corresponding to the online signature is determined, and signature authentication is performed on the online signature based on the signature distance.
[0038] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0039] Based on the signature sequence of the online signature to be authenticated, a signature image of the online signature and timing information of the online signature are obtained; the timing information is used to characterize the timing characteristics of the writing trajectory of the online signature;
[0040] Performing static feature extraction processing on the signature image through a pre-trained signature authentication model to obtain static features of the online signature, and performing dynamic feature extraction processing on the time series information to obtain dynamic features of the online signature;
[0041] According to the signature authentication model and the static feature, the dynamic feature is enhanced to obtain the enhanced dynamic feature of the online signature;
[0042] According to the signature authentication model and the enhanced dynamic features of the online signature, a signature distance between the online signature and a template signature of a target user corresponding to the online signature is determined, and signature authentication is performed on the online signature based on the signature distance.
[0043] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0044] Based on the signature sequence of the online signature to be authenticated, a signature image of the online signature and timing information of the online signature are obtained; the timing information is used to characterize the timing characteristics of the writing trajectory of the online signature;
[0045] Performing static feature extraction processing on the signature image through a pre-trained signature authentication model to obtain static features of the online signature, and performing dynamic feature extraction processing on the time series information to obtain dynamic features of the online signature;
[0046] According to the signature authentication model and the static feature, the dynamic feature is enhanced to obtain the enhanced dynamic feature of the online signature;
[0047] According to the signature authentication model and the enhanced dynamic features of the online signature, a signature distance between the online signature and a template signature of a target user corresponding to the online signature is determined, and signature authentication is performed on the online signature based on the signature distance.
[0048] The above-mentioned online signature authentication method, device, computer equipment, computer-readable storage medium and computer program product first obtain the signature image of the online signature and the timing information of the online signature based on the signature sequence of the online signature to be authenticated; the timing information is used to characterize the timing characteristics of the writing trajectory of the online signature; then, through the signature authentication model obtained by pre-training, static feature extraction processing is performed on the signature image to obtain the static features of the online signature, and dynamic feature extraction processing is performed on the timing information to obtain the dynamic features of the online signature; then, according to the signature authentication model and the static features, the dynamic features are enhanced to obtain the enhanced dynamic features of the online signature; finally, according to the signature authentication model and the enhanced dynamic features of the online signature, the signature distance between the online signature and the template signature of the target user corresponding to the online signature is determined, and the online signature is authenticated based on the signature distance. In this way, through the signature image, static features representing the global structural information of the online signature can be obtained, and through the timing information, dynamic features representing the timing details of the online signature can be obtained. Based on the static features representing the global structural information, the dynamic features representing the timing details can be enhanced to obtain enhanced dynamic features that can represent both the global structural information of the online signature and the timing details of the online signature. Therefore, the signature authentication based on the enhanced dynamic features takes into account both the global structural information and the timing details of the online signature, thereby improving the authentication accuracy of the online signature. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0050] FIG1 is a schematic diagram of a signature authentication model in one embodiment;
[0051] FIG2 is a schematic diagram of a flow chart of an online signature authentication method in one embodiment;
[0052] FIG3 is a flow chart showing steps of enhancing dynamic features according to a signature authentication model and static features to obtain enhanced dynamic features of an online signature in one embodiment;
[0053] FIG4 is a flowchart of steps for determining static temporal attention weights corresponding to each dynamic feature element in a dynamic feature based on a signature authentication model and static features in one embodiment;
[0054] FIG5 is a flowchart of steps for enhancing each dynamic feature element to obtain enhanced dynamic features of an online signature based on a signature authentication model and static temporal attention weights corresponding to each dynamic feature element in one embodiment;
[0055] FIG6 is a flowchart showing the steps of enhancing the dynamic features according to the signature authentication model and the static features to obtain the enhanced dynamic features of the online signature in another embodiment;
[0056] FIG7 is a schematic diagram of a flow chart of an online signature authentication method in another embodiment;
[0057] FIG8 is a structural block diagram of an online signature authentication device in one embodiment;
[0058] FIG. 9 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0059] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0060] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0061] The online signature authentication method provided in the embodiment of the present application can be implemented through the signature authentication model shown in Figure 1.
[0062] 1 , the signature authentication model is a neural network model composed of multiple neural networks; wherein, the multiple neural networks include a backbone network for dynamic feature extraction processing, a static temporal attention enhancement network for enhancement processing, and an authentication network for signature authentication; wherein, the backbone network is a convolutional recurrent neural network, the static temporal attention enhancement network includes a deep convolutional neural network for static feature extraction and a long short-term memory layer for calculating static temporal attention weights, and the authentication network is a neural network based on a dynamic time warping algorithm.
[0063] In one embodiment, as shown in FIG2 , an online signature authentication method is provided. This embodiment uses the method applied to a server equipped with a signature authentication model as shown in FIG1 as an example for illustration. It is understandable that the method can also be applied to a terminal equipped with a signature authentication model as shown in FIG1 , and can also be applied to a system including a server and a terminal and equipped with a signature authentication model as shown in FIG1 , and is implemented through the interaction between the server and the terminal; wherein the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services; the terminal can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, etc. In this embodiment, the method includes the following steps:
[0064] Step S202, based on the signature sequence of the online signature to be authenticated, obtain the signature image of the online signature and the timing information of the online signature.
[0065] Among them, signature authentication is the process of comparing a signature claimed to be from a certain user with the user's real template signature to determine its authenticity.
[0066] Among them, the online signature refers to the signature obtained by the signer writing on a signature device (such as a smart phone, tablet computer, etc.); it should be noted that for the online signature, the position information and writing pressure of the online signature at each sampling time point in the writing process are usually collected as the signature sequence of the online signature.
[0067] Among them, the signature sequence of the online signature is the position information and writing pressure of the online signature at each sampling time point during its writing process.
[0068] Among them, the timing information is used to characterize the timing characteristics of the writing trajectory of the online signature during its writing process; in practical applications, the timing information can be expressed by a time function, such as a writing trajectory function, a writing speed function, a writing pressure function, a writing angle function, etc. of the online signature.
[0069] Specifically, the signature device starts from when the signer starts writing on the signature device, collects the position information and writing pressure of the strokes written by the signer on the signature device according to the preset sampling time point, obtains the signature sequence of the online signature, and uploads the signature sequence to the server.
[0070] The server receives the signature sequence of the online signature uploaded by the signature device, and based on the signature sequence, draws the signature image of the online signature, and constructs a time function representing the timing characteristics of the writing trajectory of the online signature during its writing process to obtain the timing information of the online signature.
[0071] Step S204, using the pre-trained signature authentication model, static feature extraction is performed on the signature image to obtain static features of the online signature, and dynamic feature extraction is performed on the timing information to obtain dynamic features of the online signature.
[0072] The signature authentication model is a neural network model composed of multiple neural networks as shown in FIG1 .
[0073] Among them, static features are used to characterize the global structural information of the online signature, that is, the global features of the online signature; dynamic features are used to characterize the timing details of the online signature, that is, the local features of the online signature.
[0074] Specifically, referring to FIG1 , the server inputs the signature image of the online signature and the timing information of the online signature into the signature verification model, and extracts static features of the signature image through the deep convolutional neural network in the static temporal attention enhancement network in the signature verification model to obtain the static features of the online signature. , and, through the backbone network in the signature authentication model, the dynamic features of the timing information are extracted to obtain the dynamic features of the online signature .
[0075] In the specific application, the deep convolutional neural network is the VGG16 network (Visual Geometry Group 16 layers, a convolutional neural network proposed by the Visual Geometry Group of the University of Oxford).
[0076] In specific applications, the backbone network consists of two one-dimensional convolutional layers and two long short-term memory layers. Each convolutional layer is followed by a ReLU (Rectified Linear Unit) activation function. The structure of the backbone network is shown in Table 1:
[0077] Table 1 Backbone network structure
[0078]
[0079] In practical applications, the dynamic features extracted based on the backbone network shown in Table 1 It is 128 dimensions.
[0080] Step S206, enhancing the dynamic features according to the signature authentication model and the static features to obtain enhanced dynamic features of the online signature.
[0081] Among them, compared with the dynamic features, the part of the enhanced dynamic features that is beneficial to handwriting discrimination in the signature authentication task is enhanced, and the part that has little effect on the signature authentication task is suppressed.
[0082] Specifically, referring to Figure 1, the server enhances the long short-term memory layer in the network through the static temporal attention in the signature authentication model, and enhances the dynamic features representing the temporal details based on the static features representing the global structural information, so that the dynamic features learn the static features to enhance the parts of the dynamic features that are beneficial to handwriting discrimination in the signature authentication task, and suppress the parts that have little effect on the signature authentication task, thereby obtaining enhanced dynamic features that can represent both the global structural information and the temporal details.
[0083] Step S208, determining the signature distance between the online signature and the template signature of the target user corresponding to the online signature according to the signature authentication model and the enhanced dynamic feature of the online signature, and performing signature authentication on the online signature based on the signature distance.
[0084] The target user is the user to whom the signer claims the online signature to be authenticated belongs.
[0085] The template signature is the real signature entered by the target user into the server.
[0086] Specifically, referring to FIG. 1 , the server calculates the signature distance between the online signature and the corresponding template signature based on the enhanced dynamic features of the online signature and the enhanced dynamic features of the template signature of the target user corresponding to the online signature through the authentication network in the signature authentication model; then, the server calculates the signature distance between the online signature and the corresponding template signature based on the signature distance and the preset signature distance threshold. , perform signature authentication on the online signature. If the signature distance is less than the preset signature distance threshold , then determine that the online signature is the real signature of the corresponding target user, if the signature distance is greater than or equal to the preset signature distance threshold , then the online signature is determined to be a forged signature of the corresponding target user.
[0087] In a specific application, the server may predetermine the enhanced dynamic features of the stored template signatures of each user.
[0088] In a specific application, the process of acquiring the enhanced dynamic features of the template signature is similar to the process of acquiring the enhanced dynamic features of the online signature, and this application will not go into details here.
[0089] In the above-mentioned online signature authentication method, first, the server obtains the signature image of the online signature and the timing information of the online signature based on the signature sequence of the online signature to be authenticated; the timing information is used to characterize the timing characteristics of the writing trajectory of the online signature; then, the server performs static feature extraction processing on the signature image through the pre-trained signature authentication model to obtain the static features of the online signature, and performs dynamic feature extraction processing on the timing information to obtain the dynamic features of the online signature; then, the server enhances the dynamic features according to the signature authentication model and the static features to obtain the enhanced dynamic features of the online signature; finally, the server determines the signature distance between the online signature and the template signature of the target user corresponding to the online signature according to the signature authentication model and the enhanced dynamic features of the online signature, and performs signature authentication on the online signature based on the signature distance. In this way, through the signature image, the server can obtain static features that characterize the global structural information of the online signature, and through the timing information, the server can obtain dynamic features that characterize the timing details of the online signature. Based on the static features that characterize the global structural information, the server can enhance the dynamic features that characterize the timing details, and obtain enhanced dynamic features that can characterize both the global structural information of the online signature and the timing details of the online signature. Therefore, the signature authentication based on the enhanced dynamic features takes into account both the global structural information and the timing details of the online signature, thereby improving the authentication accuracy of the online signature.
[0090] In an exemplary embodiment, a dynamic feature includes a plurality of dynamic feature elements.
[0091] As shown in FIG. 3 , the above step S206 performs enhancement processing on the dynamic features according to the signature authentication model and the static features to obtain the enhanced dynamic features of the online signature, which specifically includes the following steps:
[0092] Step S302, based on the signature authentication model and the static features, determine the static temporal attention weight corresponding to each dynamic feature element in the dynamic features.
[0093] Step S304, based on the signature authentication model and the static temporal attention weights corresponding to each dynamic feature element, each dynamic feature element is enhanced to obtain an enhanced dynamic feature of the online signature.
[0094] Specifically, referring to Figure 1, the server calculates the static temporal attention weight corresponding to each dynamic feature element in the dynamic feature through the long short-term memory layer in the static temporal attention enhancement network in the signature authentication model, and enhances the dynamic feature element based on the static temporal attention corresponding to the dynamic feature element through the static temporal attention enhancement network, so that the dynamic feature learns the static feature and obtains the enhanced dynamic feature that can characterize both the global structural information and the temporal details.
[0095] In specific applications, the long short-term memory layer in the static temporal attention enhancement network is followed by an activation function.
[0096] For example, the static characteristics of the online signature are , the dynamic characteristics of online signature are ,in, Dynamic feature element In dynamic features The server performs enhanced processing to make the dynamic feature Learning static features , and obtain enhanced dynamic features .
[0097] In this embodiment, the server enhances the dynamic features that characterize the timing details through static features that characterize the global structural information, so that the dynamic features can learn the static features, thereby obtaining enhanced dynamic features that can characterize both the global structural information and the timing details; the online signature is authenticated based on the enhanced dynamic features, which takes into account both the global structural information and the timing details of the online signature, thereby improving the authentication accuracy of the online signature.
[0098] In an exemplary embodiment, as shown in FIG. 4 , the above step S302, based on the signature authentication model and the static features, determines the static temporal attention weight corresponding to each dynamic feature element in the dynamic features, specifically including the following steps:
[0099] Step S402: Using the signature authentication model, respectively concatenate the dynamic feature elements in the static feature and the dynamic feature to obtain concatenated dynamic feature elements corresponding to the dynamic feature elements.
[0100] Step S404, based on the signature authentication model and each spliced dynamic feature element, obtain the static temporal attention weight corresponding to each dynamic feature element.
[0101] Among them, the static temporal attention weight is used to characterize the importance of the corresponding dynamic feature elements in the signature authentication task; it is easy to understand that the dynamic feature elements with larger static temporal attention weights are more conducive to handwriting discrimination in the signature authentication task, and the dynamic feature elements with smaller static temporal attention weights have less influence on the signature authentication task.
[0102] Specifically, for each dynamic feature element in the dynamic feature, the server concatenates the static feature and the dynamic feature element through the static temporal attention enhancement network in the signature authentication model to obtain the concatenated dynamic feature element corresponding to the dynamic feature element; then, the server obtains the static temporal attention weights corresponding to each dynamic feature element based on the long short-term memory layer in the static temporal attention enhancement network and the activation function immediately following it, and the concatenated dynamic feature elements corresponding to each dynamic feature element.
[0103] In specific applications, the server will dynamically and static features As the input of the static temporal attention enhancement network, the static features are concatenated separately through the static temporal attention enhancement network and dynamic features Each dynamic feature element in the , and obtain the spliced dynamic feature elements corresponding to each dynamic element, for example, the static temporal attention enhancement network splicing static feature and dynamic feature elements , get the corresponding splicing dynamic feature element , splicing static features and dynamic feature elements , get the corresponding splicing dynamic feature element , ..., splicing static features and dynamic feature elements , get the corresponding splicing dynamic feature element ; Then, the static temporal attention enhancement network combines each spliced dynamic feature element As the input of the long short-term memory layer in the static temporal attention enhancement network, each dynamic feature element is calculated through the long short-term memory layer and the activation function immediately following it. The corresponding static temporal attention weights, e.g., dynamic feature elements Corresponding static temporal attention weights , dynamic feature elements Corresponding static temporal attention weights , ..., dynamic feature elements Corresponding static temporal attention weights .
[0104] In this embodiment, the server can calculate the static temporal attention weights corresponding to each dynamic feature element in the dynamic feature based on the static features through the static temporal attention enhancement network, so as to facilitate the subsequent enhancement of each dynamic feature element based on the static temporal attention weights, so that the dynamic features learn the static features to enhance the parts of each dynamic feature element that are beneficial to the handwriting identification in the signature authentication task, and suppress the parts that have little effect on the signature authentication task.
[0105] In an exemplary embodiment, as shown in FIG5 , the above step S304, based on the signature authentication model and the static temporal attention weights corresponding to each dynamic feature element, performs enhancement processing on each dynamic feature element to obtain an enhanced dynamic feature of the online signature, specifically including the following steps:
[0106] Step S502: Through the signature authentication model, each dynamic feature element and the static temporal attention weight corresponding to each dynamic feature element are respectively fused to obtain a first enhanced dynamic feature element corresponding to each dynamic feature element.
[0107] Step S504: by using the signature authentication model, respectively concatenate each dynamic feature element and the first enhanced dynamic feature element corresponding to each dynamic feature element to obtain a second enhanced dynamic feature element corresponding to each dynamic feature element.
[0108] Step S506: Combine the second enhanced dynamic feature elements through the signature authentication model to obtain the enhanced dynamic feature of the online signature.
[0109] Among them, fusing each dynamic feature element and the static temporal attention weight corresponding to each dynamic feature element refers to performing a dot product of each dynamic feature element and the static temporal attention weight corresponding to each dynamic feature element.
[0110] Among them, splicing each dynamic feature element and the first enhanced dynamic feature element corresponding to each dynamic feature element refers to residually connecting each dynamic feature element and the first enhanced dynamic feature element corresponding to each dynamic feature element.
[0111] Specifically, the server performs dot multiplication on each dynamic feature element and the static temporal attention weight corresponding to each dynamic feature element through the static temporal attention enhancement network in the signature authentication model to obtain the first enhanced dynamic feature element corresponding to each dynamic feature element; for example, the dot multiplication dynamic feature element Corresponding static temporal attention weights , get the corresponding first enhanced dynamic feature element , dot product dynamic feature element Corresponding static temporal attention weights , get the corresponding first enhanced dynamic feature element , ..., dot product dynamic feature element Corresponding static temporal attention weights , get the corresponding first enhanced dynamic feature element .
[0112] Then, the server uses the static temporal attention enhancement network to residually connect each dynamic feature element and the first enhanced dynamic feature element corresponding to each dynamic feature element to obtain the second enhanced dynamic feature element corresponding to each dynamic feature element; for example, the residual connection dynamic feature element and the corresponding first enhanced dynamic feature element , get the corresponding second enhanced dynamic feature element , residual connection dynamic feature elements and the corresponding first enhanced dynamic feature element , get the corresponding second enhanced dynamic feature element , ..., residual connection dynamic feature elements and the corresponding first enhanced dynamic feature element , get the corresponding second enhanced dynamic feature element .
[0113] Finally, the server combines the second enhanced dynamic feature elements through the static temporal attention enhancement network to obtain the enhanced dynamic features of the online signature .
[0114] In this embodiment, the server can enhance each dynamic feature element through a static temporal attention enhancement network and the static temporal attention weights corresponding to each dynamic feature element, so that the dynamic feature learns the static feature to enhance the part of each dynamic feature element that is beneficial to handwriting discrimination in the signature authentication task, and suppress the part that has little effect on the signature authentication task, thereby obtaining an enhanced dynamic feature that can represent both global structural information and temporal details.
[0115] In an exemplary embodiment, as shown in FIG6 , it is another flow chart of the above step S206 , in which the dynamic features are enhanced according to the signature authentication model and the static features to obtain the enhanced dynamic features of the online signature.
[0116] In an exemplary embodiment, the signature sequence of the online signature includes the position information and writing pressure of the online signature at each sampling time point.
[0117] The position information can be represented by the horizontal coordinate and the vertical coordinate in the plane coordinate system.
[0118] The above step S202 obtains the signature image of the online signature and the timing information of the online signature based on the signature sequence of the online signature to be authenticated, which specifically includes the following contents: drawing the signature image of the online signature based on the position information and writing pressure of the online signature at each sampling time point, and constructing a time function of the online signature corresponding to the preset motion parameters; determining the time function as the timing information of the online signature.
[0119] The preset motion parameters at least include the horizontal coordinate of the plane coordinate system , the vertical coordinate of the plane coordinate system , writing pressure , the horizontal velocity of the plane coordinate system , the velocity in the vertical direction of the plane coordinate system ,angle and its functions and ,speed The first difference of ,angle The first difference of , logarithmic radius of curvature , centripetal acceleration and the total acceleration .
[0120] Specifically, the signature sequence of the online signature includes the horizontal coordinates of the plane coordinate system of the online signature at each sampling time point. , the vertical coordinate of the plane coordinate system , writing pressure ; The horizontal coordinate of the plane coordinate system of the server based on the online signature at each sampling time point , the vertical coordinate of the plane coordinate system , writing pressure , draw the signature image of the online signature, and calculate the horizontal coordinate of the online signature in the plane coordinate system , the vertical coordinate of the plane coordinate system , writing pressure , the horizontal velocity of the plane coordinate system , the velocity in the vertical direction of the plane coordinate system ,angle and its functions and ,speed The first difference of ,angle The first difference of , logarithmic radius of curvature , centripetal acceleration and the total acceleration There are twelve dimensions of time functions in total; then, the server determines the above twelve dimensions of time functions as the timing information of the online signature.
[0121] In actual applications, the server uses Python's Matplotlib drawing library to draw the signature sequence into an offline signature image with a stroke width of 2.
[0122] In this embodiment, the server can obtain a signature image for representing global information of the online signature and timing information for representing local information of the online signature based on the signature sequence of the online signature to be authenticated.
[0123] In an exemplary embodiment, the signature distance between the online signature and the template signature of the target user corresponding to the online signature is determined based on the signature authentication model and the enhanced dynamic features of the online signature, specifically including the following contents: in the case of multiple template signatures, based on the enhanced dynamic features of each template signature, the intra-class distance between the multiple template signatures is determined, and the intra-class distance is used as a reference distance, and the feature distance between the enhanced dynamic features of the online signature and the enhanced dynamic features of each template signature is determined respectively; based on each feature distance and the reference distance, the signature distance between the online signature and the multiple template signatures is determined.
[0124] Specifically, each user enters at least one template signature of his / her own into the server; in the case that the template user has multiple template signatures, the server first determines the intra-class distance between the multiple template signatures based on the enhanced dynamic features of each template signature through the authentication network, and then uses the intra-class distance as the reference distance for calculating the signature distance. At the same time, the server determines the feature distance between the enhanced dynamic features of the online signature and the enhanced dynamic features of the template signature for each template signature through the authentication network; then, the server calculates the signature distance between the online signature and the multiple template signatures as a whole based on the feature distance between the enhanced dynamic features of the online signature and the enhanced dynamic features of each template signature, as well as the reference distance, through the authentication network, and when the calculated signature distance is less than a preset signature distance threshold In this case, the online signature is determined to be the authentic signature of the corresponding target user.
[0125] In actual applications, the server calculates the signature distance based on Formula 1:
[0126] (Formula 1)
[0127] in, To enhance the dynamic features of online signatures, is the signature distance corresponding to the online signature; is the number of template signatures, for The first of the template signatures Enhanced dynamic features of template signatures; is the reference distance, i.e., the intra-class distance between multiple template signatures; Enhanced dynamic features for online signatures and The feature distance between the enhanced dynamic features of the template signatures, Calculated by formula 2:
[0128] (Formula 2)
[0129] in, To enhance dynamic features and enhanced dynamic features The characteristic distance between To enhance dynamic features and enhanced dynamic features The DTW (Dynamic TimeWarping) distance between them.
[0130] In this embodiment, when there are multiple template signatures, the server can calculate the signature distance between the online signature and the entire template signature based on the enhanced dynamic features of each template signature and the enhanced dynamic features of the online signature, thereby being able to determine the authenticity of the online signature based on the signature distance, and further achieve signature authentication of the online signature.
[0131] In an exemplary embodiment, the signature distance between the online signature and the template signature of the target user corresponding to the online signature is determined based on the signature authentication model and the enhanced dynamic features of the online signature, which specifically includes the following contents: when there is only one template signature, the feature distance between the enhanced dynamic features of the online signature and the enhanced dynamic features of the template signature is determined; based on the feature distance and a preset reference distance, the signature distance between the online signature and the template signature is determined.
[0132] Specifically, referring to Formula 1, for the case where there is only one template signature, the server pre-sets the reference distance The server first determines the feature distance between the enhanced dynamic feature of the online signature and the enhanced dynamic feature of the template signature, and then determines the signature distance between the online signature and the template signature based on the feature distance and a preset reference distance.
[0133] In a specific application, the preset reference distance is 1, that is, when there is only one template signature, the reference distance .
[0134] In an exemplary embodiment, the loss function of the authentication network in the pre-trained signature authentication model is as follows:
[0135] The server samples each user in the form of a triple (anchor point, positive sample, negative sample). Users , the server samples an enhanced feature sequence of a real signature As an anchor point, sample Enhanced feature sequence of real signatures As a positive sample, sampling Enhanced feature sequence of a random forged signature or a skilled forged signature As negative samples, each user has A triplet.
[0136] No. The triplet loss function of a user is shown in Formula 3:
[0137] (Formula 3)
[0138] in, is a non-negative spacing margin.
[0139] The overall loss function of the authentication network is shown in Formula 4:
[0140] (Formula 4)
[0141] In an exemplary embodiment, as shown in FIG. 7 , another online signature authentication method is provided, which is described by taking the method applied to a server as an example, and includes the following steps:
[0142] Step S702, based on the signature sequence of the online signature to be authenticated, obtain the signature image of the online signature and the timing information of the online signature.
[0143] Step S704, using the pre-trained signature authentication model, static feature extraction is performed on the signature image to obtain static features of the online signature, and dynamic feature extraction is performed on the timing information to obtain dynamic features of the online signature.
[0144] Step S706: Using the signature authentication model, respectively concatenate the dynamic feature elements in the static feature and the dynamic feature to obtain concatenated dynamic feature elements corresponding to the dynamic feature elements.
[0145] Step S708, based on the signature authentication model and each spliced dynamic feature element, obtain the static temporal attention weight corresponding to each dynamic feature element.
[0146] Step S710: Through the signature authentication model, each dynamic feature element and the static temporal attention weight corresponding to each dynamic feature element are respectively fused to obtain a first enhanced dynamic feature element corresponding to each dynamic feature element.
[0147] Step S712: by using the signature authentication model, respectively concatenate each dynamic feature element and the first enhanced dynamic feature element corresponding to each dynamic feature element to obtain a second enhanced dynamic feature element corresponding to each dynamic feature element.
[0148] Step S714, combining the second enhanced dynamic feature elements through the signature authentication model to obtain the enhanced dynamic feature of the online signature.
[0149] Step S716, when there are multiple template signatures of the target user corresponding to the online signature, determine the intra-class distance between the multiple template signatures based on the enhanced dynamic features of each template signature, and use the intra-class distance as the reference distance, and determine the feature distance between the enhanced dynamic features of the online signature and the enhanced dynamic features of each template signature respectively.
[0150] Step S718: determining the signature distance between the online signature and the plurality of template signatures based on the feature distances and the reference distances.
[0151] Specifically, the signature distance is calculated based on the DTW algorithm.
[0152] In this embodiment, the global structural information of the signature static graph is introduced into the online signature authentication method based on the DTW algorithm for local representation learning through the static temporal attention mechanism, so as to learn the signature representation that takes into account both global and local information, making up for the shortcoming of the existing method that only focuses on the local features of the signature, and improving the accuracy of signature authentication.
[0153] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0154] Based on the same inventive concept, the embodiment of the present application also provides an online signature authentication device for implementing the online signature authentication method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations of one or more online signature authentication device embodiments provided below can refer to the limitations of the online signature authentication method above, and will not be repeated here.
[0155] In an exemplary embodiment, as shown in FIG8 , an online signature authentication device is provided, comprising: an information acquisition module 802, a feature extraction module 804, an enhancement processing module 806 and a signature authentication module 808, wherein:
[0156] The information acquisition module 802 is used to obtain the signature image of the online signature and the timing information of the online signature based on the signature sequence of the online signature to be authenticated; the timing information is used to characterize the timing characteristics of the writing trajectory of the online signature.
[0157] The feature extraction module 804 is used to perform static feature extraction processing on the signature image through the pre-trained signature authentication model to obtain the static features of the online signature, and to perform dynamic feature extraction processing on the timing information to obtain the dynamic features of the online signature.
[0158] The enhancement processing module 806 is used to enhance the dynamic features according to the signature authentication model and the static features to obtain the enhanced dynamic features of the online signature.
[0159] The signature authentication module 808 is used to determine the signature distance between the online signature and the template signature of the target user corresponding to the online signature according to the signature authentication model and the enhanced dynamic characteristics of the online signature, and perform signature authentication on the online signature based on the signature distance.
[0160] In an exemplary embodiment, a dynamic feature includes a plurality of dynamic feature elements.
[0161] The enhancement processing module 806 is also used to determine the static temporal attention weight corresponding to each dynamic feature element in the dynamic feature based on the signature authentication model and the static features; based on the signature authentication model and the static temporal attention weight corresponding to each dynamic feature element, enhance each dynamic feature element to obtain an enhanced dynamic feature of the online signature.
[0162] In an exemplary embodiment, the enhancement processing module 806 is also used to splice the static features and the dynamic feature elements in the dynamic features through the signature authentication model to obtain the spliced dynamic feature elements corresponding to each dynamic feature element; based on the signature authentication model and the spliced dynamic feature elements, obtain the static temporal attention weight corresponding to each dynamic feature element.
[0163] In an exemplary embodiment, the enhancement processing module 806 is also used to, through a signature authentication model, fuse each dynamic feature element and the static temporal attention weight corresponding to each dynamic feature element, to obtain a first enhanced dynamic feature element corresponding to each dynamic feature element; through a signature authentication model, concatenate each dynamic feature element and the first enhanced dynamic feature element corresponding to each dynamic feature element, to obtain a second enhanced dynamic feature element corresponding to each dynamic feature element; through a signature authentication model, combine each second enhanced dynamic feature element to obtain an enhanced dynamic feature of the online signature.
[0164] In an exemplary embodiment, the signature sequence of the online signature includes the position information and writing pressure of the online signature at each sampling time point.
[0165] The information acquisition module 802 is also used to draw the signature image of the online signature based on the position information and writing pressure of the online signature at each sampling time point, and to construct a time function of the online signature corresponding to preset motion parameters; and to determine the time function as the timing information of the online signature.
[0166] In an exemplary embodiment, the signature authentication module 808 is also used to determine the intra-class distance between the multiple template signatures based on the enhanced dynamic features of each template signature when there are multiple template signatures, and use the intra-class distance as the reference distance, and to determine the feature distance between the enhanced dynamic features of the online signature and the enhanced dynamic features of each template signature respectively; based on each feature distance and the reference distance, determine the signature distance between the online signature and the multiple template signatures.
[0167] Each module in the above-mentioned online signature authentication device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.
[0168] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG9. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the template signature of the user and its enhanced dynamic features. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an online signature authentication method is implemented.
[0169] Those skilled in the art will understand that the structure shown in FIG. 9 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0170] In an exemplary embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0171] In an exemplary embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0172] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0173] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0174] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above 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 application.
[0175] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. An online signature authentication method, characterized in that: The method comprises: Based on the signature sequence of the online signature to be authenticated, a signature image of the online signature and timing information of the online signature are obtained; the timing information is used to characterize the timing characteristics of the writing trajectory of the online signature; Performing static feature extraction processing on the signature image through a pre-trained signature authentication model to obtain static features of the online signature, and performing dynamic feature extraction processing on the time series information to obtain dynamic features of the online signature; According to the signature authentication model and the static feature, the dynamic feature is enhanced to obtain the enhanced dynamic feature of the online signature; According to the signature authentication model and the enhanced dynamic features of the online signature, a signature distance between the online signature and a template signature of a target user corresponding to the online signature is determined, and signature authentication is performed on the online signature based on the signature distance.
2. The method according to claim 1, characterized in that The dynamic feature includes a plurality of dynamic feature elements; The step of enhancing the dynamic feature according to the signature authentication model and the static feature to obtain the enhanced dynamic feature of the online signature includes: Determine, based on the signature authentication model and the static features, a static temporal attention weight corresponding to each dynamic feature element in the dynamic features; Based on the signature authentication model and the static temporal attention weights corresponding to the dynamic feature elements, the dynamic feature elements are enhanced to obtain the enhanced dynamic features of the online signature.
3. The method according to claim 2, characterized in that The determining, based on the signature authentication model and the static feature, a static temporal attention weight corresponding to each dynamic feature element in the dynamic feature comprises: Through the signature authentication model, the static feature and each dynamic feature element in the dynamic feature are respectively spliced to obtain a spliced dynamic feature element corresponding to each dynamic feature element; Based on the signature authentication model and each spliced dynamic feature element, a static temporal attention weight corresponding to each dynamic feature element is obtained.
4. The method according to claim 2, characterized in that: The step of enhancing each dynamic feature element based on the signature authentication model and the static temporal attention weights corresponding to each dynamic feature element to obtain the enhanced dynamic features of the online signature includes: By means of the signature authentication model, the dynamic feature elements and the static temporal attention weights corresponding to the dynamic feature elements are respectively fused to obtain first enhanced dynamic feature elements corresponding to the dynamic feature elements; Through the signature authentication model, the dynamic feature elements and the first enhanced dynamic feature elements corresponding to the dynamic feature elements are respectively spliced to obtain the second enhanced dynamic feature elements corresponding to the dynamic feature elements; The second enhanced dynamic feature elements are combined through the signature authentication model to obtain the enhanced dynamic feature of the online signature.
5. The method according to claim 1, characterized in that The signature sequence of the online signature, including the position information and writing pressure of the online signature at each sampling time point; The step of obtaining the signature image of the online signature and the timing information of the online signature based on the signature sequence of the online signature to be authenticated includes: Based on the position information and writing pressure of the online signature at each sampling time point, a signature image of the online signature is drawn, and a time function of the online signature corresponding to a preset motion parameter is constructed; The time function is determined as the timing information of the online signature.
6. The method according to any one of claims 1 to 5, characterized in that: The determining, based on the signature authentication model and the enhanced dynamic feature of the online signature, a signature distance between the online signature and a template signature of a target user corresponding to the online signature comprises: In the case where there are multiple template signatures, based on the enhanced dynamic features of each template signature, determine the intra-class distance between the multiple template signatures, and use the intra-class distance as a reference distance, and respectively determine the feature distance between the enhanced dynamic features of the online signature and the enhanced dynamic features of each template signature; Based on each feature distance and the reference distance, a signature distance between the online signature and the plurality of template signatures is determined.
7. An online signature authentication device, characterized in that: The device comprises: An information acquisition module, used to obtain a signature image of the online signature and timing information of the online signature based on the signature sequence of the online signature to be authenticated; the timing information is used to characterize the timing characteristics of the writing trajectory of the online signature; A feature extraction module, configured to perform static feature extraction processing on the signature image through a pre-trained signature authentication model to obtain static features of the online signature, and to perform dynamic feature extraction processing on the time series information to obtain dynamic features of the online signature; An enhancement processing module, used to enhance the dynamic feature according to the signature authentication model and the static feature to obtain an enhanced dynamic feature of the online signature; The signature authentication module is used to determine the signature distance between the online signature and the template signature of the target user corresponding to the online signature according to the signature authentication model and the enhanced dynamic characteristics of the online signature, and perform signature authentication on the online signature based on the signature distance.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Signature authentic identification method and system based on dynamic and static feature fusion
CN110222660A
Electronic signature handwriting source classification method and system based on bimodal feature fusion
CN118334756A
Data processing method and device, electronic equipment, storage medium and program product
CN121388982A
Offline signature verification using high pressure regions
US7542593B1
