Multi-graph chat content dynamic splicing method and system
By using YOLO cluster detection and triple similarity matrix sorting, combined with OCR semantic verification, the problem of information fragmentation in chat history pagination screenshots is solved, achieving efficient and accurate cross-page content splicing, which is suitable for legal evidence collection, customer service dispute analysis, and chat history archiving.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-09
- Publication Date
- 2026-04-07
AI Technical Summary
When chat logs are saved as paginated screenshots, the limited display area on a single screen leads to fragmented information and fragmented OCR recognition results. This makes it impossible to automatically recognize and reassemble cross-page content, increasing the time and economic costs of manual comparison and splicing.
The YOLO cluster detection network is used for element-level detection. A triple similarity matrix (edge, color, and text) is constructed to automatically sort and locate paginated screenshots. Cross-image semantic identity verification is performed through OCR recognition to eliminate splicing artifacts and determine the splicing position of cross-image semantic continuity.
It enables logical layout understanding of chat content, improves robustness across devices and themes, reduces missorting and misalignment, and results in visually natural extension of the spliced result, semantic continuity and completeness, and reduces the workload of manual proofreading.
Smart Images

Figure CN121810484A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method and system for dynamically stitching together multi-image chat content. Background Technology
[0002] When chat logs are saved as paginated screenshots, the limited display area on a single screen often results in the same message being split across different screenshots, or the same dialogue bubble, image, or other element being forcibly truncated at the screenshot boundaries. Furthermore, crucial contextual information such as timestamps may be missing from some screenshots. This physical fragmentation directly leads to highly fragmented OCR recognition results; the system can only output scattered text fragments and cannot automatically identify and reconstruct the logical connections between content across pages, thus disrupting the coherence and complete semantics of the conversation. These unstructured recognition results are difficult to use directly for data analysis or archiving, forcing reliance on manual comparison, splicing, and proofreading, significantly increasing time and economic costs. Summary of the Invention
[0003] This application provides a method and system for dynamically stitching together multi-image chat content, which can solve the problem that traditional identification methods for paged screenshots of chat records cannot accurately identify and stitch together, resulting in significant errors, while manual comparison, stitching, and proofreading would significantly increase time and economic costs.
[0004] The first aspect of this application provides a method for dynamically stitching together multi-image chat content, including: Input at least two paginated screenshots of the same chat history that exceed the same display area into the YOLO cluster detection network, perform element-level detection on the paginated screenshots of the chat history, and output the pixel-level bounding box coordinates and category labels of each element. The element categories include the other party's message elements, our own message elements, timestamp elements, and system prompt elements. Based on the pixel-level bounding box coordinates, the corresponding edge features, color features, and text features are extracted for each page screenshot. A triple similarity matrix is constructed to automatically sort the at least two page screenshots and locate the overlapping areas of adjacent screenshots. The triple similarity matrix includes an edge similarity matrix, a color similarity matrix, and a text similarity matrix. For two adjacent chat record screenshots after sorting, cross-image semantic identity verification is performed on the text obtained by OCR recognition in the overlapping area to eliminate splicing artifacts caused by element misalignment and determine the splicing position of cross-image semantic continuity before splicing the chat records of the at least two screenshots.
[0005] Optionally, the step of performing cross-image semantic identity verification on the text obtained by OCR recognition in the overlapping area of two adjacent paginated screenshots of sorted chat records to eliminate splicing artifacts caused by element misalignment and determine the splicing position for cross-image semantic continuity, and splicing the chat records of the at least two paginated screenshots, includes: For two adjacent chat history screenshots after sorting, cross-image semantic identity verification is performed on the text obtained by OCR recognition in the overlapping area. The cross-image semantic identity verification includes comparing the speaker features of corresponding speech elements in the two adjacent chat history screenshots, and using timestamp regularization compensation to fill in missing timestamps, so as to eliminate splicing artifacts caused by element misalignment and determine the splicing position of cross-image semantic continuity before splicing the chat history of the at least two screenshots.
[0006] Optional, also includes: When the chat history pagination screenshots are obtained by scrolling screenshots, the status bar areas that appear repeatedly between the at least two chat history pagination screenshots are detected. The repeated status bar areas are cropped by non-maximum suppression to eliminate the vertical offset and duplicate content of the long screenshot content, and the chat content splicing result after offset correction is obtained.
[0007] Optionally, when the chat history pagination screenshots are obtained by scrolling screenshots, the repeated status bar areas between the at least two chat history pagination screenshots are detected, and the repeated status bar areas are cropped using non-maximum suppression to eliminate vertical offset and duplicate content in long screenshots, resulting in a spliced chat content result after offset correction, including: When the chat history page screenshots are obtained by scrolling screenshot method, target detection is performed on each chat history page screenshot to identify image blocks of message cards and generate a set of candidate boxes for each image block; Non-maximum suppression is performed on the candidate box set between multiple chat history pagination screenshots to determine recurring message cards; Based on the pixel offset of the recurring message card area in the vertical direction, the alignment offset parameter between each chat history pagination screenshot is calculated, and the content area of each chat history pagination screenshot is cropped using the alignment offset parameter. The cropped multiple chat history pagination screenshots are then re-stitched to obtain continuous chat content after offset correction.
[0008] Optionally, the YOLO cluster detection network includes: Multiple lightweight YOLO sub-models optimized for different resolutions and aspect ratios; The method further includes: Based on the resolution, aspect ratio, and compression quality of the input chat history pagination screenshot, the corresponding YOLO sub-model is dynamically selected for detection. Non-maximum suppression is then applied to the bounding boxes of candidate peer message elements, our message elements, timestamp elements, and system prompt elements output by multiple sub-models to output element-level detection results with confidence levels that meet the threshold conditions.
[0009] Optionally, the step of extracting corresponding edge features, color features, and text features for each paginated screenshot based on the pixel-level bounding box coordinates, constructing a triple similarity matrix to automatically sort the at least two paginated screenshots, and locating the overlapping areas of adjacent screenshots includes: For each paged screenshot of the chat history, edge features are calculated based on its pixel grayscale gradient distribution, and an edge similarity matrix is constructed based on the structural similarity between the edge features; and / or, Color features of each chat history page screenshot are calculated using a color histogram or color space projection, and a color similarity matrix is constructed based on the statistical distance of the color features; and / or, After performing OCR recognition on the text content in each chat history pagination screenshot, the edit distance is used to calculate the text similarity between two adjacent chat history pagination screenshots to construct a text similarity matrix; The ranking relationship and potential overlapping region candidates among the screenshots of each chat history page are determined based on the weighted fusion results of the edge similarity matrix, color similarity matrix and text similarity matrix.
[0010] Optional, also includes: When the YOLO cluster detection network performs element-level detection, emoji elements are detected as additional rich media element categories, and corresponding pixel-level bounding box coordinates and category labels are assigned to the detected rich media elements. When performing cross-image semantic identity verification on the text obtained by OCR recognition in the overlapping area of two adjacent chat history page screenshots after sorting, each rich media element is replaced with a rich media placeholder in the text sequence and together with the adjacent text to form a rich media enhanced semantic sequence. Based on the similarity of the rich media enhanced semantic sequence and the consistency of the rich media placeholder type, it is determined whether the same semantic unit is segmented by the paginated screenshot, so as to determine the splicing position of cross-image semantic continuity and correct the semantic continuity of messages including emoticon elements.
[0011] A second aspect of this application provides a device for dynamically stitching together multi-image chat content, including: The detection unit is used to input at least two paginated screenshots of the same chat record that exceed the display range of the same interface into the YOLO cluster detection network, and to perform element-level detection on the paginated screenshots of the chat record to output the pixel-level bounding box coordinates and category labels of each element. The element categories include the other party's message elements, our own message elements, timestamp elements, and system prompt elements. The sorting and deduplication unit is used to extract the corresponding edge features, color features and text features for each page screenshot based on the pixel-level bounding box coordinates, construct a triple similarity matrix to automatically sort the at least two page screenshots and locate the overlapping areas of adjacent screenshots. The triple similarity matrix includes an edge similarity matrix, a color similarity matrix and a text similarity matrix. The splicing unit is used to perform cross-image semantic identity verification on the text obtained by OCR recognition in the overlapping area of two adjacent page screenshots of sorted chat records, so as to eliminate splicing artifacts caused by element misalignment and determine the splicing position of cross-image semantic continuity, and splice the chat records of the at least two page screenshots.
[0012] A third aspect of this application provides an electronic system including a memory and a processor, wherein the processor is used to execute a computer program stored in the memory to implement the steps of the above-described method for dynamically splicing multi-image chat content.
[0013] A fourth aspect of this application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the above-described method for dynamically splicing multi-image chat content.
[0014] In summary, the multi-image chat content dynamic stitching method provided in this application involves inputting at least two paginated screenshots of the same chat record that exceed the display range of the same interface into a YOLO cluster detection network. Element-level detection is performed on the paginated screenshots to output pixel-level bounding box coordinates and category labels for each element. The element categories include the other party's message element, our own message element, timestamp element, and system prompt element. Based on the pixel-level bounding box coordinates, corresponding edge features, color features, and text features are extracted for each paginated screenshot. A triple similarity matrix is constructed to automatically sort the at least two paginated screenshots and locate the overlapping areas of adjacent screenshots. The triple similarity matrix includes an edge similarity matrix, a color similarity matrix, and a text similarity matrix. For the sorted adjacent paginated screenshots, cross-image semantic identity verification is performed on the text obtained through OCR recognition within the overlapping area to eliminate stitching artifacts introduced by element misalignment and determine the stitching position for cross-image semantic continuity before stitching the chat records of the at least two paginated screenshots together. Therefore, by using a YOLO cluster to decompose chat screenshots into specific elements such as message bubbles, timestamps, and system prompts, the algorithm shifts from comparing whole-image pixels to comparing the structure of interface elements. This shift allows the algorithm to understand the logical layout of chat content within the interface, thus maintaining high robustness when faced with screenshots from different themes, resolutions, and devices. Edge features address the continuity issues of interface boundaries and bubble outlines, color features enhance the ability to identify the same interface theme, and text features directly utilize the presence of duplicate messages to pinpoint overlapping areas. The combined use of these three features significantly reduces misordering and misalignment caused by single features. Furthermore, cross-image semantic identity verification can identify and eliminate duplicate messages, incomplete messages, duplicate timestamps, and system prompts. The stitched result is visually naturally extended and semantically continuous, complete, and without redundancy, which is particularly important for applications such as legal evidence collection, customer service dispute analysis, and chat log archiving. Even with scrolling offsets, irregular cropping positions, background image interference, and individual OCR errors, this solution can still achieve stable stitching through comprehensive judgment using multiple features and semantic verification. Compared with simple methods that rely solely on single image similarity or sorting by time, it can significantly reduce the workload of manual proofreading and revision.
[0015] Accordingly, the multi-image chat content dynamic splicing device, electronic system, and computer-readable storage medium provided in the embodiments of the present invention also have the above-mentioned technical effects. Attached Figure Description
[0016] Figure 1 A flowchart illustrating a possible method for dynamically stitching together multi-image chat content, provided in an embodiment of this application; Figure 2A schematic structural block diagram of a possible multi-image chat content dynamic splicing device provided in an embodiment of this application; Figure 3 This application provides a schematic diagram of the hardware structure of a possible multi-image chat content dynamic splicing device. Figure 4 A schematic structural block diagram of a possible electronic system provided for embodiments of this application; Figure 5 This is a schematic structural block diagram of a possible computer-readable storage medium provided for embodiments of this application. Detailed Implementation
[0017] This application provides a method and system for dynamically stitching together multi-image chat content, which can solve the problem that traditional identification methods for paged screenshots of chat records cannot accurately identify and stitch together, resulting in significant errors, while manual comparison, stitching, and proofreading would significantly increase time and economic costs.
[0018] Furthermore, considering that the same chat segment exceeds the display area of a single screen, users take screenshots sequentially by scrolling the interface, resulting in multiple paged screenshots. These screenshots may have inconsistent intervals, possibly due to other applications being inserted in between; inconsistent manual pauses during scrolling may lead to inconsistent overlapping content heights; sometimes message cards may be partially included or excluded, causing overall screen position shifts; and OCR results may have recognition errors or missing lines due to bubble color and background interference. If only traditional image stitching algorithms are used for sorting and stitching, such as only considering overall image similarity or histogram similarity, sorting errors, misalignment of overlapping areas, and stitching artifacts are likely to occur.
[0019] To resolve the above issues, please refer to [link / reference]. Figure 1 The flowchart of a method for dynamically stitching together multi-image chat content provided in this application embodiment can specifically include: S110-S130.
[0020] S110, input at least two paginated screenshots of the same chat record that exceed the display range of the same interface into the YOLO cluster detection network, perform element-level detection on the paginated screenshots of the chat record, and output the pixel-level bounding box coordinates and category labels of each element. The element categories include the other party's message elements, our own message elements, timestamp elements, and system prompt elements.
[0021] S120, based on the pixel-level bounding box coordinates, extract the corresponding edge features, color features and text features for each page screenshot, construct a triple similarity matrix to automatically sort the at least two page screenshots and locate the overlapping areas of adjacent screenshots, the triple similarity matrix includes an edge similarity matrix, a color similarity matrix and a text similarity matrix.
[0022] S130, for two adjacent chat record page screenshots after sorting, perform cross-image semantic identity verification on the text obtained by OCR recognition in the overlapping area to eliminate splicing artifacts caused by element misalignment and determine the splicing position of cross-image semantic continuity, and splice the chat records of the at least two page screenshots.
[0023] For example, when inputting at least two paginated screenshots of the same chat record that exceed the display area of the same interface into the YOLO cluster detection network, the system first reads the original screenshot images from the storage medium. Each paginated screenshot undergoes uniform scaling, color normalization, and noise suppression to mitigate differences caused by varying device resolutions, screenshot compression ratios, and interface themes. Then, based on the screenshot's resolution, aspect ratio, and clarity, a set of detection models with high matching degrees is automatically selected from a set of preset lightweight YOLO sub-models. This set of YOLO sub-models is used to perform parallel inference on each paginated screenshot, outputting the category and boundary coordinates of candidate target boxes. Subsequently, a non-maximum suppression algorithm is used to merge the candidate boxes output by each sub-model, filtering out overlapping and low-confidence detection boxes to obtain the final element-level detection results. Furthermore, according to preset rules, the detected message bubble region is associated with the avatar region. Based on geometric and visual features such as the avatar's left-right position, bubble alignment direction, and bubble background color, the message elements are accurately identified. The system distinguishes between message elements from the other party and message elements from our side. It identifies centered text blocks with small height as timestamp elements and horizontal text areas with background colors distinctly different from regular chat bubbles and typically without avatars as system prompt elements. Pixel-level bounding box coordinates and category labels are recorded for each type of element. Through this process, what was originally a complex, pixel-distributed chat screenshot is refined into a structured representation composed of multiple semantically clear sets of elements. Subsequent processing modules can extract and match features based on the specific location and category of these elements, transforming a general image processing problem into a chat interface structure analysis problem. This allows for stable and accurate identification of key components in the dialogue structure even when faced with different chat software styles, theme color schemes, and device sizes. This provides reliable structural information for subsequent sorting and splicing, significantly reducing the impact of background patterns, personalized themes, and status bar interference on subsequent algorithms, and improving the robustness and generalization ability of element detection across devices and themes.
[0024] For example, when extracting corresponding edge features, color features, and text features from each paginated screenshot based on the pixel-level bounding box coordinates to construct a triple similarity matrix, and automatically sorting the at least two paginated screenshots and locating the overlapping areas of adjacent screenshots, the system first calculates edge features for each paginated screenshot within its overall image and the dialogue content area obtained by element detection. Specifically, it can generate an edge map through grayscale gradient operations and edge detection operators, and divide the image into multiple horizontal strips in the vertical direction. The system then statistically analyzes the edge intensity and direction distribution within each strip to form an edge feature vector reflecting the contour structure changes of the screenshot at different height positions. Simultaneously, the system calculates edge features in the original color space or a unified color space after conversion. Within the spatial dimension, a color histogram and dominant color distribution are calculated for the entire screenshot and the message bubble cluster area to obtain a color feature vector, which describes the color composition of the screenshot in areas such as background color, bubble color, and system prompt bar. Regarding text features, based on the element bounding boxes obtained in step one, the system performs optical character recognition (OCR) on each message bubble, timestamp, and system prompt element. The recognized text is arranged into a text sequence from top to bottom. Local text fragments are extracted from several messages at the bottom and top of the screenshot, and the similarity of these text fragments is calculated using edit distance. Then, for any two paginated screenshots, edge feature similarity and color feature similarity are calculated based on combinations such as the bottom area of the previous screenshot and the top area of the next screenshot. Similarity is calculated using three similarity values: similarity and text feature similarity. These values are then filled into the edge similarity matrix, color similarity matrix, and text similarity matrix. After obtaining the triple similarity matrix, the system can weight and fuse the three similarities into a comprehensive similarity based on preset weights. Each paginated screenshot is treated as a node in a graph structure. Weighted directed edges are established between screenshot pairs with a comprehensive similarity higher than a threshold. The magnitude of the comprehensive similarity represents the adjacency reliability between two paginated screenshots in terms of time sequence and content. Then, by finding the path with the maximum weight or performing topological sorting while ensuring that the timestamps are approximately monotonic, the system automatically obtains the sorting result of all paginated screenshots in the same chat history. For each pair of adjacent paginated screenshots after sorting, the system further refines the graph of the two screenshots. Several candidate windows are set at the bottom and top of the image, respectively. The edge local matching score, color local matching score, and text local matching score corresponding to each candidate window combination are calculated. These scores are combined to select the position most likely to represent the real scrolling overlap area as the final overlap area location result. Multiple complementary features are used to jointly constrain the sorting and splicing boundaries, so that even if a single feature fails in some scenarios, the overall judgment is still reliable. Even in complex situations such as pop-up insertion, inconsistent scrolling steps, and manual modification of the theme of some screenshot interfaces, the page order of the same chat history can still be accurately restored, and the overlap area of shared content between pages can be accurately found. This provides accurate spatial positioning basis for subsequent semantic verification and artifact-free splicing.
[0025] For example, when splicing the chat records of at least two paginated screenshots of sorted adjacent chat history, the system first uses the overlapping area determined in step two to extract the other party's message elements, our own message elements, timestamp elements, and system prompt elements in the overlapping area of the two adjacent paginated screenshots one by one. Character recognition is performed on each element area, and the recognized text is sorted from top to bottom according to its vertical coordinates in each screenshot, forming two sets of overlapping area text sequences. Each text is retained simultaneously. The system first identifies the message category, speaker type, and pixel coordinates of the text. Then, it performs line-by-line matching between the two text sequences. For each text in the previous screenshot sequence, it finds the closest matching text in the next screenshot sequence, compares the sentence similarity, and combines the message category and speaker type to determine if they represent different displays of the same chat message in the two screenshots. If the text content is highly consistent and the message category and speaker type match perfectly, the system considers the pair of text lines to represent the same message appearing repeatedly across screenshots. For cases where only part of the content is displayed in the previous screenshot but the complete content is displayed in the next screenshot, the system compares the text length and semantic information. The system determines which text is more complete and uses the more complete version as the final output during splicing. For timestamp elements and system prompt elements, the system can also introduce the reasonableness of time intervals and the order of system prompts to help determine their cross-image identity, ensuring that the same timestamp or the same system prompt is only retained once in the final long image. After completing the identity determination of all overlapping text lines, the system determines the final splicing position. That is, the area below a certain vertical position in the previous screenshot needs to be discarded, and the next screenshot starts from the area above the corresponding vertical position. Alternatively, with fine control, some duplicate message lines can be deleted or replaced, thereby completing the splicing of two screenshots at the image level. For multiple... The system sequentially performs semantic identity verification and splicing operations on each pair of adjacent screenshots according to the sorting results, until a long image or structured concatenated text record covering the entire chat history is obtained. By making the splicing boundary conform to the continuity of text semantics rather than just relying on pixel alignment, the system achieves automatic identification and removal of duplicate messages, half-finished messages, and duplicate timestamps. This significantly reduces duplicate and truncated content in the spliced long image, making the final chat history visually smooth and semantically coherent and complete. It is particularly suitable for scenarios that require ensuring semantic accuracy and chronological reliability, such as evidence collection, customer service quality inspection, and historical chat archiving, greatly reducing the workload of manual verification and modification in the later stages.
[0026] In summary, the multi-image chat content dynamic stitching method provided in the above embodiments inputs at least two paginated screenshots of the same chat record that exceed the display range of the same interface into the YOLO cluster detection network to perform element-level detection on the chat record paginated screenshots, outputting the pixel-level bounding box coordinates and category labels of each element. The element categories include the other party's message element, our own message element, timestamp element, and system prompt element. Based on the pixel-level bounding box coordinates, corresponding edge features, color features, and text features are extracted for each paginated screenshot, and a triple similarity matrix is constructed to automatically sort the at least two paginated screenshots and locate the overlapping areas of adjacent screenshots. The triple similarity matrix includes an edge similarity matrix, a color similarity matrix, and a text similarity matrix. For the sorted adjacent chat record paginated screenshots, cross-image semantic identity verification is performed on the text obtained by OCR recognition in the overlapping area to eliminate stitching artifacts introduced by element misalignment and determine the stitching position of cross-image semantic continuity before stitching the chat records of the at least two paginated screenshots together. Therefore, by using a YOLO cluster to decompose chat screenshots into specific elements such as message bubbles, timestamps, and system prompts, the algorithm shifts from comparing whole-image pixels to comparing the structure of interface elements. This shift allows the algorithm to understand the logical layout of chat content within the interface, thus maintaining high robustness when faced with screenshots from different themes, resolutions, and devices. Edge features address the continuity issues of interface boundaries and bubble outlines, color features enhance the ability to identify the same interface theme, and text features directly utilize the presence of duplicate messages to pinpoint overlapping areas. The combined use of these three features significantly reduces misordering and misalignment caused by single features. Furthermore, cross-image semantic identity verification can identify and eliminate duplicate messages, incomplete messages, duplicate timestamps, and system prompts. The stitched result is visually naturally extended and semantically continuous, complete, and without redundancy, which is particularly important for applications such as legal evidence collection, customer service dispute analysis, and chat log archiving. Even with scrolling offsets, irregular cropping positions, background image interference, and individual OCR errors, this solution can still achieve stable stitching through comprehensive judgment using multiple features and semantic verification. Compared with simple methods that rely solely on single image similarity or sorting by time, it can significantly reduce the workload of manual proofreading and revision.
[0027] In one embodiment, the step of performing cross-image semantic identity verification on the text obtained by OCR recognition in the overlapping area of two adjacent paginated screenshots of sorted chat records to eliminate splicing artifacts caused by element misalignment and determine the splicing position of cross-image semantic continuity for splicing the chat records of the at least two paginated screenshots includes: For two adjacent chat history screenshots after sorting, cross-image semantic identity verification is performed on the text obtained by OCR recognition in the overlapping area. The cross-image semantic identity verification includes comparing the speaker features of corresponding speech elements in the two adjacent chat history screenshots, and using timestamp regularization compensation to fill in missing timestamps, so as to eliminate splicing artifacts caused by element misalignment and determine the splicing position of cross-image semantic continuity before splicing the chat history of the at least two screenshots.
[0028] For example, for two adjacent chat history screenshots after sorting, firstly, based on the aforementioned overlapping area positioning results, message bubble elements and timestamp elements within the overlapping area of the two screenshots are extracted. Optical character recognition (OCR) is then performed on the text content within the extracted area to obtain two sets of overlapping text lines arranged vertically, along with their corresponding element categories, speaker attributes, and pixel coordinate information. Based on this, the cross-image semantic identity verification includes comparing speaker features of corresponding message elements in the two adjacent chat history screenshots. Specifically, this can be achieved by extracting the avatar position, avatar shape outline, and bubble... Compared to speaker characteristics such as the alignment of the left and right edges of the interface, the background color and border style of the speech bubble, and the identifier field in the nickname text, these characteristics are combined into a speaker fingerprint to identify the speaker. Within the overlapping area of two paginated screenshots, for each message element at the bottom of the previous screenshot, the candidate element with the highest speaker fingerprint similarity is searched among the message elements at the top of the next screenshot. The text content similarity and vertical arrangement of the two are compared. When the speaker fingerprint matches, the text content is highly consistent, and the positional relationship conforms to the normal scrolling logic of a conversation, it is determined that these two messages belong to the same speaker as a continuation or repetition in different screenshots. The system displays the timestamps; simultaneously, it uses timestamp regularization compensation to fill in missing timestamps. Specifically, it extracts all explicit timestamps from the two screenshots using a preset time format regular expression, establishes a timeline mapping by comparing the vertical position of the timestamps with the speaking order of surrounding messages, and infers the time point of messages within overlapping areas that do not display timestamps based on the time interval between adjacent known timestamps and the message's relative position in the sequence. This inferred time is then used together with the speaker feature matching results to verify whether the cross-image messages are temporally continuous. When both the speaker feature matching results and the timestamp regularization compensation results indicate that certain text lines... When the same message is displayed repeatedly or partially in two paginated screenshots, the system retains only one of the more complete versions when determining the splicing position, and marks the other as redundant and not participating in the final splicing. Thus, during the image splicing stage, the bottom area of the previous screenshot and the top area of the next screenshot are cropped and spliced according to the splicing position. While ensuring the continuity and consistency of message time order and speaker identity, splicing artifacts such as duplicate messages, half messages, and duplicate timestamps are eliminated. This makes the final spliced chat record visually continuous and smooth, and semantically natural, significantly improving the reliability and readability of cross-image splicing.
[0029] In one embodiment, it further includes: When the chat history pagination screenshots are obtained by scrolling screenshots, the status bar areas that appear repeatedly between the at least two chat history pagination screenshots are detected. The repeated status bar areas are cropped by non-maximum suppression to eliminate the vertical offset and duplicate content of the long screenshot content, and the chat content splicing result after offset correction is obtained.
[0030] In one embodiment, when the chat history pagination screenshots are obtained by a scrolling screenshot method, the repeated status bar areas between the at least two chat history pagination screenshots are detected, and the repeated status bar areas are cropped using non-maximum suppression to eliminate vertical offset and duplicate content in long screenshots, resulting in an offset-corrected chat content splicing result, including: When the chat history page screenshots are obtained by scrolling screenshot method, target detection is performed on each chat history page screenshot to identify image blocks of message cards and generate a set of candidate boxes for each image block; Non-maximum suppression is performed on the candidate box set between multiple chat history pagination screenshots to determine the recurring message card areas; Based on the pixel offset of the recurring message card area in the vertical direction, the alignment offset parameter between each chat history pagination screenshot is calculated, and the content area of each chat history pagination screenshot is cropped using the alignment offset parameter. The cropped multiple chat history pagination screenshots are then re-stitched to obtain continuous chat content after offset correction.
[0031] For example, after acquiring the paginated screenshots, the system first inputs each screenshot into a pre-trained lightweight interface object detection model to identify various message cards, typically represented by view buttons, agree buttons, cancel buttons, and message card boxes. The detection network outputs one or more candidate boxes for each screenshot area. These candidate boxes record the specific pixel coordinates and size information of the aforementioned interface components in the current screenshot, forming a candidate box set for that screenshot. Among multiple paginated chat history screenshots, to find message card areas that repeatedly appear in different screenshots during scrolling, the system sorts the candidate box sets of all paginated screenshots according to their image spatial location and appearance. Clustering and matching are performed, and non-maximum suppression algorithm is used to filter candidate boxes that are suspected to belong to the same interface component. In each cluster of candidate boxes, only the candidate box with the highest confidence and the most representative spatial location is retained as the final position of the message card in the screenshot, thereby determining the standard position of the message card area that appears repeatedly in each chat history page screenshot. Based on this, the system calculates the alignment offset parameter between each chat history page screenshot according to the pixel offset of the repeated message card area in the vertical direction. That is, the baseline position of the message card in a certain screenshot is used as a reference, and the difference between the position of the corresponding component in other screenshots and the baseline position is calculated. The system obtains the vertical offset of each screenshot relative to a reference screenshot and uses this offset as an alignment offset parameter to guide subsequent cropping operations. Then, the system uses this alignment offset parameter to crop the content area of each chat history pagination screenshot. Specifically, by moving the cropping window up or down, the starting lines of the chat content area in all screenshots are aligned in a unified coordinate system. This removes the overall vertical offset caused by message cards being cropped at different heights during scrolling, making the relative positions of the same actual dialogue content more consistent across different screenshots. After completing the offset correction cropping, the cropped chat history pagination screenshots are re-cropped... By executing the aforementioned multi-image sorting, overlapping area location, and cross-image semantic identity verification and splicing process, the final continuous chat content after offset correction is obtained. By using stable structural components in the interface as alignment references, the global vertical offset problem caused by inconsistent scrolling start and end positions is transformed into an estimation and compensation problem for differences in message card positions. This effectively eliminates the offset error caused by the overall upward or downward movement of content due to scrolling screenshot acquisition, making the subsequent overlapping area location more accurate and reducing splicing position errors and content misalignment caused by misalignment. This further improves the overall quality of multi-image splicing results in terms of visual continuity and semantic coherence.
[0032] In one embodiment, the YOLO cluster detection network includes: Multiple lightweight YOLO sub-models optimized for different resolutions and aspect ratios; The method further includes: Based on the resolution, aspect ratio, and compression quality of the input chat history pagination screenshot, the corresponding YOLO sub-model is dynamically selected for detection. Non-maximum suppression is then applied to the bounding boxes of candidate peer message elements, our message elements, timestamp elements, and system prompt elements output by multiple sub-models to output element-level detection results with confidence levels that meet the threshold conditions.
[0033] For example, the YOLO cluster detection network includes multiple lightweight YOLO sub-models optimized for different resolutions and aspect ratios. Specifically, during the model training phase, the system scales or crops the training data to different target sizes based on the various resolution combinations and screen aspect ratios of common chat history pagination screenshots in actual use, such as narrow and long screens, regular aspect ratio screens, and tablet device screenshots. A separate set of simplified YOLO sub-models with fewer parameters is trained for each size and aspect ratio. This allows each sub-model to achieve higher detection accuracy and lower computational overhead for the other party's message elements, our own message elements, timestamp elements, and system prompt elements under its corresponding size and aspect ratio. In actual operation, the method further includes: after receiving the input screenshot of the chat history pagination, the system first performs a basic quality assessment on the screenshot, extracting its original resolution, aspect ratio, and image compression quality indicators. Image compression quality can be estimated by statistically analyzing JPEG compression artifact intensity, blockiness, and overall sharpness scores. Then, based on these indicators, the system searches for the most matching set of candidate lightweight YOLO sub-models in a preset YOLO sub-model configuration table, and selects the most matching one as the main detection model and one or more of the second-most matching ones as auxiliary detection models according to priority. Parallel detection is performed on the chat history pagination screenshot, and each model outputs its respective candidate message elements from the other party and the other party. The system retrieves bounding boxes and their category confidence scores for message elements, timestamp elements, and system prompt elements. Because different sub-models may have local errors or varying sensitivities to specific elements in certain scenarios, to leverage the complementary advantages of multiple models, the system performs non-maximum suppression on the candidate bounding box set output by multiple sub-models. Specifically, within the same category, if multiple bounding boxes highly overlap spatially and exhibit differences in confidence scores, only the bounding box with the highest confidence score is retained as the final detection result. Candidate boxes with overlap exceeding a set threshold and low confidence scores are discarded. Furthermore, isolated candidate boxes with confidence scores below the global threshold are also rejected, thus obtaining a set of element-level detections whose confidence scores meet the threshold conditions. Test results: By using the dynamic model selection and multi-model output fusion method described above, the advantages of sub-models with different resolutions and aspect ratios within their respective advantageous ranges are utilized. Furthermore, non-maximum suppression is used to eliminate redundancy and conflicts between models. This avoids both the degradation of generalization performance of a single model in cross-device scenarios and the problems of duplicate detection and false detection amplification caused by simply stacking multiple models. It can still stably output accurately located and consistent counterpart message elements, our own message elements, timestamp elements, and system prompt elements when facing multiple terminals, multiple screenshot qualities, and multiple interface themes. This provides a high-quality, low-noise input foundation for subsequent feature extraction based on element structure, similarity matrix construction, and cross-image stitching.
[0034] In one embodiment, the step of extracting corresponding edge features, color features, and text features for each paginated screenshot based on the pixel-level bounding box coordinates, constructing a triple similarity matrix to automatically sort the at least two paginated screenshots, and locating the overlapping areas of adjacent screenshots includes: For each paged screenshot of the chat history, edge features are calculated based on its pixel grayscale gradient distribution, and an edge similarity matrix is constructed based on the structural similarity between the edge features; and / or, Color features of each chat history page screenshot are calculated using a color histogram or color space projection, and a color similarity matrix is constructed based on the statistical distance of the color features; and / or, After performing OCR recognition on the text content in each chat history pagination screenshot, the edit distance is used to calculate the text similarity between two adjacent chat history pagination screenshots to construct a text similarity matrix; The ranking relationship and potential overlapping region candidates among the screenshots of each chat history page are determined based on the weighted fusion results of the edge similarity matrix, color similarity matrix and text similarity matrix.
[0035] In some cases, a significant amount of semantic meaning in user chat logs is conveyed through rich media formats such as emojis, animated stickers, mini-program cards, or link preview cards. For example, "Is it okay?" might be followed only by an eye-rolling emoji, or "This is the effect image" might be followed by an image. However, when this chat content is segmented into multiple paginated screenshots and processed by OCR, the original rich media elements are often only recognized as abstract, emotionless placeholder text such as emojis and images, or even completely ignored by OCR in some cases, resulting in only text being retained. Furthermore, in the process of stitching multiple images together, if the text is used as the basis for the image stitching... When a combination of text and emoticons or explanatory text and images is truncated into different screenshots, with the previous screenshot retaining only the text and the next only the emoticon or image, conventional text-based sorting and splicing algorithms struggle to detect this combination relationship. This can lead to the incorrect splicing of images or emoticons after other statements, causing semantic deviations such as misinterpretation of tone, turning joking into a statement, or agreement into questioning. Furthermore, it can easily result in misalignment between the image response and its corresponding text description, making the final spliced chat log appear complete on the surface, but significantly deviating from the actual dialogue in terms of emotional expression and contextual reconstruction. To address these issues, one embodiment further includes: When the YOLO cluster detection network performs element-level detection, emoji elements are detected as additional rich media element categories, and corresponding pixel-level bounding box coordinates and category labels are assigned to the detected rich media elements. When performing cross-image semantic identity verification on the text obtained by OCR recognition in the overlapping area of two adjacent chat history page screenshots after sorting, each rich media element is replaced with a rich media placeholder in the text sequence and together with the adjacent text to form a rich media enhanced semantic sequence. Based on the similarity of the rich media enhanced semantic sequence and the consistency of the rich media placeholder type, it is determined whether the same semantic unit is segmented by the paginated screenshot, so as to determine the splicing position of cross-image semantic continuity and correct the semantic continuity of messages including emoticon elements.
[0036] Exemplarily, during the training phase, in addition to the original categories such as the other party's message elements, our message elements, timestamp elements, and system prompt elements, annotation data specifically for emoticons is added. Common static emoticons, sticker-style emoticons, small icons embedded in message bubbles, and emoticon regions floating on a transparent background are separately labeled as the rich media element category, enabling the YOLO submodel to directly output the rectangular bounding boxes and category labels of these emoticons during inference, thereby explicitly recording the spatial position and the message to which each emoticon belongs in the structured representation; in the case of performing cross-image semantic identity verification on the text obtained by optical character recognition within the overlapping region of two adjacent paginated screenshots of sorted chat records, when the system constructs the text sequence for cross-image alignment, it no longer simply ignores the emoticon regions. Instead, according to the position of the rich media element bounding boxes detected by YOLO in the corresponding text lines, each rich media element is inserted into the text sequence in the form of a predefined placeholder. For example, the icon representing a smiling emoticon is replaced with a placeholder such as <emoji_微笑>, and different types of emoticons such as crying, liking, and angry are marked with different placeholders, thus jointly constituting a rich media enhanced semantic sequence with the adjacent natural language text. This sequence not only retains the text information but also retains the emotional role and positional relationship of the emoticons in the semantics; when performing cross-image semantic identity verification on two adjacent paginated screenshots of chat records, the system no longer simply compares the literal similarity of the text sequences on both sides, but judges whether the same semantic unit is split by the paginated screenshots based on the similarity of the rich media enhanced semantic sequences and the consistency of the rich media placeholder types. Specifically, it can be achieved by comparing the text content, the types of emoticon placeholders, and the order of the emoticons in the corresponding text lines in the overlapping region of the upper and lower screenshots. When it is found that a message text at the bottom of the upper screenshot and a message text at the top of the lower screenshot are highly similar in the text part and contain the same type and order of emoticon placeholders, the system determines that they belong to the partial display or repeated display of the same message including emoticon icon elements in different screenshots. Therefore, when determining the splicing position for cross-image semantic continuity, this message line is used as the semantic boundary to crop and splice the images. At the same time, for the case where the upper screenshot only contains text plus half of an emoticon and the lower screenshot contains the complete emoticon due to screenshot splitting, the more complete rich media enhanced semantic sequence can be selected to correct the semantic continuity of the message including the emoticon icon element, avoiding the problems of emoticons being deleted, repeated, or misaligned with the text, and ensuring that the emoticons and the corresponding text in the spliced long image still maintain consistency in content and emotional expression. In modern chat scenarios where emoticons are widely involved in semantic expression, the splicing result is not only continuous and accurate at the text level but also coherent at the emotional and tone levels, significantly improving the integrity and readability of the spliced chat records in realistically restoring the conversation context and emotional expression.
[0037] In some cases, the same chat log may be captured by users on mobile phones and computers, or on devices with different models, themes, resolutions, and status bar heights, and then combined together as evidence or records submitted to the system for processing. Traditional multi-image stitching methods typically rely solely on the edge features, color distribution, and OCR text similarity of the entire image for sorting and locating overlapping areas. However, due to significant differences in UI themes, font rendering, and interface structures across different terminals, even highly similar text content can result in completely different edge shapes and color modes in the overall images. This can lead to algorithms inserting computer screenshots between mobile phone screenshots or mistakenly identifying overlapping relationships between non-adjacent screenshots. The resulting long image may exhibit jumps or disordered dialogue order in the timeline, while the text appears logically continuous, making it difficult for human reviewers to promptly identify the source of the stitching errors and severely impacting the reliability and evidentiary value of the reconstructed chat log. Therefore, in one embodiment, the method further includes: After inputting the at least two paginated screenshots into the YOLO cluster detection network to obtain the pixel-level bounding box coordinates and category labels, based on the position and size of the other party's message elements, our own message elements, timestamp elements and system prompt elements, the existence and height of the input box area, the distribution of avatars and nicknames and other interface structural features, a corresponding chat interface structure fingerprint is generated for each paginated screenshot. The chat history pagination screenshots with similar chat interface structure fingerprints are clustered into the same terminal style cluster. Automatic sorting is performed only within the same terminal style cluster based on the triple similarity matrix, and the overlapping areas of adjacent screenshots are located. For paginated screenshots belonging to different terminal style clusters, cross-cluster splicing is only allowed if the text similarity exceeds a preset threshold and the timestamps are consecutive, in order to reduce sorting disorder and incorrect splicing caused by mixed screenshots from multiple terminals.
[0038] For example, after inputting the at least two paginated screenshots into the YOLO cluster detection network to obtain the pixel-level bounding box coordinates and category labels, the system generates a corresponding chat interface structure fingerprint for each paginated screenshot based on the spatial layout of the other party's message elements, our own message elements, timestamp elements, and system prompt elements, the existence and height of the input box area, and the distribution of avatars and nicknames. Specifically, in each paginated screenshot, the system first calculates the distribution position of message bubbles in the horizontal direction relative to the screen width, their left and right alignment, and the starting and ending heights of the dialogue area in the vertical direction based on the bounding box coordinates of the other party's message elements and our own message elements obtained from element-level detection. Combined with the vertical distribution of timestamp elements and system prompt elements, the system obtains layout features reflecting the overall arrangement of the dialogue area. At the same time, the system uses the aforementioned target detection results to determine the existence, precise position, and height and width ratio of the status bar and title bar, thereby describing the operating system interface style corresponding to the current screenshot. In the bottom area, the system detects whether the input box area exists, the height ratio of the input box, and whether it contains controls such as voice buttons, plus buttons, or emoji buttons, and assigns these controls to the appropriate controls. The existence and location are encoded as input area features; for the distribution of avatars and nicknames, the system statistically analyzes parameters such as the avatar position, avatar size, whether the nickname text is displayed, and the distance between the nickname and the bubble associated with each message bubble to obtain a set of features used to distinguish one-on-one chats, group chats, and different application interface habits. Finally, the above layout features, chat content structure features, input area features, and avatar / nickname distribution features are normalized and concatenated in a predetermined order into a fixed-length structural fingerprint vector, which is used as the chat interface structural fingerprint of the paginated screenshot; in generating the... After obtaining the structural fingerprints of the paginated screenshots, the system clusters the chat history paginated screenshots based on the distance or similarity between these structural fingerprints. Paginated screenshots with similar chat interface structural fingerprints are divided into the same terminal style cluster, such as the mobile phone dark theme cluster, the mobile phone light theme cluster, the tablet landscape cluster, the desktop client cluster, etc. Automatic sorting is performed only within the same terminal style cluster based on the triple similarity matrix, and the overlapping areas of adjacent screenshots are located to avoid mismatch of edge features and color features caused by significant differences in resolution, control layout and interface style between different terminals and different themes.For paginated screenshots belonging to different terminal style clusters, the system defaults to assuming they are more likely to originate from chat log fragments or different conversation windows captured by different devices. Cross-cluster splicing is only allowed if the text similarity exceeds a preset threshold and the timestamps are consecutive. This requires that the text content in the overlapping candidate areas of the cross-cluster screenshots exhibit high repetition or natural continuity, and that the timestamps visible in the preceding and following screenshots present a reasonable chronological order on the timeline. This provides strong splicing evidence at both the semantic and temporal levels. The system uses interface structure fingerprints to hierarchically manage the source terminals and interface styles of screenshots, and then strictly controls the splicing behavior between different style clusters through cross-cluster text and timestamp constraints. This effectively reduces the likelihood of incorrect sorting or splicing of mobile and computer screenshots, light and dark theme screenshots, and screenshots from different application versions on the same timeline. It lowers the risk of sorting errors and incorrect splicing in multi-terminal mixed screenshot scenarios, making the final spliced chat logs more consistent and reliable in both interface style and chronological order, facilitating subsequent reading, retrieval, and evidence use.
[0039] Please see Figure 2 One embodiment of the multi-image chat content dynamic stitching device in this application may include: The detection unit 201 is used to input at least two paginated screenshots of the same chat record that exceed the display range of the same interface into the YOLO cluster detection network, and to perform element-level detection on the paginated screenshots of the chat record to output the pixel-level bounding box coordinates and category labels of each element. The element categories include the other party's message elements, our own message elements, timestamp elements, and system prompt elements. The sorting and deduplication unit 202 is used to extract corresponding edge features, color features and text features for each page screenshot based on the pixel-level bounding box coordinates, construct a triple similarity matrix to automatically sort the at least two page screenshots and locate the overlapping areas of adjacent screenshots. The triple similarity matrix includes an edge similarity matrix, a color similarity matrix and a text similarity matrix. The splicing unit 203 is used to perform cross-image semantic identity verification on the text obtained by OCR recognition in the overlapping area of two adjacent page screenshots of sorted chat records, so as to eliminate splicing artifacts caused by element misalignment and determine the splicing position of cross-image semantic continuity, and splice the chat records of the at least two page screenshots.
[0040] In summary, the multi-image chat content dynamic stitching device provided in the above embodiments inputs at least two paginated screenshots of the same chat record that exceed the display range of the same interface into the YOLO cluster detection network to perform element-level detection on the chat record paginated screenshots, outputting pixel-level bounding box coordinates and category labels for each element. The element categories include the other party's message element, our own message element, timestamp element, and system prompt element. Based on the pixel-level bounding box coordinates, corresponding edge features, color features, and text features are extracted for each paginated screenshot, and a triple similarity matrix is constructed to automatically sort the at least two paginated screenshots and locate the overlapping areas of adjacent screenshots. The triple similarity matrix includes an edge similarity matrix, a color similarity matrix, and a text similarity matrix. For the sorted adjacent chat record paginated screenshots, cross-image semantic identity verification is performed on the text obtained by OCR recognition in the overlapping area to eliminate stitching artifacts introduced by element misalignment and determine the stitching position of cross-image semantic continuity before stitching the chat records of the at least two paginated screenshots together. Therefore, by using a YOLO cluster to decompose chat screenshots into specific elements such as message bubbles, timestamps, and system prompts, the algorithm shifts from comparing whole-image pixels to comparing the structure of interface elements. This shift allows the algorithm to understand the logical layout of chat content within the interface, thus maintaining high robustness when faced with screenshots from different themes, resolutions, and devices. Edge features address the continuity issues of interface boundaries and bubble outlines, color features enhance the ability to identify the same interface theme, and text features directly utilize the presence of duplicate messages to pinpoint overlapping areas. The combined use of these three features significantly reduces misordering and misalignment caused by single features. Furthermore, cross-image semantic identity verification can identify and eliminate duplicate messages, incomplete messages, duplicate timestamps, and system prompts. The stitched result is visually naturally extended and semantically continuous, complete, and without redundancy, which is particularly important for applications such as legal evidence collection, customer service dispute analysis, and chat log archiving. Even with scrolling offsets, irregular cropping positions, background image interference, and individual OCR errors, this solution can still achieve stable stitching through comprehensive judgment using multiple features and semantic verification. Compared with simple methods that rely solely on single image similarity or sorting by time, it can significantly reduce the workload of manual proofreading and revision.
[0041] above Figure 2 The multi-image chat content dynamic stitching device in this application embodiment has been described from the perspective of modular functional entities. The following is a detailed description of the multi-image chat content dynamic stitching device in this application embodiment from the perspective of hardware processing. Please refer to... Figure 3 One embodiment of the multi-image chat content dynamic stitching device 300 in this application includes: The system includes an input device 301, an output device 302, a processor 303, and a memory 304, wherein the number of processors 303 can be one or more. Figure 3 Taking a processor 303 as an example. In some embodiments of this application, the input device 301, output device 302, processor 303, and memory 304 can be connected via a bus or other means, wherein... Figure 3 Taking the example of a connection between China and Israel via a bus.
[0042] Among them, by calling the operation instructions stored in memory 304, processor 303 is also used to execute Figure 1 Any of the methods in the corresponding embodiments.
[0043] Please see Figure 4 , Figure 4 A schematic diagram of an embodiment of the electronic system provided in this application.
[0044] like Figure 4 As shown, this application provides an electronic system including a memory 410, a processor 420, and a computer program 411 stored in the memory 410 and executable on the processor 420. When the processor 420 executes the computer program 411, it can achieve... Figure 1 Any of the corresponding implementation methods in the embodiments.
[0045] Since the electronic system described in this embodiment is the device used to implement the multi-image chat content dynamic splicing device in the embodiments of this application, those skilled in the art can understand the specific implementation method and various variations of the electronic system in this embodiment based on the method described in the embodiments of this application. Therefore, how the electronic system implements the method in the embodiments of this application will not be described in detail here. Any device used by those skilled in the art to implement the method in the embodiments of this application is within the scope of protection of this application.
[0046] Please see Figure 5 , Figure 5 This is a schematic diagram illustrating an embodiment of a computer-readable storage medium provided in this application.
[0047] like Figure 5 As shown, this embodiment provides a computer-readable storage medium 500 on which a computer program 511 is stored. When the computer program 511 is executed by a processor, it can perform... Figure 1 Any of the corresponding implementation methods in the embodiments.
[0048] It should be noted that the descriptions of each embodiment in the above embodiments have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0049] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0050] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0051] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0052] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0053] This application also provides a computer program product, which includes computer software instructions that, when executed on a processing device, cause the processing device to perform actions such as... Figure 1 The process of dynamically stitching together multi-image chat content in the corresponding embodiment.
Claims
1. A method for dynamically stitching together multi-image chat content, characterized in that, include: Input at least two paginated screenshots of the same chat history that exceed the same display area into the YOLO cluster detection network, perform element-level detection on the paginated screenshots of the chat history, and output the pixel-level bounding box coordinates and category labels of each element. The element categories include the other party's message elements, our own message elements, timestamp elements, and system prompt elements. Based on the pixel-level bounding box coordinates, the corresponding edge features, color features, and text features are extracted for each page screenshot. A triple similarity matrix is constructed to automatically sort the at least two page screenshots and locate the overlapping areas of adjacent screenshots. The triple similarity matrix includes an edge similarity matrix, a color similarity matrix, and a text similarity matrix. For two adjacent chat record screenshots after sorting, cross-image semantic identity verification is performed on the text obtained by OCR recognition in the overlapping area to eliminate splicing artifacts caused by element misalignment and determine the splicing position of cross-image semantic continuity before splicing the chat records of the at least two screenshots.
2. The method according to claim 1, characterized in that, The process of stitching together the chat records from at least two adjacent paginated screenshots of sorted chat history, performing cross-image semantic identity verification on the text obtained through OCR recognition within the overlapping area to eliminate splicing artifacts introduced by element misalignment and determine the splicing position for cross-image semantic continuity, includes: For two adjacent chat history screenshots after sorting, cross-image semantic identity verification is performed on the text obtained by OCR recognition in the overlapping area. The cross-image semantic identity verification includes comparing the speaker features of corresponding speech elements in the two adjacent chat history screenshots, and using timestamp regularization compensation to fill in missing timestamps, so as to eliminate splicing artifacts caused by element misalignment and determine the splicing position of cross-image semantic continuity before splicing the chat history of the at least two screenshots.
3. The method according to claim 1, characterized in that, Also includes: When the chat history pagination screenshots are obtained by scrolling screenshots, the status bar areas that appear repeatedly between the at least two chat history pagination screenshots are detected. The repeated status bar areas are cropped by non-maximum suppression to eliminate the vertical offset and duplicate content of the long screenshot content, and the chat content splicing result after offset correction is obtained.
4. The method according to claim 3, characterized in that, When the chat history pagination screenshots are obtained by scrolling screenshots, the status bar areas that appear repeatedly between at least two chat history pagination screenshots are detected. Non-maximum suppression is used to crop the repeated status bar areas to eliminate vertical offset and duplicate content in long screenshots, resulting in a spliced chat content result after offset correction, including: When the chat history page screenshots are obtained by scrolling screenshots, target detection is performed on each chat history page screenshot to identify image blocks of message cards and generate a set of candidate boxes for each image block. Non-maximum suppression is performed on the candidate box set between multiple chat history pagination screenshots to determine the recurring message card areas; Based on the pixel offset of the recurring message card area in the vertical direction, the alignment offset parameter between each chat history pagination screenshot is calculated, and the content area of each chat history pagination screenshot is cropped using the alignment offset parameter. The cropped multiple chat history pagination screenshots are then re-stitched to obtain continuous chat content after offset correction.
5. The method according to claim 1, characterized in that, The YOLO cluster detection network includes: Multiple lightweight YOLO sub-models optimized for different resolutions and aspect ratios; The method further includes: Based on the resolution, aspect ratio, and compression quality of the input chat history pagination screenshot, the corresponding YOLO sub-model is dynamically selected for detection. Non-maximum suppression is then applied to the bounding boxes of candidate peer message elements, our message elements, timestamp elements, and system prompt elements output by multiple sub-models to output element-level detection results with confidence levels that meet the threshold conditions.
6. The method according to claim 1, characterized in that, The step of extracting corresponding edge features, color features, and text features for each paginated screenshot based on the pixel-level bounding box coordinates, constructing a triple similarity matrix to automatically sort the at least two paginated screenshots, and locating the overlapping areas of adjacent screenshots includes: For each paged screenshot of the chat history, edge features are calculated based on its pixel grayscale gradient distribution, and an edge similarity matrix is constructed based on the structural similarity between the edge features; and / or, Color features of each chat history page screenshot are calculated using a color histogram or color space projection, and a color similarity matrix is constructed based on the statistical distance of the color features; and / or, After performing OCR recognition on the text content in each chat history pagination screenshot, the edit distance is used to calculate the text similarity between two adjacent chat history pagination screenshots to construct a text similarity matrix; The ranking relationship and potential overlapping region candidates among the screenshots of each chat history page are determined based on the weighted fusion results of the edge similarity matrix, color similarity matrix and text similarity matrix.
7. The method according to any one of claims 1 to 6, characterized in that, Also includes: When the YOLO cluster detection network performs element-level detection, emoji elements are detected as additional rich media element categories, and corresponding pixel-level bounding box coordinates and category labels are assigned to the detected rich media elements. When performing cross-image semantic identity verification on the text obtained by OCR recognition in the overlapping area of two adjacent chat history page screenshots after sorting, each rich media element is replaced with a rich media placeholder in the text sequence and together with the adjacent text to form a rich media enhanced semantic sequence. Based on the similarity of the rich media enhanced semantic sequence and the consistency of the rich media placeholder type, it is determined whether the same semantic unit is segmented by the paginated screenshot, so as to determine the splicing position of cross-image semantic continuity and correct the semantic continuity of messages including emoticon elements.
8. A device for dynamically stitching together multi-image chat content, characterized in that, include: The detection unit is used to input at least two paginated screenshots of the same chat record that exceed the display range of the same interface into the YOLO cluster detection network, and to perform element-level detection on the paginated screenshots of the chat record to output the pixel-level bounding box coordinates and category labels of each element. The element categories include the other party's message elements, our own message elements, timestamp elements, and system prompt elements. The sorting and deduplication unit is used to extract the corresponding edge features, color features and text features for each page screenshot based on the pixel-level bounding box coordinates, construct a triple similarity matrix to automatically sort the at least two page screenshots and locate the overlapping areas of adjacent screenshots. The triple similarity matrix includes an edge similarity matrix, a color similarity matrix and a text similarity matrix. The splicing unit is used to perform cross-image semantic identity verification on the text obtained by OCR recognition in the overlapping area of two adjacent page screenshots of sorted chat records, so as to eliminate splicing artifacts caused by element misalignment and determine the splicing position of cross-image semantic continuity, and splice the chat records of the at least two page screenshots.
9. An electronic system comprising a memory and a processor, characterized in that, When the processor executes the computer program stored in the memory, it implements the steps of the method for dynamically splicing multi-image chat content as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the method for dynamically splicing multi-image chat content as described in any one of claims 1 to 7.