Electronic signature processing method, system and terminal equipment for bid evaluation file

By using a hybrid neural network architecture for signature recognition and verification, combined with an intelligent typesetting strategy, the problem of unrecognizable and overwritten signature content in online signing is solved, thus ensuring the accuracy and legality of the signature content.

CN120726635BActive Publication Date: 2026-01-09INSPUR GENERSOFT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511148639.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-18
Publication Date
2026-01-09
Estimated Expiration
2045-08-18

AI Technical Summary

Technical Problem

In existing technologies, the recognition and arrangement of online expert signatures suffer from problems such as inaccurate identification of signature content and overlapping signatures. This is especially true when multiple people sign, as static anchor points cannot be dynamically adjusted, leading to inconsistent signature sizes and overlap.

Method used

A hybrid neural network architecture is used for character recognition. The DB text detection network is used to locate the valid signature area. Character features are extracted by combining convolutional neural networks and bidirectional long short-term memory networks. The signature content is verified and the boundary is updated. The intelligent typesetting strategy is used to achieve the optimal layout and avoid signature overwriting.

Benefits of technology

It achieves accurate identification and legality verification of signed content, ensures that the signed content matches the expert's name, avoids overlapping signatures, and improves the accuracy and legality of signed documents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120726635B_ABST
    Figure CN120726635B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of information processing, and specifically discloses an electronic signature processing method and system for a bid evaluation file and a terminal device. The method comprises the following steps: obtaining an electronic signature image and performing preprocessing; positioning an effective signature area, recognizing signature content through character recognition decoding; verifying the signature content to form an effective signature picture; sorting all effective signature pictures according to width, constructing an initial layout branch for each effective signature picture after sorting based on the filling logic of preferentially selecting the widest effective signature picture that can be accommodated by the remaining width of the current line, simultaneously exploring and optimizing the layout branch through state transition, and finally obtaining a globally optimal layout strategy; and embedding all effective signature pictures into the corresponding position of the bid evaluation file based on the globally optimal layout strategy. The application realizes the optimal arrangement of expert signatures in the bid evaluation file through an intelligent layout strategy, thereby avoiding the problem of signature overlapping.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of information processing, and in particular to an electronic signature processing method and system for bid evaluation documents and a terminal device. BACKGROUND

[0002] The statements in this section merely provide background information related to the present application and do not necessarily constitute the prior art.

[0003] At present, many bid evaluation projects are changing from offline bid evaluation to online system evaluation. At the same time, the expert signature is converted from the paper document circulation and manual signature confirmation mode to the online system signature to form an electronic signature file.

[0004] After the experts complete the bid evaluation in the bid evaluation system, the bid evaluation report, the bid evaluation summary, the bid evaluation details and other process documents need to be electronically signed and confirmed to form a file with legal effect. Although electronic signature can reduce the number of signatures and improve the efficiency of signature, there are still many problems, such as:

[0005] Most of the prior art crops the signature content through a fixed size cropping frame, and the size and position of the signature of different experts will be different, so when forming the signature picture, most of the blank space will be limited in the corner, and after the signature picture is embedded into the bid evaluation file, the defect will be enlarged, which may result in that the signature content cannot be accurately recognized.

[0006] In addition, one signature file may need to be signed by multiple experts at the same time, at which time each signature is embedded into the anchor point position by specifying the anchor point position; however, the signature anchor point is mostly a static marker (such as a fixed coordinate frame in PDF), which cannot dynamically adjust the size according to the signature picture, and when the size of the signature picture of multiple people is different or the number exceeds the anchor point capacity, the signature may be overlapped. SUMMARY

[0007] In order to solve the above problems, the present application proposes an electronic signature processing method, system and terminal device for bid evaluation documents, which optimizes the whole process from the recognition and confirmation of the signature to the warning, performs double verification on the legality of the signature through a hybrid neural network architecture for character recognition, and realizes the optimal arrangement of the expert signature in the bid evaluation file through an intelligent layout strategy, thereby avoiding the problem of overlapping signatures.

[0008] In some embodiments, the following technical solutions are adopted:

[0009] An electronic signature processing method for bid evaluation documents, comprising:

[0010] obtaining an electronic signature image and performing preprocessing;

[0011] For the pre-processed signature image, first locate the effective signature region, and then recognize the signature content through character recognition decoding;

[0012] Verify the signature content, update the boundary of the signature image that passes the verification, form an effective signature picture, and adjust the effective signature picture to a uniform height;

[0013] Sort all effective signature pictures by width, based on the filling logic of preferentially selecting the widest effective signature picture that can be accommodated in the remaining width of the current row, construct an initial layout branch for each sorted effective signature picture, and explore optimized layout branches through state transition, finally obtain the globally optimal layout strategy;

[0014] Embed all effective signature pictures into the corresponding position of the bid evaluation document based on the globally optimal layout strategy.

[0015] As a further solution, for the pre-processed signature image, first locate the effective signature region, the specific process is:

[0016] Input the pre-processed signature image into the trained DB text detection network to locate the effective signature region; wherein the processing process of the DB text detection network on the signature image includes:

[0017] Extract multi-scale semantic features through the backbone network, low-level features focus on basic visual information of the image, high-level features have semantic correlation, and mine semantic information of the text region to assist in determining whether the pixel belongs to the text category; through the feature pyramid network, the multi-scale features are fused, the basic visual information and semantic information are fused by upsampling and horizontally connecting different scale features, the feature expression of the network to the text region is enhanced; finally, the contracted text region and the threshold value map are output, the text range is preliminarily located through the contracted region, the text boundary is determined through the threshold value map, and the contracted region is restored to the complete signature region through the progressive expansion algorithm, and the effective signature region is obtained.

