Signature document conversion method and device of financial system, computer equipment and medium

By analyzing and processing signature documents in financial transactions and generating and adjusting signature pictures, the problem of unclear display of signature images in the existing technology is solved, and a better image display effect is achieved.

CN119669505APending Publication Date: 2025-03-21CHINA PING AN LIFE INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411718843.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

It is difficult for the prior art to display the signature image clearly and completely in financial transactions, especially in the rendering of the signature in portable document format.

Method used

By obtaining the signature document to be converted, analyzing and generating an operation array, extracting the signature module, calling the function to process and generating the signature picture, and adjusting the coordinates of the signature image by matching the standard image information to optimize the display of the signature document.

Benefits of technology

The method of clearly and completely displaying signature images in the financial system has been realized, and the image display quality of signature documents has been improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119669505A_ABST
    Figure CN119669505A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of financial security, in particular to a signature document conversion method of a financial system, which comprises the following steps: acquiring a to-be-converted signature document, analyzing the to-be-converted signature document, generating an operation array for operating a command of the to-be-converted signature document, and acquiring an index of a signature module. The signature module is extracted from the operation array according to the index of the signature module, processing is carried out according to the signature module and the calling function, a signature picture is generated, preset standard image information is obtained, signature image information of the signature picture is extracted, the signature image information is matched with the preset standard image information, and whether the matching result is successful or not is detected; and obtaining a target position of a preset signature image, and if matching succeeds, adjusting coordinates of the signature image to the target position to obtain a converted signature document. A signature module in a to-be-converted signature document is extracted and replaced by a signature image, and a converted signature document is obtained, so that display of the signature image in the signature document is optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of financial security technology, and in particular to a signature document conversion method, device, computer equipment and medium for a financial system. Background Art

[0002] In financial transactions, signed documents are an important means to ensure the legality and security of transactions. The portable document format web page reading currently widely used in the industry processes images through a portable document format rendering engine to display the signed image to users.

[0003] Currently, the portable document format renders the signature through a canvas, which makes it difficult to provide users with a clear vector image display, resulting in a failure to present a better image display after the signature is rendered.

[0004] Therefore, how to safely use conversion to optimize the signature module in the portable document format to clearly and completely display the signature image has become an urgent problem to be solved. Summary of the invention

[0005] Based on this, the present invention provides a signature document conversion method, device, computer equipment and medium for a financial system to solve the problem of how to safely use the conversion method to optimize the signature module in the portable document format to clearly and completely display the signature image.

[0006] In a first aspect, an embodiment of the present invention provides a signature document conversion method for a financial system, comprising: Acquire the signed document to be converted, parse the signed document to be converted, and generate an operation array for operating commands of the signed document to be converted; Obtain the index of the signature module, extract the signature module from the operation array according to the index of the signature module, call the function for processing according to the signature module, and generate a signature image; Acquire preset standard image information, extract the signature image information in the signature image, match the signature image information with the preset standard image information, and detect whether the matching result is successful; The preset target position of the signature image is obtained, and if the match is successful, the coordinates of the signature image are adjusted to the target position to obtain a converted signature document.

[0007] In a second aspect, an embodiment of the present invention provides a device for converting signature documents in a financial system, including: The document parsing module is used to obtain the signature document to be converted, parse the signature document to be converted, and generate an operation array for operating commands of the signature document to be converted; An image generation module is used to obtain the index of the signature module, extract the signature module from the operation array according to the index of the signature module, and call a function to process according to the signature module to generate a signature image; An image matching module obtains preset standard image information, extracts the signature image information in the signature image, matches the signature image information with the preset standard image information, and detects whether the matching result is successful; The image conversion module obtains a preset target position of the signature image, and if the match is successful, adjusts the coordinates of the signature image to the target position to obtain a converted signature document.

[0008] In a third aspect, an embodiment of the present invention provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the signature document conversion method of the financial system described in the first aspect above is implemented.

[0009] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the signature document conversion method of the financial system described in the first aspect above is implemented.

