Content generation methods, devices, electronic equipment and storage media

By constructing and integrating multiple logical chain strategies, the problem of poor content generation quality in existing technologies is solved, and high-quality content generation with rigorous and reasonable logic is achieved.

CN123050600APending Publication Date: 2026-11-06ZHUHAI KINGSOFT OFFICE SOFTWARE +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510576322.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-06
Publication Date
2026-11-06

AI Technical Summary

Technical Problem

Existing technologies produce poor-quality content for content creation tasks, especially lacking depth and professionalism in complex tasks, making it difficult to meet the needs of specific professional fields.

Method used

Multiple logical chains are generated by constructing various logical chain building strategies, integrated to form a target logical chain, and content retrieval is performed based on this logical chain to finally generate target content that meets the content generation request.

Benefits of technology

It significantly improves the quality and efficiency of content generation, ensuring that the generated content is logically sound and reasonable, and can better meet user needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123050600A_ABST
    Figure CN123050600A_ABST
Patent Text Reader

Abstract

This application relates to a content generation method, apparatus, electronic device, and storage medium. The method includes: responding to a content generation request by constructing logical chains for the content generation request using different logical chain construction strategies; integrating multiple logical chains to form a target logical chain; performing content retrieval based on the target logical chain to obtain target retrieval content; generating input information according to the target logical chain and the target retrieval content, and passing it to a large language model to generate target content that conforms to the content generation request. Therefore, this solution has technical advantages in intelligently integrating multi-source information, not only providing clear and explicit logical guidance for content generation but also ensuring that the generated content is logically rigorous and reasonable, thereby significantly improving the quality and efficiency of content generation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing, and more particularly to a content generation method, apparatus, electronic device, and storage medium. Background Technology

[0002] With the rapid development of large language model technology, its application scenarios in content creation are becoming increasingly widespread. However, existing technical solutions still have significant shortcomings when dealing with complex creation tasks: although the method of directly calling large language models to generate content is efficient, it is limited by the breadth and depth of the model's pre-training data, and the generated results often exhibit shallow content, insufficient professionalism, lack of depth and credibility, and are particularly difficult to adapt to the creation needs of specific professional fields.

[0003] To improve the quality of content generated by large language models, current mainstream optimization paths include prompt engineering and simple retrieval enhancement generation systems. Prompt engineering guides model output by manually designing structured prompts. However, this method heavily relies on the experience of domain experts. When facing long-tail demands or emerging fields, the cost of manually designing prompts increases exponentially, and it is difficult to dynamically adapt to real-time data, being limited by pre-trained knowledge. While simple retrieval enhancement generation systems enhance content credibility by introducing external databases, their retrieval logic is still based on keyword matching, lacking a deep understanding of user query intent. This leads to a disconnect between search results and user needs, further impacting the quality of generated content. Summary of the Invention

[0004] This application provides a content generation method, apparatus, electronic device, and storage medium to solve the technical problem of poor content quality generated by existing technologies in content creation tasks, especially complex content creation tasks.

[0005] Firstly, this application provides a content generation method, the method comprising:

[0006] In response to a content generation request, different logical chain construction strategies are used to construct logical chains for the content generation request respectively;

[0007] The multiple logic chains are integrated to form the target logic chain;

[0008] Based on the target logical chain, content retrieval is performed to obtain the target retrieval content;

[0009] Input information is generated based on the target logic chain and the target retrieval content, and then passed to the large language model to generate target content that meets the content generation request.

[0010] In one possible implementation, the different logical chain construction strategies include at least two of the following: a first logical chain construction strategy, a second logical chain construction strategy, and a third logical chain construction strategy;

[0011] The process of constructing a logical chain for the content generation request based on the first logical chain construction strategy includes:

[0012] Identify the content generation target corresponding to the content generation request, obtain an outline template that matches the content generation target from a preset template library, and use the outline template as a logical chain for the content generation request;

[0013] Constructing a logical chain for the content generation request according to the second logical chain construction strategy includes:

[0014] The content generation request is input into the logic chain model, and the logic chain output by the logic chain model is used as the logic chain for the content generation request.

[0015] Constructing a logical chain for the content generation request according to the third logical chain construction strategy includes:

[0016] The preset database is searched based on the content generation request, and the retrieved content is used as a logical chain for the content generation request.

[0017] In one possible implementation, the process of integrating the plurality of said logic chains to form a target logic chain includes:

[0018] Extract a set of topics from each of the aforementioned logical chains;

[0019] The multiple topic sets are integrated to obtain the target topic set;

[0020] Using the set of target topics, a target logical chain is formed.

[0021] In one possible implementation, the plurality of said logical chains include at least two of the following: a first logical chain constructed according to a first logical chain construction strategy, a second logical chain constructed according to a second logical chain construction strategy, and a third logical chain constructed according to a third logical chain construction strategy;

[0022] Extracting a topic set from the second logical chain includes: segmenting the second logical chain to obtain multiple paragraphs; extracting core statements from each paragraph and including the core statements as topics in the topic set; and / or identifying target keywords from the second logical chain and including the target keywords as topics in the topic set.

[0023] Alternatively, extracting a topic set from the third logical chain includes: extracting a title from the third logical chain and including the title as a topic in the topic set; and / or, extracting a summary text from the third logical chain and including the summary text as a topic in the topic set.

[0024] In one possible implementation, the process of integrating the multiple sets of topics to obtain a target set of topics includes:

[0025] Clustering is performed on the topics in multiple topic sets to obtain multiple topic clusters;

[0026] The core theme is determined from each of the aforementioned theme clusters;

[0027] Construct a target topic set using multiple of the aforementioned core topics.

[0028] In one possible implementation, the clustering process of topics in multiple topic sets to obtain multiple topic clusters includes:

[0029] Merge multiple topic sets into one topic set;

[0030] The topics in the merged topic set are clustered to obtain multiple topic clusters; topics within the same topic cluster have semantic similarity.

[0031] In one possible implementation, determining the core topic from each of the topic clusters includes:

[0032] For each of the aforementioned topic clusters, the following processing is performed:

[0033] When different topics in the topic cluster come from different logical chains, the topic with the highest priority in the corresponding logical chain in the topic cluster is determined as the core topic.

[0034] Alternatively, if different topics from the same logical chain exist in the topic cluster, determine the relevance between each topic in the topic cluster and the content generation request; and determine the topic with the highest relevance as the core topic.

[0035] In one possible implementation, the target topic set is used to form a target logic chain, including:

[0036] Determine the outline hierarchy for each topic in the target topic set;

[0037] The topics in the target topic set are organized into topic outlines according to the corresponding outline hierarchy, and the topic outlines are determined as target logic chains.

[0038] In one possible implementation, the step of performing content retrieval based on the target logical chain to obtain the target retrieval content includes:

[0039] Based on the target logic chain, content retrieval is performed from the preset database to obtain an initial set of retrieved content;

[0040] Sort the search results in the initial search result set;

[0041] Based on the sorting results, target search content is selected from the initial search content set.

[0042] In one possible implementation, sorting the search content in the initial search content set includes:

[0043] For each search item in the initial search content set, determine the score of the search item under multiple rating dimensions;

[0044] The total score of the search content is determined based on the scores of the search content under the multiple scoring dimensions;

[0045] Based on the total score, the search results in the initial search content set are sorted.

[0046] In one possible implementation, the step of performing content retrieval based on the target logical chain to obtain the target retrieval content includes:

[0047] Determine the primary and secondary retrieval relationships between topics in the target logical chain;

[0048] Based on the primary and secondary retrieval relationships, a retrieval statement corresponding to the target logical chain is generated;

[0049] The target search content is obtained by using the search query.

[0050] In one possible implementation, determining the primary and secondary retrieval relationships between topics in the target logical chain includes:

[0051] Determine the relevance between the topics in the target logical chain and the content generation request;

[0052] Based on the corresponding relevance, the primary and secondary retrieval relationships between topics in the target logical chain are determined.

[0053] In one possible implementation, the step of performing content retrieval based on the target logical chain to obtain the target retrieval content includes:

[0054] Different search statement construction strategies are used to construct search statements for the target logical chain respectively;

[0055] Execute different search statements to retrieve content and obtain the target search content.

[0056] In one possible implementation, the method further includes:

[0057] Obtain the user's actions related to the target content;

[0058] Adjust the priority of each logical chain according to the operation behavior.

[0059] Secondly, this application provides a content generation apparatus, the apparatus comprising:

[0060] The logic chain construction module is used to construct logic chains for the content generation request in response to the content generation request using different logic chain construction strategies.

[0061] The logic chain integration module is used to integrate multiple logic chains to form a target logic chain;

[0062] The content retrieval module is used to perform content retrieval based on the target logical chain to obtain the target retrieval content;

[0063] The content generation module is used to generate input information based on the target logic chain and the target retrieved content, and pass it to the large language model to generate target content that meets the content generation request.

[0064] In one possible implementation, the different logical chain construction strategies include at least two of the following: a first logical chain construction strategy, a second logical chain construction strategy, and a third logical chain construction strategy;

[0065] The logical chain construction module includes:

