Cross-document graph construction method and device based on equal amount of placeholder and mixed queue scheduling and electronic equipment

CN122529030BActive Publication Date: 2026-10-27AIDONG SUPER AI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610703198.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-05-21
Publication Date
2026-10-27
Estimated Expiration
2046-05-21

AI Technical Summary

Technical Problem

单一队列架构无法在实现文件级并行吞吐的同时,对特定组织维度的任务施加细粒度的串行控制,导致在处理同一组织的多个文档时极易出现实体元数据的并发写入冲突和数据不一致问题

Benefits of technology

本申请的一种基于等量占位与混合队列调度的跨文档图谱构建方法,针对传统统一队列调度方案存在的无法兼顾并行扩展与串行约束、以及图片定位与处理效率较低的技术缺陷,通过执行超文本标记语言表格标签及表格源图片标记的等量空格占位替换处理生成等量占位文本序列,解决了传统方案中非正文内容干扰导致图片位置定位偏差的问题。相较于传统直接删除标签或忽略标签影响的方式,等量占位处理能够在不改变文本全局长度的前提下,通过字符串偏移量准确确立图片在文档空间中的物理坐标,使得后续的上下文提取具备更高的位置保真度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122529030B_ABST
    Figure CN122529030B_ABST
Patent Text Reader

Abstract

The application provides a cross-document graph construction method and device based on equal-amount placeholder and mixed queue scheduling and electronic equipment. The body text and picture marks contained in each to-be-processed original document are extracted, equal-amount placeholder text sequences are generated according to the body text and the picture marks, and then picture position coordinate lists representing the ordered distribution state of the pictures in the document space are constructed according to the equal-amount placeholder text sequences. Whether the adjacent two picture marks in the picture position coordinate list satisfy the pure blank condition is judged to generate a picture grouping semantic carrier composed of each picture mark and the corresponding grouping context text. Based on the organization identifier corresponding to the to-be-processed original document, the parallel extraction relationship between different to-be-processed original documents in the task execution stage is analyzed to establish a mixed queue routing logic, and then a global shared parallel queue and an organization independent serial queue are determined to generate a cross-document graph according to the picture grouping semantic carrier.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of document intelligent processing technology, and more specifically, to a method, apparatus, and electronic device for cross-document graph construction based on equal placeholders and hybrid queue scheduling. Background Technology

[0002] In modern enterprise knowledge management systems, transforming massive amounts of raw documents into searchable and analyzable structured knowledge graphs is a core component of building the enterprise's "brain." This transformation process typically involves multiple complex computational stages, including parsing, preprocessing, chunking, entity extraction within documents, and cross-document graph fusion. With the dramatic increase in document volume, efficiently coordinating the parallel scalability of each computational stage with data consistency constraints has become a key requirement for knowledge graph construction technologies.

[0003] Existing distributed document processing solutions generally employ a single global message queue architecture. This approach first submits all processing tasks for the original documents to be processed to a unified global task queue; then, distributed processing nodes compete to obtain tasks from this unified queue and execute business logic; finally, each processing node directly writes its execution results into the database to complete data aggregation.

[0004] However, this traditional single-queue control scheme has significant technical drawbacks. Because document processing involves stages such as cross-document graph fusion, which involve updating shared knowledge graphs within the same organization, strict serial constraints are required to avoid concurrency race conditions. The single-queue architecture cannot achieve file-level parallel throughput while applying fine-grained serial control to tasks at the organization level. This leads to a high risk of concurrent write conflicts and data inconsistencies in entity metadata when processing multiple documents from the same organization. Furthermore, in the visual language processing stage involving document images, traditional solutions often ignore image location context, performing redundant visual model calls on numerous meaningless decorative images, resulting in a severe waste of computational resources and low processing efficiency. Summary of the Invention

[0005] This application provides a method, apparatus, and electronic device for cross-document graph construction based on equal placeholders and hybrid queue scheduling, so as to at least alleviate the above-mentioned technical problems.

[0006] A method for constructing a cross-document graph based on equal placeholders and hybrid queue scheduling, comprising: Step 1: Extract the main text and image tags contained in each original document to be processed, generate an equal amount of placeholder text sequence based on the main text and image tags, and then construct a list of image position coordinates representing the ordered distribution state of images in the document space based on the equal amount of placeholder text sequence. Step 2: Determine whether the pure blank condition is met between two adjacent image markers in the image position coordinate list, so as to generate an image group semantic carrier composed of each image marker and its corresponding group context text; Step 3: Based on the organization identifier corresponding to the original document to be processed, analyze the parallel extraction relationship between different original documents to be processed during the task execution stage to establish a hybrid queue routing logic and then determine the global shared parallel queue and the organization-independent serial queue to generate a cross-document graph based on the image grouping semantic carrier.

[0007] A cross-document graph construction apparatus based on equal placeholders and hybrid queue scheduling, comprising: The first program unit is used to extract the main text and image tags contained in each original document to be processed, generate an equal amount of placeholder text sequence based on the main text and image tags, and then construct a list of image position coordinates representing the ordered distribution state of images in the document space based on the equal amount of placeholder text sequence. The second program unit is used to determine whether the pure blank condition is met between two adjacent image markers in the image position coordinate list, so as to generate an image group semantic carrier composed of each image marker and its corresponding group context text; The third program unit is used to establish a hybrid queue routing logic based on the organization identifier corresponding to the original document to be processed, by analyzing the parallel extraction relationship between different original documents to be processed during the task execution phase, and then determine the global shared parallel queue and the organization-independent serial queue to generate a cross-document graph according to the image grouping semantic carrier.

[0008] An electronic device comprising a processor and a memory; The memory is used to store computer programs; When the processor executes the computer program stored in the memory, it implements the cross-document graph construction method based on equal space and hybrid queue scheduling as described in any one of the claims of this application.

[0009] The technical advantages of the technical solution provided in this application are: This application presents a cross-document graph construction method based on equal placeholders and hybrid queue scheduling. Addressing the shortcomings of traditional unified queue scheduling schemes, such as their inability to balance parallel expansion and serial constraints, and low efficiency in image localization and processing, this method generates an equal placeholder text sequence by performing equal space placeholder replacement processing on Hypertext Markup Language table tags and table source image tags. This solves the problem of image positioning deviation caused by non-text content interference in traditional schemes. Compared to the traditional method of directly deleting tags or ignoring tag influence, equal placeholder processing can accurately establish the physical coordinates of images in document space through string offsets without changing the global text length, resulting in higher positional fidelity for subsequent context extraction.

[0010] This approach, which performs spacing thresholding and continuous blank sequence separation based on a list of image location coordinates, overcomes the technical bottleneck of redundant computational resource overhead caused by decorative images, as mentioned in the background section. By identifying groups of decorative images that meet the pure blank condition and marking them as skipped analysis attributes, this application effectively avoids calling the visual model for meaningless images such as dividing lines and watermarks. Combined with recursive binary constraint verification based on the maximum text spacing, it ensures that each group of content-related images entering the visual model has a tight semantic context and is within the model's processing capabilities. Compared to the traditional method of calling images one by one, the accuracy of image semantic understanding and the overall power consumption of the system are significantly optimized.

[0011] By constructing a hybrid routing logic that combines a globally shared parallel queue with an organization-specific serial queue, the concurrent write conflicts and data inconsistencies that commonly occur in traditional cross-document graph fusion schemes are resolved. The globally shared parallel queue supports multi-process competitive consumption, achieving high-throughput parallel performance in the preceding document parsing and extraction stages; while the independently created serial queues based on organization identifiers ensure that graph update tasks within the same organization are executed according to preset timing constraints, eliminating race conditions. This hybrid scheduling mechanism allows the system to adaptively adjust the concurrency model according to task characteristics at different computation stages. Compared to traditional single scheduling strategies, the security and system scalability of cross-document knowledge fusion are significantly improved.

[0012] Finally, by combining intermediate state snapshot sets with an automatic chain triggering mechanism, this application constructs a closed-loop automated processing flow from data acquisition to result generation, solving the problems of traditional solutions lacking intermediate state persistence and not supporting breakpoint recovery. By triggering the next stage with identifier credentials and loading the output of the previous stage from the cache, the limitation of transmitting large amounts of data in the message body is avoided. At the same time, it supports resuming execution from any completed stage when the task is interrupted. Compared with the traditional mode of processing from scratch, it has higher computing resource utilization and system robustness in large-scale document intelligent processing scenarios. Attached Figure Description

[0013] Figure 1 This is a flowchart illustrating a cross-document graph construction method based on equal placeholders and hybrid queue scheduling, according to an embodiment of this application.

[0014] Figure 2 This is a schematic diagram of a cross-document graph construction device based on equal placeholders and hybrid queue scheduling, according to an embodiment of this application.

[0015] Figure 3 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Detailed Implementation

[0016] like Figure 1 As shown, this embodiment of the present application provides a method for constructing a cross-document graph based on equal placeholders and hybrid queue scheduling, including: Step 1: Extract the main text and image tags contained in each original document to be processed, generate an equal amount of placeholder text sequence based on the main text and image tags, and then construct a list of image position coordinates representing the ordered distribution state of images in the document space based on the equal amount of placeholder text sequence. Step 2: Determine whether the pure blank condition is met between two adjacent image markers in the image position coordinate list, so as to generate an image group semantic carrier composed of each image marker and its corresponding group context text; Step 3: Based on the organization identifier corresponding to the original document to be processed, analyze the parallel extraction relationship between different original documents to be processed during the task execution stage to establish a hybrid queue routing logic and then determine the global shared parallel queue and the organization-independent serial queue to generate a cross-document graph based on the image grouping semantic carrier.

[0017] Optionally, in step 1, an equal-quantity placeholder text sequence is generated based on the main text and the image markers, and then an image position coordinate list representing the ordered distribution of images in the document space is constructed based on the equal-quantity placeholder text sequence, including: Determine the Hypertext Markup Language table tags in the main text and the table source image tags in the image tags to generate an equal amount of placeholder text sequence stored in memory; Based on the equal-quantity placeholder text sequence, the offset of each image marker in the equal-quantity placeholder text sequence is determined, and then a list of image position coordinates representing the ordered distribution state of images in the document space is constructed.

