CN115344893A - Transaction method, device and equipment based on character feature recognition - Google Patents

Transaction method, device and equipment based on character feature recognition Download PDF

Info

Publication number
CN115344893A
CN115344893A CN202211044395.6A CN202211044395A CN115344893A CN 115344893 A CN115344893 A CN 115344893A CN 202211044395 A CN202211044395 A CN 202211044395A CN 115344893 A CN115344893 A CN 115344893A
Authority
CN
China
Prior art keywords
transaction
handwritten signature
signature
plaintext
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211044395.6A
Other languages
Chinese (zh)
Other versions
CN115344893B (en
Inventor
宋华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Chuangfujin Technology Co ltd
Original Assignee
Shenzhen Chuangfujin Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Chuangfujin Technology Co ltd filed Critical Shenzhen Chuangfujin Technology Co ltd
Priority to CN202211044395.6A priority Critical patent/CN115344893B/en
Publication of CN115344893A publication Critical patent/CN115344893A/en
Application granted granted Critical
Publication of CN115344893B publication Critical patent/CN115344893B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Collating Specific Patterns (AREA)

Abstract

The disclosure relates to a transaction method, a transaction device and transaction equipment based on character feature recognition. The method comprises the following steps: decrypting the handwritten signature which encrypts the transaction data in the transaction request according to the public key in the received transaction request to obtain a plaintext of the handwritten signature; determining a target oversampling factor from a preset oversampling factor set and a target undersampling factor from a preset undersampling factor set, and respectively performing oversampling and undersampling on the plaintext of the handwritten signature according to the target oversampling and undersampling factors to obtain an oversampled handwritten signature plaintext and an undersampled handwritten signature plaintext; based on the undersampled handwritten signature plaintext, performing pen point type identification on the oversampled handwritten signature plaintext to obtain a target pen point type; and identifying the type of the target pen point based on a character signature in a pre-configured CA certificate to obtain an identification result for representing the authenticity of the transaction request, and sending the transaction request to a transaction receiver carried in the transaction request when the identification result is true.

Description

Transaction method, device and equipment based on character feature recognition
Technical Field
The present disclosure relates to the field of blockchain transaction technologies, and in particular, to a transaction method, device and apparatus based on character feature recognition.
Background
The block chain is a chain data structure which is decentralized, performs distributed transaction data storage, point-to-point data transaction transmission, a consensus mechanism and an encryption algorithm according to the time sequence generated by the transaction, and ensures the non-tamper and non-counterfeit performance of the transaction data in a cryptographic way. With the continuous development of the blockchain technology, the blockchain brings great convenience to transaction and transaction data voucher storage, and in order to guarantee the security of the transaction, the blockchain transaction data is generally required to be identified.
In some scenarios, trading participants in a blockchain network may not want the trading data disclosed. In this case, the transaction data can be obfuscated and hidden in a mixed currency mode, so that data privacy of transaction participants is protected. However, the mixed currency transaction mode in the related art may also present a security risk, for example, in case of being attacked, the transaction data may be leaked.
Disclosure of Invention
Based on this, it is necessary to provide a transaction method, apparatus and device based on character feature recognition, aiming at the problem that the leakage of transaction data may be caused in case of being attacked.
In a first aspect of the present disclosure, a transaction method based on text feature identification is provided, where the transaction method is applied to any node in a blockchain network, and the method includes:
in response to a received transaction request initiated by a transaction initiator, decrypting a handwritten signature which is carried in the transaction request and used for encrypting transaction data according to a public key carried in the transaction request to obtain a plaintext of the handwritten signature, wherein the handwritten signature is generated after a signature of the transaction initiator is subjected to characteristic sequence arrangement according to a transaction token;
according to the transaction token and the transaction type carried in the transaction request, determining a target oversampling factor from a preset oversampling factor set and a target undersampling factor from a preset undersampling factor set, performing oversampling processing on a plaintext of the decrypted handwritten signature according to the target oversampling factor to obtain an oversampled handwritten signature plaintext, and performing undersampling processing on the plaintext of the decrypted handwritten signature according to the target undersampling factor to obtain an undersampled handwritten signature plaintext;
determining descriptor pen points according to the trend of each stroke in the undersampled handwritten signature plaintext, and determining a plurality of vertical vectors and a plurality of tangent vectors aiming at the undersampled handwritten signature plaintext according to the trend of the stroke at each descriptor pen point, wherein the vertical vectors are perpendicular to the trend of the stroke at the descriptor pen points, and the tangent vectors are tangent to the trend of the stroke at the descriptor pen points;
according to the plurality of vertical vectors and the plurality of tangent vectors, performing pen point feature extraction on an undersampled handwritten signature plaintext to obtain pen point features of the handwritten signature, and according to the pen point features and the number of descriptor pen points, performing pen point type identification on the oversampled handwritten signature plaintext to obtain a target pen point type;
and identifying the type of the target pen point based on a character signature in a pre-configured CA certificate to obtain an identification result for representing the authenticity of the transaction request, and sending the transaction request to a transaction receiver carried in the transaction request under the condition that the identification result represents that the transaction contract is true.
In one embodiment, the method further comprises:
under the condition that the authentication result represents that the transaction contract is false, authentication failure information is sent to the transaction initiator, and the authentication failure information is used for indicating the transaction initiator to send a CA certificate change request;
under the condition that a CA certificate change request sent by the transaction initiator is received within a preset time length, replacing a character signature in the pre-configured CA certificate by a handwriting signature carried in the CA certificate change request, wherein the CA certificate change request is generated under the condition that a new handwriting signature is received after the character signature in the pre-configured CA certificate is confirmed to be invalid;
and after the character signature in the pre-configured CA certificate is replaced by the handwritten signature carried in the CA certificate change request, identifying the type of the target pen point by the handwritten signature carried in the CA certificate change request to obtain an authentication result representing the authenticity of the transaction request.
In one embodiment, the step of decrypting, in response to a received transaction request initiated by a transaction initiator, a handwritten signature carried in the transaction request and used for encrypting transaction data according to a public key carried in the transaction request to obtain a plaintext of the handwritten signature includes:
in response to a received transaction request initiated by a transaction initiator, determining a target decryption model from preset decryption models according to a handwritten signature type selected by the transaction initiator carried in the transaction request;
mapping the target decryption model into a blockchain network node that received the transaction request;
inputting the transaction request into the target decryption model, so that the target decryption model decrypts the handwritten signature carried in the transaction request and used for encrypting the transaction data according to the public key carried in the transaction request, and a plaintext of the handwritten signature is obtained;
and reconstructing the public key of the handwritten signature sample based on the Bezier curve to generate the decryption model.
In one embodiment, the decryption model is trained as follows:
calculating the similar attributes of adjacent characters in the public key of the handwritten signature sample, wherein the similar attributes are determined according to the relative relation of the contour vertexes of the adjacent characters;
taking the number of the relative contour vertexes as the curve order of the Bezier curve, and taking the contour vertexes as control points of the Bezier curve to obtain a target Bezier curve;
and gradually increasing the proportionality coefficient of the target Bezier curve to obtain a drawn curve, and taking the drawn curve as the outline of the public key of the handwritten signature sample to obtain the decryption model.
In one embodiment, the step of calculating the close attributes of adjacent characters in the public key of the handwritten signature sample includes:
connecting each contour point in the public key with adjacent contour points to form a contour point triangle;
determining contour point vectors of the contour points according to the next stroke of each contour point in the contour point triangle, and determining sign attributes of the contour point triangle according to the sum of the contour point vectors of each contour point in the contour point triangle, wherein if the sum of the contour point vectors is a regular sign attribute, the sign attributes are positive, and if the sum of the contour point vectors is negative, the sign attributes are negative;
and determining the similar attributes of the adjacent characters in the public key of the handwritten signature sample according to the number of the same or different symbol attributes of the adjacent characters.
In one embodiment, the step of determining descriptor pen points according to the trend of each stroke in the undersampled handwritten signature plain text comprises:
and under the condition that the direction of the stroke in the undersampled handwritten signature plain text is different from the direction of the previous stroke and the direction of the stroke of the latter stroke, determining the stroke as a descriptor stroke point.
In one embodiment, the step of determining a plurality of vertical vectors and a plurality of tangent vectors for the undersampled handwritten signature plaintext according to the stroke direction at each descriptor point comprises:
making a tangent line and a perpendicular line of the trend of the stroke at each descriptor point to obtain a vertical quantity and a tangent vector of the descriptor point;
and taking the vertical vector and the tangent vector of each descriptor pen point as a plurality of vertical vectors and a plurality of tangent vectors of the plaintext of the undersampled handwritten signature.
In a second aspect of the present disclosure, a transaction device based on character feature recognition is provided, the device including:
the decryption module is configured to respond to a received transaction request initiated by a transaction initiator, decrypt a handwritten signature which is carried in the transaction request and used for encrypting transaction data according to a public key carried in the transaction request, and obtain a plaintext of the handwritten signature, wherein the handwritten signature is generated after a signature of the transaction initiator is subjected to characteristic sequence arrangement according to a transaction token;
a first determining module, configured to determine a target oversampling factor from a preset oversampling factor set and a target under-sampling factor from a preset under-sampling factor set according to the transaction token and the transaction type carried in the transaction request, perform oversampling processing on a plaintext of the decrypted handwritten signature according to the target oversampling factor to obtain an oversampled handwritten signature plaintext, and perform under-sampling processing on the plaintext of the decrypted handwritten signature according to the target under-sampling factor to obtain an under-sampled handwritten signature plaintext;
a second determining module configured to determine descriptor pen points according to the trends of all the strokes in the undersampled handwritten signature plain text, and determine a plurality of vertical vectors and a plurality of tangent vectors for the undersampled handwritten signature plain text according to the trends of the strokes at all the descriptor pen points, wherein the vertical vectors are perpendicular to the trends of the strokes at the descriptor pen points, and the tangent vectors are tangent to the trends of the strokes at the descriptor pen points;
a third determining module, configured to perform pen point feature extraction on an undersampled handwritten signature plaintext according to the plurality of vertical vectors and the plurality of tangent vectors to obtain pen point features of the handwritten signature, and perform pen point type recognition on the oversampled handwritten signature plaintext according to the pen point features and the number of descriptor pen points to obtain a target pen point type;
and the sending module is configured to identify the type of the target pen point based on a character signature in a pre-configured CA certificate to obtain an authentication result representing the authenticity of the transaction request, and send the transaction request to a transaction receiver carried in the transaction request under the condition that the authentication result represents that the transaction contract is true.
In one embodiment, the sending module is further configured to:
under the condition that the authentication result represents that the transaction contract is false, authentication failure information is sent to the transaction initiator, and the authentication failure information is used for indicating the transaction initiator to send a CA certificate change request;
under the condition that a CA certificate change request sent by the transaction initiator is received within a preset time length, replacing a character signature in the pre-configured CA certificate by a handwriting signature carried in the CA certificate change request, wherein the CA certificate change request is generated under the condition that a new handwriting signature is received after the character signature in the pre-configured CA certificate is confirmed to be invalid;
and after the character signature in the pre-configured CA certificate is replaced by the handwritten signature carried in the CA certificate change request, identifying the type of the target pen point by the handwritten signature carried in the CA certificate change request to obtain an identification result for representing the authenticity of the transaction request.
In one embodiment, the decryption module is configured to:
in response to a received transaction request initiated by a transaction initiator, determining a target decryption model from preset decryption models according to a handwritten signature type selected by the transaction initiator carried in the transaction request;
mapping the target decryption model into a blockchain network node that received the transaction request;
inputting the transaction request into the target decryption model, so that the target decryption model decrypts the handwritten signature carried in the transaction request and used for encrypting the transaction data according to the public key carried in the transaction request, and a plaintext of the handwritten signature is obtained;
and reconstructing the public key of the handwritten signature sample based on the Bezier curve to generate the decryption model.
In one embodiment, the decryption model is trained as follows:
calculating the similar attributes of adjacent characters in the public key of the handwritten signature sample, wherein the similar attributes are determined according to the relative relation of the contour vertexes of the adjacent characters;
taking the number of the relative contour vertexes as the curve order of the Bezier curve, and taking the contour vertexes as control points of the Bezier curve to obtain a target Bezier curve;
and gradually increasing the proportionality coefficient of the target Bezier curve to obtain a drawn curve, and taking the drawn curve as the outline of the public key of the handwritten signature sample to obtain the decryption model.
In one embodiment, the step of calculating the close attributes of adjacent characters in the public key of the handwritten signature sample includes:
connecting each contour point in the public key with adjacent contour points to form a contour point triangle;
determining contour point vectors of the contour points according to the next stroke of each contour point in the contour point triangle, and determining sign attributes of the contour point triangle according to the sum of the contour point vectors of each contour point in the contour point triangle, wherein if the sum of the contour point vectors is a regular sign attribute, the sign attributes are positive, and if the sum of the contour point vectors is negative, the sign attributes are negative;
and determining the similar attributes of the adjacent characters in the public key of the handwritten signature sample according to the number of the same or different symbol attributes of the adjacent characters.
In one embodiment, the second determining module is configured to determine that the stroke is a descriptor stroke point if the stroke in the undersampled handwritten signature plaintext is different in orientation from the previous stroke and the next stroke.
In one embodiment, the second determining module is configured to:
making a tangent line and a perpendicular line of the trend of the stroke at each descriptor point to obtain a vertical quantity and a tangent vector of the descriptor point;
and taking the vertical vector and the tangent vector of each descriptor pen point as a plurality of vertical vectors and a plurality of tangent vectors of the plaintext of the undersampled handwritten signature.
In a third aspect of the present disclosure, an electronic device is provided, including:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to implement the steps of the text feature recognition based transaction method of any one of the first aspect.
The transaction method based on character feature recognition decrypts a handwritten signature which is carried in a transaction request and used for encrypting transaction data according to a public key carried in the transaction request in response to the received transaction request initiated by a transaction initiator to obtain a plaintext of the handwritten signature, wherein the handwritten signature is generated after feature sequence arrangement is carried out on the signature of the transaction initiator according to a transaction token; according to the transaction token and the transaction type carried in the transaction request, determining a target oversampling factor from a preset oversampling factor set and a target undersampling factor from a preset undersampling factor set, performing oversampling processing on a plaintext of the decrypted handwritten signature according to the target oversampling factor to obtain an oversampled handwritten signature plaintext, and performing undersampling processing on the plaintext of the decrypted handwritten signature according to the target undersampling factor to obtain an undersampled handwritten signature plaintext; determining descriptor pen points according to the trends of all strokes in the undersampled handwritten signature plain text, and determining a plurality of vertical vectors and a plurality of tangent vectors aiming at the undersampled handwritten signature plain text according to the trends of the strokes at all the descriptor pen points, wherein the vertical vectors are perpendicular to the trends of the strokes at the descriptor pen points, and the tangent vectors are tangent to the trends of the strokes at the descriptor pen points; performing pen point feature extraction on an undersampled handwritten signature plaintext according to the plurality of vertical vectors and the plurality of tangent vectors to obtain pen point features of the handwritten signature, and performing pen point type identification on the oversampled handwritten signature plaintext according to the pen point features and the number of the descriptor pen points to obtain a target pen point type; and identifying the type of the target pen point based on a character signature in a pre-configured CA certificate to obtain an identification result representing the authenticity of the transaction request, and sending the transaction request to a transaction receiver carried in the transaction request under the condition that the identification result represents that the transaction contract is true. The security of the transaction data is improved, the security of the transaction data can be ensured even if the transaction data is attacked, and the anti-leakage performance is improved.
Drawings
Fig. 1 is a flowchart of a transaction method based on text feature recognition according to an embodiment.
FIG. 2 is a block diagram of a transaction device based on text feature recognition according to one embodiment.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present disclosure more comprehensible, embodiments accompanying the present disclosure are described in detail below. In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure. This disclosure may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or to implicitly indicate the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the feature.
Fig. 1 is a flowchart of a transaction method based on text feature recognition according to an embodiment, the transaction method is applied to any node in a blockchain network, as shown in fig. 1, and the method includes the following steps:
in step S11, in response to a received transaction request initiated by a transaction initiator, decrypting a handwritten signature carried in the transaction request and used for encrypting transaction data according to a public key carried in the transaction request to obtain a plaintext of the handwritten signature, where the handwritten signature is generated after performing feature sequence arrangement on a signature of the transaction initiator according to a transaction token;
generating a handwritten signature after arranging a characteristic sequence of the signature of the transaction initiator according to the transaction token comprises: extracting features of the signature according to a writing sequence, determining continuous probabilities between every two features, sequencing the features according to the continuous probabilities according to the established association relationship between the features and the writing time stamp and the transaction token, and mapping the sequenced continuous probabilities and the association relationship between the features and the writing time stamp to obtain the handwritten signature.
In the embodiment of the disclosure, a private key may be queried from a block chain node according to a public key carried in the transaction request, and then a handwritten signature carried in the transaction request and used for encrypting transaction data is decrypted by the private key to obtain a plaintext of the handwritten signature.
In step S12, according to the transaction token and the transaction type carried in the transaction request, determining a target oversampling factor from a preset oversampling factor set and a target undersampling factor from a preset undersampling factor set, and performing oversampling processing on the plaintext of the decrypted handwritten signature according to the target oversampling factor to obtain an oversampled handwritten signature plaintext, and performing undersampling processing on the plaintext of the decrypted handwritten signature according to the target undersampling factor to obtain an undersampled handwritten signature plaintext;
the transaction token is generated according to a preset safety address of the transaction initiator terminal device, and the transaction type is determined according to the transaction grade and the transaction industry. And similarly, the preset under-sampling factor set is combined with the target under-sampling factor corresponding to the transaction token and the transaction type.
In step S13, determining descriptor pen points according to the trend of each stroke in the undersampled handwritten signature plaintext, and determining a plurality of vertical vectors and a plurality of tangent vectors for the undersampled handwritten signature plaintext according to the trend of each stroke at the descriptor pen points, wherein the vertical vectors are perpendicular to the trend of the strokes at the descriptor pen points, and the tangent vectors are tangent to the trend of the strokes at the descriptor pen points;
in step S14, performing pen point feature extraction on the undersampled handwritten signature plaintext according to the plurality of vertical vectors and the plurality of tangent vectors to obtain pen point features of the handwritten signature, and performing pen point type identification on the oversampled handwritten signature plaintext according to the pen point features and the number of descriptor pen points to obtain a target pen point type;
in step S15, based on a character signature in a pre-configured CA certificate, the type of the target point is identified to obtain an authentication result representing authenticity of the transaction request, and the transaction request is sent to a transaction receiver carried in the transaction request when the authentication result represents that the transaction contract is true.
And obtaining an authentication result representing that the transaction request is true under the condition that the character signature in the pre-configured CA certificate is matched with the type of the target pen point, and obtaining an authentication result representing that the transaction request is false under the condition that the character signature in the pre-configured CA certificate is not matched with the type of the target pen point.
The transaction method based on character feature recognition decrypts a handwritten signature which is carried in a transaction request and used for encrypting transaction data according to a public key carried in the transaction request in response to the received transaction request initiated by a transaction initiator to obtain a plaintext of the handwritten signature, wherein the handwritten signature is generated after feature sequence arrangement is carried out on the signature of the transaction initiator according to a transaction token; according to the transaction token and the transaction type carried in the transaction request, determining a target oversampling factor from a preset oversampling factor set and a target undersampling factor from a preset undersampling factor set, performing oversampling processing on a plaintext of the decrypted handwritten signature according to the target oversampling factor to obtain an oversampled handwritten signature plaintext, and performing undersampling processing on the plaintext of the decrypted handwritten signature according to the target undersampling factor to obtain an undersampled handwritten signature plaintext; determining descriptor pen points according to the trends of all strokes in the undersampled handwritten signature plain text, and determining a plurality of vertical vectors and a plurality of tangent vectors aiming at the undersampled handwritten signature plain text according to the trends of the strokes at all the descriptor pen points, wherein the vertical vectors are perpendicular to the trends of the strokes at the descriptor pen points, and the tangent vectors are tangent to the trends of the strokes at the descriptor pen points; according to the plurality of vertical vectors and the plurality of tangent vectors, performing pen point feature extraction on an undersampled handwritten signature plaintext to obtain pen point features of the handwritten signature, and according to the pen point features and the number of descriptor pen points, performing pen point type identification on the oversampled handwritten signature plaintext to obtain a target pen point type; and identifying the type of the target pen point based on a character signature in a pre-configured CA certificate to obtain an identification result representing the authenticity of the transaction request, and sending the transaction request to a transaction receiver carried in the transaction request under the condition that the identification result represents that the transaction contract is true. The security of the transaction data is improved, the security of the transaction data can be ensured even if the transaction data is attacked, and the anti-leakage performance is improved.
In one embodiment, the method further comprises:
under the condition that the authentication result represents that the transaction contract is false, authentication failure information is sent to the transaction initiator, and the authentication failure information is used for indicating the transaction initiator to send a CA certificate change request;
under the condition that a CA certificate change request sent by the transaction initiator is received within a preset time length, replacing a character signature in the pre-configured CA certificate by a handwriting signature carried in the CA certificate change request, wherein the CA certificate change request is generated under the condition that a new handwriting signature is received after the character signature in the pre-configured CA certificate is confirmed to be invalid;
and after the character signature in the pre-configured CA certificate is replaced by the handwritten signature carried in the CA certificate change request, identifying the type of the target pen point by the handwritten signature carried in the CA certificate change request to obtain an authentication result representing the authenticity of the transaction request.
In one embodiment, in step S11, in response to a received transaction request initiated by a transaction initiator, the step of decrypting, according to a public key carried in the transaction request, a handwritten signature carried in the transaction request and used for encrypting transaction data to obtain a plaintext of the handwritten signature includes:
in response to a received transaction request initiated by a transaction initiator, determining a target decryption model from preset decryption models according to a handwritten signature type selected by the transaction initiator carried in the transaction request;
mapping the target decryption model into a blockchain network node that received the transaction request;
inputting the transaction request into the target decryption model, so that the target decryption model decrypts the handwritten signature carried in the transaction request and used for encrypting the transaction data according to the public key carried in the transaction request, and a plaintext of the handwritten signature is obtained;
and reconstructing the public key of the handwritten signature sample based on the Bezier curve to generate the decryption model.
In one embodiment, the decryption model is trained as follows:
calculating the similar attributes of adjacent characters in the public key of the handwritten signature sample, wherein the similar attributes are determined according to the relative relation of the contour vertexes of the adjacent characters;
taking the number of the relative contour vertexes as the curve order of the Bezier curve, and taking the contour vertexes as control points of the Bezier curve to obtain a target Bezier curve;
and gradually increasing the proportionality coefficient of the target Bezier curve to obtain a drawn curve, and taking the drawn curve as the outline of the public key of the handwritten signature sample to obtain the decryption model.
In one embodiment, the step of calculating the close attributes of adjacent characters in the public key of the handwritten signature sample includes:
connecting each contour point in the public key with adjacent contour points to form a contour point triangle;
determining contour point vectors of the contour points according to the next stroke of each contour point in the contour point triangle, and determining sign attributes of the contour point triangle according to the sum of the contour point vectors of each contour point in the contour point triangle, wherein if the sum of the contour point vectors is a regular sign attribute, the sign attributes are positive, and if the sum of the contour point vectors is negative, the sign attributes are negative;
and determining the similar attributes of the adjacent characters in the public key of the handwritten signature sample according to the number of the same or different symbol attributes of the adjacent characters.
In one embodiment, the step of determining descriptor pen points according to the trend of each stroke in the undersampled handwritten signature plain text comprises:
and under the condition that the direction of the stroke in the undersampled handwritten signature plain text is different from the direction of the previous stroke and the direction of the stroke of the latter stroke, determining the stroke as a descriptor stroke point.
In one embodiment, the step of determining a plurality of vertical vectors and a plurality of tangent vectors for the undersampled handwritten signature plaintext according to the trend of the strokes at each of the descriptor strokes comprises:
making a tangent line and a perpendicular line of the trend of the stroke at each descriptor point to obtain a vertical quantity and a tangent vector of the descriptor point;
and taking the vertical vector and the tangent vector of each descriptor pen point as a plurality of vertical vectors and a plurality of tangent vectors of the plaintext of the undersampled handwritten signature.
Based on the same inventive concept, the embodiment of the present disclosure further provides a transaction apparatus based on text feature recognition, and fig. 2 is a block diagram of the transaction apparatus based on text feature recognition according to one embodiment, and referring to fig. 2, the apparatus 200 includes:
the decryption module 210 is configured to, in response to a received transaction request initiated by a transaction initiator, decrypt a handwritten signature carried in the transaction request and used for encrypting transaction data according to a public key carried in the transaction request to obtain a plaintext of the handwritten signature, where the handwritten signature is generated after a signature of the transaction initiator is subjected to feature sequence arrangement according to a transaction token;
a first determining module 220, configured to determine a target oversampling factor from a preset oversampling factor set and a target under-sampling factor from a preset under-sampling factor set according to the transaction token and the transaction type carried in the transaction request, perform oversampling processing on a plaintext of the decrypted handwritten signature according to the target oversampling factor to obtain an oversampled handwritten signature plaintext, and perform under-sampling processing on the plaintext of the decrypted handwritten signature according to the target under-sampling factor to obtain an under-sampled handwritten signature plaintext;
a second determining module 230 configured to determine descriptor pen points according to the trends of the strokes in the undersampled handwritten signature plaintext, and determine a plurality of vertical vectors and a plurality of tangent vectors for the undersampled handwritten signature plaintext according to the trends of the strokes at the descriptor pen points, wherein the vertical vectors are perpendicular to the trends of the strokes at the descriptor pen points, and the tangent vectors are tangent to the trends of the strokes at the descriptor pen points;
a third determining module 240, configured to perform pen point feature extraction on an undersampled handwritten signature plaintext according to the plurality of vertical vectors and the plurality of tangent vectors to obtain pen point features of the handwritten signature, and perform pen point type recognition on the oversampled handwritten signature plaintext according to the pen point features and the number of the descriptor pen points to obtain a target pen point type;
a sending module 250, configured to identify the type of the target point based on a text signature in a preconfigured CA certificate, obtain an authentication result representing authenticity of the transaction request, and send the transaction request to a transaction receiver carried in the transaction request when the authentication result represents that the transaction contract is true.
In one embodiment, the sending module 250 is further configured to:
under the condition that the authentication result represents that the transaction contract is false, authentication failure information is sent to the transaction initiator, and the authentication failure information is used for indicating the transaction initiator to send a CA certificate change request;
under the condition that a CA certificate change request sent by the transaction initiator is received within a preset time length, replacing a character signature in the pre-configured CA certificate by a handwriting signature carried in the CA certificate change request, wherein the CA certificate change request is generated under the condition that a new handwriting signature is received after the character signature in the pre-configured CA certificate is confirmed to be invalid;
and after the character signature in the pre-configured CA certificate is replaced by the handwritten signature carried in the CA certificate change request, identifying the type of the target pen point by the handwritten signature carried in the CA certificate change request to obtain an authentication result representing the authenticity of the transaction request.
In one embodiment, the decryption module 210 is configured to:
in response to a received transaction request initiated by a transaction initiator, determining a target decryption model from preset decryption models according to a handwritten signature type selected by the transaction initiator carried in the transaction request;
mapping the target decryption model into a blockchain network node that received the transaction request;
inputting the transaction request into the target decryption model, so that the target decryption model decrypts the handwritten signature carried in the transaction request and used for encrypting the transaction data according to the public key carried in the transaction request, and a plaintext of the handwritten signature is obtained;
and reconstructing the public key of the handwritten signature sample based on the Bezier curve to generate the decryption model.
In one embodiment, the decryption model is trained as follows:
calculating the similar attributes of adjacent characters in the public key of the handwritten signature sample, wherein the similar attributes are determined according to the relative relation of the contour vertexes of the adjacent characters;
taking the number of the relative contour vertexes as the curve order of the Bezier curve, and taking the contour vertexes as control points of the Bezier curve to obtain a target Bezier curve;
and gradually increasing the proportionality coefficient of the target Bezier curve to obtain a drawn curve, and taking the drawn curve as the outline of the public key of the handwritten signature sample to obtain the decryption model.
In one embodiment, the step of calculating the close attributes of adjacent characters in the public key of the handwritten signature sample includes:
connecting each contour point in the public key with adjacent contour points to form a contour point triangle;
determining contour point vectors of the contour points according to the next stroke of each contour point in the contour point triangle, and determining sign attributes of the contour point triangle according to the sum of the contour point vectors of each contour point in the contour point triangle, wherein if the sum of the contour point vectors is a regular sign attribute, the sign attributes are positive, and if the sum of the contour point vectors is negative, the sign attributes are negative;
and determining the similar attributes of the adjacent characters in the public key of the handwritten signature sample according to the number of the same or different symbol attributes of the adjacent characters.
In one embodiment, the second determining module 230 is configured to determine that the stroke is a descriptor stroke point if the stroke in the undersampled handwritten signature plaintext is different from the previous stroke and the next stroke.
In one embodiment, the second determining module 230 is configured to:
making a tangent line and a perpendicular line of the trend of the stroke at each descriptor point to obtain a vertical quantity and a tangent vector of the descriptor point;
and taking the vertical vector and the tangent vector of each descriptor pen point as a plurality of vertical vectors and a plurality of tangent vectors of the plaintext of the undersampled handwritten signature.
An embodiment of the present disclosure further provides an electronic device, including:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to implement the steps of any of the foregoing character feature recognition-based transaction methods.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-described embodiments are merely illustrative of several embodiments of the present disclosure, which are described in more detail and detailed, but are not to be construed as limiting the scope of the disclosure. It should be noted that, for those skilled in the art, various changes and modifications can be made without departing from the concept of the present disclosure, and these changes and modifications are all within the scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to the appended claims.

Claims (10)

1. A transaction method based on character feature recognition is applied to any node in a block chain network, and the method comprises the following steps:
in response to a received transaction request initiated by a transaction initiator, decrypting a handwritten signature which is carried in the transaction request and used for encrypting transaction data according to a public key carried in the transaction request to obtain a plaintext of the handwritten signature, wherein the handwritten signature is generated after a signature of the transaction initiator is subjected to characteristic sequence arrangement according to a transaction token;
according to the transaction token and the transaction type carried in the transaction request, determining a target oversampling factor from a preset oversampling factor set and a target undersampling factor from a preset undersampling factor set, performing oversampling processing on a plaintext of the decrypted handwritten signature according to the target oversampling factor to obtain an oversampled handwritten signature plaintext, and performing undersampling processing on the plaintext of the decrypted handwritten signature according to the target undersampling factor to obtain an undersampled handwritten signature plaintext;
determining descriptor pen points according to the trends of all strokes in the undersampled handwritten signature plain text, and determining a plurality of vertical vectors and a plurality of tangent vectors aiming at the undersampled handwritten signature plain text according to the trends of the strokes at all the descriptor pen points, wherein the vertical vectors are perpendicular to the trends of the strokes at the descriptor pen points, and the tangent vectors are tangent to the trends of the strokes at the descriptor pen points;
according to the plurality of vertical vectors and the plurality of tangent vectors, performing pen point feature extraction on an undersampled handwritten signature plaintext to obtain pen point features of the handwritten signature, and according to the pen point features and the number of descriptor pen points, performing pen point type identification on the oversampled handwritten signature plaintext to obtain a target pen point type;
and identifying the type of the target pen point based on a character signature in a pre-configured CA certificate to obtain an identification result for representing the authenticity of the transaction request, and sending the transaction request to a transaction receiver carried in the transaction request under the condition that the identification result represents that the transaction contract is true.
2. The method of claim 1, further comprising:
under the condition that the authentication result represents that the transaction contract is false, authentication failure information is sent to the transaction initiator, and the authentication failure information is used for indicating the transaction initiator to send a CA certificate change request;
under the condition that a CA certificate change request sent by the transaction initiator is received within a preset time length, replacing a character signature in the pre-configured CA certificate by a handwriting signature carried in the CA certificate change request, wherein the CA certificate change request is generated under the condition that a new handwriting signature is received after the character signature in the pre-configured CA certificate is confirmed to be invalid;
and after the character signature in the pre-configured CA certificate is replaced by the handwritten signature carried in the CA certificate change request, identifying the type of the target pen point by the handwritten signature carried in the CA certificate change request to obtain an authentication result representing the authenticity of the transaction request.
3. The method according to claim 1, wherein the step of decrypting the handwritten signature carried in the transaction request for encrypting the transaction data according to the public key carried in the transaction request in response to the received transaction request initiated by the transaction initiator to obtain the plaintext of the handwritten signature comprises:
in response to a received transaction request initiated by a transaction initiator, determining a target decryption model from preset decryption models according to a handwritten signature type selected by the transaction initiator carried in the transaction request;
mapping the target decryption model into a blockchain network node that received the transaction request;
inputting the transaction request into the target decryption model, so that the target decryption model decrypts the handwritten signature carried in the transaction request and used for encrypting the transaction data according to the public key carried in the transaction request, and a plaintext of the handwritten signature is obtained;
and reconstructing the public key of the handwritten signature sample based on the Bezier curve to generate the decryption model.
4. The method of claim 3, wherein the decryption model is trained by:
calculating the similar attributes of adjacent characters in the public key of the handwritten signature sample, wherein the similar attributes are determined according to the relative relation of the contour vertexes of the adjacent characters;
taking the number of the contour vertexes as the curve order of the Bezier curve, and taking the contour vertexes as control points of the Bezier curve to obtain a target Bezier curve;
and gradually increasing the proportionality coefficient of the target Bezier curve to obtain a drawn curve, and taking the drawn curve as the outline of the public key of the handwritten signature sample to obtain the decryption model.
5. The method of claim 4, wherein the step of calculating the close attributes of adjacent characters in the public key of the handwritten signature samples comprises:
connecting each contour point in the public key with adjacent contour points to form a contour point triangle;
determining contour point vectors of the contour points according to the next stroke of each contour point in the contour point triangle, and determining sign attributes of the contour point triangle according to the sum of the contour point vectors of each contour point in the contour point triangle, wherein if the sum of the contour point vectors is a regular sign attribute, the sign attributes are positive, and if the sum of the contour point vectors is negative, the sign attributes are negative;
and determining the similar attributes of the adjacent characters in the public key of the handwritten signature sample according to the number of the same or different symbol attributes of the adjacent characters.
6. The method according to any of claims 1-5, wherein the step of determining descriptor pen points based on the trend of each stroke in the undersampled handwritten signature plaintext comprises:
and under the condition that the direction of the stroke in the undersampled handwritten signature plain text is different from the direction of the previous stroke and the direction of the stroke of the latter stroke, determining the stroke as a descriptor stroke point.
7. The method of any one of claims 1-5, wherein the step of determining a plurality of perpendicular vectors and a plurality of tangent vectors for the undersampled handwritten signature plaintext from the orientation of the stroke at each of the descriptor points comprises:
making a tangent line and a perpendicular line of the trend of the stroke at each descriptor point to obtain a vertical quantity and a tangent vector of the descriptor point;
and taking the vertical vector and the tangent vector of each descriptor pen point as a plurality of vertical vectors and a plurality of tangent vectors of the plaintext of the undersampled handwritten signature.
8. A transaction device based on character feature recognition, the device comprising:
the decryption module is configured to respond to a received transaction request initiated by a transaction initiator, decrypt a handwritten signature which is carried in the transaction request and used for encrypting transaction data according to a public key carried in the transaction request, and obtain a plaintext of the handwritten signature, wherein the handwritten signature is generated after a signature of the transaction initiator is subjected to characteristic sequence arrangement according to a transaction token;
a first determining module, configured to determine a target oversampling factor from a preset oversampling factor set and a target under-sampling factor from a preset under-sampling factor set according to the transaction token and the transaction type carried in the transaction request, perform oversampling processing on a plaintext of the decrypted handwritten signature according to the target oversampling factor to obtain an oversampled handwritten signature plaintext, and perform under-sampling processing on the plaintext of the decrypted handwritten signature according to the target under-sampling factor to obtain an under-sampled handwritten signature plaintext;
a second determining module configured to determine descriptor pen points according to the trends of all the strokes in the undersampled handwritten signature plain text, and determine a plurality of vertical vectors and a plurality of tangent vectors for the undersampled handwritten signature plain text according to the trends of the strokes at all the descriptor pen points, wherein the vertical vectors are perpendicular to the trends of the strokes at the descriptor pen points, and the tangent vectors are tangent to the trends of the strokes at the descriptor pen points;
a third determining module, configured to perform pen point feature extraction on an undersampled handwritten signature plaintext according to the plurality of vertical vectors and the plurality of tangent vectors to obtain pen point features of the handwritten signature, and perform pen point type recognition on the oversampled handwritten signature plaintext according to the pen point features and the number of descriptor pen points to obtain a target pen point type;
and the sending module is configured to identify the type of the target pen point based on a character signature in a pre-configured CA certificate to obtain an authentication result representing the authenticity of the transaction request, and send the transaction request to a transaction receiver carried in the transaction request under the condition that the authentication result represents that the transaction contract is true.
9. The apparatus of claim 8, wherein the transmitting module is further configured to:
under the condition that the authentication result indicates that the transaction contract is false, authentication failure information is sent to the transaction initiator, and the authentication failure information is used for indicating the transaction initiator to send a CA certificate change request;
under the condition that a CA certificate change request sent by the transaction initiator is received within a preset time length, replacing a character signature in the pre-configured CA certificate by a handwriting signature carried in the CA certificate change request, wherein the CA certificate change request is generated under the condition that a new handwriting signature is received after the character signature in the pre-configured CA certificate is confirmed to be invalid;
and after the character signature in the pre-configured CA certificate is replaced by the handwritten signature carried in the CA certificate change request, identifying the type of the target pen point by the handwritten signature carried in the CA certificate change request to obtain an authentication result representing the authenticity of the transaction request.
10. An electronic device, comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to implement the steps of the character recognition-based transaction method of any one of claims 1-7.
CN202211044395.6A 2022-08-30 2022-08-30 Transaction method, device and equipment based on character feature recognition Active CN115344893B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211044395.6A CN115344893B (en) 2022-08-30 2022-08-30 Transaction method, device and equipment based on character feature recognition

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211044395.6A CN115344893B (en) 2022-08-30 2022-08-30 Transaction method, device and equipment based on character feature recognition

Publications (2)

Publication Number Publication Date
CN115344893A true CN115344893A (en) 2022-11-15
CN115344893B CN115344893B (en) 2023-03-28

Family

ID=83953127

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211044395.6A Active CN115344893B (en) 2022-08-30 2022-08-30 Transaction method, device and equipment based on character feature recognition

Country Status (1)

Country Link
CN (1) CN115344893B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106407874A (en) * 2016-03-25 2017-02-15 东南大学 Handwriting recognition method based on handwriting coordinate sequence
US20180060608A1 (en) * 2016-08-30 2018-03-01 Wacom Co., Ltd. Authentication and secure transmission of data between signature devices and host computers using transport layer security
CN109829317A (en) * 2018-12-14 2019-05-31 平安科技(深圳)有限公司 A kind of method, apparatus and system generating electronic contract based on handwritten signature picture
CN111915302A (en) * 2020-08-05 2020-11-10 腾讯科技(深圳)有限公司 Associated data processing method and device, electronic equipment and computer readable medium
CN114143008A (en) * 2021-11-10 2022-03-04 重庆傲雄在线信息技术有限公司 HASH-based electronic signature encryption and decryption method and system
CN114529910A (en) * 2022-01-27 2022-05-24 北京鼎事兴教育咨询有限公司 Handwritten character recognition method and device, storage medium and electronic equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106407874A (en) * 2016-03-25 2017-02-15 东南大学 Handwriting recognition method based on handwriting coordinate sequence
US20180060608A1 (en) * 2016-08-30 2018-03-01 Wacom Co., Ltd. Authentication and secure transmission of data between signature devices and host computers using transport layer security
CN109829317A (en) * 2018-12-14 2019-05-31 平安科技(深圳)有限公司 A kind of method, apparatus and system generating electronic contract based on handwritten signature picture
CN111915302A (en) * 2020-08-05 2020-11-10 腾讯科技(深圳)有限公司 Associated data processing method and device, electronic equipment and computer readable medium
CN114143008A (en) * 2021-11-10 2022-03-04 重庆傲雄在线信息技术有限公司 HASH-based electronic signature encryption and decryption method and system
CN114529910A (en) * 2022-01-27 2022-05-24 北京鼎事兴教育咨询有限公司 Handwritten character recognition method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN115344893B (en) 2023-03-28

Similar Documents

Publication Publication Date Title
CN110457945B (en) List query method, query party device, service party device and storage medium
US11227037B2 (en) Computer system, verification method of confidential information, and computer
CN111222178B (en) Data signature method and device
CN109948347A (en) A kind of date storage method and device, server and readable storage medium storing program for executing
CN110598433B (en) Block chain-based anti-fake information processing method and device
CN112434319A (en) Data encryption method and device for electronic file
CN107665314B (en) The trusted processes method and device signed on the electronic document
CN113610526A (en) Data trust method and device, electronic equipment and storage medium
CN114386058A (en) Model file encryption and decryption method and device
EP2286610B1 (en) Techniques for peforming symmetric cryptography
CN115344893B (en) Transaction method, device and equipment based on character feature recognition
CN109768969B (en) Authority control method, Internet of things terminal and electronic equipment
CN105809494A (en) method and system for invoice generation and invoice verification
CN111475690B (en) Character string matching method and device, data detection method and server
CN111935163B (en) Data joint processing method and device for protecting privacy
CN114244518A (en) Digital signature confusion encryption method and device, computer equipment and storage medium
CN113901502A (en) Data processing method and device, electronic equipment and storage medium
CN113505348A (en) Data watermark embedding method, data watermark verifying method and data watermark verifying device
JPWO2017209228A1 (en) Encrypted information verification device, encrypted information verification method, and encrypted information verification program
CN110768782A (en) Anti-quantum computation RFID authentication method and system based on asymmetric key pool and IBS
CN115174260B (en) Data verification method, device, computer, storage medium and program product
JP6253283B2 (en) Content data processing device
CN115396222B (en) Device instruction execution method, system, electronic device and readable storage medium
CN114022259B (en) Bidding method and device based on public key assignment and identity verification
CN110717157B (en) User authentication method, device, computer equipment and storage medium

Legal Events

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