[0066] The first logic chain construction unit is used to construct a logic chain for the content generation request according to the first logic chain construction strategy, including: identifying the content generation target corresponding to the content generation request, obtaining an outline template that matches the content generation target from a preset template library, and using the outline template as the logic chain for the content generation request;

[0067] And / or, a second logic chain construction unit is configured to construct a logic chain for the content generation request according to the second logic chain construction strategy, including: inputting the content generation request into the logic chain model, and using the logic chain output by the logic chain model as the logic chain for the content generation request;

[0068] And / or, a third logical chain construction unit is used to construct a logical chain for the content generation request according to the third logical chain construction strategy, including: searching a preset database based on the content generation request, and using the retrieved content as the logical chain for the content generation request.

[0069] In one possible implementation, the logic chain integration module includes:

[0070] A topic extraction unit is used to extract a set of topics from each of the logical chains.

[0071] The topic integration unit is used to integrate multiple topic sets to obtain a target topic set;

[0072] A logic chain forming unit is used to form a target logic chain using the target topic set.

[0073] In one possible implementation, the plurality of said logical chains include at least two of the following: a first logical chain constructed according to a first logical chain construction strategy, a second logical chain constructed according to a second logical chain construction strategy, and a third logical chain constructed according to a third logical chain construction strategy;

[0074] The topic extraction unit is used to extract a topic set from the second logical chain, including: segmenting the second logical chain to obtain multiple paragraphs; extracting core sentences from each paragraph and including the core sentences as topics in the topic set; and / or identifying target keywords from the second logical chain and including the target keywords as topics in the topic set.

[0075] Alternatively, the topic extraction unit is used to extract a topic set from the third logical chain, including: extracting a title from the third logical chain and including the title as a topic in the topic set; and / or, extracting a summary text from the third logical chain and including the summary text as a topic in the topic set.

[0076] In one possible implementation, the topic integration unit includes:

[0077] The clustering subunit is used to perform clustering processing on topics in multiple topic sets to obtain multiple topic clusters;

[0078] The core determination subunit is used to determine the core topic from each of the topic clusters;

[0079] The topic set construction subunit is used to construct a target topic set using multiple core topics.

[0080] In one possible implementation, the clustering subunit is specifically used for:

[0081] Merge multiple topic sets into one topic set;

[0082] The topics in the merged topic set are clustered to obtain multiple topic clusters; topics within the same topic cluster have semantic similarity.

[0083] In one possible implementation, the core determining subunit is specifically used for:

[0084] For each of the aforementioned topic clusters, the following processing is performed:

[0085] When different topics in the topic cluster come from different logical chains, the topic with the highest priority in the corresponding logical chain in the topic cluster is determined as the core topic.

[0086] Alternatively, if different topics from the same logical chain exist in the topic cluster, determine the relevance between each topic in the topic cluster and the content generation request; and determine the topic with the highest relevance as the core topic.

[0087] In one possible implementation, the logic chain forming unit is specifically used for:

[0088] Determine the outline hierarchy for each topic in the target topic set;

[0089] The topics in the target topic set are organized into topic outlines according to the corresponding outline hierarchy, and the topic outlines are determined as target logic chains.

[0090] In one possible implementation, the content retrieval module includes:

[0091] The initial retrieval unit is used to perform content retrieval from a preset database based on the target logical chain to obtain an initial retrieval content set;

[0092] A sorting unit is used to sort the search content in the initial search content set;

[0093] The target determination unit is used to filter target search content from the initial search content set based on the sorting results.

[0094] In one possible implementation, the sorting unit is specifically used for:

[0095] For each search item in the initial search content set, determine the score of the search item under multiple rating dimensions;

[0096] The total score of the search content is determined based on the scores of the search content under the multiple scoring dimensions;

[0097] Based on the total score, the search results in the initial search content set are sorted.

[0098] In one possible implementation, the content retrieval module includes:

[0099] The primary and secondary distinction unit is used to determine the primary and secondary retrieval relationships between topics in the target logical chain;

[0100] The retrieval statement construction unit is used to generate a retrieval statement corresponding to the target logical chain based on the retrieval primary and secondary relationship;

[0101] The retrieval execution unit is used to perform content retrieval using the retrieval statement to obtain the target retrieval content.

[0102] In one possible implementation, the primary and secondary differentiation unit is specifically used for:

[0103] Determine the relevance between the topics in the target logical chain and the content generation request;

[0104] Based on the corresponding relevance, the primary and secondary retrieval relationships between topics in the target logical chain are determined.

[0105] In one possible implementation, the content retrieval module is specifically used for:

[0106] Different search statement construction strategies are used to construct search statements for the target logical chain respectively;

[0107] Execute different search statements to retrieve content and obtain the target search content.

[0108] In one possible implementation, the device further includes:

[0109] The optimization module is used to obtain the user's operation behavior on the target content; and adjust the set priority of each logic chain according to the operation behavior.

[0110] Thirdly, this application provides an electronic device, including: a processor and a memory, wherein the processor is configured to execute a content generation program stored in the memory to implement the content generation method described in any one of the first aspects.

[0111] Fourthly, this application provides a storage medium storing one or more programs that can be executed by one or more processors to implement the content generation method described in any one aspect.

[0112] Compared with the prior art, the technical solution provided in this application has the following advantages: The method provided in this application, in response to a content generation request, generates multiple logical chains using different logical chain construction strategies, integrates these logical chains to form a target logical chain, performs content retrieval based on the target logical chain to obtain target retrieval content, and finally generates input information based on the target logical chain and the target retrieval content and passes it to a large language model to generate target content that meets the content generation request. In this solution, diverse logical chain construction strategies are used to generate multiple logical chains with different perspectives and focuses. The target logical chain formed by integrating these logical chains from different sources then serves as the core basis for the subsequent content generation process. This method has a technical advantage in intelligently integrating multi-source information, not only providing clear and explicit logical guidance for content generation but also ensuring that the generated content is logically rigorous and reasonable, thereby significantly improving the quality and efficiency of content generation. Attached Figure Description

[0113] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0114] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0115] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.

[0116] Figure 1 A flowchart illustrating an embodiment of a content generation method provided in this application;

[0117] Figure 2 A flowchart illustrating an embodiment of another content generation method provided in this application;

[0118] Figure 3 A flowchart illustrating an embodiment of another content generation method provided in this application;

[0119] Figure 4 A flowchart illustrating an embodiment of another content generation method provided in this application;

[0120] Figure 5 A block diagram illustrating an embodiment of a content generation apparatus provided in this application;

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

[0122] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0123] The following disclosure provides numerous different embodiments or examples for implementing various structures of this application. To simplify the disclosure, specific examples of components and arrangements are described below. These are merely examples and are not intended to limit the scope of this application. Furthermore, reference numerals and / or letters may be repeated in different examples. Such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed.

[0124] To address the technical problem of poor content quality in existing content creation tasks, especially complex content creation tasks, this application provides a content generation method, apparatus, electronic device, and storage medium to significantly improve the quality and efficiency of content generation.

[0125] Figure 1 This is a flowchart illustrating an embodiment of a content generation method provided in this application.

[0126] like Figure 1 As shown, the method includes the following steps:

[0127] Step 101: In response to the content generation request, construct the logical chain for the content generation request using different logical chain construction strategies.

[0128] A content generation request refers to a user's or system's request to generate specific content. For example, a content generation request may include key parameters specified by the user, such as the theme, format, style, and content length. In one embodiment, the content refers to text content.

[0129] In one embodiment, users can submit content generation requests through a visual interface or an API (Application Programming Interface). Regarding the format of the requested content, the request can be in text format, for example, a user might input a brief description such as "Write a research review on the application of quantum computing in drug development," requesting the system to generate a detailed research review. The content generation request can also be in speech format, for example, a user might input the above sentence verbally. Here, the system also involves converting the speech-based content generation request into text for further processing, which will not be detailed here.

[0130] In one embodiment, the content generation request may also include attachments. The form of the attachments is not limited and may be files or content such as images, videos, audio, documents, and links.

[0131] A logic chain refers to the thought framework used to guide a large language model in generating content during the content generation process. It contains a series of logical nodes. Each logical node represents a key information point or reasoning step, and the logic chain connects these nodes in a certain order to form a complete logical structure. This structure aims to help the large language model better understand and generate content that meets the aforementioned content generation requirements.

[0132] A logical chain construction strategy refers to the methods or rules used when constructing a logical chain. Different logical chain construction strategies may be based on different algorithms, models, or rule bases to generate logical chains with different characteristics (such as different structures, depths, and focuses).

[0133] In step 101, in response to the content generation request, different logic chain construction strategies are used to construct logic chains specifically for the content generation request. This differs from the rigid and singular logic chain construction mode in the traditional approach. By using a multi-strategy parallel logic chain construction method, it helps to generate more accurate target logic chains, thereby helping to generate more accurate, insightful content that is closer to the actual needs of users, effectively improving the quality and efficiency of content generation.

[0134] In one embodiment, the different logical chain construction strategies include at least two of the following: a first logical chain construction strategy, a second logical chain construction strategy, and a third logical chain construction strategy. As an optional implementation, the different logical chain construction strategies include the first logical chain construction strategy, the second logical chain construction strategy, and the third logical chain construction strategy.

