A method for correcting the position of electronic signatures and re-signing based on Excel documents

By obtaining the target signed document associated with the Excel document, and calculating the absolute physical coordinates using the cell boundary coordinates and keyword character length of the Excel document, a signature data structure is constructed at the unit and job level. This solves the problems of inaccurate electronic signature positioning and duplicate signatures, achieving accurate and efficient signature processing.

CN123116358APending Publication Date: 2026-11-17QUZHOU WANJUAN ARCHIVES MANAGEMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611561197.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-10
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

In existing technologies, the positioning of electronic signatures in formatted documents is inaccurate, resulting in the signature pattern covering the text or deviating from the intended position. Furthermore, there is a lack of intelligent recognition and aggregation processing for duplicate signatures in complex engineering archives, which increases manpower and time costs and affects the accuracy of archive data.

Method used

By obtaining the association between the target signed document and the source Excel document, the absolute physical coordinates of the target signed document are calculated using the cell boundary coordinates and keyword character length of the Excel document. A signature data structure containing unit and job dimensions is constructed, duplicate verification is performed, batch signature parameters are generated, and the electronic signature service interface is called to perform the signature operation.

Benefits of technology

It achieves precise correction of signature position, avoids signature patterns covering text, improves the accuracy and aesthetics of signatures, effectively distinguishes between duplicate and non-duplicate signatures, reduces the number of online interactions, and improves signature processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123116358A_ABST
    Figure CN123116358A_ABST
Patent Text Reader

Abstract

This invention provides a method for correcting electronic signature positions and handling duplicate signatures based on Excel documents. The method includes: obtaining the target signature document and its associated source Excel document; correcting the initial signature coordinates in the target signature document based on the position information of signature keywords in the source Excel document to obtain the target signature coordinates; performing a duplicate check on the target signature coordinates based on a signature data structure including unit and job dimensions; and, in response to a duplicate check result, executing an exclusive logic judgment to exclude duplicate identification and obtain a set of true duplicate signature positions; generating batch signature parameters based on the set of true duplicate signature positions and calling the target electronic signature service interface to perform the signature operation. This invention improves the accuracy of signature positions and the efficiency of batch signature processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electronic document processing technology, specifically to a method for correcting the position of electronic signatures and repeating signatures based on Excel documents. Background Technology

[0002] In the electronic management of engineering archives and original documents, electronic signatures are a crucial step in ensuring the legal validity and authenticity of documents. In existing technologies, electronic signatures typically apply directly to formatted documents (such as PDFs), and the location of the signature often relies on text searches or fixed coordinate presets within the document itself. However, due to potential issues such as layout misalignment and font rendering differences during document generation or conversion, keyword searches based solely on the formatted document often only locate the beginning of the text, rather than the actual signature area required for business operations. This results in the signature image covering the text or deviating from its intended position, causing signature confusion. Furthermore, in complex engineering document forms, the same signatory often needs to sign in multiple locations on the same document. Existing solutions lack intelligent identification and aggregation mechanisms for duplicate signatures, especially failing to effectively distinguish between non-duplicate scenarios such as "same position in different units," leading to system misjudgments or requiring manual confirmation. This not only increases manpower and time costs but also easily affects the accuracy of document data due to missigned signatures across units. Therefore, there is an urgent need for a technical solution that can accurately correct signature positions and efficiently handle complex duplicate signature scenarios. Summary of the Invention

[0003] The purpose of this invention is to provide a method for correcting the position of electronic signatures and re-signing based on Excel documents. This invention improves the accuracy of signature position and the efficiency of batch signature processing.

[0004] To achieve the above objectives, the present invention adopts the following technical solution: a method for correcting the position of electronic signatures and repeating signatures based on Excel documents, the method comprising:

[0005] Step 1: Obtain the target signed document and the source Excel document associated with the target signed document;

[0006] Step 2: Based on the location information of the signature keywords in the source Excel document, correct the initial signature coordinates corresponding to the signature keywords in the target signature document to obtain the target signature coordinates;

[0007] Step 3: Based on the signature data structure that includes unit dimension and job dimension, perform a duplicate check on the target signature coordinates; in response to the result of the duplicate check being duplicate, execute an exclusive logic judgment. If the preset exclusive condition is met, the duplicate identification is excluded, and the set of real duplicate signature locations is obtained.

[0008] Step 4: Generate batch signature parameters based on the set of real duplicate signature locations, and call the target electronic signature service interface to perform the signature operation.

[0009] The above method, wherein obtaining the target signed document and the source Excel document associated with the target signed document, includes:

[0010] By using the metadata or filename of the same file, the target signed document can be associated and matched with the source Excel document;

[0011] Obtaining the target signature coordinates includes:

[0012] Extract the cell location information of the signature keywords in the source Excel document;

[0013] Based on the preset signature offset rules and cell position information, the absolute physical coordinates in the target signature document are calculated and used as the target signature coordinates.

[0014] In the aforementioned method, the cell location information includes cell boundary coordinates and keyword character length;

[0015] The calculation of the absolute physical coordinates in the target signed document includes:

[0016] The starting rendering coordinates of the signature keywords are determined based on the cell boundary coordinates;

