A method and system for retrieval augmentation and constraint guidance for high-consistency text generation

By combining a streaming generation mechanism with preset constraint rules, text fragments are generated sentence by sentence and the generation boundaries and reasoning logic are adjusted in real time, which solves the problem of inconsistent generation results in existing technologies and achieves highly consistent and flexible text generation.

CN121809422BActive Publication Date: 2026-06-09HANGZHOU YANZHI TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HANGZHOU YANZHI TECHNOLOGY CO LTD
Filing Date
2026-03-05
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing high-consistency text generation methods are poorly suited for multi-hop reasoning and incremental information tasks, and cannot dynamically adjust retrieval strategies, resulting in inconsistent generation results and logical inconsistencies.

Method used

The system employs a streaming generation mechanism to generate text fragments sentence by sentence, captures semantic units in real time, and dynamically adjusts the generation boundaries and reasoning logic by combining preset constraint rules and semantic unit feedback mechanisms to form a closed-loop optimization. The retrieval strategy is iteratively optimized through consistency verification.

Benefits of technology

It improves the quality and consistency of text generation, can dynamically respond to information changes, handle complex information relationships, fill factual gaps, and enhance the flexibility and accuracy of the generation process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121809422B_ABST
    Figure CN121809422B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of text retrieval, in particular to a retrieval enhancement and constraint guidance method and system for high-consistency text generation. The present application generates text segments sentence by sentence through a streaming generation mechanism and captures semantic units of each segment in real time, can closely combine actual needs in the generation process, effectively realizes dynamic adjustment in the generation process, through the aid of preset constraint rules and the feedback mechanism of semantic units, the system can continuously optimize the reasoning logic and the generation boundary at each stage of generation, not only improves the quality of text generation, but also provides quality guarantee for the final output through consistency check, forms a closed-loop feedback mechanism, so that the generation process can respond to changes in information in real time, handle complex information relationships, and effectively fill in the required factual gaps.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of text retrieval technology, and in particular to a retrieval enhancement and constraint guidance method and system for generating highly consistent text. Background Technology

[0002] The Retrieval Enhancement and Constraint Guidance for High Consistency Text Generation is a text generation technology framework that combines external knowledge retrieval with generation process control. It aims to solve common problems in large language models, such as factual illusion, logical contradictions, and contextual inconsistencies. It ensures that the generated text maintains a high degree of consistency with the given information source or constraints in terms of factual accuracy, logical coherence, and format standardization. Retrieval enhancement provides factual anchors, while constraint guidance provides behavioral boundaries, jointly improving the consistency and reliability of text generation.

[0003] The most commonly used and widely applicable high-consistency text generation technique in the current technology is a basic retrieval-enhanced generation architecture combined with prompting engineering constraints. This approach first constructs a structured knowledge retrieval foundation through offline indexing, then obtains accurate factual evidence through online retrieval matching and injects it into generation boundaries and rules. Based on the facts and constraints, it outputs controlled text, and finally, a consistency check ensures the final quality control of the output. However, this technique employs a separate architecture of retrieval before generation, making it impossible to dynamically adjust the retrieval strategy during the generation process. This results in poor applicability for multi-hop reasoning or tasks requiring incremental information. Summary of the Invention

[0004] The main objective of this invention is to provide a highly consistent text generation retrieval enhancement and constraint guidance method, which aims to solve the technical problems in the prior art.

[0005] This invention proposes a retrieval enhancement and constraint guidance method for highly consistent text generation, comprising:

[0006] The target requirements and preset constraint rules of the text generation task are obtained, and text fragments are generated sentence by sentence according to the target requirements, while the semantic units corresponding to each text fragment are captured synchronously.

[0007] Based on the target requirements and each semantic unit, obtain the corresponding fact association dimension and information completeness index to determine the corresponding fact gap type;

[0008] According to the preset constraint rules and each fact gap type, obtain the corresponding matching retrieval trigger condition, and dynamically trigger the corresponding retrieval mode according to each matching retrieval trigger condition;

[0009] The target retrieval result is obtained according to each retrieval mode, and the generation boundary and reasoning logic are dynamically adapted and adjusted according to the preset constraint rules, each target retrieval result and the corresponding semantic unit.

[0010] The streaming generation mechanism, along with the adjusted generation boundaries and inference logic, forms a closed loop to optimize the generation of subsequent text fragments.

[0011] The consistency check obtains quality feedback, and the retrieval strategy and preset constraint rules are iteratively optimized based on the quality feedback to finally output highly consistent text.

[0012] This application also provides a retrieval enhancement and constraint guidance system for highly consistent text generation, including:

[0013] The generation module is used to obtain the target requirements and preset constraint rules of the text generation task, and generate text fragments sentence by sentence according to the target requirements and simultaneously capture the semantic units corresponding to each text fragment.

[0014] The determination module is used to determine the corresponding fact gap type by obtaining the corresponding fact association dimension and information completeness index for each semantic unit based on the target requirements and each semantic unit;

[0015] The triggering module is used to obtain the corresponding matching retrieval triggering conditions according to the preset constraint rules and each fact gap type, and to dynamically trigger the corresponding retrieval mode according to each matching retrieval triggering condition;

[0016] The adjustment module is used to obtain target search results according to each of the search modes, and dynamically adapt and adjust the generation boundary and reasoning logic according to the preset constraint rules, each target search result and the corresponding semantic unit.

[0017] The closed-loop module is used to form a closed loop between the streaming generation mechanism and the adjusted generation boundary and inference logic to optimize the generation of subsequent text fragments.

[0018] The iterative optimization module is used to obtain quality feedback through consistency verification, and iteratively optimize the retrieval strategy and preset constraint rules based on the quality feedback, and finally output highly consistent text.

[0019] The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described high-consistency text generation retrieval enhancement and constraint guidance method.

[0020] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the above-described high-consistency text generation retrieval enhancement and constraint guidance method.