[0010] Compared with the prior art, the present invention has the following beneficial effects: obtaining the signed document to be converted, parsing the signed document to be converted, generating an operation array for operating the command of the signed document to be converted, obtaining the index of the signature module, extracting the signature module in the operation array according to the index of the signature module, calling a function for processing according to the signature module, generating a signature image, obtaining preset standard image information, extracting the signature image information in the signature image, matching the signature image information with the preset standard image information, and detecting whether the matching result is successful, obtaining the preset target position of the signature image, and if the match is successful, adjusting the coordinates of the signature image to the target position to obtain the converted signed document. The converted signed document is obtained by replacing the signature module in the signed document to be converted with the signature image, so as to optimize the display of the signature image in the signature document. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0012] Figure 1This is a schematic diagram of an application environment of a signature document conversion method for a financial system provided by the first embodiment of the present invention; Figure 2 It is a flowchart of a signature document conversion method of a financial system provided by Embodiment 2 of the present invention; Figure 3 It is a flowchart of a signature document conversion method of a financial system provided by Embodiment 3 of the present invention; Figure 4 It is a flowchart of a signature document conversion method of a financial system provided by a fourth embodiment of the present invention; Figure 5 It is a flowchart of a signature document conversion method of a financial system provided by Embodiment 5 of the present invention; Figure 6 It is a flowchart of a signature document conversion method of a financial system provided by Embodiment 6 of the present invention; Figure 7 It is a flowchart of a signature document conversion method of a financial system provided by Embodiment 7 of the present invention; Figure 8 It is a flowchart of a signature document conversion method of a financial system provided by Embodiment 8 of the present invention; Fig. 9 It is a structural diagram of a signature document conversion device for a financial system provided by Embodiment 9 of the present invention; Fig.10 It is a structural diagram of a computer device provided in Embodiment 10 of the present invention. DETAILED DESCRIPTION

[0013] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0014] like Figure 1 As shown, it is a schematic diagram of the application environment of a signature document conversion method for a financial system provided in the first embodiment of the present invention, wherein the client and the server are connected to communicate, and the user can provide the server with conditions, requirements and operation instructions for whole-house appliance simulation by operating the client, and the server is used to execute the signature document conversion method for the financial system of the present invention according to the relevant content sent by the client. Among them, the client includes but is not limited to various personal computers, laptops, smart phones, tablet computers, portable wearable devices and other computer devices. The computer device corresponding to the server can be implemented with an independent server or a server cluster composed of multiple servers.

[0015] like Figure 2 FIG. 1 is a flow chart of a method for converting a signature document of a financial system provided by Embodiment 2 of the present invention, wherein the method for converting a signature document of a financial system is applied in Figure 1 The signature document conversion method of the financial system may include the following steps: Step S201, obtaining the signed document to be converted, parsing the signed document to be converted, and generating an operation array for operating commands of the signed document to be converted.

[0016] Among them, the signed documents to be converted include but are not limited to PDF documents. In the financial system, the signed documents can be obtained by uploading electronic documents, generating them internally in the system, importing them through external interfaces, etc. Among them, uploading electronic documents can refer to users obtaining the signed documents to be processed through the client or web page of the financial system, such as files in PDF, Word, Excel and other formats. Internal generation in the system can refer to the automatic generation of signed documents according to business processes within the financial system, such as loan contracts, transaction confirmations, etc. External interface import can refer to obtaining signed documents through interfaces with other systems (such as CRM, ERP).

[0017] The parsing method of the signed document to be converted can be performed using PDF.js technology. After the signed document to be converted is parsed using PDF.js technology, an array of commands for operating the signed document to be converted is generated. The specific content of the operation array includes but is not limited to the signature module identifier, image processing command, position adjustment command, and verification command.

[0018] Among them, the signature module identification may refer to identifying the location and attributes of each signature area in the document, including but not limited to coordinates, size, and type (personal signature, company seal). For example, identifying the borrower's signature area and the loan bank's seal area in the contract. The image processing command may refer to generating image processing commands for the signature module, including but not limited to scaling, cropping, and rotating. For example, scaling the signature image to a specified size. The position adjustment command may refer to generating a position adjustment command for the signature image, including but not limited to moving to specified coordinates and adjusting the size. For example, adjusting the signature image to the signature area specified in the contract. The verification command may refer to generating a matching verification command for the signature image information and the preset standard information. For example, verifying whether the signature image meets the signature standards of the financial institution.

[0019] Step S202, obtaining the index of the signature module, extracting the signature module from the operation array according to the index of the signature module, calling the function for processing according to the signature module, and generating a signature image.

[0020] After parsing the signature document to be converted, the system will generate detailed information including the location and properties of the signature module. For example, in the parsed PDF document, the signature module may be marked as "borrower signature" and "lending bank signature".

[0021] The system generates an index of the signature module based on the parsing results. The index usually contains the signature module's identifier, coordinates, size, type, and other information. For example, the generated indexes are "Signature module 1, borrower signature (coordinates X1, Y1, size W1, H1)" and "Signature module 2, loan bank signature (coordinates X2, Y2, size W2, H2)".

[0022] The specific steps of extracting the signature module include: traversing the operation array and extracting the signature module, wherein the operation array traversing may refer to the system traversing the operation array and searching for commands matching the signature module index, and the signature module extracting may refer to extracting the corresponding signature module and its attributes according to the signature module index. For example, extracting the "borrower signature module" and the "loan bank signature module" from the operation array.