[0017] Based on the keyword character length and the preset character width baseline value, calculate the text width occupied by the signature keyword;

[0018] According to the formula:

[0019] ;

[0020] ;

[0021] Calculate the absolute physical coordinates ;

[0022] in, As the starting rendering coordinates, The width occupied by the text. and These are the horizontal fixed offset and the vertical fixed offset defined in the preset signature offset rules, respectively.

[0023] The aforementioned method, specifically step 3, includes the following processes:

[0024] Based on the job dimension in the signature data structure, determine whether the current signature position and the recorded signature position belong to the same job position;

[0025] In response to the fact that the job is a duplicate, the unit dimension in the signature data structure is further verified.

[0026] If the current signature position is different from the unit corresponding to the previously recorded signature position but the position is the same, then an exclusive logic judgment is triggered to exclude the duplicate identification of the current signature position and confirm it as a non-duplicate signature position.

[0027] If the current signature location is the same as the unit and position corresponding to the previously recorded signature location, it is confirmed as a genuine duplicate signature location and added to the set of genuine duplicate signature locations.

[0028] The aforementioned method, wherein the signature data structure includes a signer identifier field, an organization identifier field, a job position identifier field, and a signature location coordinate field;

[0029] Based on the set of actual duplicate signature locations, batch signature parameters are generated, including:

[0030] Traverse the set of real duplicate signature locations and extract the coordinates of multiple signature locations belonging to the same signer ID and the same unit ID;

[0031] Multiple signature location coordinates are encapsulated into an array structure and combined with the corresponding seal image identifier and the signer's digital certificate identifier to generate the batch signature parameter object required by the target electronic signature service interface.

[0032] The aforementioned method further includes:

[0033] Determine whether the target signature coordinates are a duplicate signature;

[0034] In response to the fact that the target signature coordinates are not duplicate signatures, organize the signature parameters of a single location based on the target signature coordinates;

[0035] In response to the target signature coordinates being a duplicate signature, the step of generating batch signature parameters based on the set of actual duplicate signature locations is performed.

[0036] The aforementioned method further includes:

[0037] Persist the signature data structure, which includes the corrected target signature coordinates and the result of the exclusive logic judgment, to the relational database;

[0038] By calling the target electronic signature service interface, and based on the batch signature parameters, the signature pattern is rendered and positioned at the target signature coordinates of the target signature document.

[0039] The aforementioned method further includes:

[0040] Based on the signature keyword, retrieve the signature person's identity, seal image identifier, and signature location information corresponding to the signature keyword from the relational database;

[0041] Based on the signer's identity, seal image identifier, and signature location information, signature parameters are organized.

[0042] An electronic signature position correction and duplicate signature system based on Excel documents, the system comprising:

[0043] The document acquisition module is used to acquire the target signed document and the source Excel document associated with the target signed document;

[0044] The coordinate correction module is used to correct the initial signature coordinates corresponding to the signature keywords in the target signature document based on the position information of the signature keywords in the source Excel document, so as to obtain the target signature coordinates.

[0045] The duplicate identification module is used to perform duplicate verification on the target signature coordinates based on the signature data structure that includes unit and job dimensions; in response to the result of duplicate verification being duplicate, an exclusion logic judgment is executed; if the preset exclusion condition is met, the duplicate identification is excluded, and the set of real duplicate signature locations is obtained.

[0046] The parameter aggregation and execution module is used to generate batch signature parameters based on the set of real repeated signature locations, and call the target electronic signature service interface to perform the signature operation.

[0047] A computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method as described above.

[0048] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described above.

[0049] Compared to existing technologies, this invention uses a source Excel document as the benchmark for position correction. It leverages precise cell boundary coordinates and keyword character lengths within the Excel document, combined with pre-defined signature offset rules, to calculate the absolute physical coordinates in the target document. This overcomes the signature position offset problem caused by relying solely on text search within the document layout, ensuring the signature accurately falls within the expected blank area and improving the standardization and aesthetics of electronic documents. Furthermore, by constructing a signature data structure integrating unit and job dimensions and introducing exclusive logic in duplicate verification, it effectively distinguishes between genuine duplicate signatures from the same unit and job title and non-duplicate signatures from different units and job titles. This avoids cross-unit mis-aggregation or missed signatures caused by simple keyword matching, ensuring the accuracy and legal validity of electronic document data. Based on this, the locations of confirmed genuine duplicate signatures are aggregated into batch signature parameters and the target electronic signature service interface is called. This merges previously scattered multiple signature requests into a single service call, significantly reducing network interactions and the overhead of the signature service interface, thus improving signature processing efficiency in complex form scenarios. Attached Figure Description

[0050] Figure 1 This is a flowchart of the method for correcting the position of an electronic signature and repeating a signature based on an Excel document, according to an embodiment of the present invention.

[0051] Figure 2 This is a schematic diagram comparing the starting position of the signature keyword with the actual signature position according to an embodiment of the present invention;

[0052] Figure 3 This is a comparative schematic diagram of complex form signature position correction according to an embodiment of the present invention. Detailed Implementation

[0053] To make the objectives, technical solutions, and advantages of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.

