A multi-modal text chunking method and electronic device

By using a multimodal text segmentation method, paragraphs are dynamically allocated based on semantic similarity and order constraints, which solves the problem of insufficient semantic coherence in existing technologies. This achieves efficient text segmentation and low-cost semantic aggregation, adapting to different document lengths and densities.

CN121543589BActive Publication Date: 2026-04-28ZHEJIANG FINGARD TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG FINGARD TECH CO LTD
Filing Date
2026-01-20
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

In existing technologies, fixed-length and rule-based segmentation methods ignore semantic coherence, resulting in poor text segmentation generalization ability, inability to guarantee the sequential continuity of text and the original logic, and high computational cost, making them difficult to apply in real time.

Method used

By acquiring multimodal data documents, generating original text and segmenting it according to document structure tags, calculating semantic similarity, assigning paragraphs to cluster centers within a neighborhood range using preset order constraints, recalculating cluster centers until the iteration condition is met, generating clustered text, and dynamically merging or segmenting to ensure semantic coherence.

Benefits of technology

It improves text segmentation accuracy, reduces computational costs, ensures sentence continuity and semantic unit integrity, adapts to documents of different lengths and densities, and avoids semantic fragmentation problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121543589B_ABST
    Figure CN121543589B_ABST
Patent Text Reader

Abstract

The application provides a multi-modal text segmentation method and an electronic device, and relates to the technical field of data processing. The method comprises the following steps: obtaining a multi-modal data document, and generating original document text according to the multi-modal data document; obtaining a plurality of physical paragraphs and a plurality of initial cluster centers according to document structure marks in the original document text; distributing each physical paragraph to a paragraph cluster corresponding to an initial cluster center closest in physical position and within a preset neighborhood range according to the semantic similarity between each physical paragraph and the plurality of initial cluster centers, and using a preset order constraint; recalculating the cluster centers of each paragraph cluster, and re-distributing the clusters until a preset stop distribution iteration condition is reached; and generating a plurality of clustering texts as a plurality of to-be-detected texts according to the physical paragraphs in the plurality of paragraph clusters when the preset stop distribution iteration condition is reached. The application reduces the calculation cost, guarantees the continuity of the sentences, and improves the text segmentation accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and more specifically, to a multimodal text segmentation method and an electronic device. Background Technology

[0002] In large language model applications, retrieval-enhanced generation effectively improves the accuracy and credibility of generated content by introducing external knowledge. First, relevant information is retrieved from a knowledge base and provided as context to the generation model. Text segmentation, as a core preprocessing step before retrieval, directly determines the retrieval results and the performance of the generated content.

[0003] In existing technologies, the main methods are to divide the text into blocks of fixed length, slide the cutting according to a preset number of lexical units, segment the text based on explicit tags such as paragraphs and sentences, calculate sentence similarity and merge related texts through embedding models, or use large language models to identify semantic boundaries and segment the text.

[0004] However, existing technologies that use fixed-length and rule-based segmentation ignore semantic coherence, easily fragment complete arguments, have poor generalization ability, require manual adjustment for different document types, have high computational costs for semantic segmentation, are difficult to apply in real time, cannot guarantee the sequential continuity of text, and disrupt the original logic. Summary of the Invention

[0005] The purpose of this application is to address the shortcomings of the prior art by providing a multimodal text segmentation method and electronic device that reduces computational costs while ensuring sentence continuity and improving text segmentation accuracy.

[0006] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows:

[0007] In a first aspect, one embodiment of this application provides a multimodal text segmentation method, the method comprising:

[0008] Acquire multimodal data documents and generate original document text based on the multimodal data documents;

[0009] Based on the document structure tags in the original document text, the original document text is segmented to obtain multiple physical paragraphs and multiple initial cluster centers;

[0010] Calculate the semantic similarity between each physical paragraph and the multiple initial cluster centers. Based on the semantic similarity between each physical paragraph and the multiple initial cluster centers, and using a preset order constraint, assign each physical paragraph to the paragraph cluster corresponding to the initial cluster center that is physically closest to it and within a preset neighborhood.

[0011] Based on each physical segment in each segment cluster, the cluster center of each segment cluster is recalculated, and the clusters are reassigned until the preset stopping assignment iteration condition is reached;

[0012] Based on the physical paragraphs in multiple paragraph clusters when the preset stopping assignment iteration condition is met, multiple clustered texts are generated as multiple texts to be detected.

[0013] Optionally, the step of segmenting the original document text based on document structure markers in the original document text to obtain multiple physical paragraphs and multiple initial cluster centers includes:

[0014] Obtain a global summary of the original document text;

[0015] Based on the global summary, multiple initial cluster centers are determined from the multiple physical segments.

[0016] Optionally, the method further includes: recalculating the cluster center of each paragraph cluster based on each physical paragraph in each paragraph cluster, and reallocating the clusters until a preset stopping allocation iteration condition is reached.

[0017] The cumulative paragraph length of each paragraph cluster is calculated in real time.

[0018] If the cumulative paragraph length of a target paragraph cluster in each paragraph cluster exceeds the preset maximum allowed length, then the target paragraph cluster is locked.

[0019] Optionally, before generating multiple clustered texts as multiple texts to be detected based on the physical paragraphs in multiple paragraph clusters when the preset stopping assignment iteration condition is met, the method further includes:

[0020] Calculate the semantic contour coefficients for the multiple paragraph clusters;

[0021] If the semantic contour coefficient is greater than the preset semantic contour threshold, then the multiple paragraph clusters are output;

[0022] If the semantic contour coefficient is less than or equal to the preset semantic contour threshold, then the multiple physical paragraphs are re-clustered.

[0023] Optionally, the method further includes:

[0024] The text to be detected is pre-segmented to obtain multiple candidate text blocks;

[0025] Based on the topic distribution vectors of adjacent text blocks before and after merging among the multiple candidate text blocks, the semantic coherence quantification parameters of the adjacent text blocks are determined.

[0026] Based on the semantic coherence quantization parameter, the adjacent text blocks are dynamically merged to obtain multiple final text blocks, wherein the semantic coherence quantization parameter of two adjacent final text blocks reaches the preset block boundary.

[0027] Optionally, determining the semantic coherence quantification parameter of the adjacent text blocks based on the topic distribution vectors of adjacent text blocks before and after merging among the plurality of candidate text blocks includes:

[0028] Obtain the first topic distribution vector of the current text block among the multiple candidate text blocks;

[0029] The current text block and the next text block are pre-merged to obtain candidate merged text blocks;

[0030] Obtain the second topic distribution vector of the candidate merged text block;

[0031] Based on the difference between the first topic distribution vector and the second topic distribution vector, the topic dispersion between the current text block and the next text block is calculated as a semantic coherence quantification parameter.

[0032] Optionally, the step of dynamically merging adjacent text blocks according to the semantic coherence quantization parameter to obtain multiple final text blocks includes:

[0033] If the semantic coherence quantization parameter between the current text block and the next text block does not reach the preset block boundary, then it is determined that the merging between the current text block and the next text block is successful, and the current text block is updated according to the candidate merged text block to obtain the first updated text block;

[0034] Continue to obtain the semantic coherence quantization parameters between the first updated text block and the next text block;

[0035] If the semantic coherence quantization parameter between the first updated text block and the next text block reaches the preset block boundary, then the first updated text block is determined to be a final text block.

[0036] The current text block is updated based on the next text block of the first updated text block until all text blocks have been processed.

[0037] Optionally, the step of dynamically merging adjacent text blocks according to the semantic coherence quantization parameter to obtain multiple final text blocks further includes:

[0038] If the semantic coherence quantization parameter between the current text block and the next text block reaches the preset block boundary, then it is determined that the merging between the current text block and the next text block has failed.

[0039] The current text block is updated based on the next text block until all text blocks have been processed.

[0040] Optionally, the method further includes:

[0041] Perform length checks on the multiple final text blocks;

[0042] If the length of a target text block in the plurality of final text blocks exceeds a preset length threshold, then the sentence boundary with the highest semantic dispersion is determined from the target text block;

[0043] Based on the sentence boundaries, the target text block is recursively segmented until the length of all text blocks is less than or equal to the preset length threshold.

[0044] Optionally, the method further includes:

[0045] A pre-defined summarization model is used to generate corresponding semantic summary information for each final text block.

[0046] Secondly, another embodiment of this application provides a multimodal text segmentation device, the device comprising:

[0047] The acquisition module is used to acquire multimodal data documents and generate original document text based on the multimodal data documents;

[0048] The segmentation module is used to segment the original document text according to the document structure tags in the original document text to obtain multiple physical paragraphs;

[0049] The first allocation module is used to calculate the semantic similarity between each physical paragraph and the multiple initial cluster centers, and based on the semantic similarity between each physical paragraph and the multiple initial cluster centers, and using a preset order constraint, allocate each physical paragraph to the paragraph cluster corresponding to the initial cluster center that is closest in physical location and within a preset neighborhood range;

[0050] The second allocation module is used to recalculate the cluster center of each paragraph cluster based on each physical paragraph in each paragraph cluster, and to re-allocate the clusters until a preset stopping allocation iteration condition is reached.

[0051] The generation module is used to generate multiple clustered texts as multiple texts to be detected based on the physical paragraphs in multiple paragraph clusters when the preset stopping assignment iteration condition is reached.

[0052] Thirdly, another embodiment of this application provides an electronic device, including: a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the memory via the bus, and the processor executes the machine-readable instructions to perform the steps of any of the multimodal text segmentation methods described in the first aspect above.

[0053] Fourthly, another embodiment of this application provides a storage medium storing a computer program, which, when executed by a processor, performs the steps of the multimodal text segmentation method described in any of the first aspects above.

[0054] The beneficial effects of this application are:

[0055] This application provides a multimodal text segmentation method and an electronic device. The method involves acquiring a multimodal data document and generating original document text based on it. The original document text is segmented according to document structure markers to obtain multiple physical paragraphs and multiple initial cluster centers. The semantic similarity between each physical paragraph and the multiple initial cluster centers is calculated. Based on the semantic similarity and a preset order constraint, each physical paragraph is assigned to the paragraph cluster corresponding to the initial cluster center that is physically closest to it and within a preset neighborhood. The cluster centers of each paragraph cluster are recalculated based on the physical paragraphs within each cluster, and cluster assignment is performed again until a preset stopping condition is met. Multiple clustered texts are generated from the physical paragraphs in the multiple paragraph clusters when the preset stopping condition is met, serving as multiple texts to be detected. This application ensures that the clustering process starts from the core of the document by generating a global summary and selecting several paragraphs with the most semantic similarity as initial centers. This improves the topic focus of the segmentation results, enhances sensitivity to key information regions, and reduces computational costs. By assigning each physical paragraph to the paragraph cluster corresponding to the initial cluster center within a preset neighborhood using sequential constraints, physical adjacency fundamentally guarantees the integrity of semantic units. This solves the structural disruption problem inherent in traditional semantic clustering methods, achieving a dual guarantee of semantic aggregation and sequential coherence. It avoids the semantic fragmentation caused by fixed-size blocks that divide a complete semantic unit into two different blocks. By recalculating the cluster centers of each paragraph cluster and reassigning clusters until a preset stopping condition for allocation is met, the block boundaries are ensured to better align with actual semantic turning points, thus providing stronger adaptability to documents of different lengths and densities. Attached Figure Description

[0056] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0057] Figure 1 A flowchart illustrating a multimodal text segmentation method provided in this application embodiment;

[0058] Figure 2 This is a flowchart illustrating the process of determining the initial cluster center in a multimodal text segmentation method provided in an embodiment of this application.

[0059] Figure 3 A flowchart illustrating the process of determining target paragraph clusters in a multimodal text segmentation method provided in this application embodiment;

[0060] Figure 4 A flowchart illustrating paragraph clustering in a multimodal text segmentation method provided in this application embodiment;

[0061] Figure 5 A flowchart illustrating the process of determining the final text block in a multimodal text segmentation method provided in this application embodiment;

[0062] Figure 6 A flowchart illustrating the determination of semantic coherence quantization parameters in a multimodal text segmentation method provided in this application embodiment;

[0063] Figure 7 A flowchart illustrating the determination of the final text block in another multimodal text segmentation method provided in this application embodiment;

[0064] Figure 8 A flowchart illustrating the determination of the final text block in another multimodal text segmentation method provided in this application embodiment;

[0065] Figure 9 A flowchart illustrating the length check process in a multimodal text segmentation method provided in this application embodiment;