[0135] The first logical chain construction strategy is based on target matching and outline template reuse. This strategy identifies the specific target of the content generation request, automatically selects a matching outline template from a pre-set template library, and directly uses it as the logical chain framework, enabling fast and accurate logical chain construction. Therefore, the logical chain constructed using the first logical chain construction strategy is a structured tree-like outline.

[0136] In one embodiment, the specific implementation of constructing a logical chain for a content generation request according to the first logical chain construction strategy includes: identifying the content generation target corresponding to the content generation request, obtaining an outline template that matches the content generation target from a preset template library, and using the outline template as the logical chain for the content generation request.

[0137] Content generation objectives can include key dimensions such as content writing style and core theme. For example, determining the content writing style can employ keyword matching or machine learning model-based methods. Keyword matching involves pre-constructing a keyword list covering various content writing styles, such as keywords corresponding to common writing styles like "research report," "press release," and "technical document." Upon receiving a content generation request, text search technology is used to search for items matching the keyword list within the request. Once a match is found, the corresponding content writing style can be determined. Machine learning model-based methods involve using natural language processing techniques to collect a large number of content generation requests labeled with different writing styles as a training set. This data is used to train a classification model, enabling the model to deeply learn the unique features of content generation requests indicating different writing styles in terms of language expression, vocabulary usage, and sentence structure. After sufficient training, the model possesses the ability to automatically classify newly input content generation requests and accurately identify their indicated content writing style.

[0138] After identifying the content generation target corresponding to the content generation request, the next step is to match the content generation target with a preset outline template. This step can employ rule-based matching algorithms, similarity calculation methods, or machine learning-based matching algorithms. Rule-based matching algorithms directly search a preset template library based on keywords contained in the content generation target to identify matching templates. For example, when the content type is clearly defined as "research report," templates containing the keyword "research report" can be searched in the template library. Similarity calculation methods assess the degree of similarity between the content generation target and the preset outline template, selecting the template with the highest similarity as the matching result. Specific similarity calculation methods include cosine similarity and Jaccard similarity. Machine learning-based matching algorithms train a specialized matching model that can deeply learn the complex mapping relationship between content type, topic, and outline template. During training, the model continuously analyzes a large number of matching instances between content generation targets and outline templates, extracting valuable information from them. After thorough training, when faced with new content generation goals, the model can automatically select the most suitable outline template thanks to its powerful learning ability.

[0139] The second logic chain construction strategy is a logic chain construction strategy based on the model's predicted output. This strategy obtains the logic chain structure generated by the model based on the content generation request by inputting the content generation request into a pre-trained logic chain model.

[0140] For example, suppose a user submits a content generation request: "Write a popular science article about the application of artificial intelligence in the medical field." The logical chain output by the logical chain model can be as follows:

[0141] Model reasoning process (also known as the thought chain, this process demonstrates the model's thought process and lays the foundation for the generation of the final result):

[0142] Ideas for introducing the topic: Consider how to naturally and attractively introduce the topic of artificial intelligence applications in the medical field. For example, start with the current challenges facing healthcare, mention the limitations of traditional medicine in disease diagnosis and treatment, and then introduce the breakthroughs that artificial intelligence may bring.

[0143] Predictive model inference

[0144] Definition and Functional Considerations: Consider the principles behind the function of artificial intelligence in predicting the risk of disease occurrence based on big data and machine learning algorithms. Think about how to explain in simple and easy-to-understand language how big data is collected, how machine learning algorithms are trained, and how risk prediction is made based on the training results.

[0145] Advantages analysis approach: Focusing on early intervention, consider the specific positive impacts that artificial intelligence can bring after predicting disease risks in advance, such as giving patients more treatment time and improving treatment outcomes; for the "XXXXX" part, further expansion is possible, such as considering aspects like reducing medical costs and alleviating patient suffering.

[0146] Case Study: Imagine a specific clinical application scenario, such as early screening for a certain disease. Consider how to describe the application process, effects, and changes brought to patients and the healthcare industry by the XXX solution in this scenario.

[0147] Challenges and Future Thinking

[0148] The analysis approach addresses the following challenges: Regarding data privacy, consider the potential risks of privacy breaches during the collection, storage, and use of patient data when artificial intelligence is applied to the medical field; regarding algorithmic bias, consider the factors that might influence algorithm training, leading to deviations in predictions for different population groups; and regarding ethical issues, consider the role of artificial intelligence in medical decision-making and the ethical controversies it may generate.

[0149] Future Outlook: From the perspective of technological integration, we will consider in which aspects AI and healthcare can achieve deeper and broader integration, such as telemedicine, intelligent diagnosis, and personalized treatment.

[0150] The final output of the model (i.e., the part in the example above, showing the model's inference results):

[0151] Introduction:

[0152] Applications of artificial intelligence in the medical field XXXX.

[0153] Predictive model section:

[0154] Definition and function: Based on big data and machine learning algorithms, predict the risk of disease occurrence.

[0155] Advantages: Early intervention, XXXXX.

[0156] Case Study: Clinical Application Results of the XXX Solution

[0157] Challenges and the Future:

[0158] Challenges: Data privacy, algorithmic bias, and ethical issues.

[0159] The future: the deep integration of AI and healthcare.

[0160] Therefore, this logical chain can be presented in the form of natural language paragraphs.

[0161] In one embodiment, the specific implementation of constructing a logical chain for a content generation request according to the second logical chain construction strategy includes: inputting the content generation request into the logical chain model, and using the logical chain output by the logical chain model as the logical chain for the content generation request.

[0162] For example, a logical chain model is a neural network model built using a deep learning architecture, such as a pre-trained language model based on the Transformer structure. These models, trained on large-scale corpora, possess powerful language understanding and generation capabilities. When faced with content generation requests, they can deeply analyze the semantic information, contextual relationships, and underlying intentions within the request, and automatically generate logically coherent and reasonable logical chains based on the language rules and knowledge patterns learned during training.

[0163] The third logical chain construction strategy is an expert knowledge-based strategy. This strategy extracts relevant article fragments from a pre-built knowledge system constructed by experts to form logical chains in response to the current content generation request. These logical chains are semi-structured collections of article fragments, preserving the authority of expert knowledge while enhancing the flexibility and relevance of the content through fragmented organization.

[0164] In one embodiment, the specific implementation of constructing a logical chain for a content generation request based on the third logical chain construction strategy includes: retrieving a preset database based on the content generation request, and using the retrieved content as the logical chain for the content generation request.

[0165] For example, the pre-defined database is a structured or semi-structured collection of knowledge, containing article fragments, case studies, technical specifications, policy interpretations, etc., pre-written or reviewed by domain experts. In the specific implementation, key information is parsed from the content generation request. Based on the parsed key information, advanced retrieval algorithms and semantic analysis techniques are used to perform precise searches in the pre-defined database to locate article fragments related to the content generation request. Finally, the retrieved fragments are combined according to a pre-defined logical structure or natural order to form a semi-structured logical chain.

[0166] The above embodiments are merely illustrative descriptions. In practical applications, other logical chain construction strategies can be flexibly specified, and different logical chain construction strategies can be flexibly combined. This application does not limit this.

[0167] Step 102: Integrate multiple logic chains to form the target logic chain.

[0168] Step 102 aims to deeply integrate the multiple logical chains with different characteristics generated in Step 101 using different logical chain construction strategies, in order to form a target logical chain that can fully cover the content generation request requirements while maintaining a high degree of logical coherence and rationality.

[0169] In one embodiment, the target logic chain is not a simple stacking of multiple original logic chains (i.e., the logic chain generated in step 101), but rather a product of careful optimization and fusion. When integrating multiple logic chains, the following objectives can be followed:

[0170] Comprehensive coverage: The target logic chain must fully cover all key elements and detailed requirements of the content generation request to ensure that the generated content can accurately meet the user's actual needs.

[0171] Logical coherence: During the integration process, attention is paid to the internal connections and logical order between each logical node, so that the target logical chain presents a clear and smooth logical context as a whole, providing solid logical support for subsequent content generation.

[0172] Reasonableness assurance: Through integration and processing, redundancy, contradictions or irrationality that may exist in the original logical chain are eliminated to ensure that the target logical chain is logically consistent and in accordance with common sense, thereby improving the quality and credibility of content generation.

[0173] Given the aforementioned objectives, and considering the structural and content differences in logic chains generated by different logic chain construction strategies, the integration of multiple original logic chains focuses on resolving conflicts in these two key aspects: content and structure. In other words, in one embodiment, integrating multiple logic chains to form a target logic chain includes: integrating multiple logic chains and eliminating content and structural conflicts between different logic chains to obtain the target logic chain.

[0174] Resolving content conflicts involves integrating repetitive, contradictory, or complementary content based on its relevance and importance. For example, repetitive content is streamlined and merged to remove redundancy; contradictory content is selected and adjusted based on contextual logic and actual needs; and complementary content is organically combined to complement each other. By resolving content conflicts, the coordination and unity of content within the target logical chain can be achieved, ensuring the accuracy and completeness of the target logical chain in its content expression.

[0175] To resolve structural conflicts, it is necessary to identify the core logical nodes and hierarchical relationships in the original logical chain, then rearrange the logical nodes and sort out the hierarchical relationships to eliminate structural differences and conflicts, so that the target logical chain is clear and orderly in its overall structure.

[0176] Regarding the specific process of integrating multiple logic chains to form the target logic chain, the embodiments of this application provide... Figure 2 The process is shown below. Details will not be elaborated here.

[0177] Step 103: Perform content retrieval based on the target logical chain to obtain the target retrieval content.

[0178] Step 103 aims to retrieve content closely related to key nodes in the target logical chain, capable of supporting reasoning and creation during the content generation process—that is, the target retrieval content. For example, the target retrieval content is diverse and rich, providing more choices and informational support in subsequent content generation processes.

[0179] In one embodiment, content retrieval is performed using a search engine, database, or other information source based on the logical nodes in the target logical chain. The retrieval process may involve technologies such as keyword matching, semantic analysis, and entity recognition to improve the accuracy and efficiency of the retrieval.

[0180] One optional implementation method is to perform content retrieval based on the target logical chain to obtain the target retrieval content. This includes: constructing retrieval statements for the target logical chain using different retrieval statement construction strategies; and executing different retrieval statements to perform content retrieval to obtain the target retrieval content.

[0181] The above implementation method, through diverse search statement construction and execution strategies, enables efficient and accurate content retrieval, providing rich and high-quality data support for subsequent content generation. For example, different search statement construction strategies include, but are not limited to, semantic query construction based on natural language understanding and precise query construction based on keyword extraction from the target logical chain, aiming to capture the core information and needs of the target logical chain from different angles and levels. Subsequently, these constructed search statements are executed to perform content retrieval for different index databases. In this process, a multi-path data retrieval module is introduced. This module designs differentiated retrieval strategies for data in different indexes to maximize retrieval efficiency and accuracy. Specifically, this module includes two core sub-modules: a vector retrieval sub-module and a keyword retrieval sub-module. The vector retrieval sub-module vectorizes the target logical chain and uses vector similarity calculation methods to retrieve the most semantically similar related data in the database. This approach can capture deep semantic information in the target logical chain, thereby discovering data that may not be directly matched at the keyword level but is highly relevant in content. The keyword search submodule utilizes structured search statements (such as SQL statements or query languages ​​supported by search engines like Elasticsearch) to perform precise searches within structured data sources (such as databases and search engine indexes). This method can quickly locate information containing explicit keywords within the target logical chain.

[0182] Furthermore, to further quantify the effectiveness of search strategies, each search strategy can be formally described as a search strategy unit. This unit may contain one or more elements from the following: search type (e.g., semantic search or keyword search), search query, boost factor (used to adjust the ranking weight of search results), and a list of search sources (specifying the range of data sources for the search). Through this formal description, the system can flexibly combine and adjust the elements in the search strategy unit according to different search needs to construct the most suitable search strategy for the current search requirements, thus adapting to different search needs and scenarios.

[0183] Step 104: Generate input information based on the target logic chain and target retrieval content, and pass it to the large language model to generate target content that meets the content generation request.

[0184] In one embodiment, the target logic chain and the target retrieval content are integrated to generate the input information required by the large language model. The input information may include the structure of the logic chain, information about key nodes, and a summary of the retrieval content. Furthermore, the generation of the input information may take into account factors such as the input format and length limitations of the large language model, and the target logic chain and the target retrieval content may be processed in terms of format and length.

[0185] Furthermore, the generated input information is passed to a large language model, which leverages its generative capabilities to generate target content that meets the content generation request. This large language model may be based on deep learning algorithms, such as the Transformer architecture, which learns language rules and patterns by training on a large amount of text data, thereby generating high-quality content.

[0186] The technical solution provided in this application responds to content generation requests, generates multiple logical chains using different logical chain construction strategies, integrates these logical chains to form a target logical chain, performs content retrieval based on the target logical chain to obtain target retrieval content, and finally generates input information based on the target logical chain and target retrieval content and passes it to a large language model to generate target content that meets the content generation request. This solution employs diverse logical chain construction strategies to generate multiple logical chains with different perspectives and focuses. The target logical chain, formed by integrating these logical chains from different sources, serves as the core basis for subsequent content generation. It possesses technical advantages in intelligently integrating multi-source information, providing clear and explicit logical guidance for content generation and ensuring that the generated content is logically rigorous and reasonable, thereby significantly improving the quality and efficiency of content generation.

[0187] Figure 2 A flowchart illustrating an embodiment of another content generation method provided in this application. Figure 2 The process shown is in Figure 1 Based on the illustrated process, describe the implementation process of integrating multiple logical chains to form the target logical chain. For example... Figure 2 As shown, it includes the following steps:

[0188] Step 201: Extract the topic set from each logical chain.

[0189] As described above, different logical chains are generated using different logical chain construction strategies and have different characteristics (such as different structures, depths, and focuses). Therefore, when extracting topic sets from different logical chains, different topic extraction methods are used according to the structural characteristics of different logical chains.

[0190] Specifically, when the logical chain generated in response to content generation requests includes the first logical chain constructed according to the first logical chain construction strategy, the first logical chain is a tree-structured outline template. Compared to the second logical chain (the logical chain generated by the large model) or the third logical chain (a semi-structured collection of article fragments), the tree-structured outline template has a clear hierarchical structure, well-defined logical relationships, and close hierarchical connections between nodes. Given the structured nature of the first logical chain, we can directly parse the root node and branch nodes of the tree-structured outline template to quickly locate topic elements of different granularities. For example, the root node can be directly mapped to a first-level topic, the first-level branch nodes to second-level topics, and so on, ultimately forming a topic set containing multi-level topic information. Furthermore, when dealing with structural conflicts between different logical chains, given the clear hierarchical structure, rigorous logic, and complete knowledge organization framework of the first logical chain, its hierarchical structure can be used as a standard reference. That is, using the first logical chain as a benchmark to coordinate and integrate the structures of other logical chains helps ensure that the final logical system has structural consistency, coherence, and rationality.

[0191] In cases where the logical chain generated in response to a content generation request includes a second logical chain constructed according to a second logical chain construction strategy, the second logical chain is presented in the form of natural language paragraphs. Natural language paragraphs often lack a clear structured framework and a distinct theme. Therefore, for the second logical chain, some theme extraction techniques can be used to efficiently and accurately extract theme information from the natural language paragraphs.

[0192] In one embodiment, the specific implementation of extracting the topic set from the second logical chain includes: segmenting the second logical chain to obtain multiple paragraphs; extracting the core statement from each paragraph and classifying the core statement as a topic into the topic set.

[0193] Specifically, the second logical chain is first segmented. For example, it can be broken down into multiple independent paragraphs based on logical transitions, topic shifts, or structural markers (such as blank lines, ordinal numbers). Then, for each paragraph, text summarization or keyword expansion techniques can be used to identify its core statements—usually the first sentence, concluding sentence, or sentences containing key actions / viewpoints. Alternatively, sentences marked with emphasis, such as bold or underlined text, can be identified as core statements. Finally, the core statements from all paragraphs are compiled to form a topic set. This method ensures that the topic set covers the main argumentative directions in the logical chain by preserving paragraph-level semantic units, while reducing topic granularity and improving the flexibility of content generation.

[0194] In another embodiment, the specific implementation of extracting the topic set from the second logical chain includes: identifying target keywords from the second logical chain and classifying the target keywords as topics into the topic set.

[0195] Specifically, methods such as part-of-speech tagging, named entity recognition, term frequency-inverse document frequency recognition, and domain dictionary matching can be used to filter out target keywords that are thematically representative from the second logical chain, and these target keywords can be categorized as topics into a topic set. This method, by focusing on core concepts, can quickly construct a highly generalized topic set.

[0196] In another embodiment, the core statement extraction described above can be combined with target keyword identification. Specifically, the second logical chain is first segmented to form a set of paragraphs. Then, core statements are extracted from each paragraph to form a preliminary set of topics. Next, keywords are extracted from the core statements in the preliminary set of topics, and the further extracted keywords are added to the topic set as topics. Finally, the topics in the topic set can be deduplicated and filtered to remove duplicate or redundant topics, forming the final set of topics.

[0197] In cases where the logical chain generated in response to a content generation request includes a third logical chain constructed according to a third logical chain construction strategy, the third logical chain is a semi-structured collection of article fragments. This semi-structured characteristic means that the information in the third logical chain does not strictly adhere to formatting specifications. Therefore, to extract a representative and comprehensive set of topics from the third logical chain, topic extraction techniques can be employed. Furthermore, given that these collections of article fragments originate from a pre-set database, which is rich and rigorous in content, these collections often possess a certain degree of authority. Accordingly, when handling content conflicts between different logical chains, the topic nodes of the third logical chain can be used as key reference standards, relying on the third logical chain to coordinate and integrate the topic nodes of other logical chains. This helps improve the accuracy and credibility of the topic nodes in the target logical chain.

[0198] In one embodiment, the specific implementation of extracting the topic set from the third logical chain includes: extracting the title from the third logical chain and including the title as a topic in the topic set.

[0199] In this embodiment, since the third logical chain is a semi-structured collection of article fragments, and the titles in the article fragments serve as highly condensed identifiers of the content, they can be directly used as a source for topic extraction. Specifically, semi-structured article fragments typically contain a hierarchical title structure (such as chapter titles, section titles, paragraph titles, etc.). These titles concisely summarize the core content of the corresponding fragments, so these titles can be directly categorized as topics into the topic set.

[0200] In another embodiment, summary text is extracted from the third logical chain and categorized as a topic into the topic set. This summary text includes, but is not limited to, text summaries, defining statements, and key conclusions. Specifically, for text summary extraction, extractive or generative summarization techniques can be used to extract the core claims, i.e., the text summary, from the article fragment. For defining statement identification, concept definitions, i.e., defining statements, can be extracted from the article fragment through keyword matching (e.g., "defined as," "refers to") or sentence structure analysis. For key conclusion extraction, concluding statements (e.g., sentences introduced by "therefore," "in conclusion," etc.) in the article fragment can be identified as keyword conclusions.

[0201] In another embodiment, the title extraction and summary text extraction described above can be combined. Specifically, firstly, all titles are extracted from the third logical chain to form an initial topic set. Then, for segments without titles or with incomplete titles, text summaries, defining statements, or key conclusions are extracted as supplementary topics. Finally, the topics extracted from the titles and summary texts are merged, and duplicate or semantically similar topics are removed to form the final topic set.

[0202] Step 202: Integrate multiple topic sets to obtain the target topic set.

[0203] Step 202 involves integrating multiple topic sets, which is not a simple, mechanical merging but a task requiring meticulous and comprehensive consideration. Specifically, it involves identifying and eliminating potentially conflicting information within different topic sets and / or the same topic set, ensuring consistency and harmony of viewpoints. Simultaneously, it involves accurately removing duplicate and redundant content to avoid information overload. Through the integration of multiple topic sets, a target topic set that is clearly structured, logically rigorous, complete in content, and free from conflict and redundancy is ultimately obtained.

[0204] In one embodiment, see [link to relevant documentation]. Figure 3 For example, the specific implementation of integrating multiple topic sets to obtain the target topic set includes the following steps:

[0205] Step 301: Perform clustering on the topics in multiple topic sets to obtain multiple topic clusters.

[0206] Step 302: Identify the core themes from each theme cluster.

[0207] Step 303: Construct a target topic set using multiple core topics.

[0208] exist Figure 3In the illustrated process, the clustering process in step 301 is essentially an intelligent grouping technique based on semantic similarity. It aims to group topics with high semantic similarity into one category; in other words, topics grouped into the same topic cluster share semantic similarity. Step 302 then selects the most representative core topics from each topic cluster. These core topics retain the key features and core semantics of the original topics while possessing stronger generalization and universality. Finally, step 303 constructs the target topic set from these core topics.

[0209] In one embodiment, the specific implementation of clustering topics from multiple topic sets to obtain multiple topic clusters includes: merging multiple topic sets into one topic set, and performing clustering on the topics in the merged topic set to obtain multiple topic clusters; wherein, topics within the same topic cluster have semantic similarity.

[0210] Specifically, as an optional implementation, clustering the topics in the merged topic set to obtain multiple topic clusters includes: selecting a topic from the merged topic set as the current topic; calculating the semantic similarity between the current topic and the remaining topics; and grouping the remaining topics with semantic similarity greater than a preset threshold into the same topic cluster as the current topic. Then, selecting a core topic from the most recently obtained topic cluster, and using this core topic as the new current topic, the process of calculating the semantic similarity between the current topic and the remaining topics is repeated until no remaining topic has a semantic similarity greater than the preset threshold. At this point, the clustering process ends, and the current topic and the remaining topics are each identified as a topic cluster. Here, remaining topics refer to those that were not selected and were not identified as core topics.

[0211] For example, suppose the merged topic set includes five topics: A, B, C, D, and E, and suppose the semantic similarity between any two of these five topics is as shown in Table 1 below:

[0212] Table 1

[0213] A B C D E A - B 0.6 - C 0.4 0.6 - D 0.4 0.7 0.2 - E 0.3 0.2 0.6 0.1 -

[0214] The first step is to select topic A as the current topic. At this point, the remaining topics include topic B, topic C, topic D, and topic E. Assuming the preset threshold is 0.5, if the semantic similarity between topic B and topic A is found to be greater than 0.5, then topic A and topic B are grouped into the same topic cluster, resulting in topic clusters {A, B}.

[0215] The second step is to identify the core topic within the topic clusters {A, B}. Let's assume topic B is the core topic. The remaining topics include topics C, D, and E. We find that topics C and D each have a semantic similarity greater than 0.5 with topic B. Therefore, we group topics B, C, and D into a single topic cluster, resulting in topic clusters {B, C, D}.

[0216] The third step is to determine the core topic within the topic clusters {B, C, D}. Let's assume topic D is the core topic. At this point, the remaining topics include topic E. If no topic has a semantic similarity greater than 0.5 with topic D, the process ends, and the current topic and topic D are grouped into one topic cluster, and the remaining topics and topic E are grouped into another topic cluster. Thus, the following topic clusters are obtained: {A, B}, {B, C, D}, {D}, and {E}.

[0217] In one embodiment, the specific implementation of determining the core topic from each topic cluster includes: performing the following processing for each topic cluster: if there is only one topic in the topic cluster, determine that topic as the core topic; or, if different topics in the topic cluster come from different logical chains, determine the topic with the highest priority in the corresponding logical chain in the topic cluster as the core topic; or, if there are different topics from the same logical chain in the topic cluster, determine the relevance between each topic in the topic cluster and the content generation request; and determine the topic with the highest relevance as the core topic.

[0218] In this scenario, where different topics within a topic cluster originate from different logical chains, the topic with the highest priority in that logical chain is identified as the core topic. Here, a logical chain priority is pre-defined for each source of logical chains. Optionally, the logical chain priority can be set based on the authority of the content within the logical chain. Authority, as an important indicator of logical chain quality, reflects the reliability, professionalism, and influence of the information carried by the logical chain. Generally, the higher the authority of the content in a logical chain, the higher its logical chain priority. Accordingly, in one example, the third logical chain can be assigned the highest priority, followed by the first logical chain, and the second logical chain the lowest. This approach not only allows for the selection of the highest-priority topic as the core topic when topics from different logical chains are semantically similar, thus eliminating redundant topics and preventing the target topic set from becoming bloated, but also ensures the accuracy, professionalism, and reliability of the target topic set.

[0219] In the case of different topics from the same logical chain in topic clustering, determine the relevance between each topic in the topic cluster and the content generation request; and identify the topic with the highest relevance as the core topic.

[0220] In practical applications of topic clustering, a complex situation arises where multiple different topics from the same logical chain exist within the clustering results. These topics sharing the same logical chain imply logical relevance, and their inclusion in the same topic cluster suggests semantic similarity. To accurately extract the most representative and crucial topics—the core topics—from these, it's essential to determine the relevance of each topic to the content generation request. This process involves in-depth analysis of the topic content and meticulous comparison and comprehensive consideration of various factors such as the target intent, keywords, and context within the content generation request. Using appropriate evaluation methods, such as semantic similarity calculation and keyword matching analysis, a relevance score is quantified for each topic to the content generation request. Finally, based on these relevance scores, the topic with the highest relevance is identified as the core topic. This core topic not only effectively summarizes the key information of its logical chain but also maximizes the fulfillment of the specific needs of the content generation request, providing a strong basis for subsequent content generation.

[0221] Step 203: Use the target topic set to form a target logical chain.

[0222] As described above, the target logical chain not only has logical nodes, but these logical nodes also need to form a coherent and structured hierarchical relationship. The topics in the target topic set can serve as logical nodes. Therefore, it is also necessary to determine the hierarchical structure between these topics, that is, to resolve structural conflicts between different logical chains in order to form the target logical chain.

[0223] Accordingly, in one embodiment, the specific implementation of forming a target logic chain using a target topic set includes: determining the outline level of each topic in the target topic set, forming topic outlines of the topics in the target topic set according to the corresponding outline levels, and determining the topic outlines as the target logic chain.

[0224] In one embodiment, the specific implementation of determining the outline level of each topic in the target topic set includes: inputting the target topic set into a trained outline recognition model to obtain the outline level of each topic in the target topic set.

[0225] In this embodiment, a deep learning-based outline recognition model was pre-designed and constructed. This model fully considers the complex logical relationships between topics, including but not limited to causal relationships and component relationships. By analyzing the semantic connections, contextual environment, and potential logical chains between topics, it can automatically learn and understand the relative positions and hierarchical relationships of different topics within the outline structure. For example, when the model detects that a topic is an in-depth explanation or specific application of another topic, it tends to classify the former as a lower level of the latter; and when there is a clear causal chain between two topics, the model can accurately identify the hierarchical differences between the cause topic and the result topic. Exemplarily, during the model processing, the model first extracts features from each topic in the target topic set. These features may include keywords and semantic vector representations of the topic content. Subsequently, based on these features, the model uses its internal learning mechanisms and algorithms to deeply mine and analyze the logical relationships between topics. Finally, the model outputs a clear and logically rigorous outline hierarchy, in which each topic is accurately located in its proper hierarchical position. This approach not only efficiently and accurately determines the outline level of each topic in the target topic set, but also ensures that the results conform to users' cognitive habits and logical patterns, providing strong support for subsequent content organization.

[0226] In one embodiment, the specific implementation of determining the outline level of each topic in the target topic set includes: determining the outline level of a topic in the target topic set based on its original outline level in its logical chain.

[0227] Specifically, as an optional implementation, for each topic in the target topic set, its occurrence across multiple sources (i.e., logical chains) is determined, with particular attention paid to whether the topic consistently appears as a subtopic of another topic in most sources. This step helps identify hierarchical relationships with broad consensus, ensuring that the final outline hierarchy conforms to both the inherent rules of logical chains and the presentation habits of most information sources.

[0228] Furthermore, in its implementation, this mechanism can draw upon the design principles of the aforementioned deep learning-based outline recognition model. First, features are extracted from each topic in the target topic set. These features include not only basic information such as keywords and semantic vector representations of the topic content, but also statistical features such as the frequency of occurrence and co-occurrence relationships of the topic across multiple sources. Subsequently, based on these comprehensive features, advanced machine learning algorithms and logical reasoning techniques are used to deeply mine and analyze the complex logical relationships between topics. Finally, a clear and logically rigorous outline hierarchy is output, in which each topic is accurately located in its proper hierarchical position.

[0229] As an alternative implementation, the outline level of topics in the target topic set can be determined by referring to the topic levels in different original logical chains. Specifically, the first logical chain contains structured content with clear hierarchy and logical coherence, making the topic hierarchy in the first logical chain more reliable. The second logical chain is generated by a large model; although large models have powerful language generation capabilities, the reliability of the generated content and hierarchical information is relatively low. The third logical chain contains semi-structured content, lacking clear hierarchical information as a whole, thus offering limited help in determining the topic level. Based on this, for each topic in the target topic set, if the topic directly originates from the first logical chain, then the outline level of that topic in the first logical chain, i.e., the outline template, is determined as its outline level in the target topic set. If the topic does not originate from the first logical chain, it is further determined whether there are topics in the topic cluster to which the topic belongs that directly originate from the first logical chain. If so, the outline level of the topic originating from the first logical chain in the first logical chain, i.e., the outline template, is determined as the outline level of that topic in the target topic set. If it does not exist, we can refer to the design idea of ​​the outline recognition model based on deep learning technology mentioned above and use the model to determine the outline level of the topic.

[0230] It should be noted that, in one embodiment, the three implementation methods described above can complement and synergize with each other. For example, an outline recognition model can be used first to initially determine the outline hierarchy of each topic in the target topic set. This step can quickly and efficiently generate a preliminary outline structure. However, since the model may have insufficient understanding of specific domain knowledge or inaccurate capture of certain complex logical relationships, the initially determined outline hierarchy may not be completely accurate. Therefore, the initially determined outline hierarchy can be optimized by combining the original outline hierarchy of the topics in the target topic set within their respective logical chains. For example, if the initially determined outline hierarchy of a topic from the first logical chain is inconsistent with the outline hierarchy of that topic in the first logical chain, then the outline hierarchy of that topic in the first logical chain is selected as the final outline hierarchy. This approach fully utilizes the natural hierarchical relationship of topics within their respective outline templates, ensuring that the final determined outline hierarchy conforms to both the inherent rules of the logical chain and the user's cognitive habits. Furthermore, a multi-source subtopic relationship checking mechanism can be introduced to further verify and correct the optimized outline hierarchy. By examining whether a topic appears as a subtopic of another topic in most sources, we can identify hierarchical relationships with broad consensus and promptly correct any anomalies or errors. This multi-step, multi-level collaborative approach allows for a more comprehensive capture of the complex logical relationships between topics, reducing errors or biases that might arise from a single method, thereby improving the accuracy of outline hierarchy determination.

[0231] Figure 2 The process illustrated involves extracting topic sets from each logical chain, integrating multiple topic sets to obtain a target topic set, and then using this target topic set to generate a target logical chain. This achieves the clustering and integration of scattered topics based on a semantic similarity algorithm, forming a hierarchical target topic set. This process effectively eliminates topic redundancy, ensuring that the final generated target logical chain retains the core reasoning structure of the original logical chain. This guarantees that the final generated content is logically rigorous and reasonable, significantly improving the quality and efficiency of content generation.

[0232] Figure 4 A flowchart illustrating an embodiment of another content generation method provided in this application. Figure 4 The process shown is in Figure 1 Based on the illustrated process, an exemplary implementation of content retrieval based on the target logical chain to obtain the target retrieved content is described. For example... Figure 4 As shown, it includes the following steps:

[0233] Step 401: Determine the primary and secondary retrieval relationships between topics in the target logical chain.

[0234] Step 402: Based on the primary and secondary relationships of retrieval, generate retrieval statements corresponding to the target logical chain.

[0235] Step 403: Use search statements to perform content retrieval and obtain the target search content.

[0236] For ease of understanding, steps 401 to 403 will be explained uniformly below:

[0237] First, all topics in the target logical chain will be included in the content retrieval scope. However, given the potentially complex relationships between topics, especially literal conflicts (i.e., duplicate text blocks between topics, such as the duplicate text block "quantum" between the topics "quantum molecular simulation" and "quantum machine learning"), direct retrieval may lead to redundant or contradictory results. This conflict mainly stems from the currently used keyword retrieval technology, which performs matching searches based on literal text after word segmentation. For example, in the retrieval strategy, the topics "quantum molecular simulation" and "quantum machine learning" will be broken down into "quantum or molecular simulation" and "quantum or machine learning." While this design broadens the search scope, it may also lead to overlapping retrieved content. Therefore, in subsequent deduplication, the content to be retained must be determined based on the primary and secondary relationships between topics to ensure that information from the main search directions is fully preserved.

[0238] Accordingly, in step 401, the inherent relationships and conflicts among the topics in the target logical chain are first analyzed to clarify the primary and secondary status of each topic in the retrieval. In one embodiment, if there are topics with literal conflicts in the target logical chain, the primary and secondary retrieval relationship between the conflicting topics is determined. However, if there are no conflicting topics, or for other topics without literal conflicts, it is not necessary to determine the primary and secondary retrieval relationship between topics; different topics can be treated as equals and participate in subsequent content retrieval. Specifically, the text content of two topics can be compared character-by-character to determine if there is a literal conflict. For example, string matching functions in programming languages ​​can be used to traverse and search the text of two topics; if identical substrings are found, a literal conflict is determined.

[0239] In one embodiment, the specific implementation of determining the primary and secondary retrieval relationships between topics in the target logical chain may include: determining the relevance between topics in the target logical chain and content generation requests; and determining the primary and secondary retrieval relationships between topics in the target logical chain based on the corresponding relevance.

[0240] The relevance between a topic and a content generation request measures the semantic matching degree between them, essentially determining whether the topic "aligns" with the user's intent through quantitative analysis. One optional approach is to calculate the semantic similarity between the topic and the content generation request, defining this similarity as the relevance. Another optional approach is to identify core keywords in the content generation request, locate the matching expert knowledge base based on these keywords, and then determine the topic's citation frequency (e.g., the number of times it is cited in academic papers, the frequency of its inclusion in authoritative reports) and co-occurrence relationship (e.g., the probability of topic A and topic B appearing simultaneously in the same document). Finally, combining citation frequency (reflecting the topic's authority) and co-occurrence relationship (reflecting the topic's relevance), a comprehensive relevance score between the topic and the content generation request is calculated, providing a high-confidence basis for determining the primary and secondary relationships in the retrieval.

[0241] Furthermore, the higher the relevance between the topic and the content generation request, the greater the weight of that topic in the retrieval process, thus giving it priority in information filtering and resource allocation. Essentially, this approach focuses on the core concepts of the topic during content generation through an attention mechanism, ensuring that the output content maintains professional depth while accurately matching the user's content generation intent, thereby significantly improving the quality and efficiency of content generation.

[0242] In step 402, based on the primary and secondary search relationships determined in step 401, a search statement that meets the search requirements is generated. This statement must ensure that it can effectively distinguish between primary and secondary information during the search process and reduce interference from redundant information.

[0243] Specifically, in one embodiment, based on the primary and secondary search relationships determined in step 401, a hierarchical weighting mechanism is used to generate search statements that meet the search requirements. Specifically, for primary search topics, the search weight is increased by adding prefix modifiers (e.g., ^3, indicating that the search weight of the topic is increased to 3 times the original weight) or Boolean operators (e.g., AND) to the search statements. For secondary search topics, a limited search strategy is adopted, narrowing the search scope by adding field constraints (e.g., TITLE:, ABSTRACT:) or time ranges (e.g., 2020-2023) to the search statements.

[0244] Subsequently, in step 403, the search statement generated in step 402 is used to perform content retrieval and obtain the target search content.

[0245] Figure 4The process shown determines the primary and secondary relationships between topics in the target logical chain, generates search statements corresponding to the target logical chain based on these relationships, and uses these search statements to retrieve content, thus obtaining the target search content. This constructs an efficient and accurate content retrieval process that can provide reliable data support for subsequent content generation.

[0246] In one embodiment, the specific implementation of content retrieval based on the target logical chain to obtain the target retrieval content includes: performing content retrieval from a preset database based on the target logical chain to obtain an initial retrieval content set; sorting the retrieval content in the initial retrieval content set; and filtering the target retrieval content from the initial retrieval content set based on the sorting results.

[0247] In this embodiment, the specific implementation process of content retrieval based on the target logical chain to obtain the target retrieval content consists of three key steps: First, relying on the core logical relationships defined by the target logical chain, a matching content retrieval is performed in a preset database to obtain an initial set of retrieval content that conforms to the logical chain reasoning path; second, a sorting algorithm is used to sort the initial retrieval results to generate a sorted sequence; finally, a filtering strategy is implemented based on the sorted results to prioritize the extraction of retrieval content that ranks highly and meets the requirements of logical chain integrity as the final target retrieval content. This embodiment can output target retrieval content that highly matches the target logical chain, ensuring that the retrieval results achieve a balance between logical rigor and content effectiveness.

[0248] In one embodiment, the specific implementation of sorting the search content in the initial search content set includes: for each search content in the initial search content set, determining the score of the search content under multiple rating dimensions; determining the total score of the search content based on the scores of the search content under multiple rating dimensions; and sorting the search content in the initial search content set according to the total score.

[0249] In this embodiment, a multi-dimensional scoring mechanism is adopted for the sorting process of the initial search content set. For example, for each search content in the initial search content set, quantitative evaluation is carried out from at least two scoring dimensions: First, the relevance score between the document and the query, which can be analyzed by natural language processing technology to determine the semantic matching degree between the document and the query conditions in the target logical chain, and comprehensively consider keyword coverage, semantic similarity, and contextual relevance; Second, the authority score of the document, which can be evaluated based on the credibility of the document source (such as academic journals, authoritative institutions, etc.), citation frequency, and author influence; Third, the timeliness score of the document, which can be dynamically adjusted based on the time difference between the document's publication time and the current search time, combined with the domain knowledge update rate; Fourth, the matching degree between the document and user preferences, which can be calculated by constructing a user profile through user historical behavior data (such as browsing history, collection preferences) and explicit feedback (such as ratings, tags), and calculating the fit between the document and the user's interest model.

[0250] After determining the scores for each scoring dimension, a dynamic weight allocation strategy is further introduced to assign differentiated weights to each dimension. For example, the weight values ​​are preset by domain experts (e.g., relevance score weight 0.4, authority 0.3, timeliness 0.2, user preference 0.1), and the weight parameters are dynamically optimized based on historical search logs using machine learning algorithms to adapt to different search scenarios (e.g., academic research emphasizes authority, while real-time information focuses on timeliness). Finally, the total score is calculated through a weighted summation. Based on the total score, a ranking strategy is used to output a ranked list of search results, ensuring that the results meet both the logical chain reasoning strength requirements and the multi-dimensional balance between user preference and content quality.

[0251] Finally, this application also provides the following embodiments: obtaining user operation behavior on target content; adjusting the set priority of each logic chain according to the operation behavior.

[0252] The aforementioned actions may include copying or browsing the target content. For example, front-end tracking technology can be used to collect user actions related to the target content in real time.

[0253] Based on the collected user behavior data, a preset mechanism is used to dynamically adjust the priority of each logical chain. For example, basic weight values ​​can be assigned to different behaviors (e.g., copying behavior weight = 1.5, browsing time > 3 minutes weight = 1.0, repeated visits weight = 0.8, etc.). The distribution of user behavior under each logical chain topic is statistically analyzed, the cumulative behavior score of each logical chain is calculated, and the priority of each logical chain is adjusted according to the cumulative behavior score of each logical chain.

[0254] For example, if a user copies content under a certain logical chain topic, or spends a long time browsing it, the logical chain priority of that logical chain can be appropriately increased.

[0255] The above embodiments realize the transformation from static logic chain configuration to "user behavior-driven dynamic priority adjustment", which can significantly improve the accuracy of content generation and user satisfaction.

[0256] Furthermore, in practical applications, to further improve the long-term performance and user experience of the system, in addition to dynamically adjusting the priority of the logical chain, other optimization mechanisms can be introduced. For example, user feedback data can be collected through multiple channels, including explicit feedback (such as ratings and comments) and implicit feedback (such as click behavior and dwell time), and combined with contextual features (such as user historical preferences and search scenarios) to construct a multi-dimensional positive sample library. Based on this sample library, the underlying model is incrementally trained periodically, and efficient algorithms such as mini-batch gradient descent are used to optimize model parameters, enabling the system to adaptively learn the dynamic changes in user interests. At the same time, the model update effect is verified through A / B testing, and the parameter configurations with excellent performance are updated to the system default values, forming a closed-loop optimization process of "data collection → model training → parameter update", ultimately achieving a spiral improvement in the accuracy of content generation and user satisfaction.

[0257] Figure 5 This is a block diagram illustrating an embodiment of a content generation apparatus provided in this application. Figure 5 As shown, the device includes:

[0258] The logic chain construction module 51 is used to construct logic chains for the content generation request in response to the content generation request using different logic chain construction strategies.

[0259] The logic chain integration module 52 is used to integrate multiple logic chains to form a target logic chain;

[0260] Content retrieval module 53 is used to perform content retrieval based on the target logical chain to obtain the target retrieval content;

[0261] The content generation module 54 is used to generate input information based on the target logic chain and the target retrieved content, and pass it to the large language model to generate target content that meets the content generation request.

[0262] In one possible implementation, the different logical chain construction strategies include at least two of the following: a first logical chain construction strategy, a second logical chain construction strategy, and a third logical chain construction strategy;

[0263] The logic chain construction module 41 includes:

[0264] The first logic chain construction unit is used to construct a logic chain for the content generation request according to the first logic chain construction strategy, including: identifying the content generation target corresponding to the content generation request, obtaining an outline template that matches the content generation target from a preset template library, and using the outline template as the logic chain for the content generation request;

[0265] And / or, a second logic chain construction unit is configured to construct a logic chain for the content generation request according to the second logic chain construction strategy, including: inputting the content generation request into the logic chain model, and using the logic chain output by the logic chain model as the logic chain for the content generation request;

[0266] And / or, a third logical chain construction unit is used to construct a logical chain for the content generation request according to the third logical chain construction strategy, including: searching a preset database based on the content generation request, and using the retrieved content as the logical chain for the content generation request.

[0267] In one possible implementation, the logic chain integration module 52 includes:

[0268] A topic extraction unit is used to extract a set of topics from each of the logical chains.

[0269] The topic integration unit is used to integrate multiple topic sets to obtain a target topic set;

[0270] A logic chain forming unit is used to form a target logic chain using the target topic set.

[0271] In one possible implementation, the plurality of said logical chains include at least two of the following: a first logical chain constructed according to a first logical chain construction strategy, a second logical chain constructed according to a second logical chain construction strategy, and a third logical chain constructed according to a third logical chain construction strategy;

[0272] The topic extraction unit is used to extract a topic set from the second logical chain, including: segmenting the second logical chain to obtain multiple paragraphs; extracting core sentences from each paragraph and including the core sentences as topics in the topic set; and / or identifying target keywords from the second logical chain and including the target keywords as topics in the topic set.

[0273] Alternatively, the topic extraction unit is used to extract a topic set from the third logical chain, including: extracting a title from the third logical chain and including the title as a topic in the topic set; and / or, extracting a summary text from the third logical chain and including the summary text as a topic in the topic set.

[0274] In one possible implementation, the topic integration unit includes:

[0275] The clustering subunit is used to perform clustering processing on topics in multiple topic sets to obtain multiple topic clusters;

[0276] The core determination subunit is used to determine the core topic from each of the topic clusters;

[0277] The topic set construction subunit is used to construct a target topic set using multiple core topics.

[0278] In one possible implementation, the clustering subunit is specifically used for:

[0279] Merge multiple topic sets into one topic set;

[0280] The topics in the merged topic set are clustered to obtain multiple topic clusters; topics within the same topic cluster have semantic similarity.

[0281] In one possible implementation, the core determining subunit is specifically used for:

[0282] For each of the aforementioned topic clusters, the following processing is performed:

[0283] When different topics in the topic cluster come from different logical chains, the topic with the highest priority in the corresponding logical chain in the topic cluster is determined as the core topic.

[0284] Alternatively, if different topics from the same logical chain exist in the topic cluster, determine the relevance between each topic in the topic cluster and the content generation request; and determine the topic with the highest relevance as the core topic.

[0285] In one possible implementation, the logic chain forming unit is specifically used for:

[0286] Determine the outline hierarchy for each topic in the target topic set;

[0287] The topics in the target topic set are organized into topic outlines according to the corresponding outline hierarchy, and the topic outlines are determined as target logic chains.

[0288] In one possible implementation, the content retrieval module 53 includes:

[0289] The initial retrieval unit is used to perform content retrieval from a preset database based on the target logical chain to obtain an initial retrieval content set;

[0290] A sorting unit is used to sort the search content in the initial search content set;

[0291] The target determination unit is used to filter target search content from the initial search content set based on the sorting results.

[0292] In one possible implementation, the sorting unit is specifically used for:

[0293] For each search item in the initial search content set, determine the score of the search item under multiple rating dimensions;

[0294] The total score of the search content is determined based on the scores of the search content under the multiple scoring dimensions;

[0295] Based on the total score, the search results in the initial search content set are sorted.

[0296] In one possible implementation, the content retrieval module 53 includes:

[0297] The primary and secondary distinction unit is used to determine the primary and secondary retrieval relationships between topics in the target logical chain;

[0298] The retrieval statement construction unit is used to generate a retrieval statement corresponding to the target logical chain based on the retrieval primary and secondary relationship;

[0299] The retrieval execution unit is used to perform content retrieval using the retrieval statement to obtain the target retrieval content.

[0300] In one possible implementation, the primary and secondary differentiation unit is specifically used for:

[0301] Determine the relevance between the topics in the target logical chain and the content generation request;

[0302] Based on the corresponding relevance, the primary and secondary retrieval relationships between topics in the target logical chain are determined.

[0303] In one possible implementation, the content retrieval module 53 is specifically used for:

[0304] Different search statement construction strategies are used to construct search statements for the target logical chain respectively;

[0305] Execute different search statements to retrieve content and obtain the target search content.

[0306] In one possible implementation, the device further includes:

[0307] The optimization module is used to obtain the user's operation behavior on the target content; and adjust the set priority of each logic chain according to the operation behavior.

[0308] like Figure 6 As shown in the figure, this application provides an electronic device, including a processor 111, a communication interface 112, a memory 113, and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114.

[0309] Memory 113 is used to store computer programs;

[0310] In one embodiment of this application, when the processor 111 executes a program stored in the memory 113, it implements the content generation method provided in any of the foregoing method embodiments, including:

[0311] In response to a content generation request, different logical chain construction strategies are used to construct logical chains for the content generation request respectively;

[0312] The multiple logic chains are integrated to form the target logic chain;

[0313] Based on the target logical chain, content retrieval is performed to obtain the target retrieval content;

[0314] Input information is generated based on the target logic chain and the target retrieval content, and then passed to the large language model to generate target content that meets the content generation request.

[0315] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the content generation method provided in any of the foregoing method embodiments.

[0316] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0317] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented using software plus a general-purpose hardware platform, or of course, using hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the related technology, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0318] It should be understood that the terminology used herein is for the purpose of describing particular exemplary embodiments only and is not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms “a,” “an,” and “described” as used herein may also include the plural forms. The terms “comprising,” “including,” “containing,” and “having” are inclusive and therefore indicate the presence of the stated features, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, elements, components, and / or combinations thereof. The method steps, processes, and operations described herein are not construed as requiring them to be performed in a particular order described or illustrated unless the order of performance is explicitly indicated. It should also be understood that additional or alternative steps may be used.