[0023] The signature module is processed by calling the image processing function. The processing steps may include image extraction, image preprocessing, image format conversion, and signature image generation. Image extraction may refer to extracting a signature image from the signature module. For example, extracting the borrower's signature image from the "borrower signature module". Image preprocessing may refer to preprocessing the extracted signature image, image format conversion may refer to converting the signature image into a suitable format (such as JPEG, PNG, etc.) for storage and use, and signature image generation may refer to the system generating high-quality signature images after image processing. These signature images will be used for subsequent verification and file conversion.

[0024] Step S203, obtaining preset standard image information, extracting the signature image information in the signature picture, matching the signature image information with the preset standard image information, and detecting whether the matching result is successful.

[0025] Among them, obtaining preset standard image information can refer to a standard image library and a standard image retrieval, wherein the standard image library can refer to a financial institution establishing a standard image library to store known legal signature images, and this library can include standard images such as company seals, personal signatures, and official seals.

[0026] Standard image retrieval may refer to retrieving corresponding standard image information from a standard image library according to the attributes and identifiers of the signature module, for example, retrieving the standard image corresponding to "borrower's signature" and the standard image corresponding to "lending bank's signature".

[0027] Extracting the signature image information from the signature image may include image feature extraction and feature vectorization, wherein image feature extraction may refer to extracting key features from the signature image using image processing technology, and these features may include the shape, color, texture, strokes, etc. of the signature image. Feature vectorization may refer to converting the extracted features into vector form for matching calculation, and feature vectorization helps to simplify the matching process and improve calculation efficiency.

[0028] After extracting the signature image information, the system needs to match this information with the preset standard image information. The specific steps of matching can be to use feature matching algorithms, such as Euclidean distance, cosine similarity, etc., to calculate the similarity between the signature image feature vector and the standard image feature vector. Set a matching threshold to determine the similarity required to consider the match successful. The setting of the threshold is usually based on actual business needs and empirical data.

[0029] After completing feature matching, the system needs to detect whether the matching result is successful. Specifically, it can refer to comparing the similarity calculated by the matching algorithm with the preset threshold to determine whether the match is successful. If the similarity exceeds the threshold, the match is considered successful. Otherwise, the match is considered unsuccessful and the matching result is fed back to the user or system for subsequent operations.

[0030] Step S204, obtaining a preset target position of the signature image, and if the match is successful, adjusting the coordinates of the signature image to the target position to obtain a converted signature document.

[0031] Among them, financial institutions define standard templates for different types of documents (such as loan contracts, insurance policies, investment agreements, etc.), which clearly specify the location and format where the seal image should be placed. According to the seal document type and the identifier of the seal module, the preset seal image target location is retrieved from the document template. For example, the target location of "borrower's seal" and "loan bank's seal" is retrieved.

[0032] Based on the matching results and the preset target position, a command for adjusting the coordinates of the signature image is generated. The command may include the coordinates of the target position (X, Y) and the size of the signature image (W, H). Using image processing technology, the signature image is moved to the target position, and the size and angle of the image are adjusted as needed to ensure that the signature image fits the target area perfectly.

[0033] After the adjustment is completed, the system will verify the position of the signature image to ensure that the image is accurately placed in the target area, merge the adjusted signature image with the original document content, and generate a final document containing the correct signature position. According to needs, the final document will be converted into the required format for storage and distribution. The converted signature document will be stored in the designated storage system and distributed to relevant parties (such as customers, audit agencies, regulatory agencies, etc.) as needed.

[0034] In the embodiment of the present application, by obtaining the signed document to be converted, parsing the signed document to be converted, generating an operation array for operating the command of the signed document to be converted, obtaining the index of the signature module, extracting the signature module in the operation array according to the index of the signature module, calling a function for processing according to the signature module, generating a signature image, obtaining preset standard image information, extracting the signature image information in the signature image, matching the signature image information with the preset standard image information, and detecting whether the matching result is successful, obtaining the preset target position of the signature image, and if the match is successful, adjusting the coordinates of the signature image to the target position to obtain the converted signed document. By replacing the signature module in the signed document to be converted with the signature image, the converted signed document is obtained to optimize the display of the signature image in the signed document.

[0035] like Figure 3 FIG. 2 is a flow chart of a signature document conversion method for a financial system provided in Embodiment 3 of the present invention. The operation array in step S201 may include operation instructions and operation parameters.

[0036] Extracting the signature module from the operation array according to the signature module index in step S202 may include the following steps: Step S301, based on the index of the signature module, traverse the operation instruction, extract the index array of the signature module in the operation instruction, store the index array, and obtain the index storage array.

[0037] Among them, the system needs to traverse each operation instruction in the operation array and find the instruction that matches the signature module index. The specific steps can be that the system starts from the first instruction in the operation array, traverses all instructions in the operation array one by one, parses each operation instruction, and extracts the key information in the instruction, such as the index of the signature module, operation type, coordinate information, etc.