[0021] The beneficial effects of this invention are as follows: This invention generates text fragments sentence by sentence through a streaming generation mechanism and captures the semantic units of each fragment in real time. It can closely integrate with actual needs during the generation process and effectively realize dynamic adjustment during the generation process. By using preset constraint rules and the feedback mechanism of semantic units, the system can continuously optimize the reasoning logic and generation boundary at each stage of generation. This not only improves the quality of text generation, but also provides quality assurance for the final output through consistency verification, forming a closed-loop feedback mechanism. This enables the generation process to respond to changes in information in real time, handle complex information relationships, and effectively fill the required factual gaps. Attached Figure Description

[0022] Figure 1 This is a schematic diagram of a method flow according to an embodiment of the present invention.

[0023] Figure 2 This is a schematic diagram of the system structure according to an embodiment of the present invention.

[0024] Figure 3 This is a schematic diagram of the internal structure of a computer device according to an embodiment of this application.

[0025] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0026] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0027] like Figure 1 As shown, this application provides a retrieval enhancement and constraint guidance method for highly consistent text generation, including:

[0028] S1. Obtain the target requirements and preset constraint rules of the text generation task, and generate text fragments sentence by sentence according to the target requirements and simultaneously capture the semantic units corresponding to each text fragment.

[0029] S2. Based on the target requirements and each semantic unit, obtain the corresponding fact association dimension and information completeness index to determine the corresponding fact gap type;

[0030] S3. Obtain the corresponding matching retrieval triggering condition according to the preset constraint rules and each fact gap type, and dynamically trigger the corresponding retrieval mode according to each matching retrieval triggering condition;

[0031] S4. Obtain the target retrieval result according to each retrieval mode, and dynamically adapt and adjust the generation boundary and reasoning logic according to the preset constraint rules, each target retrieval result and the corresponding semantic unit;

[0032] S5. Optimize the generation of subsequent text segments by forming a closed loop with the adjusted generation boundary and reasoning logic using the streaming generation mechanism.

[0033] S6. Obtain quality feedback through consistency verification, and iteratively optimize the retrieval strategy and preset constraint rules based on the quality feedback, and finally output highly consistent text.

[0034] As described in steps S1-S6 above, this invention ensures better logical consistency of the generated text by clearly defining task requirements and constraint rules in the early stages of generation. Fixed constraint rules provide a framework for subsequent generation, enhancing the consistency and accuracy of text generation. The streaming generation mechanism generates sentence by sentence and captures semantic units synchronously, making the generation process more flexible and reducing the risk of information loss. By analyzing the relationship between semantic units and facts in the generated text, information gaps can be identified in real time, making the generation process more dynamic. The generated content can be adjusted in a timely manner for specific semantic units to avoid information loss. The introduction of information completeness indicators enables the system to adaptively evaluate the overall quality of the generated content, thereby avoiding logical incoherence or factual errors caused by a lack of necessary background knowledge during the generation process. By analyzing factual gaps in real time and formulating retrieval trigger conditions, the system can dynamically adjust the retrieval strategy during the generation process, enabling the generation process to call relevant information at any time according to the current text fragment requirements. This improves the coherence and comprehensiveness of the text while ensuring the quality of generation, and solves the problem of inconsistent generation results caused by untimely information acquisition in the prior art.

[0035] By combining search results with preset constraint rules to further optimize the generation logic, the generation process can self-adjust, thereby generating text that is more logical and factual. By combining the streaming generation mechanism with the adjusted generation boundaries and reasoning logic to form a closed loop, the system can absorb feedback from the previous stage and make adjustments in each generation, significantly improving the consistency and quality of the generated text. The closed-loop design ensures that the system continuously learns and improves in a dynamic environment, making the generated text more logical and relevant. Through consistency verification to provide feedback on the generation quality, the system can monitor each stage of text generation in real time and make rapid adjustments when necessary, so that the generated text can meet the original design intention and achieve high consistency. This not only solves the limitations caused by multi-hop reasoning and incremental information requirements, but also significantly improves the flexibility and consistency of text generation, making the generated results more adaptable to real-world contexts.

[0036] In one embodiment, step S1, which generates text segments sentence by sentence according to the target requirement using a streaming generation mechanism and synchronously captures the semantic units corresponding to each text segment, includes:

[0037] S11. Obtain initial prompt words according to the target requirements, and start the streaming generator to output text fragments sentence by sentence according to the initial prompt words;

[0038] S12. Obtain contextual clues and entity co-occurrence frequency based on the sequence position of each text segment and the semantic overlap of the text segments before and after it, and determine the contextual dependency relationship based on the contextual clues and entity co-occurrence frequency.

[0039] S13. Obtain the lexical features, syntactic features, and semantic features of each text segment, and obtain the core entities and syntactic associations between entities based on the lexical features and syntactic features;

[0040] S14. Obtain the logical relationship type and context dependency weight based on the semantic features and context dependencies;

[0041] S15. Construct a basic semantic framework based on the type attributes of the core entities and the structural types of syntactic associations between entities, and supplement the logical dimensions of the framework based on the logical relationship types.

[0042] S16. Based on the context dependency weight, determine the priority of each core entity and syntactic association, strengthen and supplement the low-priority semantic dimensions in the basic semantic framework, and obtain the semantic units that accurately map the core information of the current text segment by combining the structural integrity and semantic relevance of the supplemented semantic framework.

[0043] As described in steps S11-S16 above, the step of determining contextual dependencies involves determining the temporal association priority of preceding and following texts based on the sequence position of each text segment, obtaining semantic overlap by calculating cosine similarity based on the semantic content of the preceding and following text segments, and extracting contextual association cues and entity co-occurrence frequencies based on temporal association priority and semantic overlap. Contextual association cues include referential relationships and topic continuation relationships. The association confidence is obtained by weighted summation based on the type weight of contextual association cues (referential relationships have a higher weight than topic continuation relationships) and the statistical threshold of entity co-occurrence frequencies. The association confidence is then compared with a pre-set... The reliability threshold comparison results are used to obtain the dependency strength level, and the dependency category is obtained according to the specific type of contextual association clues (such as referential relationship, topic continuation relationship). The specific form of contextual dependency is determined according to the dependency strength level and dependency category, thus determining the contextual dependency. The dependency is dynamically adjusted by the sequence position and semantic content of the preceding and following text segments, which effectively copes with multi-hop reasoning and incremental information tasks. This allows the information association in the generation process to be optimized in real time, thereby improving the flexibility and adaptability of generation. In stark contrast to the linear retrieval and static generation architecture in existing technologies, it significantly improves the ability to handle multiple tasks.

