Image recognition-based instrument control method, apparatus, device, and medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-16
- Publication Date
- 2026-08-11
AI Technical Summary
通过单一语种检测(如中文后缀匹配),将中英文字符串作为一个整体进行合法性检测,而中文合法性规则(如判断是否以“有限公司”结尾)无法适用于英文片段,英文合法性规则(如判断是否以“Inc.”或“Ltd.”结尾)也无法适用于中文片段
[0011]本公开的上述各个实施例具有如下有益效果:通过本公开的一些实施例的基于图像识别的仪器控制方法,减少了扫描仪进纸辊轮的磨损的准确性。具体来说,造成扫描仪进纸辊轮的磨损增加的原因在于:投标文件中的公司名称常以中英文混合形式出现,例如“ABC科技有限公司”、“墨坊 Inc.”。通过单一语种检测(如中文后缀匹配),将中英文字符串作为一个整体进行合法性检测,而中文合法性规则(如判断是否以“有限公司”结尾)无法适用于英文片段,英文合法性规则(如判断是否以“Inc.”或“Ltd.”结尾)也无法适用于中文片段。由于缺乏对字符串进行语种裂隙分割的手段,导致中英文字符在同一个字符串中相互干扰,导致合法性检测的准确性较低,大量无效投标文件仍然被传送描仪,增加了扫描仪进纸辊轮的磨损。基于此,本公开的一些实施例的基于图像识别的仪器控制方法,首先,响应于通过扫描仪进纸口的图像采集器件检测到文件标识,获取相应纸质投标文件的投标文件图像。由此,可以在纸质投标文件进入扫描仪之前,获取到与纸质投标文件对应的投标文件图像。然后,对上述投标文件图像进行招投标主体名称识别处理,得到招投标主体名称。由此,将图像转换为可供算法处理的字符串。之后,对上述招投标主体名称进行语种裂隙分割处理,以生成中英文片段信息。由此,可以将中英文混合的字符串按照语种边界切分为独立的中文片段和英文片段,使得不同语种的字符不再相互干扰。进而,对上述中英文片段信息进行跨语种共振异常检测处理,以生成中文异常检测信息或英文异常检测信息。具体地,对中文片段应用中文合法性规则(如后缀匹配)、对英文片段应用英文合法性规则(如后缀匹配及职位词过滤),并在中文片段已被判定为正常时不再判断英文片段。由此,消除了跨语种规则交叉干扰,提高了中英文混合公司名合法性检测的准确性。最后,响应于确定中文异常检测信息表征招投标主体名称正常或英文异常检测信息表征招投标主体名称正常,控制扫描仪的进纸口维持进纸,以扫描上述纸质投标文件。响应于确定中文异常检测信息表征招投标主体名称异常且英文异常检测信息表征招投标主体名称异常,输出预设回收驱动指令,以改变上述纸质投标文件物理传输路径。由此,只有当检测结果为正常时才允许纸张进入扫描仪内部,否则从物理上改变传输路径将纸张回收,阻止无效纸张与进纸辊轮发生接触。也因为采用了语种裂隙分割与跨语种共振异常检测相结合的方式,降低了无效纸张被误判为有效的概率,从而减少了无效纸张对进纸辊轮的非必要物理磨损,减少了扫描仪进纸辊轮的磨损,延长了扫描仪进纸辊轮的使用寿命。
Smart Images

