Long graph intelligent slitting method and system based on element weight optimization and convolution penalty

Through an intelligent long image segmentation method based on element weight optimization and convolution penalty, the U-Net model is used to identify and generate a weight distribution map, and a convolution kernel is constructed for segmentation. This solves the problem that the existing long image segmentation method cannot protect the integrity of text, tables and pictures, and realizes fully automatic and adaptive long image segmentation, improving the user experience.

CN120689609APending Publication Date: 2025-09-23SHENZHEN JINNIU TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510579498.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-07
Publication Date
2025-09-23

Smart Images

  • Figure CN120689609A_ABST
    Figure CN120689609A_ABST
Patent Text Reader

Abstract

The invention provides an intelligent long graph slitting method and system based on element weight optimization and convolution punishment, and the method comprises the steps: optimizing the weights of text, table and image elements, and designing a convolution punishment mechanism, so as to more globally and intelligently slit a long graph. Compared with a traditional long image segmentation method (a fixed height segmentation method, a blank area detection method and a machine learning single element protection method), the method can forcibly avoid a high-density content area, is adaptive to different equipment sizes, achieves the full-automatic segmentation and paragraph combination, does not need to manually intervene in the segmentation result again, and improves the user experience. Experimental data show that compared with a traditional long graph segmentation method, the intelligent long graph segmentation method based on element weight optimization and convolution penalty has the advantages that the element cutting rate and the number of paragraph fractures are remarkably reduced, the user satisfaction is remarkably improved, and the intelligent long graph segmentation method based on element weight optimization and convolution penalty is suitable for scenes such as mobile terminal content display, document printing and typesetting, social media sharing and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of image processing and computer vision, and in particular relates to a method and system for intelligently segmenting long images based on element weight optimization and convolution penalty. Background Art

[0002] In various scenarios such as mobile content display, document printing and typesetting, and social media sharing, long images often need to be segmented. Traditional methods for segmenting long images include fixed height segmentation, blank area detection, and machine learning single element protection. These three methods have the following drawbacks: 1. Fixed-height segmentation: Slicing long images at fixed heights (e.g., every 800 pixels) can cause key elements like text paragraphs, tables, and images to be cut off. The cut lines randomly destroy elements, compromising the integrity of the information. Users must manually piece together the content, resulting in a poor user experience. 2. White space detection: This method identifies cut lines based on white space, but it cannot handle complex layouts (such as overlapping elements and irregular white space). Cut lines may pass through high-density content areas, thus destroying the integrity of the information. 3. Machine learning single-element protection method: This method only protects a single element (such as text). It cannot resolve cutting conflicts in scenarios where multiple elements coexist. It lacks global optimization and results in uneven cutting results.

[0003] Therefore, it is necessary to develop a smarter long image segmentation method to improve user experience.