[0044] The steps for obtaining core entities and grammatical relationships between entities are as follows: Based on the lexical features of each text segment, obtain part-of-speech tagging results, entity candidate sets, and lexical importance scores; based on syntactic features, obtain dependency syntax structures and phrase structure trees; and based on the part-of-speech tagging results and entity candidate sets, filter out nominal and proper noun entity candidates; determine the core entities based on the lexical importance scores and the core position of the entity in the syntactic structure (e.g., subject-verb-object-head); obtain the grammatical relationships between core entities based on the dependency relation types (subject-verb, verb-object, modifier-head, etc.) in the dependency syntax structure and the hierarchical relationships in the phrase structure tree; and combine lexical and syntactic features and their statistical characteristics to accurately extract core entities and their grammatical relationships, providing a solid foundation for the generated text and ensuring that the generated text has strong targeting and systematicity when dealing with complex topics.

[0045] The steps for obtaining logical relationship types and context dependency weights are as follows: Semantic role labeling results and semantic similarity matrices are obtained based on the semantic features of each text segment; associated entity pairs and preliminary association strength scores are obtained based on context dependencies; and logical relationship types are identified based on the combination patterns and logical connectors of the semantic role labeling results. The semantic matching degree of associated entity pairs is calculated based on the semantic similarity matrix, and the context dependency weights are obtained by weighted summation, combined with the preliminary association strength scores of the context dependencies. Through the combined analysis of semantic role labeling and semantic similarity matrices, the context dependency weights are evaluated and adjusted in real time, enabling the text generation process to better fit the actual context, improving the intelligence level of the generation process, and dynamically responding to various context conditions. This results in generated text that is significantly superior in accuracy and quality to the traditional method of first retrieving and then generating, achieving higher consistency and coherence.

[0046] This invention achieves dynamic generation by acquiring initial prompt words based on target requirements and starting a streaming generator to output text fragments sentence by sentence. This allows for rapid adjustment of the generated content based on real-time user needs, enhancing the relevance of the generated text. It can respond promptly to external changes during the generation process. Compared with the static use of prompt words in existing technologies, this invention significantly improves the flexibility and targeting of text output. By calculating the sequence position of text fragments and the semantic overlap between preceding and following fragments, it obtains contextual clues and entity co-occurrence frequencies, promoting the logic and consistency of the generated text. This enables the generated text to be associated based on contextual information, making each text fragment not only self-contained but also enhancing its semantic coherence through context, significantly improving the quality of text generation. The systematic acquisition of multi-dimensional features of text fragments helps to fully understand the text content, thereby generating more accurate and richer text. It ensures that core entities and their grammatical relationships are effectively identified, thus forming a more complex semantic structure and improving the expressive depth of the generated results.

[0047] By analyzing semantic features and contextual dependencies, a clear logical framework is provided for generation, enabling reasonable logical connections between each text fragment. This effectively compensates for the weak or unclear logical relationships in the generation process of existing technologies, ensuring that the generated text content has strong logical consistency and readability. The basic semantic framework is constructed using core entity type attributes and their syntactic associations to supplement logical dimensions in a timely manner, making the generated text not only rich but also systematic, providing a hierarchical foundation for text generation. It can provide a clear semantic framework in complex contexts, improving the accuracy and completeness of text generation. By prioritizing the low-priority dimensions of the basic semantic framework through contextual dependency weighting, timely reinforcement and supplementation are provided to ensure the completeness and richness of the text. This solves the problem in existing technologies where the understanding of the generated context is not deep enough, resulting in thin text content or deviation from the topic. It ensures that the generated results still have a clear sense of direction in changing topics and complex contexts.

[0048] In one embodiment, step S2, which involves obtaining the corresponding factual association dimension and information completeness index based on the target requirement and each semantic unit to determine the corresponding factual gap type, includes:

[0049] S21. Decompose the core fact dimensions of the text generation task according to the target requirements, and obtain the corresponding fact association dimensions according to the core fact dimensions and each semantic unit. The core fact dimensions include entity attribute dimensions, logical deduction dimensions and scene adaptation dimensions.

[0050] S22. Obtain the information coverage and accuracy scores of the semantic unit under each core fact dimension, and perform a weighted summation based on the information coverage and accuracy scores to obtain the information completeness index;

[0051] S23. Determine whether the information completeness index is less than a preset completeness threshold;

[0052] S24. If the information completeness index is not less than the preset completeness threshold, it is determined that there is no factual gap, and the streaming generation continues.

[0053] S25. If the information completeness index is less than the preset completeness threshold, the type of fact gap is determined by obtaining the association path length of the missing information and the intensity of information increment demand based on the fact association dimension.

[0054] S26. If the length of the associated path is greater than a preset path threshold and the intensity of the information increment demand is lower than a preset intensity threshold, it is determined to be a multi-hop inference gap.

[0055] S27. If the length of the associated path is not greater than a preset path threshold and the intensity of the incremental information demand is higher than a preset intensity threshold, then it is determined to be an incremental information gap.

[0056] S28. If the length of the associated path is greater than a preset path threshold and the intensity of the information increment demand is higher than a preset intensity threshold, then it is determined to be a mixed-type fact gap.

