Natural language driven batch archive scan piece grouping method and edge device
By employing a natural language-driven method for segmenting and assembling documents, and utilizing multimodal feature extraction and comprehensive judgment techniques, the method automates the segmentation and assembly of scanned documents, thus solving the problems of low efficiency and poor adaptability caused by manual reliance and rigid rules in existing technologies. This achieves efficient and accurate document management.
Patent Information
- Application Number
- CN202611561505.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-10
- Publication Date
- 2026-11-06
AI Technical Summary
Existing methods for assembling and splitting scanned documents rely heavily on manual operation or fixed rules, making it difficult to achieve high efficiency, adaptability, and accuracy, especially when faced with diverse document formats, inconsistent layouts, and a surge in scanning volume.
By acquiring natural language descriptions from user input and performing semantic parsing, segmentation rules are generated. Multimodal feature extraction and comprehensive judgment are performed on each page of images in the continuous scan image stream. Segmentation boundaries are determined according to the segmentation rules, thereby achieving automated segmentation and volume assembly.
It lowers the threshold for configuring and maintaining the component division rules, improves the adaptability to various file formats and the accuracy of component division boundary determination, and achieves high efficiency, high adaptability and high accuracy in component division and assembly.
Smart Images

Figure CN123052771A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of document image processing and intelligent archive management technology, and in particular to a natural language-driven method for batch assembling and splitting scanned archives into volumes and an edge device. Background Technology
[0002] With the continuous advancement of digitization of existing archives and the increasing electronic processing of new archives across various industries, archive management departments and archive digitization service agencies face the need for rapid archiving of large volumes of scanned paper archives. In the digitization process, accurately segmenting and orderly recombining the disordered image stream generated by continuous scanning according to the natural components of the original archives (i.e., "component grouping") is a core step affecting archiving efficiency and data quality.
[0003] In related technologies, the segmentation of scanned archival documents mainly adopts the following two types of solutions. One is the physical partitioning solution: before scanning, operators manually insert blank pages, colored paper, or partition pages with QR codes between different documents in the paper archive; after scanning, the document boundaries are determined by recognizing the visual characteristics of these physical partitions, and the partition images are then removed after segmentation. The other is the hard-coded rule segmentation solution: the manufacturer's technicians pre-write underlying code or configure regular expressions for specific archival formats, setting fixed segmentation judgment logic (such as detecting whether a fixed coordinate area contains a document number stamp, recognizing whether the page number is zero, etc.); the system performs boundary judgment and segmentation according to the preset rules during operation. For the assembly of the segmented images, the process is usually done manually using archival management software to create folders or directory structures, dragging and dropping images belonging to the same document into the corresponding entries, or the system arranges and combines them sequentially according to the segmentation order.
[0004] However, existing methods for assembling and splitting scanned documents rely heavily on manual operation or fixed rules. Faced with the reality of diverse document formats, inconsistent layouts, and a surge in scanning volume, it is difficult to achieve efficient, adaptable, and accurate document assembling and splitting. Summary of the Invention
[0005] This application provides a natural language-driven method and edge device for batch file scanning and assembly, which improves the efficiency, adaptability and accuracy of batch file scanning and assembly.
[0006] Firstly, this application provides a natural language-driven method for batch splitting and assembling scanned documents into volumes, including:
[0007] Obtain the natural language description input by the user, and perform semantic parsing on the natural language description to obtain the division determination rules. The natural language description is used to characterize the determination basis of the division boundary of the archive.
[0008] Acquire a continuous scan image stream, which is a sequence of images obtained by continuously scanning a batch of files;
[0009] Multimodal features are extracted from each page of images in a continuously scanned image stream, and the extracted multimodal features are comprehensively judged according to the component division judgment rules.
[0010] When the comprehensive judgment result meets the predetermined conditions, the corresponding page in the continuous scan image stream is determined as the component boundary;
[0011] The continuous scanned image stream is segmented and assembled according to the component boundaries to obtain structured electronic archives.
[0012] In one possible embodiment, semantic parsing of the natural language description to obtain component segmentation rules includes: inputting the natural language description into a large model, performing natural language understanding on the natural language description through the large model, extracting component segmentation triggering conditions, wherein the component segmentation triggering conditions include at least one of the target object's color, position, category, or font size; compiling the component segmentation triggering conditions into a multimodal feature matching rule tree, and using the multimodal feature matching rule tree as the component segmentation rules.
[0013] In one possible embodiment, the multimodal features include at least two of the following: visual marker features based on object detection, which include the detection results of stamps, file number stamps, or preset marker patterns in each page image; layout structure features based on page layout analysis, which include the results of vectorizing the margin distribution and paragraph density of each page image; and key attribute features based on optical character recognition, which include at least one of the following in each page image: red header color threshold, page number sequence mutation information, title font size, title position, or keyword matching results in a preset area.
[0014] In one possible embodiment, the extracted multimodal features are comprehensively judged according to the component division judgment rules, including: weighted summation of the multimodal features according to the weights of each judgment condition in the component division judgment rules to obtain a comprehensive score; the comprehensive judgment result meets predetermined conditions, including: the comprehensive score exceeds a preset threshold.
[0015] In one possible embodiment, the extracted multimodal features are comprehensively judged according to the component judgment rules, including: performing binarization judgment on each feature in the multimodal features to obtain the judgment result of each feature; performing logical combination operation on each judgment result according to the logical combination conditions in the component judgment rules to obtain the comprehensive judgment result; the comprehensive judgment result satisfies predetermined conditions, including: the comprehensive judgment result is true.
[0016] In one possible embodiment, the continuous scanned image stream is segmented and assembled according to the segmentation boundary to obtain a structured electronic archive, including: segmenting the continuous scanned image stream into at least one image set based on the segmentation boundary, with each image set corresponding to one archive; performing intra-volume order verification on the images in each image set, the intra-volume order verification including: verifying whether the arrangement order of the images in each image set is correct based on the page number information of the images in each image set; when the verification result is correct, combining the image sets into a structured electronic archive according to the arrangement order of the archive.
[0017] In one possible embodiment, the natural language-driven batch document scanning document segmentation and assembly method further includes: when the image arrangement order is found to be incorrect, reordering the images in the image set according to the page number information, and combining the reordered image sets into structured electronic documents.
[0018] In one possible embodiment, the natural language-driven batch document scanning document segmentation and assembly method further includes: obtaining rule combination information input by the user on a preset configuration page, the rule combination information including at least one of optical character recognition result extraction rules, regular expression matching rules, and built-in fixed rules, the built-in fixed rules including specified area color recognition rules and / or fixed page number span rules; generating supplementary judgment rules based on the rule combination information; and comprehensively judging the extracted multimodal features based on the segmentation judgment rules, including: comprehensively judging the extracted multimodal features based on the segmentation judgment rules and the supplementary judgment rules.
[0019] In one possible embodiment, the natural language-driven batch document scanning document segmentation and volume assembly method further includes: after semantic parsing the natural language description, determining whether segmentation judgment rules have been successfully generated; when the judgment result is that generation has not been successful, calculating the visual layout similarity of adjacent page images in the continuous scan image stream using a large model; when the visual layout similarity is less than a preset similarity threshold, determining the next page in the corresponding adjacent page image as the segmentation boundary.
[0020] In one possible embodiment, visual layout similarity calculation is performed on adjacent page images in a continuously scanned image stream, including: extracting the layout structure features of each page image, the layout structure features including at least one of page margin distribution features and paragraph density features; and determining the visual layout similarity between adjacent page images based on the layout structure features of each page image.
[0021] In one possible embodiment, the multimodal features further include text-assisted decision features; multimodal feature extraction for each page of images in a continuously scanned image stream further includes: performing optical character recognition on each page of images to obtain a plain text stream of each page of images; performing natural language processing on the plain text stream to extract text topic information and / or keyword information; and generating text-assisted decision features based on the text topic information and / or keyword information.
[0022] Secondly, this application provides a natural language-driven batch document scanning document splitting and volume assembly device, comprising:
[0023] The component division determination rule generation module is used to obtain the natural language description input by the user, and to perform semantic parsing on the natural language description to obtain the component division determination rule. The natural language description is used to characterize the determination basis of the component division boundary of the archive.
[0024] The image acquisition module is used to acquire a continuously scanned image stream, which is an image sequence obtained by continuously scanning a batch of files.
[0025] The comprehensive judgment module is used to extract multimodal features from each page of images in a continuously scanned image stream, and to make a comprehensive judgment on the extracted multimodal features according to the component judgment rules.
[0026] The boundary determination module is used to determine the corresponding page in the continuous scan image stream as the component boundary when the comprehensive judgment result meets the predetermined conditions;
[0027] The output module is used to segment and assemble the continuous scanned image stream according to the component boundaries, and output structured electronic archives.
[0028] Thirdly, this application provides an edge device, including: a processing component and a storage component communicatively connected to the processing component;
[0029] Storage components are used to store instructions executed by the computer;
[0030] A processing component for executing computer-executable instructions stored in a storage component to implement the method of any of the first aspects.
[0031] Fourthly, this application provides a natural language-driven batch document scanning and document splitting / assembly system, comprising:
[0032] Scanning equipment used to continuously scan batches of documents, generating a continuous stream of scanned images;
[0033] The aforementioned edge device is communicatively connected to the scanning device;
[0034] Output devices are used to output structured electronic archives.
[0035] Fifthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed, are used to implement the method of any one of the first aspects.
[0036] Sixthly, this application provides a computer program product, including a computer program that, when executed, implements the method of any one of the first aspects.
[0037] This application provides a natural language-driven method and edge device for batch scanning and assembling of archive documents. The method acquires a user-input natural language description and performs semantic parsing to obtain assembly rules. The natural language description is used to characterize the criteria for determining the boundaries of archive document assemblies. It acquires a continuous scan image stream, which is an image sequence obtained by continuously scanning a batch of archive documents. Multimodal features are extracted from each page of the continuous scan image stream, and the extracted multimodal features are comprehensively judged according to the assembly rules. When the comprehensive judgment result meets predetermined conditions, the corresponding page in the continuous scan image stream is determined as the assembly boundary. The continuous scan image stream is segmented and assembled according to the assembly boundaries to obtain structured electronic archives.
[0038] In this process, by acquiring the natural language description input by the user and performing semantic parsing to automatically generate component division rules, end users can flexibly customize component division rules without relying on technical personnel to write code, significantly reducing the configuration threshold and maintenance cost of component division rules, while also eliminating the dependence on physical partitions. By extracting multimodal features from each page of the continuously scanned image stream and comprehensively judging the extracted multimodal features according to the component division rules, the corresponding page is determined as the component boundary when the comprehensive judgment result meets the predetermined conditions. This can fully integrate multiple visual and content features of the archival images, effectively improving the accuracy of component boundary judgment and adaptability to diverse archival formats compared to existing single color comparison or fixed coordinate detection schemes. Furthermore, by segmenting and assembling according to the component boundaries to obtain structured electronic archives, the entire process of automated component division and assembly from continuous image streams to structured electronic archives is realized, improving the efficiency of archival component division and assembly. Attached Figure Description
[0039] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0040] Figure 1 A flowchart illustrating a natural language-driven batch document scanning document segmentation and assembly method provided for an exemplary embodiment of this application;
[0041] Figure 2Another flowchart illustrating a natural language-driven batch document scanned document segmentation and assembly method provided for an exemplary embodiment of this application;
[0042] Figure 3 A schematic diagram of a natural language-driven batch file scanning and assembly device provided as an exemplary embodiment of this application;
[0043] Figure 4 A schematic diagram of the structure of an edge device provided for an exemplary embodiment of this application.
[0044] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0045] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application.
[0046] The terms "first," "second," etc., used in this application's specification and some aspects are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, products, or apparatus.
[0047] In related technologies, physical page-separation solutions require significant manual intervention for inserting and removing pages before and after scanning, which is highly intrusive to normal operations, resulting in high processing costs and low efficiency. Hard-coded rule-based separation solutions mostly use factory-coded logic, which has a narrow range of applicability. When faced with situations involving no fixed page numbers, inconsistent first-page styles, significant variations in stamp positions, or mixed scanning of multiple documents, the fixed logic struggles to reliably identify true boundaries, easily leading to mis-separation, omissions, and subsequent file assembly errors. Once rules need adjustment, it typically requires technical personnel to reconfigure or modify the program, resulting in high maintenance costs and making it difficult for users to quickly update rules according to actual archival requirements. Therefore, existing document scanning separation and file assembly solutions heavily rely on manual operation or fixed rules, making it difficult to achieve high efficiency, adaptability, and accuracy in the face of diverse document formats, inconsistent layouts, and a surge in scanning volume.
[0048] To address the aforementioned technical challenges, this application proposes a natural language-driven batch archival scan segmentation and assembly scheme. By acquiring user-input natural language descriptions and semantically parsing them, the scheme automatically converts them into segmentation rules, allowing users to flexibly configure these rules according to actual archiving needs without relying on technical personnel to write code. Subsequently, multimodal features are extracted from each page of the continuously scanned image stream, and these features are comprehensively evaluated based on the segmentation rules. Even without physical partitions, parallel fusion analysis of multi-dimensional features such as the archive's layout, markings, and content is achieved. When the comprehensive evaluation result meets predetermined conditions, the corresponding page is identified as the segmentation boundary, and the continuously scanned image stream is segmented and assembled accordingly to obtain structured electronic archives. This processing mechanism replaces hard-coded rule configuration with natural language rule-driven methods and replaces single physical partition recognition or fixed coordinate detection with multi-dimensional feature fusion analysis, lowering the configuration and maintenance threshold for segmentation rules and effectively improving adaptability to diverse archive formats and the accuracy of segmentation boundary determination. This results in highly efficient, adaptable, and accurate segmentation and assembly.
[0049] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0050] Figure 1 This is a flowchart illustrating a natural language-driven method for batch assembling and splitting scanned documents into volumes, provided as an exemplary embodiment of this application. Figure 1 As shown, this natural language-driven method for batch assembling and splitting scanned documents includes the following steps:
[0051] S101. Obtain the natural language description input by the user, and perform semantic parsing on the natural language description to obtain the division determination rules. The natural language description is used to characterize the determination basis of the division boundary of the archive.
[0052] Natural language description, serving as a rule representation of user input, embodies the user's criteria for judging document component boundaries. This natural language description can be received by the human-computer interaction interface of an image processing terminal, or by an edge computing device through a local configuration page, a business platform-issued interface, or an external input terminal. The input format can be keyboard-entered text, text completed after selecting a preset phrase, or a text string transcribed from speech. Semantic parsing is used to extract information related to component boundaries from this natural language description and convert it into component judgment rules that can be invoked in subsequent processes. Component judgment rules are used to represent the judgment conditions for component boundaries and can be represented in the form of executable rules.
[0053] In practical implementation, after receiving the natural language description, the executing entity can first perform text normalization processing, standardizing synonymous expressions, colloquial expressions, and expressions lacking subjects. For example, phrases like "the first page has a red header," "the first page has a red title from the unit," and "the appearance of a red header indicates the start of a new document" are uniformly mapped to the corresponding first page feature judgment rules; "the page with the file number stamp is the first page of the new document" is mapped to the rule for determining the boundary when the corresponding target appears; and "the page number jumps from 5 back to 1 when the document is divided into parts" is mapped to the rule for determining the boundary when the relevant features of adjacent pages change. During the parsing process, semantic understanding and information extraction can be performed on the natural language description to generate part division judgment rules. For expressions like "a stamp means it's the next document," the system can supplement the explanation with preset business definitions to generate corresponding part division judgment rules.
[0054] In one possible embodiment, the semantic parsing module can output rule representations suitable for subsequent calls. For common expressions in mixed-scan archives, such as "the contract's first page title is centered and includes the names of both parties below" or "the medical record's first page has a hospital admission number in the upper left corner and the page numbers are renumbered," corresponding component classification rules can be formed in the same way. Based on the above analysis, this step converts user-understandable natural language input into executable and computable component classification rules, allowing subsequent component classification logic to be adjusted without program rewriting, thus completing the mapping from human experience to machine judgment conditions.
[0055] S102. Obtain a continuous scan image stream, which is an image sequence obtained by continuously scanning a batch of files.
[0056] In this system, the continuous scan image stream serves as the input data to be processed, carrying the page sequence output from a batch of documents during continuous operation. In some embodiments, the user directly places a batch of paper documents into the scanner for continuous paper feeding and scanning. The scanner outputs images of each page in chronological order, forming a continuous scan image sequence without physical separators, which is then input to the edge computing device in real time. The continuous scan image stream can come directly from a high-speed paper feed scanner, a multifunction printer scanning component, or a dedicated document scanning terminal. The image acquisition path can be a direct connection via Universal Serial Bus (USB), local network transmission, or a scan driver callback interface. After the scanning device continuously feeds a batch of paper documents, it outputs images of each page in chronological order, forming an image sequence containing page sequence information. The image format can be a tagged image file format (TIFF), a joint photographic experts group (JPEG), a portable network graphics format (PNG), or a portable document format (PDF) paginated image. Upon receipt, this application will convert them into page-by-page image objects and assign a sequential page number, acquisition timestamp, and batch identifier to each page for subsequent page-by-page feature extraction, adjacent page relationship analysis, and segmentation and volume processing.
[0057] In practice, the system can receive images from each page in the order of scanning output and maintain the page order in the continuous scanned image stream. In some embodiments, after receiving the images, the system can first perform basic preprocessing, including image black border removal, tilt correction, orientation correction, resolution normalization, and noise suppression, to ensure that the outputs from different scanning devices can enter a unified recognition process. If the scanning device supports real-time output, the continuous scanned image stream can be processed while receiving the images; if the scanning device outputs in batches, the images can be loaded and processed sequentially according to page order after the batch is received.
[0058] In this application, the continuously scanned image stream represents not only the image content itself but also the page order relationship. For rules that determine boundaries using adjacent page relationships, the sequential relationship between adjacent pages is one of the conditions for execution; therefore, subsequent processing can be based on the continuous page order for analysis. As an image sequence obtained by continuously scanning batches of files, the core of the continuously scanned image stream lies in preserving the page arrangement under real continuous operation conditions. The subsequent system directly analyzes this image sequence page by page and identifies document boundaries. Based on the above analysis, this step establishes a unified input carrier for continuous batch scanning scenarios, enabling the natural language-generated document segmentation rules to apply to real continuous page sequences.
[0059] S103. Extract multimodal features from each page of the continuously scanned image stream, and make a comprehensive judgment on the extracted multimodal features according to the component judgment rules.
[0060] Multimodal features are the set of basic information required for boundary recognition of each page image, and may include one or more of the following: text-related features, visual target-related features, and layout structure-related features. In some embodiments, the system invokes computer vision algorithms deployed on an edge device to perform target detection and layout analysis on each page image in a continuously scanned image stream to extract visual target-related features and layout structure-related features. Computer vision algorithms include, but are not limited to: target detection algorithms for detecting seals, document number stamps, or preset marking patterns (e.g., target detection models based on convolutional neural networks); layout analysis algorithms for recognizing the overall layout structure of a page (e.g., layout segmentation models based on deep learning); and image enhancement and correction algorithms for the image preprocessing stage (e.g., tilt correction and black border removal algorithms based on image processing). The system performs the above feature extraction on each page image in the continuously scanned image stream and writes the obtained multimodal features into a page-level feature table. The component segmentation judgment rule serves as the basis for comprehensive judgment, used to match the contents of the page-level feature table with the rule conditions, and outputs the comprehensive judgment result for that page.
[0061] In practice, the system can first perform page analysis on a single-page image to establish a page representation for feature extraction; then, it extracts corresponding features based on the rules and matches them with text information, target information, or layout information on the page. For rules involving the relationship between adjacent pages, it can also perform joint analysis by combining relevant features between the current page and adjacent pages.
[0062] The comprehensive judgment process is executed in a rule-driven manner. The system retrieves corresponding information from the page-level feature table for each rule condition and performs matching judgments. For rules containing multiple conditions, the system integrates multiple judgment results based on the rule content to obtain the comprehensive judgment result for the current page, and records the basis for the match, which is then used in the next step to determine the formal document segmentation boundary. Based on the above analysis, this step, by extracting multimodal features from each page image and uniformly evaluating them with rules obtained from natural language parsing, provides a feasible basis for batch document boundary recognition with different layout or content features.
[0063] S104. When the comprehensive judgment result meets the predetermined conditions, the corresponding page in the continuous scan image stream is determined as the component boundary.
[0064] The segmentation boundary represents the page position used to divide different files in a continuous scanned image stream, and is the direct basis for subsequent segmentation and assembly. Predefined conditions constrain when the comprehensive judgment result can be upgraded to a formal boundary, which can be manifested as the comprehensive judgment result meeting the boundary establishment requirements, key judgment conditions being met, or the adjacent page relationship being established. For each page, after obtaining the comprehensive judgment result, the system first determines whether it meets the boundary establishment conditions of the corresponding rule; if it does, the current page number is written into the boundary index set, and boundary-related information is recorded; if it does not meet the conditions, the page remains in a non-boundary state and the system continues processing the next page. For different boundary determination methods, the system can determine the corresponding segmentation position according to the rule content.
[0065] In practice, the system can set different predefined conditions for different rules. For the homepage salient feature rule, the predefined condition can be that the corresponding feature is identified and the boundary judgment requirement is met. For object detection rules, the predefined condition can be that the corresponding object is identified and the matching requirement is met. For adjacent page relationship rules, the predefined condition must at least require that the relevant feature relationship between the current page and adjacent pages meets the boundary judgment requirement, and other auxiliary information can be combined if necessary to reduce false positives.
[0066] During continuous processing, if multiple adjacent pages simultaneously satisfy different rules, the system performs conflict resolution. Conflict resolution can be completed based on rule matching and boundary constraints. For example, if the same page matches multiple rules, they can be merged into the same boundary, and the more reliable result is retained; if two consecutive pages are both judged as boundaries, the page that better matches the file start characteristics is retained, considering page continuity and content integrity. Candidate pages that are below the formal boundary establishment requirements but close to the establishment conditions can be kept in a pending review state, but in the automatic segmentation main process of this application, only pages that meet the predetermined conditions are written into the formal boundary set. Once the segmentation boundary is determined, the system updates the start and end pointers of the current file segment, so that subsequent page determination continues to be executed in the context of the new file segment. Based on the above analysis, it can be seen that this step converges the multimodal comprehensive determination results into clear page boundaries through predetermined conditions, and makes different types of rules have a unified execution exit in the same continuous scan image stream.
[0067] S105. The continuous scanned image stream is segmented and assembled according to the component boundaries to obtain structured electronic archives.
[0068] Structured electronic archives are collections of file units formed by segmenting a continuous stream of scanned images according to confirmed segmentation boundaries. Each file unit contains its own page, sequence relationship, and necessary index information for subsequent archiving, retrieval, and business access. After obtaining the boundary index set, the system constructs segmentation intervals based on the batch start page, each boundary page, and the batch end page, dividing the continuous image sequence into multiple independent image segments. After segmentation, the system generates a file unit identifier for each image segment and encapsulates the pages within the image segment into an electronic file object according to the original page order. The volume assembly process establishes a structured organizational relationship for the segmentation results of the same batch at the file unit level, enabling the output results to correspond to the document, volume, or catalog level in actual archive management.
[0069] In practice, the system first sorts the images in ascending order by boundary page number and adds virtual boundaries at the beginning and end to cover the entire batch of continuously scanned images. Then, it copies or maps the corresponding page indexes segment by segment to form a list of file segments. For scenarios requiring structured preservation of electronic archives, the system can further extract relevant fields from the file segments, write them into metadata records, and associate the metadata records with the corresponding image segments. The storage format of structured electronic archives can be a combination of "image files + metadata files," or a combination of multi-page PDFs and corresponding Extensible Markup Language (XML) or JSON (JavaScript Object Notation) metadata objects. In archiving management platform integration scenarios, the system uploads each file unit and its metadata to the business platform via an interface; in local archiving scenarios, the system generates storage paths according to a predetermined directory structure and saves relevant processing records.
[0070] During the file assembly process, if the same batch needs to be further merged according to business rules, the system can establish a volume-level association based on the component division results, extracted fields, or external batch task parameters. However, this application ensures that each component division boundary divides the continuous scanned image stream into an independent file unit. After the structured electronic archive is generated, the output data includes at least the electronic file content, page order, file boundaries, batch identifier, and searchable metadata, thereby completing the transformation from a continuous scanned image stream to a manageable archive object.
[0071] The natural language-driven batch document scanning document segmentation and assembly method provided in this application automatically generates segmentation judgment rules by acquiring the natural language description input by the user and performing semantic parsing on it. This allows end users to flexibly customize segmentation rules without relying on technical personnel to write code, significantly reducing the configuration threshold and maintenance cost of segmentation rules, while also eliminating the dependence on physical partitions. By extracting multimodal features from each page of the continuously scanned image stream and comprehensively judging the extracted multimodal features according to the segmentation judgment rules, the corresponding page is determined as the segmentation boundary when the comprehensive judgment result meets the predetermined conditions. This method can fully integrate multiple visual and content features of the document images, effectively improving the accuracy of segmentation boundary judgment and adaptability to diverse document formats compared to existing single color comparison or fixed coordinate detection schemes. Furthermore, by segmenting and assembling according to the segmentation boundaries to obtain structured electronic documents, the method realizes fully automated segmentation and assembly of documents from continuous image streams to structured electronic documents, improving the efficiency of document segmentation and assembly.
[0072] In some embodiments, semantic parsing of the natural language description is performed to obtain the component segmentation determination rules, including: inputting the natural language description into a large model, performing natural language understanding on the natural language description through the large model, extracting component segmentation triggering conditions, the component segmentation triggering conditions including at least one of the target object's color, position, category, or font size; compiling the component segmentation triggering conditions into a multimodal feature matching rule tree, and using the multimodal feature matching rule tree as the component segmentation determination rules.
[0073] In some embodiments, the system inputs a natural language description from the user into a large model, which then performs natural language understanding on the description to extract component segmentation trigger conditions. Specifically, the large model performs entity recognition, relation extraction, and intent summarization on the text to extract component segmentation trigger conditions such as "a red stamp exists on the homepage," "the document title is located at the top of the page," "the body page contains a contract category identifier," or "the font size is greater than a specified threshold." These trigger conditions include at least one of the target object's color, position, category, or font size. Subsequently, the trigger conditions are mapped to unified feature predicates and organized into a multimodal feature matching rule tree according to logical relationships (e.g., logical combinations such as "AND," "OR," and "NOT"). The color condition corresponds to color channel matching after image segmentation, the position condition corresponds to page coordinate range matching, the category condition corresponds to text or layout category recognition results, and the font size condition corresponds to character size information recognized by optical character recognition. The system dynamically loads the multimodal feature matching rule tree into the component segmentation execution engine as the component segmentation determination rule, without requiring manual intervention in the underlying code throughout the entire process.
[0074] In this scheme, the large model undertakes the translation function from natural language to structured rules, the component triggering conditions serve as executable decision atoms, and the multimodal feature matching rule tree organizes discrete conditions into a computable decision structure, so that when users express the archiving criteria in natural language, the system can form component decision rules that match the image features.
[0075] In this embodiment, the generation process of the component classification rules maintains a consistent semantic mapping relationship with the feature extraction of subsequent continuous scanning image streams, ensuring that the component classification results closely match the actual layout features. Simultaneously, the large model compiles natural language descriptions into a structured multimodal feature matching rule tree, transforming the configuration of component classification rules from "code writing" to "natural language description input." Users can configure and update component classification rules without requiring programming skills. When faced with different document types or changes in archiving requirements, only the natural language description needs to be updated and the rules recompiled; no modification to the underlying code is required. This significantly reduces the configuration threshold and maintenance cost of component classification rules, effectively improving adaptability to different document formats and application scenarios.
[0076] Based on the above embodiments, the multimodal features further include at least two of the following: visual marker features based on object detection, which include the detection results of seals, file number stamps, or preset marker patterns in each page image; layout structure features based on page layout analysis, which include the results of vectorized processing of the margin distribution and paragraph density of each page image; and key attribute features based on optical character recognition, which include at least one of the following in each page image: red header color threshold, page number sequence mutation information, title font size, title position, or keyword matching results in a preset area.
[0077] Among them, the visual marker features based on object detection utilize the visual computing power of edge devices to perform object detection on each page image, extracting the detection results of seals, document number stamps, or preset marker patterns. The preset marker patterns refer to fixed graphic templates stored in advance by the system to assist in the determination of component boundaries, such as QR codes, barcodes, or specific graphic identifiers. The layout structure features based on page analysis transform the overall page structure of each page image into a visual feature vector, specifically including extracting the distribution of page margins and paragraph density and performing vectorization processing, and using the discrimination ability of the large model to evaluate the probability distribution of the page as the first page of a new document. The key attribute features based on optical character recognition perform optical character recognition on each page image and extract local key attributes of the page in parallel, including at least one of the following: red header color threshold, page number sequence abrupt information (e.g., jumping from "5" back to "1"), title font size, title position, or keyword matching results in preset areas (e.g., "accounting voucher"). The above three types of features describe page differences in parallel from three dimensions: visual salience, page layout structure, and graphic attributes. The system selects at least two of these features to form a comprehensive judgment module, which is then combined with the component judgment rules obtained from natural language description parsing to determine the component boundaries.
[0078] In this embodiment, by parallel extraction and fusion of the above-mentioned multimodal features, the visual and content differences of the archive pages can be comprehensively depicted from multiple dimensions. This avoids the failure of a single feature in scenarios such as missing seals, varied layouts, or blurred images and text, and improves the accuracy of the component boundary determination and the adaptability to different archive formats. At the same time, compared with single physical page recognition or fixed coordinate detection schemes, there is no need for manual page insertion or preset fixed logic, which effectively reduces the process complexity and maintenance cost of component processing.
[0079] In some embodiments, the extracted multimodal features are comprehensively judged according to the component division judgment rules, including: weighted summation of the multimodal features according to the weights of each judgment condition in the component division judgment rules to obtain a comprehensive score; the comprehensive judgment result meets predetermined conditions, including: the comprehensive score exceeds a preset threshold.
[0080] In its implementation, the system first maps each judgment condition to a corresponding weight according to the component segmentation judgment rules. These weights reflect the contribution of conditions such as seal hit, abnormal title font size, abrupt page number sequence changes, page layout blanking, or keyword matching to the component segmentation judgment. Then, each extracted multimodal feature is normalized to ensure that feature values of different dimensions are within the same numerical range. Finally, the weighted features are multiplied according to their respective weight coefficients and summed to obtain the comprehensive score for the current page. This weighted summation process can be executed by the local processing component or by the embedded inference module. The weight vector and normalization parameters used can be adjusted synchronously with rule updates.
[0081] After the comprehensive score is calculated, the system compares it with a preset threshold. This preset threshold is a pre-defined judgment threshold used to measure whether the comprehensive score of the current page meets the segmentation boundary judgment standard. It can be dynamically adjusted or manually set based on file type, user configuration, or historical annotation results. If the comprehensive score is greater than the preset threshold, the current page is determined to meet the segmentation boundary condition and marked as a segmentation boundary; if the comprehensive score does not exceed the preset threshold, the continuous attribution relationship between the current page and the pages before and after it is maintained. By explicitly incorporating the contribution of multimodal features into the weight calculation, the system can form a stable judgment result under the combined effect of text features, layout features, and visual marker features, thus ensuring consistency and traceability in the identification of segmentation boundaries and subsequent file segmentation.
[0082] After adopting the above comprehensive judgment method, the segmentation result no longer depends on a single feature trigger, but is based on the weighted result of multiple judgment conditions to confirm the boundary, which improves the adaptability to complex layouts, mixed scanned documents and changes in homepage style, and at the same time makes it easy to directly adapt to different archiving standards by adjusting weights and thresholds.
[0083] In some embodiments, the extracted multimodal features are comprehensively judged according to the component division judgment rules, including: performing binarization judgment on each feature in the multimodal features to obtain the judgment result of each feature; performing logical combination operation on each judgment result according to the logical combination conditions in the component division judgment rules to obtain the comprehensive judgment result; the comprehensive judgment result satisfies predetermined conditions, including: the comprehensive judgment result is true.
[0084] In the specific implementation, at least two multimodal features from visual marker features, layout structure features, and key attribute features are first extracted from the current page image. Then, a Boolean judgment result (i.e., a binary judgment result, e.g., true if the feature exists, false if the feature does not exist) is generated for each type of feature and written to an intermediate judgment register. Subsequently, Boolean operations are performed according to the logical combination relationship defined in the segmentation judgment rule. When the segmentation judgment rule indicates that a page simultaneously satisfies the homepage identifier, title style, and specific keywords, a logical AND operation is performed on the corresponding feature results; when the segmentation judgment rule indicates that segmentation is triggered by satisfying any significant marker, a logical OR operation is performed. If the comprehensive judgment result after logical combination is true, the page is determined as a segmentation boundary and continues to enter the segmentation and volume processing; if the comprehensive judgment result is false, the continuous attribution relationship between the current page and the continuously scanned image stream is maintained.
[0085] This implementation transforms multimodal information into stable truth-based judgment results by first independently binarizing each feature and then unifying the logical combination. This allows the component segmentation judgment rules obtained from natural language description parsing to directly reflect the boundary conditions described by the user and to consistently match the actual features in the continuously scanned image stream, thereby improving the executability of boundary recognition and the accuracy of rule expression. Since component segmentation is only triggered when the comprehensive judgment result is true after logical combination, the impact of fluctuations in a single feature on the judgment conclusion can be reduced, making the component segmentation and assembly results of continuous batch archives more consistent with the preset archiving standards.
[0086] In related technologies, the assembly of segmented images is typically handled manually using file management software to create folders or directory structures, dragging and dropping images belonging to the same document into corresponding entries, or by the system arranging them sequentially according to the segmentation order. However, these methods lack an automatic verification mechanism for the validity of the intra-volume order, making it difficult to guarantee the accuracy and standardization of the assembly results. Therefore, based on the above embodiments, some embodiments involve segmenting and assembling the continuous scanned image stream according to the segmentation boundaries to obtain structured electronic archives. This includes: segmenting the continuous scanned image stream into at least one image set using the segmentation boundaries as segmentation points, with each image set corresponding to one archive; performing intra-volume order verification on the images in each image set, which includes: verifying the correctness of the image arrangement order in each image set based on the page number information of the images in each image set; and when the verification result is correct, assembling each image set into a structured electronic archive according to the archive's arrangement order.
[0087] In practical implementation, after determining the component boundaries, the continuous scanned image stream is divided into multiple image sets, each corresponding to a file, using the component boundaries as the dividing points. Each image set corresponds to a file container in its data structure, storing the page images, page number index, and archiving identifier of the file. During volume-level sequence verification, page numbers are identified for each page image within the image set. Based on the page number information of each image set, the order of the images in each set is verified. If consecutive page numbers are detected, the beginning and end conform to a preset sequence, and there are no inverted, skipped, or duplicate pages, the order is considered correct. If page numbers are missing or the order is abnormal, the order is considered incorrect, and an automatic page order correction process is triggered. Verified image sets are then written into structured electronic file files according to the predetermined order of the files in the batch archiving task. The files can be PDF with a table of contents, TIFF multi-page files, or structured storage formats defined by the archive business system.
[0088] In this embodiment, the intra-volume sequence verification uses page number information to check the page order within a single document, enabling secondary confirmation of the image sets after segmentation. When all image sets meet the page order requirements, they are then combined according to the document arrangement order, thus forming a structured electronic document with clear boundaries, consistent page order, and direct archiving capability. This processing method ensures that the order of the segmented documents remains synchronized with the intra-volume page order, helping to reduce the amount of manual verification in subsequent archiving management.
[0089] In some embodiments, the natural language-driven batch document scanning document segmentation and assembly method further includes: when the image arrangement order is found to be incorrect, reordering the images in the image set according to the page number information, and combining the reordered image sets into structured electronic documents.
[0090] In practice, after the images are divided and assembled, an intra-volume order check is performed on each image set. During the check, the image recognition results are matched with the page number field to determine whether the page numbers of adjacent images are consecutively increasing, or whether there are any anomalies such as duplicates, skipped numbers, or reverse order. When an arrangement error is detected within an image set, the page number value is first extracted from the recognition results corresponding to each page image. For page numbers that cannot be directly recognized, supplementary parsing or manually confirmed page number records are used to replace them. Then, the images in the set are sorted in ascending order according to the page number values. If the same page number corresponds to multiple images, their relative positions are determined by combining the scan timestamp, image index, or page integrity mark to maintain the intra-volume order consistent with the original document. After the rearrangement is completed, each rearranged image set is associated with the corresponding archive directory information, file name, page number statistics, and archive identifier to generate a structured electronic archive data package, which is then written to the archive repository.
[0091] The above processing enables the image set to directly restore the correct page order based on the page number information when an abnormal order is found. This ensures that the arrangement of images on each page within the same archive is consistent with the original paper document, reducing the deviation in file assembly and subsequent confusion caused by disordered scanning order. At the same time, it ensures that the resulting structured electronic archive meets the archiving system's requirements for page order consistency and catalog relevance.
[0092] Based on the foregoing embodiments, in some embodiments, the natural language-driven batch document scanning document segmentation and assembly method further includes: obtaining rule combination information input by the user on a preset configuration page, the rule combination information including at least one of optical character recognition result extraction rules, regular expression matching rules, and built-in fixed rules, the built-in fixed rules including specified area color recognition rules and / or fixed page number span rules; generating supplementary judgment rules based on the rule combination information; and comprehensively judging the extracted multimodal features based on the segmentation judgment rules, including: comprehensively judging the extracted multimodal features based on the segmentation judgment rules and the supplementary judgment rules.
[0093] In practical implementation, the preset configuration page is deployed on an edge computing terminal or business management platform. The page includes a rule input box, rule selection options, and a rule preview area. If the component judgment rules generated after the natural language description is transformed by the large model are not accurate enough (for example, the description does not cover the special layout features of the current batch of files, causing the rule transformation to fail to correctly identify the first page boundary; or the transformed judgment conditions deviate from the actual file layout, causing the system to continuously misjudge or miss judgments on a certain type of file; or the user finds that the rule execution results are inconsistent with the archiving criteria, requiring the addition of specific feature conditions to correct the judgment logic), the system provides a rule configuration degradation intervention channel to obtain the rule combination information entered by the user on the preset configuration page. This rule combination information includes at least one of optical character recognition result extraction rules, regular expression matching rules, and built-in fixed rules, including specified area color recognition rules and / or fixed page number span rules.
[0094] Accordingly, the rule combination information input by the user is transmitted to the rule parsing module via the interface. The rule parsing module performs field mapping on the rules for extracting optical character recognition results, that is, converts the recognition area and extraction field specified by the user into field positioning and value retrieval rules for optical character recognition (OCR) text; performs syntax verification and compilation on the regular expression matching rules, that is, verifies whether the regular expression input by the user conforms to the syntax specification and compiles it into an executable matching pattern; and converts the built-in fixed rules into executable judgment templates, that is, solidifies the system's preset area color judgment logic, page number span judgment logic, etc. into a unified judgment template format; then these judgment templates are encapsulated into supplementary judgment rules, which can be represented as a rule tree, rule table or set of executable conditions, and are interfaced with the visual mark features, layout structure features and key attribute features obtained from multimodal feature extraction, thereby forming an additional source of judgment in addition to the component judgment rules.
[0095] Correspondingly, during comprehensive judgment, the system applies both the component segmentation judgment rules and supplementary judgment rules to the extracted multimodal features simultaneously. For page images that satisfy any rule or the combination logic, candidate boundary markers are output, and then combined with threshold constraints to form the final judgment result. Through the combined configuration of optical character recognition result extraction, regular expression matching, and built-in fixed rules, even in extreme and special scenarios where natural language descriptions are insufficiently precise or coverage is inadequate, boundary judgment can still be completed based on character content, region color, page span relationship, and layout features, ensuring component segmentation accuracy. If the rule combination information simultaneously configures optical character recognition result extraction rules and fixed page number span rules, the system can still complete boundary judgment based on character content and page span relationship even when page numbers are missing, layouts are inconsistent, or page identifiers change. In practical applications, the rule combination information can also be extended to other rule types; this application does not limit this.
[0096] In this embodiment of the application, by transforming the user-configured rule combination information into supplementary judgment rules and using them in conjunction with the original component judgment rules, it is possible to make comprehensive judgments using text, layout and fixed logic simultaneously in continuously scanned images. This helps to enhance the consistency of recognition of complex document boundaries and improve the flexibility of rule adjustment and business adaptability.
[0097] In some embodiments, the natural language-driven batch document scanning document segmentation and volume assembly method further includes: after semantic parsing the natural language description, determining whether segmentation judgment rules have been successfully generated; when the judgment result is that generation has not been successful, calculating the visual layout similarity of adjacent page images in the continuous scan image stream using a large model; when the visual layout similarity is less than a preset similarity threshold, determining the next page in the corresponding adjacent page image as the segmentation boundary.
[0098] In its implementation, the system first verifies the validity of the parsing results after semantic parsing to determine whether component segmentation rules have been successfully generated. The specific verification methods are as follows: It checks whether at least one executable component segmentation trigger condition has been successfully extracted from the natural language description; it checks whether the extracted conditions are complete, i.e., whether they possess the necessary elements for judgment, such as the object, location, or attributes; it checks whether there are logical conflicts between the conditions; and it checks whether the extracted rules can be compiled into a multimodal feature matching rule tree. If no executable inter-page boundary rules can be extracted from the natural language description, or if the extracted rules have missing conditions (e.g., only describing "the homepage has a marker" without specifying the marker type or location), object ambiguity (e.g., "title" not clearly indicating whether it is a large font title or a fixed area title), or logic that cannot be compiled into a judgment expression, then it is determined that component segmentation rules have not been successfully generated.
[0099] If the system fails to generate a component segmentation rule, it triggers an unsupervised clustering component segmentation mode as a fallback. In this case, the system extracts page image pairs from the continuously scanned image stream in adjacent page order and automatically compares the visual layout similarity between preceding and following pages using a large model. Specifically, each page image is input into the large model, which jointly represents the title area, body text area, header and footer, stamp area, table area, and white space distribution, outputting the corresponding visual layout feature vector. Page images in the continuously scanned image stream can be cached by the scanning terminal in a fixed page order, and the image format can be JPEG, PNG, or TIFF, etc. The preset similarity threshold is a pre-set judgment threshold used to measure whether the degree of layout difference between adjacent page images reaches the component segmentation boundary judgment standard. The threshold can be determined in the following ways: statistical analysis of the layout distribution data in historical archive samples, calculation of the mean and standard deviation of the similarity between adjacent pages, and setting an initial threshold based on the statistical distribution; users can manually set or adjust the threshold according to the layout characteristics of the current batch of archives before system startup or during operation; the system also supports threshold calibration using a small number of labeled samples in the early stages of operation, and subsequent adaptive adjustment based on feedback from actual component sorting results.
[0100] When the visual layout similarity of adjacent page images is lower than a preset similarity threshold, i.e., there is a significant break in the layout style between page N and page N+1 (e.g., the previous page has dense text layout, and the next page abruptly changes to a cover or table of contents layout with a large title), the system identifies page N+1 as the component boundary and writes this boundary into the formal boundary set for subsequent segmentation and volume assembly. Since the component boundary is carried by the next page, the attribution relationship before and after the boundary can be maintained in the image sequence, making it convenient to use the boundary page as the starting page for archiving and arrangement of new files. When natural language rules cannot be stably generated, this processing method instead uses page layout differences to identify the file switching position, thus enabling the component segmentation determination in continuous scanning scenarios to have rollback capability and feasibility.
[0101] In this embodiment, by triggering visual layout similarity calculation when semantic parsing fails, a compensation mechanism is formed between rule-driven and vision-driven approaches, enabling the system to continue outputting segmentation boundaries even when natural language descriptions are incomplete or non-standard. By quantifying the layout differences between adjacent page images into similarity values and comparing them with a threshold to determine the next page as the boundary, the continuous scanned image stream can complete stable segmentation without explicit rules, and provides directly usable boundary results for subsequent segmentation and volume division.
[0102] In some embodiments, visual layout similarity calculation is performed on adjacent page images in a continuously scanned image stream, including: extracting the layout structure features of each page image, the layout structure features including at least one of page margin distribution features and paragraph density features; and determining the visual layout similarity between adjacent page images based on the layout structure features of each page image.
[0103] Specifically, when determining the visual layout similarity between adjacent page images, the system vectorizes the layout structure features of two adjacent pages and calculates the distance or similarity value between the features. The distance value can be obtained through Euclidean distance, cosine distance, or weighted Manhattan distance, and the similarity value can be normalized to a value between zero and one based on the distance value. If adjacent pages are consistent in margin distribution or paragraph density, the corresponding visual layout similarity is high; if the two pages differ significantly in white space, text block distribution, or layout compactness, the visual layout similarity is low. The system outputs this similarity as the layout consistency judgment result of adjacent pages in a continuously scanned image stream, and it can further serve as an auxiliary basis for component boundary recognition.
[0104] This implementation method uses page structure information as its core, reflecting layout changes between adjacent pages without relying on fixed page numbers or physical identifiers. Therefore, it can directly use the differences in white space and text arrangement in scanned images to complete layout judgment. Since page margin distribution characteristics and paragraph density characteristics are visual information with strong layout stability, the similarity calculation results of adjacent page images can more closely resemble the actual document layout, providing stable input for subsequent boundary judgment.
[0105] This implementation method enables automatic comparison of adjacent pages based on differences in page layout structure in continuous scanning scenarios, reducing reliance on manual rules and external identifier pages, and improving adaptability to mixed scanning scenarios of documents with different layouts. Since the similarity results are directly derived from page structure features, it has good tolerance for changes in the first page style, missing page numbers, or slight fluctuations in the layout, thus improving the stability of component segmentation.
[0106] In some embodiments, the multimodal features also include text-assisted decision features; multimodal feature extraction for each page of images in a continuously scanned image stream further includes: performing optical character recognition on each page of images to obtain a plain text stream of each page of images; performing natural language processing on the plain text stream to extract text topic information and / or keyword information; and generating text-assisted decision features based on the text topic information and / or keyword information.
[0107] In practical implementation, the system first performs layout correction, noise reduction, and skew correction on each page of the continuously scanned image stream, and then calls the optical character recognition engine to output the plain text stream of the corresponding page. The optical character recognition engine can adopt a recognition model based on a combination of convolutional neural networks and recurrent neural networks, or an end-to-end text recognition model, to adapt to different types of document pages (such as pages of official documents, financial documents, legal documents, or medical documents). The recognized plain text stream can be stored as a text sequence page by page, retaining line order, paragraph order, and character confidence information, which is convenient for subsequent analysis based on positional features during natural language processing.
[0108] When performing natural language processing on plain text streams, the text can be segmented, part-of-speech tagging, named entity recognition, topic classification, and keyword extraction to obtain text topic information and / or keyword information. Text topic information can be obtained using topic labels or topic probability distributions output by a text classification model, while keyword information can be obtained using Term Frequency-Inverse Document Frequency (TF-IDF), TextRank, or attention weights. Subsequently, the system encodes topic labels, keyword sets and their weights, occurrence positions, and confidence scores into text auxiliary judgment features and associates them with corresponding images on each page.
[0109] During operation, text-assisted judgment features, visual marker features, and layout structure features together constitute a multimodal feature set, participating in subsequent component boundary determination. In addition to large-scale visual layout analysis, the system introduces a traditional OCR plus Natural Language Processing (NLP) pipeline. This allows the entire image to be converted into a plain text stream, and then component boundaries are determined by detecting thematic shifts or the frequency of specific keywords. For common homepage themes such as "contract," "report," and "approval opinions," the system can map theme tags to high-weight auxiliary features. For keywords such as "page X," "attachment," "stamp," and "ID number," the system can input them as boundary prompt features into the judgment model. When a thematic shift is detected between adjacent pages (e.g., a jump from the main text description to specific keywords like "resolution" or "contract attachment"), or when the frequency of preset keywords reaches a set condition, it serves as an auxiliary basis for component boundary determination, aiding the comprehensive judgment module in its decision-making. This approach allows the semantic information of the page text to directly participate in the comprehensive judgment, thereby improving the accuracy and stability of component boundary recognition in continuously scanned image streams.
[0110] Figure 2 This is another flowchart illustrating a natural language-driven batch document scanning document segmentation and assembly method provided for an exemplary embodiment of this application. (See diagram below.)Figure 2 As shown, this natural language-driven method for batch assembling and splitting scanned documents includes the following steps:
[0111] S201. Obtain the natural language description input by the user. The natural language description is used to characterize the basis for determining the boundaries of file subdivisions.
[0112] For example, the user enters a description of the parts in natural language form on the terminal interface (e.g., "The page number on the first page is 1" or "There are several titles on the first page with fonts that are significantly larger than the others").
[0113] S202. Perform natural language understanding on natural language descriptions through a large model, and extract component triggering conditions. Component triggering conditions include at least one of the following: color, position, category, or font size of the target object.
[0114] For example, natural language understanding is performed through a multimodal large model deployed within the edge device to extract component trigger conditions, such as "color = red", "position = top right corner", "object = stamp" or "font size = largest and centered".
[0115] S203. Compile the component triggering conditions into a multimodal feature matching rule tree, and use the multimodal feature matching rule tree as the component determination rule.
[0116] Accordingly, the above component triggering conditions are automatically compiled into the underlying multimodal feature matching rule tree and dynamically loaded into the system's component execution engine, without the need for manual intervention in the underlying code throughout the entire process.
[0117] S204. Obtain a continuous scan image stream, which is an image sequence obtained by continuously scanning a batch of files.
[0118] For example, operators directly put large quantities of offline paper documents into the scanner for continuous paper feeding and scanning, generating a continuous scan image sequence without physical separators, and inputting it into the edge computing device in real time.
[0119] S205. Perform multimodal feature extraction on each page of the image in the continuously scanned image stream.
[0120] In some embodiments, the multimodal features include at least two of the following: visual marker features based on object detection, which include the detection results of stamps, file number stamps, or preset marker patterns in each page image; layout structure features based on page layout analysis, which include the results of vectorizing the margin distribution and paragraph density of each page image; and key attribute features based on optical character recognition, which include at least one of the following in each page image: red header color threshold, page number sequence mutation information, title font size, title position, or keyword matching results in a preset area.
[0121] S206. The extracted multimodal features are comprehensively scored according to the component judgment rules.
[0122] In practical implementation, each judgment condition is first mapped to a corresponding weight according to the component segmentation judgment rules. The weight is used to reflect the contribution of conditions such as seal hit, abnormal title font size, abrupt changes in page number sequence, changes in page blank space, or keyword matching in component segmentation judgment. Then, each extracted multimodal feature is normalized to ensure that feature values of different dimensions are in the same numerical range. Finally, the features are multiplied according to the weight coefficients and summed to obtain the comprehensive score of the current page.
[0123] S207. When the overall score exceeds the preset threshold, the corresponding page in the continuously scanned image stream is determined as the component boundary.
[0124] Correspondingly, after the comprehensive score is calculated, the system compares the comprehensive score with a preset threshold. If the comprehensive score is greater than the preset threshold, the current page is determined to meet the segmentation boundary conditions, and the page is marked as a segmentation boundary; if the comprehensive score does not exceed the preset threshold, the continuous attribution relationship between the current page and the pages before and after it is maintained. By explicitly incorporating the contribution of multimodal features into the weight calculation, the system can form a stable judgment result under the combined effect of text features, layout features, and visual marker features, thereby ensuring the consistency and traceability of segmentation boundary identification with subsequent segmentation.
[0125] S208. Using the component boundary as the dividing point, the continuous scan image stream is divided into at least one image set, and each image set corresponds to one file.
[0126] S209. Perform intra-volume order verification on the images in each image set. Intra-volume order verification includes: verifying whether the arrangement order of the images in each image set is correct based on the page number information of the images in each image set.
[0127] If so, execute S210;
[0128] If not, proceed with S211.
[0129] S210. Combine the image sets into a structured electronic archive according to the order of the archives.
[0130] S211. Reorder the images in the image set according to the page number information, and combine the reordered image sets into a structured electronic archive.
[0131] In summary, this application has at least the following advantages:
[0132] First, by acquiring the natural language description input by the user and performing semantic parsing, the system automatically generates part sorting rules. This allows end users to flexibly customize part sorting rules without relying on technical personnel to write code, significantly reducing the configuration threshold and maintenance cost of part sorting rules. At the same time, it eliminates the dependence on physical partitions and removes the intrusion of manual page insertion and rejection processes into the scanning workflow.
[0133] Second, by extracting multimodal features from each page of the continuously scanned image stream and comprehensively judging the extracted multimodal features according to the component division judgment rules, the corresponding page is determined as the component boundary when the comprehensive judgment result meets the predetermined conditions. This can fully integrate the visual marker features, layout structure features and key attribute features of the archival image, and realize the parallel characterization of page differences from multiple dimensions. Compared with the existing single color comparison or fixed coordinate detection scheme, this effectively improves the accuracy of component boundary judgment.
[0134] Third, by extracting and fusing multimodal features in parallel, we can avoid the failure of single features in scenarios such as missing seals, varied layouts, or blurred images and text, which helps to improve the adaptability of component boundary determination to different archive formats. At the same time, compared with the existing hard-coded rule scheme, the component rules are no longer fixed as underlying code. When faced with different archive types or changes in archiving requirements, we only need to update the natural language description to complete the rule adjustment, which further enhances the system's adaptability to different archive formats.
[0135] Fourth, by segmenting the continuous scanned image stream according to the segmentation boundary, and performing intra-volume sequence verification and virtual combination on the segmented image set, structured electronic archives are output. This ensures that the segmented archive boundary and intra-volume page order are synchronized and consistent, realizing the fully automated segmentation and assembly of the continuous image stream into structured electronic archives, effectively reducing the amount of manual review caused by page order disorder in subsequent archiving management.
[0136] Fifth, by setting up fault-tolerant alternatives for rule configuration (manual rule combination intervention), alternatives for rule generation (unsupervised clustering mode), and alternatives for feature extraction (traditional OCR+NLP pipeline), a fallback guarantee is provided when natural language descriptions are not accurate enough, users cannot provide accurate descriptions, or visual layout analysis effects are limited. This forms a multi-level, multi-granular component judgment system, further improving the system's robustness and adaptability to different application scenarios.
[0137] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.
[0138] Figure 3This is a schematic diagram of a natural language-driven batch file scanning and assembly device provided as an exemplary embodiment of this application. Figure 3 As shown, the natural language-driven batch document scanning document segmentation and assembly device 30 includes a segmentation judgment rule generation module 31, an image acquisition module 32, a comprehensive judgment module 33, a boundary determination module 34, and an output module 35, wherein:
[0139] The component division determination rule generation module 31 is used to obtain the natural language description input by the user, and to perform semantic parsing on the natural language description to obtain the component division determination rule. The natural language description is used to characterize the determination basis of the component division boundary of the archive.
[0140] Image acquisition module 32 is used to acquire a continuous scan image stream, which is an image sequence obtained by continuously scanning a batch of files;
[0141] The comprehensive judgment module 33 is used to extract multimodal features from each page of images in the continuous scan image stream, and to make a comprehensive judgment on the extracted multimodal features according to the component judgment rules;
[0142] The boundary determination module 34 is used to determine the corresponding page in the continuous scan image stream as the component boundary when the comprehensive judgment result meets the predetermined conditions;
[0143] Output module 35 is used to segment and assemble the continuous scanned image stream according to the component boundaries, and output structured electronic archives.
[0144] In one possible implementation, the component segmentation rule generation module 31 can be specifically used to: input natural language description into a large model, perform natural language understanding on the natural language description through the large model, extract component segmentation triggering conditions, the component segmentation triggering conditions include at least one of the target object's color, position, category, or font size; compile the component segmentation triggering conditions into a multimodal feature matching rule tree, and use the multimodal feature matching rule tree as the component segmentation rule.
[0145] In one possible embodiment, the multimodal features include at least two of the following: visual marker features based on object detection, which include the detection results of stamps, file number stamps, or preset marker patterns in each page image; layout structure features based on page layout analysis, which include the results of vectorizing the margin distribution and paragraph density of each page image; and key attribute features based on optical character recognition, which include at least one of the following in each page image: red header color threshold, page number sequence mutation information, title font size, title position, or keyword matching results in a preset area.
[0146] In one possible embodiment, the comprehensive judgment module 33 can be specifically used to: perform weighted summation of multimodal features according to the weights of each judgment condition in the component judgment rule to obtain a comprehensive score; the comprehensive judgment result meets predetermined conditions, including: the comprehensive score exceeds a preset threshold.
[0147] In one possible embodiment, the comprehensive determination module 33 can also be used to: perform binarization determination on each feature in the multimodal features to obtain the determination result of each feature; perform logical combination operation on each determination result according to the logical combination conditions in the component determination rules to obtain the comprehensive determination result; the comprehensive determination result satisfies predetermined conditions, including: the comprehensive determination result is true.
[0148] In one possible embodiment, the output module 35 can be specifically used to: divide the continuous scanned image stream into at least one image set, with the segmentation boundary as the dividing point, and each image set corresponds to a file; perform intra-volume order verification on the images in each image set, the intra-volume order verification including: verifying whether the arrangement order of the images in each image set is correct according to the page number information of the images in each image set; when the verification result is correct, combining each image set into a structured electronic file according to the arrangement order of the file.
[0149] In one possible embodiment, the output module 35 can also be used to: when the image arrangement order is found to be incorrect, reorder the images in the image set according to the page number information, and combine the reordered image sets into a structured electronic archive.
[0150] In one possible embodiment, the component division determination rule generation module 31 can also be used to: obtain rule combination information input by the user on the preset configuration page, the rule combination information including at least one of optical character recognition result extraction rules, regular expression matching rules, and built-in fixed rules, the built-in fixed rules including specified area color recognition rules and / or fixed page number span rules; generate supplementary determination rules according to the rule combination information; the comprehensive determination module 33 can also be used to: perform comprehensive determination on the extracted multimodal features according to the component division determination rules and supplementary determination rules.
[0151] In one possible embodiment, the component division determination rule generation module 31 can also be used to: determine whether the component division determination rule is successfully generated after semantic parsing of the natural language description; when the determination result is that the rule is not successfully generated, calculate the visual layout similarity of adjacent page images in the continuous scan image stream using a large model; the boundary determination module 34 can be specifically used to: determine the next page in the corresponding adjacent page image as the component division boundary when the visual layout similarity is less than a preset similarity threshold.
[0152] In one possible embodiment, the boundary determination module 34 can also be used to: extract the layout structure features of each page image, the layout structure features including at least one of page margin distribution features and paragraph density features; and determine the visual layout similarity between adjacent page images based on the layout structure features of each page image.
[0153] In one possible embodiment, the multimodal features further include text-assisted determination features; the comprehensive determination module 33 can also be used to: perform optical character recognition on each page of images to obtain a plain text stream of each page of images; perform natural language processing on the plain text stream to extract text topic information and / or keyword information; and generate text-assisted determination features based on the text topic information and / or keyword information.
[0154] The batch file scanning and assembly device for natural language driven by the present application embodiment can execute the technical solution shown in the above embodiment of the batch file scanning and assembly method for natural language driven by the present application. Its implementation principle and beneficial effects are similar, and will not be repeated here.
[0155] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.
[0156] It should be further noted that although the steps in the flowchart are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowchart may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0157] It should be noted that the above-described device embodiments are merely illustrative, and the device of this application can be implemented in other ways. Furthermore, it should be understood that the division of the various modules in the above device is only a logical functional division; in actual implementation, they can be fully or partially integrated into a single physical entity, or they can be physically separated. These modules can all be implemented in software via processing element calls; they can all be implemented in hardware; or some modules can be implemented by processing element calls to software, while others are implemented in hardware. For example, the comprehensive determination module can be a separately established processing element, or it can be integrated into a chip in the above device. Alternatively, it can be stored as program code in the memory of the above device, and its function can be called and executed by a processing element of the above device. The implementation of other modules is similar. In addition, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element here can be an integrated circuit with signal processing capabilities. During implementation, each step of the above method or each of the above modules can be completed through integrated logic circuits in the hardware of the processor element or through software instructions.
[0158] For example, these modules can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more Digital Signal Processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs). As another example, when a module is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Furthermore, these modules can be integrated together as a System-On-a-Chip (SOC).
[0159] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., Digital Video Discs, DVDs), or semiconductor media (e.g., solid-state disks (SSDs)).
[0160] Figure 4 A schematic diagram of the structure of an edge device provided for an exemplary embodiment of this application. For example... Figure 4 As shown, the edge device 40 in this embodiment includes:
[0161] At least one processing component 41; and a storage component 42 communicatively connected to the at least one processing component;
[0162] The storage component 42 stores instructions that can be executed by at least one processing component 41 to cause the edge device to perform the method as described in any of the above embodiments.
[0163] In some embodiments, the edge device is an edge smart box, deployed locally by the user, and has independent heterogeneous computing power. Multimodal large models and computer vision algorithms are deployed on the edge device. The processing component 41 includes a central processing unit (CPU) and a dedicated neural network processing unit (NPU) or vision processing unit (VPU). The CPU is used to undertake system scheduling, logic control and data management tasks, while the NPU or VPU is used to accelerate the inference operation of multimodal large models and the parallel processing of computer vision algorithms, so as to realize high-speed feature extraction and real-time judgment of continuous scanning image streams.
[0164] Alternatively, the storage component 42 can be either standalone or integrated with the processing component 41.
[0165] Storage component 42 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage device.
[0166] The processing component 41 can be one or more of the following: CPU, Graphics Processing Unit (GPU), NPU, VPU, Digital Signal Processor (DSP), Field Programmable Gate Array (FPGA), or Application Specific Integrated Circuit (ASIC). Specifically, in implementing the method described in the foregoing method embodiments for batch file scanning and assembly for natural language driven processing, the edge device can be, for example, an electronic device with processing capabilities such as a server.
[0167] Optionally, the edge device may also include a communication interface 43. In a specific implementation, if the communication interface 43, storage component 42, and processing component 41 are implemented independently, they can be interconnected via a bus to complete communication. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc., but this does not imply that there is only one bus or one type of bus.
[0168] Optionally, in a specific implementation, if the communication interface 43, the storage component 42, and the processing component 41 are integrated on a single chip, then the communication interface 43, the storage component 42, and the processing component 41 can communicate through an internal interface.
[0169] This application also provides a natural language-driven batch document scanning document splitting and volume assembly system, including:
[0170] Scanning equipment used to continuously scan batches of documents, generating a continuous stream of scanned images;
[0171] The aforementioned edge device is communicatively connected to the scanning device;
[0172] Output devices are used to output structured electronic archives.
[0173] Scanning devices can continuously output image data of batches of archives, avoiding the efficiency loss caused by pausing scanning one document at a time. After the edge device is connected to the scanning device, it can directly receive the continuous scan image stream and segment and assemble the continuous scan image stream to obtain structured electronic archives. This makes image acquisition and archive organization form a continuous processing link, thereby reducing manual page insertion, page rejection and repeated review. After the edge device generates structured electronic archives, they are output through the output device, which facilitates archiving, retrieval and utilization, thereby improving the adaptability and archiving accuracy in mixed scanning scenarios. Therefore, it is more suitable for batch electronic archiving applications of various types of archives.
[0174] This application also provides a computer program product, including a computer program, which, when executed, implements the method steps as described in the above method embodiments. The specific implementation and technical effects are similar and will not be repeated here.
[0175] This application also provides a computer-readable storage medium storing computer-executable instructions. When the computer-executable instructions are executed, they are used to implement the method steps as described in the above method embodiments. The specific implementation methods and technical effects are similar and will not be repeated here.
[0176] The aforementioned computer-readable storage media can be implemented from any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0177] An exemplary readable storage medium is coupled to a processing component, enabling the processing component to read information from and write information to the readable storage medium. Alternatively, the readable storage medium can be an integral part of the processing component. The processing component and the readable storage medium can reside within an application-specific integrated circuit (ASIC). Alternatively, the processing component and the readable storage medium can exist as discrete components in a batch file scanning and reloading device for natural language-driven applications.
[0178] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0179] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0180] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0181] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0182] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0183] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope.
Claims
1. A method for batch assembling and splitting scanned archival documents using natural language-driven techniques, characterized in that: include: Obtain the natural language description input by the user, and perform semantic parsing on the natural language description to obtain the component division judgment rule. The natural language description is used to characterize the judgment basis of the component division boundary of the archive. Acquire a continuous scan image stream, wherein the continuous scan image stream is an image sequence obtained by continuously scanning a batch of files; Multimodal features are extracted from each page of the continuously scanned image stream, and the extracted multimodal features are comprehensively judged according to the component determination rules. When the comprehensive judgment result meets the predetermined conditions, the corresponding page in the continuous scan image stream is determined as the component boundary; The continuous scanned image stream is segmented and assembled according to the segmentation boundaries to obtain structured electronic archives.
2. The method for batch assembling and splitting scanned documents driven by natural language according to claim 1, characterized in that, The semantic parsing of the natural language description to obtain the component determination rules includes: The natural language description is input into a large model, and the large model performs natural language understanding on the natural language description to extract component triggering conditions. The component triggering conditions include at least one of the target object's color, position, category, or font size. The component segmentation triggering conditions are compiled into a multimodal feature matching rule tree, and the multimodal feature matching rule tree is used as the component segmentation determination rule.
3. The method for batch assembling and splitting scanned documents driven by natural language according to claim 1, characterized in that, The multimodal features include at least two of the following: Visual marker features based on target detection, the visual marker features including the detection results of stamps, file number stamps or preset marker patterns in each page image; The layout structure features based on page layout analysis include the results of vectorizing the margin distribution and paragraph density of each page image. Based on key attribute features of optical character recognition, the key attribute features include at least one of the following in each page image: red header color threshold, page number sequence mutation information, title font size, title position, or keyword matching results in a preset area.
4. The natural language-driven batch document scanning document segmentation and volume assembly method according to any one of claims 1 to 3, characterized in that, The step of comprehensively judging the extracted multimodal features according to the component judgment rules includes: Based on the weights of each judgment condition in the component division judgment rule, the multimodal features are weighted and summed to obtain a comprehensive score; The comprehensive judgment result meets the predetermined conditions, including: the comprehensive score exceeds a preset threshold.
5. The natural language-driven batch document scanning document segmentation and volume assembly method according to any one of claims 1 to 3, characterized in that, The step of comprehensively judging the extracted multimodal features according to the component judgment rule includes: Each feature in the multimodal features is binarized and determined to obtain the determination result of each feature; Based on the logical combination conditions in the component determination rules, logical combination operations are performed on each determination result to obtain a comprehensive determination result. The comprehensive judgment result meets the predetermined conditions, including: the comprehensive judgment result is true.
6. The natural language-driven batch document scanning document segmentation and volume assembly method according to any one of claims 1 to 3, characterized in that, The step of segmenting and assembling the continuous scanned image stream according to the component boundaries to obtain structured electronic archives includes: Using the component boundary as the dividing point, the continuous scan image stream is divided into at least one image set, and each image set corresponds to one file; The images in each of the aforementioned image sets are subjected to intra-volume order verification, which includes: verifying whether the arrangement order of the images in each of the aforementioned image sets is correct based on the page number information of the images in each of the aforementioned image sets; When the verification result is correct, the image sets are combined into a structured electronic archive according to the order of the archives.
7. The method for batch assembling and splitting scanned documents driven by natural language according to claim 6, characterized in that, Also includes: When it is found that the arrangement order of the images is incorrect, the images in the image set are reordered according to the page number information, and the reordered image sets are combined into the structured electronic archive.
8. The natural language-driven batch document scanning document segmentation and volume assembly method according to any one of claims 1 to 3, characterized in that, Also includes: Obtain rule combination information input by the user on the preset configuration page. The rule combination information includes at least one of optical character recognition result extraction rules, regular expression matching rules, and built-in fixed rules. The built-in fixed rules include specified area color recognition rules and / or fixed page number span rules. Based on the rule combination information, supplementary judgment rules are generated; The step of comprehensively judging the extracted multimodal features according to the component judgment rule includes: Based on the component determination rules and the supplementary determination rules, the extracted multimodal features are comprehensively determined.
9. The natural language-driven batch document scanning document segmentation and volume assembly method according to any one of claims 1 to 3, characterized in that, Also includes: After semantic parsing the natural language description, it is determined whether the component determination rule has been successfully generated. When the judgment result is that the generation was unsuccessful, the visual layout similarity of adjacent page images in the continuous scan image stream is calculated using a large model. When the visual layout similarity is less than a preset similarity threshold, the next page in the corresponding adjacent page image is determined as the component boundary.
10. The method for batch assembling and splitting scanned documents driven by natural language according to claim 9, characterized in that, The calculation of visual layout similarity for adjacent page images in the continuous scan image stream includes: Extract the layout structure features of each page image, wherein the layout structure features include at least one of page margin distribution features and paragraph density features; Based on the layout structure features of each page image, the visual layout similarity between adjacent page images is determined.
11. The natural language-driven batch document scanning document segmentation and volume assembly method according to any one of claims 1 to 3, characterized in that, The multimodal features also include text-assisted judgment features; the extraction of multimodal features from each page of images in the continuously scanned image stream further includes: Optical character recognition is performed on each page of the image to obtain a plain text stream of each page of the image; Natural language processing is performed on the plain text stream to extract text topic information and / or keyword information; The text auxiliary judgment features are generated based on the text topic information and / or the keyword information.
12. A natural language-driven batch document scanning and assembling device, characterized in that, include: The component division determination rule generation module is used to obtain the natural language description input by the user, and to perform semantic parsing on the natural language description to obtain the component division determination rule. The natural language description is used to characterize the determination basis of the component division boundary of the archive. The image acquisition module is used to acquire a continuous scan image stream, which is an image sequence obtained by continuously scanning a batch of files; The comprehensive judgment module is used to extract multimodal features from each page of the image in the continuous scan image stream, and to make a comprehensive judgment on the extracted multimodal features according to the component judgment rules. The boundary determination module is used to determine the corresponding page in the continuous scan image stream as the component boundary when the comprehensive judgment result meets the predetermined conditions; The output module is used to segment and assemble the continuous scanned image stream according to the segmentation boundaries, and output structured electronic archives.
13. An edge device, characterized in that, include: A processing component, and a storage component communicatively connected to the processing component; The storage component is used to store computer-executed instructions; The processing component is configured to execute the computer execution instructions to implement the method as described in any one of claims 1 to 11.
14. A natural language-driven batch document scanning and document assembly system, characterized in that, include: Scanning equipment used to continuously scan batches of documents, generating a continuous stream of scanned images; The edge device as described in claim 13 is communicatively connected to the scanning device; Output device for outputting the structured electronic archive.
15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed, are used to implement the method as described in any one of claims 1 to 11.
16. A computer program product, characterized in that, include: A computer program that, when executed by a processing component, implements the method as described in any one of claims 1 to 11.