[0018] Preferably, the specific implementation process of step 1 is as follows: First, obtain the original document to be processed. The original document to be processed is the original format document in the enterprise knowledge management system to be transformed into a structured knowledge graph. Perform full text parsing processing on the original document to be processed to extract the main text and the image tags contained in the main text. The main text is the continuous text content in the original document to be processed that carries core business information. The image tags are exclusive markers in the main text used to identify the insertion position of the image and associate it with the corresponding image storage address. Each image tag corresponds one-to-one with an image contained in the original document to be processed. The extracted main text and the image tags together constitute the basic processing objects for subsequent equal-space placeholder replacement processing and string offset-based search and location processing.

[0019] Preferably, in the specific implementation of step 1, a full tag traversal and recognition process is performed on the extracted text to locate each Hypertext Markup Language (HTML) table tag; simultaneously, image attribute recognition processing is performed on each extracted image tag to locate each table source image tag. Here, the HTML table tag is a single tag in the set of tags used to define the table structure and carry the table content in the text; the table source image tag is the image tag of the corresponding table screenshot image within the document. Both the HTML table tags and the table source image tags alter the character distribution of the text, interfering with subsequent image tag offset calculations. Through traversal recognition and location processing, a complete processing target is clearly defined for the subsequent equal-space placeholder replacement processing, avoiding negative impacts from non-text content on subsequent position calculations.

[0020] Preferably, in one scenario, step 1 involves performing an equal-quantity space placeholder replacement process on the located Hypertext Markup Language (HTML) table tags and table source image tags to generate an equal-quantity placeholder text sequence stored in memory. The specific execution process of the equal-quantity space placeholder replacement process is as follows: For each located HTML table tag, the total number of characters contained in the HTML table tag is counted, and a consecutive space character set exactly equal to the total number of characters is generated. This generated consecutive space character set replaces the corresponding HTML table tag in the main text. For each located table source image tag, the total number of characters contained in the table source image tag is counted, and a consecutive space character set exactly equal to the total number of characters is generated. This generated consecutive space character set replaces the corresponding table source image tag in the main text. After the replacement is completed, the total global character length of the main text is exactly the same as the total global character length of the main text before the replacement, without any increase or decrease in character length. Simultaneously, the interference of non-main text content on the subsequent image tag offset calculation is eliminated. This processing method differs from the traditional method of directly deleting tags, avoiding the problem of subsequent image tag offset calculation deviations caused by changes in text length. Here, "equal placeholder text sequence" is explicitly used as the sole technical term for the replacement result, and it is used throughout subsequent length consistency verification and string offset-based search and location processing.

[0021] Preferably, in the specific implementation of step 1, a length consistency check is performed on the generated equal-quantity placeholder text sequence to confirm that the total global character length of the equal-quantity placeholder text sequence is completely consistent with the total global character length of the original text. The specific execution process of the length consistency check is as follows: the total global character count of the equal-quantity placeholder text sequence and the total global character count of the original text are counted respectively, and the two sets of statistical results are compared to see if they are completely equal; if a difference is detected between the two sets of statistical results, the equal-quantity space placeholder replacement process is re-executed until the two sets of statistical results are completely consistent; if the comparison confirms that the two sets of statistical results are completely consistent, the valid equal-quantity placeholder text sequence is determined as the reference text carrier for subsequent image marker offset calculation. Through the length consistency check, the problem of image position positioning error caused by text length changes due to replacement operation errors is fundamentally avoided, providing a reliable benchmark for the subsequent construction of the image position coordinate list and realizing the stability of the entire processing flow.

[0022] Preferably, in one scenario, when implementing step 1, based on the validated equal-quantity placeholder text sequence, a string offset-based search and location process is performed on each extracted image marker to determine the start and end offsets of each image marker in the equal-quantity placeholder text sequence. The specific execution process of the string offset-based search and location process is as follows: according to the order in which the image markers appear in the main text, each image marker is sequentially used as a full-match search target. A forward full-match string search is performed in the equal-quantity placeholder text sequence to locate the position index corresponding to the first character of the image marker in the equal-quantity placeholder text sequence. This position index is defined as the start offset of the image marker; simultaneously, the position index corresponding to the last character of the image marker in the equal-quantity placeholder text sequence is located, and this position index is defined as the end offset of the image marker. Since the total global character length of the equal-quantity placeholder text sequence is exactly the same as that of the main text, the obtained start and end offsets can accurately reflect the actual physical position of the image marker in the document space of the original document to be processed, and there will be no position misalignment problem.

[0023] Preferably, in the specific technical implementation of step 1, the starting and ending offsets corresponding to each image marker are arranged in an orderly manner according to the order in which the image markers appear in the equal-quantity placeholder text sequence, so as to construct an image position coordinate list representing the orderly distribution state of the images in the document space. Each element in the image position coordinate list has a unique correspondence with an image marker; each element contains the starting and ending offsets of the corresponding image marker; the order of the elements in the list is completely consistent with the order in which the image markers appear in the main text. The constructed image position coordinate list provides an accurate position benchmark for subsequent image clustering, adjacent image spacing calculation, and contextual text extraction processing, enabling subsequent processing to complete intelligent grouping and differentiated processing of images based on the real spatial position relationship of the images in the document space, avoiding the problems of low processing efficiency and waste of computing resources caused by ignoring the image position context in traditional solutions. Here, the uniqueness of the "image position coordinate list" as a position benchmark is emphasized to ensure that it forms a complete technical chain with the "starting offset" and "ending offset" mentioned above.

[0024] Preferably, in the specific implementation of step 1, the constructed list of image position coordinates is synchronously transmitted to the subsequent image grouping processing stage. Simultaneously, the verified, equal-quantity placeholder text sequence is synchronously cached in memory, providing a unified positional reference and reference text carrier for the calculation of adjacent image spacing and contextual text extraction in the subsequent image grouping processing stage. By transmitting a unified positional reference and reference text carrier, the subsequent image grouping processing stage can directly complete relevant calculations based on the unified positional reference, eliminating the need for repeated parsing and position calibration of the main text, reducing unnecessary redundant calculation overhead, and ensuring consistency of image position information throughout the entire process, avoiding positional information deviations that may occur in multiple processing stages.

[0025] Optionally, determining the Hypertext Markup Language table tags in the main text and the table source image tags in the image tags to generate an equal amount of placeholder text sequence stored in memory includes: By replacing the Hypertext Markup Language table tags and the table source image tags with an equal amount of space placeholders, an equal amount of placeholder text sequence is generated and stored in memory.

[0026] Preferably, the pre-input objects for the equal-space placeholder replacement processing are the main text extracted from the original document to be processed after full-text parsing, the image tags contained in the main text, the hypertext markup language table tags with completed boundary locking, and the table source image tags with completed attribute recognition. The original document to be processed is a business document in the enterprise knowledge management system to be transformed into a structured knowledge graph; the main text is the continuous text content in the original document to be processed that carries core business semantics, serving as the basic carrier for subsequent image location and context extraction; each image tag has a unique correspondence with an image in the original document to be processed, used to identify the insertion position of the image in the main text; the hypertext markup language table tags are complete tag units in the main text used to define the text table structure and carry table content; and the table source image tags are image tags for screenshots of tables within the corresponding document. Both the hypertext markup language table tags and the table source image tags are non-core text interference content that alters the character distribution of the main text, interfering with the subsequent offset calculation of image tags and context semantic extraction. By clearly defining the full input object's definition, source, and attributes, a clear and complete processing boundary is drawn for the equal space placeholder replacement process. This effectively avoids subsequent position calculation deviations caused by omissions or errors in processing, unlike the traditional approach that only performs fuzzy processing on some non-text content.

[0027] Preferably, for each Hypertext Markup Language (HTML) table tag within each HTML table tag, a complete tag boundary locking and nested structure decomposition process is performed to determine the complete character range of a single HTML table tag. The complete tag boundary locking process is implemented by constructing a tag matching stack: when traversing the character sequence of the main text, the start identifier of the HTML table tag is pushed onto the stack, and the corresponding end identifier is popped from the stack. When the stack is empty, the complete start and end positions of the HTML table tag are locked, forming a complete tag processing unit. For complex HTML table tags with multiple layers of nesting, the boundary range of each layer is decomposed and locked layer by layer, from the innermost child tag to the outermost parent tag, ensuring that there are no tag boundary truncations or omissions of nested content. Through this process, the complete character range actually occupied by each HTML table tag in the main text can be accurately locked, providing an accurate range basis for subsequent full-character coverage statistical processing and avoiding the replacement length deviation problem caused by tag boundary recognition errors in traditional solutions.

[0028] Preferably, for each Hypertext Markup Language (HTML) table tag that has completed boundary locking, a full-character coverage statistical processing is performed to obtain the total number of characters corresponding to that HTML table tag. The statistical scope of the full-character coverage statistical processing covers all characters within the complete boundary of the HTML table tag, including the tag start and end identifiers, tag name, attribute name, attribute value, symbols enclosing attribute values, all content of nested sub-tags, text content within the tag, spaces within the tag, newline characters, and all visible and invisible characters. The statistical dimension is a single-character count consistent with the encoding format of the main text, ensuring that the total number of characters obtained is exactly equal to the number of characters actually occupied by the HTML table tag in the main text. Through full-character coverage statistical processing, the baseline for the number of characters required for replacement can be accurately obtained, which differs from the traditional method of only counting the effective text content within the tag and ignoring formatting and control characters, thus fundamentally avoiding the problem of inconsistent character lengths before and after replacement.

[0029] Preferably, based on the total number of characters corresponding to a single Hypertext Markup Language (HTML) table tag, a series of consecutive single-byte space characters that are exactly equal to the total number of characters are generated, and in-situ full match replacement processing is performed on the corresponding HTML table tags in the main text to complete the equal-space-occupancy processing of a single HTML table tag. The execution rules for in-situ full match replacement are as follows: the interval from the complete start position to the complete end position of the HText Markup Language table tag in the main text is completely filled with generated consecutive single-byte space characters, without changing any characters outside the interval or moving any character positions in the text before or after the interval; the replacement execution order follows the order of the HText Markup Language table tags in the main text from back to front. For HText Markup Language table tags with nested structures, the replacement is performed layer by layer from the innermost child tag to the outermost parent tag. After each HText Markup Language table tag's in-situ full match replacement is completed, the character length of the replacement interval is checked step by step. Only after confirming that the character length of the replaced interval is completely consistent with the total number of characters in the HText Markup Language table tag will the in-situ full match replacement of the next HText Markup Language table tag be executed. This process ensures that each in-situ full match replacement does not change the global character length and character position correspondence of the main text. It eliminates the interference of Hypertext Markup Language table tags on the distribution of text characters and completely preserves the global position mapping relationship of all content in the main text, providing an unbiased benchmark for the subsequent offset calculation of image tags.