[0054] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0055] Example 1: This example provides a method for correcting the position of electronic signatures and handling duplicate signatures based on Excel documents. This method is mainly applied to the electronic signing of engineering archives or original documents, aiming to solve the technical problems of signature position misalignment in formatted documents and low efficiency in duplicate signatures on complex forms. For example... Figure 1 As shown, the method includes the following steps:

[0056] Step 1: Obtain the target signed document and its associated source Excel document. In this step, the target signed document typically refers to the formatted document to be signed, such as a PDF or OFD document. While these documents are suitable for archiving and reading, their internal text layout often undergoes minor changes due to font replacements and re-formatting during the conversion process. This makes it difficult to accurately locate the intended signature area using keywords directly based on the formatted document. In contrast, the source Excel document, as the original data carrier of the target signed document, retains precise cell structure, row and column coordinates, and text attributes. Therefore, this step obtains a source Excel document that corresponds to the target signed document, providing a reliable baseline data source for subsequent high-precision location correction. It should be understood that obtaining the associated document can be done in various ways, such as automatic matching by parsing unique identifiers in the file metadata, or searching based on preset file naming rules, as long as a mapping relationship can be established between the two.

[0057] Step 2: Based on the location information of the signature keywords in the source Excel document, the initial signature coordinates corresponding to the signature keywords in the target signature document are corrected to obtain the target signature coordinates. In this step, after determining the associated source Excel document, the system first locates the cell containing the signature keywords (such as "project manager's signature," "company seal," etc.) and its precise boundary coordinates in the source document. Since the coordinates in the source Excel document are based on logical coordinates of a grid system, while the target signature document uses an absolute physical coordinate system, there is a natural mapping difference between the two. The core idea of ​​this step is to use the stable structured location information in the source document to correct the initial signature coordinates in the target document that may be caused by rendering deviations. This cross-format coordinate correction mechanism can effectively overcome the position drift problem caused by relying solely on text search of the layout document, ensuring that the final generated target signature coordinates can accurately fall within the expected blank signing area, avoiding the signature pattern from obscuring the text content or deviating from the specified position. The specific coordinate transformation algorithm and offset calculation details will be further described in subsequent embodiments.

[0058] Step 3: Based on the signature data structure that includes unit and job dimensions, perform a duplicate check on the target signature coordinates; in response to the duplicate check result being duplicate, execute an exclusive logic judgment. If the preset exclusive condition is met, the duplicate identification is excluded, and the set of real duplicate signature locations is obtained.

[0059] Specifically, in complex engineering document forms, a single document often contains multiple locations requiring the same person's signature, but there may also be situations where personnel from different units holding the same position need to sign. If simple duplicate checks are performed based solely on the signer or position name, legitimate signatures from "different units, same position" are easily misjudged as duplicate operations, leading to missed or incorrect signatures. Therefore, this embodiment introduces a signature data structure containing both unit and position dimensions as a verification benchmark. When the system detects that the current target signature coordinates overlap with a recorded signature location on the position, it does not directly classify it as duplicate. Instead, it triggers an exclusive logic check: if the two belong to different units, they are considered independent signatures, excluding duplicate identification; only when both the unit and position are the same is it confirmed as a genuine duplicate signature and included in the set of genuine duplicate signature locations. This mechanism achieves precise modeling of business rules from a technical perspective, ensuring both the efficiency of batch processing and the legal validity and accuracy of electronic document data.

[0060] Step 4: Generate batch signing parameters based on the set of real duplicate signature locations, and call the target electronic signature service interface to execute the signing operation. In this step, after filtering out the set of real duplicate signature locations, the system aggregates multiple coordinate points belonging to the same signature subject (such as the same seal ID or certificate ID) and encapsulates them into a batch signing parameter object conforming to the target electronic signature service interface specification. Compared to the traditional method of initiating signing requests point by point, this parameter aggregation strategy can merge the originally scattered multiple network interactions into a single service call, significantly reducing communication overhead and server processing pressure, and improving the overall efficiency of the signing process. Subsequently, the system calls the target electronic signature service interface to pass the batch signing parameters to the signing server, and the server completes the rendering and placement of the signature pattern at the corresponding target signature coordinates in the target signed document. It should be understood that the target electronic signature service interface can be any third-party or self-built signing service capability. This invention focuses on the organization and calling logic of parameters, rather than the specific implementation of the signing service provider.

[0061] Through steps 1 to 4 above, this embodiment not only solves the pain point of inaccurate signature position in formatted documents, but also avoids the risk of misoperation in complex business scenarios through refined repeated verification logic, and improves system performance with batch processing mechanism.