[0018] As a further solution, the signature content is recognized through character recognition decoding, specifically:

[0019] Based on the obtained effective signature region, the character feature map of the effective signature region is extracted using a convolutional neural network, the feature map is cut into multiple C-dimensional vectors along the width dimension, and each C-dimensional vector represents the feature information of the corresponding vertical slice of the feature map, thereby converting the spatial dimension feature map into a time sequence;

[0020] Input the obtained time sequence into the trained bidirectional long short-term memory network to obtain the probability that each time step is predicted as a certain character, thereby extracting the order relationship between characters; finally, the recognized signature content is output through CTC decoding.

[0021] As a further solution, the signature content is verified, specifically including:

[0022] The identified signature content is compared with the name of the expert logged into the system, and if it is consistent, the verification is passed, and if it is inconsistent, an alarm is given;

[0023] The pre-processed signature image is compared with the pre-stored signature image of the system, and the similarity of the two is calculated, and if the similarity reaches the set threshold, the verification is passed, and if it does not reach the set threshold, an alarm is given.

[0024] As a further solution, the signature image that passes the verification is updated for the boundary to form an effective signature picture, specifically:

[0025] The signature image that passes the verification is respectively searched for the boundary in the row direction and the column direction;

[0026] The process of searching for the boundary in the row direction is specifically:

[0027] Find the leftmost boundary in the row direction: Set the leftmost boundary in the row direction as the initial left boundary, divide it into multiple rows according to the pixels, and cycle each row from top to bottom; Each row is searched from left to right until the first non-blank pixel is found, the position is recorded, and then the next row is continued; After traversing all rows, take the earliest occurrence of the first non-blank pixel in all rows as the leftmost boundary;

[0028] Find the rightmost boundary in the row direction: Set the rightmost boundary in the row direction as the initial right boundary, divide it into multiple rows according to the pixels, and cycle each row from top to bottom; Each row is searched from right to left until the first non-blank pixel is found, the position is recorded, and then the next row is continued; After traversing all rows, take the earliest occurrence of the first non-blank pixel in all rows as the rightmost boundary.

[0029] As a further solution, based on the filling logic of preferentially selecting the widest effective signature picture that can be accommodated by the remaining width of the current row, an initial layout branch is constructed for each effective signature picture after sorting, and the specific process is:

[0030] The effective signature pictures are sorted in order of width from large to small. For the i+1th effective signature picture, on the basis of the initial layout branch of the i th effective signature picture, if the remaining width of the previous row is greater than the width of the effective signature picture, the i+1th effective signature picture is added to the previous row; Otherwise, the i+1th effective signature picture is added to a new row; Get the initial layout branch of the i+1th effective signature picture.

[0031] As a further solution, the layout branch is optimized by state transition exploration, and the specific process is:

[0032] For the i+1th effective signature picture, adjust the initial layout branch of the i+1th effective signature picture, and screen out the optimized layout branch with a total remaining width less than or equal to the initial layout branch of the i+1th effective signature picture;

[0033] On the basis of the optimized layout branch of the first i effective signature pictures, randomly layout the i+1th effective signature picture, and screen out the optimized layout branch with a total remaining width less than or equal to the initial layout branch of the i+1th effective signature picture;

[0034] All the screened out optimized layout branches are the optimized layout branches of the i+1th effective signature picture.

[0035] As a further scheme, from the final initial layout branch and the optimized layout branch, the layout branch with the least number of rows is selected as the globally optimal layout strategy; when the number of rows of all branches is the same, the layout branch with the least total remaining width is selected as the globally optimal layout strategy; when the number of rows and the total remaining width of all branches are the same, the branch with the maximum remaining width of the last row is selected as the globally optimal layout strategy; when the number of rows, the total remaining width and the remaining width of the last row of all branches are the same, one of the branches is randomly selected as the globally optimal layout strategy.

[0036] In some other embodiments, the following technical solutions are adopted:

[0037] An electronic signature processing system of a bid evaluation file, comprising:

[0038] An acquisition module configured to acquire electronic signature images and perform preprocessing;

[0039] An identification module configured to, for the preprocessed signature images, first locate the effective signature area, and then identify the signature content through character recognition decoding;

[0040] A verification module configured to verify the signature content, update the boundary of the signature image that passes the verification, form an effective signature picture, and adjust the effective signature picture to a uniform height;

[0041] A layout module configured to sort all the effective signature pictures according to the width, based on the filling logic of preferentially selecting the widest effective signature picture that can be accommodated by the remaining width of the current row, construct an initial layout branch for each effective signature picture after sorting, and explore the optimized layout branch through state transition, to finally obtain a globally optimal layout strategy;

[0042] A filling module configured to embed all the effective signature pictures into the corresponding position of the bid evaluation file based on the globally optimal layout strategy.

[0043] In other embodiments, the following technical solutions are adopted:

[0044] A terminal device comprises a processor and a memory, the processor is used to implement instructions; the memory is used to store a plurality of instructions, the instructions are suitable for being loaded by the processor and performing the electronic signature processing method of the bid evaluation file.

[0045] Compared with the prior art, the beneficial effects of the present application are:

[0046] (1) The present application utilizes a DB text detection network to obtain an effective signature area; image features are extracted through a convolutional neural network, and then the feature images are converted into time series, the context relationship between characters is captured through a bidirectional long short-term memory network, and finally the accurate recognition of characters in the signature area is realized.