[0038] When parsing the operation instruction, check whether the instruction contains the index information of the signature module. If it does, extract the index information and form an index array with the extracted signature module index information. The index array usually contains the signature module identifier, coordinates, size, signature type and other information. For example, extract the index array of "borrower signature", [signature module identifier: "borrower signature", coordinates: (X1, Y1), size: (W1, H1), signature type: "signature"].

[0039] Among them, the index storage array is a temporary data structure used to store all extracted signature module indexes. Each extracted index array is stored in the index storage array. The index storage array can be a list or array, which is used to record the index information of all signature modules. After storing the index array, the system will verify the stored index information to ensure the integrity and accuracy of the index array.

[0040] Step S302, according to the index storage array, a module is extracted from the operation array by splicing and inserting to obtain a signature module.

[0041] Among them, according to the index information, the position of the signature module is located in the operation array. For example, according to the index "borrower signature", the position of the "borrower signature" module is located in the operation array, and the signature module and its related attributes (such as coordinates, size, signature type, etc.) are extracted from the operation array. For example, the "borrower signature" module and its attributes, signature type, attributes can refer to coordinates (X1, Y1), size (W1, H1), and the signature type can refer to "signature".

[0042] The extracted signature module can be stored in the signature module array, which is a temporary data structure used to store all extracted signature modules. The splicing and insertion operation is performed according to the index information in the index storage array. The splicing and insertion method can make the extraction of the signature module more efficient and accurate. In the document, the signature module is inserted into the specified position according to the index information in the index storage array. For example, the "borrower signature" module is inserted into the specified position (X1, Y1) and resized to W1×H1, and the "loan bank signature" module is inserted into the specified position (X2, Y2) and resized to W2×H2.

[0043] After inserting the signature module, the system will verify the insertion position and format to ensure that the signature module is placed accurately in the specified position.

[0044] In this embodiment, the operation instructions in the operation array are traversed according to the index of the signature module, the index array of the signature module is extracted and stored, and the module is extracted in the operation array to obtain the signature module, thereby providing a data basis for the subsequent generation of the signature image.

[0045] like Figure 4 FIG. 1 is a flow chart of a method for converting a signature document of a financial system provided by Embodiment 4 of the present invention. After traversing the operation instruction based on the index of the signature module in step S301 and extracting the index array of the signature module in the operation instruction, the method for converting a signature document of the financial system may further include: Step S401, verifying whether the index array of the signature module in the operation instruction is correct according to the index of the signature module.

[0046] Step S402: If correct, store the index array to obtain an index storage array.

[0047] Among them, in the financial field, the index verification standards and specifications of the signature module usually include uniqueness, position, size, signature type, format, etc. Among them, uniqueness can refer to ensuring that the index of each signature module is unique in the index array to avoid duplicate indexes, position can refer to that the coordinates of the signature module must be within a reasonable range of the document to ensure that the signature does not exceed the document boundary or overlap other content, size can refer to that the size of the signature module must be consistent with the predefined specifications to ensure that the proportion and position of the signature in the entire document are reasonable, signature type can refer to that the signature type in the index (such as "signature" or "official seal") must be consistent with actual business needs, and format can refer to that the format of the index must comply with predefined specifications, such as the length of the identifier, the validity of the coordinates, etc. The system verifies each index to ensure that it meets the predefined specifications and requirements.

[0048] In this embodiment, the index of the signature module is used to verify whether the index array in the operation instruction is correct, and the correct array is stored to obtain an index storage array, thereby providing a data basis for the subsequent extraction of the signature module.

[0049] like Figure 5 FIG. 2 is a flow chart of a method for converting a signature document of a financial system provided in Embodiment 5 of the present invention. After generating the signature image in step S202, the method for converting a signature document of the financial system may further include the following steps: Step S501, obtaining a preset rendering array, and putting the signature image into the preset rendering array by pushing, to obtain a signature image rendering array.

[0050] Step S502: extracting image information of the signature image according to the signature image rendering array.

[0051] The rendering array can be a data list or array structure, which is used to store the relevant information of the signature image. In the financial system, the rendering array is usually pre-defined to ensure that the rendering process of the signature image meets the business needs and compliance requirements. The system first traverses the relevant information of the signature image, including image data, coordinates, size, etc., and pushes each piece of signature image information into the rendering array one by one. The push operation can involve pushing image data, pushing coordinate information, pushing size information, and pushing other information.

[0052] Among them, pushing image data can refer to pushing the binary data or Base64 encoded data of the signature image into the rendering array, pushing coordinate information can refer to pushing the coordinate information (such as X, Y coordinates) of the signature image into the rendering array, pushing size information can refer to pushing the size information (such as width, height) of the signature image into the rendering array to ensure that the size of the signature image meets the predefined specifications, and pushing other information can refer to pushing other information that needs to be stored (such as signature type, signature date, etc.) into the rendering array. After the push operation, all relevant information of the signature image is stored in the rendering array. This array contains all the signature image information that needs to be rendered, forming a rendering array of the signature image.

