Intelligent processing method, system and equipment for irregular document elements
By identifying and processing irregular elements in documents, using page segmentation and area matching algorithms, the compatibility and consistency of documents among different editing software are solved, and seamless layout of documents in multiple environments is achieved, reducing manual intervention and cost.
Patent Information
- Application Number
- CN202510544047.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-08-12
AI Technical Summary
Existing document processing technologies have compatibility and consistency problems among different editing software, especially when dealing with complex typography and format conversion, it is difficult to avoid display differences and interactive losses.
By identifying irregular elements in the document, extracting attribute features and original position information, using the page segmentation algorithm to determine the page number information and structural parameters of the independent page, calculating absolute coordinates, and determining the optimal embedding position through the region matching algorithm, realizing intelligent processing of irregular elements.
Eliminates the element position deviation caused by the differences in the analysis mechanism of different editing software, ensures that the document maintains a consistent layout effect in multiple editing environments, without manual adjustment, reduces processing time and labor costs, and is suitable for the fields of office automation, electronic publishing and online collaboration.
Smart Images

Figure CN120471019A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the fields of document processing technology and intelligent typesetting technology, and in particular relates to an intelligent processing method, system and device for irregular document elements. Background Art
[0002] Document processing and intelligent typesetting technologies are essential components of modern information technology, widely used in fields such as office automation, electronic publishing, and online collaboration. With the advancement of computer and network technologies, document creation, editing, sharing, and publishing have become increasingly convenient. However, compatibility issues between different editing software and document consistency across platforms have long been challenges in the document processing field.
[0003] Document formats are primarily categorized into two types: fixed-layout formats (such as PDF) and fluid-layout formats (such as .docx). Fixed-layout formats ensure consistent display across all devices, but offer limited flexibility. Fluid-layout formats, on the other hand, allow content to automatically adjust to screen size, but are prone to formatting errors across different editing software, especially when containing irregularly shaped elements (such as wrapping tables and images).
[0004] To address this situation, a common practice is that existing document processing tools (such as Microsoft Word, WPS Office) will first parse the structure of the document, including elements such as paragraphs, tables, and pictures, when opening a document, and present these elements on the screen according to their own rendering algorithms. This process relies on the parsing and rendering engines built into the editing software. The implementation methods of each software may be different, resulting in different display effects of the same document in different software. In some document editors, users can manually set the precise position of the table relative to the page or paragraph. Although this method can solve the problem to a certain extent, it requires a lot of manual intervention and cannot completely avoid display differences between different editing software.
[0005] To improve document compatibility across different editing software, there are specialized tools on the market for format conversion, such as converting from .doc to .pdf. These tools attempt to reduce cross-platform issues by standardizing document formats. However, this approach often sacrifices document interactivity and editing flexibility, and the resulting conversion may not be satisfactory for documents with complex layouts.
[0006] Based on this, the present invention proposes an intelligent processing method, system and device for irregular document elements. Summary of the Invention
[0007] In order to solve the above-mentioned problems in the prior art, namely, the compatibility and consistency issues between different editing software in the existing document processing technology, especially when dealing with complex typesetting and format conversion, it is difficult to avoid the problems of display differences and loss of interactivity, the present invention provides an intelligent processing method, system and device for irregular document elements.
[0008] The present invention proposes an intelligent processing method for irregular document elements, which includes:
[0009] Identify irregular elements in a document and extract attribute features and original position information; the irregular elements include at least surrounding tables, images, or objects to be embedded; the attribute features include at least the size, style, and type mark of the irregular elements; the position information is specific coordinates relative to the page or paragraph;
[0010] Based on the position information and the attribute characteristics, determining the page number information of the independent page where the irregular element is located through a page segmentation algorithm, and recording the structural parameters of the independent page;
[0011] Calculating the absolute coordinates of the irregular element within the independent page according to the structural parameters;
[0012] By using an area matching algorithm, the absolute coordinates of the irregular element are compared with the blank area of the page to determine the best embedding position and complete the layout.
[0013] Furthermore, the structural parameters include at least one or more of page margins, paper size, number of columns and column spacing, header / footer height, paragraph first line indentation, and paragraph spacing.
[0014] Furthermore, the absolute coordinates of the irregular element in the independent page are calculated according to the structural parameters, and the specific method is as follows:
[0015] Determine the vertical absolute position of the irregular element based on the vertical margin, paragraph start position, and line spacing of the page;
[0016] The horizontal absolute position of the irregular element is determined according to the horizontal starting point and the column width of the column and the width of the irregular element.
[0017] Furthermore, the specific calculation method of the longitudinal absolute position is:
[0018] Selecting the coordinates of the reference origin according to the positioning method of the irregular element;
[0019] Calculating the longitudinal offset between the coordinates of the upper left corner of the irregular element and the coordinates of the reference origin;
[0020] The reference origin coordinates and the longitudinal offset are superimposed to generate the longitudinal absolute position of the irregular element within the page.
[0021] Furthermore, the positioning method of the irregular element includes at least one of the following situations:
[0022] If the irregular element is set to be positioned relative to the page, the upper left corner of the page (0, 0) is used as the reference origin;
[0023] If the irregular element is set to be positioned relative to the page margin, then based on the page margin parameters of the section to which the independent page belongs, the offset of the page margin boundary relative to the upper left corner of the page is calculated as the reference origin;
[0024] If the irregular element is set to be positioned relative to the paragraph, the reference origin of the paragraph is determined by analyzing the absolute position of the first line element of the paragraph within the page center and combining it with the page margin parameters.
[0025] Furthermore, the absolute horizontal position is calculated as follows:
[0026] Parsing the column configuration of the independent page to obtain the number of columns, the horizontal starting point coordinates of each column, and the column width;
[0027] Based on the absolute vertical position of the irregular element, determine the column range covered by the longitudinal area where the irregular element is located, and select the target column containing the longitudinal area;
[0028] Determining whether the remaining horizontal space of the target column meets the embedding condition according to the column width of the target column and the width of the irregular element;
[0029] If it is satisfied, the horizontal starting point coordinates of the irregular element are calculated to generate the horizontal absolute position; if it is not satisfied, the horizontal starting points and column widths of adjacent columns are traversed, the available column range is re-matched, and the horizontal absolute position is generated.
[0030] Furthermore, when there is an available target column, the horizontal absolute position of the irregular element is limited to the horizontal starting point and column width of the matching column.
[0031] Furthermore, the document types processed by the intelligent processing method include at least Word and WPS.
[0032] Another aspect of the present invention provides an intelligent processing system for irregular document elements. The system is based on an intelligent processing method for irregular document elements and includes:
[0033] a feature and position extraction module configured to identify irregular elements in a document and extract attribute features and original position information; the irregular elements at least include surrounding tables, images, or objects to be embedded; the attribute features at least include the size, style, and type mark of the irregular elements; and the position information is specific coordinates relative to a page or paragraph;
[0034] a page segmentation module configured to determine, based on the position information and the attribute characteristics, page number information of the independent page where the irregular element is located by a page segmentation algorithm, and record structural parameters of the independent page;
[0035] a coordinate calculation module configured to calculate the absolute coordinates of the irregular element within the independent page according to the structural parameters;
[0036] The embedding module is configured to compare the absolute coordinates of the irregular element with the blank area of the page through an area matching algorithm, determine the best embedding position and complete the typesetting.
[0037] A third aspect of the present invention provides an electronic device, comprising:
[0038] at least one processor; and
[0039] a memory communicatively connected to at least one of the processors; wherein,
[0040] The memory stores instructions that can be executed by the processor, and the instructions are used to be executed by the processor to implement the above-mentioned intelligent processing method for irregular document elements.
[0041] Beneficial effects of the present invention:
[0042] (1) The page segmentation algorithm independently processes pages containing irregular elements, and combines the precise calculation of the base origin coordinates and offset to eliminate the element position deviation caused by the differences in the parsing mechanisms of different editing software, ensuring that the document maintains a consistent layout effect in multiple editing environments (such as Microsoft Word, WPS, etc.).
[0043] (2) Based on the collaborative work of document structure traversal, element tagging, page segmentation, and region matching algorithms, the intelligent positioning and embedding of irregular elements is achieved without manual adjustment. Compared with existing methods that rely on manual settings or script processing, this significantly reduces the time cost and manpower investment in document processing.
[0044] (3) This method does not rely on the rendering engine of a specific editing software. By extracting and restoring the logical structure parameters of the page (such as column configuration, paragraph indentation, etc.), it can be seamlessly integrated into various streaming document processing systems. It is suitable for multiple fields such as office automation, electronic publishing, and online collaboration, expanding the industry coverage of the technical solution. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Other features, objects and advantages of the present application will become more apparent upon reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0046] Figure 1 It is a flow chart of an intelligent processing method for irregular document elements of the present invention;
[0047] Figure 2 It is a schematic diagram of a surrounding table displayed in Microsoft Office Word according to an intelligent processing method for irregular document elements of the present invention;
[0048] Figure 3 It is a schematic diagram of a surrounding table displayed in WPS according to an intelligent processing method for irregular document elements of the present invention;
[0049] Figure 4 It is a schematic diagram of a table displayed in WPS after being processed by an intelligent processing method for irregular document elements of the present invention. DETAILED DESCRIPTION
[0050] The present application will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are intended only to illustrate the relevant invention and are not intended to limit the invention. It should also be noted that, for ease of description, only portions relevant to the relevant invention are shown in the accompanying drawings.
[0051] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0052] A first embodiment of the present invention provides an intelligent processing method for irregular document elements, the method comprising:
[0053] Step S10: Identify irregular elements in the document and extract attribute features and original position information; the irregular elements include at least surrounding tables, images, or objects to be embedded; the attribute features include at least the size, style, and type mark of the irregular elements; the position information is specific coordinates relative to the page or paragraph;
[0054] Step S20, based on the position information and the attribute characteristics, determine the page number information of the independent page where the irregular element is located through a page segmentation algorithm, and record the structural parameters of the independent page;
[0055] Step S30, calculating the absolute coordinates of the irregular element in the independent page according to the structural parameters;
[0056] Step S40: Using a region matching algorithm, the absolute coordinates of the irregular element are compared with the blank area of the page to determine the best embedding position and complete the layout.
[0057] In order to more clearly illustrate the intelligent processing method of irregular document elements of the present invention, the following Figure 1 Each step in the embodiment of the present invention is described in detail, including step S10 to step S40, and each step is described in detail as follows:
[0058] Step S10: Identify irregular elements in the document and extract attribute features and original position information; the irregular elements include at least surrounding tables, images, or objects to be embedded; the attribute features include at least the size, style, and type mark of the irregular elements; the position information is specific coordinates relative to the page or paragraph;
[0059] In this embodiment, the irregular element is a surrounding table. Through document parsing technology, all tables in the document are traversed to identify and mark the surrounding tables. Specific marking information is set for each surrounding table so that it can be quickly identified and located in subsequent processing.
[0060] Step S20, based on the position information and the attribute characteristics, determine the page number information of the independent page where the irregular element is located through a page segmentation algorithm, and record the structural parameters of the independent page;
[0061] The structural parameters include at least one or more of page margins, paper size, number of columns and column spacing, header / footer height, paragraph first line indentation, and paragraph spacing.
[0062] In this embodiment, the page number information where the irregular element is located is extracted. This step is achieved by parsing the page structure of the document to ensure that subsequent processing can be performed on a specific page. Specifically, the page segmentation algorithm includes the following steps:
[0063] S21, based on the position information of the irregular element, traverse the document pages to determine an independent page range containing the irregular element;
[0064] S22, parsing the section to which the independent page belongs and its format settings, including page margins, header and footer distances, paper size, number of columns, and column spacing;
[0065] S23, accurately marking the start position (Start) and end position (End) of the independent page according to the physical page number information, and generating an object (OriginPageInfo) containing page structure parameters;
[0066] S24, separating the independent page range from the original document, and retaining the logical independence of its preceding and following contents from the independent page;
[0067] S25 , based on the parameters in the OriginPageInfo object, restore the original layout of the independent page to ensure that the page margins, paragraph indents, spacing and column structure are consistent with the original text.
[0068] The page structure parameters recorded by the OrignPageInfo object in step S23 include the following properties: HeaderDistance (header distance), FooterDistance (footer distance), FirstLineIndent (first line indent), LeftIndent (left indent), RightIndent (right indent), SpaceBefore (space before paragraph), SpaceAfter (space after paragraph), page width, height and number of columns.
[0069] The document content segmentation in step S24 further includes:
[0070] Splitting the document from the end position (End) of the independent page range to the end of the document, preserving the flow structure of the subsequent content;
[0071] The document is segmented from the start position to the start position (Start) of the independent page range, and the association with the independent page is disconnected to avoid format conflicts.
[0072] The page structure restoration in step S25 includes:
[0073] Reassign the horizontal starting point and width of the column according to the column information in the OriginPageInfo object;
[0074] Adjust the position of elements within the page based on margin and paragraph indent parameters to ensure visual consistency with the original document.
[0075] Step S30, calculating the absolute coordinates of the irregular element in the independent page according to the structural parameters, specifically includes:
[0076] Step S31, determining the vertical absolute position of the irregular element in combination with the vertical margin, paragraph start position and line spacing of the page;
[0077] Step S311, selecting the reference origin coordinates according to the positioning method of the irregular element;
[0078] Step S312, calculating the longitudinal offset between the coordinates of the upper left corner of the irregular element and the coordinates of the reference origin;
[0079] Step S313 : performing coordinate superposition of the reference origin coordinates and the longitudinal offset to generate the longitudinal absolute position of the irregular element within the page.
[0080] Step S32: determining the horizontal absolute position of the irregular element according to the horizontal starting point and column width of the column and the width of the irregular element.
[0081] Step S321, parsing the column configuration of the independent page to obtain the number of columns, the horizontal starting point coordinates of each column, and the column width;
[0082] Step S322, based on the vertical absolute position of the irregular element, determining the column range covered by the vertical region where the irregular element is located, and selecting the target column containing the vertical region;
[0083] Step S323: judging whether the remaining horizontal space of the target column meets the embedding condition based on the column width of the target column and the width of the irregular element;
[0084] If the conditions are met, the horizontal starting point coordinates of the irregular element are calculated to generate the horizontal absolute position;
[0085] If not, the horizontal starting points and widths of adjacent columns are traversed, the available column range is re-matched, and the horizontal absolute position is generated again based on step S323.
[0086] Step S324: When there is an available target column, the horizontal absolute position of the irregular element is limited to the horizontal starting point and column width of the matching column.
[0087] The positioning method of the irregular element includes at least one of the following situations:
[0088] If the irregular element is set to be positioned relative to the page, the upper left corner of the page (0, 0) is used as the reference origin;
[0089] If the irregular element is set to be positioned relative to the page margin, then based on the page margin parameters of the section to which the independent page belongs, the offset of the page margin boundary relative to the upper left corner of the page is calculated as the reference origin;
[0090] If the irregular element is set to be positioned relative to the paragraph, the reference origin of the paragraph is determined by analyzing the absolute position of the first line element of the paragraph within the page center and combining it with the page margin parameters.
[0091] More specifically, the absolute position of the wrapping table is calculated based on the relative position stored in the wrapping table information, combined with the position differences between the page, margins, and paragraphs. If the wrapping table is positioned relative to the page, this position is used directly as the absolute position. If the wrapping table is positioned relative to the margins, the specific values of the top, bottom, left, and right margins of all pages in the section containing the table are obtained, as well as the overall page width and height information, including the distances of the header and footer from the top and bottom of the page. This data allows the precise calculation of the top margin's position relative to the page's top-left corner (0,0). Next, combined with the position offset of the table's top-left corner relative to the margins, the table's absolute position within the entire page can be further calculated. If the wrapping table is positioned relative to a paragraph, the position of the first element in the paragraph relative to the top-left corner of the page (i.e., the printable area after removing the margins) must be determined. Using the specific margin values, the absolute position of the paragraph's top-left corner on the page is calculated. Using information such as line spacing and text width, the total number of lines in the paragraph can be calculated. At the same time, taking into account the possible spacing before and after the paragraph, the overall range of the paragraph can be further clarified. Based on the absolute position and range information of the above paragraph, by calculating the relative position difference between the upper left corner of the table and the upper left corner of the paragraph, the absolute position of the upper left corner of the table on the page can be obtained. According to the relative relationship between the upper and lower positions of the table and the paragraph range, the correct embedding position of the table in the document can be determined.
[0092] Step S40: Using a region matching algorithm, the absolute coordinates of the irregular element are compared with the blank area of the page to determine the best embedding position and complete the layout.
[0093] In this embodiment, the surrounding table is accurately embedded into the corresponding position of the original document according to the calculated embedding position information. During the embedding process, the layout relationship between the surrounding table and the surrounding text is considered to ensure that the document structure after embedding is clear and beautiful.
[0094] The specific region matching algorithm in this embodiment is as follows:
[0095] Step S41, parsing the hierarchical structure of the document, identifying titles, subtitles, paragraphs and their logical relationships, and generating a document structure tree;
[0096] Step S42, according to the semantic content of the irregular element (such as a table title or a keyword), matching its associated title or paragraph through a natural language processing algorithm to determine a target insertion area;
[0097] Step S43: If the irregular element has no explicit associated title, inferring a logically associated region based on its context (such as the subject of an adjacent paragraph);
[0098] Step S44, starting from the associated area (e.g., below the title), divide the candidate vacant areas according to page columns, paragraph spacing, and existing element positions;
[0099] Step S45, calculating the area, shape and vertical distance of each candidate region from the associated region, and generating a priority ranking list;
[0100] Step S46, traversing the priority list to verify whether the candidate area meets the size requirements (width, height) of the irregular element;
[0101] If the conditions are met, further detect the risk of overlapping boundaries between the region and existing elements (text, images, etc.);
[0102] If there is no conflict, the area is selected as the best embedding position; if there is a conflict, dynamic adjustment is triggered:
[0103] Vertical adjustment: Move the irregular elements down the page until a conflict-free area is found;
[0104] Horizontal adjustment: switch to the adjacent column within the column range and re-adapt the space;
[0105] Paging processing: if there is no available area on the current page, embed the irregular elements into a new page and retain the columns and format parameters of the original page;
[0106] Step S47, after embedding, automatically adjust the spacing before and after paragraphs in the associated area (such as the paragraph below the title) to avoid content discontinuity;
[0107] According to the embedding position of the irregular elements, cross-references (such as chart numbers and hyperlinks) are updated synchronously to ensure the internal logical consistency of the document.
[0108] The document types processed by the intelligent processing method in this embodiment include at least Word and WPS. Figure 2-Figure 4 ,in, Figure 2 and Figure 3 The following are schematic diagrams of the same document page opened in Word and WPS. It can be seen that after opening these two software, Table 6 is surrounded and suspended above the paragraph, but after being processed by this method, see Figure 4 , you can clearly see that the table has been fully embedded in the correct position.
[0109] Although the various steps in the above embodiment are described in the above-mentioned order, those skilled in the art will understand that in order to achieve the effect of this embodiment, different steps do not have to be executed in such an order. They can be executed simultaneously (in parallel) or in a reverse order. These simple changes are within the scope of protection of the present invention.
[0110] A second embodiment of the present invention provides an intelligent processing system for irregular document elements. Based on the intelligent processing method for irregular document elements described in the first embodiment, the system includes:
[0111] a feature and position extraction module configured to identify irregular elements in a document and extract attribute features and original position information; the irregular elements at least include surrounding tables, images, or objects to be embedded; the attribute features at least include the size, style, and type mark of the irregular elements; and the position information is specific coordinates relative to a page or paragraph;
[0112] a page segmentation module configured to determine, based on the position information and the attribute characteristics, page number information of the independent page where the irregular element is located by a page segmentation algorithm, and record structural parameters of the independent page;
[0113] a coordinate calculation module configured to calculate the absolute coordinates of the irregular element within the independent page according to the structural parameters;
[0114] The embedding module is configured to compare the absolute coordinates of the irregular element with the blank area of the page through an area matching algorithm, determine the best embedding position and complete the typesetting.
[0115] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working process and related instructions of the system described above can refer to the corresponding process in the aforementioned method embodiment and will not be repeated here.
[0116] It should be noted that the intelligent processing system for irregular document elements provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the modules or steps in the embodiments of the present invention can be decomposed or combined. For example, the modules in the above embodiment can be combined into one module, or further divided into multiple sub-modules to complete all or part of the functions described above. The names of the modules and steps involved in the embodiments of the present invention are only for distinguishing the modules or steps and are not regarded as improper limitations on the present invention.
[0117] An electronic device according to a third embodiment of the present invention includes:
[0118] at least one processor; and
[0119] a memory communicatively connected to at least one of the processors; wherein,
[0120] The memory stores instructions that can be executed by the processor, and the instructions are used to be executed by the processor to implement the above-mentioned intelligent processing method for irregular document elements.
[0121] A fourth embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to be executed by the computer to implement the above-mentioned intelligent processing method for irregular document elements.
[0122] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes and related instructions of the storage device and processing device described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0123] Those skilled in the art should be able to appreciate that, in conjunction with the modules and method steps of each example described in the embodiments disclosed herein, it is possible to implement them with electronic hardware, computer software, or a combination of the two, and the programs corresponding to the software modules and method steps can be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium known in the art. In order to clearly illustrate the interchangeability of electronic hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in electronic hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0124] The terms "first", "second", etc. are used to distinguish similar objects, rather than to describe or indicate a particular order or sequence.
[0125] The term "comprise" or any other similar term is intended to cover non-exclusive inclusion such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed or inherent to such process, method, article, or apparatus.
[0126] Thus far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art may make equivalent changes or substitutions to the relevant technical features, and the technical solutions after such changes or substitutions will fall within the scope of protection of the present invention.
Claims
1. An intelligent processing method for irregular document elements, characterized in that: The method includes: Identify irregular elements in a document and extract attribute features and original position information; the irregular elements include at least surrounding tables, images, or objects to be embedded; the attribute features include at least the size, style, and type mark of the irregular elements; the position information is specific coordinates relative to the page or paragraph; Based on the position information and the attribute characteristics, determining the page number information of the independent page where the irregular element is located through a page segmentation algorithm, and recording the structural parameters of the independent page; Calculating the absolute coordinates of the irregular element within the independent page according to the structural parameters; By using an area matching algorithm, the absolute coordinates of the irregular element are compared with the blank area of the page to determine the best embedding position and complete the layout.
2. The method for intelligently processing irregular document elements according to claim 1, characterized in that: The structural parameters include at least one or more of page margins, paper size, number of columns and column spacing, header / footer height, paragraph first line indentation, and paragraph spacing.
3. The method for intelligently processing irregular document elements according to claim 2, characterized in that: The absolute coordinates of the irregular element in the independent page are calculated according to the structural parameters, and the specific method is as follows: Determine the vertical absolute position of the irregular element based on the vertical margin, paragraph start position, and line spacing of the page; The horizontal absolute position of the irregular element is determined according to the horizontal starting point and the column width of the column and the width of the irregular element.
4. The method for intelligently processing irregular document elements according to claim 3, characterized in that: The specific calculation method of the longitudinal absolute position is: Selecting the coordinates of the reference origin according to the positioning method of the irregular element; Calculating the longitudinal offset between the coordinates of the upper left corner of the irregular element and the coordinates of the reference origin; The reference origin coordinates and the longitudinal offset are superimposed to generate the longitudinal absolute position of the irregular element within the page.
5. The intelligent processing method for irregular document elements according to claim 4, characterized in that: The positioning methods of irregular elements include at least one of the following situations: If the irregular element is set to be positioned relative to the page, the upper left corner of the page (0, 0) is used as the reference origin; If the irregular element is set to be positioned relative to the page margin, then based on the page margin parameters of the section to which the independent page belongs, the offset of the page margin boundary relative to the upper left corner of the page is calculated as the reference origin; If the irregular element is set to be positioned relative to the paragraph, the reference origin of the paragraph is determined by analyzing the absolute position of the first line element of the paragraph within the page center and combining it with the page margin parameters.
6. The method for intelligently processing irregular document elements according to claim 3, characterized in that: The calculation method of the horizontal absolute position is: Parsing the column configuration of the independent page to obtain the number of columns, the horizontal starting point coordinates of each column, and the column width; Based on the absolute vertical position of the irregular element, determine the column range covered by the longitudinal area where the irregular element is located, and select the target column containing the longitudinal area; Determining whether the remaining horizontal space of the target column meets the embedding condition according to the column width of the target column and the width of the irregular element; If it is satisfied, the horizontal starting point coordinates of the irregular element are calculated to generate the horizontal absolute position; if it is not satisfied, the horizontal starting points and column widths of adjacent columns are traversed, the available column range is re-matched, and the horizontal absolute position is generated.
7. The method for intelligently processing irregular document elements according to claim 6, characterized in that: When there is an available target column, the horizontal absolute position of the irregular element is limited to the horizontal starting point and column width of the matching column.
8. The method for intelligently processing irregular document elements according to any one of claims 1 to 7, characterized in that: The document types processed by the intelligent processing method include at least Word and WPS.
9. An intelligent processing system for irregular document elements, based on the intelligent processing method for irregular document elements according to any one of claims 1 to 8, characterized in that: The system includes: a feature and position extraction module configured to identify irregular elements in a document and extract attribute features and original position information; the irregular elements at least include surrounding tables, images, or objects to be embedded; the attribute features at least include the size, style, and type mark of the irregular elements; and the position information is specific coordinates relative to a page or paragraph; a page segmentation module configured to determine, based on the position information and the attribute characteristics, page number information of the independent page where the irregular element is located by a page segmentation algorithm, and record structural parameters of the independent page; a coordinate calculation module configured to calculate the absolute coordinates of the irregular element within the independent page according to the structural parameters; The embedding module is configured to compare the absolute coordinates of the irregular element with the blank area of the page through an area matching algorithm, determine the best embedding position and complete the typesetting.
10. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to at least one of the processors; wherein, The memory stores instructions that can be executed by the processor, and the instructions are used to be executed by the processor to implement an intelligent processing method for irregular document elements based on any one of claims 1-8.