[0047] (2) The present application respectively verifies the legality of the signature content through signature content matching and signature image comparison, ensures that the signature content matches the expert's name, and at the same time ensures that the signature content is the signature of the expert himself, avoids the situation of mis-signing or signing on behalf of others, ensures that the signature content is accurate and correct, and guarantees the accuracy and legality of online signature of the bid evaluation file.

[0048] (3) The present application realizes accurate recognition of the row and column boundaries around the signature content through pixel-level scanning, thereby forming an effective signature picture, and adjusting the effective signature picture to a uniform height; it can avoid the situation that the signature is limited in the corner due to the use of a fixed size of the cropping frame, so that the signature content cannot be accurately recognized.

[0049] (4) In order to avoid the situation that the signature may overlap each other when the size of the multi-person signature picture is not the same or the number exceeds the anchor point capacity, the present application obtains a globally optimal layout strategy based on the initial layout strategy combined with a dynamic programming strategy, that is, it avoids the problem of falling into local optimization caused by using only the initial layout strategy, and avoids the problem of large amount of calculation caused by directly using the dynamic programming strategy; a relatively globally optimal layout strategy of multiple expert signature pictures can be obtained, automatic layout of multiple effective signature pictures is realized, and the problem of signature overlap that may occur when multiple expert signatures are embedded in a file at the same time is avoided.

[0050] Other features and advantages of the additional aspects of the present application will be partially given in the following description, partially will become obvious from the following description, or will be understood by the practice of the present application. BRIEF DESCRIPTION OF DRAWINGS

[0051] Figure 1 The flow chart of the electronic signature processing method of the bid evaluation file in the embodiments of the present application;

[0052] Figure 2A process diagram for verifying the signature content in the embodiments of the present application. DETAILED DESCRIPTION

[0053] It should be noted that the following detailed description is illustrative only, and is intended to provide further description of the application. 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 application belongs.

[0054] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of example embodiments in accordance with the present application. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "comprising," when used in this specification, specify the presence of stated features, steps, operations, elements, components, and / or groups thereof, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and / or groups thereof.

[0055] Embodiment one

[0056] In one or more embodiments, an electronic signature processing method of a bid evaluation file is disclosed, which is combined with Figure 1 , and specifically includes the following processes:

[0057] S101: Obtain an electronic signature image and perform preprocessing.

[0058] In this embodiment, the expert signature is implemented by using an electronic signature board integrated with a pressure sensor. Compared with the existing technology of using a mouse or a signature pen to directly sign on an electronic screen, the signature signed by using the electronic signature board integrated with a pressure sensor has higher similarity to the signature on paper and stronger anti-interference capability. In addition, the pressure data can be collected, the signature content and the pressure data can be stored in a database, and the signature timestamp can be recorded.

[0059] After obtaining the electronic signature image of the expert, first, image preprocessing is performed. The specific preprocessing process includes:

[0060] Gaussian filtering: a two-dimensional Gaussian function is constructed to generate a smoothing template, and a convolution operation is performed on the image. By using the weight distribution characteristics, the Gaussian noise in the image is effectively suppressed.

[0061] Threshold segmentation and binarization: the image pixels are converted into a black and white binary image according to the comparison of the gray value with the set threshold value, the text information is retained, the background interference is removed, and a clear image basis is provided for subsequent processing.

[0062] S102: For the preprocessed signature image, first, the effective signature area is located, and then the signature content is recognized by character recognition decoding.

[0063] In this embodiment, first, the DB (Differentiable Binarization) text detection network is used to obtain the effective signature area; then the image features are extracted through the convolutional neural network, the feature image is converted into a time sequence, the context relationship between characters is captured through the bidirectional long short-term memory network, and finally the accurate recognition of the characters in the signature area is realized.

[0064] As a specific implementation, the DB text detection network in this embodiment is based on the idea of differentiable binarization. In the feature extraction process, the image features are extracted through the backbone network, and then the multi-scale features are fused through the feature pyramid network. The specific process is as follows:

[0065] The preprocessed signature image is input into the DB text detection network, and multi-scale semantic features are extracted through the ResNet (Residual Network) backbone network. The multi-scale semantic features cover rich content from low to high. The low-level features focus on the basic visual information of the image, such as the edge contour of the signature stroke (outline the shape of the text), texture details (present the texture of the text stroke), etc., which are beneficial to capture the local structure of the text. The high-level features have semantic association and can mine semantic information of the text area, such as the overall semantics and spatial distribution of the text line and paragraph, which can assist in determining whether the pixel belongs to the text category and provide feature support at different abstraction levels for subsequent text detection.

[0066] The multi-scale semantic features are fused through the feature pyramid network (FPN), and different scale features are connected horizontally through upsampling, which fuses the details and semantic information and enhances the feature expression of the network for the signature text area. It can not only recognize the detail pattern but also understand the overall meaning.

[0067] The output of the DB text detection network includes a contracted text area and a threshold map. The contracted text area can preliminarily locate the range of the signature text, and the threshold map can assist in determining the range boundary of the signature text.

[0068] Since the contracted text area is the preliminary text area obtained by the DB text detection network, its range is smaller than that of the real complete text area, so it is used as the starting area for progressive expansion. The contracted area is restored to a complete signature area through a progressive expansion algorithm to realize accurate positioning. The specific process is as follows:

[0069] The shrunk text region output by the DB text detection network is taken as a starting region, and the coordinates and area information of the region are recorded. The region range is gradually expanded by using morphological dilation (making the region boundary grow outward) or a polygon offset algorithm (making the edges and vertices of the shrunk polygon offset by a set step length according to geometric calculation), so that the shrunk region is close to the real complete text region. During the expansion process, whether to stop expansion is judged according to the probability value (judging the probability of whether the expanded part belongs to the text region), the geometric shape (maintaining the reasonable shape of the text region to avoid excessive deformation), and the area change rate (controlling the expansion rhythm to prevent abnormal expansion), so as to ensure that the expansion is sufficient but not excessive. After the expansion is completed, noise removal (removing non-text interference regions introduced during the expansion), merging adjacent / fine regions (making the text region more complete and coherent), and simplifying the polygon (optimizing the representation of the region boundary and reducing the complexity) are performed, and finally the complete and accurate signature region is output, realizing the restoration from the shrunk region to the complete and effective text region.

[0070] As a specific implementation, character recognition is performed by a hybrid neural network architecture of a convolutional neural network and a bidirectional long short-term memory network. The convolutional neural network extracts image features, and the feature image is converted into a time sequence. The bidirectional long short-term memory network captures the context relationship between characters. The specific process is as follows:

[0071] A lightweight convolutional neural network architecture, such as a ResNet18 variant, is used to construct a network structure containing 5-7 convolutional blocks. In the network, 3×3 convolutional kernels are responsible for extracting local features in the signature image, such as stroke edges, corner points, and other detailed information. Different step lengths are set to control the size change of the feature map. To avoid information loss caused by traditional pooling layers, a dilated convolution is used instead. By adjusting the dilated rate, the receptive field is expanded without reducing the resolution, and more detailed features are preserved. A BatchNorm layer (batch normalization layer) and a ReLU activation function (linear rectifier activation function) are connected after each convolutional layer. The BatchNorm layer accelerates network convergence, and the ReLU function introduces nonlinearity and enhances the expression ability of the network. After multiple convolution operations, the final output feature map has a size of H'×W'×C (such as 1×25×512), where the height H' is compressed from the original image height to 1 through convolution and pooling operations, the width W' is preserved and corresponds to the time step of subsequent processing, and the number of channels C is greatly expanded from 3 to 512, which is used to capture more rich semantic features.

[0072] The feature Figure 1The reshaping operation is performed by W'xC, and is converted into a time series form. Specifically, the feature map is cut into W' C-dimensional vectors along the width dimension, i.e., from a tensor of [1, 25, 512] to a matrix form of [25, 512]. This conversion has a clear physical meaning, and each C-dimensional vector represents the feature information of the vertical slice of the image, where the t-th vector corresponds to the feature description of the t-th region of the image from left to right. Through this operation, the spatial dimension feature map is converted into a time series suitable for processing by a recurrent neural network, laying the foundation for subsequent modeling of the context relationship between characters. The input sequence length T is equal to the width W' of the feature map, and the feature dimension D of each time step is equal to the channel number C of the feature map.

[0073] The embodiment adopts a two-layer bidirectional long short-term memory network, each layer of which is provided with 256 hidden units, for deep modeling of the input time sequence features. In the forward propagation process of the network, the input layer receives a feature sequence with a size of [T, D] (such as [25, 512]).

[0074] In the first layer bidirectional long short-term memory network, the forward long short-term memory network processes the sequence from left to right, and calculates the forward hidden state h_t^f at the current time step according to the current input and the hidden state at the previous time step. The backward long short-term memory network processes the sequence from right to left, and calculates the backward hidden state h_t^b according to the current input and the hidden state at the next time step. Then, the forward and backward hidden states are spliced h_t = [h_t^f; h_t^b] to obtain an output vector with a dimension of 512, realizing bidirectional capture of context information.

[0075] The second layer bidirectional long short-term memory network repeats the above process to further enhance the modeling capability of the network for context dependency. Finally, the network outputs a probability matrix with a size of [T, V] (such as [25, 62]), where V represents the number of character categories, including a special blank label, and each element in the matrix represents the probability of predicting a certain character at the corresponding time step.

[0076] After completing the feature sequence modeling of the bidirectional long short-term memory network, the conversion from the probability matrix to the text is achieved through the CTC (Connectionist Temporal Classification) mechanism. The CTC loss function is designed based on the concept of path probability, defining all possible paths that map the input sequence to the target text. For example, for the target text "ab", possible paths include [a,b], [a,blank,b], [a,a,b], etc. The sum of probabilities P(text|image) of all valid paths is efficiently calculated through the forward-backward algorithm, and this probability is optimized during the training process to enable the model to learn the correct mapping relationship. During the inference stage, different decoding strategies are adopted to obtain the final text. The greedy decoding strategy is simple and direct, selecting the character with the highest probability at each step, then merging duplicate characters and removing the blank label to obtain the preliminary decoding result. The more optimized beam search strategy retains the Top-K (e.g., K = 5) candidate paths, combines the language model scoring (such as evaluating the rationality of the path through dictionary matching), and selects the path with the highest comprehensive score as the final output. In addition, post-processing operations are also carried out. The language model is used to correct common errors based on n-gram statistical information, such as correcting "Zhang = San" to "Zhang San"; at the same time, the average probability of the decoded text is calculated, and results below the threshold (e.g., 0.7) trigger manual rechecking to ensure the accuracy and reliability of the output signature text recognition.

[0077] S103: Verify the signature content, update the boundary of the signature image that passes the verification to form a valid signature picture, and adjust the valid signature picture to a unified height.

[0078] In this embodiment, in combination with Figure 2 , compare the recognized signature content with the name of the expert logged in to the system. If they are the same, the verification passes; if the comparison is different, give warnings to the expert and the staff, and perform a secondary confirmation manually to avoid misjudgment.