[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of this disclosure. Summary of the Invention

[0005] In order to overcome the shortcomings and deficiencies of the existing technology, the purpose of the present invention is to provide a method and system for intelligently segmenting long images based on element weight optimization and convolution penalty, so as to segment long images more intelligently and improve user experience.

[0006] The purpose of the present invention is achieved through the following technical solutions: According to one aspect of the present invention, a method for intelligently segmenting a long image based on element weight optimization and convolution penalty is provided, the method comprising: A neural network model is used to identify the regions of text, tables, and images in long images, and weights are assigned to these regions based on their priorities to generate a weight distribution map. Perform semantic analysis on adjacent paragraphs to check their completeness and merge complete paragraphs; Construct a convolution kernel with the same size as the target segmentation, with a positive weight coefficient in the center area and a negative weight coefficient in the edge area, and penalize the segmentation line passing through the element-dense area; Slide the constructed convolution kernel along the long image, calculate the convolution score of the weight distribution map, and select the position with the highest convolution score as the cutting line.

[0007] Based on the above scheme, the neural network model is a U-Net model.

[0008] Based on the above scheme, the U-Net model is pre-trained through the following steps: Build a dataset: Collect mixed document images (such as scans or PDF screenshots) containing text, tables, and images, and annotate each type of region at the pixel level. Loss function design: A composite loss of Dice Loss (to address class imbalance) and BCE Loss (to refine boundaries) is used for each type of region. The total loss is the weighted sum of each type of region. Training strategy: training in stages, first training the table branch individually, then training all branches together; Dynamic weight adjustment: Automatically adjust the learning rate weights of text / table / image branches based on the performance of the validation set; Post-processing and result fusion: regional denoising and correction, applying morphological operations to the predicted table area (such as closing operations to connect broken table lines), and reconstructing cells through intersection sorting method.

[0009] Based on the above solution, the annotation is specifically: marking text lines or paragraph boundaries for the text area, marking the table outer frame and internal structure lines for the table area, and marking the image outline for the picture area.

[0010] Based on the above scheme, the priority is ranked from high to low by weight: image > table > text. For example, you can set the weight of text elements to 1.0 (less destructive, but the paragraph must be kept intact), the weight of table elements to 1.5 (difficult to understand after cutting, requiring a higher level of protection than text elements), and the weight of image elements to 2.0 (the most destructive cutting, requiring the highest weight).

[0011] Based on the above solution, the weight of the area with overlapping elements in the weight distribution diagram is the sum of the weights of each element. The weight superposition formula can be shown as follows: Weight_Map(x,y)=Σ(Paragraph_weight+Table_weight+Picture_weight), where (x,y) represents the horizontal and vertical coordinates of a pixel in the long image, and Weight_Map(x,y) represents the total weight of a pixel in the long image (the cumulative weight of the text, table, and image at that pixel). Paragraph_weight represents the text weight, Table_weight represents the table weight, and Picture_weight represents the image weight. For example, if the pixel is within a text range, the text weight is assigned; otherwise, the text weight is zero. The same logic applies to tables and images.

[0012] Based on the above scheme, the semantic analysis includes semantic coherence analysis and format consistency verification. Semantic coherence includes semantic coherence of adjacent paragraph sub-graph texts in the semantic dimension. For example, if the punctuation mark at the end of the previous paragraph is a non-ending symbol such as a comma, semicolon, ellipsis, etc., and the first sentence of the next paragraph is the second half of the sentence, the upper and lower paragraphs are merged into one paragraph. Format consistency includes considering the consistency of paragraph format in the typesetting dimension, such as the same indentation, font, and line spacing.

[0013] Based on the above scheme, the penalty cutting line passing through the element-dense area includes: setting the upper and lower edge pixel thresholds of the convolution kernel to negative values, and if it cuts into a text paragraph, table or picture, the convolution kernel score value becomes low.

[0014] Based on the aforementioned scheme, the convolution kernel's edge negative weight coefficient is inversely proportional to the target segmentation size. Because it's important to minimize the cutting of text paragraphs, tables, and images, the kernel's upper and lower edge pixel thresholds (e.g., 50 pixels) are set to negative values ​​to impose penalties. More precisely, values ​​closer to the upper and lower edges can be set to larger negative values, while those closer to the center can be set to slightly smaller negative values, ensuring that edges cutting into the middle of the weight distribution map result in smaller regional weights.

[0015] According to another aspect of the present invention, a system for intelligently segmenting long images based on element weight optimization and convolution penalty is provided, which is applicable to the above-mentioned method for intelligently segmenting long images based on element weight optimization and convolution penalty. The system comprises: The element recognition module is used to identify the regions of text, tables, and pictures in long images through a neural network model, and to generate a weight distribution map by assigning regional weights according to priority. Semantic analysis module, used to perform semantic analysis on adjacent paragraphs to check their integrity and merge complete paragraphs; The convolution kernel construction module is used to construct a convolution kernel with the same size as the target segmentation. The weight coefficient of the central area is positive, the weight coefficient of the edge area is negative, and the penalty segmentation line passes through the element-dense area. The cutting module is used to slide the constructed convolution kernel along the long image, calculate the convolution score of the weight distribution map, and select the position with the highest convolution score as the cutting line.

[0016] The present invention has the following advantages and effects compared to the prior art: (1) The long image intelligent segmentation method based on element weight optimization and convolution penalty of the present invention optimizes the weights of text, table and image elements and designs a convolution penalty mechanism to segment long images more globally and intelligently. Compared with traditional long image segmentation methods (fixed height segmentation method, blank area detection method and machine learning single element protection method), it can forcibly avoid high-density content areas, adapt to different device sizes, and realize fully automatic segmentation and paragraph merging without manual intervention in the segmentation results, thereby improving user experience.

[0017] (2) Experimental data show that the long image intelligent segmentation method based on element weight optimization and convolution penalty has significantly reduced the element cutting rate and the number of paragraph breaks compared with traditional long image segmentation methods (fixed height segmentation method, blank area detection method and machine learning single element protection method), and significantly improved user satisfaction. It is suitable for scenarios such as mobile content display, document printing and typesetting, and social media sharing.

[0018] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The accompanying drawings are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and those skilled in the art can derive other drawings based on these drawings without inventive effort. In the drawings: Figure 1 This is a schematic diagram of the steps of the long image intelligent segmentation method based on element weight optimization and convolution penalty in Example 1.

[0020] Figure 2 This is an example diagram of the weight distribution graph generated by the long graph intelligent segmentation method based on element weight optimization and convolution penalty in Example 1.

[0021] Figure 3 This is a schematic diagram of the pre-training steps of the U-Net model in the long image intelligent segmentation method based on element weight optimization and convolution penalty in Example 2.

[0022] Figure 4 This is a schematic diagram of the module relationship of the long image intelligent segmentation system based on element weight optimization and convolution penalty in Example 3. DETAILED DESCRIPTION

[0023] The embodiments of the present invention will be clearly and completely described below with reference to the examples. The examples described are only some of the embodiments of the present invention, rather than all of them. The following description of at least one exemplary embodiment is actually only illustrative and is in no way intended to limit the present invention and its application or use. All other embodiments obtained by ordinary technicians in this field based on the examples in the present invention without making any creative work are within the scope of protection of the present invention.

[0024] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, while others may be combined or partially combined. Therefore, the actual execution order may vary depending on the actual situation.

[0025] Example 1 like Figure 1 As shown, this embodiment provides a long image intelligent segmentation method based on element weight optimization and convolution penalty, the method comprising the following steps: S1. Use a neural network model to identify the regions of text, table, and image elements in a long image, and assign regional weights according to priority to generate a weight distribution map.

[0026] In this embodiment, the neural network model is a U-Net model.

[0027] In this embodiment, the priority is ranked from high to low by weight: image > table > text. Cutting off text elements is less destructive, but the paragraph must be kept intact. Table elements are difficult to understand after being cut off, so they require a higher level of protection than text elements. Image elements are the most destructive when cut off, so they are given the highest weight.

[0028] In this embodiment, the weight of the area with overlapping elements in the weight distribution diagram is the sum of the weights of each element. The weight distribution diagram can be presented in the form of a heat map, such as Figure 2 As shown in the example, the weight heat map highlights three element areas: text, table, and image.

[0029] S2. Perform semantic analysis on adjacent paragraphs to check their completeness and merge the complete paragraphs.

[0030] In this embodiment, the semantic analysis includes semantic coherence analysis and format consistency verification. Semantic coherence includes semantic coherence of adjacent paragraph sub-image texts in the semantic dimension. For example, when the punctuation mark at the end of the previous paragraph is a non-ending symbol such as a comma, semicolon, ellipsis, etc., and the first sentence of the next paragraph is the second half of the sentence, the upper and lower paragraphs are merged into one paragraph. Format consistency includes considering the consistency of paragraph format in the typesetting dimension, such as the same indentation, font, and line spacing.

[0031] S3. Construct a convolution kernel with the same size as the target segmentation, with a positive weight coefficient in the central area and a negative weight coefficient in the edge area, to penalize the segmentation line passing through the element-dense area.

[0032] In this embodiment, the penalty cutting line passing through the element-dense area includes: setting the pixel thresholds of the upper and lower edges of the convolution kernel to negative values, and if the convolution kernel cuts into a text paragraph, a table, or a picture, the convolution kernel score value becomes low.

[0033] S4. Slide the constructed convolution kernel along the long image, calculate the convolution score of the weight distribution map, and select the position with the highest convolution score as the cutting line.

[0034] In this embodiment, the negative edge weight coefficient of the convolution kernel is inversely proportional to the target segmentation size. Because it's important to minimize the cutting of text paragraphs, tables, and images, the upper and lower pixel thresholds (e.g., 50 pixels) of the convolution kernel's edges are set to negative values ​​to impose penalties. More specifically, values ​​closer to the upper and lower edges can be set to a larger negative value, while those closer to the center can be set to a slightly smaller negative value, ensuring that edges cutting into the middle of the weight distribution map result in a smaller regional weight.

[0035] The intelligent long image segmentation method based on element weight optimization and convolution penalty in the present invention optimizes the weights of text, table, and image elements and designs a convolution penalty mechanism to segment long images more globally and intelligently. Compared with traditional long image segmentation methods (fixed height segmentation method, blank area detection method, and machine learning single element protection method), it can forcibly avoid high-density content areas, adapt to different device sizes, and achieve fully automatic segmentation and paragraph merging, eliminating the need for manual intervention in the segmentation results, thereby improving the user experience.

[0036] Example 2 This embodiment provides a method for intelligently segmenting a long image based on element weight optimization and convolution penalty. The method includes the following steps: S1. Use a neural network model to identify the regions of text, table, and image elements in a long image, and assign regional weights according to priority to generate a weight distribution map.

[0037] In this embodiment, the neural network model is a U-Net model. Figure 3As shown, in this embodiment, the U-Net model is pre-trained through the following steps: S01. Build a dataset: Collect 100,000 mixed document images (such as scans or PDF screenshots, in COCO format) containing text, tables, and images, and annotate each type of region at the pixel level. S02. Loss function design: A composite loss of Dice Loss (to address class imbalance) and BCE Loss (to refine boundaries) is used for each type of region. The total loss is the weighted sum of each type of region. S03, training strategy: training in stages, first training the table branch separately, then training all branches together; S04, Dynamic Weight Adjustment: Automatically adjust the learning rate weights of text / table / image branches based on the performance of the validation set; S05. Post-processing and result fusion: regional denoising and correction, applying morphological operations to the predicted table area (such as closing operations to connect broken table lines), and reconstructing cells through the intersection sorting method.

[0038] In this embodiment, the annotations specifically include: marking text lines or paragraph boundaries in text areas, marking table borders and internal structure lines in table areas, and marking image outlines in image areas. This embodiment further reduces the complexity of U-Net post-processing, enabling real-time inference on mobile devices (inference time <50ms / frame).

[0039] In this embodiment, the priority is ranked from high to low by weight: image > table > text. Cutting off text elements is less destructive, but the paragraph must be kept intact, so the weight of text elements is set to 1.0. Table elements are difficult to understand after being cut off, so they require a higher level of protection than text elements, and the weight of table elements is set to 1.5. Image elements are the most destructive when cut off, so they are given the highest weight, and the weight of image elements is set to 2.0.

[0040] In this embodiment, in the weight distribution graph, the weight of the area with overlapping elements is the sum of the weights of each element. The weight superposition formula can be as follows: Weight_Map(x,y)=Σ(Paragraph_weight+Table_weight+Picture_weight), Where (x, y) represents the horizontal and vertical coordinates of a pixel in the long image, and Weight_Map(x, y) represents the total weight of a pixel in the long image (the cumulative weight of the text, table, and image at that pixel). Paragraph_weight represents the text weight, Table_weight represents the table weight, and Picture_weight represents the image weight. For example, if the pixel is within a text range, the text weight is assigned; otherwise, the text weight is zero. The same logic applies to tables and images.

[0041] For example, the weight distribution map is in the form of a heat map, and an example of weight overlay is shown below: # Input: Mask map of text / table / image (binarization) text_mask = load_mask("text_mask.png") table_mask = load_mask("table_mask.png") image_mask = load_mask("image_mask.png") weight_map = 1.0 * text_mask + 1.5 * table_mask + 2.0 * image_mask ``` Weight matrix generation: weight_map is the weight matrix corresponding to the long image. The elements in the matrix correspond to the points in the long image. The heat map (binary map) area of ​​the identified text, table, and image areas is loaded. The value of each weight_map pixel is the superposition of the weights of the three element types multiplied by the coefficients.

[0042] S2. Perform semantic analysis on adjacent paragraphs to check their completeness and merge the complete paragraphs.

[0043] In this embodiment, the semantic analysis includes semantic coherence analysis and format consistency verification. Semantic coherence includes semantic coherence of adjacent paragraph sub-image texts in the semantic dimension. For example, when the punctuation mark at the end of the previous paragraph is a non-ending symbol such as a comma, semicolon, ellipsis, etc., and the first sentence of the next paragraph is the second half of the sentence, the upper and lower paragraphs are merged into one paragraph. Format consistency includes considering the consistency of paragraph format in the typesetting dimension, such as the same indentation, font, and line spacing.

[0044] S3. Construct a convolution kernel with the same size as the target segmentation, with a positive weight coefficient in the central area and a negative weight coefficient in the edge area, to penalize the segmentation line passing through the element-dense area.

[0045] In this embodiment, the penalty for cutting lines that pass through densely populated areas includes setting the pixel thresholds for the upper and lower edges of the convolution kernel to negative values. If the convolution kernel cuts through a text paragraph, table, or image, the convolution kernel score becomes lower. Specifically, the convolution kernel edge penalty mechanism in this implementation is as follows: The width and height of the convolution kernel are designed to be equal to the width and height of the image target segmentation size. For example, the height H = 800 pixels: The initial convolution kernel is kernel = np.ones((H, 1)), which means initializing a unit matrix with a height of 800 and a width equal to the width of the image; kernel[:50, :] = -0.3 # 50 pixel penalty on the upper edge; kernel[-50:, :] = -0.3 # 50 pixel penalty on the bottom edge; The values ​​of the top and bottom 50 pixels of the matrix are set to -0.3. This means that if the image, table, or text paragraph is cut, the convolution value will become smaller, ensuring that if the target object is cut above or below, it will be penalized and the final convolution score will be low. This will minimize the chance of cutting into areas such as images, tables, and text paragraphs.

[0046] Optionally, the convolution kernel's edge negative weight coefficient can be set to be inversely proportional to the target segmentation size. Since it's important to avoid cutting text paragraphs, tables, and images, the kernel's upper and lower edge pixel thresholds (e.g., the 50 pixels mentioned above) are set to negative values ​​to impose penalties. More precisely, values ​​closer to the upper and lower edges can be set to a larger negative value, while those closer to the center can be set to a slightly smaller negative value, ensuring that edges cutting into the middle of the weight distribution map result in smaller regional weights.

[0047] S4. Slide the constructed convolution kernel along the long image, calculate the convolution score of the weight distribution map, and select the position with the highest convolution score as the cutting line.

[0048] In this embodiment, the convolution score is calculated as follows: Score =Σ(Weight_Map(x,y) * Kernel(x,y)), A kernel, or convolution kernel, is generated from the identity matrix, meaning that the value corresponding to each point is 1. Therefore, when performing a convolution operation on a long image, the weights of each point in the detection area are actually summed. This only reflects the larger heatmap area covered by the region, but does not indicate whether the upper and lower edges of the region pass through the center of the heatmap. (If tables, text paragraphs, images, etc. are cut during segmentation, this is obviously not the desired result.) Therefore, this embodiment sets the 50 pixels above and below the convolution kernel to negative values. This way, if a table, text paragraph, or image is cut, the convolution sum value will be smaller, and these areas will not be selected for segmentation during the final evaluation.

[0049] The intelligent long image segmentation method based on element weight optimization and convolution penalty in the present invention optimizes the weights of text, table, and image elements and designs a convolution penalty mechanism to segment long images more globally and intelligently. Compared with traditional long image segmentation methods (fixed height segmentation method, blank area detection method, and machine learning single element protection method), it can forcibly avoid high-density content areas, adapt to different device sizes, and achieve fully automatic segmentation and paragraph merging, eliminating the need for manual intervention in the segmentation results, thereby improving the user experience.

[0050] Example 3 like Figure 4 As shown, this embodiment provides a long image intelligent segmentation system based on element weight optimization and convolution penalty, which is applicable to the long image intelligent segmentation method based on element weight optimization and convolution penalty described in Examples 1 and 2. The system includes the following modules: The element recognition module is used to identify the regions of text, tables, and pictures in long images through a neural network model, and to generate a weight distribution map by assigning regional weights according to priority. Semantic analysis module, used to perform semantic analysis on adjacent paragraphs to check their integrity and merge complete paragraphs; The convolution kernel construction module is used to construct a convolution kernel with the same size as the target segmentation. The weight coefficient of the central area is positive, the weight coefficient of the edge area is negative, and the penalty segmentation line passes through the element-dense area. The cutting module is used to slide the constructed convolution kernel along the long image, calculate the convolution score of the weight distribution map, and select the position with the highest convolution score as the cutting line.

[0051] In this embodiment, the neural network model is a U-Net model; the priority is sorted from high to low by weight: picture > table > text; in the weight distribution diagram, the weight of the area with overlapping elements is the sum of the weights of each element; the semantic analysis includes semantic coherence analysis and format consistency verification; the penalty dividing line passing through the element-dense area includes: setting the pixel thresholds of the upper and lower edges of the convolution kernel to negative values, and if it cuts into a text paragraph, table and picture, the convolution kernel score value becomes low.

[0052] The intelligent long image segmentation method based on element weight optimization and convolution penalty in the present invention optimizes the weights of text, table, and image elements and designs a convolution penalty mechanism to segment long images more globally and intelligently. Compared with traditional long image segmentation methods (fixed height segmentation method, blank area detection method, and machine learning single element protection method), it can forcibly avoid high-density content areas, adapt to different device sizes, and achieve fully automatic segmentation and paragraph merging, eliminating the need for manual intervention in the segmentation results, thereby improving the user experience.

[0053] Example 4 This embodiment provides performance test results of the long image intelligent segmentation method based on element weight optimization and convolution penalty in embodiment 2 of the present invention.

[0054] This embodiment compares the technical effects of the present invention and the fixed height segmentation method based on three indicators: element cutting rate, number of paragraph breaks, and user satisfaction.

[0055] 1. Element Disruption Rate The element cutoff rate is a core indicator for measuring the performance of long image segmentation algorithms in the field of image processing. It refers to the percentage of valid elements (such as text segments, image areas, tables, etc.) that are accidentally cut off during the long image segmentation process. The calculation formula is: Cutoff rate = number of cutoff elements / total number of elements * 100.

[0056] 2. Number of paragraph breaks The number of paragraph breaks refers to the average number of times that continuous text segments (such as paragraphs, tables, images, etc.) are forcibly truncated by the segmentation line during the long image segmentation process.

[0057] The test methods for element cutoff rate and paragraph breakage times are as follows: 1) Dataset Preparation ICDAR 2017 MLT dataset: Contains 5,000 images in 10 languages ​​(such as Chinese, English, and Arabic). (Note: This is an authoritative dataset released by the International Conference on Document Analysis and Recognition (ICDAR), focusing on text detection, segmentation, and recognition.) Verification focus: Segmentation integrity of overlapping areas of multilingual text and images.

