A long text consistency detection method based on knowledge retrieval enhancement in the marine field

CN122412525BActive Publication Date: 2026-10-20QINGDAO INST OF MARINE GEOLOGY
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202610845514.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-12
Publication Date
2026-10-20
Estimated Expiration
2046-06-12

AI Technical Summary

Technical Problem

[0006]为解决上述技术问题,本发明提出一种基于知识检索增强的海洋领域长文本一致性检测方法,其解决现有海洋领域长文本一致性检测方法中存在的领域知识缺失、长文档建模能力不足及事实校验薄弱的问题

Benefits of technology

本发明针对现有方法在海洋领域存在领域知识缺失的问题,在知识构建阶段提出一种多源异构文本融合策略:广泛采集涵盖海洋观测报告、测绘成果说明书、科研论文、政策文件、航运日志及灾害预警信息等多类型文本数据,并对其进行结构化抽取与标准化处理。本发明通过融合多维度的知识源,所构建的海洋领域知识库能够系统覆盖海洋气象、生态环境、地质构造与航运安全等核心专业子领域。相较于仅依赖通用语料或单一数据来源的现有模型,显著增强了对海洋专业术语、科学事实及逻辑关系的理解能力,有效解决了现有方法因缺乏领域知识支撑而导致的事实判断偏差大、专业语境下一致性评估准确性不足等关键问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122412525B_ABST
    Figure CN122412525B_ABST
Patent Text Reader

Abstract

The application relates to the field of knowledge reasoning, in particular to a marine field long text consistency detection method based on knowledge retrieval enhancement, and aims to solve the problems of field knowledge loss in marine professional texts, insufficient long document modeling capability and weak fact checking. Specifically, the following steps are included: first, extracting and cleaning the original marine field text; then, segmenting and vectorizing to construct a structured RAG knowledge base; on this basis, the semantic unit coding of the long text to be detected is carried out, the K most similar related fragments are retrieved to form an external knowledge set; further, the large language model is called by combining the customized Prompt to realize the joint discrimination of the multi-dimensional evaluation indexes of professional accuracy, fact consistency and logical coherence; finally, the sampling verification and result aggregation are carried out to output a structured consistency analysis report. The application combines knowledge retrieval and large model reasoning, and can effectively improve the detection capability of marine long texts in terms of fact accuracy, logical coherence and term standardization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of knowledge reasoning, specifically to a long text consistency detection method for the marine domain based on knowledge retrieval enhancement. Background Technology

[0002] With the continuous advancement of marine informatization, textual data in the marine field has experienced explosive growth, encompassing a wide range of heterogeneous sources including research reports, monitoring logs, policies and regulations, marine surveying results, and satellite remote sensing interpretation reports. This type of specialized text content involves multiple subfields such as marine meteorology, ecological environment monitoring, ship tracking analysis, and marine geological exploration, and is rich in spatiotemporal correlation information and key scientific facts, making it valuable for marine knowledge graph construction and multi-source information consistency research. However, these texts are generally characterized by their length, complex structure, and dense use of technical terminology, posing significant challenges to the efficiency and accuracy of traditional information processing methods. Against this backdrop, achieving automated and high-precision semantic consistency detection of large-scale marine specialized texts has become a key technical problem urgently needing breakthroughs in the field of intelligent marine information processing, and is of great practical significance for promoting the intelligent application of marine information.

[0003] Currently, existing methods for detecting semantic consistency in long texts are mainly geared towards general natural language processing scenarios. Typical techniques include sentence vector-based matching methods, context-based semantic similarity calculation methods, and generative evaluation methods based on large language models. These methods perform well in general domain texts such as news summaries and dialogue system evaluations, but they still face the following three challenges when processing specialized texts in the marine domain: 1. Lack of domain knowledge. Existing models are mostly trained on general corpora, lacking a deep understanding of marine terminology systems, observation indicators (such as sea surface temperature, salinity, and chlorophyll concentration), and geospatial features, making it difficult to accurately model the semantic relationships between professional concepts; 2. Insufficient long document modeling capabilities. Limited by the model input window or shallow semantic representation, traditional methods struggle to effectively capture logical consistency across paragraphs and chapters, easily leading to global semantic breaks; 3. Weak fact-checking. Most methods focus on linguistic fluency or local coherence, lacking the ability to substantively verify whether the statements conform to marine scientific principles or observational facts.