[0066] Figure 10 This is a schematic diagram of the structure of a multimodal text segmentation device provided in an embodiment of this application;

[0067] Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0068] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the accompanying drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.

[0069] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0070] It should be noted that the term "comprising" will be used in the embodiments of this application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.

[0071] To clearly describe the method provided in the embodiments of this application, the method will be described below in conjunction with several accompanying drawings. Figure 1 This is a flowchart illustrating a multimodal text segmentation method provided in an embodiment of this application, as shown below. Figure 1 As shown, the method includes:

[0072] Step 101: Obtain the multimodal data document and generate the original document text based on the multimodal data document.

[0073] The multimodal data document can include any data such as scanned images, Word documents, tables, Portable Document Format (PDF) files, and PowerPoint (PPT) files. For example, a document of any format may contain multiple data items, and all data within any format can be identified. This could be a case where a Word document contains inserted images, a PDF contains inserted images, or a PPT contains inserted documents and / or images, etc. This application does not impose any limitations on this.

[0074] Optionally, after acquiring the multimodal data document, the metadata and tags in the multimodal data document are parsed, which may include structural information such as titles, paragraphs, lists, and tables. Based on the page structure of the multimodal data document, the logical structure of the data of different modalities in the document is determined. According to the logical structure of scanned images, PDFs, and text information in the multimodal data document, the original document text is obtained by integrating them according to the logical structure. Scanned images and PDFs can be parsed using optical character recognition (OCR), while Word documents, tables, and PPT documents can be parsed using document structure analysis. The logical structure can specifically represent the relationships between scanned images, PDFs, and text information, such as which scanned image corresponds to which paragraph of text information, etc., without specific limitations.

[0075] Step 102: Based on the document structure tags in the original document text, segment the original document text to obtain multiple physical paragraphs and multiple initial cluster centers.

[0076] The document structure markers can be symbols such as line breaks, chapter titles, and bullet points; this application embodiment does not impose any restrictions on this. The initial cluster center consists of a portion of multiple physical paragraphs.

[0077] Optionally, the original document text is physically segmented based on the document structure tags in the original document text to obtain multiple physical paragraphs, and the initial cluster center is determined based on the multiple physical paragraphs.

[0078] Step 103: Calculate the semantic similarity between each physical paragraph and multiple initial cluster centers. Based on the semantic similarity between each physical paragraph and multiple initial cluster centers, and using a preset order constraint, assign each physical paragraph to the paragraph cluster corresponding to the initial cluster center that is closest in physical location and within a preset neighborhood.

[0079] The preset order constraint, when making semantic clustering or merging decisions on text, mandates that text units within the same text block must be physically consecutive and sequentially adjacent in the original document, and cannot be forcibly aggregated by crossing intermediate content. The preset neighborhood range can be determined based on the current paragraph content; for example, it can be 10, meaning that the ten physical paragraphs before and after the initial cluster center constitute the preset neighborhood range of the initial cluster center.

[0080] Optionally, the cosine similarity between the vector of each physical segment and the vectors of multiple initial cluster centers is used as the semantic similarity.

[0081] Optionally, based on the semantic similarity between each physical paragraph and multiple initial cluster centers, the paragraphs are sorted according to semantic similarity. A preset number of physical paragraphs with the highest semantic similarity are assigned to the paragraph cluster corresponding to the initial cluster center that is physically closest to them and within a preset neighborhood range, using a preset order constraint.

[0082] Optionally, if the nearest cluster center to the physical segment is not within its neighborhood, the physical segment is assigned to a newly created cluster.

[0083] For example, paragraphs 2 and 4 are grouped with center A, and paragraphs 3 and 5 are grouped with center B, which is different from the original text order. The order constraint requires that paragraphs in the same cluster must be physically adjacent in the original text. Therefore, paragraphs 3, 4, and 5 are correctly classified into the same cluster because they are semantically similar and continuous.

[0084] Step 104: Based on each physical paragraph in each paragraph cluster, recalculate the cluster center of each paragraph cluster and redistribute the clusters until the preset stopping distribution iteration condition is reached.

[0085] The preset stopping condition for allocation iteration can be either the number of iterations or the change value of the cluster center coordinates. That is, allocation stops when the number of iterations is reached, or when the change value of the cluster center coordinates is less than the preset change threshold of the cluster center coordinates.

[0086] Optionally, based on each physical segment in each segment cluster, the cluster center of each segment cluster is recalculated based on the high-dimensional vector of each physical segment, and the cluster allocation is performed again based on the cluster center of each segment cluster until the preset stopping allocation iteration condition is reached.

[0087] Step 105: Based on the physical paragraphs in multiple paragraph clusters when the preset stopping assignment iteration condition is met, generate multiple clustered texts as multiple texts to be detected.

[0088] In this embodiment, the original document text is segmented based on document structure markers to obtain multiple physical paragraphs; a global summary of the original document text is obtained; multiple initial cluster centers are determined from the multiple physical paragraphs based on the global summary; the semantic similarity between each physical paragraph and the multiple initial cluster centers is calculated; based on the semantic similarity between each physical paragraph and the multiple initial cluster centers, a preset order constraint is applied to assign each physical paragraph to the paragraph cluster corresponding to the initial cluster center that is physically closest to it and within a preset neighborhood; based on each physical paragraph in each paragraph cluster, the cluster center of each paragraph cluster is recalculated, and the clusters are reassigned until a preset stopping assignment iteration condition is reached; based on the physical paragraphs in the multiple paragraph clusters when the preset stopping assignment iteration condition is reached, multiple clustered texts are generated as multiple texts to be detected. This application ensures that the clustering process starts from the core of the document by generating a global summary and selecting several paragraphs with the most semantic similarity as initial centers, improving the topic focus of the segmentation results, enhancing the sensitivity to key information areas, and reducing computational costs. By assigning each physical paragraph to the paragraph cluster corresponding to the initial cluster center within a preset neighborhood using sequential constraints, physical adjacency fundamentally guarantees the integrity of semantic units. This solves the structural disruption problem inherent in traditional semantic clustering methods, achieving a dual guarantee of semantic aggregation and sequential coherence. It avoids the semantic fragmentation caused by fixed-size blocks that divide a complete semantic unit into two different blocks. By recalculating the cluster centers of each paragraph cluster and reassigning clusters until a preset stopping condition for allocation is met, the block boundaries are ensured to better align with actual semantic turning points, thus providing stronger adaptability to documents of different lengths and densities.