[0319] The above description is merely a specific embodiment of this application, enabling those skilled in the art to understand or implement this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A content generation method, characterized in that, The method includes: In response to a content generation request, different logical chain construction strategies are used to construct logical chains for the content generation request respectively; The multiple logic chains are integrated to form the target logic chain; Based on the target logical chain, content retrieval is performed to obtain the target retrieval content; Input information is generated based on the target logic chain and the target retrieval content, and then passed to the large language model to generate target content that meets the content generation request.

2. The method according to claim 1, characterized in that, The different logical chain construction strategies include at least two of the following: a first logical chain construction strategy, a second logical chain construction strategy, and a third logical chain construction strategy; The process of constructing a logical chain for the content generation request based on the first logical chain construction strategy includes: Identify the content generation target corresponding to the content generation request, obtain an outline template that matches the content generation target from a preset template library, and use the outline template as a logical chain for the content generation request; Constructing a logical chain for the content generation request according to the second logical chain construction strategy includes: The content generation request is input into the logic chain model, and the logic chain output by the logic chain model is used as the logic chain for the content generation request. Constructing a logical chain for the content generation request according to the third logical chain construction strategy includes: The preset database is searched based on the content generation request, and the retrieved content is used as a logical chain for the content generation request.

3. The method according to claim 1, characterized in that, The process of integrating multiple logic chains to form a target logic chain includes: Extract a set of topics from each of the aforementioned logical chains; The multiple topic sets are integrated to obtain the target topic set; Using the set of target topics, a target logical chain is formed.