[0030] Preferably, multi-dimensional attribute recognition processing is performed on each image tag to filter out table source image tags and lock the complete character boundary of the table source image tag. The execution dimensions of multi-dimensional attribute recognition processing include: the aspect ratio features of the image corresponding to the image tag, the content texture features, the keyword matching results of the image file name, and the semantic features of the text surrounding the image tag in the main text. When the image corresponding to the image tag meets the aspect ratio threshold and texture features of table-type images, or when the image file name or surrounding text contains table-type semantic keywords, the image tag is determined to be a table source image tag. After completing the attribute recognition, referring to the boundary locking logic of Hypertext Markup Language table tags, the complete start and end positions of each table source image tag in the main text are locked to determine its complete character range. Through this processing, table-type image tags that interfere with subsequent image position calculations can be accurately filtered out, which is different from the traditional approach that only processes text tags and ignores the interference of table screenshot image tags, thus avoiding the influence of non-text content on position calculation.

[0031] Preferably, for each table source image tag that has completed boundary locking, a full-character coverage statistical processing is performed to obtain the total number of characters corresponding to that table source image tag. Then, based on this total number of characters, consecutive single-byte space characters of completely equal value are generated, and in-situ full-match replacement processing is performed on the corresponding table source image tag in the text to complete the equal-quantity placement processing of a single table source image tag. The statistical scope of the full-character coverage statistical processing covers all characters within the complete boundary of the table source image tag, including all characters including the tag's start and end markers, image resource addresses, attribute definition content, and format control characters, ensuring that the total number of characters obtained is completely consistent with the number of characters actually occupied by the table source image tag in the text. The in-situ full-match replacement processing follows the same single-step verification rules as the Hypertext Markup Language table tags. After completing the in-situ full-match replacement processing of each table source image tag, that is, verifying that the character length of the replacement interval is completely consistent with the total number of characters of the table source image tag, the in-situ full-match replacement processing of the next table source image tag is then performed. This process ensures that the in-situ full-match replacement of the source image markers in the table does not change the global character length and position mapping of the main text. It achieves equal and indiscriminate placement of text-based and image-based table content, avoiding interference from the two types of table content on the subsequent image positioning.

[0032] Preferably, after the in-situ full-match replacement of all Hypertext Markup Language table tags and all table source image tags is completed, a multi-dimensional consistency check is performed on the text to generate a valid placeholder text sequence. The multi-dimensional consistency check includes three levels of verification: the first level is global total character count verification, comparing the total number of global characters in the text after replacement with the total number of global characters in the text before replacement; the second level is paragraph-level segmentation verification, dividing the text into multiple paragraph units according to the natural paragraph structure of the text, and comparing the number of characters in each paragraph unit before and after replacement; the third level is key position verification, extracting the remaining image tags from each image tag except for the table source image tags, and comparing the starting position offsets of these image tags before and after replacement. Only after all three levels of verification pass is the text considered a valid placeholder text sequence. If any level of verification fails, a binary search method is used to locate the erroneous paragraph and replacement unit, and the corresponding content undergoes full character coverage statistical processing and in-situ full match replacement processing again until all verifications pass. Through multi-dimensional consistency verification, the hidden problem of global length conformance but local displacement misalignment that may occur during replacement operations can be completely avoided, ensuring that the positional mapping relationship between the placeholder text sequence and the main text is completely unbiased. This significantly improves the reliability of the positional reference compared to the simple processing method of traditional solutions that only perform global length verification.

[0033] Preferably, the verified equal-quantity placeholder text sequence is written into a designated address space in memory for solidification storage, thus completing the final generation of the equal-quantity placeholder text sequence stored in memory. During the memory solidification storage process, an association identifier is bound to the equal-quantity placeholder text sequence and uniquely associated with the original document to be processed. The association identifier includes the organization identifier of the organization to which it belongs, the knowledge base identifier of the knowledge base to which it belongs, and the unique file identifier of the original document to be processed. This ensures that the equal-quantity placeholder text sequence forms a unique binding relationship with the original document to be processed, the organization, and the knowledge base, ensuring that the corresponding base text can be accurately retrieved in subsequent image location, image grouping processing, and distributed queue scheduling stages, without document matching errors. At the same time, the use of memory-specified address space storage can significantly improve the execution efficiency of subsequent string search and location processing, reduce the performance overhead caused by disk read and write, adapt to the high throughput requirements of massive document distributed processing scenarios, and provide a low-latency, high-reliability base text carrier for subsequent end-to-end processing.

[0034] Preferably, for the equal-space placeholder processing of complex formatted original documents, a nested hierarchical fallback and encoding uniformity adaptation mechanism is designed to ensure the generation quality of equal-space placeholder text sequences in special scenarios. For complex Hypertext Markup Language (HML) table tags with nesting levels exceeding a preset threshold, a full decomposition is first performed according to the nesting level. Starting from the innermost child tag, full character coverage statistical processing, in-situ full match replacement processing, and single-step verification are performed layer by layer. After each layer is processed, the boundary range of the parent tag to which the layer belongs is verified to ensure that it has not shifted before the processing of the next layer is performed. For original documents with mixed encoding formats, the main text, HML table tags, and table source image tags are first uniformly converted to a consistent universal character encoding format. Then, boundary locking, full character coverage statistical processing, and in-situ full match replacement processing are performed to avoid character count errors caused by inconsistent encoding formats. By employing a nested hierarchical fallback and a unified encoding adaptation mechanism, the solution can cover the processing needs of various complex document formats in document processing scenarios, thereby improving the applicability and robustness of the solution and avoiding position calculation deviations that occur when processing special document formats.

[0035] Optionally, based on the equal-quantity placeholder text sequence, the offset of each image marker in the equal-quantity placeholder text sequence is determined, thereby constructing a list of image position coordinates representing the ordered distribution state of images in the document space, including: Based on the equal placeholder text sequence, each image marker is searched and located using string offsets to determine the start and end offsets of each image marker in the equal placeholder text sequence, thereby constructing a list of image position coordinates that characterize the ordered distribution of images in the document space.

[0036] Preferably, in the specific technical implementation of step 1, the pre-input objects for the string offset-based search and location processing are an equal-quantity placeholder text sequence stored in memory after completing the preceding multi-dimensional consistency verification process, and each image tag extracted from the original document to be processed. The equal-quantity placeholder text sequence has completed the equal-quantity space replacement of Hypertext Markup Language table tags and table source image tags. Its global total character length and the global position mapping relationship of each content are completely consistent with the main text of the original document to be processed, eliminating the interference of non-text content on the character position distribution and providing an unbiased reference text for the string offset-based search and location processing. Each image tag in the image tag has a unique correspondence with an image in the original document to be processed, and retains the original content and appearance order of the image tag in the main text, providing a clear matching target for the string offset-based search and location processing.

[0037] Preferably, in one scenario, when implementing step 1, before performing the string offset-based search and location processing, the equal-quantity placeholder text sequence and each image tag are preprocessed with encoding unification and format normalization to generate a standardized search baseline text and a standardized image tag set. Encoding unification converts the equal-quantity placeholder text sequence and each image tag into a consistent, universal character encoding format, eliminating character recognition deviations and string matching misalignments caused by mixing multiple encoding formats. Format normalization removes unnecessary escape characters and redundant format control characters introduced by document parsing from each image tag, retaining only the core identifier content of the image tag, ensuring that the standardized image tag is completely consistent with the image tag content retained in the equal-quantity placeholder text sequence. Simultaneously, invisible character normalization is performed on the equal-quantity placeholder text sequence, uniformly converting different types of newline characters and tabs into a standard format to avoid string matching failures due to differences in invisible character formats. This preprocessing step clears away format and encoding interference for the subsequent string offset-based search and location processing, effectively improving the success rate of string matching and the accuracy of location positioning.

[0038] Preferably, in the specific implementation of step 1, according to the order in which the image markers appear in the main text of the original document to be processed, a forward full-match string search process is performed on each standardized image marker in the standardized search reference text to determine the starting offset of the corresponding image marker. The forward full-match string search process starts from the first character position of the standardized search reference text and compares the character sequence of the standardized image marker with the continuous character sequence in the standardized search reference text character by character. When a continuous character sequence that completely matches all characters of the standardized image marker is found, the position index of the first character of that continuous character sequence in the standardized search reference text is defined as the starting offset of that image marker. During the search process, for cases where the same image marker appears multiple times in the standardized search reference text, a one-to-one match is performed according to the order in which the matching results appear, corresponding to the order in which the image markers appear in the main text, ensuring that the starting offset of each image marker accurately corresponds to its actual insertion position in the original document to be processed, and that no mismatch occurs.

[0039] Preferably, in one scenario, when implementing step 1, after determining the starting offset corresponding to a single image marker, an ending offset calculation is performed based on the total number of characters in the standardized image markers corresponding to that image marker to determine the ending offset corresponding to the image marker, and a single-step position consistency check is performed simultaneously. The calculation logic for the ending offset is as follows: taking the starting offset of the image marker as a reference, adding the total number of characters in the standardized image markers, and then subtracting the offset of one character, the ending offset corresponding to the image marker is obtained. This ending offset corresponds to the position index of the last character of the matched continuous character sequence in the standardized search reference text. After completing the ending offset calculation, a single-step position consistency check is performed to compare the character sequence within the interval from the starting offset to the ending offset with the character sequence of the corresponding standardized image marker to see if they are completely consistent. At the same time, it is checked whether the total number of characters in this interval is completely consistent with the total number of characters in the standardized image markers. If the check passes, the starting offset and ending offset of the image marker are locked. If the check fails, the forward full-match string search process is re-executed until the check passes. This step combines the calculation of the final offset with the single-step position consistency check to ensure that the start and end position ranges of each image mark are complete and accurate, and to prevent issues such as range truncation or mismatch in the number of characters.