Figure CN122554576A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and more particularly to an instrument control method, apparatus, device, and medium based on image recognition. Background Art
[0002] With the popularization of electronic bidding systems, the daily average number of paper bidding documents processed by public resource trading centers at all levels has been continuously increasing. In the prequalification stage before the bid opening, a large number of invalid bidding documents will increase abnormal wear of the paper feed roller and frequent paper jams in the paper feed channel. Therefore, it is necessary to verify the legality of the bidder name in the bidding documents to screen out invalid bids. When passing through the paper feed channel of the scanner, instrument control based on image recognition is a technology for detecting the legality of the bidder name to control whether the scanner continues to feed paper for scanning. Currently, when detecting the legality of the bidder name to control whether the scanner continues to feed paper for scanning, the commonly used method is: performing optical character recognition on the bidding document image, extracting the bidder name string therefrom, and then performing single-language detection (such as Chinese suffix matching), and performing legality detection on the Chinese-English character string as a whole to control whether the scanner continues to feed paper for scanning.
[0003] However, when using the above method to detect the legality of the bidder name to control whether the scanner continues to feed paper for scanning, the following technical problems often exist: Company names in bidding documents often appear in a mixed form of Chinese and English, such as "ABC Technology Co., Ltd." and "Mofang Inc.". By performing single-language detection (such as Chinese suffix matching) and performing legality detection on the Chinese-English character string as a whole, the Chinese legality rule (such as determining whether it ends with "Co., Ltd.") cannot be applied to English segments, and the English legality rule (such as determining whether it ends with "Inc." or "Ltd.") cannot be applied to Chinese segments. Due to the lack of means for splitting the string by language gap, the Chinese and English characters interfere with each other in the same string, resulting in low accuracy of legality detection, and a large number of invalid bidding documents are still transmitted to the scanner, increasing the wear of the paper feed roller of the scanner.
[0004] The above information disclosed in this background art section is only used to enhance the understanding of the background of the inventive concept of the present invention. Therefore, it may include information that does not form the prior art known to those of ordinary skill in the art. Summary of the Invention
[0005] This summary part of the present disclosure is used to introduce the inventive concept in a brief form, and these inventive concepts will be described in detail in the following detailed implementation part. This summary part of the present disclosure is not intended to identify the key features or essential features of the claimed technical solution, nor is it intended to be used to limit the scope of the claimed technical solution.
[0006] Some embodiments of this disclosure provide a scanner operation control method, apparatus, electronic device, and computer-readable medium based on image recognition to solve one or more of the technical problems mentioned in the background section above.
[0007] In a first aspect, some embodiments of this disclosure provide an instrument control method based on image recognition. The method includes: acquiring a bid document image of a corresponding paper bid document in response to a document identifier detected by an image acquisition device at the scanner's paper inlet; performing bidding entity name recognition processing on the bid document image to obtain the bidding entity name; performing language gap segmentation processing on the bidding entity name to generate Chinese and English fragment information; performing cross-language resonance anomaly detection processing on the Chinese and English fragment information to generate Chinese anomaly detection information or English anomaly detection information; controlling the scanner's paper inlet to maintain paper feeding in response to determining that the Chinese anomaly detection information indicates the bidding entity name is normal or the English anomaly detection information indicates the bidding entity name is normal, thereby scanning the paper bid document; and outputting a preset retraction drive command in response to determining that both the Chinese and English anomaly detection information indicate the bidding entity name is abnormal, thereby changing the physical transmission path of the paper bid document.
[0008] Secondly, some embodiments of this disclosure provide an instrument control device based on image recognition. The device includes: an acquisition unit configured to acquire a bid document image of a corresponding paper bid document in response to the detection of a document identifier by an image acquisition device through the paper feed inlet of a scanner; an identification unit configured to perform bidding entity name recognition processing on the bid document image to obtain the bidding entity name; a first processing unit configured to perform language gap segmentation processing on the bidding entity name to generate Chinese and English fragment information; a second processing unit configured to perform cross-language resonance anomaly detection processing on the Chinese and English fragment information to generate Chinese anomaly detection information or English anomaly detection information; a control unit configured to control the paper feed inlet of the scanner to maintain paper feeding in response to determining that the Chinese anomaly detection information indicates that the bidding entity name is normal or the English anomaly detection information indicates that the bidding entity name is normal, so as to scan the paper bid document; and an output unit configured to output a preset recycling drive command in response to determining that both the Chinese anomaly detection information and the English anomaly detection information indicate that the bidding entity name is abnormal, so as to change the physical transmission path of the paper bid document.
[0009] Thirdly, some embodiments of this disclosure provide an electronic device, including: one or more processors; and a storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation of the first aspect above.
[0010] Fourthly, some embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method described in any of the implementations of the first aspect above.
[0011] The above-mentioned various embodiments of the present disclosure have the following beneficial effects: Through the instrument control method based on image recognition in some embodiments of the present disclosure, the accuracy of reducing the wear of the paper feed roller of the scanner is improved. Specifically, the reason for the increased wear of the paper feed roller of the scanner is that the company names in the tender documents often appear in a mixed form of Chinese and English, such as "ABC Technology Co., Ltd." and "Mofang Inc.". By single-language detection (such as Chinese suffix matching), the Chinese-English character string is detected for legality as a whole. However, the Chinese legality rules (such as determining whether it ends with "Co., Ltd.") are not applicable to the English segment, and the English legality rules (such as determining whether it ends with "Inc." or "Ltd.") are not applicable to the Chinese segment. Due to the lack of means for splitting the character string by language gap, the Chinese and English characters interfere with each other in the same string, resulting in a low accuracy of legality detection. A large number of invalid tender documents are still transmitted to the scanner, increasing the wear of the paper feed roller of the scanner. Based on this, the instrument control method based on image recognition in some embodiments of the present disclosure, first, in response to detecting a document identifier through an image acquisition device at the paper feed inlet of the scanner, obtain the tender document image of the corresponding paper tender document. Thus, before the paper tender document enters the scanner, the tender document image corresponding to the paper tender document can be obtained. Then, perform identification processing on the tender document image for the name of the tendering and bidding entity to obtain the name of the tendering and bidding entity. Thus, the image is converted into a character string that can be processed by an algorithm. After that, perform language gap splitting processing on the above-mentioned name of the tendering and bidding entity to generate Chinese and English segment information. Thus, the Chinese-English mixed character string can be split into independent Chinese and English segments according to the language boundary, so that the characters of different languages no longer interfere with each other. Furthermore, perform cross-language resonance anomaly detection processing on the above-mentioned Chinese and English segment information to generate Chinese anomaly detection information or English anomaly detection information. Specifically, apply Chinese legality rules (such as suffix matching) to the Chinese segment, apply English legality rules (such as suffix matching and job title word filtering) to the English segment, and do not judge the English segment when the Chinese segment has been determined to be normal. Thus, the cross-language rule cross-interference is eliminated, and the accuracy of the legality detection of the Chinese-English mixed company name is improved. Finally, in response to determining that the Chinese anomaly detection information indicates that the name of the tendering and bidding entity is normal or the English anomaly detection information indicates that the name of the tendering and bidding entity is normal, control the paper feed inlet of the scanner to maintain paper feeding to scan the above-mentioned paper tender document. In response to determining that the Chinese anomaly detection information indicates that the name of the tendering and bidding entity is abnormal and the English anomaly detection information indicates that the name of the tendering and bidding entity is abnormal, output a preset recovery drive instruction to change the physical transmission path of the above-mentioned paper tender document. Thus, only when the detection result is normal is the paper allowed to enter the scanner, otherwise the transmission path is physically changed to recycle the paper, preventing invalid paper from contacting the paper feed roller.Because it employs a combination of language gap segmentation and cross-language resonance anomaly detection, the probability of invalid paper being misjudged as valid is reduced, thereby reducing unnecessary physical wear on the feed rollers caused by invalid paper, reducing wear on the scanner feed rollers, and extending the service life of the scanner feed rollers. Attached Figure Description
[0012] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and elements are not necessarily drawn to scale.
[0013] Figure 1 This is a flowchart of some embodiments of the image recognition-based instrument control method according to the present disclosure; Figure 2 This is a schematic diagram of the structure of some embodiments of the image recognition-based instrument control device according to the present disclosure; Figure 3 This is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. Detailed Implementation
[0014] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0015] It should also be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings. Unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other.
[0016] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0017] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0018] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0019] This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.
[0020] Figure 1 A flow 100 of some embodiments of an image recognition-based instrument control method according to the present disclosure is shown. This image recognition-based instrument control method includes the following steps: Step 101: In response to the detection of a document identifier by the image acquisition device through the scanner paper feed port, acquire the image of the corresponding paper tender document.
[0021] In some embodiments, the execution entity (e.g., a computing device) of the image recognition-based instrument control method can acquire an image of the corresponding paper tender document in response to the detection of a document identifier by the image acquisition device at the scanner's paper inlet. The preset identifier can be the identifier of the paper tender document (e.g., identifier 01). The scanner's paper inlet refers to the physical entrance on the scanner device used to receive the paper to be scanned, which can consist of a pair of guide plates, its function being to introduce single or stacked sheets of paper into the paper feed channel inside the scanner. The image acquisition device refers to the device installed outside the scanner's paper inlet, used to photograph the surface of the paper before it enters the scanner, and to detect the document identifier using region-based document field recognition technology (e.g., region OCR recognition technology). The document identifier can refer to a visual mark (such as a one-dimensional barcode, a two-dimensional quick response code (QR code), a specific color block, a specific symbol identifier, a numerical identifier, etc.) pre-set in a specific area of the paper tender document (e.g., the upper right or lower left corner of the first page of the document). In practice, the execution entity can acquire an image of the paper tender document corresponding to the document identifier from a preset file. The above-mentioned image of the tender document can be an image of the first page of the paper tender document.
[0022] Step 102: Perform bidding entity name recognition processing on the bid document image to obtain the bidding entity name.
[0023] In some embodiments, the aforementioned executing entity may perform bidding entity name recognition processing on the aforementioned bid document image to obtain the bidding entity name.
[0024] In some optional implementations of certain embodiments, the aforementioned executing entity may perform bidding entity name recognition processing on the aforementioned bid document image through the following steps to obtain the bidding entity name: The first step involves performing a positioning and cropping process on the aforementioned paper bid document image based on the preset subject name location information. This yields an image of the region represented by the preset subject name location information within the paper bid document image, which serves as the subject name region image. The preset subject name location information is a set of coordinate data (e.g., the coordinates of the four vertices of a rectangle), representing the position of the bid subject's name within a rectangular region of the paper bid document image. The subject name region image refers to the image obtained after the positioning and cropping process, containing only the region represented by the preset subject name location information. In practice, the executing entity can use the preset subject name location information to call the region of interest extraction function of an image processing library (e.g., an open-source computer vision library) to extract the corresponding rectangular sub-image from the paper bid document image and store this sub-image as the subject name region image.
[0025] The second step involves inputting the aforementioned main name region image into a pre-trained optical character recognition model to obtain a text character sequence. This text character sequence refers to the array of characters output by the optical character recognition model, arranged in a reading order from left to right and top to bottom. Each character can be, but is not limited to, one of the following: Chinese characters, English letters, numbers, or common punctuation marks.
[0026] The third step involves filtering the aforementioned text character sequence using control characters to obtain a filtered text character sequence. These control characters can be newline characters, carriage returns, tabs (ASCII 9), null characters, etc. In practice, each character in the text character sequence can be iterated over to determine if it belongs to the preset control character set. If it does, the character is deleted; otherwise, it is retained. In practice, after obtaining the text character sequence, the executing entity initializes an empty character buffer. Then, for each text character in the sequence, its ASCII code value is compared with the preset control character range (0-31 and 127). If the ASCII code value is not within the control character range, the text character is appended to the character buffer. After the iteration is complete, the content of the character buffer is the filtered text character sequence.
[0027] The fourth step is to perform length detection processing on the above filtered text character sequence to obtain length detection information. In practice, the above execution entity calls the string length function to obtain the number of characters in the above filtered text character sequence. In response to determining that the number of characters is less than a preset minimum length threshold (e.g., the preset minimum length threshold is 2), the information indicating an abnormal length is determined as length detection information.
[0028] Step 5: In response to determining that the above length detection information meets the preset conditions, perform blacklist matching processing on the above filtered text character sequence to obtain matching information. Among them, the above preset conditions can indicate normal. In practice, after determining that the above length detection information meets the preset conditions, the above execution entity can load a preset blacklist list (usually organized in the form of a hash set or a trie tree to speed up the matching speed). Then, for the above filtered text character sequence, first, the above execution entity can traverse the preset blacklist list to query whether there is a string represented by the filtered text character sequence in the preset blacklist list. In response to determining that there is none, determine the information indicating that it is not matched to the corresponding blacklist (such as the boolean value False) as the matching information. In response to determining that there is one, determine the information indicating that it is matched to the corresponding blacklist (such as the boolean value True) as the matching information. For example, the above filtered text character sequence is "XX Technology Co., Ltd.", and the blacklist contains "XX Technology Co., Ltd.". The full match is successful, and the above matching information can be "matched to the blacklist". Among them, the above blacklist list contains strings that cannot be used as the legal tenderer entity name. The above matching information refers to the result of the above blacklist matching processing, that is, the information indicating that it is not matched to the corresponding blacklist or the information indicating that it is matched to the corresponding blacklist.
[0029] Step 6: In response to determining that the matching information indicates that it is not matched to the corresponding blacklist, determine the above filtered text character sequence as the tenderer entity name. Among them, the above tenderer entity name refers to the filtered text character sequence extracted from the above paper tender documents and pre-screened for legality (qualified in length and not in the blacklist).
[0030] In the process of adopting technical solutions to solve the technical problems in the above background technology, for the application scenario to be applied: extraction of tenderer entity names, there are often the following technical problems: The entity names in paper tender documents usually exist in both the seal area (presented in the form of circular text) and the fixed position area of the document body at the same time. When directly identifying the circular text in the seal by traditional OCR methods, due to the text being distributed along the circumference, there are serious geometric distortions, resulting in difficult character segmentation and low recognition accuracy, leading to low reliability in extracting entity names; at the same time, only performing OCR recognition on the image of the entity name area cropped from the preset position, OCR is prone to misidentifying similar-shaped characters (such as misidentifying "Si" as "Tong") in the single-modal mode, resulting in low reliability in extracting entity names. For the following required characteristics of this application scenario: In the process of extracting the tenderer entity name, cross-verify and extract by integrating multi-source information of circular seal text and printed text, and be able to handle complex situations such as circular text distortion, seal blur, and position offset, so as to avoid file scanning failure caused by misidentifying the entity name. To solve the above problems, we decided to adopt the following solutions: In some optional implementations of certain embodiments, the aforementioned executing entity may perform bidding entity name recognition processing on the aforementioned bid document image through the following steps to obtain the bidding entity name: The first step involves inputting the aforementioned bid document image into a pre-trained seal region localization model to obtain at least one seal region localization piece of information. Each seal region localization piece of information includes seal region location information and a confidence score. The seal region localization model refers to a deep learning model trained on an object detection architecture (such as the You Only Look Once series, single-shot multi-frame detector, or region-based convolutional neural network). This model is capable of detecting the rectangular region containing the seal (circular or elliptical red mark) from the input image, thus obtaining at least one seal region localization piece of information. The model's training dataset consists of a large number of bid document images labeled with seal bounding boxes. The seal region location information can represent the position of the bounding rectangle of the detected seal in the aforementioned bid document image (e.g., the coordinates of the four vertices of the bounding rectangle). The confidence score is a floating-point number between 0 and 1, representing the probability that the seal region localization model judges the detection result to be correct. The closer the value is to 1, the more confident the model is that the region contains a real seal. As an example, one can first obtain at least one bid document image and at least one sample seal region localization information corresponding to each bid document image in the at least one bid document image set. Then, using each bid document image in the at least one bid document image set as input and the at least one sample seal region localization information corresponding to each bid document image in the at least one bid document image set as the expected output, a seal region localization model can be trained.
[0031] The second step involves identifying the seal area location information whose confidence level meets a preset filtering condition from the at least one seal area location information mentioned above as the target seal area location information. The preset filtering condition can be the one with the highest confidence level. For example, at least one seal area location information could be: {Seal area location information for box A, confidence level 0.95}, {Seal area location information for box B, confidence level 0.70}. Then, the seal area location information for box A is the target seal area location information.
[0032] The third step is to perform positioning and cropping processing on the paper tender document image based on the target seal area positioning information to obtain the seal area image.
[0033] The fourth step is to perform binarization segmentation on the above-mentioned stamp area image to obtain a binarized stamp image. In practice, the above-mentioned execution subject first converts the above-mentioned stamp area image from the red-green-blue color space to the hue-saturation-brightness color space, then extracts the area within the red hue range to generate a mask, then applies the Otsu algorithm to the mask to determine the optimal binarization threshold, and finally sets the area with a pixel value higher than the threshold to white (255) and the area with a pixel value lower than the threshold to black (0), thus obtaining the above-mentioned binarized stamp image.
[0034] The fifth step involves performing circle detection on the binarized seal image to obtain the coordinates of the seal's center. In practice, the execution entity calls the Hough circle transform function, inputs the binarized seal image, and sets a preset minimum and maximum radius search range (e.g., estimated based on the image size of the seal area, with the radius between 1 / 4 and 1 / 2 of the image width). The function returns the radius and center coordinates of the detected circle. These center coordinates are then determined as the seal's center coordinates. Here, the seal's center coordinates refer to the pixel coordinates of the detected circular seal's center point within the binarized seal image.
[0035] Step 6: Using the coordinates of the seal's center as a reference point, perform a polar coordinate transformation on the binarized seal image to obtain a polar coordinate domain seal image. This polar coordinate transformation maps the image from a Cartesian coordinate system (x, y) to a polar coordinate system (r, θ). In the polar coordinate system, the position of each pixel in the image is represented by its polar radius (distance to the reference point) and polar angle (angle relative to the reference point). The polar coordinate domain seal image refers to the image obtained after the polar coordinate transformation. Its width corresponds to the polar angle range (usually 0 to 360 degrees), and its height corresponds to the polar radius range (usually from the minimum radius to the maximum radius). Specifically, the polar angle range can be set to 0° to 360°, corresponding to an output image width of 360 pixels (1 pixel per degree); the polar radius range is usually set to 0 to the detected seal radius R (pixels), corresponding to an output image height of R pixels. When the polar radius range is set to a non-zero starting value (e.g., from 0.6R to 0.9R), the output image height is 0.3R pixels. In practice, the aforementioned execution entity uses the coordinates of the seal's center as the origin of the polar coordinate system, setting the polar radius range (e.g., from 0 to the detected seal radius) and the polar angle range (0 to 360 degrees). Then, for each pixel in the binarized seal image, its polar radius and polar angle relative to the origin are calculated, and this pixel is mapped to the output image (polar angle corresponds to the x-coordinate, polar radius to the y-coordinate). For each position in the output image, pixel values are sampled from the original image using bilinear interpolation to obtain the aforementioned polar coordinate domain seal image. For example, after a circular seal image undergoes polar coordinate transformation, the text "XX Co., Ltd.", originally arranged around the center, is straightened and arranged horizontally at the top of the transformed image. It should be noted that the seal discussed in this article is a circular seal.
[0036] Step 7: Based on the stamp image in polar coordinates, extract the annular region within a preset polar diameter range and a preset angle range in polar coordinates to obtain an annular text region image. The preset angle range refers to a pre-defined polar angle interval, such as 0° to 360° (full circumference), or a specific angle interval set based on prior knowledge (e.g., 90° to 270°). The annular text region image refers to a sub-image generated in polar coordinates by retaining only pixels within the preset angle range and preset polar diameter range. This image only contains the annular band on the stamp that may contain text information. The lower and upper limits of the polar diameter (e.g., from 0.6 to 0.9 times the stamp radius) and the polar angle range (usually 0 to 360 degrees) can be set empirically. In practice, the executing entity calculates the lower and upper limits of the preset polar diameter range based on the stamp radius detected in step 6 of step 102. For example, if the detected stamp radius is 50 pixels, the preset polar diameter range can be set to 30 pixels (i.e., 0.6×50) to 45 pixels (i.e., 0.9×50). Simultaneously, the preset angle range is determined based on prior knowledge, for example, set to 0° to 360°. Then, in the polar coordinate domain stamp image (its dimensions are: width equal to 360 pixels, corresponding to 0° to 360°; height equal to the maximum polar diameter value, for example, 50 pixels), the executing entity calls the image cropping function to retain all pixels whose vertical coordinate (corresponding to polar diameter) is between 30 and 45 and whose horizontal coordinate (corresponding to polar angle) is between 0 and 360. In the polar coordinate domain stamp image, cropping is performed according to the preset polar diameter range and angle range, and the resulting rectangular sub-image is the aforementioned annular text region image.
[0037] In the eighth step, perform projection analysis on the above annular text area image to determine the spatial interval where the text lines are located. In practice, the pixel values of the annular text area image can be accumulated in the horizontal or vertical direction to generate a projection histogram. For the above annular text area image (where the text has been straightened into a horizontal arrangement), the pixel projection in the vertical direction (i.e., the polar radius direction) usually shows a relatively narrow peak, and the row range corresponding to this peak is the spatial interval where the text lines are located. Here, the above spatial interval refers to the row index range (i.e., the starting row number and the ending row number) occupied by the text lines in the above annular text area image. Specifically, in practice, the above execution entity can perform vertical projection on the above annular text area image (accumulating the pixel numbers at each y coordinate along the x-axis direction, that is, accumulating the white pixel numbers in each row along the horizontal direction), to obtain a projection histogram. Then find the continuous row interval in the histogram where the pixel sum is greater than a preset threshold (such as 5% of the total number of pixels in the image), and this interval is the above spatial interval where the text lines are located. For example, if the height of the above annular text area image is 15 pixels, and the vertical projection shows that the pixel sum from the 8th row to the 12th row is greater than the preset threshold, then it is determined that the above spatial interval is from the 8th row to the 12th row.
[0038] In the ninth step, perform segmentation and splicing processing on the above annular text area image according to the above spatial interval to obtain text line image blocks. In practice, the above execution entity first crops the row interval from the above annular text area image according to the above spatial interval, to obtain a horizontal strip image with a height equal to the interval length and a width of 360 pixels. Then, since the beginning and end of the circular text may be cut off at 0° and 360°, the above execution entity cyclically shifts the horizontal strip image in the horizontal direction so that the cut-off point is at the image boundary, or directly performs double-width splicing (splicing its own copy on the right), then detects the character gaps, cuts out the complete character sequence from it, and finally recombines it into a continuous above text line image block. For example, in the original polar coordinate image, the character "you" of "You Limited Company" is cut off at both ends. After splicing processing, "You Limited Company" is restored as a continuous text line image block.
[0039] Step 10: Input the aforementioned text line image blocks into a pre-trained entity name recognition model to obtain a reference entity name. This entity name recognition model is an optical character recognition model based on a convolutional recurrent neural network or a visual Transformer, specifically optimized for training on circular, arc-shaped, and artistic font characters commonly found in seals. The model's input is the aforementioned text line image block, and its output is the recognized string. The reference entity name refers to the company name string recognized by the entity name recognition model from the seal image. As an example, at least one text line image block and at least one sample entity name corresponding to each text line image block can be obtained first. Then, using each text line image block in the at least one text line image block set as input and the at least one sample entity name corresponding to each text line image block in the at least one text line image block set as the expected output, a seal region localization model is trained.
[0040] Step 11: Based on the preset subject name location information, the optical character recognition model performs positioning and cropping processing on the above-mentioned paper bid document image to obtain the region image of the position represented by the preset subject name location information in the paper bid document image as the subject name region image.
[0041] Step 12: Input the aforementioned reference subject name and the aforementioned subject name region image into a pre-trained visual language cross-modal reasoning model to obtain the bidding subject name. The aforementioned visual language cross-modal reasoning model can be a CLIP model that takes the reference subject name and subject name region image as input and the bidding subject name as output.
[0042] The above technical solution and its related content, as an inventive point of an embodiment of the present disclosure, solve the technical problem of "low reliability in extracting the entity name". The reasons for the low reliability in extracting the entity name are often as follows: The entity name in the paper bidding document usually exists in both the seal area (presented in the form of circular text) and the fixed position area of the document body. When the traditional OCR method directly recognizes the circular text in the seal, due to the text being distributed along the circumference, there are serious geometric distortions, resulting in difficult character segmentation and low recognition accuracy, thus leading to low reliability in extracting the entity name. At the same time, only performing OCR recognition on the image of the entity name area cropped from the preset position, OCR is prone to misidentifying similar-looking characters (such as misidentifying "company" as "same") in the single-modal mode, resulting in low reliability in extracting the entity name. If the above factors are solved, the effect of improving the reliability in extracting the entity name can be achieved. To achieve this effect, first, the bidding document image is input into a pre-trained seal area positioning model to obtain at least one seal area positioning information, and the target seal area positioning information with a confidence level meeting the preset conditions is screened out from it. Thus, the area where the seal is located can be accurately positioned, excluding low-quality or misdetected areas. Then, based on the target seal area positioning information, the paper bidding document image is subjected to positioning and cropping processing to obtain the seal area image. Thus, the seal is separated from the whole image, facilitating subsequent targeted processing. After that, the seal area image is subjected to binary segmentation to obtain the binary seal image. Thus, the seal text is separated from the background, reducing the complexity of subsequent processing. Then, circular detection is performed on the binary seal image to obtain the seal center coordinates. Thus, the geometric center of the circular text is determined, providing a reference point for polar coordinate transformation. Taking the seal center coordinates as the reference point, polar coordinate transformation is performed on the binary seal image to obtain the seal image in the polar coordinate domain. Thus, the circular text originally distributed along the circumference is unfolded into approximately horizontally arranged linear text, fundamentally eliminating geometric distortions and restoring the text lines to a roughly horizontal direction that is convenient for recognition. Next, in the polar coordinate domain, the circular area within the preset polar radius range and the preset angle range is extracted to obtain the circular text area image. Thus, only the part of the seal that actually contains text is retained, removing the redundant areas inside and outside, reducing the interference of subsequent processing. Projection analysis is performed on the circular text area image to determine the spatial interval where the text lines are located, and based on this spatial interval, segmentation and splicing processing are performed on the circular text area image to obtain the text line image blocks. Thus, the unfolded text lines are cut out separately, forming regular image blocks suitable for OCR input. The text line image blocks are input into a pre-trained entity name recognition model to obtain the reference entity name. Thus, the recognition result from the circular text of the seal is obtained. At the same time, based on the preset entity name position information, the paper bidding document image is subjected to positioning and cropping processing to obtain the area image at the position represented by the preset entity name position information in the paper bidding document image as the entity name area image.Thus, an image of the printed main body name from a fixed position in the document text is obtained. Finally, the reference main body name and the main body name region image are input into a pre-trained visual-language cross-modal inference model to obtain the bidding entity name. Therefore, by jointly inferring the seal ring character recognition result (reference main body name) and the printed area image through the visual-language cross-modal model, information from both sources is used to cross-verify and correct for similar-looking character errors that may occur in single-modal OCR, thereby improving the reliability of main body name extraction. Based on the more accurate identification of the bidding entity name, invalid paper detection is performed, reducing the probability of invalid paper being misjudged as valid, thus reducing unnecessary physical wear on the paper feed rollers and extending the service life of the scanner's paper feed rollers.
[0043] Step 103: Perform language gap segmentation on the name of the bidding entity to generate Chinese and English fragment information.
[0044] In some embodiments, the aforementioned executing entity may perform language-segmentation processing on the aforementioned bidding entity name to generate Chinese and English fragment information. The aforementioned bidding entity name is a sequence of text characters. The aforementioned Chinese and English fragment information refers to the data structure obtained after the aforementioned language-segmentation processing, used to represent different language fragments in the aforementioned bidding entity name. The aforementioned Chinese and English fragment information includes at least one of the following: a set of Chinese fragment information and a set of English fragment information. The Chinese fragment information set is a collection of strings composed of one or more consecutive Chinese characters, and the English fragment information set is a collection of strings composed of one or more consecutive English characters (which may contain numbers, spaces, and common punctuation marks).
[0045] In the process of adopting technical solutions to solve the technical problems in the above-mentioned background technology, for the application scenario to be applied: the high-speed scanning scenario of paper bidding documents in a public resource trading center, where the scanner needs to pre-determine whether the name of the bidding entity is legal before the paper enters the paper feed channel to decide whether to allow the paper to enter the scanner, so as to avoid the wear of the paper feed roller caused by invalid paper. There are often the following technical problems: The names of bidding and tendering entities often mix Chinese, English and numbers (such as "ABC of XX Technology Co., Ltd."). Traditional language segmentation methods based on fixed delimiters or dictionary matching cannot dynamically and character-by-character identify the language switching boundaries. As a result, in the case of no explicit delimiter, multiple language switches, containing out-of-vocabulary words or abbreviations, etc., the accuracy of text segment division is relatively low, which may lead to incomplete division of Chinese and English, and then lead to interference between Chinese and English characters in the same string, resulting in relatively low accuracy of legality detection. A large number of invalid bidding documents are still transmitted to the scanner, increasing the wear of the paper feed roller of the scanner. For the following required characteristics of this application scenario: The segmentation algorithm must be able to dynamically and character-by-character identify the language switching boundaries without relying on predefined delimiters or fixed dictionaries, so as to adapt to any order of mixed Chinese and English (such as "ABC Technology Co., Ltd. XYZ"), multiple language switches (such as "Chinese English Chinese"). Facing the above technical problems, we decided to adopt the following solutions: In some optional implementation manners of some embodiments, the above-mentioned execution entity can perform language fissure segmentation processing on the above-mentioned name of the bidding and tendering entity through the following steps to generate Chinese and English segment information: In the first step, the following generation steps are performed on the text character sequence represented by the above-mentioned name of the bidding and tendering entity: In the first sub-step, the language type of the first text character in the text character sequence is identified to obtain the starting language detection information. The above-mentioned first text character refers to the character at the first position (index 0) in the above-mentioned text character sequence. For example, for the text character sequence "ABC Technology Co., Ltd.", the first text character is "A". In practice, the above-mentioned execution entity can obtain the Unicode code point value of the text character. If the code point value is between \u4e00 and \u9fa5, the information representing Chinese is determined as the starting language detection information (which can be a boolean value). If the code point value is between \u0041 and \u005a or \u0061 and \u007a, the information representing English is determined as the starting language detection information.
[0046] The second sub-step involves creating an initial cache queue corresponding to the aforementioned starting language based on the initial language detection information, and storing the first text character in the initial cache queue. This cache queue is a first-in, first-out data structure (such as a list or array) used to temporarily store consecutive characters belonging to the same language, until a language switch occurs, at which point the entire string is output as a single segment. It should be noted that for numeric characters (Unicode range \u0030 to \u0039) and common punctuation marks (such as space \u0020, period \u002E, comma \u002C, etc.), the execution entity processes them according to the current language context: if the current cache queue is not empty, the numeric characters and punctuation marks are assigned to the language corresponding to the current cache queue and appended to that queue; if the current cache queue is empty (i.e., a numeric character or punctuation mark appears at the beginning of the string), they are temporarily marked as "unknown" and skipped until the first Chinese or English character is encountered, at which point the language is determined.
[0047] The third sub-step involves identifying the text characters in the text character sequence that are excluding the first text character as subsequent characters.
[0048] The fourth sub-step involves iterating through the subsequent characters in the above character sequence and performing the following processing on each subsequent character: Sub-step one involves identifying the language type of subsequent characters to obtain the language detection information for the current character.
[0049] Sub-step two involves comparing the current character's language detection information with the previous text character's language detection information to obtain language switching indication information. In practice, in response to the determination that the current character's language detection information is different from the previous text character's language detection information, the information indicating that the language has been switched is determined as language switching indication information. In response to the determination that the current character's language detection information is the same as the previous text character's language detection information, the information indicating that the language has not been switched is determined as language switching indication information. (For example, if they are the same, it indicates "language not switched"; if they are different, it indicates "language switched").
[0050] In sub-step three, in response to determining that the language switching indication information indicates that the language has not been switched, the subsequent characters are appended and stored in the initial cache queue.
[0051] The fifth sub-step, in response to the language switch indication information indicating that the language has been switched, combine the text character subsequences in the initial cache queue into a text segment information, and delete the text character subsequences from the text character sequence to update the text character sequence, where the text segment information corresponds to a generation time. For example, the original text character sequence is "ABC Technology Co., Ltd.". When processing the character "科" (Chinese), it is found that the language switches from English to Chinese. At this time, there are "A", "B", "C" in the cache queue, which are combined into the text segment information "ABC" (English), and the generation time is recorded. Then delete "ABC" from the text character sequence, and the remaining is "Technology Co., Ltd.". Clear the cache queue, create a Chinese cache queue, and store "科" in it.
[0052] The second step, in response to determining that the updated text character sequence is not empty, based on the updated text character sequence, execute the above generation step again.
[0053] The third step, in response to determining that the updated text character sequence is empty, determine the generated at least one text segment information as a text segment information set.
[0054] The fourth step, based on the text segment information set, generate Chinese-English segment information, where the above Chinese-English segment information includes at least one of the following: Chinese segment information set, English segment information set. In practice, the above execution entity can traverse each segment in the above text segment information set, and according to its language attribute, add the segment content to the Chinese segment information list or the English segment information list respectively. After the traversal is completed, the Chinese segment information list constitutes the above Chinese segment information set, and the English segment information list constitutes the above English segment information set. The above Chinese-English segment information can be a data structure containing these two sets (such as a dictionary or an object), or only contain one of the non-empty ones. For example, for the text segment information set containing "ABC" (English) and "Technology Co., Ltd." (Chinese), the generated Chinese-English segment information is: Chinese segment information set = ["Technology Co., Ltd."], English segment information set = ["ABC"]. If the above tendering and bidding entity name is pure Chinese (such as "Huahua Technology Co., Ltd."), the English segment information set is empty; if it is pure English (such as "ABC Inc."), the Chinese segment information set is empty.
[0055] The above technical solution, combined with steps 104 to 106 and related content, serves as an inventive point of this disclosure, solving the technical problem of "increased wear on the scanner feed rollers." Factors leading to increased wear on the scanner feed rollers often include: the names of bidding entities frequently mix Chinese, English, and numbers (e.g., "XXX Technology Co., Ltd. ABC"). Traditional language segmentation methods based on fixed delimiters or dictionary matching cannot dynamically and character-by-character identify language switching boundaries. This results in low accuracy in text segmentation when there are no explicit delimiters, multiple language switches, or the presence of unregistered words or abbreviations. This can lead to incomplete segmentation of Chinese and English characters, causing interference between them within the same string, resulting in low accuracy in legality detection. Consequently, a large number of invalid bids are still transmitted to the scanner, increasing wear on the scanner feed rollers. Solving these factors can reduce the wear on the scanner feed rollers. To achieve this, firstly, the text character sequence represented by the aforementioned bidding entity name is obtained. The first text character in the text character sequence is then used for language type identification to obtain the initial language detection information. This determines the initial language type of the entire string, providing an initial benchmark for the creation of subsequent cache queues and language switching judgments. Then, based on the initial language detection information, an initial cache queue corresponding to the initial language is created, and the first text character is stored in this queue. This establishes a temporary storage container for characters of the same language, used to accumulate consecutive characters of the same language. Next, all characters in the text character sequence except the first character are identified as subsequent characters, and each subsequent character is traversed sequentially. Language type identification is performed on each subsequent character to obtain the language detection information of the current character, which is then compared with the language detection information of the previous text character to obtain language switching indication information. This enables real-time monitoring of language changes for each character, accurately capturing language switches occurring at any position, regardless of where the switch occurs or the number of switches. In response to the language switching indication information indicating that the language has not been switched, the current character is appended to the currently active cache queue. In response to a language switch indication indicating a language change, all characters in the current cache queue are combined into a single text segment, its generation time is recorded, and this subsequence is deleted from the original text character sequence, thus updating the text character sequence. This precisely segments a continuous segment of the same language at each language switch, with the segments generated in their original order and each segment accompanied by a timestamp. Then, in response to an updated text character sequence that is not empty, the entire process described above is recursively executed based on the updated sequence (starting from the language identification of the first character). In response to an updated text character sequence that is empty, all generated text segment information is combined into a text segment information set.Thus, through recursive processing until the entire string is completely segmented, a set of text segment information is finally obtained, where each segment has the same language within itself and is arranged in the original order. Finally, based on the set of text segment information, the segments are classified into a Chinese segment information set and an English segment information set according to the language type, generating Chinese and English segment information containing at least one item. Thus, clearly separated Chinese and English segments are obtained, and each segment maintains semantic integrity (for example, "Technology Co., Ltd." is retained as a complete Chinese segment, reducing the risk of incorrect segmentation). Thus, the accuracy of text segment division can be improved through the above steps. Combining steps 104 to 106, on the basis of a text segment information set with higher division accuracy, characters of different languages will no longer interfere with each other. Furthermore, cross-language rule cross-interference is eliminated, improving the accuracy of detecting the legality of Chinese-English mixed company names. Only when the detection result is normal is the paper allowed to enter the scanner interior; otherwise, the transmission path is physically changed to recycle the paper, preventing invalid paper from contacting the paper feed roller. Furthermore, physically, invalid paper is prevented from entering the scanner interior, reducing unnecessary wear of the paper feed roller and extending the service life of the scanner.
[0056] Step 104: Perform cross-language resonance anomaly detection processing on the Chinese-English segment information to generate Chinese anomaly detection information or English anomaly detection information.
[0057] In some embodiments, the above-mentioned execution entity can perform cross-language resonance anomaly detection processing on the above-mentioned Chinese-English segment information to generate Chinese anomaly detection information or English anomaly detection information. Among them, the above-mentioned Chinese-English segment information includes at least one of the following: Chinese segment information set, English segment information set. The Chinese-English segment information includes a Chinese segment information set and an English segment information set. Each Chinese segment information has a corresponding generation time, and each English segment information has a corresponding generation time. The Chinese segment information set can be a set of strings composed of one or more consecutive Chinese characters, and the English segment information set can be a set of strings composed of one or more consecutive English characters.
[0058] In some optional implementation manners of some embodiments, the above-mentioned execution entity can perform cross-language resonance anomaly detection processing on the above-mentioned Chinese-English segment information through the following steps to generate Chinese anomaly detection information or English anomaly detection information: The first step: In response to determining that the Chinese-English segment information includes a Chinese segment information set, perform dual-domain resonance anomaly detection processing on the above-mentioned Chinese segment information set to generate Chinese anomaly detection information corresponding to the above-mentioned tendering and bidding entity name.
[0059] The second step is to determine that the above Chinese anomaly detection information indicates an anomaly in the name of the bidding entity and that the above Chinese and English fragment information includes a set of English fragment information. Then, impurity resonance anomaly detection processing is performed on the above English fragment information set to generate English anomaly detection information corresponding to the name of the bidding entity.
[0060] In some optional implementations of certain embodiments, the aforementioned execution entity may perform dual-domain resonance anomaly detection processing on the aforementioned Chinese fragment information set through the following steps to generate Chinese anomaly detection information corresponding to the aforementioned bidding entity name: The first step is to perform sensitive word detection processing on the aforementioned set of Chinese fragment information to obtain sensitive word detection information. In practice, the execution entity loads a pre-stored sensitive word library (usually stored in the form of a hash set or trie to improve matching speed), and then iterates through each fragment string in the aforementioned set of Chinese fragment information, performing substring matching on each fragment. Once a fragment is found to contain any word from the sensitive word library, the iteration stops immediately, and the aforementioned sensitive word detection information is set to "contains sensitive word". If no sensitive word is matched after iterating through all fragments, the aforementioned sensitive word detection information is set to "does not contain sensitive word". The aforementioned sensitive word library can be a list containing words that cannot appear in legitimate company names, such as job titles (Chinese forms of "manager", "general manager", "director", "director", "CEO"), insulting words, names of illegal organizations, pure number strings, pure symbol strings, etc. The matching method can be complete matching or substring matching.
[0061] The second step involves performing suffix tree matching on the aforementioned Chinese fragment information set to generate Chinese anomaly detection information corresponding to the aforementioned bidding entity name, in response to the determination that the sensitive word detection information does not contain sensitive words. In practice, each Chinese fragment in the aforementioned Chinese fragment information set can be matched with a pre-constructed suffix tree to determine whether the Chinese fragment ends with a valid company organization suffix (such as "Limited Company", "Joint-Stock Company", "Group", "Accounting Firm", etc.). If any Chinese fragment ends with any valid suffix, the information indicating that the bidding entity name is normal is identified as the Chinese anomaly detection information corresponding to the aforementioned bidding entity name; if none of the Chinese fragments end with a valid suffix, the information indicating that the bidding entity name is abnormal is identified as the Chinese anomaly detection information corresponding to the aforementioned bidding entity name.
[0062] The third step is to determine the sensitive word detection information characterization containing sensitive words, and to identify the information characterizing the abnormality of the bidding entity name as the Chinese abnormality detection information corresponding to the aforementioned bidding entity name.
[0063] In some optional implementations of certain embodiments, the aforementioned execution entity may perform impurity resonance anomaly detection processing on the aforementioned English fragment information set through the following steps to generate English anomaly detection information corresponding to the name of the bidding entity: The first step is to perform job term detection processing on the aforementioned set of English fragment information to obtain job term detection information. In practice, the string representing each English fragment in the set can be matched against a pre-stored English job term database. This database contains preset English job titles, such as "CEO," "CFO," "CTO," "Manager," "Director," "President," and "Executive." The matching method can be substring matching (case-insensitive), as job terms can appear anywhere in the company name. If the similarity between any string representing an English fragment and an English job title in the pre-stored database is greater than a preset value, the information representing the job term in the English fragment set is identified as job term detection information.
[0064] The second step involves determining that the English fragment information set representing the aforementioned job term detection information contains job terms, and identifying the information representing anomalies in the name of the bidding entity as the English anomaly detection information corresponding to the aforementioned name of the bidding entity. The information representing anomalies in the name of the bidding entity can be text information, such as the job term detection information "abnormal bidding entity name".
[0065] The third step, in response to the determination that the English fragment information set representing the above-mentioned job title detection information does not contain job titles, performs English valid suffix detection processing on the English fragment information set to obtain English anomaly detection information corresponding to the name of the bidding entity. In practice, this can be done by determining whether the string represented by each English fragment information in the above-mentioned English fragment information set ends with a valid English company organization form suffix. Valid English suffixes include, but are not limited to, "Ltd" (abbreviation for Limited), "Inc" (abbreviation for Incorporated), "Corp" (abbreviation for Corporation), "LLC" (abbreviation for Limited Liability Company), "PLC" (abbreviation for Public Limited Company), etc. If at least one fragment ends with a valid suffix, text information representing the normality of the bidding entity name is generated as English anomaly detection information; if none of the fragments end with a valid suffix, text information representing the anomaly of the bidding entity name is generated as English anomaly detection information.
[0066] Step 105: In response to determining whether the Chinese anomaly detection information indicates that the name of the bidding entity is normal or the English anomaly detection information indicates that the name of the bidding entity is normal, control the paper feed of the scanner to maintain paper feeding in order to scan the paper bidding documents.
[0067] In some embodiments, the aforementioned execution entity may, in response to determining whether the Chinese anomaly detection information indicates the bidding entity name is normal or the English anomaly detection information indicates the bidding entity name is normal, control the scanner's paper feed inlet to maintain paper feeding for scanning the aforementioned paper bidding document. The aforementioned scanner refers to an electronic device used to convert paper documents into digital images, typically including components such as a paper feed inlet, paper feed rollers, a paper monitoring sensor, a scanning unit, a control circuit, and a paper feed motor. The aforementioned paper feed inlet is a slit-like entrance on the scanner housing for receiving the paper to be scanned; the paper enters the paper feed channel inside the scanner through this entrance. Maintaining paper feeding refers to allowing the paper to continue moving forward into the scanner for image scanning, i.e., without triggering the paper retraction mechanism. Scanning the aforementioned paper bidding document means activating the scanning unit to acquire images line by line on the paper, generating a digital image file. In practice, when the Chinese anomaly detection information indicates the bidding entity name is normal or the English anomaly detection information indicates the bidding entity name is normal, an enable signal and speed command can be sent to the driver of the paper feed roller drive motor. For stepper motors, the aforementioned execution entity can output a pulse sequence of a specific frequency corresponding to a preset speed to control the rotation of the paper feed rollers. For a DC motor, the aforementioned actuator outputs a pulse width modulation signal corresponding to the duty cycle, and achieves closed-loop speed control through encoder feedback. The motor starts rotating, driving the paper feed rollers to rotate at a preset speed, waiting for the paper to be fed in. The aforementioned paper monitoring sensor can be a photoelectric sensor installed at the scanner's paper inlet.
[0068] In some optional implementations of certain embodiments, the aforementioned execution entity may, in response to determining whether the Chinese anomaly detection information indicates that the name of the bidding entity is normal or the English anomaly detection information indicates that the name of the bidding entity is normal, control the paper feed of the scanner to maintain paper feeding in order to scan the aforementioned paper bid documents: The first step, in response to whether the Chinese or English anomaly detection information indicates the bidding entity name is normal, activates the paper feed rollers at the scanner's paper inlet and drives them to rotate at a preset speed. The "activated state" refers to the state where the drive motor of the paper feed rollers is energized and generates rotational torque, allowing the rollers to rotate around their axis. When the motor is de-energized, the rollers are stationary, and paper cannot be automatically fed in.
[0069] The second step involves activating the scanner's scanning unit during the rotation of the paper feed rollers. When the paper monitoring sensor at the paper inlet switches from not detecting paper to detecting paper, the scanner scans the paper tender document entering the inlet. The paper monitoring sensor can be a photoelectric sensor installed inside the scanner's paper inlet (i.e., after the paper enters the scanner, after the paper feed rollers, near the paper feed channel entrance), used to detect whether the leading edge of the paper has reached the inside of the inlet. The scanning unit refers to the image acquisition components inside the scanner, including a light source (e.g., a cold cathode fluorescent lamp or a light-emitting diode array), a mirror group, a lens, and a photoelectric conversion device (e.g., a charge-coupled device or a contact image sensor). The scanning unit converts the optical image of the paper surface line by line into analog electrical signals, which are then converted into digital image data by an analog-to-digital converter. In practice, the actuator continuously reads the output signal of the paper monitoring sensor during the rotation of the paper feed rollers. When the first page of the paper tender document is fed into the inside of the inlet, the leading edge of the paper reaches the position of the paper monitoring sensor, and the output state of the paper monitoring sensor changes (e.g., from high level to low level). Upon detecting the state switch, the aforementioned execution entity immediately sends a start command to the scanning unit: turn on the light source, enable the clock signal of the charge-coupled device or contact image sensor, and begin scanning the paper line by line.
[0070] The third step involves real-time monitoring of the paper-feeding speed of the aforementioned paper tender documents during the image scanning process. This paper-feeding speed refers to the instantaneous linear velocity of the paper moving within the scanner's paper feed path. In practice, a speed measuring wheel can be installed in the paper feed path to monitor the paper-feeding speed in real time. This speed measuring wheel is a driven wheel that contacts the paper surface and can rotate freely. It is typically made of lightweight material with an anti-slip texture. As the paper moves, friction drives the speed measuring wheel to rotate. An encoder (photoelectric or magnetoelectric) is mounted on the speed measuring wheel shaft, and the encoder outputs a pulse signal proportional to the rotation angle. The executing unit calculates the rotational speed of the speed measuring wheel by measuring the number of pulses per unit time, and then converts this to the paper feed speed based on the speed measuring wheel diameter: Paper feed speed (mm / s) = Speed measuring wheel rotational speed (rpm) × π × Speed measuring wheel diameter (mm).
[0071] Fourth, in response to the determination that the deviation between the aforementioned paper feed speed and the preset rotational speed of the aforementioned paper feed roller exceeds a preset threshold, the drive torque of the aforementioned paper feed roller is adjusted to maintain the aforementioned paper feed speed within the target scanning speed range. In practice, the preset rotational speed of the paper feed roller can be converted into a linear speed based on the diameter of the paper feed roller (e.g., linear speed = π × paper feed roller diameter × preset rotational speed ÷ 60). Then, the aforementioned actuator can determine the absolute value of the difference between the paper feed speed and the linear speed as the deviation. In practice, the aforementioned actuator uses a closed-loop control algorithm (e.g., proportional-integral-derivative control) to adjust the drive torque according to the deviation. Here, the aforementioned target scanning speed range refers to an allowable paper feed speed interval, for example, [190 mm / s, 210 mm / s]. Specifically, in practice, the aforementioned actuator first calculates the theoretical paper feed linear speed based on the diameter of the paper feed roller and the preset rotational speed: theoretical speed (mm / s) = π × paper feed roller diameter (mm) × preset rotational speed (rpm) ÷ 60. Then, the absolute value of the difference between the actual paper feed speed obtained from real-time monitoring and the theoretical speed is determined as the deviation. If the deviation exceeds a preset threshold (e.g., ±10 mm / s), a proportional-integral-derivative (PID) control algorithm is used to adjust the current or pulse width modulation duty cycle of the paper feed roller drive motor, thereby changing the drive torque: increasing torque when the actual speed is too low and decreasing torque when the actual speed is too high, until the deviation falls back within the threshold. For example, the target scanning speed is 200 mm / s, and the preset threshold is ±10 mm / s. An actual paper feed speed of 180 mm / s is detected, with a deviation of -20 mm / s, exceeding the threshold. The actuator increases the winding current of the paper feed roller stepper motor from the rated value of 1.0 amps to 1.2 amps (an increase of 20%), correspondingly increasing the drive torque. This increases the friction between the paper feed roller and the paper, and the paper feed speed gradually recovers. After several adjustments, the speed stabilizes at 198 mm / s, falling within the range of [190, 210], and the adjustment stops.
[0072] Step 106: In response to determining that both the Chinese anomaly detection information and the English anomaly detection information indicate that the name of the bidding entity is abnormal, a preset recycling drive command is output to change the physical transmission path of the paper bidding documents.
[0073] In some embodiments, the above-mentioned execution entity may output a preset recycling drive instruction in response to determining that the Chinese abnormal detection information characterizes an abnormality in the name of the tendering and bidding entity and the English abnormal detection information characterizes an abnormality in the name of the tendering and bidding entity, so as to change the physical transmission path of the above-mentioned paper-based tender documents. Among them, the above-mentioned preset recycling drive instruction may be an instruction for controlling the switching of the paper transmission path, which is used to change the movement direction of the paper, so that the paper turns from the normal paper feeding channel to the recycling channel (for example, controlling a rotatable guide plate or a movable baffle to rotate from the "paper feeding position" to the "recycling position". When the paper is continuously conveyed forward by the paper feed roller, the guide plate guides it to the recycling channel instead of the scanning channel. After the paper completely leaves the paper feed port, the execution entity may control the guide plate to reset and prepare to process the next piece of paper). The above-mentioned various embodiments of the present disclosure have the following beneficial effects: Through the instrument control method based on image recognition in some embodiments of the present disclosure, the wear of the paper feed roller of the scanner is reduced with high accuracy. Specifically, the reason for the increased wear of the paper feed roller of the scanner is that the company names in the tender documents often appear in a mixed form of Chinese and English, such as "ABC Technology Co., Ltd." and "Mofang Inc.". Through single-language detection (such as Chinese suffix matching), the Chinese and English character strings are regarded as a whole for legality detection, and the Chinese legality rules (such as determining whether it ends with "Co., Ltd.") cannot be applied to English segments, and the English legality rules (such as determining whether it ends with "Inc." or "Ltd.") cannot be applied to Chinese segments. Due to the lack of means for splitting the string by language gap, the Chinese and English characters interfere with each other in the same string, resulting in low accuracy of legality detection. A large number of invalid tender documents are still transmitted to the scanner, increasing the wear of the paper feed roller of the scanner. Based on this, the instrument control method based on image recognition in some embodiments of the present disclosure first obtains the tender document image of the corresponding paper-based tender document in response to detecting the document identifier through the image acquisition device at the paper feed port of the scanner. Thus, the tender document image corresponding to the paper-based tender document can be obtained before the paper-based tender document enters the scanner. Then, perform name recognition processing on the above-mentioned tender document image to obtain the name of the tendering and bidding entity. Thus, the image is converted into a string that can be processed by the algorithm. After that, perform language gap splitting processing on the above-mentioned name of the tendering and bidding entity to generate Chinese and English segment information. Thus, the Chinese and English mixed string can be split into independent Chinese segments and English segments according to the language boundary, so that characters of different languages no longer interfere with each other. Furthermore, perform cross-language resonance abnormal detection processing on the above-mentioned Chinese and English segment information to generate Chinese abnormal detection information or English abnormal detection information. Specifically, apply Chinese legality rules (such as suffix matching) to Chinese segments, apply English legality rules (such as suffix matching and position word filtering) to English segments, and do not judge English segments when Chinese segments have been determined to be normal.This eliminates interference from cross-language rule overlaps and improves the accuracy of validating mixed Chinese and English company names. Finally, in response to determining whether the Chinese anomaly detection information indicates a valid bidding entity name or the English anomaly detection information indicates a valid bidding entity name, the scanner's paper feed is controlled to maintain paper feeding for scanning the aforementioned paper bidding documents. In response to determining that both the Chinese and English anomaly detection information indicate an abnormal bidding entity name, a preset retraction drive command is output to change the physical transmission path of the aforementioned paper bidding documents. Therefore, paper is only allowed to enter the scanner when the detection result is normal; otherwise, the transmission path is physically changed to retract the paper, preventing invalid paper from contacting the feed rollers. Because this method combines language gap segmentation with cross-language resonance anomaly detection, the probability of invalid paper being misjudged as valid is reduced, thereby reducing unnecessary physical wear on the feed rollers, reducing wear on the scanner's feed rollers, and extending the service life of the scanner's feed rollers.
[0074] Further reference Figure 2 As an implementation of the methods shown in the figures, this disclosure provides some embodiments of an instrument control device based on image recognition, which are similar to... Figure 1 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.
[0075] like Figure 2 As shown, some embodiments of the image recognition-based instrument control device 200 include: an acquisition unit 201, an identification unit 202, a first processing unit 203, a second processing unit 204, a control unit 205, and an output unit 206. The acquisition unit 201 is configured to acquire the image of the corresponding paper tender document in response to the detection of a document identifier by the image acquisition device through the paper feed port of the scanner; the recognition unit 202 is configured to perform bidding entity name recognition processing on the tender document image to obtain the bidding entity name; the first processing unit 203 is configured to perform language gap segmentation processing on the bidding entity name to generate Chinese and English fragment information; the second processing unit 204 is configured to perform cross-language resonance anomaly detection processing on the Chinese and English fragment information to generate Chinese anomaly detection information or English anomaly detection information; the control unit 205 is configured to control the paper feed port of the scanner to maintain paper feeding in response to determining that the Chinese anomaly detection information indicates that the bidding entity name is normal or the English anomaly detection information indicates that the bidding entity name is normal, so as to scan the paper tender document; the output unit 206 is configured to output a preset recycling drive command in response to determining that the Chinese anomaly detection information indicates that the bidding entity name is abnormal and the English anomaly detection information indicates that the bidding entity name is abnormal, so as to change the physical transmission path of the paper tender document.
[0076] It is understandable that the units described in the device 200 are related to the reference. Figure 1 The steps in the method described above correspond to each other. Therefore, the operations, features, and beneficial effects described above for the method also apply to the device 200 and the units contained therein, and will not be repeated here.
[0077] The following is for reference. Figure 3 It shows a schematic diagram of the structure of an electronic device 300 suitable for implementing some embodiments of the present disclosure. Figure 3 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of this disclosure.
[0078] like Figure 3 As shown, the electronic device 300 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 into a random access memory (RAM) 303. The RAM 303 also stores various programs and data required for the operation of the electronic device 300. The processing unit 301, ROM 302, and RAM 303 are interconnected via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0079] Typically, the following devices can be connected to I / O interface 305: input devices 306 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 307 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 308 including, for example, magnetic tapes, hard disks, etc.; and communication devices 309. Communication device 309 allows electronic device 300 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 3 An electronic device 300 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively. Figure 3 Each box shown can represent a device or multiple devices as needed.
[0080] In particular, according to some embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 309, or installed from storage device 308, or installed from ROM 302. When the computer program is executed by processing device 301, it performs the functions defined in the methods of some embodiments of this disclosure.
[0081] It should be noted that, in some embodiments of this disclosure, the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In some embodiments of this disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In some embodiments of this disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0082] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0083] A computer-readable medium may be included in an electronic device or may exist independently without being assembled into the electronic device. The computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: acquire an image of the corresponding paper tender document in response to the image acquisition device detecting a document identifier through the scanner's paper feed inlet; perform tender entity name recognition processing on the tender document image to obtain the tender entity name; perform language gap segmentation processing on the tender entity name to generate Chinese and English fragment information; perform cross-language resonance anomaly detection processing on the Chinese and English fragment information to generate Chinese anomaly detection information or English anomaly detection information; in response to determining that the Chinese anomaly detection information indicates the tender entity name is normal or the English anomaly detection information indicates the tender entity name is normal, control the scanner's paper feed inlet to maintain paper feeding to scan the paper tender document; and in response to determining that both the Chinese and English anomaly detection information indicate the tender entity name is abnormal, output a preset retraction drive command to change the physical transmission path of the paper tender document.
[0084] Computer program code for performing operations of some embodiments of this disclosure can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages—such as Java, Smalltalk, and C++—and conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0085] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0086] The units described in some embodiments of this disclosure can be implemented in software or hardware. The described units can also be housed in a processor; for example, a processor may be described as including an acquisition unit, an identification unit, a first processing unit, a second processing unit, a control unit, and an output unit. The names of these units do not necessarily limit the specific unit itself; for example, the acquisition unit may also be described as "a unit that acquires an image of a corresponding paper tender document in response to the detection of a document identifier by an image acquisition device through the scanner's paper feed port."
[0087] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), and so on.
[0088] The above description is merely a selection of preferred embodiments of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of technical features, but should also cover other technical solutions formed by arbitrary combinations of technical features or their equivalents without departing from the inventive concept. For example, technical solutions formed by substituting features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.
Claims
1. An instrument control method based on image recognition, comprising: In response to the detection of a document identifier by the image acquisition device through the scanner's paper feed port, an image of the corresponding paper tender document is acquired; The tender document image is processed to identify the name of the tendering entity, thereby obtaining the name of the tendering entity; The names of the bidding entities are subjected to language gap segmentation processing to generate Chinese and English fragment information; The Chinese and English fragment information is subjected to cross-language resonance anomaly detection processing to generate Chinese anomaly detection information or English anomaly detection information; In response to determining whether the Chinese anomaly detection information indicates that the name of the bidding entity is normal or the English anomaly detection information indicates that the name of the bidding entity is normal, the scanner's paper feed is controlled to maintain paper feeding in order to scan the paper bid document; In response to determining that both Chinese and English anomaly detection information indicate an anomaly in the name of the bidding entity, a preset recycling drive command is output to change the physical transmission path of the paper bidding documents.
2. The method of claim 1, wherein, The Chinese and English fragment information includes at least one of the following: a set of Chinese fragment information, a set of English fragment information, and the cross-language resonance anomaly detection processing of the Chinese and English fragment information to generate Chinese anomaly detection information or English anomaly detection information, including: In response to the determination that the Chinese and English fragment information includes a set of Chinese fragment information, a dual-domain resonance anomaly detection process is performed on the set of Chinese fragment information to generate Chinese anomaly detection information corresponding to the name of the bidding entity; In response to determining that the Chinese anomaly detection information indicates an anomaly in the name of the bidding entity and that the Chinese and English fragment information includes a set of English fragment information, the English fragment information set is subjected to impurity resonance anomaly detection processing to generate English anomaly detection information corresponding to the name of the bidding entity.
3. The method of claim 1, wherein, The step of performing bidding entity name recognition processing on the bid document image to obtain the bidding entity name includes: Based on the preset subject name location information, the paper bid document image is positioned and cropped to obtain the area image of the position represented by the preset subject name location information in the paper bid document image as the subject name area image; The image of the main name region is input into a pre-trained optical character recognition model to obtain a text character sequence; The text character sequence is subjected to control character filtering processing to obtain a filtered text character sequence; The length of the filtered text character sequence is measured to obtain length detection information. In response to determining that the length detection information meets the preset conditions, the filtered text character sequence is subjected to blacklist matching processing to obtain matching information; In response to the determination that the matching information indicates that no corresponding blacklist has been matched, the filtered text character sequence is determined as the name of the bidding entity.
4. The method according to claim 2, wherein, The Chinese and English fragment information includes a set of Chinese fragment information and a set of English fragment information. Each Chinese fragment information has a corresponding generation time, and each English fragment information has a corresponding generation time. The process of performing dual-domain resonance anomaly detection processing on the Chinese fragment information set to generate Chinese anomaly detection information corresponding to the name of the bidding entity includes: The Chinese fragment information set is subjected to sensitive word detection processing to obtain sensitive word detection information; In response to determining that the sensitive word detection information representation does not contain sensitive words, the Chinese fragment information set is subjected to suffix tree matching processing to generate Chinese anomaly detection information corresponding to the name of the bidding entity; In response to the determination that the sensitive word detection information indicates the presence of sensitive words, the information indicating the abnormality of the bidding entity name is identified as the Chinese abnormality detection information corresponding to the bidding entity name.
5. The method according to claim 2, wherein, The impurity resonance anomaly detection processing of the English fragment information set to generate English anomaly detection information corresponding to the name of the bidding entity includes: The English fragment information set is processed for job term detection to obtain job term detection information; In response to determining that the job term detection information characterizing the English fragment information set contains job terms, the information characterizing the abnormality of the bidding entity name is determined as the English abnormality detection information corresponding to the bidding entity name; In response to determining that the job term detection information represents that the English fragment information set does not contain job terms, the English fragment information set is subjected to English legal suffix detection processing to obtain English anomaly detection information corresponding to the name of the bidding entity.
6. The method according to claim 1, wherein, The step of responding to determining whether the Chinese anomaly detection information indicates that the name of the bidding entity is normal or the English anomaly detection information indicates that the name of the bidding entity is normal, and controlling the paper feed of the scanner to maintain paper feeding to scan the paper bid document, includes: In response to determining whether the Chinese anomaly detection information indicates that the name of the bidding entity is normal or the English anomaly detection information indicates that the name of the bidding entity is normal, the paper feed roller at the paper inlet of the scanner is activated and driven to rotate at a preset speed. During the rotation of the paper feed rollers, when the state of the paper monitoring sensor at the paper inlet switches from not detecting paper to detecting paper, the scanning unit of the scanner is activated to scan the paper tender document entering the paper inlet. During the image scanning process, the paper feed speed of the paper tender document is monitored in real time. In response to determining that the deviation between the paper feed speed and the preset rotation speed of the paper feed roller exceeds a preset threshold, the drive torque of the paper feed roller is adjusted to maintain the paper feed speed within the target scanning speed range.
7. An instrument control device based on image recognition, comprising: The acquisition unit is configured to acquire a bid document image of the corresponding paper bid document in response to the detection of a document identifier by the image acquisition device through the scanner paper feed port; The identification unit is configured to perform bidding entity name recognition processing on the bid document image to obtain the bidding entity name; The first processing unit is configured to perform language gap segmentation processing on the name of the bidding entity to generate Chinese and English fragment information; The second processing unit is configured to perform cross-language resonance anomaly detection processing on the Chinese and English fragment information to generate Chinese anomaly detection information or English anomaly detection information. The control unit is configured to, in response to determining whether the Chinese anomaly detection information indicates that the name of the bidding entity is normal or the English anomaly detection information indicates that the name of the bidding entity is normal, control the paper feed of the scanner to maintain paper feeding in order to scan the paper bid document; The output unit is configured to respond to determining that both Chinese anomaly detection information and English anomaly detection information indicate that the name of the bidding entity is abnormal, and output a preset recycling drive command to change the physical transmission path of the paper bid document.
8. An electronic device, comprising: One or more processors; A storage device on which one or more programs are stored; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1 to 6.
9. A computer-readable medium having a computer program stored thereon, wherein, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 6.