[0053] Step S503, obtaining a signature image by image drawing according to the image information of the signature image.

[0054] The image drawing can be performed through image decoding, image positioning, image scaling, and image drawing. Image decoding can refer to decoding the binary data or Base64 encoded data of the signature image into an image format (such as PNG, JPEG, etc.). The decoding process usually involves parsing and converting the image data. Image positioning can refer to determining the position of the signature image in the target document based on the coordinate information of the signature image. The coordinate information usually includes X and Y coordinates, which are used to specify the upper left corner position of the signature image in the document. Image scaling can refer to adjusting the size of the signature image according to the size information of the signature image to meet the requirements of the target document. The size information usually includes width (W) and height (H), which are used to specify the size of the signature image. Image drawing can refer to drawing the adjusted signature image into the target document. The drawing process usually involves rendering and drawing operations of image data to ensure the clarity and accuracy of the signature image.

[0055] Step S504, adjusting the signature image to the target position according to the preset target position of the signature image.

[0056] Among them, the target position is usually determined by the preset template of the document or the position specified by the user. The adjustment process can be: obtaining the target position information of the signature image from the preset template or user input, obtaining the current position information of the signature image, calculating the difference between the current position of the signature image and the target position, and translating the signature image according to the position difference to move it to the target position. The source of the target position information can be: financial institutions usually define some standardized signature templates, which contain the target position information of the signature image. In some cases, the user can input the target position information of the signature image through the interface.

[0057] The location information (coordinates) of the signature image is obtained from step S503. The system needs to calculate the difference between the current position of the signature image and the target position. The position difference usually includes the offset in the X direction and the Y direction. The calculation method can be: X-direction difference, for example, the X coordinate of the target position minus the X coordinate of the current position. Y-direction difference, for example, the Y coordinate of the target position minus the Y coordinate of the current position. The current coordinates of the signature image are updated to the coordinates of the target position. According to the updated coordinate information, the signature image is redrawn to be displayed at the target position.

[0058] In this embodiment, the signature image is obtained by obtaining the rendering array of the signature image, drawing the image, and adjusting the position of the signature image according to the target position of the signature image. The adjusted signature image is accurately placed at the target position, providing the necessary data basis for subsequent steps (such as document verification, archiving, etc.), ensuring the correct generation and compliance of the signature document.

[0059] like Figure 6 FIG. 2 is a flow chart of a method for converting a signature document in a financial system provided by Embodiment 6 of the present invention. In step S203, the image information of the signature is matched with the preset standard image information, and whether the matching result is successful is detected, which may include the following steps: Step S601, according to the image information of the signature and the preset standard image information, image processing algorithms are used to extract features to obtain the image features of the signature and the standard image features.

[0060] Step S602: According to the image features of the signature and the standard image features, a matching algorithm is used to perform matching to obtain a matching pair.

[0061] Among them, before feature extraction, the signature image and the standard image need to be preprocessed first to improve the accuracy and reliability of feature extraction. Image preprocessing usually includes using filters (such as Gaussian filtering, median filtering, etc.) to remove noise in the image, improve image quality, convert color images into grayscale images, simplify the image processing process, and convert grayscale images into binary images to facilitate subsequent feature extraction operations. Among them, binarization can be achieved through a threshold segmentation algorithm (such as the Otsu method).

[0062] After the image preprocessing is completed, the image processing algorithm needs to be used to extract features from the signature image and the standard image. Feature extraction is a key step in image processing. By performing feature analysis on the image, feature vectors that can represent the main content of the image are extracted. Commonly used feature extraction algorithms include but are not limited to SIFT, SURF, ORB, and HOG.

[0063] During the feature extraction process, the system will extract features from the signature image and the standard image respectively to obtain their respective image features, and use feature extraction algorithms (such as SIFT, SURF, ORB, etc.) to detect key points in the image. These key points are usually local extreme points or significant feature points in the image. The area around the detected key points is characterized to generate feature descriptors. The feature descriptors usually contain the position, scale, direction and description information (such as description vector) of the key points. The feature descriptors of the signature image and the standard image are matched to find a matching pair between the two. Among them, the matching pair is usually represented as a pair of feature points, one from the signature image and the other from the standard image.

[0064] Step S603: Calculate the similarity of the matching pairs according to the matching pairs to obtain a similarity score.

[0065] Among them, the similarity calculation method includes but is not limited to Euclidean distance, cosine similarity, Hamming distance, and dot product similarity. The matching pairs are traversed one by one, and the descriptors of the signature image feature points and the standard image feature points are extracted respectively. For each matching pair, the similarity between the two descriptors is calculated using a predefined similarity calculation method (such as Euclidean distance, cosine similarity, etc.). In order to facilitate comparison and analysis, the similarity is usually normalized and the similarity score is converted into a standardized value range, for example, [0, 1].