[0062] In some embodiments, obtaining the target signed document and the source Excel document associated with the target signed document includes: associating and matching the target signed document with the source Excel document through the metadata or filename of the same file. Specifically, this association matching is a prerequisite for cross-format coordinate correction. In the actual business of engineering file management, layout documents are often generated from Excel documents through printing drivers or conversion tools, and there is a natural correspondence between the two. To ensure the accuracy and automation of the matching, the present invention preferably adopts a multi-verification mechanism. For example, the system first parses the metadata attributes of the target signed document to check whether it embeds the unique identifier of the source file (such as GUID or hash value); if the metadata is missing, it falls back to the filename matching strategy and uses regular expressions to extract key feature fields such as project number, version number, and date stamp in the filename for fuzzy matching. It should be understood that although this embodiment lists two matching methods, metadata and filename, in other embodiments, similarity matching based on file content features can also be used, or a mapping relationship can be established through an external database index table, as long as the correspondence between the two can be established. This automated association and matching mechanism avoids the tedious operation and mismatch risk of manually specifying source files, and provides a reliable data foundation for subsequent coordinate correction.

[0063] Furthermore, based on the positional information of the signature keywords in the source Excel document, the initial signature coordinates corresponding to the signature keywords in the target signature document are corrected to obtain the target signature coordinates. This includes: extracting the cell position information of the signature keywords in the source Excel document; combining the preset signature offset rules and cell position information, calculating the absolute physical coordinates in the target signature document, and using the absolute physical coordinates as the target signature coordinates. The core of this step lies in using the structured information of the source document to correct the unstructured deviations of the layout document. For example... Figure 2 and Figure 3 As shown, in existing document processing technologies, directly searching for keywords in documents such as PDFs typically only locates the starting rendering position of the text string (e.g., ...). Figure 2 and Figure 3 (The location indicated by the left arrow). However, in actual engineering document signing procedures, the signature should be located in the blank signing area to the right or below the keyword (e.g., ...). Figure 2 and Figure 3 The location indicated by the arrow on the right (in the middle section), rather than covering the text. This discrepancy between the "search location" and the "expected business location" is the main cause of electronic signature confusion. This embodiment fundamentally solves this technical problem by tracing back to the source Excel document and using its precise cell grid coordinate system as a reference.

[0064] To more clearly illustrate the specific implementation process of coordinate correction, the following explanation uses a specific calculation model. In some embodiments, cell position information includes cell boundary coordinates and keyword character length. Combining preset signature offset rules and cell position information, the absolute physical coordinates in the target signature document are calculated, including: determining the starting rendering coordinates of the signature keyword based on the cell boundary coordinates; and calculating the text width occupied by the signature keyword based on the keyword character length and a preset character width baseline value. Based on this, the absolute physical coordinates are calculated according to the following formula. :

[0065] ;

[0066] ;

[0067] in, As the starting rendering coordinates, The width occupied by the text. and These are the horizontal fixed offset and the vertical fixed offset defined in the preset signature offset rules, respectively.

[0068] Specifically, the above formula constructs a mapping model from the Excel logical grid to the physical pages of the layout document. Parameters and This is not simply the coordinate of the top-left corner of the cell, but rather the pixel-level coordinates of where the signature keywords actually begin to render within the cell. This requires considering the cell's alignment (e.g., left alignment, center alignment) and padding. Parameters This represents the horizontal space occupied by the keyword text itself. It can be calculated by multiplying the number of characters by the average character width, or by iterating through each character and summing the actual widths according to font metrics. The latter method offers higher accuracy when handling mixed Chinese and English text or widened fonts. (Parameters) and This is the key moderating variable, used to compensate for the difference between the "end position of the text" and the "ideal center position of the signature".

[0069] For example, suppose you locate the keyword "Project Manager Signature:" in the cell at row 5, column 3 of the source Excel document. The top-left corner of this cell has physical coordinates of (100, 200). The keyword text is 7 Chinese characters long, and the default character width is 14 pixels. Then the text will occupy a width of... The value is 98 pixels. If business rules require the stamp to be placed to the right of the text and vertically centered, set the horizontal offset. Vertical offset of 20 pixels (to allow for visual spacing) If the value is 10 pixels (adjusted to the center of the line height), then the final target signature coordinates are... The result is 100 + 98 + 20 = 218. The result is 200 + 10 = 210. Through this quantitative calculation, the system transforms abstract business signing habits into precise machine execution instructions.

[0070] In addition, it should be noted that the offset and Instead of being a fixed constant, the offset is configurable to adapt to diverse signing scenarios. For example, a larger diameter official seal may require a larger horizontal offset to avoid obscuring the text, while a smaller personal seal requires a correspondingly smaller offset. In a preferred embodiment, the system can maintain a mapping configuration table between seal size and offset, dynamically loading the corresponding offset parameters based on the seal type of the current signer during calculation. This design allows the same correction algorithm to be compatible with seals of various sizes, enhancing the versatility and robustness of the technical solution. Through the aforementioned coordinate correction mechanism, this embodiment effectively overcomes the inaccuracy of direct search and positioning in formatted documents, ensuring the standardization and aesthetics of electronic seal placement, and laying a precise positional foundation for subsequent batch signing operations.