[0058] 2) Scenario Coverage Strategy

[0059] Cut-off marking rule: elements that intersect with the dividing line are marked as cut, otherwise they are marked as complete.

[0060] Verification process: 5,000 images were tested. The element truncation rate was calculated as the number of truncation elements / total number of elements*100, and the number of truncation paragraphs / 5,000 was the number of paragraph truncation times. The test results are shown in Table 1.

[0061] 3. User Satisfaction: Scoring results are set on a scale of 1-5. The testing method involves recruiting 10 people to manually score 20 long image samples, with scores divided into five levels. Each person's scores for the 20 images are averaged. The mean square error (MSD) of these scores across the 10 samples is calculated. If the mean square error is greater than 5, the scorer's perception is considered significantly different from the general public's and is removed. Finally, the remaining scores are averaged to form the final user satisfaction score. The test results are shown in Table 1.

[0062] Table 1 Comparison of technical effects of the present invention and the fixed height segmentation method

[0063] Experimental data shows that compared with traditional long image segmentation methods (fixed height segmentation method, blank area detection method and machine learning single element protection method), the long image intelligent segmentation method based on element weight optimization and convolution penalty proposed in the present invention significantly reduces the element cutting rate and the number of paragraph breaks, and significantly improves user satisfaction. It is suitable for scenarios such as mobile content display, document printing and typesetting, and social media sharing.