[0057] As described in steps S21-S28 above, the step of obtaining the fact-related dimensions involves obtaining the dimension-unit matching degree and association mapping relationship based on the dimensional features of the core fact dimensions (including the attribute item definition of the entity attribute dimension, the reasoning rule system of the logical deduction dimension, and the scene parameter standard of the scene adaptation dimension) and the core elements of the semantic unit, and obtaining the fact-related dimensions based on the dimension-unit matching degree and association mapping relationship. The core elements include core entities, logical relationships, and contextual scene information. The dimension-unit matching degree is calculated using a semantic similarity algorithm to determine the degree of fit between the core fact dimensions and the semantic units. The association mapping relationship clarifies the corresponding position of the semantic unit elements in each core fact dimension. By obtaining the fact-related dimensions based on the core fact dimensions, the linkage between text generation and knowledge structure is strengthened. This not only improves the relevance and traceability of information but also ensures real-time updates and integration of information in dynamic tasks, bypassing the limitations of fixed retrieval in traditional methods and increasing the system's ability to adapt to different knowledge scenarios.

[0058] Based on the information output content of the semantic unit and the necessary attribute list of the entity attribute dimension, the necessary reasoning steps of the logical deduction dimension, and the necessary scene parameters of the scene adaptation dimension, the information coverage and accuracy scores for each dimension are obtained. Information coverage is calculated as the ratio of the actual number of covered preset elements to the total number of preset elements. The accuracy score is obtained by acquiring the initial knowledge base for the text generation task. Fact comparison dimensions and reference benchmark values ​​are obtained based on the core factual information of the semantic unit and the authoritative factual resources of the initial knowledge base, and then obtained by weighted summation of the fact comparison dimensions and reference benchmark values. Core factual information includes entity attribute data, logical deduction conclusions, and scene adaptation parameters; authoritative factual resources include standardized attribute values ​​from structured knowledge graphs, verified factual statements from unstructured corpora, and domain-specific standard specification documents. By combining the output content of the semantic unit with the necessary dimensional features, the system can more accurately evaluate the effectiveness of the generated text. Compared to traditional methods relying on offline knowledge bases, this significantly improves the accuracy and real-time nature of information, making text generation not only more consistent but also meeting the needs of rapid dynamic updates.

[0059] This invention decomposes the core factual dimensions of text generation tasks according to target requirements, enabling precise identification of task-related entity attributes, logical deductions, and scenario adaptations. This improves the flexibility of targeted text generation and provides a more accurate knowledge base for subsequent generation processes. It breaks through the fixed retrieval method of information relevance in traditional methods, enhancing its applicability to complex reasoning tasks. By weighted summing of information coverage and accuracy scores, it can comprehensively evaluate the completeness of information, ensuring that the system can promptly identify and supplement the required knowledge to adapt to complex information needs. In particular, it significantly improves the accuracy and consistency of generated text in tasks such as multi-hop reasoning. By dynamically judging whether the information completeness index meets the preset threshold, it promotes the adaptability of the generation process, effectively solving the lag problem caused by the separation of retrieval and generation in existing technologies. It realizes real-time response to dynamic adjustments of information, providing strong support for the quality control of text generation. Continuing generation after confirming that there are no factual gaps demonstrates the system's efficiency in information completeness and avoids the waste of repeated retrieval and generation processes due to factual gaps.

[0060] By analyzing the length of the associated paths for missing information and the intensity of incremental information demand, the system can accurately identify specific types of fact gaps. This allows the generation strategy to select appropriate supplementary strategies for different types of gaps, thereby improving the relevance and effectiveness of text generation and enhancing the applicability of various reasoning modes. Rapid identification of multi-hop reasoning gaps facilitates the effective handling of complex reasoning tasks. Systematic analysis enhances the ability to handle complex logical relationships, improving the accuracy of reasoning tasks. By identifying incremental information gaps, the system can promptly acquire and integrate additional information. Accurate identification of mixed-type fact gaps demonstrates the system's flexibility and adaptability, enabling the generation system to process multiple types of gaps simultaneously. This significantly improves the ability to handle complex tasks and overcomes the shortcomings of existing technologies that struggle to adapt to multiple information requirements in real time.

[0061] In one embodiment, step S3, which involves obtaining the corresponding matching retrieval trigger condition based on the preset constraint rules and each fact gap type, and dynamically triggering the corresponding retrieval mode based on each matching retrieval trigger condition, includes:

[0062] S31. Obtain retrieval demand features based on the fact gap type, the retrieval demand features including association depth demand, information update frequency demand, and fact accuracy demand;

[0063] S32. Obtain the confidence threshold of the search results according to the factual accuracy constraint in the preset constraint rules, and obtain the relevance threshold of the search path according to the logical coherence constraint in the preset constraint rules.

[0064] S33. Obtain matching retrieval triggering conditions based on the retrieval demand characteristics, confidence threshold, and relevance threshold;

[0065] S34. If the fact gap type is a multi-hop inference gap, then the multi-hop inference retrieval path dynamic planning mode is triggered. The initial retrieval node is obtained according to the core entity and the associated dimension. The path benefit value is obtained through the entity association weight of the knowledge graph. The optimal multi-hop retrieval path is dynamically planned.

[0066] S35. If the fact gap type is an incremental information gap, the incremental information priority ordered fusion mode is triggered. Priority coefficients are obtained according to the timeliness, relevance and completeness of the incremental information. The incremental information is sorted in descending order according to the priority coefficients to obtain the sorting sequence. At the same time, the context compatibility verification rules of the generated content are obtained. The incremental information is then orderly integrated into the generation process according to the sorting sequence and the context compatibility verification rules.

[0067] S36. If the fact gap type is a mixed type fact gap, then the dynamic planning mode of multi-hop inference retrieval path and the incremental information priority ordered fusion mode are triggered simultaneously, and the fusion ratio of multi-hop inference path and incremental information is balanced through the weight allocation mechanism.