[0079] Meanwhile, call the intelligent agent, upload the current signature picture and the archived signature picture, and the intelligent agent compares the two picture files to judge the similarity between the signature picture and the archived signature picture. If the similarity meets the requirements, the verification passes; if the similarity is low, give warnings to the expert and the staff, and perform a secondary confirmation manually to avoid misjudgment.

[0080] As a further optional method, process the collected pen pressure data of the signature pen, extract the time-domain features and frequency-domain features, and compare them with the archived pen pressure data using the cosine similarity algorithm. If the similarity meets the requirements, the verification passes; if the similarity is low, give warnings to the expert and the staff, and perform a secondary confirmation manually to avoid misjudgment.

[0081] After the above several verification methods are passed, it can be confirmed that the signature file is correct, and the subsequent embedding processing of the signature file is performed.

[0082] The embodiment verifies the legality of the signature content through multiple verification mechanisms, ensures that the signature content matches the expert's name, and ensures that the signature content is the expert's own signature, avoiding the situation of signing wrong or signing on behalf of others, ensuring that the signature content is accurate and correct, and ensuring the accuracy and legality of online signature of the bid evaluation file.

[0083] After verification, the boundary of the signature image is updated, an effective signature picture is formed, and the effective signature picture is adjusted to a uniform height. In this way, it can be ensured that the expert's signature can occupy as much area of the picture as possible, reducing unnecessary blank space and avoiding the problem that the signature may be limited in the corner when a fixed size of a cropping frame is directly used to crop the signature area, ensuring accurate identification of the signature content.

[0084] The method for boundary updating includes finding the left and right boundaries of the signature image in the row direction and the top and bottom boundaries in the column direction; taking the row direction boundary finding as an example:

[0085] Finding the leftmost boundary in the row direction: set the leftmost boundary in the row direction as the initial left boundary, divide it into multiple rows according to the pixels, and divide the rows according to the set requirements; cycle through each row from top to bottom; find the first non-blank pixel from left to right in each row, record the position, and then continue to the next row; after traversing all rows, take the earliest occurrence of the first non-blank pixel in all rows as the leftmost boundary.

[0086] Finding the rightmost boundary in the row direction: set the rightmost boundary in the row direction as the initial right boundary, divide it into multiple rows according to the pixels, and cycle through each row from top to bottom; find the first non-blank pixel from right to left in each row, record the position, and then continue to the next row; after traversing all rows, take the earliest occurrence of the first non-blank pixel in all rows as the rightmost boundary.

[0087] After the leftmost boundary and the rightmost boundary in the row direction are found, the left and right boundaries of the image can be updated.

[0088] Similarly, the method for finding the topmost boundary and the bottommost boundary in the column direction is the same as that for finding the row direction boundary. After the topmost boundary and the bottommost boundary in each column direction are found, the top and bottom boundaries of the image can be updated.

[0089] It should be noted that the method for determining whether a pixel is a blank pixel or a non-blank pixel in the embodiment is that a completely transparent pixel (Alpha value is 0) is regarded as a blank pixel, a pixel close to white (RGB value is higher than a set threshold) is regarded as a blank pixel, and other pixels are regarded as non-blank pixels.

[0090] According to the determined boundary, a clipping region is calculated, a minimum margin is applied to ensure proper blank after clipping, a boundary jitter problem is handled, and an irregular boundary is smoothed. A new image region is created according to the optimized boundary, the original image content is copied to the new region, and an effective signature picture is formed.

[0091] Finally, the processed signature picture is adjusted to a uniform height, and the width is automatically calculated according to the height / width ratio.

[0092] S104: Sort all effective signature pictures according to width, and based on the filling logic of preferentially selecting the widest effective signature picture that can be accommodated by the remaining width of the current line, construct an initial layout branch for each sorted effective signature picture, and explore optimized layout branches through state transition to finally obtain a globally optimal layout strategy.

[0093] In order to achieve optimal layout of expert signatures in a fixed stroke area, optimize the visual effect of the final signature file, and avoid the situation of signature file overlapping each other, the embodiment sorts all effective signature pictures according to width from large to small, realizes the efficiency of local decision-making through initial optimization filling strategy, and solves the problem of local optimization through dynamic optimization strategy. By combining the initial optimization filling strategy and the dynamic optimization strategy, the problem of local optimization caused by only using the initial optimization filling strategy can be avoided, and the problem of large amount of calculation required by the dynamic optimization strategy can be solved.

[0094] As a specific implementation, the effective signature pictures are sorted according to width from large to small, obtaining a sequence w_1≥w_2≥...≥w_n, and the sorted indexes are denoted as 1, 2,..., n. In this embodiment, the pictures are arranged in descending order of width, and the pictures with large width are processed first. When arranging the pictures in each line, more space can be flowed out to arrange narrower pictures. If the pictures are arranged in ascending order of width, the problem that the wide pictures cannot be placed after the narrow pictures fill the line may occur, thereby increasing the number of invalid lines.

[0095] For each effective signature picture, the embodiment performs initial optimization layout according to the filling logic of preferentially selecting the widest effective signature picture that can be accommodated by the remaining width of the current line; specifically:

[0096] For the i+1th effective signature picture, on the basis of the initial layout branch of the ith effective signature picture, if the remaining width of the previous line is greater than the width of the effective signature picture, the i+1th effective signature picture is added to the previous line; otherwise, the i+1th effective signature picture is added to a new line; the initial layout branch of the i+1th effective signature picture is obtained, i=1, 2,..., n, and n is the number of effective signature pictures.