[0071] In some embodiments, to support the accurate execution of the aforementioned repeatability verification and exclusivity logic, this invention constructs a standardized signature data structure. This signature data structure includes a signer identifier field, an organization identifier field, a position identifier field, and a signature location coordinate field. Specifically, this data structure is not a simple business information record table, but rather serves as the technical benchmark for the system to perform automated verification. The signer identifier field uniquely indexes the specific signing entity and can be a user ID or digital certificate serial number; the organization identifier field distinguishes different organizational entities, preventing data confusion across organizations; the position identifier field represents the signer's functional role in the business process, such as "project manager" or "technical lead"; and the signature location coordinate field stores the target signature coordinates corrected by the aforementioned embodiments. These four fields together constitute a multi-dimensional verification vector, enabling the system to accurately identify the attributes of the signing behavior at the data processing level, rather than relying solely on fuzzy matching of text keywords, thus providing a reliable data foundation for subsequent exclusivity judgments.

[0072] Based on the aforementioned signature data structure, the system's process of verifying the repetition of target signature coordinates follows a strict hierarchical judgment logic. Specifically, based on the job dimension in the signature data structure, it determines whether the current signature position and the recorded signature position belong to the same job. This step is equivalent to performing a preliminary search or hash matching in the dataset using the job identifier as the key. In response to belonging to the same job, the system further verifies the unit dimension in the signature data structure. At this stage, if the unit corresponding to the current signature position is different from that of the recorded signature position but the job is the same, an exclusion logic judgment is triggered, excluding the duplicate identification of the current signature position and confirming it as a non-duplicate signature position. For example, in an engineering file, there may be two signature positions: "Technical Head of Construction Unit" and "Technical Head of Supervision Unit." Although both have the job identifier "Technical Head," because the unit identifiers are different, the system uses exclusion logic to identify them as two independent signing tasks, rather than duplicate operations. Conversely, if the unit corresponding to the current signature position is the same as that of the recorded signature position and the job is the same, it is confirmed as a true duplicate signature position and added to the set of true duplicate signature positions. This two-tiered verification mechanism, which prioritizes job title over company name, effectively avoids the risk of cross-company mis-aggregation due to identical job titles, ensuring the legal validity and data accuracy of electronic document signing relationships.

[0073] After identifying the set of genuine duplicate signature locations, the system further performs parameter aggregation to improve efficiency. Specifically, the process of generating batch signature parameters based on the set of genuine duplicate signature locations includes: traversing the set of genuine duplicate signature locations and extracting multiple signature location coordinates belonging to the same signer ID and the same unit ID. Then, these multiple signature location coordinates are encapsulated into an array structure and combined with the corresponding seal image identifier and signer digital certificate identifier to generate the batch signature parameter object required by the target electronic signature service interface. For example, if a project manager needs to sign in 5 different locations on the same document, the system will not initiate 5 independent signature requests. Instead, it will package these 5 target signature coordinates into a coordinate array, along with the project manager's seal ID and certificate ID, into a JSON-formatted batch parameter object. This data structure design directly adapts to the batch processing specifications of mainstream electronic signature service interfaces, merging operations that originally required multiple network interactions into a single API call. This not only significantly reduces the communication overhead between the client and the server, but also reduces the resource consumption of redundant calculations in parsing request headers and verifying signatures on the server side, thereby achieving an order-of-magnitude improvement in processing efficiency in complex form signing scenarios. It should be understood that although this embodiment uses JSON format as an example, other serialization formats such as XML and Protobuf can also be used in other implementations, as long as they can express the mapping relationship between coordinate arrays and identity identifiers.

[0074] In some embodiments, to ensure the signing process can adapt to diverse business scenarios, the system adds refined branch control logic before executing the signing operation. Specifically, it determines whether the target signature coordinates are duplicate signatures. This step is essentially the final confirmation and routing of the duplicate verification results in the aforementioned embodiments. If the target signature coordinates are not duplicate signatures, single-location signature parameters are organized based on the target signature coordinates. For example, when a project file has only one location requiring the project manager's signature, or when it is confirmed by exclusive logic to be an independent signature location from different units, the system will not forcibly include it in the batch processing queue, but instead constructs an independent single-location signature parameter object. This object typically contains a single coordinate point, the corresponding seal identifier, and certificate information. This design allows the system to flexibly handle mixed scenarios where "single-point signing" and "multi-point batch signing" coexist, avoiding logical redundancy caused by excessive aggregation or performance loss caused by lack of aggregation. Conversely, if the target signature coordinates are duplicate signatures, the step of generating batch signature parameters based on the actual set of duplicate signature locations in the aforementioned embodiments is executed. Through this binary branching mechanism, the present invention achieves unified management of all signature requests. Regardless of the upstream identification result, the downstream can receive execution instructions with standardized structure and clear semantics, thereby improving the robustness of the overall processing chain.

[0075] Furthermore, to ensure the compliance and traceability of the electronic signature process, this invention also introduces a data persistence mechanism. Specifically, the signature data structure, including the corrected target signature coordinates and the result of the exclusive logical judgment, is persisted to a relational database. The significance of this technique lies not only in recording the signature result but also in completely preserving the decision-making process of the technical solution. The "corrected target signature coordinates," stored as an intermediate calculation product, can prove in subsequent audits or dispute resolution that the signature placement is based on precise calculations from the source Excel document, rather than arbitrary manual designation or fuzzy searching of the document layout, thus enhancing the legal evidentiary value of the electronic document. Simultaneously, the recording of the "exclusivity logical judgment result" provides direct data evidence to explain "why certain seemingly duplicated positions were not merged for signatures," effectively preventing human error due to complex business rules. In addition, in practical engineering applications, this persistence operation also supports breakpoint resume functionality. When a signing task is interrupted due to network fluctuations or server overload, the system can read the completed correction and verification status from the database and only initiate subsequent requests for the coordinates that have not been executed. This avoids the waste of resources caused by full recalculation and significantly improves the fault tolerance of large-scale document processing tasks.