[0004] For example, the patent application published on July 1, 2025, with publication number CN120235143A, entitled "Text Correction Method, System, Medium and Device Based on Logical Consistency Detection," can detect and correct logical conflicts, but its knowledge source is relatively singular, lacking dynamic retrieval and multi-source fusion mechanisms, making it difficult to cover multiple types of information in complex fields; the Chinese patent application published on March 4, 2025, with publication number CN119557695A, entitled "A Multimodal False Information Detection Method Based on Semantic Consistency," which performs consistency assessment by fusing multimodal information such as text and images, has limited ability in the structured parsing of long texts, and is difficult to maintain global semantic coherence for long and logically complex documents; The patent application published on July 8, 2025, with publication number CN120278137A, entitled "Text Summary Consistency Detection Method, Apparatus, Device, Medium and Product", can measure the semantic consistency between the summary and the original text. However, its evaluation mainly relies on sentence-level or paragraph-level similarity and lacks multi-dimensional quantitative analysis of the standardization of the use of professional terms and the rationality of facts.

[0005] Therefore, there is an urgent need for a novel detection method that integrates multi-source marine knowledge, supports structured modeling of long documents, and has the ability to assess factual consistency in multiple dimensions, in order to improve the accuracy, reliability, and interpretability of marine intelligent text processing systems. Summary of the Invention

[0006] To address the aforementioned technical problems, this invention proposes a long text consistency detection method for the marine domain based on knowledge retrieval enhancement. This method solves the problems of domain knowledge deficiency, insufficient long document modeling capabilities, and weak fact verification in existing long text consistency detection methods for the marine domain.

[0007] To achieve the above objectives, the present invention provides a long text consistency detection method for the marine domain based on knowledge retrieval enhancement, which specifically includes the following steps: First, the raw text is extracted and cleaned from marine data; Subsequently, the cleaned text was segmented and vectorized using embedding to construct a structured marine domain RAG retrieval library; Based on this, semantic units are extracted and vectorized into the long marine text to be detected. The Top-K related segments in the knowledge base are matched by similarity retrieval and integrated into an external knowledge reference set. Furthermore, by combining a customized Prompt design with the use of a large language model to generate question-answer pairs, a joint judgment can be made on multi-dimensional evaluation indicators of professional accuracy, factual consistency, and logical coherence. Finally, after sampling verification and result aggregation, a structured consistency analysis report is output.

[0008] This invention integrates knowledge retrieval and large-scale model reasoning, which can effectively improve the detection capabilities of long marine texts in terms of factual accuracy, logical coherence, and terminology standardization.

[0009] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention addresses the lack of domain knowledge in existing methods for marine applications by proposing a multi-source heterogeneous text fusion strategy during the knowledge construction phase. This strategy involves extensively collecting various types of text data, including marine observation reports, surveying and mapping results descriptions, research papers, policy documents, shipping logs, and disaster early warning information, and then performing structured extraction and standardization. By integrating multi-dimensional knowledge sources, this invention constructs a marine domain knowledge base that systematically covers core professional sub-fields such as marine meteorology, ecological environment, geological structure, and shipping safety. Compared to existing models that rely solely on general corpora or single data sources, this significantly enhances the understanding of marine terminology, scientific facts, and logical relationships, effectively solving key problems such as large factual judgment biases and insufficient accuracy in consistency assessments within professional contexts due to a lack of domain knowledge support in existing methods.