[0097] On the basis of the initial optimized layout, a dynamic optimization strategy is performed, specifically:

[0098] (1) For the i+1th effective signature picture, the initial layout branch of the i+1th effective signature picture is adjusted, that is, the placement positions of each picture in the initial layout branch of the i+1th effective signature picture are adjusted, but the picture width in each row is kept in descending order (i.e., in each row, the picture width of the picture placed in front is greater than or equal to the picture width of the picture placed behind), and an optimized layout branch with a total remaining width less than or equal to the initial layout branch of the i+1th effective signature picture is screened out.

[0099] (2) On the basis of the optimized layout branch of the first i effective signature pictures, the i+1th effective signature picture is randomly laid out, and an optimized layout branch with a total remaining width less than or equal to the initial layout branch of the i+1th effective signature picture is screened out.

[0100] Finally, all the optimized layout branches screened out above are the optimized layout branches of the i+1th effective signature picture.

[0101] According to the above process, the final initial layout branch and all the optimized layout branches meeting the conditions are obtained, and the branch with the least number of rows is selected as the globally optimal layout strategy. If the number of rows of all branches is the same, the branch with the smallest remaining total width (i.e., the smallest waste) is selected as the globally optimal layout strategy. If the number of rows and the total remaining width of all branches are the same, the branch with the largest remaining width in the last row is selected as the globally optimal layout strategy. If the number of rows, the total remaining width, and the remaining width in the last row of all branches are the same, one of the branches is randomly selected as the globally optimal layout strategy.

[0102] If only the initial optimized layout is used, since the same layout strategy is used for each picture, it is easy to fall into a local optimal problem and cannot achieve global optimization. If only the dynamic optimization strategy is used, there are n! possible arrangement ways, and the calculation amount is very large, which affects the layout efficiency. Therefore, for each effective signature picture, the initial layout branch is first obtained through the initial optimized layout, and then one or more optimized layout branches are obtained based on the initial layout branch. The dynamic optimization does not need to start from zero and try again, but uses the initial layout branch as a reference to explore better solutions through fine-tuning of the row combination, reduces the optimization cost, and improves the layout efficiency.

[0103] As a specific example, assume that the picture width is sorted in descending order as [40, 40, 30, 30, 30, 30]; the sorted index is 1, 2, 3, 4, 5, 6, and the maximum width of each row is 100.

[0104] When i = 1, the initial layout branch is [1]; the initial layout branch of the i+1th (i.e. the 2nd) picture is [1, 2], and there is no optimal layout branch meeting the condition;

[0105] When i = 2, the initial layout branch is [1, 2]; the initial layout branch of the i+1th (i.e. the 3rd) picture is

[1, 2], [3]

[1, 3], [2]

[1, 3], [2]

[0106] Wherein, the condition meeting refers to that the total remaining width of the optimal layout branch of the i+1th effective signed picture is less than or equal to the total remaining width of the initial layout branch of the i+1th effective signed picture.

[0107] When i = 3, the initial layout branch is

[1, 2], [3]

[1, 2], [3, 4]

[0108] The optimal layout branch of the i+1th picture explored by the dynamic optimization strategy is

[1, 3, 4], [2]

[1, 3], [2]

[1, 3, 4], [2]

[1, 3, 4], [2]

[0109] When i = 4, the initial layout branch is

[1, 2], [3, 4]

[1, 2], [3, 4, 5]

[0110] The optimal layout branch of the i+1th picture explored by the dynamic optimization strategy is

[1, 3, 5], [2, 4]

[1, 3, 4], [2]

[1, 3, 4], [2, 5]

[1, 3, 5], [2, 4]

[1, 3, 4], [2, 5]

[1, 3, 5], [2, 4]

[0111] When i = 5, the initial layout branch is

[1, 2], [3, 4, 5]

[1, 2], [3, 4, 5], [6]

[0112] By dynamic optimization strategy, the optimal layout branch of the i+1th picture is:

[1, 2], [4, 5, 6], [3]

[1, 2], [3, 5, 6], [4]

[1, 2], [3, 5, 6], [5]

[1, 3, 4], [2, 5]

[1, 3, 5], [2, 4]

[1, 3, 4], [2, 5, 6]

[1, 3, 5], [2, 4, 6]

[1, 3, 6], [2, 4, 5]

[1, 4, 6], [2, 3, 5]

[1, 5, 6], [2, 3, 4]

[1, 3, 4], [2, 5, 6]

[1, 3, 5], [2, 4, 6]

[1, 3, 6], [2, 4, 5]

[1, 4, 6], [2, 3, 5]

[1, 5, 6], [2, 3, 4]

[0113] In summary, from the initial layout branch

[1, 2], [4, 5, 6], [3]

[1, 3, 4], [2, 5, 6]

[1, 3, 5], [2, 4, 6]

[1, 3, 6], [2, 4, 5]

[1, 4, 6], [2, 3, 5]

[1, 5, 6], [2, 3, 4]

[0114] As an example, because the number of rows and the total remaining width of these optimal branches are equal, and the remaining width of the last row is also the same,

[1, 3, 4], [2, 5, 6]

[0115] Sometimes, no matter how to adjust, a better layout result than the initial layout branch cannot be obtained, and the initial layout branch is selected as the final globally optimal layout strategy.

[0116] The embodiment can realize the layout effect of the least number of lines and the highest space utilization in the signature picture arrangement by combining initial optimization and dynamic optimization, so that the expert signatures are relatively optimally arranged in the fixed anchor point area, the final signature file presents a good visual effect, and the problem of mutual covering of the signature files is avoided.