4. The method according to claim 3, characterized in that, The plurality of said logical chains include at least two of the following: a first logical chain constructed according to a first logical chain construction strategy, a second logical chain constructed according to a second logical chain construction strategy, and a third logical chain constructed according to a third logical chain construction strategy; Extracting a topic set from the second logical chain includes: segmenting the second logical chain to obtain multiple paragraphs; extracting core statements from each paragraph and including the core statements as topics in the topic set; and / or identifying target keywords from the second logical chain and including the target keywords as topics in the topic set. Alternatively, extracting a topic set from the third logical chain includes: extracting a title from the third logical chain and including the title as a topic in the topic set; and / or, extracting a summary text from the third logical chain and including the summary text as a topic in the topic set.

5. The method according to claim 3, characterized in that, The process of integrating multiple topic sets to obtain a target topic set includes: Clustering is performed on the topics in multiple topic sets to obtain multiple topic clusters; The core theme is determined from each of the aforementioned theme clusters; Construct a target topic set using multiple of the aforementioned core topics.

6. The method according to claim 5, characterized in that, The process of clustering topics from multiple topic sets to obtain multiple topic clusters includes: Merge multiple topic sets into one topic set; The topics in the merged topic set are clustered to obtain multiple topic clusters; topics within the same topic cluster have semantic similarity.