[0089] Based on the above embodiments, this application also provides a process for determining target paragraph clusters in a multimodal text segmentation method. Figure 2 This is a flowchart illustrating the process of determining the initial cluster center in a multimodal text segmentation method provided in this application embodiment, as shown below. Figure 2 As shown, in step 102 above, the original document text is segmented based on the document structure tags in the original document text to obtain multiple physical paragraphs and multiple initial cluster centers, including:

[0090] Step 201: Obtain a global summary of the original document text.

[0091] The global summary can be 1-3 sentences in length.

[0092] Optionally, a global summary of the original document text is obtained by performing summary recognition on the original document text based on a pre-trained text summarization model. The pre-trained text summarization model can be BERT-ext, BART, or an abstract summarization model based on Transformer, and this embodiment of the application does not limit this.

[0093] Step 202: Based on the global summary, determine multiple initial cluster centers from multiple physical segments.

[0094] Optionally, the same text embedding model is used to convert the global summary and multiple physical paragraphs into high-dimensional vectors. The cosine similarity of the global summary and multiple physical paragraphs is calculated respectively, and the multiple physical paragraphs with the highest cosine similarity are used as the initial cluster centers. The high-dimensional vector can be a 768-dimensional vector, and the multiple initial cluster centers can be two, three, four, etc., depending on the document content. This application embodiment does not impose any restrictions on this.

[0095] In this embodiment, the overall semantics of the document are combined with the local content of paragraphs. The initial cluster center is dynamically determined by the cosine similarity between the summary and each paragraph, which improves the semantic coherence of text segmentation, reduces topic drift or boundary misjudgment caused by random initialization, and enhances the alignment ability between the segmentation results and the core topic of the document.

[0096] Based on the above embodiments, this application also provides a process for determining target paragraph clusters in a multimodal text segmentation method. Figure 3 This is a flowchart illustrating the process of determining target paragraph clusters in a multimodal text segmentation method provided in this application embodiment, as shown below. Figure 3 As shown, in step 104 above, the cluster center of each paragraph cluster is recalculated based on each physical paragraph in each paragraph cluster, and the cluster allocation is redistributed until a preset stopping allocation iteration condition is reached. The method also includes:

[0097] Step 301: Calculate the cumulative paragraph length of each paragraph cluster in real time.

[0098] The cumulative paragraph length is the number of tokens in each paragraph cluster.

[0099] Optionally, each paragraph cluster can be split using a preset splitting rule, and the cumulative paragraph length of each paragraph cluster can be determined based on the splitting results.

[0100] Step 302: If the cumulative paragraph length of the target paragraph cluster in each paragraph cluster exceeds the preset maximum allowed length, then the target paragraph cluster is locked.

[0101] The preset maximum allowed length is determined based on the content and length of the current text. If the current text is long, the preset maximum allowed length is larger; otherwise, the preset maximum allowed length is smaller. Similarly, if the current text is dense, the preset maximum allowed length is larger; otherwise, the preset maximum allowed length is smaller.

[0102] Optionally, if the cumulative paragraph length of the target paragraph cluster in each paragraph cluster exceeds the preset maximum allowed length, it means that the paragraph length in the paragraph cluster is saturated and no more physical paragraphs can be added, and the target paragraph cluster is locked.

[0103] For example, if the preset maximum allowed length is 300 tokens, and the cumulative paragraph length of a paragraph cluster is within 210 tokens (which is less than 300 tokens), then the paragraph cluster is allowed to continue merging. If the paragraph cluster exceeds the preset maximum allowed length, then the growth of the current cluster is immediately terminated, and a new cluster starts from the next paragraph.

[0104] In this embodiment, the cumulative paragraph length of each paragraph cluster is counted in real time. If the cumulative paragraph length of a target paragraph cluster exceeds the preset maximum allowed length, the target paragraph cluster is locked. This application ensures the controllability of the length of each paragraph cluster by setting a preset maximum allowed length, which significantly improves the stability, compatibility, and operating efficiency of the text processing system.

[0105] Based on the above embodiments, this application also provides a process for paragraph clustering in a multimodal text segmentation method. Figure 4 This is a flowchart illustrating paragraph clustering in a multimodal text segmentation method provided in an embodiment of this application, as shown below. Figure 4 As shown, before generating multiple clustered texts as multiple texts to be detected based on the physical paragraphs in multiple paragraph clusters when the preset stopping assignment iteration condition is reached in step 105 above, the method further includes:

[0106] Step 401: Calculate the semantic contour coefficients of multiple paragraph clusters.

[0107] The semantic silhouette coefficient (SBC) serves as an internal and external validation metric for evaluating the clustering effect of multiple paragraph clusters. It considers both the compactness within clusters and the separation between different clusters. The SBC is suitable for evaluating the quality of clustering results.

[0108] Optionally, the compactness of multiple paragraph clusters is determined based on the average distance between any physical paragraph in a paragraph cluster and other physical paragraphs; the dispersion of multiple paragraph clusters is determined based on the average distance between any physical paragraph in a paragraph cluster and other physical paragraphs within the same paragraph cluster; and the semantic profile coefficients of multiple paragraph clusters are determined based on the compactness and dispersion of the multiple paragraph clusters. The semantic profile coefficients of the original document text are then determined based on the average of the semantic profile coefficients of the multiple paragraph clusters.

[0109] For example, the semantic profile coefficients of multiple paragraph clusters are determined according to the semantic profile coefficient calculation formula.

[0110]

[0111] in, Let i be the semantic profile coefficient of the i-th physical paragraph in a paragraph cluster. Let be the average distance between the i-th physical paragraph of a paragraph cluster and other physical paragraphs within the same paragraph cluster. Let be the average distance between the i-th physical paragraph of a paragraph cluster and the other physical paragraphs within that cluster. A value of 1 indicates that the i-th paragraph cluster is well clustered, i.e. much smaller This indicates that the data point is very close to other data points within its own cluster, but far from data points in other clusters. A value of 0 indicates that the i-th segment cluster lies on the boundary between two clusters, i.e. Approximately equal to This indicates that the data point is similar in distance to its own cluster and other clusters. A value of -1 indicates that the i-th paragraph cluster may be incorrectly clustered, i.e. Much larger This indicates that the data point is far away from other data points in its own cluster, but close to data points in other clusters.