[0010] This invention addresses the shortcomings of existing technologies in long document modeling by proposing a hierarchical partitioning mechanism based on discourse structure and argumentation logic during the semantic parsing stage. This mechanism decomposes long marine texts into multiple semantically complete and logically consistent semantic units based on topic evolution and causal relationships, explicitly preserving the contextual dependencies between these units. This mechanism enables the system to simultaneously perceive local semantic details and global logical structure during consistent reasoning, effectively overcoming the problem of missed cross-segment logical contradictions caused by fragmented processing in existing methods. Thus, it achieves cross-discourse consistent reasoning capabilities for the entire document.

[0011] This invention addresses the weakness of existing methods in fact-checking by proposing a multi-dimensional quantitative analysis framework for the consistency assessment stage. This framework independently and quantifiably evaluates semantic units from three dimensions: the standardization of professional terminology, the consistency between factual descriptions and observed knowledge, and the self-consistency of argumentation logic. This framework enables the system to generate structured, fine-grained detection results, accurately pinpointing the specific categories, sentence locations, and types of deviations in inconsistent content. Compared to existing solutions that only output general confidence levels or binary judgments, this invention significantly improves the interpretability and diagnostic capabilities of the detection process, providing reliable technical support for demanding applications such as scientific paper review, marine policy compliance checks, and automated quality control of monitoring reports. Attached Figure Description

[0012] Figure 1 This is a flowchart of the present invention. Detailed Implementation

[0013] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.

[0014] like Figure 1 As shown, a long text consistency detection method for the marine domain based on knowledge retrieval enhancement includes the following specific implementation steps: S1: Multi-source marine data acquisition and preprocessing This invention collects raw text from two types of data sources: (1) Marine observation data text, including daily marine monitoring reports, station logs, and sea state records, originates from marine monitoring stations, maritime regulatory departments, and marine buoy monitoring systems, and is characterized by high frequency, strong time sequence, and diverse formats; (2) Report texts, including shipping reports, policy documents, and disaster warning announcements, are usually in PDF or DOCX format.

[0015] For documents of different formats, this invention employs a differentiated parsing strategy: For monitoring reports in PDF or semi-structured tables, PyMuPDF and pdfminer tools are used to extract text content; for scanned image reports, PaddleOCR is used for optical character recognition to extract key marine element information, such as sea surface temperature (SST), salinity, wind speed, and wave height; for DOCX documents, python-docx is used to parse their hierarchical structure and extract the main text, titles, tables, and appendices; for multi-column PDF scientific papers, their mixed text and image layouts, footnotes, and reference areas are specifically processed to ensure complete extraction of core scientific content.