[0117] S105: embedding all valid signature pictures into the corresponding positions of the bid evaluation file based on the globally optimal layout strategy.

[0118] In the embodiment, all valid signature pictures of the expert signatures are embedded into the signature file according to the globally optimal layout strategy obtained by calculation. The PDF rendering engine is used to accurately write the picture data into the PDF page content stream corresponding to the anchor point area, and to perform optimized rendering according to the transparency, color mode and other attributes of the picture, so as to ensure that the signature picture is perfectly integrated with the PDF file, and finally generate a complete signature PDF file.

[0119] In addition, according to the height of the signature picture, the total height required for placing all pictures can be obtained, that is, the total height = total number of lines x signature picture height. If the original height of the signature anchor point is less than the total height, the anchor point height needs to be expanded by using the PDF editing technology to ensure that the picture is completely embedded. Specifically, the height attribute of the anchor point area can be redefined by modifying the PDF page content stream, and the coordinate information related to the anchor point is adjusted to ensure the accuracy of its position in the PDF page.

[0120] Embodiment Two

[0121] In one or more embodiments, an electronic signature processing system of a bid evaluation file is disclosed, comprising:

[0122] The acquisition module is configured to acquire electronic signature images and perform preprocessing;

[0123] The recognition module is configured to, for the preprocessed signature images, first locate the valid signature area, and then recognize the signature content through character recognition decoding;

[0124] The verification module is configured to verify the signature content, update the boundary of the signature image that passes the verification, form a valid signature picture, and adjust the valid signature picture to a uniform height;

[0125] The layout module is configured to sort all valid signature pictures according to the width, construct an initial layout branch for each valid signature picture after sorting based on the filling logic of preferentially selecting the widest valid signature picture that can be accommodated by the remaining width of the current line, and explore the optimized layout branch through state transition, so as to finally obtain a globally optimal layout strategy;

[0126] The filling module is configured to embed all valid signature pictures into corresponding positions of the bid evaluation document based on a globally optimal layout strategy.

[0127] It should be noted that the specific embodiments of the above modules are exactly the same as those in Embodiment One, and will not be described in detail.

[0128] Embodiment Three

[0129] In one or more embodiments, a terminal device is disclosed, which includes a processor and a memory, the processor is configured to implement instructions; the memory is configured to store a plurality of instructions, the instructions are adapted to be loaded and executed by the processor to implement the electronic signature processing method of the bid evaluation document described in Embodiment One.

[0130] It should be understood that in the embodiments, the processor can be a central processing unit CPU, and the processor can also be other general-purpose processors, digital signal processors DSP, application-specific integrated circuits ASIC, ready programmable gate arrays FPGA or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.

[0131] The memory can include read-only memory and random access memory, and provide instructions and data to the processor, and a portion of the memory can also include non-volatile random access memory. For example, the memory can also store device type information.

[0132] In the implementation process, each step of the above method can be completed by integrated logic circuits of hardware in the processor or instructions in the form of software.

[0133] The above describes the specific embodiments of the present application in conjunction with the accompanying drawings, but is not a limitation on the scope of protection of the present application. Those skilled in the art should understand that various modifications or variations made by those skilled in the art on the basis of the technical solutions of the present application without creative labor are still within the scope of protection of the present application.

Claims

1. An electronic signature processing method of a bid evaluation document, characterized by, The method comprises the following steps: acquiring and preprocessing an electronic signature image; for the preprocessed signature image, first, the effective signature area is located, and then the signature content is recognized through character recognition decoding; the signature content is verified, the signature image that passes the verification is subjected to boundary update to form an effective signature picture, and the effective signature picture is adjusted to a uniform height; all effective signature pictures are sorted according to width, and based on the filling logic of preferentially selecting the widest effective signature picture that can be accommodated by the remaining width of the current line, an initial layout branch is constructed for each effective signature picture after sorting, and the layout branch is explored and optimized through state transition, and finally a globally optimal layout strategy is obtained; based on the globally optimal layout strategy, all effective signature pictures are embedded into the corresponding position of the bid evaluation document; wherein the layout branch is explored and optimized through state transition, and the specific process is as follows: for the i+1th effective signature picture, the initial layout branch of the i+1th effective signature picture is adjusted, and the optimization layout branch whose total remaining width is less than or equal to the initial layout branch of the i+1th effective signature picture is screened out; based on the optimization layout branch of the first i effective signature pictures, the i+1th effective signature picture is randomly laid out, and the optimization layout branch whose total remaining width is less than or equal to the initial layout branch of the i+1th effective signature picture is screened out; all the screened optimization layout branches are the optimization layout branches of the i+1th effective signature picture; from the final initial layout branch and the optimization layout branch, the layout branch with the least number of lines is selected as the globally optimal layout strategy; when the number of lines of all branches is the same, the layout branch with the least total remaining width is selected as the globally optimal layout strategy; when the number of lines and the total remaining width of all branches are the same, the branch with the maximum last line remaining width is selected as the globally optimal layout strategy; when the number of lines, the total remaining width and the last line remaining width of all branches are the same, one of the branches is randomly selected as the globally optimal layout strategy.