[0112] Step 402: If the semantic contour coefficient is greater than the preset semantic contour threshold, then output multiple paragraph clusters.

[0113] Optionally, if the semantic contour coefficient is greater than the preset semantic contour threshold, it means that the quality of multiple paragraph clusters meets the standard, that is, each paragraph is highly consistent with its cluster, meets the requirements of semantic coherence and controllable size, and is clearly distinguished from other clusters, then multiple paragraph clusters are output.

[0114] Step 403: If the semantic contour coefficient is less than or equal to the preset semantic contour threshold, then re-cluster the multiple physical paragraphs.

[0115] Optionally, if the semantic contour coefficient is less than or equal to a preset semantic contour threshold, it indicates that the current paragraph clustering result has not met the quality standard, and then multiple physical paragraphs are re-clustered. Specifically, the initial cluster centers can be re-determined and the clustering operation performed again.

[0116] In this embodiment, semantic contour coefficients are calculated for multiple paragraph clusters. If the semantic contour coefficient is greater than a preset semantic contour threshold, multiple paragraph clusters are output. If the semantic contour coefficient is less than or equal to the preset semantic contour threshold, the multiple physical paragraphs are re-clustered. This application uses the semantic contour coefficient as a unified indicator to measure the cohesion and segregation of paragraph clusters, avoiding manual intervention or reliance on experience, thereby improving the quality of clustering results.

[0117] Based on the above embodiments, this application also provides a process for determining the final text block in a multimodal text segmentation method. Figure 5 This is a flowchart illustrating the process of determining the final text block in a multimodal text segmentation method provided in this application embodiment, as shown below. Figure 5 As shown, based on steps 101-105 above, the method includes:

[0118] Step 501: Pre-segment the text to be detected to obtain multiple candidate text blocks.

[0119] The pre-segmentation method can be based on regular expressions or on inherent structural markers in the document, such as paragraphs, chapters, or line break markers. This embodiment does not impose any limitations on this. The candidate text block includes multiple characters.

[0120] Optionally, the text to be detected can be coarsely segmented according to the pre-segmentation method to obtain multiple candidate text blocks.

[0121] Step 502: Determine the semantic coherence quantification parameters of adjacent text blocks based on the topic distribution vectors of adjacent text blocks before and after merging among multiple candidate text blocks.

[0122] The topic distribution vector is the same as the topic probability distribution vector. The number of topics can be 100 or other numbers, and this application embodiment does not limit this. The topic distribution of the candidate text block is the probability distribution of the candidate text block under 100 topics, and the topic distribution of adjacent text blocks is the probability distribution of adjacent text blocks under 100 topics. When the candidate text block is the first text block, the adjacent text block is the second text block. The semantic coherence quantification parameter is used to determine whether adjacent text blocks in the candidate text block are coherent. When the topic distribution of the candidate text block is similar to the topic distribution of the adjacent text block, it can be determined that the candidate text block and the adjacent text block are continuous.

[0123] Optionally, multiple candidate text blocks and the topic distribution of adjacent text blocks are determined based on a Latent Dirichlet Allocation (LDA) topic model pre-trained with a large-scale corpus. The semantic coherence quantification parameters of adjacent text blocks are determined based on the topic distribution vectors of adjacent text blocks before and after merging among multiple candidate text blocks.

[0124] Step 503: Based on the semantic coherence quantization parameter, dynamically merge adjacent text blocks to obtain multiple final text blocks.

[0125] Specifically, the semantic coherence quantization parameter of two adjacent final text blocks reaches the preset block boundary. The preset block boundary can be determined based on the content and length of the text to be detected, and different preset block boundaries correspond to different texts to be detected.

[0126] Optionally, the semantic coherence quantization parameter is compared with the preset block boundary. If the semantic coherence quantization parameter of two adjacent final text blocks reaches the preset block boundary, the adjacent text blocks are dynamically merged to obtain multiple final text blocks.

[0127] In this embodiment, the text to be detected is pre-segmented to obtain multiple candidate text blocks. Based on the topic distribution vectors of adjacent text blocks before and after merging, semantic coherence quantification parameters of the adjacent text blocks are determined. Based on the semantic coherence quantification parameters, the adjacent text blocks are dynamically merged to obtain multiple final text blocks. This application judges two texts by topic distribution vectors, which can effectively avoid semantic fragmentation. The entire process does not rely on human experience or hard-coded rules, has strong generalization ability, reduces the computational cost of semantic segmentation, and ensures the continuity of sentences, thereby improving the accuracy of text segmentation.

[0128] Based on the above embodiments, this application also provides a process for determining the semantic coherence quantization parameters in a multimodal text segmentation method. Figure 6 A flowchart illustrating the determination of semantic coherence quantization parameters in a multimodal text segmentation method provided in this application is shown below. Figure 6 As shown, in step 502 above, the semantic coherence quantification parameters of adjacent text blocks are determined based on the topic distribution vectors of adjacent text blocks before and after merging among multiple candidate text blocks, including:

[0129] Step 601: Obtain the first topic distribution vector of the current text block among multiple candidate text blocks.

[0130] The current text block can be the first-ranked text block among multiple candidate text blocks. The first topic distribution vector represents the probability distribution of the current text block across multiple topics.

[0131] Optionally, the current text block among multiple candidate text blocks is obtained, and the first topic distribution vector of the current text block is determined based on the current text block and multiple preset topics.

[0132] Step 602: Pre-merge the current text block with the next text block to obtain candidate merged text blocks.

[0133] Pre-merge means that the text block is not merged yet, but the current text block and the next text block are temporarily regarded as candidate text blocks to be merged.

[0134] Optionally, the current text block Current_Chunk and the next text block S_next are pre-merged to obtain a candidate text block Candidate_Chunk.

[0135] Step 603: Obtain the second topic distribution vector of the candidate merged text blocks.

[0136] Optionally, a second topic distribution vector for the candidate merged text blocks is determined based on the candidate merged text blocks and multiple preset topics.

[0137] Step 604: Based on the difference between the first topic distribution vector and the second topic distribution vector, calculate the topic dispersion between the current text block and the next text block as a semantic coherence quantification parameter.