[0040] Preferably, in the specific technical implementation of step 1, after locking the start and end offsets of each image marker, a full positional order verification and deduplication process is performed to generate an ordered set of image positions without repetition or misalignment. The execution logic of the full positional order verification is as follows: according to the order in which image markers appear in the main text, the start offsets of two adjacent image markers are compared to confirm that the start offset of the later image marker is greater than the end offset of the previous image marker, ensuring that the position intervals of all image markers do not overlap or intersect; for duplicate image markers appearing in the same position interval, only the unique marker that corresponds one-to-one with the image in the original document to be processed is retained to eliminate redundant data caused by duplicate matching; after completing the full positional order verification and deduplication process, according to the order in which image markers appear in the main text from front to back, the start and end offsets corresponding to all image markers are sorted in ascending order to generate an ordered set of image positions. This step ensures that the order in which the images are arranged is completely consistent with the actual order in which they appear in the original document to be processed. This provides a correct order basis for subsequent calculation of the distance between adjacent images and image clustering and grouping, and can effectively avoid grouping errors caused by disordered image order.

[0041] Preferably, in a scenario, when step 1 is specifically implemented, based on the generated ordered set of image positions, a coordinate list structure construction and association identifier binding process is performed to generate an image position coordinate list that represents the ordered distribution state of the images in the document space. The coordinate list is structured by constructing a corresponding structured coordinate unit for each element in the ordered set of image positions. Each structured coordinate unit contains three core fields: a unique image identifier corresponding to each image in the original document to be processed, the starting offset of the image marker, and the ending offset of the image marker. All structured coordinate units are arranged sequentially according to the order in which the images appear in the original document to be processed, forming the image position coordinate list. After the coordinate list is structured, it is bound to a unique association identifier corresponding to the original document to be processed. The association identifier includes the organization identifier of the organization, the knowledge base identifier of the knowledge base, and the unique file identifier of the original document to be processed, thus forming a unique binding relationship between the image position coordinate list and its original document and an equivalent placeholder text sequence. At the same time, the image position coordinate list is synchronously written to memory and a cache database. Memory is used to provide a low-latency access data source for subsequent image grouping processing, and the cache database is used to provide a status basis for breakpoint recovery after subsequent task interruption, thereby ensuring that the image position coordinate list can be accurately called in subsequent image grouping processing and breakpoint recovery.

[0042] Preferably, in the specific technical implementation of step 1, a segmented search and positioning and incremental verification mechanism is designed for long documents containing a large number of image tags to improve processing efficiency and positioning accuracy in long document scenarios. The segmented search and positioning process divides the standardized search benchmark text into multiple continuous text segments according to a preset paragraph length. Overlapping buffers are set at the beginning and end of each text segment, with the length of the buffers exceeding the maximum character length of a single image tag to avoid matching omissions caused by image tags crossing segments. For each text segment, a forward full-match string search is performed in parallel to obtain the image tag offset results within each segment. Then, based on the overlapping content between the buffers, the results across segments are merged and deduplicated. After merging the results, the incremental verification mechanism compares the positional order of the image tags segment by segment with the image insertion order of the original document to ensure that there are no order misalignments in long document scenarios. This mechanism differs from the traditional full-text serial search method, improving processing efficiency in long document scenarios while achieving positioning accuracy, and adapting to the business scenario requirements of processing massive amounts of long documents.

[0043] Optionally, step 2, determining whether a pure whitespace condition is satisfied between two adjacent image markers in the image position coordinate list, to generate an image group semantic carrier composed of each image marker and its corresponding group context text, includes: By detecting whether the text between adjacent image tags satisfies the pure white condition after removing newline characters, an initial image cluster is generated. This cluster is then separated into a decorative image group marked with a skip analysis attribute and a content-related image group marked with an analysis processing attribute. This process generates an image group semantic carrier composed of each image tag and its corresponding group context text.

[0044] Preferably, the specific implementation process of step 2 is as follows: First, determine the pre-processing input object of step 2. The pre-processing input object includes the image position coordinate list generated in step 1, the equal amount of placeholder text sequence stored in memory, the image resources in the original document to be processed that correspond one-to-one with the image tags, and the association identifier that uniquely corresponds to the original document to be processed. The pre-processing input object is used to support the entire process of pure blank condition detection, image group separation and image group semantic carrier generation. Each structured coordinate unit in the image location coordinate list contains a unique image identifier that uniquely corresponds to the image in the original document to be processed, as well as the start and end offsets corresponding to that image marker. All structured coordinate units are arranged in order of appearance of the images in the document space. The equal-quantity placeholder text sequence has completed the equal-quantity space replacement of the Hypertext Markup Language table tags and the table source image markers. Its global total character length and the global position mapping relationship of each content are completely consistent with the main text, providing an unbiased benchmark text for subsequent spacing calculation, text extraction, and pure white space condition detection. The association identifiers include the organization identifier of the organization to which it belongs, the knowledge base identifier of the knowledge base to which it belongs, and the unique file identifier of the original document to be processed, which are used to realize the unique binding relationship between the entire process result and the original document to be processed.

[0045] Preferably, in the specific technical implementation of step 2, based on the image position coordinate list generated in step 1, text spacing calculation and preliminary segmentation processing with a spacing threshold are performed between adjacent image markers to generate an initial image cluster composed of spatially adjacent image markers. This step provides specific execution logic for the generation of the initial image cluster, and reuses the image position coordinate list output in step 1 as the position reference throughout. The specific execution process is as follows: according to the arrangement order of image markers in the image position coordinate list, the text spacing between two adjacent image markers is calculated sequentially. The calculation logic for the text spacing is the starting offset of the subsequent image marker minus the ending offset of the preceding image marker. The calculation result is the number of text characters between two adjacent image markers, which can directly represent the distance between the two images in the document space. Subsequently, a preset maximum context character count configuration value is used as the spacing threshold. When the text spacing between two adjacent image markers is greater than or equal to the spacing threshold, image grouping is performed here, dividing the two image markers into different initial image clusters; when the text spacing between two adjacent image markers is less than the spacing threshold, the two adjacent image markers are grouped into the same initial image cluster. After traversing each image tag and separating the image groups, we obtain multiple initial image clusters composed of image tags that are spatially adjacent and have a high degree of contextual relevance. These clusters provide the basic processing units for subsequent pure blank condition detection and image group separation.

[0046] Preferably, in one scenario, step 2 is specifically implemented by performing text extraction and blank condition detection processing between adjacent image markers within each generated initial image cluster to identify blank edges and non-blank edges within the initial image cluster. This step is used to determine whether the text between adjacent image markers meets the blank condition after removing newline characters, and to perform text extraction and verification based on the equal-quantity placeholder text sequence generated in step 1. Specifically, for each pair of adjacent image markers within the initial image cluster, based on the equal-quantity placeholder text sequence, the complete text content between the end offset of the previous image marker and the start offset of the next image marker is extracted, and this text segment is defined as the spacing text between adjacent image markers; then, preprocessing is performed on the extracted spacing text to remove all newline characters contained in the spacing text, resulting in verification text for blank verification. Based on this, a pure white space condition is defined. If all characters in the verification text are white spaces and there is no visible non-white space text content, then the spacing text between the pair of adjacent image markers is determined to meet the pure white space condition, and the connecting edge between the pair of adjacent image markers is marked as a pure white space edge. If any non-white space visible character exists in the verification text, then the spacing text between the pair of adjacent image markers does not meet the pure white space condition, and the corresponding connecting edge is marked as a non-white space edge.

[0047] Preferably, in the specific implementation of step 2, based on the identification results of pure blank edges and non-blank edges within the initial image cluster, continuous pure blank edge sequence detection and image group separation processing are performed to separate the initial image cluster into decorative image groups marked with skip analysis attributes and content-related image groups marked with analysis processing attributes. This step forms a processing continuity relationship with the output results of the preceding pure blank condition detection step. The specific execution process is as follows: traverse the edge label results between all adjacent image labels within the initial image cluster, identify continuous and uninterrupted pure blank edge sequences, and calculate the total number of image labels connected to each continuous pure blank edge sequence, i.e., the number of continuous image labels; then, preset a minimum continuous number configuration value. When the number of continuous image labels connected to a certain continuous pure blank edge sequence is greater than or equal to the minimum continuous number configuration value, the continuous image labels of that segment are completely separated from the initial image cluster and defined as a decorative image group. At the same time, a skip analysis attribute is added to all image labels within the decorative image group to indicate that subsequent processing steps do not need to perform visual language model call analysis on the decorative image group. The remaining image tags in the initial image cluster that were not assigned to the decorative image group are divided into one or more content-related image groups according to their original spatial proximity and the connection status of non-blank edges. At the same time, analysis and processing attributes are added to all image tags in each content-related image group to indicate that subsequent processing steps should perform context-aware visual language model call analysis on the content-related image group.

[0048] Preferably, in one scenario, when implementing step 2, for each content-related image group marked with analysis and processing attributes, grouping constraint verification and recursive binary constraint verification based on the maximum text spacing within the group are performed to obtain standardized content-related image groups that meet the processing capability constraints of the visual language model, providing standardized processing units for the subsequent generation of image group semantic carriers. Specifically, the execution process involves first presetting two grouping constraints: the first constraint is that the total number of image tags within the group does not exceed the maximum image count configuration value; the second constraint is that the total number of characters in the group context corresponding to the content-related image group does not exceed the product of the maximum context character count configuration value and the number of image tags within the group. Then, the total number of characters in the group context corresponding to each content-associated image group is calculated. The total number of characters in the group context consists of three parts: the first part is the length of the preceding text before the first image tag in the content-associated image group, which is the smaller of half the maximum context character count configuration value and the distance to the previous group's outer image tag; the second part is the total length of the spacing text between all adjacent image tags within the group; and the third part is the length of the following text after the last image tag in the content-associated image group, which is the smaller of half the maximum context character count configuration value and the distance to the next group's outer image tag. If the content-associated image group does not meet either of the above two grouping constraints, the position with the largest text spacing between adjacent image tags within the content-associated image group is found. The content-associated image group is then divided into two independent subgroups at this position. The grouping constraint check and the recursive binary constraint check based on the largest text spacing within the group are then repeated for each subgroup until all subgroups meet both grouping constraints, or only a single image tag remains in each subgroup.