[0064] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow from the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.

[0065] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A long image intelligent segmentation method based on element weight optimization and convolution penalty, characterized by: The method comprises: A neural network model is used to identify the regions of text, tables, and images in long images, and weights are assigned to these regions based on their priorities to generate a weight distribution map. Perform semantic analysis on adjacent paragraphs to check their completeness and merge complete paragraphs; Construct a convolution kernel with the same size as the target segmentation, with a positive weight coefficient in the center area and a negative weight coefficient in the edge area, and penalize the segmentation line passing through the element-dense area; Slide the constructed convolution kernel along the long image, calculate the convolution score of the weight distribution map, and select the position with the highest convolution score as the cutting line.

2. The long image intelligent segmentation method based on element weight optimization and convolution penalty according to claim 1 is characterized in that: The neural network model is a U-Net model.

3. The long image intelligent segmentation method based on element weight optimization and convolution penalty according to claim 2 is characterized in that: The U-Net model is pre-trained through the following steps: Build a dataset: Collect mixed document images containing text, tables, and images, and annotate each type of region at the pixel level. Loss function design: A composite loss of Dice Loss and BCE Loss is used for each type of area, and the total loss is the weighted sum of each type of area; Training strategy: training in stages, first training the table branch individually, then training all branches together; Dynamic weight adjustment: Automatically adjust the learning rate weights of text / table / image branches based on the performance of the validation set; Post-processing and result fusion: regional denoising and correction, applying morphological operations to the predicted table area, and reconstructing cells through the intersection sorting method.

