Signature verification method and device of periodical transfer protocol, equipment and storage medium
By identifying and verifying the attribution of journal transfer agreements, using big models to extract and verify the signature information, the misidentification errors and text adhesion problems caused by handwriting differences and complex layout structures are solved, and the efficiency and accuracy of attribution legality verification are improved. reduces the cost of manual review.
Patent Information
- Application Number
- CN202411172312.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-26
- Publication Date
- 2025-01-10
AI Technical Summary
During the signature verification process of journal transfer agreements, the handwritten signatures are large, the strokes are complex, and the misunderstanding is caused. It is difficult to accurately convert tables or complex layout structures, resulting in text adsorption and high difficulty in extracting author names and names, and low automatic review pass rate , increasing the cost of manual review.
By identifying scanned or photographing images of the journal transfer agreement, using a big model to extract author names, signatures and consistency verification and correction information in the text content recognition results, verify integrity and consistency, generate target prompt words and provide them to Large model to improve the efficiency of attribution legality verification.
It effectively improves the efficiency of signature legality verification, reduces the investment cost of manual audits, and improves the reliability of the agreement and the accuracy of automated audits.
Smart Images

Figure CN119296120A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a signature verification method and device, equipment and storage medium for a journal transfer agreement. Background Art
[0002] In order to ensure that every participant in the Journal Transfer Agreement (hereinafter referred to as the "Agreement") agrees and understands the content of the Agreement, and all parties expressly agree with knowledge, the parties indicated in the Agreement are required to authorize by handwritten signatures. In order to ensure the validity of the Agreement itself, improve the certainty and reliability of the execution of the Agreement, and reduce potential legal risks and disputes, it is crucial to verify the legitimacy of the user's signature in the Agreement.
[0003] Usually, before the signature verification of the agreement, the scanned or photographed image of the agreement needs to be preprocessed, such as denoising, binarization, rotation correction, cropping, and contrast adjustment, to solve the problems of blurry image shooting, tilted or curved image, dust, overprint, stains and other noise problems in the image, so as to improve the accuracy of OCR (Optical Character Recognition). However, during the entire verification process, the following problems will also be encountered:
[0004] 1) Handwritten signatures are prone to misrecognition when the handwriting is very different or the strokes are complex.
[0005] 2) Tables, forms or complex layout structures are difficult to convert accurately, which can easily cause text adhesion and make it difficult to extract the author's name and signature.
[0006] 3) Matching and inconsistency issues caused by identification and extraction problems result in a low pass rate for automated audits, increasing the cost of manual audits.
[0007] Therefore, it is urgent to solve the above technical problems. Summary of the invention
[0008] In view of the above problems, this application is proposed to provide a signature verification method and device, electronic device, storage medium and computer program product for a journal transfer agreement that overcomes the above problems or at least partially solves the above problems. The technical solution is as follows:
[0009] In a first aspect, a signature verification method for a journal transfer agreement is provided, the method comprising:
[0010] Identify the scanned or photographed image of the journal transfer agreement and obtain the text content recognition result;
[0011] Put the text content recognition result into the set position in the pre-built prompt word template to generate the target prompt word;
[0012] The target prompt word is provided to the preset large model to obtain the author name, the number of authors, the signature, the number of signatures and the consistency check correction information in the text content recognition result extracted by the large model;
[0013] The integrity and consistency of the author's name, number of authors, signature, number of signatures and consistency check correction information are verified to obtain a verification result on whether the signature is legal.
[0014] In a second aspect, a signature verification device for a journal transfer agreement is provided, the device comprising:
[0015] A recognition unit, used to recognize the scanned or photographed image of the journal transfer agreement and obtain a text content recognition result;
[0016] A generating unit, used for placing the text content recognition result into a set position in a pre-built prompt word template to generate a target prompt word;
[0017] An extraction unit, used to provide the target prompt word to a preset large model, and obtain the author name, the number of authors, the signature, the number of signatures and the consistency check correction information in the text content recognition result extracted by the large model;
[0018] The verification unit is used to verify the integrity and consistency of the author's name, the number of authors, the signature, the number of signatures and the consistency check correction information, and obtain the verification result of whether the signature is legal.
[0019] According to a third aspect, an electronic device is provided, comprising a processor and a memory, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute any of the above-mentioned signature verification methods for a journal transfer agreement.
[0020] In a fourth aspect, a storage medium is provided, wherein the storage medium stores a computer program, wherein the computer program is configured to execute any of the above-mentioned signature verification methods for a journal transfer agreement when run.
[0021] In a fifth aspect, a computer program product is provided, comprising a computer program, wherein the computer program is configured to execute any of the above-mentioned signature verification methods for a journal transfer agreement when running.
[0022] By means of the above technical scheme, the signature verification method and device, electronic device, storage medium and computer program product of the journal transfer agreement provided by the embodiment of the present application, the method identifies the scanned or photographed image of the journal transfer agreement, and obtains the text content recognition result; the text content recognition result is placed in the set position in the pre-constructed prompt word template to generate the target prompt word; the target prompt word is provided to the preset large model, and the author name, number of authors, signature, number of signatures and consistency verification correction information in the text content recognition result extracted by the large model are obtained; the author name, number of authors, signature, number of signatures and consistency verification correction information are verified for integrity and consistency, and the verification result of whether the signature is legal is obtained. It can be seen that this embodiment provides the text content recognition result to the large model, and uses the understanding and reasoning ability of the large model to extract the author name, signature and consistency verification correction information, and then the author name, number of authors, signature, number of signatures and consistency verification correction information are verified for integrity and consistency, and the verification result of whether the signature is legal is obtained, which can effectively improve the efficiency of signature legality verification and reduce the cost of manual review. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in describing the embodiments of the present application are briefly introduced below.
[0024] Figure 1 It is a flow chart of a signature verification method for a journal transfer agreement provided in an embodiment of the present application;
[0025] Figure 2 It is a signature verification flow chart of a journal transfer agreement provided by another embodiment of the present application;
[0026] Figure 3 is a flowchart of the shortest edit distance verification provided by an embodiment of the present application;
[0027] Figure 4 This is a schematic diagram of a sample journal transfer agreement provided in an embodiment of the present application;
[0028] Figure 5 It is the text content recognition result of the journal transfer agreement provided in the embodiment of the present application;
[0029] Figure 6 It is a schematic diagram of the large model extraction result provided in the embodiment of the present application;
[0030] Figure 7 It is a structural diagram of a signature verification device for a journal transfer agreement provided in an embodiment of the present application;
[0031] Figure 8 It is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0032] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.
[0033] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that such use is interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the term "including" and its variants are to be interpreted as open-ended terms meaning "including but not limited to".
[0034] In order to solve the above technical problems, the present application embodiment provides a signature verification method for a journal transfer agreement, such as Figure 1 As shown, the signature verification method of the journal transfer agreement may include the following steps S101 to S104:
[0035] Step S101, identifying a scanned or photographed image of a journal transfer agreement to obtain a text content recognition result;
[0036] Step S102, placing the text content recognition result into a set position in a pre-built prompt word template to generate a target prompt word;
[0037] Step S103, providing the target prompt word to the preset large model, and obtaining the author's name, the number of authors, the signature, the number of signatures and the consistency check correction information in the text content recognition result extracted by the large model;
[0038] Step S104, verify the integrity and consistency of the author's name, the number of authors, the signature, the number of signatures and the consistency check correction information to obtain a verification result of whether the signature is legal.
[0039] In this embodiment, the large model, also called the Large Language Model (LLM), first, as the name implies, is large in scale, with network parameters reaching tens of billions, hundreds of billions or even more; second, universal, meaning it is not limited to specific problems or fields; third, emergent, that is, it generates unexpected new capabilities. The large model has the capabilities of natural language processing, image processing or speech processing, and has the ability to generate text, pictures, audio, video and other content.
[0040] This embodiment provides the text content recognition results to the big model, and uses the understanding and reasoning capabilities of the big model to extract the author's name, signature and consistency check correction information, and then verifies the integrity and consistency of the author's name, number of authors, signature, number of signatures and consistency check correction information to obtain a verification result on whether the signature is legal, which can effectively improve the efficiency of signature legitimacy verification and reduce the cost of manual review.
[0041] The present application provides a possible implementation method. The above step S101 identifies the scanned or photographed image of the journal transfer agreement to obtain the text content recognition result, which may specifically include the following steps A1 and A2:
[0042] Step A1, calling the OCR service interface fine-tuned by the handwritten text dataset;
[0043] Step A2, read the binary data of the scanned or photographed image of the journal transfer agreement, convert the binary data into Base64 encoded data, pass the Base64 encoded data to the OCR service interface, and obtain the text content recognition result. Here, Base64 is an encoding method for converting binary data into a sequence of 64 printable ASCII characters. For example, Base64 uses 64 characters including uppercase and lowercase letters AZ, az, numbers 0-9, plus a plus sign (+) and a slash ( / ).
[0044] This embodiment obtains text content recognition results through the OCR service interface, which can quickly extract key information in the image to facilitate subsequent data processing and analysis.
[0045] The present application provides a possible implementation method. The pre-built prompt word template mentioned in step S102 above may include the following content:
[0046] Define the overall task objectives, identify the author name, number of authors, signature, number of signatures in the given text content, and perform consistency check and correction on the author name and signature according to the preset correction standards;
[0047] Mark the given text content and take up space, starting with the set string and ending with a blank line;
[0048] Define the formatted output structure and specific fields; among them, define the output mode through a few sample prompts.
[0049] In the above embodiment, the set character string can be set according to actual needs, such as the set character string is "context:", etc., and this embodiment does not limit this.
[0050] The present application provides a possible implementation method. In the above step S102, the text content recognition result is placed in a set position in a pre-built prompt word template to generate a target prompt word, which may specifically include the following steps B1 and B2:
[0051] Step B1, taking the position of the set character string as the set position in the pre-built prompt word template;
[0052] Step B2: according to the set character string, the text content recognition result is placed into the set position in the pre-built prompt word template to obtain the target prompt word.
[0053] This embodiment can generate structured prompt words by placing the text content recognition result into a set position in a pre-constructed prompt word template, which is convenient for subsequent data processing and analysis.
[0054] The present application provides a possible implementation method. In the above step S104, the integrity and consistency of the author name, the number of authors, the signature, the number of signatures and the consistency check correction information are verified to obtain a verification result of whether the signature is legal. Specifically, the following steps C1 and C2 may be included:
[0055] Step C1, compare the number of authors with the number of signatures. If the number of authors is the same as the number of signatures, it means that the integrity verification has passed and the consistency verification continues; if the number of authors is different from the number of signatures, it means that the integrity verification has not passed and the verification result of illegal signatures is obtained;
[0056] Step C2, verify the consistency of the consistency check correction information to obtain a verification result of whether the signature is legal.
[0057] This embodiment can quickly identify whether there are missing or redundant signatures in the journal transfer agreement by comparing the number of authors with the number of signatures, thereby verifying the integrity of the journal transfer agreement; when the number of authors matches the number of signatures, the next step of consistency verification is performed, which increases the accuracy of the verification process; through the verification of consistency check correction information, the legitimacy of the signature is further ensured, and the reliability of the journal transfer agreement is improved.
[0058] In an embodiment of the present application, a possible implementation method is provided, where the consistency check correction information may include a consistency mapping relationship between the author's name and the signature; the above step C2 verifies the consistency of the consistency check correction information to obtain a verification result of whether the signature is legal, which may specifically include the following steps C21 to C23:
[0059] Step C21, calculating the shortest edit distance between the author's name and the signature of the consistency mapping according to the consistency check correction information;
[0060] Step C22, comparing the shortest edit distance with a set threshold. If the shortest edit distance is less than or equal to the set threshold, it means that the consistency verification has passed and a verification result that the signature is legal has been obtained;
[0061] In step C23, if the shortest edit distance is greater than the set threshold, it means that the consistency verification fails and a verification result indicating that the signature is illegal is obtained.
[0062] In this embodiment, the threshold value can be set according to actual needs, such as setting the threshold value to 2, etc. This embodiment does not limit this.
[0063] This embodiment can quantify the degree of difference between two strings by calculating the shortest edit distance between the author's name and the signature of the consistency mapping, thereby providing an accurate consistency measurement method; and by setting a threshold, a certain degree of editing errors, such as spelling errors or format differences, can be tolerated without erroneously rejecting legitimate signatures.
[0064] The above introduces Figure 1 There are multiple implementation methods for each link of the illustrated embodiment. The signature verification method for the journal transfer agreement of the embodiment of the present application will be further explained below through specific embodiments.
[0065] In a specific embodiment, the process of signature legitimacy verification includes the integrity verification of the signed author, the consistency verification of the signature and the author's name, and at the same time reduces the impact of signature recognition deviation on legitimacy verification and improves the efficiency of signature verification. For example, if the authors of the agreement paper are "Zhang San" and "Li Si", and the author's signature (i.e. signature) area only has "Zhang San", then the integrity verification of the agreement signature fails; if the author's signature area is identified as "Zhang Er", there is a consistency deviation with the author of the paper, and it needs to be compared with the threshold and judged.
[0066] 1) OCR recognition: Use the OCR service interface fine-tuned by the handwritten text dataset to obtain the text content recognition results of the agreement image;
[0067] 2) LLM preprocessing: The image text content recognition results are passed to the large model to identify the authors of the paper, the signature authors, and the consistency verification correction information in the agreement. For example, in the text "... Authors (in order): Hao ab Hao cd Submission journal: "Tiangong" magazine...", the authors of the article are identified and extracted as "Hao ab" and "Hao cd". In the text "1 Zou cf****2024.3.12 2 Hao ae****2024.3.123", the author's signatures are identified and extracted as "Zou cf" and "Hao ae". After consistency reasoning verification, the author's name and signature are mapped consistently. Here, the signature "Zou cf" is associated with the name "Hao cd", and the signature "Hao ae" is associated with the name "Hao ab".
[0068] 3) Secondary verification: Verify the signature integrity and the shortest edit distance, and obtain the signature legitimacy verification result.
[0069] Figure 2 This is a signature verification flow chart of a journal transfer agreement provided by another embodiment of the present application, such as Figure 2 As shown, it includes protocol image preprocessing, OCR recognition, LLM preprocessing, integrity verification, and shortest edit distance consistency verification to obtain the verification results. The working modes of each module are as follows:
[0070] (1) OCR recognition
[0071] Call the OCR service interface fine-tuned by the handwritten text dataset. Read the binary data of the protocol image file, convert the binary data into Base64 encoded data, pass the Base64 encoded data to the OCR service interface, and obtain the image text content recognition result.
[0072] (2) LLM preprocessing
[0073] Input the OCR recognition results into the preset big model, and use the natural language understanding and reasoning capabilities of the big model to generate the data required for secondary verification. In order to ensure the automatic execution of secondary verification, the analysis results of the big model need to be formatted and output. Therefore, the big model prompt words should include the following three parts:
[0074] i. Define the overall task objectives, perform name consistency verification and correction on the given text content, and the correction standards.
[0075] ii. Identify and placeholder the given text content, starting with the string "context:" and ending with a blank line.
[0076] ⅲ. Define the formatted output structure and specific fields. Define the output mode by using a few sample prompts. The number of valid authors of the agreement is recorded as standard_cnt, the number of handwritten signature authors is recorded as signed_cnt, and the consistency correction results are recorded as match_results, with the name before the modification in front and the name after the modification in the back.
[0077] (3) Secondary Verification
[0078] Secondary verification mainly includes integrity verification and consistency verification.
[0079] Integrity verification is the verification of the number of signed authors and the number of paper authors to ensure that all authors participating in the paper agree to the contents of the agreement.
[0080] The consistency verification is to calculate the deviation between the signature and the name of the corresponding participating author, compare the deviation with the threshold, and determine whether the signature deviation is within the controllable range. If the deviation is not higher than the threshold, the consistency verification passes. If the deviation is higher than the threshold, the signature is considered inconsistent with the corresponding author and the verification fails.
[0081] Regarding the definition of deviation, the Levenshtein distance is used here, which is the shortest edit distance. Therefore, consistency verification is also called shortest edit distance verification. The algorithm is:
[0082] ED(i,j)=min{ED(i-1,j)+2,ED(i,j-1)+2,ED(i-1,j-1)+c(i,j)}
[0083] in,
[0084]
[0085] S is the original sequence, T is the target sequence;
[0086] The distance of the deletion operation (ED(i-1,j)) and the addition operation (ED(i,j-1)) is set to 2, the distance of the replacement operation (ED(i-1,j-1)) is set to 1, and the default threshold is set to 2.
[0087] This setting can be understood as allowing a maximum of two character recognition errors, or a maximum of one missing character, or a maximum of one extra character when comparing each name. When this limit is exceeded, it is considered that the consistency check has failed and needs to be transferred to manual review.
[0088] a). Integrity verification
[0089] i. Get standard_cnt and signed_cnt from the LLM preprocessing results.
[0090] ii. If standard_cnt and signed_cnt are equal, perform edit distance verification.
[0091] iii. If standard_cnt and signed_cnt are not equal, then exit the subsequent verification and the signature verification fails.
[0092] b). Shortest edit distance verification
[0093] Verify each set of signature correction results separately. See the attached verification process for details. Figure 3 , the process is described as follows:
[0094] i. Traverse the correction relationship data set (i.e., the name repair list) match_results, and record each set of correction results as Ri.
[0095] ii. Traverse each name of Ri in step i, record the signature as Ri[0] and the participant’s name as Ri[1].
[0096] iii. Calculate the edit distance between Ri[0] and Ri[1] in step ii, denoted as T(Ri). If the value of T(Ri) is greater than (i.e., higher than) the set threshold (the default value is 2), then exit the current process and draw the verification conclusion: verification failed; otherwise, proceed to the next step.
[0097] iv. If the traversal is not completed, repeat steps ii and iii, otherwise proceed to the next step.
[0098] v. If the verification is completed, the verification conclusion is obtained: verification passed.
[0099] In another specific embodiment, Figure 4 The legality of the signature on the journal article transfer agreement shown has been verified, and the data has been desensitized. Specifically, the title and name of the paper have been desensitized. In order to facilitate the following description, Figure 4 The names from top to bottom and from left to right are "Hao ab", "Hao cd", "Hao ae" and "Zou cf".
[0100] The processing process is as follows:
[0101] 1) OCR recognition, the result is as follows Figure 5 shown.
[0102] 2) LLM preprocessing
[0103] Put the above recognized content into the placeholder position of the prompt template. In a string of text input to the large model, the recognized author names are "Hao ab" and "Hao cd", and the number of authors is 2. The recognized signatures are "Hao ae" and "Zou cf", and the number of signatures is 2. And "Hao ae" is associated and mapped to "Hao ab", and "Zou cf" is associated and mapped to "Hao cd", and the result is as Figure 6 shown. In Figure 6 , ASSISTANT is the assistant, and json is a lightweight data exchange format.
[0104] 3) Secondary verification
[0105] a. Integrity verification
[0106] The number of valid authors is consistent with the number of handwritten signatures, and the signature authors are complete.
[0107] b. Minimum edit distance verification
[0108] The minimum distance to edit "Zou cf" to "Hao cd" is 2 (the distance to replace "Zou" with "Hao" is 1, and the distance to replace "f" with "d" is 1, so the total edit distance is 2), and the minimum distance to edit "Hao ae" to "Hao ab" is 1 (the distance to replace "e" with "b" is 1, so the total edit distance is 1), both of which are not higher than the edit distance threshold (default is 2).
[0109] A supplementary example for calculating the minimum edit distance is given. For example, the minimum edit distance to edit "cf" to "Hao cd" is 3. Among them, the distance to add the character "Hao" is 2 (according to the above algorithm definition, the operation distances of adding and deleting are both 2), and the distance to replace "f" with "d" is 1, so the minimum edit distance is 3.
[0110] 4) Verification conclusion: The signature is legal and the verification passes.
[0111] Adopting this solution can reduce the impact of OCR recognition errors and signature matching deviations on the signature verification passing rate. With the help of the understanding and analysis ability of the large model, combined with the setting of the minimum edit distance threshold, it can effectively improve the efficiency of signature legality verification and reduce the labor cost of manual review.
[0112] At the same time, this solution has good compatibility and scalability. Calculating the glyph similarity between the signature and the author's name and using it as a weighted processing of the editing operation can obtain the probability of deviation caused by OCR recognition errors (non-intentional wrong signature by the author). Collecting the ratio of the number of name repairs and the ratio of the minimum edit distance, and designing an overall credibility calculation scheme for signature legality verification can provide data support for the effectiveness evaluation and legal risk assessment of the agreement in the later stage.
[0113] This embodiment uses customized OCR to improve the accuracy of handwritten character recognition; pushes the recognition results to the big model, uses its understanding and reasoning capabilities to identify the author's name and signature, and performs associated mapping; finally, performs secondary verification on the mapping results to draw a signature verification conclusion.
[0114] The design of the above overall process reduces the complexity of natural language processing, solves the problem of low verification pass rate caused by OCR recognition errors, improves the robustness of signature verification, and reduces labor input costs.
[0115] It should be noted that the size of the sequence number of each step in the above embodiment does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. In practical applications, all the above possible implementation methods can be combined in any way to form possible embodiments of the present application, which will not be described one by one here.
[0116] Based on the signature verification method of the journal transfer agreement provided in the above embodiments, based on the same inventive concept, the embodiment of the present application also provides a signature verification device for a journal transfer agreement.
[0117] Figure 7 1 is a structural diagram of the signature verification device for the journal transfer agreement provided in the embodiment of the present application. Figure 7 As shown, the signature verification device of the journal transfer agreement may specifically include an identification unit 710 , a generation unit 720 , an extraction unit 730 and a verification unit 740 .
[0118] The recognition unit 710 is used to recognize the scanned or photographed image of the journal transfer agreement and obtain a text content recognition result;
[0119] A generating unit 720, configured to place the text content recognition result into a set position in a pre-built prompt word template to generate a target prompt word;
[0120] Extraction unit 730, used to provide the target prompt word to the preset large model, and obtain the author name, number of authors, signature, number of signatures and consistency check correction information in the text content recognition result extracted by the large model;
[0121] The verification unit 740 is used to verify the integrity and consistency of the author's name, the number of authors, the signature, the number of signatures and the consistency check correction information to obtain a verification result of whether the signature is legal.
[0122] A possible implementation manner is provided in an embodiment of the present application, where the identification unit 710 is further configured to:
[0123] Call the OCR service interface fine-tuned by the handwritten text dataset;
[0124] Read the binary data of the scanned or photographed image of the journal transfer agreement, convert the binary data into Base64 encoded data, pass the Base64 encoded data to the OCR service interface, and obtain the text content recognition result.
[0125] A possible implementation method is provided in an embodiment of the present application, wherein the pre-built prompt word template includes the following contents:
[0126] Define the overall task objectives, identify the author name, number of authors, signature, number of signatures in the given text content, and perform consistency check and correction on the author name and signature according to the preset correction standards;
[0127] Mark the given text content and take up space, starting with the set string and ending with a blank line;
[0128] Define the formatted output structure and specific fields; among them, define the output mode through a few sample prompts.
[0129] A possible implementation manner is provided in an embodiment of the present application, where the generating unit 720 is further configured to:
[0130] The position of the set character string is used as the set position in the pre-built prompt word template;
[0131] According to the set character string, the text content recognition result is placed into the set position in the pre-built prompt word template to obtain the target prompt word.
[0132] A possible implementation method is provided in an embodiment of the present application, where the verification unit 740 is further configured to:
[0133] Compare the number of authors with the number of signatures. If the number of authors is the same as the number of signatures, it means that the integrity verification has passed and the consistency verification continues. If the number of authors is different from the number of signatures, it means that the integrity verification has not passed and the verification result of illegal signatures is obtained.
[0134] The consistency check correction information is verified for consistency to obtain a verification result of whether the signature is legal.
[0135] A possible implementation method is provided in an embodiment of the present application, wherein the consistency check correction information includes a consistency mapping relationship between the author's name and the signature; the verification unit 740 is further used to:
[0136] Calculate the shortest edit distance between the author's name and the signature of the consistency mapping according to the consistency check correction information;
[0137] Compare the shortest edit distance with the set threshold. If the shortest edit distance is less than or equal to the set threshold, it means that the consistency verification has passed and the verification result of the legal signature has been obtained;
[0138] If the shortest edit distance is greater than the set threshold, it means that the consistency verification fails and a verification result indicating that the signature is illegal is obtained.
[0139] Based on the same inventive concept, an embodiment of the present application also provides an electronic device, including a processor and a memory, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the signature verification method of the journal transfer agreement of any one of the above embodiments.
[0140] In an exemplary embodiment, an electronic device is provided, such as Figure 8 As shown, Figure 8 The electronic device 800 shown includes: a processor 801 and a memory 803. The processor 801 and the memory 803 are connected, such as through a bus 802. Optionally, the electronic device 800 may also include a transceiver 804. It should be noted that in actual applications, the transceiver 804 is not limited to one, and the structure of the electronic device 800 does not constitute a limitation on the embodiments of the present application.
[0141] Processor 801 may be a CPU (Central Processing Unit), a GPU (Graphics Processing Unit), a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. Processor 801 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0142] The bus 802 may include a path to transmit information between the above components. The bus 802 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 802 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0143] The memory 803 can be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to these.
[0144] The memory 803 is used to store the computer program code for executing the solution of the present application, and the execution is controlled by the processor 801. The processor 801 is used to execute the computer program code stored in the memory 803 to implement the contents shown in the above method embodiment.
[0145] Among them, electronic devices include but are not limited to: mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 8 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0146] Based on the same inventive concept, an embodiment of the present application further provides a storage medium, in which a computer program is stored, wherein the computer program is configured to execute the signature verification method of the journal transfer agreement of any one of the above embodiments when running.
[0147] Based on the same inventive concept, an embodiment of the present application also provides a computer program product, including a computer program, wherein the computer program is configured to execute the signature verification method of the journal transfer agreement of any of the above embodiments when running.
[0148] Those skilled in the art can clearly understand that the specific working processes of the systems, devices, and modules described above can refer to the corresponding processes in the aforementioned method embodiments, and for the sake of brevity, they are not further described here.
[0149] Those skilled in the art can understand that the technical solution of the present application can be essentially or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, which includes a number of program instructions, so that an electronic device (such as a personal computer, a server, or a network device, etc.) executes all or part of the steps of the method described in each embodiment of the present application when running the program instructions. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
[0150] Alternatively, all or part of the steps of implementing the aforementioned method embodiments may be accomplished by hardware associated with program instructions (such as electronic devices such as personal computers, servers, or network devices), and the program instructions may be stored in a computer-readable storage medium. When the program instructions are executed by a processor of an electronic device, the electronic device executes all or part of the steps of the methods described in the embodiments of the present application.
[0151] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that within the spirit and principles of the present application, they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not deviate from the protection scope of the present application.
Claims
1. A signature verification method for a journal transfer agreement, characterized in that: The method comprises: Identify the scanned or photographed image of the journal transfer agreement and obtain the text content recognition result; Put the text content recognition result into the set position in the pre-built prompt word template to generate the target prompt word; The target prompt word is provided to the preset large model to obtain the author name, the number of authors, the signature, the number of signatures and the consistency check correction information in the text content recognition result extracted by the large model; The integrity and consistency of the author's name, number of authors, signature, number of signatures and consistency check correction information are verified to obtain a verification result on whether the signature is legal.
2. The method according to claim 1, characterized in that Identify the scanned or photographed image of the journal transfer agreement and obtain text content recognition results, including: Call the OCR service interface fine-tuned by the handwritten text dataset; Read the binary data of the scanned or photographed image of the journal transfer agreement, convert the binary data into Base64 encoded data, pass the Base64 encoded data to the OCR service interface, and obtain the text content recognition result.
3. The method according to claim 1, characterized in that The pre-built prompt word template includes the following contents: Define the overall task objectives, identify the author name, number of authors, signature, number of signatures in the given text content, and perform consistency check and correction on the author name and signature according to the preset correction standards; Mark the given text content and take up space, starting with the set string and ending with a blank line; Define the formatted output structure and specific fields; among them, define the output mode through a few sample prompts.
4. The method according to claim 3, characterized in that The text content recognition result is placed into the set position of the pre-built prompt word template to generate the target prompt word, including: The position of the set character string is used as the set position in the pre-built prompt word template; According to the set character string, the text content recognition result is placed into the set position in the pre-built prompt word template to obtain the target prompt word.
5. The method according to any one of claims 1 to 4, characterized in that Verify the integrity and consistency of the author's name, number of authors, signature, number of signatures, and consistency check correction information to obtain the verification result of whether the signature is legal, including: Compare the number of authors with the number of signatures. If the number of authors is the same as the number of signatures, it means that the integrity verification has passed and the consistency verification continues. If the number of authors is different from the number of signatures, it means that the integrity verification has not passed and the verification result of illegal signatures is obtained. The consistency check correction information is verified for consistency to obtain a verification result of whether the signature is legal.
6. The method according to claim 5, characterized in that The consistency check correction information includes a consistency mapping relationship between the author's name and the signature; Verify the consistency of the consistency check correction information to obtain the verification result of whether the signature is legal, including: Calculate the shortest edit distance between the author's name and the signature of the consistency mapping according to the consistency check correction information; Compare the shortest edit distance with the set threshold. If the shortest edit distance is less than or equal to the set threshold, it means that the consistency verification has passed and the verification result of the legal signature has been obtained; If the shortest edit distance is greater than the set threshold, it means that the consistency verification fails and a verification result indicating that the signature is illegal is obtained.
7. A signature verification device for a journal transfer agreement, characterized in that: The device comprises: A recognition unit, used to recognize the scanned or photographed image of the journal transfer agreement and obtain a text content recognition result; A generating unit, used for placing the text content recognition result into a set position in a pre-built prompt word template to generate a target prompt word; An extraction unit, used to provide the target prompt word to a preset large model, and obtain the author name, the number of authors, the signature, the number of signatures and the consistency check correction information in the text content recognition result extracted by the large model; The verification unit is used to verify the integrity and consistency of the author's name, the number of authors, the signature, the number of signatures and the consistency check correction information, and obtain the verification result of whether the signature is legal.
8. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the signature verification method of the journal transfer agreement according to any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the signature verification method for the journal transfer agreement according to any one of claims 1 to 6 when running.
10. A computer program product, comprising a computer program, characterized in that The computer program is configured to execute the signature verification method of the journal transfer agreement described in any one of claims 1 to 6 when running.