2. The electronic signature processing method for bid evaluation documents as described in claim 1, characterized in that, for the preprocessed signature image, first, the effective signature area is located, and the specific process is as follows: the preprocessed signature image is input into the trained DB text detection network to locate the effective signature area; wherein the processing process of the DB text detection network on the signature image comprises: extracting multi-scale semantic features through a backbone network, focusing on low-level features on basic visual information of an image, and enabling high-level features to have semantic correlation and mine semantic information of a text area to assist in judging whether a pixel belongs to a text category; fusing multi-scale features through a feature pyramid network, using up-sampling and horizontally connecting different scale features to fuse basic visual information and semantic information, and enhancing feature expression of the network on the text area; finally outputting a contracted text area and a threshold value map, preliminarily locating a text range through the contracted area, assisting in determining a text boundary through the threshold value map, and restoring the contracted area to a complete signature area through a progressive expansion algorithm to obtain the effective signature area.

3. The electronic signature processing method for bid evaluation documents as described in claim 1, characterized in that, the signature content is recognized through character recognition decoding, and the specific process is as follows: Based on the obtained effective signature area, a convolutional neural network is used to extract a character feature map of the effective signature area, and the feature map is cut into a plurality of C-dimensional vectors along the width dimension, each C-dimensional vector representing feature information of a corresponding vertical slice of the feature map, so as to convert the spatial dimension feature map into a time sequence; The obtained time sequence is input into the trained bidirectional long short-term memory network to obtain a probability of predicting a certain character at each time step, thereby extracting the sequential relationship between characters; finally, the recognized signature content is output by CTC decoding.

4. The electronic signature processing method for bid evaluation documents as described in claim 1, characterized in that, The signature content is verified, specifically including: The recognized signature content is compared with the expert name logged in the system, and if they are consistent, the verification is passed, and if they are inconsistent, an alarm is given; The preprocessed signature image is compared with the pre-stored signature image of the system, and the similarity between the two is calculated, and if the similarity reaches a set threshold, the verification is passed, and if the set threshold is not reached, an alarm is given.

5. The electronic signature processing method for bid evaluation documents as described in claim 1, characterized in that, The signature image that passes the verification is updated in boundary to form an effective signature picture, specifically: The signature image that passes the verification is updated in boundary to form an effective signature picture, specifically: The process of finding the leftmost boundary in the row direction is as follows: The leftmost boundary in the row direction is set as the initial left boundary, and the pixels are divided into multiple rows from top to bottom, and each row is cycled from left to right; find the first non-blank pixel, record the position, and then continue to the next row; after traversing all rows, take the earliest occurrence of the first non-blank pixel in all rows as the leftmost boundary. The rightmost boundary in the row direction is set as the initial right boundary, and the pixels are divided into multiple rows from top to bottom, and each row is cycled from right to left; find the first non-blank pixel, record the position, and then continue to the next row; after traversing all rows, take the earliest occurrence of the first non-blank pixel in all rows as the rightmost boundary.

6. The electronic signature processing method for bid evaluation documents as described in claim 1, characterized in that, Based on the filling logic of preferentially selecting the widest effective signature picture that can be accommodated by the remaining width of the current row, an initial layout branch is constructed for each effective signature picture in the sorted order, and the specific process is as follows: The effective signature pictures are sorted in descending order of width, and for the i+1th effective signature picture, on the basis of the initial layout branch of the i th effective signature picture, if the remaining width of the previous row is greater than the width of the effective signature picture, the i+1th effective signature picture is added to the previous row; otherwise, the i+1th effective signature picture is added to a new row; and the initial layout branch of the i+1th effective signature picture is obtained.

7. An electronic signature processing system for bid evaluation documents, characterized by It includes: An acquisition module configured to acquire an electronic signature image and perform preprocessing; An identification module configured to, for the preprocessed signature image, first locate the effective signature area, and then recognize the signature content through character recognition decoding; A verification module configured to verify the signature content, update the boundary of the signature image that passes the verification to form an effective signature picture, and adjust the effective signature picture to a uniform height; The layout module is configured to sort all valid signature pictures by width, build an initial layout branch for each valid signature picture based on filling logic that preferentially selects the widest valid signature picture that can be accommodated by the remaining width of the current row, and explore optimized layout branches through state transition to finally obtain a globally optimal layout strategy. The filling module is configured to embed all valid signature pictures into corresponding positions of the bid evaluation document based on the globally optimal layout strategy. The specific process of exploring optimized layout branches through state transition is as follows: For the i+1th valid signature picture, adjust the initial layout branch of the i+1th valid signature picture, and select optimized layout branches whose total remaining width is less than or equal to the initial layout branch of the i+1th valid signature picture; On the basis of the optimized layout branches of the first i valid signature pictures, randomly layout the i+1th valid signature picture, and select optimized layout branches whose total remaining width is less than or equal to the initial layout branch of the i+1th valid signature picture; All the selected optimized layout branches are the optimized layout branches of the i+1th valid signature picture; From the final initial layout branches and optimized layout branches, select the layout branch with the least number of rows as the globally optimal layout strategy; when all the branches have the same number of rows, select the layout branch with the least total remaining width as the globally optimal layout strategy; when all the branches have the same number of rows and total remaining width, select the layout branch with the largest remaining width of the last row as the globally optimal layout strategy; when all the branches have the same number of rows, total remaining width, and remaining width of the last row, randomly select one of the branches as the globally optimal layout strategy.

8. A terminal device comprising a processor and a memory, the processor configured to implement instructions; the memory configured to store a plurality of instructions, the terminal device characterized by, The instructions are adapted to be loaded and executed by the processor to perform the electronic signature processing method of the bid evaluation document according to any one of claims 1-6.

Citation Information

Patent Citations

  • Method and system for identifying signature and seal

    CN113569864A

  • Electronic signature method, electronic signature device, electronic equipment and storage medium

    CN115270711A