[0068] As described in steps S31-S36 above, the step of obtaining the matching retrieval trigger condition involves obtaining the demand-threshold fit and core parameters of the trigger condition based on the retrieval demand characteristics, confidence threshold, and relevance threshold, and then obtaining the matching retrieval trigger condition based on the demand-threshold fit and core parameters of the trigger condition. The retrieval demand characteristics include relevance depth requirements, information update frequency requirements, and factual accuracy requirements. The demand-threshold fit is calculated using a semantic matching algorithm to determine the degree of fit between the retrieval demand characteristics and the two thresholds. The core parameters include the priority of the retrieval data source and the upper limit of the number of retrieval iterations. By comprehensively analyzing the adaptability of the retrieval demand characteristics and thresholds, the retrieval process becomes more strategic and targeted, ensuring that the generated content meets user needs while reducing the possibility of non-compliant content output, effectively improving the quality and consistency of the generated text.

[0069] The steps for obtaining initial retrieval nodes and path revenue values ​​are as follows: Based on the attribute types of core entities and the semantic orientation of associated dimensions, obtain entity-dimension mapping relationships and initial node candidate sets; filter initial retrieval nodes based on the matching degree of the mapping relationships and the relevance of the candidate sets; obtain cumulative path weights and path confidence correction coefficients based on entity association weights in the knowledge graph; and calculate the path revenue value by weighting the cumulative values ​​and correction coefficients. Entity association weights are constructed based on entity co-occurrence frequency, semantic similarity, and the number of fact verifications. By combining multi-dimensional information such as attribute types and associated dimensions to optimize initial retrieval nodes and calculate path revenue, the overall retrieval efficiency and effectiveness are improved. The optimal selection of paths is ensured by utilizing the data association method of the knowledge graph.

[0070] The steps for obtaining the priority coefficient are as follows: obtain a timeliness quantification score based on the timestamp of the incremental information; obtain a relevance quantification score through a semantic similarity algorithm; obtain a completeness quantification score by statistically analyzing the coverage of core factual elements; and obtain the priority coefficient by weighted summation of the timeliness quantification score, relevance quantification score, and completeness quantification score. By conducting multiple scoring on the incremental information, including timeliness, relevance, and completeness, orderly information integration is ensured, improving the applicability and practicality of the generated text. Through a multi-faceted priority evaluation mechanism, the content of the generated text can be dynamically adjusted to ensure higher practical application value, thereby improving the overall quality of the generated output.

[0071] This invention analyzes different types of fact gaps and extracts specific retrieval demand features, ensuring that the generation system accurately grasps the demands. This allows for a more flexible response to the diverse needs of complex tasks, ensuring high quality and consistency of generated content. By applying preset constraint rules and selecting appropriate confidence and relevance thresholds, the quality and accuracy of generated text are improved, directly preventing the generation of unreliable information and ensuring that retrieval results undergo rigorous checks. This avoids the risks of erroneous information and low-quality output that may exist in existing technologies. By integrating retrieval demand features, confidence thresholds, and relevance thresholds to generate matching retrieval trigger conditions, the system flexibly prioritizes high-quality information during the retrieval process. This allows for optimization based on real-time feedback during task execution, enhancing the system's ability to handle complex tasks and generating more innovative and targeted text.

[0072] When faced with fact gaps in multi-hop reasoning, dynamic programming is used to find the optimal retrieval path instead of relying on static paths, which significantly improves the ability to solve complex problems. By utilizing the weight information between entities in the knowledge graph, potential knowledge connections can be effectively mined and utilized, thereby optimizing the final output. This addresses the lack of flexible response mechanisms in existing technologies for complex reasoning processes. By dynamically prioritizing incremental information and orderly integrating new information into the generation process, the timeliness and relevance of updates are guaranteed, significantly improving the timeliness and accuracy of generated content. This allows the generated content to reflect the latest information in a timely manner, meeting users' dual needs for real-time performance and accuracy. By integrating multi-hop reasoning and incremental information processing modes and determining the fusion ratio through weight allocation, not only is the complexity and depth of the generation process enhanced, but the system's adaptability to different tasks is also effectively strengthened, significantly improving the overall quality and diversity of text generation.

[0073] In one embodiment, step S4, which involves obtaining target search results according to each search mode and dynamically adapting and adjusting the generation boundary and inference logic according to the preset constraint rules, each target search result, and the corresponding semantic unit, includes:

[0074] S41. Obtain the original search results from the initial knowledge base according to the search mode, and perform noise filtering and credibility scoring on the original search results to select the valid search results with a confidence level higher than the preset confidence threshold as the target search results.

[0075] S42. Obtain the style parameters for text generation based on the style consistency constraints in the preset constraint rules, and decompose the style parameters to obtain specific adaptation indicators.

[0076] S43. Obtain factual evidence and logical connection information based on the target retrieval results;

[0077] S44. Obtain the context dependency relationship of the semantic unit, and dynamically adjust the fact range of the generation boundary and the constraint strength of the reasoning logic according to the context dependency relationship, specific adaptation indicators, factual basis and logical association information. Based on the adjusted generation boundary and reasoning logic, optimize the next generation direction of the semantic unit in the streaming generation to ensure the consistency between the generated content and the factual basis and constraint rules.

[0078] As described in steps S41-S44 above, the style parameters include sentence structure norms, word range limits, and tone intensity standards. When decomposing to obtain specific adaptation indicators, the sentence length threshold and the upper limit of the proportion of complex sentences are corresponding to the sentence structure norms, the word range limits are corresponding to the domain-specific vocabulary set and the list of prohibited words, and the tone intensity standards are decomposed according to the tone level coefficient.

[0079] The adjustment of the scope of facts needs to match the sentence structure norms. For example, if the threshold for long sentences is high, the details of the facts can be expanded, while if the threshold for short sentences is low, the core facts can be simplified. The adjustment of the strength of logical constraints needs to match the scope of words and the intensity of tone. For example, if the requirements for domain-specific vocabulary are high, the constraints of professional logical expression should be strengthened, and if the formal tone level coefficient is high, the constraints of the rigor of logical deduction should be tightened. This breaks through the limitations of the separation of fact and style adjustment in the existing technology and achieves the coordinated adaptation of factual accuracy, logical coherence and style consistency.