7. The method according to claim 5, characterized in that, The step of identifying the core topic from each of the topic clusters includes: For each of the aforementioned topic clusters, the following processing is performed: When different topics in the topic cluster come from different logical chains, the topic with the highest priority in the corresponding logical chain in the topic cluster is determined as the core topic. Alternatively, if different topics from the same logical chain exist in the topic cluster, determine the relevance between each topic in the topic cluster and the content generation request; and determine the topic with the highest relevance as the core topic.

8. The method according to claim 3, characterized in that, Using the aforementioned set of target topics, a target logical chain is formed, including: Determine the outline hierarchy for each topic in the target topic set; The topics in the target topic set are organized into topic outlines according to the corresponding outline hierarchy, and the topic outlines are determined as target logic chains.

9. The method according to claim 1, characterized in that, The content retrieval based on the target logical chain to obtain the target retrieval content includes: Based on the target logic chain, content retrieval is performed from the preset database to obtain an initial set of retrieved content; Sort the search results in the initial search result set; Based on the sorting results, target search content is selected from the initial search content set.

10. The method according to claim 9, characterized in that, The process of sorting the search content in the initial search content set includes: For each search item in the initial search content set, determine the score of the search item under multiple rating dimensions; The total score of the search content is determined based on the scores of the search content under the multiple scoring dimensions; Based on the total score, the search results in the initial search content set are sorted.