[0066] Step S604, obtaining a preset similarity threshold, and verifying whether the match is successful based on the similarity threshold and the similarity score. If the match is successful, adjusting the coordinates of the signature image to the target position to obtain a converted signature document.

[0067] Among them, the similarity threshold defines the lower limit of the similarity between matching pairs. Only when the similarity score is higher than or equal to the threshold, the matching pair is considered valid. The basis for setting the threshold can be to determine the similarity range that successful matching pairs usually have by analyzing historical signature data, or to set a reasonable threshold based on the risk tolerance and compliance requirements of financial institutions to balance verification accuracy and false matching rate. Alternatively, reference can be made to the standards and best practices of the financial industry to ensure that the threshold setting complies with industry regulations.

[0068] The system will compare the similarity score of each matching pair with the preset similarity threshold one by one. If the similarity score is higher than or equal to the threshold, the matching pair is considered successful. Otherwise, the matching is considered failed. The verification results are usually stored in the form of an array or dictionary. Each matching pair corresponds to a verification result (success or failure). The system will calculate the required coordinate offset based on the target position and the position of the current signature image, and translate the signature image to align it with the target position. A simple translation algorithm is usually used. For example, the coordinates of all feature points of the signature image are added with the offset between the target position and the current position.

[0069] In this embodiment, feature extraction is performed on the image information of the signature and the standard image information to obtain image features of the signature and standard image features, and a matching pair is obtained using a matching algorithm. The similarity of the matching pair is calculated to obtain a similarity score, and the similarity scores are matched according to a similarity threshold. If the match is successful, a converted signature document is obtained.

[0070] like Figure 7 As shown, it is a flow chart of a method for converting a signature document of a financial system provided by Embodiment 7 of the present invention. The signature document to be converted in step S201 may be a PDF document. Parsing the signature document to be converted in step S201 may include the following steps: Step S701, obtaining a preset operation list, and according to the operation list, using a rendering engine to parse the signature document to be converted to obtain operation items corresponding to the PDF document.

[0071] Among them, before parsing the signed document, you first need to obtain the preset operation list. The operation list defines the operations that need to be performed during the parsing process. It is usually customized according to the document type (such as PDF) and specific needs. The operation list usually contains a series of operation instructions, which may include reading operations, parsing operations, and rendering operations.

[0072] Among them, the reading operation may refer to reading specific information or data from a PDF document, such as the document's metadata (title, author, creation time, etc.); the parsing operation may refer to parsing the structure and content of a PDF document and extracting key information, such as text, images, tables, etc.; the rendering operation may refer to rendering a PDF document into a picture or visual format to facilitate subsequent image processing and signature verification.

[0073] After obtaining the operation list, the system will use the rendering engine to parse the signature document to be converted to extract the operation items of the PDF document. The choice of the rendering engine can refer to common rendering engines including but not limited to Adobe Acrobat, PDFBox, PDF.js. These engines can read and parse the structure of PDF documents and extract page content, images, text and other information.

[0074] Step S702: parsing the operation items of the PDF document to generate an operation array for operating commands of the document to be converted.

[0075] According to the instructions in the operation list, the rendering engine will obtain the basic information of the document, extract the page layout, text boxes, images and other elements, and convert the PDF page into a picture format for subsequent image processing and signature verification.

[0076] Operation items usually include metadata, page structure, images, and text. Metadata can refer to the basic information of a document, such as title, author, creation time, etc. Page structure can refer to the page layout, text boxes, images, and other elements of a document. Images can refer to image information in a document, including coordinates and size. Text can refer to text information in a document, including text areas and content. After parsing the operation items, an operation array for operating PDF commands needs to be generated. The operation array is a collection of instructions that will be used to perform specific operations on PDF documents.

[0077] In this embodiment, the PDF document is parsed by the rendering engine to obtain the corresponding PDF operation items, and the PDF operation items are parsed to generate an operation array for operating the document to be converted. Provide instruction data for subsequent data extraction and instruction operations of documents to be converted to ensure the correctness of the operation.

[0078] like Figure 8 As shown, it is a flow chart of a method for converting a signature document of a financial system provided by Embodiment 8 of the present invention. In step S202, according to the signature module, a function is called for processing to generate a signature image, which may include the following steps: Step S801, extracting data according to the signature module to obtain the processed data of the signature.

[0079] Step S802: Based on the processed data of the signature, a format conversion function is called to process the data to obtain signature image generation data.

[0080] The system first parses the JSON or XML format data in the signature module, extracts the signature metadata, signature image data and signature verification data, and verifies whether the extracted data is complete and legal. For example, it checks whether the signature image data contains complete image content, location and size information; and checks whether the signature verification data contains necessary information such as digital signatures and hash values.

[0081] Convert the extracted data into a format that is convenient for subsequent processing. For example, decode the Base64 encoding of the signature image data into image data, and convert the digital signature and hash value of the signature verification data into a usable format.