[0076] After data persistence is completed and before entering the signing execution phase, the system needs to perform a crucial mapping step. Specifically, based on the signing keyword, the system retrieves the signer's identity, seal image identifier, and signing location information corresponding to the signing keyword from the relational database. This step serves as a bridge connecting the preceding data preparation phase and the final signing execution phase. In terms of workflow, the system uses the signing keyword as a query index to retrieve the signer's identity (such as user ID or digital certificate serial number), seal image identifier (such as the file ID or resource path of the seal image), and the signing location information (after the aforementioned correction and verification) associated with the keyword from the signature data structure persisted to the relational database. Subsequently, based on the signer's identity, seal image identifier, and signing location information, the system organizes the signing parameters. Specifically, the system assembles the retrieved signer's identity, seal image identifier, and signing location information to generate a standardized signing parameter object, providing a complete execution context for subsequent calls to the electronic signature service interface. This database-based mapping mechanism enables precise association between business-level signature keywords and technical-level identity credentials, image resources, and coordinate data. It automates and standardizes the organization of signature parameters, avoids the tedious manual configuration of signature elements, and provides data support for the traceability of the signature process.

[0077] After completing parameter organization and data persistence, the system enters the final signing execution stage. Specifically, by calling the target electronic signature service interface, based on batch signing parameters or single-location signing parameters, the system renders and positions the signature image at the target signature coordinates in the target document. During this process, the system serializes the aforementioned standardized parameter object into an interface request body and sends it to the electronic signature server. The server parses the coordinate array and identity credentials in the parameters, uses a digital certificate to encrypt and sign the document, and accurately composites the seal image to the specified physical coordinate position. It should be understood that "rendering and positioning" here is an atomic technical action, and its accuracy depends entirely on the quality of coordinate correction and parameter aggregation in the preceding steps. To further enhance the usability of the solution in a real production environment, this embodiment also preferably includes an exception handling mechanism. For example, before calling the API, the system performs boundary checks on the target signature coordinates. If the coordinates exceed the document page range, an alarm is automatically triggered or the system is downgraded to a default safe location to prevent signature failure due to dirty data. During the API call, if a timeout or temporary error occurs, the system can automatically resend the request according to a preset retry strategy, and combine this with the aforementioned persistent records to avoid duplicate signatures. Although these engineering details are not explicitly reflected in the core process, they are key supports for ensuring that the technical solution moves from a theoretical model to practical application, ensuring that the electronic signature service can operate stably and accurately under various boundary conditions.

[0078] Example 2: This invention also provides an electronic signature position correction and duplicate signature system based on Excel documents. This system corresponds to the method embodiment in logical architecture, but in specific implementation, it is a combination of functional modules with clearly defined data interaction interfaces. The system mainly includes a document acquisition module, a coordinate correction module, a duplicate recognition module, and a parameter aggregation and execution module. These modules are coupled through standardized data objects to jointly complete the fully automated processing from original document parsing to final signature placement.

[0079] The document acquisition module is used to acquire the target signed document and the associated source Excel document. Specifically, this module not only performs basic file reading functions but also incorporates a built-in matching engine. In actual operation, the module first loads the target signed document, then automatically triggers the association retrieval mechanism. By parsing the unique identifier in the document's metadata or performing regular expression matching on the filename, it locates and loads the corresponding source Excel document from local storage or a cloud database. The output of this module is not two independent file streams, but rather a document context object encapsulating a bidirectional mapping relationship. This ensures that subsequent processing stages can readily trace back the structured information of the source document, providing the necessary data prerequisites for cross-format coordinate correction.

[0080] The coordinate correction module is used to correct the initial coordinates of the signature keywords in the target signature document based on the position information of the signature keywords in the source Excel document, thus obtaining the target signature coordinates. Specifically, this module receives a document context object from the document acquisition module, serving as the calibration center of the data processing chain. Internally, it integrates a cell parser and a coordinate mapping calculator. The former is responsible for extracting the precise boundary coordinates and text attributes of the cell containing the signature keywords from the source Excel document, while the latter, based on preset signature offset rules and combined with keyword character length and font measurement information, converts the logical grid coordinates into absolute physical coordinates in the target signature document's page coordinate system. Through this proactive correction mechanism based on the source document's structural features, this module effectively eliminates positional drift caused by rendering differences in the layout document, outputting high-precision target signature coordinates downstream, fundamentally ensuring the accuracy of signature placement.