[0080] This invention effectively improves the quality of target search results by filtering noise and scoring credibility in the original search results. When noisy data is removed and only valid results above a preset credibility threshold are retained, text generation relies more on high-quality information, thus significantly improving the authenticity and consistency of the generated text. By obtaining style parameters for text generation and breaking them down into specific adaptation indicators, the style of the generated text can be effectively combined with preset constraint rules. Based on the style, the generated content can be adjusted in a timely manner, ensuring consistency in tone, format, etc. This overcomes the problems of chaotic and inconsistent styles in existing technologies, improves the applicability of text generation in various application scenarios, and, in the process of processing target search results, obtains factual evidence and logical connection information to form the knowledge support for text generation. This system ensures that the generated text is logically rigorous and logically sound, avoiding inconsistencies and ambiguities caused by insufficient argumentation. It enhances the accuracy of the generation process and lays the foundation for the successful implementation of complex tasks such as multi-hop reasoning. By dynamically adjusting the generation boundaries and reasoning logic based on a comprehensive analysis of contextual dependencies, adaptation indicators, and factual evidence, it overcomes the problems of poor flexibility and weak adaptability caused by the separation of generation and retrieval in existing technologies. The dynamic adjustment mechanism allows the system to continuously optimize its generation strategy based on real-time input information and contextual changes. Especially in complex tasks requiring incremental information or multi-round reasoning, it ensures that the generated content can adapt to changing needs. This flexibility and adaptability enable the text generation system to demonstrate higher efficiency and effectiveness when facing complex problems.

[0081] In one embodiment, step S6, which involves obtaining quality feedback through consistency verification, iteratively optimizing the retrieval strategy and preset constraint rules based on the quality feedback, and finally outputting highly consistent text, includes:

[0082] S61. Obtain multi-dimensional consistency verification indicators and indicator verification thresholds based on the complete content of the generated text and preset constraint rules, and obtain a comprehensive consistency score as the generation quality feedback based on the multi-dimensional consistency verification indicators and indicator verification thresholds.

[0083] S62. Based on the inconsistency type and corresponding text fragment in the generated quality feedback, reverse trace the accuracy of the fact gap determination and the matching degree triggered by the retrieval mode;

[0084] S63. If the inconsistency type is fact error, optimize the determination dimension of fact gap and the confidence screening threshold of search results, and adjust the weight calculation method of multi-hop inference path or the priority coefficient of incremental information.

[0085] S64. If the inconsistency type is logical break, optimize the adaptation and adjustment rules of the reasoning logic and refine the execution standards of style consistency constraints.

[0086] S65. If the inconsistency type is constraint violation, optimize the constraint parameters of the generated boundary and refine the execution criteria of style uniformity constraints.

[0087] S66. Re-inject the optimized retrieval strategy and constraint rules to generate a closed loop, and continuously iterate and optimize until the overall consistency score is higher than the preset quality threshold, and finally output highly consistent text.

[0088] As described in steps S61-S66 above, the multi-dimensional consistency verification indicators include factual accuracy, logical coherence, style consistency, and constraint compliance. The comprehensive consistency score is calculated by weighting and summing the factual accuracy, logical coherence, style consistency, constraint compliance, and corresponding weight coefficients. The generated quality feedback includes the comprehensive consistency score, inconsistency type, and corresponding text fragment. Based on the quality feedback, the root cause of the problem is traced, such as factual errors corresponding to insufficient confidence in the search results, logical breaks corresponding to deviations in reasoning logic adaptation, and style violations corresponding to fuzzy constraint parameters. The search strategy is optimized based on the root cause of the problem, such as adjusting the weight of multi-hop paths and the priority coefficient of incremental information, as well as the preset constraint rules, such as refining style parameters and increasing the strength of logical constraints.

[0089] This invention establishes a comprehensive evaluation system by introducing multi-dimensional consistency verification indicators. This system effectively identifies potential consistency issues in generated text, focusing not only on factual accuracy but also on logical coherence and structural consistency. This allows for the detection of subtle textual defects, ensuring that the generated text meets preset constraints across all dimensions, thereby improving the overall quality of the generated text. By analyzing the types of inconsistencies in the generated text quality feedback, the system directly traces the source of problems during the generation process, enabling it to clearly distinguish between factual errors and reasoning errors. This strengthens the system's ability to address different types of problems, ensuring that the generated text not only meets requirements in terms of results but also adapts during the generation process, reducing the risk of error propagation. Optimization of factual errors, through adjusting the judgment dimensions and confidence thresholds, significantly improves the system's performance in multi-hop reasoning tasks. This dynamic adjustment capability allows the system to flexibly respond to changing input information, rather than relying solely on static search results. It ensures that the generated text has higher accuracy and adaptability when information is updated. By optimizing the adaptation rules of the reasoning logic, it strives to achieve logical rigor and stylistic consistency in the text generation process. Through refined constraint parameters, it can more effectively avoid constraint violations during the generation process. It can precisely control the boundaries of the generated content to ensure compliance with industry standards or legal norms. By re-injecting the optimized strategies and constraints into the generation closed loop, a self-optimizing generation system is formed. This iterative selection mechanism ensures that the system can continuously reflect on and improve the generation strategy until it reaches the preset quality threshold. It provides continuous optimization capabilities for complex generation tasks, enabling the quality of the generated text to be continuously improved.

[0090] like Figure 2 As shown, this application also provides a retrieval enhancement and constraint guidance system for highly consistent text generation, including:

[0091] The generation module is used to obtain the target requirements and preset constraint rules of the text generation task, and generate text fragments sentence by sentence according to the target requirements and simultaneously capture the semantic units corresponding to each text fragment.

[0092] The determination module is used to determine the corresponding fact gap type by obtaining the corresponding fact association dimension and information completeness index for each semantic unit based on the target requirements and each semantic unit;

[0093] The triggering module is used to obtain the corresponding matching retrieval triggering conditions according to the preset constraint rules and each fact gap type, and to dynamically trigger the corresponding retrieval mode according to each matching retrieval triggering condition;

[0094] The adjustment module is used to obtain target search results according to each of the search modes, and dynamically adapt and adjust the generation boundary and reasoning logic according to the preset constraint rules, each target search result and the corresponding semantic unit.

