Online signature generation method and device based on spectrum mask, and storage medium
Generating scribbled handwriting signatures through spectrum masks and deep learning models solves the complexity, diversity and difficulty of identification of scribbled handwriting signatures, and protects the authenticity, security and privacy of the signatures.
Patent Information
- Application Number
- CN202311626562.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-30
- Publication Date
- 2025-07-11
AI Technical Summary
In the prior art, the technology of generating and echoing scribbled handwriting signatures is imperfect, resulting in high complexity and diversity of signatures, high difficulty in identification and identification, and difficult to guarantee the security and privacy of signature information.
The online signature generation method based on spectrum mask is adopted to generate more realistic and diverse scribbled handwriting signatures through deep learning models and frequency domain analysis, and the signature information is encrypted to ensure the security and credibility of the signature.
It improves the recognition accuracy of scribbled handwriting signatures, protects the privacy and rights of the signer, and realizes the reversibility and security of signature information.
Smart Images

Figure CN120296774A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of online electronic signature, and particularly to an online signature generation method based on spectrum mask. Background Art
[0002] With the continuous development of digital technology, handwritten electronic signature has become an important alternative, which can improve the convenience and efficiency of signature, and ensure the security and credibility of signature information. Among them, scribbled signature refers to a type of handwritten electronic signature. Its characteristic is that the signer signs in a hurry or not on the paper when signing, resulting in factors such as the strokes of the signature being not smooth enough, not standard enough or not clear enough, making the complexity and diversity of the signature relatively high, and the difficulty of recognition and identification relatively large. However, at present, the scribbled signature generation and echo technology for handwritten electronic signature is not perfect, and it is necessary to develop an efficient, accurate and reliable scribbled signature generation and echo technology to meet the actual application requirements. Therefore, the present invention proposes an online scribbled signature generation method based on spectrum mask, aiming to generate more realistic and diverse online scribbled signatures by comprehensively considering the correlation between strokes and frequency domain features, while ensuring the security and credibility of signature information, so as to provide richer data resources and wider application scenarios.
[0003] Due to factors such as different signing methods, signing devices, acquisition terminals, etc., the strokes of the signature are not smooth enough, not standard enough or not clear enough, so scribbled signatures are relatively common in actual applications, making the complexity and diversity of the signature relatively high, and the difficulty of recognition and identification relatively large. There are certain risks and challenges such as difficulty in identifying and authenticating forged and impersonated signatures, and corresponding technical means and management measures need to be taken to ensure the authenticity and reliability of the signature. At the same time, it is necessary to strengthen the encryption processing of the signed handwriting signal, improve the confidentiality of the biometric information of the signer and the signature handwriting, protect the privacy and rights of the signer, and avoid irreversible loss of signal information. Summary of the Invention
[0004] In view of this, aiming at the above problems existing in the prior art, this paper proposes a more effective stylized handwriting generation method, which can be used for generating electronic signature data of any length. Aiming to generate more realistic and diverse online scribbled signatures by comprehensively considering the correlation between strokes and frequency domain features, while ensuring the security and credibility of signature information, so as to provide richer data resources and wider application scenarios.
[0005] Based on the first aspect of the present application, an online signature generation method based on a spectral mask is proposed. The spectral mask between handwritings is calculated according to the spectral difference between the online signature and the sample signature, and a training data set including the spectral mask and the spectral of the sample signature handwriting is constructed; a deep learning model is trained to predict the handwriting mask of the online signature; the online signature spectrum is generated according to the sample handwriting spectrum and the handwriting mask, and the online signature handwriting sequence is obtained through inverse transformation.
[0006] Further preferably, the DTW algorithm is used to align the lengths of the sample handwriting and the online handwriting sequence. After alignment, the handwriting sequence is subjected to short-time Fourier transform to obtain the handwriting spectra of different online handwriting sequences, and the spectral difference between the online handwriting and the sample handwriting is calculated to obtain the spectral mask.
[0007] Further preferably, the handwriting feature sequence of the sample signature is converted into a frequency-domain signal to obtain its amplitude and phase information. The amplitude of the online signature is obtained by multiplying the handwriting mask of the online signature by the amplitude of the sample signature. Combining the phase information of the online signature and performing inverse short-time Fourier transform to convert it back to the time-domain signal to obtain the feature sequence of the online signature.
[0008] Further preferably, in the stage of training the deep learning model, any stroke is extracted from the sample signature as the current stroke. The spectrograms of the previous and subsequent stroke segments of the current stroke segment are spliced together to form a comprehensive feature vector, and the mask of the current stroke is fitted and input into the deep learning model to learn the correlation between strokes; the loss function of the regression model is used, and the label is set as the mask of each stroke.
[0009] Further preferably, according to the amplitude |S(f) 2 | of the sample signature spectrum and the amplitude |Y(f) 2 | of the online signature spectrum, the formula: is called to calculate the ideal ratio mask IRM as the online signature spectral mask.
[0010] Further preferably, the sample signature is subjected to short-time Fourier transform to obtain the amplitude M g and phase θ of the sample signature spectrum. According to the online signature spectral mask IRM, the formula: M c =M g *IRM is called to calculate the spectral amplitude M c of the online signature. The spectral amplitude M c of the online signature is combined with the phase θ of the sample signature and the formula: Spectrum=M c *e -i*θ is called to calculate the spectrum Spectrum of the online signature; the spectrum of the scribbled signature is subjected to inverse short-time Fourier transform to restore it to the time sequence of the online signature writing handwriting.
[0011] Further preferably, the sample signature is a standard non-cursive signature, and the online signature is a cursive signature in different fonts.
[0012] Further preferably, a training data set is constructed according to the spectral amplitude of the non-cursive signature and the mask, where the spectral amplitude is used as the input of the regression model, and the mask is used as the target label for model training; the training set is used to train the regression model to fit the mask of the non-cursive signature and infer the mask of its corresponding cursive signature.
[0013] According to a second aspect of the present application, an electronic device is provided, including: a processor; and a memory storing a program, where the program includes instructions that, when executed by the processor, cause the processor to execute the online signature generation method based on the spectral mask described above.
[0014] According to a third aspect of the present application, a non-transitory computer-readable storage medium storing computer instructions is provided, where the computer instructions are used to cause the computer to execute the online signature generation method based on the spectral mask described above.
[0015] The method of frequency domain analysis adopted by the present invention can better retain the characteristic information of the original signature, thereby restoring a more realistic cursive handwriting signature and improving the accuracy of signature recognition. By using the method of frequency domain mask, the signal can be encrypted to conceal the true information of the signal, thus better protecting the privacy and rights of the signer. The confidentiality of the biometric information of the signer and the signature handwriting is improved. By using the method of frequency domain mask, the true information of the signal can be restored by decrypting the mask, realizing better reversibility of the signature spectrum and avoiding irreversible loss of signal information in traditional methods.
[0016] Developing the technology for restoring and generating cursive handwriting signatures can also provide more sample data by generating cursive signatures that conform to the writing habits of the signer, enriching the online cursive signature generation method of cursive signatures. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 Schematic diagram of online signature handwriting generation based on spectral mask in an exemplary embodiment of the present application;
[0018] Figure 2 Schematic diagram of cursive signature handwriting generation in an exemplary embodiment of the present application;
[0019] Figure 3 Shown is a block diagram of an exemplary electronic device capable of implementing the embodiments of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0020] Embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. On the contrary, these embodiments are provided to more thoroughly and completely understand the present application. It should be understood that the drawings and embodiments of the present application are only for exemplary purposes and are not used to limit the protection scope of the present application.
[0021] It should be understood that the various steps recited in the method embodiments of the present application can be executed in a different order and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present application is not limited in this regard.
[0022] The term "including" and its variations used herein are open-ended, that is, "including but not limited to". The term "based on" is "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description. It should be noted that the concepts such as "first" and "second" mentioned in the present application are only used to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependent relationships.
[0023] It should be noted that the modifications of "one" and "multiple" mentioned in the present application are illustrative rather than restrictive. Those skilled in the art should understand that unless clearly specified otherwise in the context, it should be understood as "one or more".
[0024] The names of the messages or information exchanged between multiple devices in the embodiments of the present application are only for illustrative purposes and are not used to limit the scope of these messages or information.
[0025] Simple stroke deletion or addition and overlap of strokes cannot retain all the characteristic information of the original signature. Compared with traditional methods, the method using frequency-domain analysis can better retain the characteristic information of the original signature, so as to restore and display a more realistic scribbled handwriting signature and ensure the authenticity of the scribbled handwriting signature.
[0026] Traditional methods can only simply process online handwriting sequences and cannot truly protect the privacy of signals. By using the frequency-domain masking method, the handwriting feature signals can be encrypted to conceal the true information of the signals, thereby better protecting the confidentiality of the signals and ensuring the confidentiality of the signature information.
[0027] Random processing of online handwriting sequences by traditional methods will cause irreversible loss of signal information. By using the frequency-domain masking method, the true information of the signal can be restored by decrypting the mask, achieving better reversibility of the signature spectrum. The present invention proposes an online writing generation method based on spectral masking, including: obtaining handwriting data to construct a training dataset, training a regression model, and generating a scribbled handwriting signature data sequence.
[0028] In the data preparation stage, collect and obtain the standard handwriting signature and scribbled handwriting signature of the signer. Different electronic signatures of the same content written by the same signer can be collected multiple times. Among them, the standard handwriting signature can be defined as a non-scribbled handwriting signature through manual annotation, or it can be determined that the writing is a non-scribbled handwriting signature by comparing with the standard font in the font library. Signatures written in other ways are defined as scribbled handwriting signatures. (1) Division of different signature scribble degrees: According to the signatures of different writing methods of the signer, they are divided into scribbled handwriting signatures and non-scribbled handwriting signatures and labeled. (2) Generate the spectrum: After aligning the scribbled handwriting signature and the non-scribbled handwriting signature, generate the spectrum according to the number of strokes. The number of strokes here refers to the pen movement state attribute of the online handwriting sequence, not the standard number of strokes of the text. (3) Obtain the mask: Determine the mask according to the amplitude of the scribbled signature spectrum and the non-scribbled signature spectrum (which can be obtained by the ratio of the two). The size of the obtained mask is the same as its signature spectrum.
[0029] Construct a training dataset based on the spectral amplitude of the non-scribbled handwriting signature and the mask. The spectral amplitude is used as the input of the regression model, and the mask is used as the target label for model training.
[0030] Construct a regression model for predicting the mask. Use the constructed training set to train the regression model to fit the mask of the non-scribbled signature. Its main purpose is to infer the mask of its corresponding scribbled handwriting signature through the non-scribbled handwriting signature (the scribbled handwriting signature is outside the training set). Finally, the non-scribbled handwriting signature and the obtained mask are used to reconstruct the scribbled handwriting signature.
[0031] In the echo stage of the scribbled signature, the present exemplary embodiment can be implemented by the following method. First, the sequence of non-scribbled signatures is converted into a frequency-domain signal through short-time Fourier transform (STFT) to obtain amplitude and phase information, which contains the spectral characteristics of the original signature, such as the frequency and amplitude of the signature strokes. Next, the amplitude of the non-scribbled signature is predicted through a trained model to obtain the corresponding mask information, which helps to conceal the true amplitude of the signer's signature spectrum and has uniqueness and confidentiality. The generation and application of this mask can effectively protect the privacy and information security of the signer, ensuring that the signature data cannot be obtained by unauthorized visitors or analysts. Then, the amplitude information of the scribbled signature is calculated based on the predicted mask and the amplitude of the non-scribbled signature (for example, by multiplying the predicted mask by the amplitude of the non-scribbled signature). Finally, the retained phase information is combined with the calculated amplitude information and converted back into a time-domain signal through inverse transformation to obtain the sequence of scribbled signatures.
[0032] This process realizes the restoration of the scribbled signature. At the same time, based on the characteristics of Fourier transform and mask, the whole process is also a reversible operation. By using the corresponding mask, the amplitude information of the original signature can be restored, realizing the restoration and reversibility of the signature data. It ensures that even after encrypting the mask, the signature data can still be restored by legitimate users while maintaining the confidentiality and security of the data.
[0033] The following describes the implementation manner of the present invention in detail through specific examples.
[0034] Such as Figure 1 is a schematic diagram of an online writing generation method based on spectral mask in an exemplary embodiment of the present application. In the data preparation stage, signatures with standard writing strokes are used as non-scribbled word samples, and other writing fonts are used as scribbled words. The DTW algorithm can be used to align the lengths of the handwriting sequences of non-scribbled word samples and scribbled words (different fonts, glyphs, and font sizes). The aligned handwriting sequences are transformed through short-time Fourier transform to obtain the handwriting spectra of different handwriting sequences, and the spectral differences between different handwritings and the sample handwriting are calculated to obtain the spectral mask. The non-scribbled handwriting spectrum is obtained according to the non-scribbled word sample handwriting sequence, and the non-scribbled handwriting spectrum is input into a trained deep learning model (regression model) to obtain the predicted handwriting mask. The scribbled word spectrum is generated based on the non-scribbled handwriting spectrum and the predicted handwriting mask, and the scribbled handwriting sequence is obtained through inverse short-time Fourier transform.
[0035] Extract any stroke segment from the non-scribbled word sample signature handwriting and input it into the deep learning model to obtain the mask of this stroke.
[0036] Align the lengths of online signature sequences. Collect online signature data sequences, including the coordinates of signature stroke trajectory points, the timestamps of sampling points, and the writing pen states. Among them, the online signature sequence S is expressed as:
[0037] S = [(x0, y0, t0, s0), (x1, y1, t1, s1), …, (x n , y n , t n , s n )]
[0038] Among them, (x i , y i ) represents the abscissa and ordinate values of the i-th sampling point in the online signature stroke sequence, t i represents the timestamp of the sampling point, and s i ∈(0, 1, 2) represents the pen state, where 0 represents the pen down, 1 represents the pen moving, and 2 represents the pen up.
[0039] Assume that the non-cursive sample signature sequence and the cursive signature sequence are S1 and S2 respectively. The DTW (Dynamic Time Warping) algorithm can be used for alignment to obtain the aligned non-cursive signature sequence S1_pad and the cursive signature sequence S2_pad respectively.
[0040] Use the short-time Fourier transform to obtain the spectrum. Perform the short-time Fourier transform (STFT) on the sampling point coordinate values (x i , y i ) in the aligned S1_pad and S2_pad sequences to obtain the amplitude Spectrum of the corresponding sampling point (x i , y i ), which is expressed as:
[0041] Spectrum = STFT(x i , y i )
[0042] Among them, Spectrum is a two-dimensional matrix with dimensions [T, F], where T represents the dimension of the number of strokes, representing the change in the number of strokes, and F represents the frequency dimension, representing the change in the frequency dimension.
[0043] Calculate its mask according to the comparison of the spectrum amplitudes. In this exemplary embodiment, the ideal ratio mask IRM (Ideal Ratio Mask) is used to calculate the handwriting mask, and other methods well-known to those skilled in the art can also be used to calculate the mask.
[0044] According to the spectrum amplitude of the cursive signature |S(f) 2|, the spectrum amplitude of the non-cursive signature sample | Y(f) 2 |, call the formula:
[0045]
[0046] Calculate the ideal ratio mask as the handwriting mask, where β is an adjustable factor.
[0047] Select the spectrum amplitude of the non-cursive signature and the corresponding ideal ratio mask to construct a data set.
[0048] At the input stage of the model, for the same signature, considering the short-term correlation between different strokes of the signature, therefore, traverse different strokes of each signature.
[0049] Stitch the spectrograms of the previous few strokes and the next few strokes of the current stroke, merge them into a comprehensive feature vector, and then use this feature vector to fit the mask of the current stroke. Finally, this mask is merged with the masks of other strokes to complete the training of the entire signature. At the same time, in order to accelerate the learning process and better convergence, it is necessary to normalize the input.
[0050] The deep learning model can select a suitable model for training according to the sample data volume and the requirement of writing scrawl degree. Neural network models such as CNN and DNN can all be used.
[0051] Determination of the loss function during training. The model training of the scrawl signature is similar to a regression problem. Therefore, the loss function can adopt the commonly used loss functions for regression, such as mean square error (MSE), root mean square error (RMSE) or mean absolute error (MAE), etc.
[0052] The following is an example to illustrate how to apply the scrawl signature generation model.
[0053] Perform short-time Fourier transform on the non-cursive signature sample to obtain the amplitude M of the non-cursive signature sample spectrum g and the phase θ, save its phase θ, and input the amplitude M g into the trained regression model. The regression model predicts the mask IRM of the scrawl signature. According to the mask IRM of the scrawl signature and the spectrum amplitude, call the formula:
[0054] M c = M g * IRM
[0055] Calculate the spectrum amplitude of the scrawl signature.
[0056] According to the spectrum amplitude M of the scrawl signature c , combine it with the phase of the non-cursive signature to restore the spectrum of the scrawl signature.
[0057] It can be calculated according to the formula:
[0058] Spectrum = M c *e -i*θ
[0059] to calculate the spectrum Spectrum of the scribbled signature.
[0060] Perform an inverse short-time Fourier transform iSTFT (inverse short-time Fourier transform) on the spectrum Spectrum of the scribbled signature to restore it to the time sequence of the scribbled signature writing.
[0061] (x‘ i ,y’ i ) = iSTFT(Spectrum)
[0062] where, (x‘ i ,y’ i ) is the coordinate value of the i-th point of the restored scribbled signature.
[0063] The present invention is mainly a method for generating scribbled signatures based on frequency domain masks. By using frequency domain analysis and frequency domain mask technology, an online signature sequence can be converted into a frequency domain signal, and the signal can be encrypted in the frequency domain to cover the true information of the signal, thereby protecting the privacy and rights of the signer. At the same time, by retaining some characteristic information of the signature, a more realistic scribbled signature can be generated, improving the accuracy of signature recognition. This technical solution has important application value and technical significance and can be widely applied to fields such as signature recognition and signature protection.
[0064] Figure 2 The following shows a schematic diagram for generating a scribbled envy echo in an exemplary embodiment of the present application, including writing an electronic signature authentication, echoing an image (such as Tan Hongjun), determining whether it is a scribbled handwriting signature. If it is not a scribbled handwriting signature, generating a scribbled handwriting signature, obtaining a mask for preservation, performing an inverse transform to generate a scribbled handwriting signature sequence, and echoing a signature image.
[0065] Such as Figure 3 The following shows a structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present application.
[0066] The electronic device 300 includes a computing unit 301 which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 302 or a computer program loaded from a storage unit 308 into a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the device 300 can also be stored. The computing unit 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0067] A plurality of components in the electronic device 300 are connected to the I / O interface 305, including: an input unit 306, an output unit 307, a storage unit 308, and a communication unit 309. The input unit 306 can be any type of device capable of inputting information into the electronic device 300. The input unit 306 can receive input numerical or character information, and generate key signal inputs related to the user settings and / or function controls of the electronic device. The output unit 307 can be any type of device capable of presenting information, and can include but is not limited to a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 308 can include but is not limited to magnetic disks, optical discs. The communication unit 309 allows the electronic device 300 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks, and can include but is not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0068] The computing unit 301 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 301 include but are not limited to a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 301 executes the various methods and processes described above. For example, it is tangibly included in a machine-readable medium, such as the storage unit 308. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 300 via the ROM 302 and / or the communication unit 309.
[0069] The program code for implementing the methods of the present application can be written in any combination of one or more programming languages. These program codes can be provided to the processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing devices, such that when executed by the processor or controller, the program codes cause the functions / operations specified in the flowchart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, executed partially on the machine as an independent software package and partially on a remote machine, or executed entirely on a remote machine or server.
[0070] In the context of the present application, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0071] As used in the present application, the terms “machine-readable medium” and “computer-readable medium” refer to any computer program product, apparatus, and / or device (e.g., a disk, an optical disk, a memory, a programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term “machine-readable signal” refers to any signal for providing machine instructions and / or data to a programmable processor.
[0072] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, speech input, or tactile input).
[0073] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected to each other by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), and the Internet.
[0074] A computer system can include clients and servers. Clients and servers are generally remote from each other and typically interact through a communication network. The client-server relationship is generated by computer programs that run on the respective computers and have a client-server relationship with each other.
Claims
1. An online signature generation method based on a spectrum mask, characterized in that Calculate the spectral mask between handwritings based on the spectral differences between the online signature and the sample signature, and construct a training dataset containing the spectral mask and the spectral of the sample signature handwriting; Train a deep learning model to predict the handwriting mask of the online signature; generate the online signature spectrum based on the sample handwriting spectrum and the handwriting mask, and obtain the online signature handwriting sequence through inverse transformation.
2. The method according to claim 1, characterized in that Use the DTW algorithm to align the lengths of the sample handwriting and the online handwriting sequence. After alignment, the handwriting sequence undergoes short-time Fourier transform to obtain the handwriting spectra of different online handwriting sequences, calculate the spectral differences between the online handwriting and the sample handwriting, and obtain the spectral mask.
3. The method according to claim 1, characterized in that, Convert the handwriting feature sequence of the sample signature into a frequency-domain signal, obtain its amplitude and phase information, multiply the amplitude of the sample signature by the handwriting mask of the online signature as the amplitude of the online signature, combine the phase information of the online signature, and perform inverse short-time Fourier transform to convert it back to a time-domain signal to obtain the feature sequence of the online signature.
4. The method according to any one of claims 1 to 3, characterized in that In the stage of training the deep learning model, extract any stroke from the sample signature as the current stroke, splice the spectrograms of the first few and the last few stroke segments of the current stroke segment into a comprehensive feature vector, fit the mask of the current stroke, input it into the deep learning model, and learn the correlation between strokes; use the loss function of the regression model, and set the label as the mask of each stroke.
5. The method according to any one of claims 1 to 3, characterized in that According to the sample signature spectrum amplitude |S(f) 2 |, and the online signature spectrum amplitude |Y(f) 2 |, call the formula: Calculate the ideal ratio mask IRM as the online signature spectrum mask.
6. The method according to claim 5, wherein Perform a short-time Fourier transform on the sample signature to obtain the amplitude M of the sample signature spectrum g and the phase θ. According to the online signature spectrum mask IRM, call the formula: M c = M g * IRM to calculate the spectral amplitude M of the online signature c , the spectral amplitude M of the online signature c is combined with the phase θ of the sample signature and the formula is called: Spectrum = M c * e -i*θ to calculate the spectrum Spectrum of the online signature; perform an inverse short-time Fourier transform on the spectrum of the scribbled signature to restore it to the time series of the online signature writing stroke.
7. The method according to any one of claims 1 to 6, characterized in that, The sample signature is a standard non-cursive signature, and the online signature is a cursive signature in different fonts.
8. The method according to claim 7, characterized in that Construct a training dataset based on the spectral amplitude and mask of the non-cursive signature, where the spectral amplitude is used as the input of the regression model and the mask is used as the target label for model training; train the regression model with the training set to fit the mask of the non-cursive signature and infer the corresponding mask of the cursive signature.
9. An electronic device, comprising: Processor; And a memory storing a program, characterized in that the program includes instructions that, when executed by the processor, cause the processor to execute the method for generating an online signature based on a spectral mask according to any one of claims 1-8.
10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, Wherein, The computer instructions are used to cause the computer to execute the method for generating an online signature based on a spectral mask according to any one of claims 1-8.