11. The method according to claim 1, characterized in that, The content retrieval based on the target logical chain to obtain the target retrieval content includes: Determine the primary and secondary retrieval relationships between topics in the target logical chain; Based on the primary and secondary retrieval relationships, a retrieval statement corresponding to the target logical chain is generated; The target search content is obtained by using the search query.

12. The method according to claim 11, characterized in that, Determining the primary and secondary retrieval relationships between topics in the target logical chain includes: Determine the relevance between the topics in the target logical chain and the content generation request; Based on the corresponding relevance, the primary and secondary retrieval relationships between topics in the target logical chain are determined.

13. The method according to claim 1, characterized in that, The content retrieval based on the target logical chain to obtain the target retrieval content includes: Different search statement construction strategies are used to construct search statements for the target logical chain respectively; Execute different search statements to retrieve content and obtain the target search content.

14. The method according to claim 7, characterized in that, The method further includes: Obtain the user's actions related to the target content; Adjust the priority of each logical chain according to the operational behavior.

15. A content generation apparatus, characterized in that, The device includes: The logic chain construction module is used to construct logic chains for the content generation request in response to the content generation request using different logic chain construction strategies. The logic chain integration module is used to integrate multiple logic chains to form a target logic chain; The content retrieval module is used to perform content retrieval based on the target logical chain to obtain the target retrieval content; The content generation module is used to generate input information based on the target logic chain and the target retrieved content, and pass it to the large language model to generate target content that meets the content generation request.

16. An electronic device, characterized in that, include: A processor and a memory, the processor being configured to execute a content generation program stored in the memory to implement the content generation method according to any one of claims 1-14.

17. A storage medium, characterized in that, The storage medium stores one or more programs, which can be executed by one or more processors to implement the content generation method according to any one of claims 1-14.