[0095] The closed-loop module is used to form a closed loop between the streaming generation mechanism and the adjusted generation boundary and inference logic to optimize the generation of subsequent text fragments.

[0096] The iterative optimization module is used to obtain quality feedback through consistency verification, and iteratively optimize the retrieval strategy and preset constraint rules based on the quality feedback, and finally output highly consistent text.

[0097] In one embodiment, the adjustment module includes:

[0098] The filtering unit is used to obtain the original search results according to the search mode, and to filter the original search results to obtain the target search results.

[0099] The decomposition unit is used to obtain the style parameters of text generation according to the style consistency constraints in the preset constraint rules, and to decompose the style parameters to obtain specific adaptation indicators.

[0100] The acquisition unit is used to acquire factual evidence and logical correlation information based on the target retrieval results;

[0101] An adjustment unit is used to obtain the contextual dependencies of the semantic unit and dynamically adjust the factual range of the generation boundary and the constraint strength of the reasoning logic based on the contextual dependencies, specific adaptation indicators, factual basis and logical association information.

[0102] It should be noted that each module and unit in the high-consistency text generation retrieval enhancement and constraint guidance system corresponds one-to-one with the steps in the high-consistency text generation retrieval enhancement and constraint guidance method.

[0103] like Figure 3 As shown, this application also provides a computer device, which can be a server, and its internal structure can be as follows: Figure 3 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores all data required for the process of the high-consistency text generation retrieval enhancement and constraint guidance method. The network interface is used for communication with external terminals via a network connection. The computer program is executed by the processor to implement the high-consistency text generation retrieval enhancement and constraint guidance method.

[0104] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer equipment on which the present application is applied.

[0105] An embodiment of this application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements any of the above-described methods for retrieval enhancement and constraint guidance in high-consistency text generation.

[0106] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in this application and in the embodiments can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual-speed SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0107] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, apparatus, article, or method. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.

[0108] The above description is merely a preferred embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. A retrieval enhancement and constraint guidance method for highly consistent text generation, characterized in that, include: The target requirements and preset constraint rules of the text generation task are obtained, and text fragments are generated sentence by sentence according to the target requirements, while the semantic units corresponding to each text fragment are captured synchronously. Based on the target requirements and each semantic unit, obtain the corresponding fact association dimension and information completeness index to determine the corresponding fact gap type; Based on the preset constraint rules and each fact gap type, obtain the corresponding matching retrieval trigger condition, and dynamically trigger the corresponding retrieval mode according to each matching retrieval trigger condition, including: Based on the type of fact gap, the search demand characteristics are obtained, and based on the preset constraint rules, the confidence threshold of the search results and the relevance threshold of the search path are obtained. The matching retrieval triggering conditions are obtained based on the retrieval demand characteristics, confidence threshold, and relevance threshold. If the fact gap type is a multi-hop inference gap, then the multi-hop inference retrieval path dynamic planning mode is triggered. The initial retrieval node is obtained based on the core entity and the associated dimension, the path benefit value is obtained through the entity association weight of the knowledge graph, and the optimal multi-hop inference retrieval path is dynamically planned. If the fact gap type is an incremental information gap, the incremental information priority ordered fusion mode is triggered. Priority coefficients are obtained based on the timeliness, relevance and completeness of the incremental information. The incremental information is sorted in descending order based on the priority coefficients to obtain a sorting sequence. At the same time, the context compatibility verification rules of the generated content are obtained. The incremental information is then orderly integrated into the generation process based on the sorting sequence and the context compatibility verification rules. If the fact gap type is a mixed type fact gap, then the dynamic planning mode of multi-hop reasoning retrieval path and the incremental information priority ordered fusion mode are triggered simultaneously, and the fusion ratio of multi-hop reasoning retrieval path and incremental information is balanced through the weight allocation mechanism. The target retrieval result is obtained according to each retrieval mode, and the generation boundary and reasoning logic are dynamically adapted and adjusted according to the preset constraint rules, each target retrieval result and the corresponding semantic unit. The streaming generation mechanism, along with the adjusted generation boundaries and inference logic, forms a closed loop to optimize the generation of subsequent text fragments. The consistency check obtains quality feedback, and the retrieval strategy and preset constraint rules are iteratively optimized based on the quality feedback to finally output highly consistent text.

2. The retrieval enhancement and constraint guidance method for high-consistency text generation according to claim 1, characterized in that, The step of generating text segments sentence by sentence using a streaming generation mechanism according to the target requirements and simultaneously capturing the semantic units corresponding to each text segment includes: The initial prompt words are obtained according to the target requirements, and the streaming generator is started to output text fragments sentence by sentence based on the initial prompt words; Contextual clues and entity co-occurrence frequencies are obtained based on the sequence position of each text segment and the semantic overlap of the text segments before and after it, and contextual dependencies are determined based on the contextual clues and entity co-occurrence frequencies. Obtain the lexical features, syntactic features, and semantic features of each text segment, and obtain the core entities and syntactic associations between entities based on the lexical and syntactic features; The logical relationship type and context dependency weight are obtained based on the semantic features and context dependencies. The basic semantic framework is obtained based on the core entities and the syntactic associations between entities, and the basic semantic framework is supplemented with dimensions based on the logical relationship types and context dependency weights to obtain semantic units.

3. The retrieval enhancement and constraint guidance method for high-consistency text generation according to claim 1, characterized in that, The step of obtaining the corresponding factual association dimension and information completeness index based on the target requirements and each semantic unit to determine the corresponding factual gap type includes: Based on the target requirements, the core factual dimensions of the text generation task are broken down, and the corresponding factual association dimensions are obtained based on the core factual dimensions and each semantic unit. Obtain the information coverage and accuracy scores of the semantic unit under the core fact dimension, and obtain the information completeness index based on the information coverage and accuracy scores; Determine whether the information completeness index is less than a preset completeness threshold; If the information completeness index is not less than the preset completeness threshold, it is determined that there is no factual gap, and streaming generation continues. If the information completeness index is less than the preset completeness threshold, the type of fact gap is determined by obtaining the association path length of the missing information and the intensity of information increment demand based on the fact association dimension.