[0082] The image content in the signature processing data is further processed, and the signature metadata, signature position and size and other information in the signature processing data are mapped to the signature image generation data to ensure that the signature image generation data contains complete information, and the processed signature image data and signature metadata are packaged to generate the final signature image generation data. For example, the format conversion function is called to generate the signature image generation data.

[0083] Step S803, generating data according to the signature image, calling the image processing function for processing, and generating the signature image.

[0084] Among them, the image content in the signature image generation data is rendered to the specified position and size. This step involves operations such as scaling, rotating, and cropping the image to ensure that the signature image is presented in the correct position and size in the document. The rendered signature image is superimposed on the specified position of the target document. This step involves image transparency processing, background processing, etc. to ensure the fusion of the signature image with the document background. The superimposed signature image is saved as the final signature image file. The saved format can be PNG, JPEG or PDF, etc., depending on the format and requirements of the document.

[0085] In this embodiment, the data of the signature module is extracted to obtain the processed data of the signature, and the format conversion function is called to obtain the signature image generation data, and the image generation data is processed to obtain the signature image. The integrity and legality of the signature processing data are ensured to avoid invalidation of the signature due to missing or incorrect data.

[0086] It should be understood that the order of execution of the steps in the above embodiment does not necessarily 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 invention.

[0087] like Fig. 9As shown, it is a schematic diagram of a signature document conversion device for a financial system provided by Embodiment 9 of the present invention. The signature document conversion device for the financial system corresponds one-to-one to the signature document conversion method for the financial system in the above embodiment. The signature document conversion device for the financial system includes a document parsing module 91, a picture generation module 92, an image matching module 93 and an image conversion module 94. Each functional module is described in detail as follows: The document parsing module 91 is used to obtain the signature document to be converted, parse the signature document to be converted, and generate an operation array for operating commands of the signature document to be converted; The image generation module 92 is used to obtain the index of the signature module, extract the signature module from the operation array according to the index of the signature module, call the function to process according to the signature module, and generate the signature image; The image matching module 93 is used to obtain preset standard image information, extract the signature image information in the signature image, match the signature image information with the preset standard image information, and detect whether the matching result is successful; The image conversion module 94 is used to obtain a preset target position of the signature image, and if the match is successful, adjust the coordinates of the signature image to the target position to obtain a converted signature document.

[0088] Optionally, the signature document conversion device of the financial system further includes: The index storage module is used to verify whether the index array of the signature module in the operation instruction is correct according to the index of the signature module. If correct, the index array is stored to obtain an index storage array.

[0089] Optionally, the signature document conversion device of the financial system further includes: The rendering array module is used to obtain a preset rendering array, and put the signature image into the preset rendering array by pushing, so as to obtain the signature image rendering array; An image extraction module is used to extract image information of the signature image according to the signature image rendering array; An image drawing module is used to obtain a signature image by drawing the image according to the image information of the signature image; The position adjustment module is used to adjust the signature image to a target position according to a preset target position of the signature image.

[0090] Optionally, the picture generation module 92 includes: An index extraction unit, used to traverse the operation instruction based on the index of the signature module, extract the index array of the signature module in the operation instruction, store the index array, and obtain the index storage array; The signature module extraction unit is used to extract the module from the operation array by splicing and inserting according to the index storage array to obtain the signature module.

[0091] Optionally, the image matching module 93 includes: An image feature extraction unit is used to extract features using an image processing algorithm according to the image information of the signature and the preset standard image information, so as to obtain the image features of the signature and the standard image features; The image feature matching unit uses a matching algorithm to match the signature image features and the standard image features to obtain a matching pair; A similarity calculation unit, used for calculating the similarity of the matching pair according to the matching pair to obtain a similarity score; The coordinate adjustment unit is used to obtain a preset similarity threshold, and based on the similarity threshold and the similarity score, verify whether the match is successful. If the match is successful, the coordinates of the signature image are adjusted to the target position to obtain a converted signature document.

[0092] Optionally, the document parsing module 91 includes: An operation item acquisition unit is used to acquire a preset operation list, and according to the operation list, parse the PDF document using a rendering engine to obtain operation items corresponding to the PDF document; The operation array generating unit is used to parse the operation items of the PDF document and generate an operation array for operating the document to be converted.

[0093] Optionally, the picture generation module 92 further includes: The data extraction unit is used to extract data according to the signature module to obtain the processed data of the signature; The format conversion unit is used to call the format conversion function to process the signature processing data to obtain the signature image generation data; The image processing unit generates data according to the signature image, calls the image processing function for processing, and generates the signature image.