[0138] Among them, the semantic coherence quantification parameter is the relative entropy, which is also known as the KL divergence (Kullback-Leibler divergence).

[0139] Optionally, based on the first topic distribution vector Second topic distribution vector The topic dispersion between the current text block and the next text block is calculated using the first preset semantic coherence quantification formula as a semantic coherence quantification parameter. .

[0140]

[0141] Optionally, based on the first topic distribution vector Second topic distribution vector The topic dispersion between the current text block and the next text block is calculated using the second preset semantic coherence quantification formula as a semantic coherence quantification parameter. .

[0142]

[0143] In this embodiment, a first topic distribution vector of the current text block from multiple candidate text blocks is obtained; the current text block and the next text block are pre-merged to obtain a candidate merged text block; a second topic distribution vector of the candidate merged text block is obtained; and the topic dispersion between the current text block and the next text block is calculated as a semantic coherence quantification parameter based on the difference between the first and second topic distribution vectors. This application can accurately capture the changing trend of semantic boundaries based on topic distribution vectors, providing reliable semantic coherence quantification parameters, making the segmentation more semantically profound.

[0144] Based on the above embodiments, this application also provides another process for determining the final text block in a multimodal text segmentation method. Figure 7 A flowchart illustrating the determination of the final text block in another multimodal text segmentation method provided in this application embodiment is shown below. Figure 7 As shown, in step 503 above, adjacent text blocks are dynamically merged based on semantic coherence quantization parameters to obtain multiple final text blocks, including:

[0145] Step 701: If the semantic coherence quantization parameter between the current text block and the next text block does not reach the preset block boundary, then the merging of the current text block and the next text block is determined to be successful, and the current text block is updated according to the candidate merged text blocks to obtain the first updated text block.

[0146] The preset block boundary was determined experimentally and can be 4.0.

[0147] Optionally, if the semantic coherence quantization parameter between the current text block and the next text block does not reach the preset block boundary, that is, the semantic coherence between the current text block and the next text block is strong, it is determined that the merging between the current text block and the next text block is successful, and the candidate merged text block Candidate_Chunk is taken as the current text block to obtain the first updated text block Current_Chunk.

[0148] Step 702: Continue to obtain the semantic coherence quantization parameters between the first updated text block and the next text block.

[0149] Optionally, the semantic coherence quantization parameters between the first updated text block and the next text block are determined based on the topic distribution vector of the first updated text block and the topic distribution vector of the next text block.

[0150] Step 703: If the semantic coherence quantization parameter between the first updated text block and the next text block reaches the preset block boundary, then the first updated text block is determined to be a final text block.

[0151] Optionally, if the semantic coherence quantification parameter between the first updated text block and the next text block reaches the preset block boundary, it means that the semantic coherence between the first updated text block and the next text block is not strong and the contents of the first updated text block and the next text block are unrelated. In this case, the next text block is not merged and the first updated text block is determined as a final text block.

[0152] Step 704: Continue updating the current text block according to the next text block of the first updated text block, until all text blocks have been processed.

[0153] Optionally, the next text block is taken as the current text block, and the two text blocks are merged according to the semantic coherence quantization parameter between the current text block and the next text block until all text blocks have been processed. In other words, the semantic coherence quantization parameter has been calculated for each text block and its predecessor.

[0154] In this embodiment, if the semantic coherence quantization parameter between the current text block and the next text block does not reach the preset block boundary, the merging of the current text block and the next text block is determined to be successful. The current text block is then updated based on candidate merged text blocks to obtain a first updated text block. The semantic coherence quantization parameter between the first updated text block and the next text block is then obtained. If the semantic coherence quantization parameter between the first updated text block and the next text block reaches the preset block boundary, the first updated text block is determined to be a final text block. The current text block is then updated based on the next text block of the first updated text block until all text blocks have been processed. This application maximizes semantic integrity and improves the accuracy of text segmentation through the semantic coherence quantization parameter.

[0155] Based on the above embodiments, this application also provides a process for determining the final text block in another multimodal text segmentation method. Figure 8 A flowchart illustrating the determination of the final text block in another multimodal text segmentation method provided in this application embodiment is shown below. Figure 8 As shown, in step 503 above, adjacent text blocks are dynamically merged according to the semantic coherence quantization parameter to obtain multiple final text blocks, and the process also includes:

[0156] Step 801: If the semantic coherence quantization parameter between the current text block and the next text block reaches the preset block boundary, then it is determined that the merging between the current text block and the next text block has failed.

[0157] Optionally, if the semantic coherence quantification parameter between the current text block and the next text block reaches the preset block boundary, it means that the current text block and the next text block are not semantically related, and the merging between the current text block and the next text block fails.

[0158] Step 802: Update the current text block according to the next text block until all text blocks have been processed.

[0159] Optionally, the current text block output is taken as the final text block, the next text block is taken as the current text block, and the semantic coherence quantization parameter between the current text block and the next text block is calculated. Steps 701-704 are repeated until all text blocks have been processed.

[0160] Based on the above embodiments, if the semantic coherence quantification parameter between the current text block and the next text block reaches the preset block boundary, it is determined that the merging of the current text block and the next text block has failed; the current text block is updated according to the next text block until all text blocks have been processed. In this embodiment, semantic boundaries can be accurately identified, unsupervised discovery of natural language structures can be achieved, and the spread of semantic pollution can be prevented.

[0161] Based on the above embodiments, this application also provides a length checking process in a multimodal text segmentation method. Figure 9 This application provides a flowchart illustrating the length check process in a multimodal text segmentation method, as shown in the embodiments below. Figure 9 As shown, based on steps 501-503 above, the method further includes:

[0162] Step 901: Perform length checks on multiple final text blocks.

[0163] The final length of a text block is the number of tokens in each text block. A token is the basic unit for splitting text in text processing. It can be a character, a word, a punctuation mark, or an indivisible semantic fragment, depending on the splitting rules.

[0164] Optionally, multiple final text blocks are split according to a preset splitting rule, and the lengths of the multiple final text blocks are obtained based on the splitting results.

[0165] Step 902: If the length of the target text block exceeds the preset length threshold among multiple final text blocks, then determine the sentence boundary with the highest semantic dispersion from the target text block.

[0166] The preset length threshold is determined based on the content and length of the current text, and this application embodiment does not impose any restrictions on it.