4. The long image intelligent segmentation method based on element weight optimization and convolution penalty according to claim 3 is characterized in that: The marking specifically includes: marking text lines or paragraph boundaries in the text area, marking table outer frames and internal structure lines in the table area, and marking image outlines in the picture area.

5. The long image intelligent segmentation method based on element weight optimization and convolution penalty according to claim 1 is characterized in that: The priority is sorted from high to low by weight: picture > table > text.

6. The long image intelligent segmentation method based on element weight optimization and convolution penalty according to claim 1 is characterized in that: In the weight distribution graph, the weight of the area where elements overlap is the sum of the weights of all elements.

7. The long image intelligent segmentation method based on element weight optimization and convolution penalty according to claim 1 is characterized in that: The semantic analysis includes semantic coherence analysis and format consistency verification.

8. The long image intelligent segmentation method based on element weight optimization and convolution penalty according to claim 1 is characterized in that: The penalty cutting line passing through the element-dense area includes: setting the pixel thresholds of the upper and lower edges of the convolution kernel to negative values, and if the convolution kernel cuts into a text paragraph, a table, or a picture, the convolution kernel score value becomes low.

9. The long image intelligent segmentation method based on element weight optimization and convolution penalty according to claim 1 is characterized in that: The negative edge weight coefficient of the convolution kernel is inversely proportional to the target segmentation size.

10. A system for intelligently segmenting long images based on element weight optimization and convolution penalty, applicable to the method for intelligently segmenting long images based on element weight optimization and convolution penalty according to any one of claims 1 to 9, characterized in that: The system comprises: The element recognition module is used to identify the regions of text, tables, and pictures in long images through a neural network model, and to generate a weight distribution map by assigning regional weights according to priority. Semantic analysis module, used to perform semantic analysis on adjacent paragraphs to check their integrity and merge complete paragraphs; The convolution kernel construction module is used to construct a convolution kernel with the same size as the target segmentation. The weight coefficient of the central area is positive, the weight coefficient of the edge area is negative, and the penalty segmentation line passes through the element-dense area. The cutting module is used to slide the constructed convolution kernel along the long image, calculate the convolution score of the weight distribution map, and select the position with the highest convolution score as the cutting line.