[0016] After text extraction, a unified cleaning and standardization process is performed: irrelevant characters, duplicate paragraphs, and code blocks are removed; common OCR recognition errors are corrected; and the time format is standardized and format differences from different sources are eliminated. Simultaneously, noise filtering is performed to remove content with no marine scientific value, such as advertisements, template pages, and blank pages. Finally, all preprocessed text is stored in a structured JSON format, with each record containing a unique source identifier (source_id) and corresponding text content, as shown in the example below: [ {"source_id": "Report_103", "text": "Monitoring Station A recorded..." on 2023-08-04 {"source_id": "Report_122", "text": "According to the shipping report for the XX sea area, a persistent upwelling occurred in August..."} ] S2: Building a Data Knowledge Base for the Marine Domain The preprocessed long document obtained from S1 is semantically segmented to generate multiple semantic fragments. The segmentation principle follows the natural paragraph boundaries, topic transition points, and the variation in the density of technical terms. For scientific research papers or policy documents, further in-depth segmentation is performed by combining chapter titles, list structures, and syntactic features to ensure that each semantic fragment has a clear topic orientation and its length is controlled between 500 and 800 tokens.

[0017] Each semantic segment is stored in the following structured format: { "doc_id": "Report_5", "chunk_id": "R-0023", "text": "Sea surface temperature in the northern part of the South China Sea is 0.8℃ higher than the same period in previous years, but salinity changes are not significant." "topic": "Relationship between sea surface temperature and salinity", "tokens": 612 } Subsequently, a unified pre-trained text vectorization model, bge-large-zh (embed_model_name = bge-large-zh), is used to encode each segment, converting it into a high-dimensional vector representation (vector_dim = 1024), and L2 normalization is performed on all vectors to support efficient retrieval of cosine similarity (similarity_metric = cosine).

[0018] After obtaining the vector representation, an efficient Approximate Nearest Neighbor (ANN) index is constructed using the FAISS framework, with an index structure of HNSW (index_type = FAISS-HNSW). In this embodiment, the connectivity parameter M of the HNSW graph is set to 64 (M(HNSW) = 64), and the dynamic candidate set size ef_search during retrieval is set to 128 (ef_search = 128) to achieve a good balance between retrieval accuracy and computational efficiency. The final knowledge base includes the original text of the knowledge fragment, vector representation, source literature annotations, etc., and can retrieve the most relevant marine domain knowledge for each text to be detected in the consistency detection task, forming objective and reliable factual evidence.

[0019] S3: Generate a search-enhanced knowledge set The long marine texts to be tested are divided into semantic units according to the segmentation principles of paragraph structure, sentence group logic, argumentation relationship, and concentration of professional terms, so as to ensure that each semantic unit expresses a complete fact or judgment.

[0020] For each semantic unit, the same bge-large-zh model as S2 is used for encoding to generate a query vector. The system calculates its similarity to the vectors of all knowledge fragments in the knowledge base based on cosine similarity. Similarity: ; For each The five knowledge fragments with the highest similarity (retrieval_top_k = 5) are retrieved to form an initial external knowledge reference set. : To improve search quality, Perform post-processing operations such as filtering and sorting: Filtering rules: Remove segments with a similarity lower than the threshold (set to 0.82, i.e., similarity_threshold = 0.82), and remove duplicate content. The sorting criteria are as follows: the text is reordered based on a combination of vector similarity, text length, and technical terminology matching.

[0021] The final output is a "retrieval-enhanced knowledge set" corresponding to each semantic unit, which serves as external knowledge support for the reasoning of the large model.

[0022] S4: Consistency Check Design a customized Prompt template, clearly defining the task objectives, input structure, and output format. The Prompt consists of three parts: (1) The original text of the semantic unit to be detected; (2) The corresponding retrieval enhancement knowledge set (Top-5 relevant fragments); (3) Instructions such as: "Based on the above marine science knowledge, please evaluate the consistency of the original text from the following three dimensions: ① Whether the professional terminology is standardized; ② Whether the factual description is consistent with the observation knowledge; ③ Whether the argumentation logic is self-consistent. If there is any inconsistency, please point out the specific statement, category, reason and improvement suggestion, and give a consistency score of 0-100." The DeepSeek-V3.2-Exp large language model (model_name_or_path = DeepSeek-V3.2-Exp) is invoked for inference. Its maximum supported input sequence length is 4096 tokens (max_seq_length = 4096), which is sufficient to accommodate raw semantic units, retrieved knowledge, and structured prompts, avoiding truncation of crucial context. The model generates structured output, including: inconsistency markers, error locations, reasoning for judgment, suggested corrections, and quantified scores.

[0023] S5: Results Verification and Report Generation To ensure reliability, a sampling verification mechanism is introduced: for key content involving the interpretation of technical terms and the judgment of ocean physical mechanisms, the model output is randomly sampled for manual review. The review results are used to iteratively optimize the Prompt design and retrieval filtering rules.

[0024] Finally, the detection results of all semantic units are aggregated to generate a complete "Marine Long Text Consistency Analysis Report", which can be used in various application scenarios such as scientific paper review, marine monitoring report review, and policy text quality inspection.

[0025] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the claims of this invention should still fall within the patent coverage of this invention.

Claims

1. A consistency detection method for long texts in the marine domain based on knowledge retrieval enhancement, characterized in that, Includes the following steps: S1: Collect multi-source text data related to marine science, and clean and standardize it to obtain structured preprocessed text; S2: Semantically segment the structured preprocessed text to generate multiple semantic segments, and encode each semantic segment using a unified pre-trained vectorization model to build a marine domain knowledge base; S3: Divide the long marine text to be detected into semantic units to obtain multiple semantic units that express complete facts or judgments; encode each semantic unit using the same pre-trained vectorization model as S2 to generate semantic vectors, and calculate the similarity between the semantic unit and the corresponding vectors of each knowledge segment in the knowledge base based on cosine similarity; retrieve the K knowledge segments with the highest similarity; and after filtering and sorting, form a retrieval-enhanced knowledge set. S4: Input the semantic unit and the corresponding retrieval enhancement knowledge set into the large language model, and guide the large language model to perform factual consistency reasoning through a customized Prompt, and output the structured consistency analysis results, which include three dimensions: professional accuracy, factual consistency and logical coherence. S5: Based on the analysis results, calculate the consistency score of each semantic unit, and perform sampling verification and aggregation on the consistency analysis results to generate a complete marine long text consistency analysis report; the sampling verification includes: manually reviewing the model output corresponding to semantic units that are highly specialized or logically complex, and the review results are used to iteratively optimize the Prompt design and retrieval filtering rules.

2. The long text consistency detection method for the marine domain based on knowledge retrieval enhancement as described in claim 1, characterized in that: In S1: The multi-source text data related to marine science includes: marine observation data text and report-type text; The marine observation data text includes: daily marine monitoring reports, sea state records, station logs, and shipping logs; The report types of texts include shipping reports, policy documents, scientific research papers, and disaster early warning announcements.

3. The long text consistency detection method for the marine domain based on knowledge retrieval enhancement as described in claim 1, characterized in that: In S1: In multi-source text data, for PDF or image documents, text extraction or optical character recognition technology is used to obtain the content; for DOCX documents, their document structure is parsed to extract the main text, titles and table information. The data cleaning and standardization process includes: deleting irrelevant characters, duplicate paragraphs and code blocks, correcting identification errors, standardizing time formats, and removing advertisements, template pages and blank pages; Each record in the structured preprocessed text contains a unique source identifier and corresponding text content.

4. The long text consistency detection method for the marine domain based on knowledge retrieval enhancement as described in claim 1, characterized in that: In S2: The semantic segmentation principle follows the natural paragraph boundaries, topic transition points, and the variation in the density of professional terms. When processing scientific research papers or policy documents, it further combines chapter titles, list structures, and syntactic features for segmentation.

5. The long text consistency detection method for the marine domain based on knowledge retrieval enhancement as described in claim 1, characterized in that: In S2: The pre-trained vectorized model is bge-large-zh; The marine domain knowledge base is constructed based on the FAISS framework and uses an HNSW structure to create an approximate nearest neighbor index, which includes the original text content, vector representation, and source identifier.

6. The long text consistency detection method for the marine domain based on knowledge retrieval enhancement as described in claim 1, characterized in that: In S3: The cosine similarity is defined as the query vector. With the j-th knowledge vector fragment in the knowledge base dot product divided by The product of norms, i.e.: 。 7. The long text consistency detection method for the marine domain based on knowledge retrieval enhancement as described in claim 1, characterized in that: In S3: The retrieval operation includes: for each query vector The system retrieves the K most similar knowledge fragments from a marine domain knowledge base to form an initial external knowledge reference set. ,Right now: 。 8. The long text consistency detection method for the marine domain based on knowledge retrieval enhancement according to claim 1, characterized in that: In S3: The filtering operation includes: setting a semantic relevance threshold to remove knowledge fragments with similarity below the threshold, and performing deduplication. The sorting operation includes: combining vector similarity, text length and technical terminology matching degree, and performing weighted fusion and reordering on the filtered knowledge fragments.

Citation Information

Patent Citations

  • Multi-modal false information detection method based on semantic consistency

    CN119557695A

  • Text error correction method and system based on logic consistency detection, medium and equipment

    CN120235143A

  • Text abstract consistency detection method and device, equipment, medium and product

    CN120278137A

  • Method, system and equipment for large language model fact verification based on retrieval enhancement and medium

    CN119204025A

  • Retrieval enhancement generation method based on token-level word embedding

    CN119311814A