[0049] Preferably, in the specific technical implementation of step 2, for the standardized content-related image group after completing the recursive binary constraint verification process based on the maximum text spacing within the group, group context text extraction and structured encapsulation processing are performed to generate an image group semantic carrier composed of each image tag and its corresponding group context text. This step forms a processing succession relationship with the output result of the previous standardized content-related image group processing step. The specific execution process is as follows: for each standardized content-related image group, based on the equal-quantity placeholder text sequence, accurately extract the preceding text, the spacing text between all adjacent image tags within the group, and the following text corresponding to the standardized content-related image group. After merging the three text segments, space compression processing is performed to remove consecutive redundant space characters in the text, retaining the semantically complete text content, and obtaining the group context text corresponding to the standardized content-related image group. Subsequently, all image tags within the standardized content-associated image group, the image resource address corresponding to each image tag, and the group context text corresponding to the standardized content-associated image group are structurally encapsulated to generate an independent image group semantic carrier. Each image group semantic carrier forms a unique correspondence with a standardized content-associated image group. For decorative image groups marked with the "skip analysis" attribute, only the image tags within the group are marked with attribute labels and attribution records; context extraction and structural encapsulation are not performed. After processing all image groups, all image group semantic carriers and the attribute labeling results of decorative image groups are arranged in order of appearance of the images in the original document to be processed, generating a complete image group processing result, which is synchronously passed to the subsequent document parsing and visual language model call analysis stages.

[0050] Preferably, in the specific technical implementation of step 2, after the generation of the image group semantic carrier is completed, a full group consistency check and association identifier binding process are performed to ensure the accuracy, completeness, and traceability of the image group processing results, and to ensure that the final output image group semantic carrier can form a complete technical chain with the output results of the previous steps. The execution process of the full group consistency check is divided into two stages. The first stage is a full image attribution check, which verifies that each image tag extracted from the original document to be processed has been assigned to the corresponding decorative image group or content-related image group, and there are no omissions, duplicate assignments, or attribution conflicts. The second stage is a group integrity check, which verifies that each standardized content-related image group meets the two preset grouping constraints, and that each image group semantic carrier contains complete image tags, image resource addresses, and group context text, and there are no missing key fields. After verification, each image group semantic carrier and each decorative image group is bound to a unique association identifier corresponding to the original document to be processed. This ensures that the image group processing result is uniquely bound to the original document, organization, and knowledge base to be processed, thus ensuring accurate matching of the corresponding document and organizational resources in subsequent distributed processing stages. It also provides complete status information for breakpoint recovery after task interruption.

[0051] Optionally, generating an image group semantic carrier consisting of each image tag and its corresponding grouping context text includes: A recursive binary constraint verification process based on the maximum text spacing within the group is performed on the content-related image group to extract the group context text, which includes the preceding text, the text between images, and the following text, thereby obtaining the image group semantic carrier composed of each image tag and its corresponding group context text.

[0052] Preferably, the specific implementation process of step 2 is as follows: First, determine the pre-processing input object for the recursive binary constraint verification based on the maximum text spacing within the group. The pre-processing input object includes the content-related image group marked with analysis and processing attributes obtained by pure blank condition detection and separation, the image position coordinate list generated in step 1, the equal amount of placeholder text sequence stored in memory, the preset grouping constraint configuration parameters, and the association identifier that uniquely corresponds to the original document to be processed. The content-related image group consists of multiple image tags that are adjacent in the document space and have high semantic relevance. Each image tag has a unique correspondence with an image in the original document to be processed, and each image tag has a matching start offset and end offset in the image position coordinate list. The equal-quantity placeholder text sequence has completed the equal-quantity space placeholder replacement of the Hypertext Markup Language table tags and the table source image tags. Its global total character length and the global position mapping relationship of each content are completely consistent with the main text, providing an unbiased benchmark text for the extraction of grouped context text. The group constraint configuration parameters include the maximum number of images in a single group and the maximum number of context characters corresponding to a single image, providing a judgment benchmark for the recursive binary constraint verification processing based on the maximum text spacing within the group. The association identifier includes the organization identifier of the organization to which it belongs, the knowledge base identifier of the knowledge base to which it belongs, and the unique file identifier of the original document to be processed, which is used to realize the unique binding relationship between the processing result and the original document to be processed.

[0053] Preferably, in the specific technical implementation of step 2, before performing the recursive binary constraint verification process based on the maximum text spacing within a group, the grouping basic parameter calculation process is first performed for each content-related image group to obtain the core judgment index used for constraint verification. The first part of the grouping basic parameter calculation process is the statistics of the number of image tags within the group. All image tags within the content-related image group are traversed to obtain the total number of image tags contained in the content-related image group. This total number of image tags directly corresponds to the maximum number of images in a single group in the grouping constraint configuration parameters. The second part is the calculation of the total number of characters in the grouping context. The total number of characters in the grouping context consists of three parts. The first part is the extractable length of the preceding text of the content-related image group. The extractable length of the preceding text is taken as half of the maximum number of characters in the context corresponding to a single image, and the smaller value between the starting offset of the first image tag in the content-related image group and the ending offset of the image tag of the previous non-content-related image group. The second part is the text spacing between images. The total length is the sum of the text characters in the spacing text between all adjacent image tags within the content-related image group; the third part is the extractable length of the subsequent text in the content-related image group, which is the smaller of half the maximum context character count corresponding to a single image and the distance between the end offset of the last image tag in the content-related image group and the start offset of the next image tag not in this content-related image group; adding the extractable length of the preceding text, the total length of the spacing text between images, and the extractable length of the following text gives the total number of characters in the group context corresponding to the content-related image group, which directly corresponds to the maximum number of characters in the context text corresponding to a single image in the group constraint configuration parameters.

[0054] Preferably, in one scenario, when implementing step 2, based on the calculated grouping parameters, a grouping constraint verification process is performed on the content-related image group to determine whether the content-related image group meets the processing capability constraints of the visual language model. The grouping constraints include a constraint on the number of image tags within the group and a constraint on the total number of characters in the group's context. The constraint on the number of image tags within the group is used to determine whether the total number of image tags within the content-related image group is less than or equal to the maximum number of images in a single group. The constraint on the total number of characters in the group's context is used to determine whether the total number of characters in the group's context corresponding to the content-related image group is less than or equal to the product of the maximum number of context characters for a single image and the total number of image tags within the group. If the content-related image group simultaneously satisfies both the constraint on the number of image tags within the group and the constraint on the total number of characters in the group's context, then the content-related image group is determined to be a standardized content-related image group, and no binary splitting process is required; it directly proceeds to the subsequent group context text extraction stage. If the content-related image group does not satisfy either the constraint on the number of image tags within the group or the constraint on the total number of characters in the group's context, then the content-related image group needs to undergo binary splitting and proceeds to the maximum text spacing location stage within the group. This grouping constraint verification process ensures that each standardized content-related image group after splitting is within the processing capability of the visual language model. At the same time, it ensures that each standardized content-related image group can be matched with sufficient and highly relevant grouping context text. Unlike the traditional approach of splitting a fixed number of images and ignoring context length constraints, this approach can effectively avoid model processing failures and semantic understanding deviations caused by too many images in a single group or too long context text.

[0055] Preferably, in the specific technical implementation of step 2, for content-related image groups that have not passed the grouping constraint condition verification process, the maximum text spacing within the group is used for location processing to determine the bisection splitting position. The specific execution process of the maximum text spacing within the group is as follows: based on the image position coordinate list and the equal-quantity placeholder text sequence, the text spacing between each pair of adjacent image tags within the content-related image group is calculated sequentially. The calculation logic for the text spacing is the starting offset of the subsequent image tag minus the ending offset of the previous image tag. The calculation result is the number of text characters in the text spacing between the two adjacent image tags, which directly represents the semantic correlation between the images corresponding to the two image tags. The larger the text spacing, the lower the semantic correlation between the images corresponding to the two image tags, and the more suitable it is as a splitting boundary. After completing the text spacing calculation for all adjacent image tags within the content-related image group, the values ​​of all text spacings are compared, and the pair of adjacent image tags corresponding to the largest text spacing is found. The position between this pair of adjacent image tags is determined as the bisection splitting position of the content-related image group. Choosing the position with the maximum text spacing as the split boundary can preserve the semantic relationship between images within the two sub-content related image groups to the greatest extent, avoid splitting semantically closely related images into different groups, and achieve contextual semantic integrity in subsequent visual language model analysis.

[0056] Preferably, in one scenario, step 2 is specifically implemented by performing binary splitting and recursive constraint verification on the content-related image group based on the determined binary splitting position, to obtain all standardized content-related image groups that meet the grouping constraint conditions. The specific execution process of the binary splitting is as follows: at the binary splitting position, the content-related image group is split into two independent sub-content-related image groups. Image tags before the splitting position are assigned to the left sub-content-related image group, and image tags after the splitting position are assigned to the right sub-content-related image group. During the splitting process, the order in which the image tags appear in the original document to be processed is strictly maintained, and the order of the image tags is not changed to avoid context extraction errors caused by disordered position order. After the binary split, the basic parameters for grouping and the constraints for grouping are calculated and validated repeatedly for the left and right sub-content related image groups. If a sub-content related image group passes the constraint validation, it is classified as a standardized content related image group. If it fails, the maximum text spacing within the group and the binary split are performed again, forming a recursive binary constraint validation based on the maximum text spacing within the group. The termination condition for this recursive binary constraint validation is that the split sub-content related image group passes the constraint validation, or only a single image marker remains within the sub-content related image group. For sub-content related image groups with only a single image marker remaining, they are directly classified as standardized content related image groups, and the binary split is no longer performed.

[0057] Preferably, in the specific technical implementation of step 2, for all standardized content-related image groups obtained through recursive binary constraint verification based on the maximum text spacing within the group, accurate extraction of group context text is performed to obtain the complete group context text corresponding to each standardized content-related image group. The accurate extraction of group context text is performed sequentially along three dimensions: the first dimension is preceding text extraction, based on an equal-quantity placeholder text sequence, extracting continuous text content before the starting offset of the first image marker in the standardized content-related image group, with a length equal to the extractable length of the preceding text, as the preceding text corresponding to the standardized content-related image group; the second dimension is inter-image spacing text extraction, sequentially extracting the complete text content between each pair of adjacent image markers within the standardized content-related image group, merging all extracted text content according to the order of appearance in the original document to obtain the inter-image spacing text corresponding to the standardized content-related image group; the third dimension is following text extraction, based on an equal-quantity placeholder text sequence, extracting continuous text content after the ending offset of the last image marker in the standardized content-related image group, with a length equal to the extractable length of the following text, as the following text corresponding to the standardized content-related image group. The preceding text, the text between the images, and the following text are merged according to their order of appearance in the original document to obtain the initial context text corresponding to the standardized content-related image group. Then, the initial context text is subjected to space compression processing to remove consecutive redundant spaces and invalid line breaks, while preserving the semantic structure and original word order of the text, and finally the grouped context text corresponding to the standardized content-related image group is obtained.