[0081] The duplicate signature detection module performs duplicate verification on the target signature coordinates based on a signature data structure that includes unit and job dimensions. In response to a duplicate result, it executes an exclusion logic check. If the preset exclusion conditions are met, the duplicate is excluded, resulting in a set of true duplicate signature locations. Specifically, this module is the core filter of the system's business logic. Its input receives the target signature coordinates output by the coordinate correction module and a preset signature data structure. Internally, the module maintains a state machine that sequentially performs initial screening at the job dimension and verification at the unit dimension. When the job identifier corresponding to the current coordinate is found to be the same as a historical record, the unit identifier is further compared. If the units are different, it is determined to be an independent signing behavior, and the coordinate is marked as a non-duplicate item. If the units are also the same, it is confirmed as a true duplicate signature and added to the cache set. This refined data diversion mechanism ensures that only duplicate locations that conform to business rules are aggregated, avoiding the risk of cross-unit erroneous signatures. Simultaneously, the cleaned set of true duplicate signature locations is passed as structured data to the next stage.

[0082] The parameter aggregation and execution module generates batch signature parameters based on a set of real duplicate signature locations and calls the target electronic signature service interface to execute the signature operation. Specifically, this module is located at the end of the processing chain, responsible for converting the logical data generated upstream into executable machine instructions. It iterates through the received set of real duplicate signature locations, groups them by signer and organization identifiers, encapsulates multiple coordinate points belonging to the same entity into an array structure, and combines it with seal image identifiers and digital certificate identifiers to generate batch signature parameter objects conforming to the interface specifications. Subsequently, this module calls the target electronic signature service interface via HTTP or RPC protocol, sending the parameter objects to the server to complete the rendering and placement of the signature pattern. Compared to the traditional single-point serial processing method, this module significantly reduces the number of network requests and server-side signature verification overhead through parameter aggregation, greatly improving system throughput and response speed in complex form scenarios while ensuring the legal validity of the signature.

[0083] Furthermore, to adapt to the interface differences of different electronic signature service providers, the parameter aggregation and execution module also incorporates a multi-service provider parameter adaptation mechanism. Specifically, the system maintains a parameter template configuration table, which records the mapping relationship between multiple electronic signature service provider identifiers and their corresponding parameter format templates. Each parameter format template defines the field naming rules, parameter nesting structure, and authentication parameter format required by the target service provider's interface. When generating batch signature parameter objects, the parameter aggregation and execution module loads the corresponding parameter format template from the parameter template configuration table based on the currently specified target signature service provider identifier, and performs field mapping and structural encapsulation of the signature position coordinate array, seal image identifier, and signer digital certificate identifier according to the template to generate request parameters that conform to the target service provider's interface specifications. For example, the interface of the first electronic signature service provider might require the coordinate array to be passed as a "positions" field, along with "sealId" and "certId" fields; while the interface of the second electronic signature service provider might require the same data to be passed as a "signLocations" field, along with "stampImageCode" and "certificateNo" fields. The system automatically converts field names and restructures parameter structures by reading the parameter template configuration table, eliminating the need to write separate adaptation code for each service provider. This template-based multi-service provider adaptation mechanism allows the system to interface with different electronic signature service providers using a unified core business logic, significantly reducing integration development costs and maintenance complexity in multi-service provider environments, and enhancing the versatility and scalability of the technical solution in actual engineering deployments.

[0084] It should be understood that the above module division is merely an exemplary description of logical functions. In actual engineering deployments, the modules can be merged, split, or distributed across different computing nodes, as long as the overall system can achieve the data processing flow and technical effects described in this invention. For example, the coordinate correction module and the duplicate identification module can be integrated into a unified data preprocessing service, while the parameter aggregation and execution module can be independently encapsulated as a microservice component, communicating asynchronously with other modules through message queues. This flexible architecture design enables the system of this invention to adapt to electronic signature application scenarios of different scales and performance requirements.

[0085] Example 3: This invention also provides a computer device, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the method described in the foregoing embodiments. Specifically, this computer device is a hardware entity that carries and runs the above-described method for electronic signature position correction and duplicate signature based on Excel documents. The processor can be a central processing unit, digital signal processor, application-specific integrated circuit, or field-programmable gate array (FPGA), etc., possessing data processing and logic control capabilities. It is responsible for reading computer program instructions from the memory and sequentially executing operations such as document acquisition, coordinate correction, duplicate identification, and parameter aggregation according to the instruction sequence. The memory is used to persistently or temporarily store program code and intermediate data generated during processing, such as cell coordinate information of the source Excel document, corrected target signature coordinates, exclusiveness judgment results, and generated batch signature parameter objects. In practical deployments, the memory typically includes high-speed random access memory to support the processor's real-time computing needs, while also being equipped with non-volatile storage devices to ensure the long-term preservation of the program and critical data. Furthermore, the computer device may also include components such as a communication bus, a network interface, and input / output devices, interacting with an external electronic signature server through the network interface to complete the final signature rendering and placement operation. It should be understood that although this embodiment uses a single-machine device as an example, in other embodiments, the computer device may also be a distributed server cluster, a cloud computing node, or an edge computing terminal, as long as it has the ability to execute programs to implement the method of this invention.