[0094] For the specific definition of the signature document conversion device of the financial system, please refer to the definition of the signature document conversion method of the financial system above, which will not be repeated here. The various modules in the signature document conversion device of the above financial system can be implemented in whole or in part through software, hardware and their combination. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0095] like Fig.10As shown, it is a schematic diagram of the structure of a computer device provided in Embodiment 10 of the present invention. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a signature document conversion method for a financial system is implemented.

[0096] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the signature document conversion method of the financial system in the above embodiment is implemented, for example Figures 2 to 8 Alternatively, when the processor executes the computer program, the functions of each module / unit in the embodiment of the signature document conversion device of the financial system are realized, for example Fig. 9 The functions of the document parsing module 91 shown are not described here in detail to avoid repetition.

[0097] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the signature document conversion method of the financial system in the above embodiment is implemented. Figures 2 to 8 Alternatively, when the computer program is executed by the processor, the functions of each module / unit in the embodiment of the signature document conversion device of the financial system are realized, for example, Fig. 9 The functions of the image conversion module 94 are not described here in detail to avoid repetition. The computer-readable storage medium may be non-volatile or volatile.

[0098] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0099] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0100] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. A signature document conversion method for a financial system, characterized in that: include: Acquire the signed document to be converted, parse the signed document to be converted, and generate an operation array for operating commands of the signed document to be converted; Obtain the index of the signature module, extract the signature module from the operation array according to the index of the signature module, call the function for processing according to the signature module, and generate a signature image; Acquire preset standard image information, extract the signature image information in the signature image, match the signature image information with the preset standard image information, and detect whether the matching result is successful; The preset target position of the signature image is obtained, and if the match is successful, the coordinates of the signature image are adjusted to the target position to obtain a converted signature document.

2. The signature document conversion method of the financial system according to claim 1, characterized in that: The operation array includes operation instructions and operation parameters: Extracting the signature module in the operation array according to the index of the signature module includes: Based on the index of the signature module, traverse the operation instruction, extract the index array of the signature module in the operation instruction, store the index array, and obtain an index storage array; According to the index storage array, a module is extracted from the operation array by splicing and inserting to obtain the signature module.

3. The signature document conversion method of the financial system according to claim 2, characterized in that: After traversing the operation instruction based on the index of the signature module and extracting the index array of the signature module in the operation instruction, the method further includes: Verify whether the index array of the signature module in the operation instruction is correct according to the index of the signature module; If correct, the index array is stored to obtain an index storage array.

4. The signature document conversion method of a financial system according to claim 1, characterized in that: After the signature image is generated, the following steps are also included: Obtain a preset rendering array, and put the signature image into the preset rendering array by pushing, to obtain a signature image rendering array; Extracting image information of the signature image according to the signature image rendering array; Obtaining the signature image by image drawing according to the image information of the signature image; According to the preset target position of the signature image, the signature image is adjusted to the target position.

5. The signature document conversion method of a financial system according to claim 1, characterized in that: The step of matching the image information of the signature with the preset standard image information and detecting whether the matching result is successful includes: According to the image information of the signature and the preset standard image information, image processing algorithms are used to extract features to obtain image features of the signature and standard image features; According to the image features of the signature and the standard image features, a matching algorithm is used to perform matching to obtain a matching pair; According to the matching pair, calculating the similarity of the matching pair to obtain a similarity score; A preset similarity threshold is obtained, and based on the similarity threshold and the similarity score, whether the match is successful is verified. If the match is successful, the coordinates of the signature image are adjusted to the target position to obtain a converted signature document.

6. The signature document conversion method of a financial system according to claim 1, characterized in that: The signature document to be converted is a PDF document; Parsing the signature document to be converted includes: Obtain a preset operation list, and according to the operation list, parse the PDF document using a rendering engine to obtain operation items corresponding to the PDF document; Parse the operation items of the PDF document to generate an operation array for operating the command of the document to be converted.

7. The signature document conversion method of a financial system according to claim 1, characterized in that: According to the signature module, a function is called for processing to generate a signature image, including: According to the signature module, data is extracted to obtain signature processing data; According to the processed data of the signature, a format conversion function is called for processing to obtain signature image generation data; Generate data based on the signature image, call the image processing function for processing, and generate the signature image.

8. A signature document conversion device for a financial system, characterized in that: include: The document parsing module is used to obtain the signature document to be converted, parse the signature document to be converted, and generate an operation array for operating commands of the signature document to be converted; An image generation module is used to obtain the index of the signature module, extract the signature module from the operation array according to the index of the signature module, and call a function to process according to the signature module to generate a signature image; An image matching module is used to obtain preset standard image information, extract the signature image information in the signature image, match the signature image information with the preset standard image information, and detect whether the matching result is successful; The image conversion module is used to obtain a preset target position of the signature image, and if the match is successful, adjust the coordinates of the signature image to the target position to obtain a converted signature document.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the signature document conversion method of the financial system as described in any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the signature document conversion method of the financial system as described in any one of claims 1 to 7 is implemented.