[0058] Preferably, in the specific technical implementation of step 2, based on the standardized content-associated image groups and their corresponding group context text, a structured encapsulation process is performed to generate an image group semantic carrier composed of each image tag and its corresponding group context text. The specific execution process of the structured encapsulation process is as follows: An independent structured data unit is constructed for each standardized content-associated image group. This structured data unit contains four core fields: the first field is a unique group identifier, generated according to the order of appearance of the standardized content-associated image group in the original document to be processed, used to distinguish different image group semantic carriers; the second field is a set of image tags within the group, which includes all image tags within the standardized content-associated image group, as well as the image resource address corresponding to each image tag, and the starting and ending offsets in the image position coordinate list; the third field is the group context text, i.e., the complete group context text corresponding to the standardized content-associated image group after space compression processing; the fourth field is a document association identifier, i.e., the organization identifier, knowledge base identifier, and file identifier corresponding to the original document to be processed, used to establish a unique binding relationship between the image group semantic carrier and its corresponding original document to be processed. Each structured data unit is an independent image group semantic carrier. All image group semantic carriers are arranged in order according to the order in which standardized content-related image groups appear in the original document to be processed, forming a complete set of image group semantic carriers, which are then synchronously transmitted to the subsequent visual language model analysis and document content parsing stages.

[0059] Preferably, in the specific technical implementation of step 2, after generating all image group semantic carriers, a full consistency check and anomaly fallback processing are performed to ensure the integrity, accuracy, and usability of the image group semantic carriers. The full consistency check process consists of three stages. The first stage is a full check of image attribution, verifying that all image tags marked with analysis and processing attributes have been assigned to the corresponding standardized content-related image groups and that matching image group semantic carriers have been generated, with no omissions, duplicate assignments, or attribution conflicts. The second stage is a secondary check of grouping constraints, verifying that the standardized content-related image groups corresponding to each image group semantic carrier meet the requirements of the grouping constraints, with no groups failing to meet processing capacity constraints. The third stage is a context text matching check, verifying that the grouping context text in each image group semantic carrier comes from the matching position of the corresponding standardized content-related image group in the equal-quantity placeholder text sequence, and completely corresponds to the start and end offsets of the image tags, with no mismatch between context text and image position. For abnormal groups discovered during the verification process, a fallback splitting process is performed on individual images. All image tags within the abnormal group are split into standardized content-associated image groups for individual images, and corresponding image group semantic carriers are generated for each group. This ensures that all image tags that require analysis and processing have corresponding image group semantic carriers to support the subsequent processing flow.

[0060] Optionally, step 3, based on the organization identifier corresponding to the original document to be processed, analyzes the parallel extraction relationship between different original documents to be processed during the task execution phase to establish a hybrid queue routing logic and determine the globally shared parallel queue and the organization-independent serial queue to generate a cross-document graph based on the image grouping semantic carrier, including: Based on the organization identifier corresponding to the original document to be processed, by analyzing the parallel extraction relationship between different original documents to be processed during the task execution stage, a hybrid queue routing logic is established and a distributed processing pipeline is constructed through the hybrid queue routing logic. This is to construct a globally shared parallel queue for parallel extraction of entity relationships within the document for the semantic carriers of image groups corresponding to different original documents to be processed, and an organization-independent serial queue for cross-domain fusion of the extracted entity relationships to generate a cross-document graph.

[0061] Preferably, the specific implementation process of step 3 is as follows: First, determine the pre-processing input object of step 3. The pre-processing input object includes the image group semantic carrier generated in step 2 that corresponds one-to-one with the original document to be processed, the organization identifier to which the original document to be processed belongs, the knowledge base identifier corresponding to the original document to be processed, the file identifier corresponding to the original document to be processed, the preset document processing full-stage dependency relationship rules, and the task process resource configuration information of the distributed computing cluster. Among them, the image group semantic carrier contains the tagging information of all content-related images in the original document to be processed, the image resource address, and the corresponding grouping context text. It is the core foundational data for document content parsing, semantic understanding, and entity relationship extraction within the document. The organization identifier is the unique identity of the enterprise organization to which the original document to be processed belongs. It is the core basis for the subsequent creation of independent serial queues and task routing. The knowledge base identifier corresponding to the original document to be processed is used to limit the knowledge base to which the original document to be processed belongs. The file identifier corresponding to the original document to be processed is used to uniquely identify the corresponding original document to be processed. The preset document processing full-stage dependency rules clearly define all task execution stages required for the original document to be processed from its original format to cross-document graph generation, as well as the execution order and dependencies between each task execution stage, providing an execution rule benchmark for the construction of a distributed processing pipeline.

[0062] Preferably, in the specific technical implementation of step 3, based on the document processing full-stage dependency relationship rules, parallel extraction relationship analysis is performed between different original documents to be processed during the task execution stage to divide the process into parallel-executable document-within-document processing stages and cross-domain fusion processing stages requiring serial constraints. The core execution logic of the parallel extraction relationship analysis is to analyze the data dependency scope and resource competition scope involved in the task execution process of each task execution stage in the document processing full-stage dependency relationship rules; for task execution stages that only need to process the internal data of a single original document to be processed and where there is no shared resource competition or data dependency between tasks of different original documents to be processed, they are divided into parallel-executable document-within-document processing stages. The parallel-executable document-within-document processing stages include four core steps: document parsing, content preprocessing, semantic segmentation, and document-within-document entity relationship extraction. Different original documents to be processed are divided into parallel-executable document-within-document processing stages. The task execution processes in the processing phase are completely independent and do not affect each other, enabling file-level fully parallel processing. For task execution phases that require updating the knowledge graph shared by all original documents to be processed within the same organization, or where there is competition for shared resource writing between tasks of different original documents to be processed within the same organization, these phases are divided into a cross-domain fusion processing phase requiring serial constraints. This phase is used to perform cross-domain fusion processing on the extracted entity relation set within the document. In this phase, tasks of multiple original documents to be processed within the same organization must be executed sequentially to avoid concurrent writing conflicts of the shared knowledge graph.

[0063] Preferably, in one scenario, when implementing step 3, based on the stage division results obtained from the parallel extraction relationship analysis, and combined with the organization identifier corresponding to the original document to be processed, a hybrid queue routing logic is constructed to form task routing rules adapted to different task execution stages. The hybrid queue routing logic includes parallel task routing rules and serial task routing rules. The parallel task routing rules specify that all tasks in the document processing stage that can be executed in parallel are uniformly submitted to a globally shared parallel queue, without distinguishing the organization to which the original document to be processed belongs, only following the stage dependencies and generation order of the tasks. The serial task routing rules specify that tasks in the cross-domain fusion processing stage that require serial constraints must be dynamically submitted to an organization-specific serial queue uniquely corresponding to the organization based on the organization identifier corresponding to the original document to be processed. Each organization identifier corresponds to a unique organization-specific serial queue, and all cross-domain fusion tasks of the same organization can only be submitted to the organization-specific serial queue corresponding to that organization and cannot be submitted to other queues. Meanwhile, the hybrid queue routing logic also defines dynamic queue creation rules. When a cross-domain fusion task corresponding to a certain organization identifier is detected to be generated for the first time, an exclusive organization-independent serial queue is automatically created for that organization. The life cycle of the queue is matched with the life cycle of the tasks to be processed by that organization. After all tasks are processed, resources can be released according to preset rules to avoid invalid resource occupation.

[0064] Preferably, in the specific technical implementation of step 3, based on the constructed hybrid queue routing logic, a distributed processing pipeline is built to form a fully automated execution chain from document parsing to cross-document graph generation. The distributed processing pipeline sequentially connects all task execution stages according to the document processing full-stage dependency rules. Each task execution stage is configured with a corresponding task execution function and an automatic chaining triggering rule. The automatic chaining triggering rule is explicit; the task execution function of each task execution stage is configured with an automatic continuation parameter, which is enabled by default. When a task in a certain task execution stage is successfully completed, the next task to be executed is automatically generated according to the document processing full-stage dependency rules, and the generated task to be executed is delivered to the corresponding queue according to the hybrid queue routing logic, without manual intervention. Meanwhile, the inter-stage data transfer in the distributed processing pipeline adopts a combination of identifier triggering and cached state bridging channels. When a task is triggered, only three types of core identifier information, namely organization identifier, knowledge base identifier, and file identifier, are transmitted in the task message. Large-volume business data such as document objects, chunk results, and entity relationship sets within documents are not transmitted. Large-volume business data is stored and retrieved through cached state bridging channels, which avoids the problem of task messages exceeding message size limits and also achieves lightweight and efficient data transfer between stages.

[0065] Preferably, in one scenario, when implementing step 3, a globally shared parallel queue is constructed based on the parallel task routing rules of the hybrid queue routing logic. This queue carries all tasks in the document processing stage that can be executed in parallel, enabling parallel extraction of entity relationships within the document from the semantic carriers of image groups corresponding to different original documents to be processed. The globally shared parallel queue is implemented using a distributed cache list structure, which supports concurrent access and task consumption by all task processes in the distributed computing cluster. The queue's consumption mode adopts a multi-task process competition consumption mode, where all available task processes in the distributed computing cluster can compete to obtain tasks from the globally shared parallel queue and execute them. Multiple tasks from different original documents to be processed can be processed simultaneously, and the maximum concurrent processing capacity matches the total number of task processes in the distributed computing cluster. During task execution, after the task process obtains the task for the document processing stage, it reads the image grouping semantic carrier of the original document to be processed and the processing results of the previous task execution stage from the cache state bridging channel according to the core identification information in the task message. It then completes the document content parsing, semantic understanding and document entity relation extraction processing for the corresponding task execution stage, and finally obtains the document entity relation set corresponding to the original document to be processed. After processing, the document entity relation set is written into the cache state bridging channel, and the task for the next task execution stage is generated through automatic chain triggering rules.