4. The retrieval enhancement and constraint guidance method for high-consistency text generation according to claim 1, characterized in that, The steps of obtaining target search results according to each search mode, and dynamically adapting and adjusting the generation boundary and reasoning logic according to the preset constraint rules, each target search result and the corresponding semantic unit, include: The original search results are obtained according to the search mode, and the original search results are filtered and selected to obtain the target search results; The style parameters of the generated text are obtained according to the style consistency constraints in the preset constraint rules, and specific adaptation indicators are obtained by decomposing the style parameters. The style parameters include sentence structure norms, word range limits and tone intensity standards. When decomposing the specific adaptation indicators, the sentence length threshold and the upper limit of the proportion of complex sentences are corresponding to the sentence structure norms, the word range limits are corresponding to the domain-specific vocabulary set and the list of prohibited words, and the tone intensity standards are decomposed according to the tone level coefficient. Based on the target search results, obtain factual evidence and logical connection information; The context dependencies of the semantic units are obtained, and the factual scope and the constraint strength of the reasoning logic of the generation boundary are dynamically adjusted according to the context dependencies, specific adaptation indicators, factual basis and logical association information.

5. The retrieval enhancement and constraint guidance method for high-consistency text generation according to claim 1, characterized in that, The steps of obtaining quality feedback through consistency verification, iteratively optimizing the retrieval strategy and preset constraint rules based on the quality feedback, and finally outputting highly consistent text include: Based on the complete content of the generated text and preset constraint rules, obtain multi-dimensional consistency verification indicators and indicator verification thresholds, and obtain a comprehensive consistency score as the generation quality feedback based on the multi-dimensional consistency verification indicators and indicator verification thresholds. The accuracy of the fact gap determination and the matching degree triggered by the retrieval mode are determined by tracing back the inconsistency type and corresponding text fragment in the generated quality feedback. If the inconsistency type is fact error, then optimize the determination dimensions of fact gaps and the confidence screening threshold of search results; If the inconsistency type is logical break, then optimize the adaptation and adjustment rules of the reasoning logic; If the inconsistency type is constraint violation, then optimize the constraint parameters of the generated boundary. The optimized retrieval strategy and constraint rules are re-injected to generate a closed loop, and continuous iteration and optimization are performed until the overall consistency score is higher than the preset quality threshold, and finally highly consistent text is output.

6. A retrieval enhancement and constraint guidance system for highly consistent text generation, characterized in that, include: The generation module is used to obtain the target requirements and preset constraint rules of the text generation task, and generate text fragments sentence by sentence according to the target requirements and simultaneously capture the semantic units corresponding to each text fragment. The determination module is used to determine the corresponding fact gap type by obtaining the corresponding fact association dimension and information completeness index for each semantic unit based on the target requirements and each semantic unit; The triggering module is used to obtain corresponding matching retrieval triggering conditions according to the preset constraint rules and each fact gap type, and to dynamically trigger the corresponding retrieval mode according to each matching retrieval triggering condition, including: Based on the type of fact gap, the search demand characteristics are obtained, and based on the preset constraint rules, the confidence threshold of the search results and the relevance threshold of the search path are obtained. The matching retrieval triggering conditions are obtained based on the retrieval demand characteristics, confidence threshold, and relevance threshold. If the fact gap type is a multi-hop inference gap, then the multi-hop inference retrieval path dynamic planning mode is triggered. The initial retrieval node is obtained based on the core entity and the associated dimension, the path benefit value is obtained through the entity association weight of the knowledge graph, and the optimal multi-hop inference retrieval path is dynamically planned. If the fact gap type is an incremental information gap, the incremental information priority ordered fusion mode is triggered. Priority coefficients are obtained based on the timeliness, relevance and completeness of the incremental information. The incremental information is sorted in descending order based on the priority coefficients to obtain a sorting sequence. At the same time, the context compatibility verification rules of the generated content are obtained. The incremental information is then orderly integrated into the generation process based on the sorting sequence and the context compatibility verification rules. If the fact gap type is a mixed type fact gap, then the dynamic planning mode of multi-hop reasoning retrieval path and the incremental information priority ordered fusion mode are triggered simultaneously, and the fusion ratio of multi-hop reasoning retrieval path and incremental information is balanced through the weight allocation mechanism. The adjustment module is used to obtain target search results according to each of the search modes, and dynamically adapt and adjust the generation boundary and reasoning logic according to the preset constraint rules, each target search result and the corresponding semantic unit. The closed-loop module is used to form a closed loop between the streaming generation mechanism and the adjusted generation boundary and inference logic to optimize the generation of subsequent text fragments. The iterative optimization module is used to obtain quality feedback through consistency verification, and iteratively optimize the retrieval strategy and preset constraint rules based on the quality feedback, and finally output highly consistent text.

7. The retrieval enhancement and constraint guidance system for high-consistency text generation according to claim 6, characterized in that, The adjustment module includes: The filtering unit is used to obtain the original search results according to the search mode, and to filter the original search results to obtain the target search results. The decomposition unit is used to obtain the style parameters of the generated text according to the style consistency constraints in the preset constraint rules, and to decompose the style parameters to obtain specific adaptation indicators. The style parameters include sentence structure norms, word range limits and tone intensity standards. When decomposing to obtain specific adaptation indicators, the sentence length threshold and the upper limit of the proportion of complex sentences are corresponding to the sentence structure norms, the word range limits are corresponding to the domain-specific vocabulary set and the list of prohibited words, and the tone intensity standards are decomposed according to the tone level coefficient. The acquisition unit is used to acquire factual evidence and logical correlation information based on the target retrieval results; An adjustment unit is used to obtain the contextual dependencies of the semantic unit and dynamically adjust the factual range of the generation boundary and the constraint strength of the reasoning logic based on the contextual dependencies, specific adaptation indicators, factual basis and logical association information.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.