[0167] Optionally, if the length of any target text block in multiple final text blocks exceeds a preset length threshold, the target text block is determined to be too long. Then, the sentence boundary with the highest semantic dispersion is determined based on the semantic dispersion of multiple adjacent text blocks within the target text block. For example, if there are three text blocks in the target text block, the semantic dispersion of the first and second text blocks, as well as the semantic dispersion of the second and third text blocks, is calculated to determine the sentence boundary with the highest semantic dispersion.

[0168] Step 903: Based on sentence boundaries, recursively segment the target text block until the length of all text blocks is less than or equal to the preset length threshold.

[0169] Optionally, if the semantic dispersion of the sentence boundary is high, it indicates that the content coherence of the boundary is poor. In this case, the target text block is recursively segmented until the length of all text blocks is less than or equal to the preset length threshold.

[0170] In this embodiment, multiple final text blocks are length-checked. If the length of a target text block exceeds a preset length threshold, the sentence boundary with the highest semantic dispersion is determined from the target text block. Based on the sentence boundary, the target text block is recursively segmented until the length of all text blocks is less than or equal to the preset length threshold. This embodiment ensures semantic integrity through length checking while simultaneously increasing the semantic cohesion within each of the two sub-blocks formed after segmentation.

[0171] Based on the above embodiments, this application also provides a process for generating summaries in a multimodal text segmentation method. In addition to steps 501-503 above, the method further includes:

[0172] A pre-defined summarization model is used to generate corresponding semantic summary information for each final text block.

[0173] The preset summary model can be TextRank or a fine-tuned BART-based model, and the summary information can be a topic tag or a sentence.

[0174] Optionally, a pre-defined summarization model is used to split each final text block, determine the importance of the split results, and thus generate corresponding semantic summary information.

[0175] In this embodiment, a pre-defined summarization model is used to generate corresponding semantic summary information for each final text block. This application facilitates the retrieval and visualization of text blocks, thereby improving question-answering accuracy and reasoning efficiency.

[0176] Based on the same inventive concept, this application also provides a multimodal text segmentation device corresponding to the multimodal text segmentation method. Since the principle of the device in this application is similar to the multimodal text segmentation method described above in this application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.

[0177] Figure 10 This is a schematic diagram of the structure of a multimodal text segmentation device provided in an embodiment of this application, as shown below. Figure 10 As shown, the device includes:

[0178] The acquisition module 1001 is used to acquire multimodal data documents and generate original document text based on the multimodal data documents;

[0179] The segmentation module 1002 is used to segment the original document text according to the document structure tags in the original document text to obtain multiple physical paragraphs;

[0180] The first allocation module 1003 is used to calculate the semantic similarity between each physical paragraph and multiple initial cluster centers. Based on the semantic similarity between each physical paragraph and multiple initial cluster centers, and using a preset order constraint, each physical paragraph is allocated to the paragraph cluster corresponding to the initial cluster center that is closest in physical location and within a preset neighborhood range.

[0181] The second allocation module 1004 is used to recalculate the cluster center of each paragraph cluster based on each physical paragraph in each paragraph cluster, and to re-allocate the clusters until the preset stopping allocation iteration condition is reached.

[0182] The generation module 1005 is used to generate multiple clustered texts as multiple texts to be detected based on the physical paragraphs in multiple paragraph clusters when the preset stopping assignment iteration condition is reached.

[0183] In one possible implementation, the segmentation module 1002 is specifically used to: obtain a global summary of the original document text;

[0184] Based on the global summary, multiple initial cluster centers are identified from multiple physical segments.

[0185] In one possible implementation, the second allocation module 1004 is further configured to: calculate the cumulative paragraph length of each paragraph cluster in real time;

[0186] If the cumulative paragraph length of the target paragraph cluster in each paragraph cluster exceeds the preset maximum allowed length, then the target paragraph cluster will be locked.

[0187] In one possible implementation, the generation module 1005 is further configured to: calculate semantic contour coefficients for multiple paragraph clusters;

[0188] If the semantic contour coefficient is greater than the preset semantic contour threshold, then multiple paragraph clusters are output;

[0189] If the semantic contour coefficient is less than or equal to the preset semantic contour threshold, then multiple physical paragraphs are re-clustered.

[0190] In one possible implementation, the device further includes a merging module, which is specifically used to pre-segment the text to be detected to obtain multiple candidate text blocks;

[0191] Based on the topic distribution vectors of adjacent text blocks before and after merging in multiple candidate text blocks, determine the semantic coherence quantification parameters of adjacent text blocks;

[0192] Based on the semantic coherence quantization parameter, adjacent text blocks are dynamically merged to obtain multiple final text blocks. Among them, the semantic coherence quantization parameter of two adjacent final text blocks reaches the preset block boundary.

[0193] In one possible implementation, the merging module is specifically used to: obtain the first topic distribution vector of the current text block among multiple candidate text blocks;

[0194] Pre-merge the current text block with the next text block to obtain candidate text blocks to be merged;

[0195] Obtain the second topic distribution vector of the candidate merged text blocks;

[0196] Based on the difference between the first topic distribution vector and the second topic distribution vector, the topic dispersion between the current text block and the next text block is calculated as a semantic coherence quantification parameter.

[0197] In one possible implementation, the merging module is specifically used to: if the semantic coherence quantization parameter between the current text block and the next text block does not reach the preset block boundary, determine that the merging between the current text block and the next text block is successful, and update the current text block according to the candidate merged text blocks to obtain the first updated text block.

[0198] Continue to obtain the semantic coherence quantization parameters between the first updated text block and the next text block;

[0199] If the semantic coherence quantization parameter between the first updated text block and the next text block reaches the preset block boundary, then the first updated text block is determined to be a final text block.

[0200] The current text block is updated based on the next text block after the first updated text block, until all text blocks have been processed.

[0201] In one possible implementation, the merging module is further configured to: determine that the merging of the current text block and the next text block has failed if the semantic coherence quantization parameter between the current text block and the next text block reaches the preset block boundary.

[0202] The current text block is updated based on the next text block until all text blocks have been processed.

[0203] In one possible implementation, the merging module is also used to: perform length checks on multiple final text blocks;

[0204] If the length of the target text block exceeds a preset length threshold among multiple final text blocks, then the sentence boundary with the highest semantic dispersion is determined from the target text block.