[0066] Preferably, in the specific technical implementation of step 3, based on the serial task routing rules and dynamic queue creation rules of the hybrid queue routing logic, the construction process of the organization-independent serial queue is executed to carry the cross-domain fusion tasks of the corresponding organization, realizing the cross-domain fusion processing of the extracted entity relationship set within the document. Each organization-independent serial queue is bound to a unique organization identifier. The queue is implemented using a distributed cache list structure, allowing only a single specified task process to consume tasks sequentially. Multiple task processes are not allowed to consume tasks in the same organization-independent serial queue simultaneously, ensuring that all cross-domain fusion tasks within the same organization are executed strictly in the order of task delivery, completely eliminating the concurrent write competition conditions of the shared knowledge graph within the same organization from the queue scheduling level. The organization-independent serial queues corresponding to different organizations are completely isolated from each other, and the task processes do not interfere with each other. Cross-domain fusion tasks of different organizations can be executed in parallel simultaneously. While achieving data consistency within a single organization, parallel processing between organizations is also realized, balancing data security and processing efficiency. During task execution, the task process retrieves the cross-domain fusion task from the organization's independent serial queue. Based on the core identifier information in the task message, it reads the document-in-document entity relation set of the original document to be processed from the cached state bridging channel. Based on the organization's shared knowledge graph, it performs cross-domain fusion processing, updates the document-in-document entity relation set of a single original document to be processed to the organization-level shared knowledge graph, and finally forms the complete cross-document graph corresponding to the organization.

[0067] Preferably, in one scenario, when implementing step 3, a cache state bridging and breakpoint recovery mechanism is configured for the entire execution process of the distributed processing pipeline to achieve task execution stability and resource utilization in large-scale document processing scenarios. The cache state bridging mechanism specifies that after the completion of each task execution stage, the output result of that stage is serialized and written into the distributed cache according to a preset key-name rule. The key-name rule includes four core types of information: processing stage identifier, organization identifier, knowledge base identifier, and file identifier, ensuring that the processing result of each task execution stage has a unique corresponding cache key-value pair. Simultaneously, a preset expiration time is set for each cache key-value pair, which can be configured according to business needs. This achieves data accessibility during task execution and avoids long-term invalid data occupying cache resources. The execution logic of the breakpoint recovery mechanism is as follows: when a task is interrupted at any stage of its execution due to external service exceptions, call failures, or other reasons, all completed task execution stages can be determined by traversing all cached key-value pairs corresponding to the task. Then, based on the document processing full-stage dependency rules, the restartable task execution stages can be calculated, and the task execution can be restarted directly from these restartable stages. The processing of all subsequent task execution stages is automatically completed through automatic chain triggering rules, without having to re-execute from the initial stage of document parsing. This avoids wasting computational resources on completed task execution stages and can bring a high improvement in resource utilization in large-scale batch document processing scenarios.

[0068] Preferably, in the specific technical implementation of step 3, after the distributed processing pipeline is built and task execution is started, full-process queue status monitoring and task consistency verification are performed to ensure the accuracy of task routing and the integrity of processing results. The queue status monitoring continuously tracks the task backlog, consumption progress, and running status of the globally shared parallel queue and all organization-independent serial queues. When task backlog is detected in a queue, the resource allocation of task processes in the distributed computing cluster can be dynamically adjusted to improve task processing efficiency. When a consumption anomaly is detected in an organization-independent serial queue, an anomaly alarm and task retry mechanism can be automatically triggered to ensure the continuity of task execution. The task consistency verification verifies the entire task execution chain of each original document to be processed, checking whether the task is delivered to the correct queue according to the hybrid queue routing logic, whether the execution order of each task execution stage conforms to the document processing full-stage dependency rules, and whether the cross-domain fusion task is strictly executed serially according to the organization dimension. This avoids data inconsistency caused by task routing errors and disordered execution order, ultimately ensuring the integrity and accuracy of the generated cross-document graph.

[0069] Optionally, generating a cross-document graph includes: The task process matching the global shared parallel queue in the distributed computing cluster is invoked to perform competitive consumption on the global shared parallel queue in order to extract the entity relationship within the document for the image group semantic carriers corresponding to different original documents to be processed, thereby obtaining the entity relationship set within the document; And call the task process in the distributed computing cluster that matches the independent serial queue of the organization to perform graph fusion processing on the entity relation set in the document corresponding to different original documents to be processed based on organizational consistency constraints to generate a cross-document graph.

[0070] Preferably, the specific implementation process of calling the task process matching the globally shared parallel queue in the distributed computing cluster to perform competitive consumption of the globally shared parallel queue is as follows: First, the underlying data structure of the globally shared parallel queue is determined to be a distributed cache list. The distributed cache list stores task messages of image group semantic carriers corresponding to all original documents to be processed. Each task message includes the storage address of the image group semantic carrier, the organization identifier to which the original document to be processed belongs, and the current task execution stage identifier. The task process in the distributed computing cluster acts as a task consumer, listening to the globally shared parallel queue through a long polling mechanism or a push mechanism. When there are tasks to be processed in the globally shared parallel queue, any idle task process in the distributed computing cluster can initiate a competitive lock acquisition request. The task process that acquires the distributed lock first reads a task message from the head of the globally shared parallel queue, and then loads the corresponding image group semantic carrier from the distributed cache according to the storage address in the task message. After obtaining the image group semantic carrier, the task process calls a preset visual language model to reason about the content-related image groups within the image group semantic carrier one by one. Combining the group context text, it identifies the entity objects, attribute features, and relationships in the images, transforming unstructured image information into structured triple data. All identified entity relationship data is encapsulated according to a preset entity relationship structured encapsulation format, forming a document-level entity relationship set uniquely corresponding to the original document to be processed. The task process serializes the generated document-level entity relationship set and writes it to a specified key in the distributed cache. The specified key includes an organization identifier and a file identifier. Simultaneously, it sends a task processing completion signal to the globally shared parallel queue, allowing the globally shared parallel queue to remove the consumed task message from the distributed cache list. The entire competitive consumption process achieves high concurrency throughput without a centralized scheduling node, ensuring that the image group semantic carriers of different original documents to be processed can be processed in parallel and without blocking.

[0071] Preferably, in the process of extracting entity relationships within a document, to improve the inference efficiency and accuracy of the visual language model, the task process first performs semantic compression and keyword extraction on the grouped context text in the semantic carrier of the image group. Natural language processing algorithms are then used to calculate the similarity between the grouped context text and concept nodes in a pre-constructed industry knowledge graph, filtering out candidate entity types with high confidence. Subsequently, for each image in the content-related image group, the task process extracts the visual feature vector of that image and performs multimodal alignment calculations with the semantic vectors of the filtered candidate entity types. An attention mechanism is used to weightedly fuse image features and text context features to determine the specific referent and attribute values ​​of the entities in the image. This processing method differs from traditional single-modal recognition that relies solely on image features. By introducing grouped context text as a strong prior constraint, it effectively reduces the misidentification rate of the visual language model for fuzzy image features, resulting in a document entity relationship set with higher semantic accuracy and structural integrity. This lays a data foundation for subsequent graph-based fusion processing based on organizational consistency constraints.

[0072] Preferably, based on the organization identifier corresponding to the original document to be processed, a task process matching the organization's independent serial queue in the distributed computing cluster is invoked to perform graph fusion processing based on organization consistency constraints. The core of this approach lies in constructing a serial processing channel strongly bound to the organization identifier. The organization consistency constraint is a graph fusion constraint pre-configured or dynamically generated based on the organization identifier, used to limit the entity relation set within a document corresponding to the same organization identifier to only enter the same organization-independent serial queue, and to execute graph fusion processing according to the task delivery order. After the entity relation set within a document is generated and written to the distributed cache, the distributed computing cluster dynamically routes the fusion task corresponding to the entity relation set to the corresponding organization-independent serial queue based on the organization identifier to which the entity relation set belongs. Each organization identifier uniquely maps to a physically isolated organization-independent serial queue in the distributed computing cluster, and this organization-independent serial queue is bound to only one dedicated task process; task processes from other organizations are strictly prohibited from consuming across queues. The dedicated task process pulls the entity relation set within the document from the organization-independent serial queue one by one according to the task delivery timestamp order, thereby initiating graph fusion processing based on organization consistency constraints. The graph-based fusion processing based on organizational consistency constraints first parses the entity relationship set within the document to be fused, extracting the unique entity identifiers and relationship attributes. It then searches the organizational-level shared knowledge graph for instances of entities with the same name. If an instance exists, a conflict detection mechanism based on version timestamps and data source reliability is triggered, and the entity's attribute values ​​are either weighted and merged or overwritten and updated. If no instance exists, the new entity and its relationships are directly inserted into the corresponding partition of the graph database. Through this strict single-task process sequential consumption and organizational-level data isolation mechanism, the potential for dirty data and race conditions when multiple task processes concurrently write to the same organizational-level shared knowledge graph is completely avoided, achieving transactional consistency in the graph-based fusion processing results based on organizational consistency constraints.

[0073] Preferably, when task processes in an independently organized serial queue perform graph fusion processing based on organizational consistency constraints, to address long-tail latency and node failures in scenarios involving large-scale processing of raw documents, the distributed computing cluster designs a collaborative mechanism based on intermediate state snapshots for breakpoint resumption and cached state bridging channels. Before processing each set of entity relationships within a document, a dedicated task process registers an intermediate state snapshot of its current processing progress with the distributed coordination service. This intermediate state snapshot includes the file identifier being processed, the number of entities already merged, and the current version number of the cross-document graph. Each time a task process completes graph fusion processing of an entity relationship, it asynchronously writes the updated graph incremental data to persistent storage and updates the version number and the number of entities already merged in the intermediate state snapshot. If a task process exits abnormally or a computing node crashes during processing, the distributed scheduling system will detect the heartbeat interruption and trigger retry logic. The new takeover task process will read the latest intermediate state snapshot, locate the specific file identifier and entity location at the time of interruption, load the corresponding incremental graph data from persistent storage for rollback or supplementation, and then continue executing subsequent graph fusion processing tasks from the point of interruption, without having to reprocess all historical tasks in the organization's independent serial queue from scratch. This mechanism of interrupted resume based on intermediate state snapshots and cached state bridging channels effectively improves the robustness of the distributed computing cluster in the face of infrastructure fluctuations and avoids the waste of full computing resources due to single point of failure.