[0086] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the method as described in the foregoing embodiments. Specifically, the computer-readable storage medium serves as the software carrier for the aforementioned method flow, enabling the technical solution to be distributed, backed up, and migrated independently of a specific hardware environment. The storage medium can be non-volatile, such as a read-only memory, flash memory, disk, optical disk, or solid-state drive, or it can be volatile dynamic random access memory, as long as it can be accessed by a processor and the program instructions stored therein can be read. When the processor loads and executes the computer program from the storage medium, it drives hardware resources to complete a series of technical actions, such as retrieving associated documents, calculating absolute physical coordinates, performing exclusive logical judgments, and generating batch signature parameters.

[0087] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for correcting the position of electronic signatures and repeating signatures based on Excel documents, characterized in that, The method includes: Step 1: Obtain the target signed document and the source Excel document associated with the target signed document; Step 2: Based on the location information of the signature keywords in the source Excel document, correct the initial signature coordinates corresponding to the signature keywords in the target signature document to obtain the target signature coordinates; Step 3: Based on the signature data structure that includes unit dimension and job dimension, perform a duplicate check on the target signature coordinates; in response to the result of the duplicate check being duplicate, execute an exclusive logic judgment. If the preset exclusive condition is met, the duplicate identification is excluded, and the set of real duplicate signature locations is obtained. Step 4: Generate batch signature parameters based on the set of real duplicate signature locations, and call the target electronic signature service interface to perform the signature operation.

2. The method according to claim 1, characterized in that, The process of obtaining the target signed document and the source Excel document associated with the target signed document includes: By using the metadata or filename of the same file, the target signed document can be associated and matched with the source Excel document; Obtaining the target signature coordinates includes: Extract the cell location information of the signature keywords in the source Excel document; Based on the preset signature offset rules and cell position information, the absolute physical coordinates in the target signature document are calculated and used as the target signature coordinates.

3. The method according to claim 2, characterized in that, The cell location information includes the cell boundary coordinates and the length of the keyword characters; The calculation of the absolute physical coordinates in the target signed document includes: The starting rendering coordinates of the signature keywords are determined based on the cell boundary coordinates; Based on the keyword character length and the preset character width baseline value, calculate the text width occupied by the signature keyword; According to the formula: ; ; Calculate the absolute physical coordinates ; in, As the starting rendering coordinates, The width occupied by the text. and These are the horizontal fixed offset and the vertical fixed offset defined in the preset signature offset rules, respectively.

4. The method according to claim 1, characterized in that, The specific process of step 3 includes: Based on the job dimension in the signature data structure, determine whether the current signature position and the recorded signature position belong to the same job position; In response to the fact that the job is a duplicate, the unit dimension in the signature data structure is further verified. If the current signature position is different from the unit corresponding to the previously recorded signature position but the position is the same, then an exclusive logic judgment is triggered to exclude the duplicate identification of the current signature position and confirm it as a non-duplicate signature position. If the current signature location is the same as the unit and position corresponding to the previously recorded signature location, it is confirmed as a genuine duplicate signature location and added to the set of genuine duplicate signature locations.

5. The method according to claim 4, characterized in that, The signature data structure includes a signer identifier field, an organization identifier field, a position identifier field, and a signature location coordinate field; Based on the set of actual duplicate signature locations, batch signature parameters are generated, including: Traverse the set of real duplicate signature locations and extract the coordinates of multiple signature locations belonging to the same signer ID and the same unit ID; Multiple signature location coordinates are encapsulated into an array structure and combined with the corresponding seal image identifier and the signer's digital certificate identifier to generate the batch signature parameter object required by the target electronic signature service interface.

6. The method according to claim 1, characterized in that, The method further includes: Determine whether the target signature coordinates are a duplicate signature; In response to the fact that the target signature coordinates are not duplicate signatures, organize the signature parameters of a single location based on the target signature coordinates; In response to the target signature coordinates being a duplicate signature, the step of generating batch signature parameters based on the set of actual duplicate signature locations is performed.

7. The method according to claim 1, characterized in that, The method further includes: Persist the signature data structure, which includes the corrected target signature coordinates and the result of the exclusive logic judgment, to the relational database; By calling the target electronic signature service interface, and based on the batch signature parameters, the signature pattern is rendered and positioned at the target signature coordinates of the target signature document.

8. The method according to claim 7, characterized in that, The method further includes: Based on the signature keyword, retrieve the signature person's identity, seal image identifier, and signature location information corresponding to the signature keyword from the relational database; Based on the signer's identity, seal image identifier, and signature location information, signature parameters are organized.

9. A system for correcting the position of electronic signatures and repeating signatures based on Excel documents, characterized in that, The system includes: The document acquisition module is used to acquire the target signed document and the source Excel document associated with the target signed document; The coordinate correction module is used to correct the initial signature coordinates corresponding to the signature keywords in the target signature document based on the position information of the signature keywords in the source Excel document, so as to obtain the target signature coordinates. The duplicate identification module is used to perform duplicate verification on the target signature coordinates based on the signature data structure that includes unit and job dimensions; in response to the result of duplicate verification being duplicate, an exclusion logic judgment is executed; if the preset exclusion condition is met, the duplicate identification is excluded, and the set of real duplicate signature locations is obtained. The parameter aggregation and execution module is used to generate batch signature parameters based on the set of real repeated signature locations, and call the target electronic signature service interface to perform the signature operation.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 8.