A method and apparatus for checking a tender
By combining object detection models and OCR models with the HSV color space, the validity of bid document stamps and the continuity of page numbers are automatically checked. This solves the problems of high manpower consumption and limitations of traditional manual inspection, and achieves efficient stamping and page number checking.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA TELECOM CLOUD TECH CO LTD
- Filing Date
- 2023-03-09
- Publication Date
- 2026-06-19
Smart Images

Figure CN116403228B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image recognition, and in particular to a method, apparatus, computer equipment, storage medium, and computer program product for tender document inspection. Background Technology
[0002] The inspection of tender documents includes two steps: first, checking the validity of the seal on each page; and second, checking the order of the page numbers. Taking the validity of the seal as an example, this includes checking whether there are any missing seals, illegible seals, or seals in blank areas on each page.
[0003] Traditionally, the validity of bid document stamps is checked manually, page by page. For bid documents with thousands of pages, this is undoubtedly a labor-intensive task.
[0004] Currently, the main method for checking the validity of bid document stamps is to determine whether the ink level of the stamping device is sufficient by calculating the gradient of the image block to be detected, thereby realizing the detection of stamp ambiguity. However, this method is only applicable to specific automatic stamping devices and is not suitable for general bid document stamp validity checks. Moreover, this method cannot realize the functions of missing stamp checks and blank space stamp checks. Summary of the Invention
[0005] Therefore, it is necessary to provide a method, apparatus, computer equipment, storage medium, and computer program product for checking tender documents, which can check for missing stamps, blurred stamps, and stamps in blank areas of tender documents, and can save a lot of manpower.
[0006] Firstly, this application provides a method for reviewing tender documents, the method comprising:
[0007] Convert the tender document file into a JSON string, and then convert the string into a numerical matrix;
[0008] The stamped image patch is obtained using an object detection model combined with the digital matrix;
[0009] Determine if the stamped image block is a blank stamp; if not, then...
[0010] Determine if the stamped image block is a blurry stamp; if not, then...
[0011] The stamped image block is converted into the HSV color space, and the number of red pixels and black pixels in the HSV color space are counted respectively.
[0012] Determine whether the number of red pixels is greater than a first preset threshold; if not, then...
[0013] The stamp on the corresponding page of the tender document is invalid; if so, then...
[0014] Determine whether the number of black pixels is greater than a second preset threshold; if not, then...
[0015] The corresponding page of the tender document should be stamped in the blank space.
[0016] In one embodiment, the step of converting the tender document file into a JSON string includes, prior to:
[0017] The tender documents are scanned to obtain a PDF file.
[0018] Convert a PDF tender document into an image format tender document.
[0019] In one embodiment, the process of converting the string into a number matrix further includes:
[0020] The page number image blocks are obtained using an object detection model combined with the aforementioned digital matrix;
[0021] The text direction of the page number image block is determined and standardized based on the aspect ratio of the page number image block;
[0022] The text in the page number image block is detected using an OCR model;
[0023] The page number information in the text is extracted using regularization methods, and the continuity of the page numbers is determined.
[0024] In one embodiment, determining the continuity of the page numbers includes:
[0025] Starting from a given page number, iterate through the sequence of page numbers following that starting point.
[0026] Determine if the sequence has any breakpoints; if so, then...
[0027] Determine if the breakpoint is a valid starting point of the new sequence; if so, then...
[0028] Starting from the breakpoint, traverse the sequence of page numbers following the new breakpoint; otherwise,
[0029] Mark the breakpoint as an anomaly and record the actual page number of the anomaly.
[0030] In one embodiment, the step of determining whether the breakpoint is a valid starting point of the new sequence further includes:
[0031] Determine if the breakpoint is the last point; if not, then...
[0032] Starting from the breakpoint, traverse the sequence of page numbers following the new breakpoint.
[0033] In one embodiment, the method further includes:
[0034] Output the abnormal stamps on the tender document, as well as the actual page number and abnormal condition of the abnormal point.
[0035] Secondly, this application provides a tender document inspection device, the device comprising:
[0036] The file conversion module is used to convert tender documents into JSON strings and strings into numerical matrices.
[0037] The information acquisition module is used to acquire the stamped image block using the target detection model and the digital matrix;
[0038] The first judgment module is used to determine whether the stamp image block is a blank stamp; if not, then...
[0039] The first judgment module is also used to determine whether the stamped image block is a blurry stamp; if not, then...
[0040] The space conversion module is used to convert the stamped image block into the HSV color space and count the number of red pixels and black pixels in the HSV color space respectively.
[0041] The second judgment module is used to determine whether the number of red pixels is greater than a first preset threshold; if not, then...
[0042] The marking module is used to indicate that the stamp on the corresponding page of the tender document is invalid; if it is, then...
[0043] The second judgment module is also used to determine whether the number of black pixels is greater than a second preset threshold; if not, then...
[0044] The marking module is also used to stamp blank spaces on the corresponding page of the tender document.
[0045] Thirdly, this application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement any of the above-mentioned tender inspection methods.
[0046] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements any of the above-described tender inspection methods.
[0047] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements any of the above-mentioned tender inspection methods.
[0048] The aforementioned tender document inspection method, apparatus, computer equipment, and storage medium acquire stamped image blocks by combining a target detection model with a digital matrix obtained from the conversion of the tender document file in JSON string format. It then judges whether the stamped image blocks are missing or blurred, effectively eliminating obviously and easily identifiable unqualified stamped image blocks. Next, the stamped image blocks are converted to HSV color space, and the number of red and black pixels in the HSV color space is counted. Based on a set threshold and the number of red pixels, the clarity and completeness of the red stamp in the stamped image block are determined. Then, based on a set threshold and the number of black pixels, it is determined whether the red stamp in the stamped image block is in a blank area. This method can automatically complete the inspection of the validity of stamps on tender documents and can cover various common stamping anomalies such as "missing stamps," "blurred stamps," and "stamps in blank areas," saving a significant amount of manual labor. Attached Figure Description
[0049] Figure 1 This is one of the flowcharts for the tender document inspection method in this application;
[0050] Figure 2 This is the second flowchart of the tender document inspection method for this application;
[0051] Figure 3 This is the third flowchart of the tender document inspection method for this application;
[0052] Figure 4 This is the fourth flowchart of the tender document inspection method for this application;
[0053] Figure 5 This is the fifth flowchart of the tender document inspection method for this application;
[0054] Figure 6 This is a block diagram of the tender document inspection device for this application;
[0055] Figure 7 This is an internal structural diagram of a computer device according to one embodiment. Detailed Implementation
[0056] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0057] like Figure 1 As shown, in one embodiment, a tender document inspection method includes the following steps:
[0058] Step S110: Convert the tender document file into a JSON string, and then convert the string into a number matrix.
[0059] Specifically, the tender document is converted into a base64 formatted JSON string, and then the base64 formatted JSON string is converted into a numerical matrix. Prior to this, a three-class object detection module using the YOLOv5 algorithm is trained to detect clear stamps, blurred stamps, and page number blocks. Considering the unique characteristics of page number blocks compared to other texts, such as isolated short text, special location, and special characters, page number blocks can be treated as a separate detection target. This allows subsequent page number recognition to use only a small portion of the text with the OCR model, effectively improving the efficiency and accuracy of page number recognition.
[0060] Step S120: Use the object detection model and combine it with the digital matrix to acquire the stamped image block.
[0061] Specifically, the numerical matrix obtained by converting the base64 format JSON string is input into the target detection module trained using the YOLOv5 algorithm to acquire stamped image blocks and determine whether the stamped image blocks are blank stamps or blurry stamps.
[0062] Step S130: Determine whether the stamp image block is a blank stamp. If not, proceed.
[0063] Specifically, if the target detection module determines that the stamped image block is a blank stamp, it will mark the current page of the tender as an abnormal stamped page and the abnormal item as "missing stamp".
[0064] Step S140: Determine whether the stamped image block is a blurry stamp. If not, proceed.
[0065] Specifically, if the target detection module determines that the stamped image block is a blurry stamp, it will mark the current page of the tender as an abnormal stamped page and the abnormal item as "blurry stamp".
[0066] Step S150: Convert the stamped image block into the HSV color space, and count the number of red pixels and black pixels in the HSV color space.
[0067] Specifically, red pixels are obtained from the red stamp within the tender document, representing the area within the stamped image block. Black pixels are obtained from the black text within the stamped image block within the tender document, representing the area of the black text within the stamped image block.
[0068] Step S160: Determine if the number of red pixels is greater than the first preset threshold. If not, proceed.
[0069] Specifically, if the number of red pixels is greater than the first set threshold, it means that the red stamp within the stamped image block is clear and complete. If the number of red pixels is not greater than the first set threshold, it means that the red stamp within the stamped image block is not a valid stamp.
[0070] Step S170: The stamp on the corresponding page of the tender document is invalid; if so, proceed as follows.
[0071] Step S180: Determine if the number of black pixels is greater than the second preset threshold. If not, proceed.
[0072] Specifically, if the number of black pixels is greater than the second set threshold, it means that the red stamp was affixed to the black text within the tender document, and the red stamp on the current page of the tender document is a valid stamp. If the number of black pixels is greater than the second set threshold, it means that the red stamp was affixed to the non-black text within the tender document, and the current page of the tender document is a "stamp in a blank area".
[0073] Step S190: Stamp the corresponding page of the tender document in the blank space.
[0074] The aforementioned tender document inspection method uses a target detection model combined with a digital matrix obtained from the conversion of the tender document file into a JSON string format to acquire the stamped image block. It then judges whether the stamped image block contains missing or blurred stamps, effectively eliminating obvious and easily identifiable unqualified stamped image blocks. Next, the stamped image block is converted to the HSV color space, and the number of red and black pixels in the HSV color space is counted. Based on a set threshold and the number of red pixels, the method determines whether the red stamp in the stamped image block is clear and complete. Then, based on a set threshold and the number of black pixels, it determines whether the red stamp in the stamped image block is stamped in a blank area. This method can automatically complete the check of the validity of the stamps on the tender document and can cover various common stamping anomalies such as "missing stamps," "blurred stamps," and "stamps in blank areas," saving a significant amount of manual labor.
[0075] In one embodiment, a target detection model is used in conjunction with a digital matrix to acquire stamped image blocks, followed by the steps of: integrating the stamped image blocks to obtain a list of stamped image blocks and initializing the number of valid stamps to 0.
[0076] In one embodiment, the stamp on the corresponding page of the tender is a stamp in a blank space, and the following steps are included: incrementing the number of valid stamps in the list of stamped image blocks by 1.
[0077] Specifically, while incrementing the number of valid stamps by 1, the stamp image block of the current page of the tender document becomes a valid red stamp, and the reason for the exception is recorded for other tender document pages that have not received an increment of 1 in the number of valid stamps. If there is no exception, an empty dictionary is output.
[0078] like Figure 2 As shown, in one embodiment, the tender document file is converted into a JSON string, which is preceded by the following steps:
[0079] Step S210: Scan the tender document to obtain a PDF tender document file.
[0080] Specifically, traditional tender documents are in paper format, so it is necessary to convert the tender document file format. First, the paper tender document is scanned with a scanning device to obtain a PDF tender document file.
[0081] Step S220: Convert the PDF tender document into an image tender document.
[0082] It should be noted that current page number order checks in tender documents include checking for missing pages and disordered page numbers in the binding. The main technical method currently applicable to page number order checks in tender documents is image feature matching based on image templates of the numbers 0-9, thereby recognizing Arabic numeral page numbers in the document image. This traditional method can be used for tender document page number checks, but it is limited to recognizing Arabic numeral page numbers and cannot cover tender documents with other types of page numbers (such as English letters, Roman numerals, etc.).
[0083] like Figure 3 As shown, in one embodiment, the string is converted into a matrix of numbers, followed by the following steps:
[0084] Step S310: Use an object detection model and a digital matrix to acquire the page number image block.
[0085] Specifically, the numerical matrix obtained by converting a base64 format JSON string is input into the target detection module trained using the YOLOv5 algorithm to acquire page number image blocks.
[0086] Step S320: Determine and unify the text direction of the page number image block based on its aspect ratio.
[0087] Specifically, considering the possibility of inconsistent scanning direction and position leading to inconsistent text orientation in page number image blocks, the aspect ratio of the page number image blocks is first determined. If the text in the page number image block is determined to be vertical, the image block is rotated 90 degrees clockwise.
[0088] Step S330: Detect the text in the page number image block using an OCR model.
[0089] Specifically, optical character recognition (OCR) can analyze and process image files of text documents to extract text and layout information. Here, it's used to extract page number information from a page number image block.
[0090] Step S340: Use regularization to extract page number information from the text and determine the continuity of the page numbers.
[0091] Specifically, regularization methods are used to extract page number information from text, supporting common tender document page number types such as Arabic numerals, Roman numerals, and uppercase and lowercase English letters. It also allows for free and rapid expansion, offering high flexibility. In summary, this method is used to determine the continuity of page numbers, thereby identifying any page number anomalies.
[0092] like Figure 4 As shown, in one embodiment, determining the continuity of page numbers includes the following steps:
[0093] Step S341: Traverse the sequence of page numbers after the starting page number.
[0094] Specifically, the page number sequence consists of all the page numbers. When judging the continuity of page numbers, it is necessary to first select a page number as the starting point and then traverse all the page numbers after the starting point. The starting point is usually the first page number in the sequence.
[0095] Step S342: Determine if there are any breakpoints in the sequence. If so, execute...
[0096] Specifically, since the specific page numbers within the sequence have already been obtained, the position of the page number breakpoint within the sequence can be determined by judging the continuity of the sequence.
[0097] Step S343: Determine if the breakpoint is a valid starting point of the new sequence. If so, execute...
[0098] Specifically, the legal starting point for an Arabic numeral sequence is 1, the legal starting point for an English letter sequence is A or a, and the legal starting point for a Roman numeral sequence is I.
[0099] Step S344: Traverse the sequence of page numbers following the breakpoint as the new starting point; otherwise, execute...
[0100] Specifically, starting from the legal starting point, the sequence of page numbers is traversed, and a check is performed to see if there are any breakpoints. If there are, the check is performed to see if the breakpoint is a legal starting point.
[0101] Step S346: Mark the breakpoint as an anomaly and record the actual page number of the anomaly.
[0102] Specifically, if the breakpoint is not a valid starting point, the sequence is identified as having an outlier, which is the breakpoint. The actual page number of the outlier is recorded, and the breakpoint judgment step is entered as a new starting point with the outlier.
[0103] like Figure 5As shown, in one embodiment, after determining whether the breakpoint is a valid starting point of the new sequence, the following steps are also included:
[0104] Step S510: Determine if the breakpoint is the last point. If not, proceed.
[0105] Specifically, if the breakpoint is determined to be the last point, then the actual page number of all outliers is counted.
[0106] Step S344: Traverse the sequence of page numbers after the breakpoint, starting from the breakpoint.
[0107] In one embodiment, the tender document inspection method further includes the following steps: outputting the abnormal stamps on the tender document and the actual page numbers and abnormal conditions of the abnormal points.
[0108] The aforementioned tender document inspection method can automatically check the page numbering order of tender documents and covers various page number formats such as Arabic numerals, English letters, and Roman numerals. It is also compatible with different layout styles, including landscape and portrait orientations. Furthermore, this method organically combines the verification of the tender document seal validity with the verification of the page number order. It uses a target detection model to detect seal image blocks and page number image blocks, and then combines this with an OCR model to extract specific page number information. This significantly improves page number recognition efficiency and makes it easier for business personnel to locate abnormal tender document pages, thus enabling efficient verification of both the validity of the tender document seal and the order of page numbers.
[0109] like Figure 6 As shown, in one embodiment, a tender document inspection device includes a file conversion module 610, an information acquisition module 620, a first judgment module 630, a space conversion module 640, a second judgment module 650, and a marking module 660.
[0110] The file conversion module 610 is used to convert tender documents into JSON strings and strings into numerical matrices.
[0111] The information acquisition module 620 is used to acquire stamped image blocks using an object detection model and a digital matrix.
[0112] The first judgment module 630 is used to determine whether the stamp image block is a blank stamp; if not, then execute...
[0113] The first judgment module 630 is also used to determine whether the stamped image block is a blurry stamp; if not, then execute...
[0114] The space conversion module 640 is used to convert the stamped image block into the HSV color space and count the number of red pixels and black pixels in the HSV color space.
[0115] The second judgment module 650 is used to determine whether the number of red pixels is greater than the first preset threshold. If not, then execute...
[0116] The marking module 660 is used to mark the stamp on the corresponding page of the tender document as invalid; if so, then execute...
[0117] The second judgment module 650 is also used to determine whether the number of black pixels is greater than a second set threshold; if not, then execute...
[0118] The marking module 660 is also used to stamp blank areas on the corresponding page of the tender document.
[0119] In one embodiment, the file conversion module 610 is further configured to scan the tender document to obtain a PDF tender document file; and convert the PDF tender document file into an image tender document file.
[0120] In one embodiment, the tender document inspection device further includes a page number correction module, an information detection module, and a third judgment module.
[0121] The information acquisition module 620 is also used to acquire page number image blocks using an object detection model and in combination with a digital matrix.
[0122] The page number correction module is used to determine and unify the text direction of the page number image block based on its aspect ratio.
[0123] The information detection module is used to detect text in page number image blocks using an OCR model.
[0124] The third judgment module is used to extract page number information from the text using regularization methods and to judge the continuity of the page numbers.
[0125] In one embodiment, the third judgment module is specifically used to traverse the sequence of page numbers after the starting point, starting from a page number; to determine whether there is a breakpoint in the sequence; if so, to determine whether the breakpoint is a valid starting point of the new sequence; if so, to traverse the sequence of page numbers after the new starting point, starting from the breakpoint; if not, to execute...
[0126] The marking module 660 is also used to mark breakpoints as exceptions and record the actual page number of the exception.
[0127] In one embodiment, the third judgment module is also used to determine whether the breakpoint is the last point. If not, the sequence of page numbers after the breakpoint is traversed with the breakpoint as the new starting point.
[0128] In one embodiment, the tender document inspection device further includes an information output module for outputting the actual page number and abnormal condition of the abnormal stamps and abnormal points in the tender document.
[0129] In one embodiment, a computer device is provided, which may be a smart terminal, and its internal structure diagram may be as follows: Figure 7 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a tender document review method.
[0130] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0131] In one embodiment, a computer device includes a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps in the above-described method embodiments. In another embodiment, a computer storage medium stores a computer program, the computer program being executed by a processor to implement the steps in the above-described method embodiments.
[0132] In one embodiment, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and executes the computer instructions, causing the computer device to perform the steps in the above method embodiments.
[0133] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0134] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0135] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for inspecting tender documents, characterized in that, The method includes: A three-class object detection module was trained using the YOLOv5 algorithm to detect clear stamps, blurry stamps, and page number blocks. Convert the tender document file into a JSON string, and then convert the string into a numerical matrix; The digital matrix is input into the three-class target detection module to acquire the stamped image block; Determine if the stamped image block is a blank stamp. If so, mark the current page of the tender document as an abnormal stamped page and the abnormal item as a missing stamp; otherwise, Determine if the stamped image block is a blurry stamp. If so, mark the current page of the tender document as an abnormal stamp page and the abnormal item as a blurry stamp; otherwise, The stamped image block is converted into the HSV color space, and the number of red pixels and black pixels in the HSV color space are counted respectively. Determine whether the number of red pixels is greater than a first preset threshold; if not, then... The stamp on the corresponding page of the tender document is invalid; if so, then... Determine whether the number of black pixels is greater than a second preset threshold; if not, then... The corresponding page of the tender document should be stamped in the blank space; Furthermore, the process of converting the string into a number matrix further includes: The page number image block is acquired using a three-class object detection module combined with the digital matrix; The text direction of the page number image block is determined and standardized based on the aspect ratio of the page number image block; The text in the page number image block is detected using an OCR model; The page number information in the text is extracted using regularization methods, and the continuity of the page numbers is determined. The determination of the continuity of the page numbers includes: Starting from a given page number, iterate through the sequence of page numbers following that starting point. Determine if the sequence has any breakpoints; if so, then... Determine if the breakpoint is a valid starting point of the new sequence; if so, then... Starting from the breakpoint, traverse the sequence of page numbers following the new breakpoint; otherwise, Mark the breakpoint as an anomaly and record the actual page number of the anomaly. The step of determining whether the breakpoint is a valid starting point of the new sequence further includes: Determine if the breakpoint is the last point; if not, then... Starting from the breakpoint, traverse the sequence of page numbers following the new breakpoint.
2. The tender document inspection method according to claim 1, characterized in that, The process of converting the tender document file into a JSON string previously included: The tender documents are scanned to obtain a PDF file. Convert a PDF tender document into an image format tender document.
3. The tender document inspection method according to claim 1, characterized in that, The method further includes: Output the abnormal stamps on the tender document, as well as the actual page number and abnormal condition of the abnormal point.
4. A tender document inspection device, characterized in that, The device includes: The training module is used to train a three-class object detection module using the YOLOv5 algorithm to detect clear stamps, blurry stamps, and page number blocks. The file conversion module is used to convert tender documents into JSON strings and strings into numerical matrices. The information acquisition module is used to input the digital matrix into the three-class target detection module to acquire the stamped image block; The first judgment module is used to determine whether the stamped image block is a blank stamp. If so, the current page of the tender document is marked as an abnormal stamped page, and the abnormal item is marked as a missing stamp; otherwise, The first judgment module is also used to determine whether the stamped image block is a blurry stamp. If so, the current page of the tender document is marked as an abnormal stamped page, and the abnormal item is marked as a blurry stamp; otherwise, The space conversion module is used to convert the stamped image block into the HSV color space and count the number of red pixels and black pixels in the HSV color space respectively. The second judgment module is used to determine whether the number of red pixels is greater than a first preset threshold; if not, then... The marking module is used to indicate that the stamp on the corresponding page of the tender document is invalid; if it is, then... The second judgment module is also used to determine whether the number of black pixels is greater than a second preset threshold; if not, then... The marking module is also used to stamp blank spaces on the corresponding page of the tender document; Furthermore, the process of converting the string into a number matrix further includes: The page number image block is acquired using a three-class object detection module combined with the digital matrix; The text direction of the page number image block is determined and standardized based on the aspect ratio of the page number image block; The text in the page number image block is detected using an OCR model; The page number information in the text is extracted using regularization methods, and the continuity of the page numbers is determined. The determination of the continuity of the page numbers includes: Starting from a given page number, iterate through the sequence of page numbers following that starting point. Determine if the sequence has any breakpoints; if so, then... Determine if the breakpoint is a valid starting point of the new sequence; if so, then... Starting from the breakpoint, traverse the sequence of page numbers following the new breakpoint; otherwise, Mark the breakpoint as an anomaly and record the actual page number of the anomaly. The step of determining whether the breakpoint is a valid starting point of the new sequence further includes: Determine if the breakpoint is the last point; if not, then... Starting from the breakpoint, traverse the sequence of page numbers following the new breakpoint.
5. 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 steps of the method according to any one of claims 1 to 3.
6. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 3.
7. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 3.