[0074] Preferably, to ensure the efficiency and consistency of data flow between the globally shared parallel queue and the organization-independent serial queue, the distributed computing cluster constructs a cache state bridging channel based on content addressing. This cache state bridging channel does not directly transmit large-volume image group semantic carriers or document-level entity relation sets; instead, it transmits reference pointers to the data's storage location in the distributed cache and metadata digests. When the task process in the globally shared parallel queue completes the extraction of document-level entity relations, it only delivers a lightweight task message containing the organization identifier, file identifier, hash value of the document-level entity relation set, and cache address to the organization-independent serial queue. The task process in the organization-independent serial queue, based on the cache address in the lightweight task message, directly reads the verified document-level entity relation set from the distributed cache and performs graph fusion processing based on organization consistency constraints. Meanwhile, to prevent cache penetration and data inconsistency, the distributed computing cluster employs a read-write lock-based synchronization mechanism at the distributed cache layer. When a task process in an independently organized serial queue is reading an entity relation set within a document, the write operation of the task process in the globally shared parallel queue on that entity relation set is briefly blocked or redirected to a replica node, ensuring that the read operation obtains a complete and unmodified version of the data. Furthermore, the distributed computing cluster introduces a Bloom filter-based data existence pre-check mechanism. Before reading the distributed cache, the task process in the independently organized serial queue queries the Bloom filter. If the Bloom filter determines that the entity relation set within the document does not exist, it skips the process and records an exception log. If the Bloom filter determines that the entity relation set within the document exists, it performs an accurate read. This data existence pre-check mechanism significantly reduces the pressure of invalid accesses to the distributed cache backend in high-concurrency scenarios, improving the data flow efficiency between the globally shared parallel queue and the independently organized serial queue.

[0075] Preferably, to address the risks of queue backlog and resource deadlock that may occur in distributed computing clusters, a dynamic flow control and monitoring feedback mechanism based on multi-dimensional indicators is deployed. This mechanism collects key indicators in real time, such as the number of tasks awaiting processing in the globally shared parallel queues, average waiting time, and the consumption rate and processing latency of independent serial queues within an organization. It then uses time-series analysis algorithms to predict load trends over a future period. When the backlog length of an organization's independent serial queue exceeds a preset threshold or the consumption latency is higher than the baseline, the dynamic flow control and monitoring feedback mechanism automatically triggers an elastic scaling strategy. This involves suspending the delivery of new graph fusion processing tasks to that organization's independent serial queue and requesting the cluster management system to increase the number of replicas of the organization's dedicated task process or increase the computing resource quota for that dedicated task process, until the queue indicators return to a healthy level. Simultaneously, the dynamic flow control and monitoring feedback mechanism performs distributed tracking of the entire task processing log, generating a complete call chain graph that includes task enqueue time, contention consumption time, graph fusion processing time, and state changes at each task execution stage. If a task consistency check failure or an abnormally high data fusion conflict rate is detected, an alarm is automatically triggered, and suspicious task batches are isolated for root cause analysis by operations personnel. This dynamic flow control and monitoring feedback mechanism enables the distributed computing cluster to maintain the stable operation of both the globally shared parallel queue and the organization's independent serial queue under the impact of massive amounts of raw documents to be processed, while maintaining high reliability of cross-document graph generation results.

[0076] like Figure 2 As shown in the figure, an embodiment of this application discloses a cross-document graph construction apparatus based on equal placeholders and hybrid queue scheduling, which includes: The first program unit is used to extract the main text and image tags contained in each original document to be processed, generate an equal amount of placeholder text sequence based on the main text and the image tags, and then construct a list of image position coordinates representing the ordered distribution state of images in the document space based on the equal amount of placeholder text sequence. The second program unit is used to determine whether the pure blank condition is met between two adjacent image markers in the image position coordinate list, so as to generate an image group semantic carrier composed of each image marker and its corresponding group context text; The third program unit is used to establish a hybrid queue routing logic based on the organization identifier corresponding to the original document to be processed, by analyzing the parallel extraction relationship between different original documents to be processed during the task execution phase, and then determine the global shared parallel queue and the organization-independent serial queue to generate a cross-document graph according to the image grouping semantic carrier.

[0077] like Figure 3As shown in the figure, an electronic device according to an embodiment of this application includes a processor and a memory; The memory is used to store computer programs; When the processor executes the computer program stored in the memory, it implements the cross-document graph construction method based on equal space and hybrid queue scheduling as described in any one of the claims of this application.

[0078] This application also provides a computer-storeable medium storing computer-executable instructions thereon, which are executed to implement the cross-document graph construction method based on equal placeholders and hybrid queue scheduling as described in any one of this application.

[0079] Figures 2-3 For an exemplary description, please refer to the above. Figure 1 This will not be elaborated upon here.

Claims

1. A method for constructing a cross-document graph based on equal placeholders and hybrid queue scheduling, characterized in that, include: Step 1: Extract the main text and image tags from each original document to be processed. Generate an equal-quantity placeholder text sequence based on the main text and image tags. Then, construct a list of image position coordinates representing the ordered distribution of images in the document space based on the equal-quantity placeholder text sequence. This includes: determining the Hypertext Markup Language (HTML) table tags in the main text and the table source image tags in the image tags; performing equal-quantity space placeholder replacement on the HTML table tags and the table source image tags to generate an equal-quantity placeholder text sequence stored in memory; and determining the offset of each image tag in the equal-quantity placeholder text sequence based on the equal-quantity placeholder text sequence, thereby constructing a list of image position coordinates representing the ordered distribution of images in the document space. Step 2: Determine whether the pure blank condition is met between two adjacent image markers in the image position coordinate list, so as to generate an image group semantic carrier composed of each image marker and its corresponding group context text; Step 3: Based on the organization identifier corresponding to the original document to be processed, by analyzing the parallel extraction relationship between different original documents to be processed during the task execution phase, a hybrid queue routing logic is established to determine the globally shared parallel queue and the organization-independent serial queue to generate a cross-document graph based on the image grouping semantic carrier, including: Based on the organization identifier corresponding to the original document to be processed, by analyzing the parallel extraction relationship between different original documents to be processed during the task execution stage, a hybrid queue routing logic is established and a distributed processing pipeline is constructed through the hybrid queue routing logic. This is to construct a global shared parallel queue for parallel extraction of entity relationships within the document for the semantic carrier of the image group corresponding to different original documents to be processed, and an organization-independent serial queue for cross-domain fusion of the extracted entity relationships to generate a cross-document graph. Generate cross-document graphs, including: The task process matching the global shared parallel queue in the distributed computing cluster is invoked to perform competitive consumption on the global shared parallel queue in order to extract the entity relationship within the document for the image group semantic carriers corresponding to different original documents to be processed, thereby obtaining the entity relationship set within the document; And call the task process in the distributed computing cluster that matches the independent serial queue of the organization to perform graph fusion processing on the entity relation set in the document corresponding to different original documents to be processed based on organizational consistency constraints to generate a cross-document graph.

2. The method for cross-document graph construction based on equal placeholders and hybrid queue scheduling according to claim 1, characterized in that, Based on the equal-quantity placeholder text sequence, the offset of each image marker within the equal-quantity placeholder text sequence is determined, thereby constructing a list of image position coordinates representing the ordered distribution of images in the document space, including: Based on the equal placeholder text sequence, each image marker is searched and located using string offsets to determine the start and end offsets of each image marker in the equal placeholder text sequence, thereby constructing a list of image position coordinates that characterize the ordered distribution of images in the document space.

3. The method for cross-document graph construction based on equal space allocation and hybrid queue scheduling according to claim 1, characterized in that, Step 2: Determine whether a pure white space condition is satisfied between two adjacent image markers in the image position coordinate list, so as to generate an image group semantic carrier composed of each image marker and its corresponding group context text, including: By detecting whether the text between adjacent image tags satisfies the pure white condition after removing newline characters, an initial image cluster is generated. This cluster is then separated into a decorative image group marked with a skip analysis attribute and a content-related image group marked with an analysis processing attribute. This process generates an image group semantic carrier composed of each image tag and its corresponding group context text.

4. The method for cross-document graph construction based on equal placeholders and hybrid queue scheduling according to claim 3, characterized in that, Generating an image group semantic carrier consisting of each image tag and its corresponding grouping context text includes: A recursive binary constraint verification process based on the maximum text spacing within the group is performed on the content-related image group to extract the group context text, which includes the preceding text, the text between images, and the following text, thereby obtaining the image group semantic carrier composed of each image tag and its corresponding group context text.

5. A cross-document graph construction device based on equal space allocation and hybrid queue scheduling, characterized in that, include: The first program unit is used to extract the main text and image tags contained in each original document to be processed, generate an equal amount of placeholder text sequence based on the main text and the image tags, and then construct a list of image position coordinates representing the ordered distribution state of images in the document space based on the equal amount of placeholder text sequence. This includes: determining the Hypertext Markup Language (HTML) table tags in the main text and the table source image tags in the image tags; performing equal amount of space placeholder replacement on the HTML table tags and the table source image tags to generate an equal amount of placeholder text sequence stored in memory; and determining the offset of each image tag in the equal amount of placeholder text sequence based on the equal amount of placeholder text sequence, thereby constructing a list of image position coordinates representing the ordered distribution state of images in the document space. The second program unit is used to determine whether the pure blank condition is met between two adjacent image markers in the image position coordinate list, so as to generate an image group semantic carrier composed of each image marker and its corresponding group context text; The third program unit is used to establish a hybrid queue routing logic based on the organization identifier corresponding to the original document to be processed, by analyzing the parallel extraction relationship between different original documents to be processed during the task execution phase, and then determining the globally shared parallel queue and the organization-independent serial queue to generate a cross-document graph based on the image grouping semantic carrier, including: Based on the organization identifier corresponding to the original document to be processed, by analyzing the parallel extraction relationship between different original documents to be processed during the task execution stage, a hybrid queue routing logic is established and a distributed processing pipeline is constructed through the hybrid queue routing logic. This is to construct a global shared parallel queue for parallel extraction of entity relationships within the document for the semantic carrier of the image group corresponding to different original documents to be processed, and an organization-independent serial queue for cross-domain fusion of the extracted entity relationships to generate a cross-document graph. Generate cross-document graphs, including: The task process matching the global shared parallel queue in the distributed computing cluster is invoked to perform competitive consumption on the global shared parallel queue in order to extract the entity relationship within the document for the image group semantic carriers corresponding to different original documents to be processed, thereby obtaining the entity relationship set within the document; And call the task process in the distributed computing cluster that matches the independent serial queue of the organization to perform graph fusion processing on the entity relation set in the document corresponding to different original documents to be processed based on organizational consistency constraints to generate a cross-document graph.

6. An electronic device, characterized in that, Including processor and memory; The memory is used to store computer programs; When the processor executes the computer program stored in the memory, it implements the cross-document graph construction method based on equal space and hybrid queue scheduling as described in any one of claims 1-4.

Citation Information

Patent Citations

  • Electric power project material inventory intelligent generation method and system based on multi-modal document analysis and knowledge graph semantic mapping

    CN121636476A

  • Utilizing machine learning models, position based extraction, and automated data labeling to process image-based documents

    US20210295103A1