[0205] Based on sentence boundaries, the target text block is recursively segmented until the length of all text blocks is less than or equal to a preset length threshold.

[0206] In one possible implementation, the merging module is further configured to: generate corresponding semantic summary information for each final text block using a preset summary model.

[0207] The processing flow of each module in the device and the interaction flow between each module can be referred to the relevant descriptions in the above method embodiments, and will not be detailed here.

[0208] This application also provides an electronic device. Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application, such as... Figure 11 As shown, the electronic device includes a processor 1101 and a memory 1102, and optionally, a bus 1103. The memory 1102 stores machine-readable instructions executable by the processor 1101. When the electronic device is running, the processor 1101 and the memory 1102 communicate via the bus 1103. When the machine-readable instructions are executed by the processor 1101, the steps of the multimodal text segmentation method described above are performed.

[0209] This application also provides a computer-readable storage medium storing a computer program, which, when run by a processor, executes the steps of the multimodal text segmentation method described above.

[0210] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the method embodiments, and will not be repeated here. In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection can be through some communication interfaces; the indirect coupling or communication connection of devices or modules can be electrical, mechanical, or other forms.

[0211] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. If the functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, optical disks, and other media capable of storing program code.

[0212] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. A multimodal text segmentation method, characterized in that, The method includes: Acquire multimodal data documents and generate original document text based on the multimodal data documents; Based on the document structure tags in the original document text, the original document text is segmented to obtain multiple physical paragraphs and multiple initial cluster centers; Calculate the semantic similarity between each physical paragraph and the multiple initial cluster centers. Based on the semantic similarity, and using a preset order constraint, assign each physical paragraph to the paragraph cluster corresponding to the initial cluster center that is physically closest to it and within a preset neighborhood. The preset order constraint requires that, when making semantic clustering or merging decisions on text, each text unit in the same text block must be physically continuous and sequentially adjacent in the original document, and cannot forcibly aggregate distant fragments by crossing intermediate content. Based on each physical segment in each segment cluster, the cluster center of each segment cluster is recalculated, and the clusters are reassigned until the preset stopping assignment iteration condition is reached; Based on the physical paragraphs in multiple paragraph clusters when the preset stopping assignment iteration condition is met, multiple clustered texts are generated as multiple texts to be detected.

2. The method according to claim 1, characterized in that, The step of segmenting the original document text based on document structure markers in the original document text to obtain multiple physical paragraphs and multiple initial cluster centers includes: Obtain a global summary of the original document text; Based on the global summary, multiple initial cluster centers are determined from the multiple physical segments.

3. The method according to claim 1, characterized in that, The method further includes recalculating the cluster center of each paragraph cluster based on each physical paragraph in each paragraph cluster, and reallocating the clusters until a preset stopping allocation iteration condition is reached. The cumulative paragraph length of each paragraph cluster is calculated in real time. If the cumulative paragraph length of a target paragraph cluster in each paragraph cluster exceeds the preset maximum allowed length, then the target paragraph cluster is locked.

4. The method according to claim 1, characterized in that, Before generating multiple clustered texts as multiple texts to be detected based on the physical paragraphs in multiple paragraph clusters when the preset stopping assignment iteration condition is reached, the method further includes: Calculate the semantic contour coefficients for the multiple paragraph clusters; If the semantic contour coefficient is greater than the preset semantic contour threshold, then the multiple paragraph clusters are output; If the semantic contour coefficient is less than or equal to the preset semantic contour threshold, then the multiple physical paragraphs are re-clustered.

5. The method according to claim 1, characterized in that, The method further includes: The text to be detected is pre-segmented to obtain multiple candidate text blocks; Based on the topic distribution vectors of adjacent text blocks before and after merging among the multiple candidate text blocks, the semantic coherence quantification parameters of the adjacent text blocks are determined. Based on the semantic coherence quantization parameter, the adjacent text blocks are dynamically merged to obtain multiple final text blocks, wherein the semantic coherence quantization parameter of two adjacent final text blocks reaches the preset block boundary.

6. The method according to claim 5, characterized in that, The step of determining the semantic coherence quantification parameter of adjacent text blocks based on the topic distribution vectors of adjacent text blocks before and after merging among the multiple candidate text blocks includes: Obtain the first topic distribution vector of the current text block among the multiple candidate text blocks; The current text block and the next text block are pre-merged to obtain candidate merged text blocks; Obtain the second topic distribution vector of the candidate merged text block; Based on the difference between the first topic distribution vector and the second topic distribution vector, the topic dispersion between the current text block and the next text block is calculated as a semantic coherence quantification parameter.

7. The method according to claim 6, characterized in that, The step of dynamically merging adjacent text blocks according to the semantic coherence quantization parameter to obtain multiple final text blocks includes: If the semantic coherence quantization parameter between the current text block and the next text block does not reach the preset block boundary, then it is determined that the merging between the current text block and the next text block is successful, and the current text block is updated according to the candidate merged text block to obtain the first updated text block; Continue to obtain the semantic coherence quantization parameters between the first updated text block and the next text block; If the semantic coherence quantization parameter between the first updated text block and the next text block reaches the preset block boundary, then the first updated text block is determined to be a final text block. The current text block is updated based on the next text block of the first updated text block until all text blocks have been processed.

8. The method according to claim 7, characterized in that, The step of dynamically merging adjacent text blocks according to the semantic coherence quantization parameter to obtain multiple final text blocks further includes: If the semantic coherence quantization parameter between the current text block and the next text block reaches the preset block boundary, then it is determined that the merging between the current text block and the next text block has failed. The current text block is updated based on the next text block until all text blocks have been processed.

9. The method according to claim 5, characterized in that, The method further includes: Perform length checks on the multiple final text blocks; If the length of a target text block in the plurality of final text blocks exceeds a preset length threshold, then the sentence boundary with the highest semantic dispersion is determined from the target text block; Based on the sentence boundaries, the target text block is recursively segmented until the length of all text blocks is less than or equal to the preset length threshold.

10. An electronic device, characterized in that, include: A processor and a memory, the memory storing machine-readable instructions executable by the processor, which, when the computer device is running, are executed by the processor to perform the steps of the multimodal text segmentation method as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Text division method and device and electronic equipment

    CN119829764A

  • Text block dynamic segmentation method and system based on RAG

    CN120353880A