Content generation method and electronic equipment

By constructing a statically ordered task sequence and a target knowledge list, the problem of inaccurate responses in multi-hop question statements in question-answering models is solved, and the continuity and reliability of the response content are improved.

CN121071104APending Publication Date: 2025-12-05INSPUR SUZHOU INTELLIGENT TECH CO LTD

Patent Information

Application Number
CN202511576080.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-31
Publication Date
2025-12-05

AI Technical Summary

Technical Problem

When faced with multi-hop questions, question-answering models struggle to accurately capture the question's content and generate responses that conform to the logic of multi-hop questions, resulting in poor response quality.

Method used

By analyzing the keywords in the question statement, a static ordered task sequence is constructed as a reference causal chain to generate a set of sub-questions to be answered, and knowledge related to the set of sub-questions is obtained as a target knowledge list to generate the answer content.

Benefits of technology

It improves the accuracy of responses to multi-hop questions, reduces the risk of fragmented and disordered content, and optimizes content generation performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121071104A_ABST
    Figure CN121071104A_ABST
Patent Text Reader

Abstract

The invention discloses a content generation method and electronic equipment, and relates to the technical field of artificial intelligence, and the content generation method comprises the steps: when obtaining a to-be-replied question statement, analyzing a keyword of the question statement, and analyzing a multi-hop cascade causal relationship contained in the question statement based on the keyword, therefore, the reference causal chain of the question statement can be constructed, for example, when question statement reply is performed by using related knowledge, the question hierarchy represented by the reference causal chain can be referred to to generate reply content, so that the risk of returning scattered and disordered fragments can be reduced, and the reply efficiency is improved. The knowledge continuity of the generated content and the reliability of the reply content can be improved. The technical problem that the reply content of the multi-hop question is inaccurate is solved, and the technical effect that the reply accuracy of the multi-hop question can be improved to optimize the content generation performance is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a content generation method and an electronic device. Background Technology

[0002] When faced with multi-hop questions, question-answering models often struggle to accurately capture the core meaning of the question and generate poor-quality responses when converting the question into a vector for single-hop knowledge retrieval. To address this, a loop-based evaluation phase can be introduced, allowing the model to assess the contextual quality of its generated response. The response is output only when the contextual quality meets expectations. However, this approach still faces challenges in generating responses that accurately reflect the logic of multi-hop questions. Summary of the Invention

[0003] This application provides a content generation method, an electronic device, a computer-readable storage medium, and a computer program product to at least solve the problem of inaccurate content responses in the related art due to multi-hop issues.

[0004] This application provides a content generation method, which includes: obtaining a question statement to be answered and analyzing the keywords of the question statement; obtaining knowledge related to the keywords as an initial knowledge list; using the keywords to analyze the cascading causal relationship of the question statement to construct a static ordered task sequence as a reference causal chain; generating a set of sub-questions to be answered based on the initial statement information and obtaining knowledge related to the set of sub-questions as a target knowledge list; wherein, the initial statement information includes the question statement, the initial knowledge list, and the reference causal chain; and generating answer content by referring to the target knowledge list and the question statement.

[0005] This application also provides an electronic device, which includes a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program to implement the steps of any of the above-described content generation methods.

[0006] This application addresses the challenge of analyzing keywords within a question statement during the acquisition of the question. Based on these keywords, it allows for the analysis of multi-hop cascading causal relationships within the question statement, enabling the construction of a reference causal chain. When answering the question using relevant knowledge, the generation of the response content can reference the question hierarchy represented by this causal chain, thereby reducing the risk of returning fragmented or disordered pieces of information. This improves the knowledge continuity and reliability of the generated content. Therefore, it solves the technical problem of inaccurate responses to multi-hop questions, achieving the technical effect of improving the accuracy of responses to multi-hop questions and optimizing content generation performance. Attached Figure Description

[0007] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0008] Figure 1 This is a schematic diagram illustrating an application scenario of an embodiment of the content generation method of this application; Figure 2 A flowchart illustrating an embodiment of the method for generating content for this application; Figure 3 This is a schematic diagram of the structure of an embodiment of the content generation apparatus of this application; Figure 4 This is a flowchart illustrating another embodiment of the method for generating content in this application; Figure 5 This is a schematic diagram of the structure of a computer device according to an embodiment of this application; Figure 6 This is a schematic diagram of the structure of an embodiment of the computer-readable storage medium of this application. Detailed Implementation

[0009] 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, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.

[0010] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0011] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0012] To address the technical problem of inaccurate responses to multi-hop questions, this application provides a content generation method and an electronic device. The content generation method includes: acquiring a question statement to be answered; analyzing the keywords of the question statement; acquiring knowledge related to the keywords as an initial knowledge list; using the keywords to analyze the cascading causal relationships of the question statement to construct a statically ordered task sequence as a reference causal chain; generating a set of sub-questions to be answered based on the initial statement information; and acquiring knowledge related to the sub-question set as a target knowledge list. The initial statement information includes the question statement, the initial knowledge list, and the reference causal chain. The response content is generated by referring to the target knowledge list and the question statement. In other words, this application can significantly improve the quality of responses to multi-hop question statements.

[0013] With the iterative updates of question-answering models, there are now application scenarios for answering multi-hop questions. For example, multi-hop questions might include "How does the BMC obtain the air inlet temperature?", "How does the BMC control the AC power supply restart?", or "How do employees of a certain company apply for a certain type of funding?", where BMC stands for Baseboard Management Controller and AC stands for Alternating Current. Multi-hop questions can be understood as questions with a clearly defined object, multiple interconnected pieces of information, and a clear target. A clearly defined object means it includes a specific subject and corresponding operation / question; multiple interconnected pieces of information mean that the answer cannot rely on a single piece of information and must connect at least two relevant information points; and a clear target indicates a specific solution requirement, rather than simply asking about a concept.

[0014] Taking the question "How can an employee of a company apply for a certain type of funding?" as an example, the solution process can be broken down into: determining the region to which the company is located, identifying the special regional funding available in that region, outputting the relevant funding that the employee can apply for, and the application process, etc.

[0015] The following section describes the specific application environment architecture or specific hardware architecture that the execution of the content generation method depends on.

[0016] Please see Figure 1 , Figure 1 This is a schematic diagram illustrating an application scenario of one embodiment of the content generation method of this application.

[0017] In one embodiment, the application scenario of the content generation method may include an input terminal 10, a content generation device 20, and an output terminal 30.

[0018] Input terminal 10 can acquire the question statement to be answered and transmit the question statement to content generation device 20. Content generation device 20 may include a global model, which can generate answer content for the question statement and output the answer content via output terminal 30.

[0019] Optionally, the input terminal 10 and the output terminal 30 can be separate and independent information transmission channels, or they can be integrated into one information transmission channel, which is not limited here.

[0020] The embodiments of this application provide a content generation method, and the working principle of the content generation method in conjunction with the execution flow of the content generation method is described in detail.

[0021] Please see Figure 2 , Figure 2 This is a flowchart illustrating an embodiment of the method for generating content for this application.

[0022] S101: Obtain the question statement to be answered and analyze the keywords in the question statement.

[0023] In this embodiment, the question statement is equivalent to the specific problem that the user needs to solve, such as "How does the BMC obtain the air inlet temperature", "How does the BMC control the AC power supply to restart", "How do employees of a certain company apply for a certain type of funding", etc.

[0024] In response to receiving questions that need to be answered, the system can analyze the keywords in the questions and perform processes such as decomposition and analysis to find key information as keywords.

[0025] Optionally, the question statement can be text input; or it can be a question statement converted from multimodal data input such as text, voice, and images, without any limitation.

[0026] S102: Obtain knowledge related to the keywords as an initial knowledge list.

[0027] In this embodiment, based on the determined keywords, knowledge content associated with the keywords can be filtered from the existing knowledge reserve to form an initial knowledge set, i.e., an initial knowledge list.

[0028] S103: Utilize keywords to analyze the cascading causal relationships of the problem statements, and construct a static ordered task sequence as a reference causal chain.

[0029] In this embodiment, keywords can be used as a starting point to analyze the cascading causal relationships implied in the question statement. For example, there may be causal relationships with sequential or dependent relationships. Based on the sorted cascading causal relationships, the steps required to answer the question statement are arranged in a logical order to form a relatively fixed static ordered task sequence. This sequence can be used as a reference causal chain to provide a clear logical path for the subsequent step-by-step problem-solving.

[0030] S104: Generate a set of sub-questions to be answered based on the initial statement information, and obtain the knowledge related to the set of sub-questions as a target knowledge list; wherein, the initial statement information includes the question statement, the initial knowledge list and the reference causal chain.

[0031] In this embodiment, a set of sub-questions to be answered can be generated based on initial statement information. This initial statement information may include the original question statement to be answered, a filtered initial knowledge list, and a constructed reference causal chain. If so, these three parts of information can be combined to break down the original question statement into more specific sub-questions, forming a set of sub-questions. For this set of sub-questions, relevant knowledge is further filtered from the knowledge reserve and summarized to form a target knowledge list, providing knowledge support for subsequently answering each sub-question specifically and ultimately integrating a complete answer.

[0032] S105: Refer to the target knowledge list and question statement to generate the response content.

[0033] In this embodiment, in response to the formation of a target knowledge list, the target knowledge list can be used as the knowledge support for the answer to the question statement to generate the answer content.

[0034] Therefore, in this embodiment, when obtaining the question statement to be answered, the keywords of the question statement can be analyzed, and the multi-hop cascade causal relationship contained in the question statement can be analyzed based on the keywords. This allows the construction of a reference causal chain for the question statement. When answering the question statement using relevant knowledge, the question hierarchy represented by the reference causal chain can be referenced to generate the answer content, thereby reducing the risk of returning fragmented and disordered pieces. This improves the knowledge continuity of the generated content and the reliability of the answer content, thereby improving the accuracy of answering multi-hop questions and optimizing the content generation performance.

[0035] Embodiments of this application also provide a content generation apparatus.

[0036] Please see Figure 3 , Figure 3 This is a schematic diagram of an embodiment of the content generation apparatus of this application.

[0037] In one embodiment, the content generation apparatus may include a global model 21 and a local model 22.

[0038] Among them, the global model 21 represents an intelligent agent that can coordinate and plan the content generation task in a relatively holistic and global manner. It can respond to the acquisition of question statements to advance the corresponding content generation task, and schedule, transmit, respond to information acquisition, and filter content for other related models of the content generation device.

[0039] Local model 22 can be equivalent to an "expert model" that can focus on the specific sub-domain it involves and combine the current information to generate content on the corresponding dimension side. This can enhance the professionalism of the corresponding sub-domain dimension side when responding to questions during the content generation process, thereby improving the reliability of local and sub-domain knowledge details.

[0040] In other words, the working principle of global model 21 can be described as in the specific embodiments of the content generation method described above and below. Specifically, when global model 21 analyzes the current iteration information to iteratively generate the current subproblem set, it can obtain the subproblems generated by local model 22 using the current iteration information in the current iteration and write them into the current subproblem set.

[0041] Local model 22 can utilize the information from the current iteration to generate subproblems in the current iteration.

[0042] Optionally, the local model 22 may include multiple models of different types to focus on different dimensions. Taking the target domain of the problem statement as electronic devices as an example, the local model 22 may include at least one of a hardware entity model, a communication protocol model, and a data parsing model. Figure 3 As illustrated in the example, the local model 22 may include a hardware entity side model, a communication protocol side model, and a data parsing side model.

[0043] Furthermore, the content generation device may also include an incremental evaluation unit. The incremental evaluation unit evaluates whether candidate incremental knowledge meets the update conditions. If so, the global model 21 can determine whether to update the current knowledge list based on the determination result of the incremental evaluation unit. Details regarding candidate incremental knowledge, evaluation of whether it meets the update conditions, and the interaction between the global model 21 and the incremental evaluation unit will be elaborated upon later, and will not be repeated here.

[0044] For a description of the features in the embodiment corresponding to the content generation device, please refer to the relevant descriptions of the embodiments corresponding to the content generation method in the preceding and following texts, which will not be repeated here.

[0045] Please see Figure 4 , Figure 4 This is a flowchart illustrating another embodiment of the content generation method of this application.

[0046] In one embodiment, the knowledge base can be pre-constructed. The following example illustrates the construction principle of the target domain knowledge base. Here, the target domain refers to the knowledge domain to which the question statement belongs.

[0047] Obtain the source files of the target domain knowledge. Convert the format of the source files to obtain intermediate files for parsing. Extract the content titles from the intermediate files and divide them into multiple logical content blocks based on the titles. Encode the content title paths of the logical content blocks into semantic paths. The semantic paths are used to preserve the logical position of the content titles within the source files. Map the text content of the logical content blocks to form feature vectors and assign them knowledge identifiers. Construct an index set composed of knowledge elements as the target domain knowledge base. Each knowledge element includes a knowledge identifier, feature vector, and semantic path.

[0048] When retrieving knowledge within a target domain knowledge base, knowledge elements are used for knowledge retrieval. This allows for format conversion and logical content block segmentation by title, transforming potentially fragmented knowledge source files into well-organized logical units, thus improving the structuring of knowledge. Semantic paths preserve the logical location of content within the original file, and when combined with knowledge identifiers binding feature vectors, they enhance the preservation of contextual relationships and the integrity of core attributes, reducing the risk of knowledge existing in isolation from its original logic. By constructing an index using knowledge elements containing knowledge identifiers, feature vectors, and semantic paths, retrieval can leverage this key information to improve matching accuracy, thereby optimizing content generation performance.

[0049] The following section provides a detailed explanation of the principles behind content generation.

[0050] The global model obtains the question statements to be answered and analyzes the keywords in the question statements.

[0051] The global model acquires knowledge related to keywords as an initial knowledge list.

[0052] The global model uses keywords to analyze the cascading causal relationships in the question statements, and constructs a statically ordered task sequence as a reference causal chain.

[0053] The following examples illustrate various implementation principles for constructing reference causal chains. It should be noted that these implementation principles are not entirely independent of each other and can be combined to construct reference causal chains; no strict limitation is imposed here.

[0054] Optionally, the global model can identify the knowledge domain to which the question statement belongs as the target domain. Keywords present in the question statement are used as initial keywords. Derived keywords related to the initial keywords within the target domain are analyzed, and the cascading causal relationships of the question statement are established by combining the initial and derived keywords. By defining the target domain of the question statement, the analysis process can focus on a specific knowledge area, reducing interference from irrelevant information and thus improving the accuracy of question statement parsing. Expanding the initial keywords to obtain derived keywords ensures comprehensive coverage of relevant information in the question statement, reducing the omission of key information due to a single keyword, thereby improving the reliability of the causal chain construction for the question statement and optimizing content generation performance.

[0055] Furthermore, given that the target domain is electronic devices, the global model can analyze the devices and / or functions included in the question statement as initial keywords. For example, electronic devices could be servers, switches, storage devices, personal computers, etc.

[0056] The global model can perform hardware localization for initial keywords, matching the physical devices and sensing components associated with the initial keywords as derived keywords. It then uses the physical devices within the initial and derived keywords as target hardware, obtaining the communication mapping path to access the target hardware. This communication mapping path includes at least one of a communication interface and an addressing mode. The model also obtains the interaction configuration for interacting with the target hardware, including at least one of interaction protocol commands and interaction register configurations. Finally, it obtains the data parsing logic, which includes methods for interpreting and converting data.

[0057] The global model can determine whether the problematic statement contains control logic. This control logic includes at least one of the following: control feedback, exception handling logic, component collaboration logic, and timing requirement logic.

[0058] When a problem statement has control logic, the cascading causal relationship between the problem statement and the communication mapping path, interaction configuration, parsing logic, and control logic is formed. When a problem statement does not have control logic, the cascading causal relationship between the problem statement and the communication mapping path, interaction configuration, and parsing logic is also formed.

[0059] In other words, device components and / or device functions can be extracted as initial keywords, and combined with hardware location matching of physical devices and sensing components as derived keywords. This improves the efficiency of locating hardware in the field of electronic devices while ensuring the relevance of keywords. Simultaneously, it allows for the acquisition of communication mapping paths, interaction configurations, and data parsing logic for accessing target hardware. This facilitates the use of hardware access, interactive operations, and data interpretation to enhance the depth of understanding of question statements, thereby enabling reliable responses. Furthermore, the determination of the presence of control logic ensures the flexibility of reference causal chain generation, balancing the efficiency and completeness of reference causal chain generation.

[0060] Alternatively, the global model can obtain the causal chain model connected to it. A causal chain request is sent to the causal chain model to obtain a reference causal chain in response. This causal chain request includes the problem statement, the knowledge domain of the problem statement, a hint that the problem statement is a multi-hop problem, a reference consideration dimension, an explanation of the reference consideration dimension, an example statement, and its example causal chain. The reference consideration dimension includes at least one of the following: communication mapping path, interaction configuration, parsing logic, and control logic. The causal chain request will be discussed in detail later.

[0061] Alternatively, the global model can parse the question statement to obtain its key technical objectives. From these key technical objectives, guided by prompts associated with keywords, reverse questions are asked to construct a technical dependency chain for the key technical objectives, thus forming a referential causal chain.

[0062] Furthermore, in response to acquiring a reference causal chain, the global model can send the reference causal chain to the local model and send a prompt message to the local model, instructing it to combine the prompt message, the current reference causal chain, and other information to form a new causal chain. The local model can then send this new causal chain as a new reference causal chain to the global model. In this way, the global model can utilize the new reference causal chain to participate in the iterative process of content generation. The specific details regarding the local model will be elaborated upon later. The prompt message may include a specified prompt word, the current reference causal chain, and the current knowledge list.

[0063] For example, if the first step determines the device model (assuming the chip is LM75) and the second step determines the communication link from the BMC to the device (assuming it is I2C-13), then the current reference causal chain can be modified to the question to be queried in the next step, as follows: Step 1, determine the register address of LM75 to obtain temperature information; Step 2, determine the parsing rules of the data in the LM75 temperature register.

[0064] Next, the global model generates a set of sub-questions to be answered based on the initial statement information.

[0065] Specifically, the global model can use the initial statement information as the current iteration information and the initial knowledge list as the current knowledge list. The global model can analyze the current iteration information and iteratively generate the current sub-problem set.

[0066] For example, the global model can acquire sub-problems generated by the local model in the current iteration using the current iteration information and write them into the current sub-problem set. The local model includes at least one of the hardware entity-side model, communication protocol-side model, and data parsing-side model. The current iteration information is used to evaluate the criticality of sub-problems within the current sub-problem set, removing sub-problems whose criticality does not meet preset critical requirements. Generating a sub-problem set based on the current iteration information and the current knowledge list improves the compatibility between sub-problems and the processing progress of the current problem statement, as well as existing knowledge reserves; that is, it improves the matching degree between sub-problems and actual processing scenarios. Furthermore, introducing local models from dimensions such as hardware entities, communication protocols, and data parsing into sub-problem generation can leverage the domain expertise of each local model to enhance the richness of the details of the confirmation problem statement from multiple dimensions, further improving the matching degree between sub-problems and the technical logic of the target domain. This allows for the removal of sub-problems that do not meet preset requirements through criticality evaluation, thereby simplifying the sub-problem set. Furthermore, compared to having the global model independently generate the current sub-problem set, introducing a local model can reduce the computational burden on the global model, thereby improving the stability of content generation and further optimizing the reliability and performance of content generation.

[0067] Then, the global model can retrieve knowledge related to the current sub-problem set and update it to the current knowledge list, forming a new current knowledge list. For example, the global model obtains the knowledge domain to which the problem statement belongs as the target domain; it obtains the target retrieval area of ​​the target domain knowledge base; where the target retrieval area represents knowledge in the target domain knowledge base that is not written into the current knowledge list; it retrieves knowledge related to the current sub-problem from the target retrieval area and updates the current knowledge list with the retrieved knowledge. In other words, during the process of retrieving new knowledge, it is not necessary to pay attention to knowledge already written into the current knowledge list, reducing redundant retrieval calculations and thus reducing ineffective resource consumption to improve the efficiency of computing resource utilization.

[0068] Optionally, when retrieving knowledge related to the current sub-problem from the target retrieval region, the global model can retrieve knowledge related to the current sub-problem within the target retrieval region as candidate incremental knowledge; evaluate whether the candidate incremental knowledge overlaps with the current knowledge list; in response to the overlap between the candidate incremental knowledge and the current knowledge list, determine invalid knowledge updates and do not update the current knowledge list; in response to the lack of overlap between the candidate incremental knowledge and the current knowledge list, determine that the candidate incremental knowledge is used as the retrieved knowledge.

[0069] Furthermore, an incremental evaluation unit, which is independent of the global model, can be used to evaluate whether there is knowledge overlap between the current knowledge list and the candidate incremental knowledge.

[0070] Specifically, the global model can input the current knowledge list and candidate incremental knowledge into the pre-trained incremental evaluation unit. The training process of the incremental evaluation unit will be illustrated with an example later.

[0071] The incremental evaluation unit assesses whether candidate incremental knowledge meets the update conditions. In response to the incremental evaluation unit completing its evaluation, the global model obtains the evaluation unit's decision. If the decision indicates that the candidate incremental knowledge meets the update conditions, the global model determines that the candidate incremental knowledge and the current knowledge list do not overlap; if the decision indicates that the candidate incremental knowledge does not meet the update conditions, the global model determines that the candidate incremental knowledge and the current knowledge list overlap.

[0072] In other words, compared to the global model's determination of whether candidate incremental knowledge should be updated to the current knowledge list, this embodiment uses a relatively independent incremental evaluation unit to make the relevant judgment. That is, the incremental evaluation unit evaluates whether the candidate incremental knowledge meets the update conditions. The incremental evaluation unit and the global model work together to complete the update condition judgment, which can help release the computing resources of the global model and further help the global model to perform relatively reliable global management of content generation. This can help improve the stability and reliability of content generation and thus optimize content generation performance.

[0073] In this way, the global model can use the question statement, the new current knowledge list, and the reference causal chain as new current iteration information to iteratively generate a new current set of sub-problems and a new current knowledge list, until the iteration is complete and a set of sub-problems is obtained. The closed-loop iteration of sub-problems and the knowledge list allows the new sub-problems and the knowledge list to update each other, improving the effectiveness of the updates. This reduces the risk of sub-problem bias caused by initial information limitations, thereby improving the relevance and accuracy of the sub-problems.

[0074] The global model can acquire knowledge related to the set of sub-problems as a target knowledge list. The initial statement information includes the problem statement, the initial knowledge list, and reference causal chains.

[0075] The global model references the target knowledge list and question statements to generate response content.

[0076] The following provides a detailed explanation of causal chain requests. In this embodiment, a causal chain request can be a prompt word sent to the causal chain model. The following are specific examples of prompt words used as causal chain requests: "Please role-play as a professional-level BMC system architect, guiding a user (BMC development engineer) to fulfill development requirements. The user (BMC development engineer) has proposed a monitoring or control requirement, which needs to be addressed by tracing the knowledge chain from the underlying hardware to the upper-level data presentation. The user's problem has a cause-and-effect relationship, requiring step-by-step deduction. You are a senior BMC system architect with in-depth understanding and rich practical experience in BMC hardware architecture, communication protocols, chip manuals, and software development processes."

[0077] You are able to extract key steps from complex problems and guide development engineers to solve them step by step. You possess expertise in hardware localization, communication path mapping, register / protocol interaction, data parsing logic, control feedback, and related logic processing. You can clearly articulate the core task of each step and deduce solutions step by step based on user-input questions. Starting from user-provided monitoring or control requirements, you can work backward to deduce the causal chain for solving those requirements.

[0078] You can refer to the following workflow to outline the cause-and-effect chain, but don't be bound by it: 1. Hardware positioning: Identify the physical devices or sensors on which the function depends. 2. Communication path mapping: Determine the communication interface and addressing mode required to access the hardware. 3. Register / Protocol Interaction: Define the protocol commands or register configurations required for interaction with the hardware. 4. Data parsing logic: Explain the parsing methods and transformation rules of the original data. 5. Control Feedback (if applicable): If control operations are involved, the command execution and status confirmation mechanisms must be described. 6. Other related logic (if applicable): Supplement the logical requirements related to the main problem, such as exception handling, multi-component collaboration, and timing requirements.

[0079] You can refer to the following examples to trace the causal chain:

[0080] Example 1: Unanswered question: How to monitor the temperature at the fan inlet? Cause-and-effect chain: [Fan board] > Step 2: Determine the communication link from BMC to chip > Step 3: Determine the protocol for reading temperature register > Step 4: Parse register data as temperature value > Step 5: No control feedback > Step 6: No other related logic.

[0081] Example 2: Unanswered question: How to control the server's power switch? Cause-and-effect chain: Step 1: Determine the power control chip model > Step 2: Determine the communication link from BMC to the chip > Step 3: Determine the protocol for sending control commands > Step 4: No data parsing logic > Step 5: Confirm the power status feedback mechanism > Step 6: No other related logic.

[0082] The user's input requirement is: {query} Please output the causal chain directly based on the above information, without including any other unnecessary information.

[0083] The following section uses a local model, including the hardware entity side model, the communication protocol side model, and the data parsing side model, as an example to elaborate on the content generation process.

[0084] The following section will focus on defining the terms that appeared in the preceding text and explaining their functions.

[0085] The set of intelligent agents for the content generation device is defined as A = {Aplan} ∪ Aexp. Here, Aplan is the global model, responsible for task coordination and planning of the agents, handling macro-level planning, judgment, and decision-making; Aexp = {Ah, Ap, Ad, ...} is the collection of local models, which can propose sub-problems in parallel from different dimensions during iteration. For example: hardware entity-side model Ah (hardware entity dimension), communication protocol-side model Ap (communication protocol dimension), and communication protocol-side model Ad (data parsing dimension).

[0086] The content generation process involves a knowledge list V, where Vi represents the current knowledge list formed in the i-th iteration. The current knowledge list can be considered as the current state of the content generation device's understanding of the question statement.

[0087] The reference causal chain Cref is a statically ordered sequence of tasks generated by Aplan in the initial stage, Cref=<T1,T2,…,Tm> It can be used to provide macro-level logical dependency hints for the entire solution process.

[0088] The target domain knowledge base K can be considered as a structured, vectorized knowledge base oriented towards a specific domain (such as the BMC domain or the electronic device domain).

[0089] The following example illustrates the construction principle of the target domain knowledge base K.

[0090] Constructing a target domain knowledge base K can be considered to include steps such as preprocessing and format conversion, hierarchical semantic segmentation and context encoding, and text vectorization and indexing.

[0091] Specifically, source documents of target domain knowledge can be batch-converted into an easily parsed intermediate format. The source documents can be PDF (a file format) format such as device manuals or component manuals; the intermediate format can be Markdown (a lightweight markup language).

[0092] A segmentation algorithm based on the document's native title tree can be used to divide the document content into logical content blocks b. The content title path of each logical content block is encoded as a semantic path Title(b) to preserve its logical position in the original document. This encoding process can be represented by the following formula: Equation 1-1 Where l represents the number of logical content blocks in the document content segmentation, and j represents the j-th logical content block; title j ⨁ represents the content title path of the j-th logical content block; ⨁ represents string concatenation with delimiters.

[0093] The text representation model E is used to map the text content Text(b) of each logical content block b to a high-dimensional feature vector vb=E(Text(b)), and a knowledge identifier IDb is assigned to it. The target domain knowledge base K is an index set consisting of knowledge tuples, K={IDb,vb,Title(b),...}.

[0094] In layman's terms, the construction of the target domain knowledge base K can convert document content in formats such as pdf, docx, and html (three file formats) into a standardized intermediate format. The converted document is then divided into blocks. Blocking logic may include preserving the integrity of tables and maintaining the context of entire table paragraphs. Each text block should be given a title, which is a compilation of the various levels of headings within that block in the original document. For example, the logically divided content blocks might be: First-level heading Second-level heading Level 3 heading Content XXXX Table 1 XXXXX".

[0095] Accordingly, the divided documents can be illustrated as shown in Table 1: Table 1. Data Format of Knowledge Base Logical Content Blocks

[0096] The divided document blocks can then be mapped into numerical vectors using a word embedding model and stored.

[0097] The following is a brief description of how the global model works.

[0098] The global model Aplan can parse the user's original question statement Q0 and understand its core technical goal G=Aplan(Q0). This allows for reverse causal deduction. Specifically, Aplan can start from goal G and be guided by specific prompts to ask reverse questions, constructing a complete technical dependency chain. This automatically builds a complete causal reference chain Cref=Aplan(Q0,G) from the lowest-level hardware to the final data presentation.

[0099] The following provides a detailed explanation of the principles of iteration based on the current iteration information.

[0100] The global model can initialize the knowledge increment list to obtain an initial list. Specifically, Aplan can receive the question statement Q0 and retrieve the set S0=RFaiss(K,Q0,n) of the top n most relevant knowledge blocks (i.e., relevant logical content blocks) from the target domain knowledge base K through vector retrieval RFaiss. Aplan can then integrate these to generate the initial knowledge list V0=Aplan(S0,Q0).

[0101] Parallel exploration and candidate sub-problem generation can be performed by local models. Specifically, in the i-th iteration step, each local model Ak∈Aexp independently analyzes the current knowledge list, question statement, and reference causal chain in parallel, generating a set of candidate sub-problems Q'k=Ak(Vi,Qi,Cref) that it deems necessary to explore. The global candidate set is then summarized into the current sub-problem set Q'cand. Here, k represents the k-th local model, and Qi represents the sub-problem currently generated by the k-th local model. In an alternative embodiment, each local model may analyze a new current sub-problem set instead of the question statement; the current problem will be described in the following paragraph.

[0102] The global model can be based on priority arbitration of causal chains. Specifically, Aplan can examine the current knowledge list, the reference causal chain, and Q'cand, and arbitrate the receiving Q'cand to select the most critical set of update subproblems in the current iteration cycle, Q'exec = Aplan(Vi, Q'cand, Cref), and finally update the combined query problem of this round to a new current subproblem set Q(i+1) = Qi∪Q'exec.

[0103] In response to the formation of new current subproblems, a list of candidate incremental knowledge can be generated. That is, Aplan can perform knowledge retrieval on Q(i+1) and exclude previously retrieved knowledge blocks, which can be represented as: Formula 1-2 in, This represents the set of knowledge blocks that have been retrieved. This represents the logical content block written to the current knowledge list up to the current i-th iteration.

[0104] The newly retrieved knowledge blocks, i.e., candidate incremental knowledge, are represented as S(i+1) = RFaiss(K, Q(i+1), n, ..., n). ).

[0105] The state of the list of candidate incremental knowledge can be represented by the following formula: Formula 1-3 in, This represents candidate incremental knowledge.

[0106] If it is possible to evaluate and update the current knowledge list, Aplan calls the knowledge increment list update module feval to perform the evaluation. The evaluation is conducted, and a decision Di is output. The rules for updating the knowledge increment list can be expressed by the following formula: Formula 1-4 Where Vi+1 represents the new current knowledge list, used in the (i+1)th iteration; Vi represents the current knowledge list used in the i-th iteration. This represents candidate incremental knowledge; Di=True indicates that the decision result of the incremental evaluation unit after the i-th iteration is true, that is, the decision result indicates that the candidate incremental knowledge meets the update condition; otherwise indicates that the decision result of the incremental evaluation unit is another decision result that is not true. In other words, if Vi+1=Vi, it can be considered that an invalid update has occurred in this iteration.

[0107] The following examples illustrate the termination conditions of iterative loops and the principles of answer generation.

[0108] Aplan and local models can repeatedly execute the complete iterative process from parallel exploration and candidate question generation to current knowledge list evaluation and updating.

[0109] We can presuppose T = (i > Nmax) ∨ (F ≥ Fmax) ∨ (Tdone(Vi) = Cref) as the loop termination condition. This loop termination condition can be expressed as the iteration terminating if any of the following conditions are met.

[0110] First, it could be reaching the maximum number of iterations, where the iteration counter i exceeds the preset maximum number of loops Nmax. Second, it could be that the content generation device is in a state of stagnation, for example, the number of consecutive invalid updates F reaches the preset upper limit Fmax. Third, it could be achieving the planned goal, for example, the task set Tdone(Vi) that has been satisfied based on the current knowledge list Vi state is equivalent to being equal to the complete reference causal chain Cref.

[0111] Thus, the iterative loop terminates at step N, yielding the final knowledge increment list, i.e., the target knowledge list Vfinal=VN. Aplan can then use Vfinal and the original question statement Q0 to generate the final, concise, and accurate answer Ans=Aplan(Vfinal,Q0).

[0112] The training process of the incremental evaluation unit is described in detail below.

[0113] It can obtain a training sample set; the training sample set includes multiple sets of training data, which include the current training knowledge and its training knowledge increments carrying quality labels, and training question statements; Assign true labels to the training data; where the true label indicates whether the increment of training knowledge meets the update conditions in a real-world situation. Training input data is constructed using training data, and then fed into the incremental evaluation unit. The incremental evaluation unit is updated by combining the training judgment of the incremental evaluation unit with the error of the true label. The training input data includes at least one of the following: divergence value, information entropy, proportion of newly added concepts, word overlap, compression rate similarity, and word set overlap, based on the comparison between knowledge statement lexical units and incremental knowledge lexical units; knowledge statement lexical units represent the lexical sequence obtained by segmenting the current training knowledge; incremental knowledge lexical units represent the lexical sequence obtained by segmenting the incremental training knowledge.

[0114] The following is a simplified explanation of the incremental evaluation unit and its training principles.

[0115] The incremental evaluation unit M can be considered as authoritatively labeling the quality of knowledge increments using a large model to generate training data. Based on this data, a low-computational-consumption machine learning model is trained, such as Support Vector Machine (SVM), Logistic Regression, Lightweight Convolutional Neural Network (CNN), Transformer (a deep learning model), or other network models. This model learns the judgment logic for whether candidate knowledge increments meet the update conditions. During iterative inference, the trained incremental evaluation unit achieves quantitative evaluation and update decisions for knowledge increments, replacing the deterministic weighted calculations of global models and the expensive self-evaluation of large models, thus balancing evaluation accuracy and inference efficiency.

[0116] The incremental evaluation unit M is a machine learning model used in the reasoning stage to determine whether to accept the incremental knowledge update. Its input can be the feature vector X”, and its output is a binary decision Di∈{True,Reject} (i.e., accept or reject the update).

[0117] The prompt word template `Prompteval` is used to guide the large model in generating structured instructions for labeled text; the judgment criteria and output format of the large model must be clearly defined. The feature engineering function `Ffeat` is used to convert the raw input (Vi, ...) from the actual content generation process. The feature vector X is converted into an incremental evaluation unit M, which may include steps such as embedding vector fusion and quantized feature extraction.

[0118] During the training of the incremental evaluation unit M, a training dataset D can be constructed. The training dataset D is a labeled dataset used to train the incremental evaluation unit M.

[0119] The training dataset is formally represented as D={(X1,y1),(X2,y2),...,(Xp,yp)}, where Xo is the feature vector of the o-th sample, p is the number of samples in the training dataset, and yo∈{1,0} is the label (1 corresponds to "True", 0 corresponds to "Reject").

[0120] The training process is described below.

[0121] Evaluation models can be built based on large model annotations. The training phase can be executed only once before the content generation device is deployed (or incrementally when the domain knowledge is updated), and the kernel can use the large model to generate high-quality labels to train an incremental evaluation unit M adapted to domains such as BMC.

[0122] Training data acquisition and preprocessing can generate data samples by collecting R sets (R≥1000, to ensure model generalization) of sample triples (Vs, ...) from historical question-answering data in the BMC domain and during the process of simulating multi-hop problem solving. , Qx0), where: Vs is the current knowledge list at the s-th iteration step; Qx0 represents candidate incremental knowledge; Qx0 represents the original question statement for training (e.g., "How does the BMC read sensor data via the bus protocol?").

[0123] For embedding vector extraction, the text representation model E defined in the original scheme can be used to extract vectors from Vs and Vs respectively. Qx0 is vectorized to obtain the embedding vector eV=E(Text(Vs)). eQ=E(Q0); where E represents a vectorization operation, for example, its dimension can be d, such as d=768.

[0124] Generating auxiliary labels can be done using a large model for each sample triplet (Vs, (Qx0) generates a label y indicating whether to accept the update.

[0125] The training input data x is used to construct the model input. x can be composed of the information shown in Table 2 below, where the values ​​of each dimension can be normalized to the range of 0-1. ε is a given small error quantity, for example, its value can be 0.00001. T(V) is the token sequence after word segmentation of the knowledge list V. This is a set of unique tokens. This module can also use other machine learning, deep learning, and reinforcement learning models, and adopt other methods to obtain the model input x, such as concatenating knowledge embedding vectors, performing dot multiplication, addition, subtraction, and other operations.

[0126] Table 2 Training Input Data and Calculation Methods

[0127] The evaluation principle of the incremental evaluation unit is illustrated below with examples.

[0128] The global model can acquire prompt words, whose key information can include: constraints on the current scenario, limiting the knowledge domain of the question and answer; the current question may be a multi-hop question; instructions on how to decompose the question within the current knowledge domain; specific examples of cascading problem decomposition; and the user's current needs. This information helps in obtaining the cascading reference causal chains inferred by the global model.

[0129] Taking the question "How to obtain the temperature of the server's air intake" as an example, the reference causal chain formed by the global model is as follows: Step 1, determine the power control chip model; Step 2, determine the communication link from the BMC to the chip; Step 3, determine the protocol for sending control commands; Step 4, no data parsing logic; Step 5, confirm the power status feedback mechanism; Step 6, no other related logic.

[0130] The incremental evaluation unit can query hardware and topology information, compile a knowledge list based on the retrieved knowledge, and select effective knowledge that can solve the current problem from the retrieved knowledge.

[0131] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.

[0132] Please see Figure 5 , Figure 5 This is a schematic diagram of the structure of an embodiment of the electronic device of this application.

[0133] Embodiments of this application also provide an electronic device.

[0134] The electronic device may include a memory 31 and a processor 32, wherein the memory 31 stores a computer program and the processor 32 is configured to run the computer program to perform the steps in any of the above-described content generation method embodiments.

[0135] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of an embodiment of the computer-readable storage medium of this application.

[0136] Embodiments of this application also provide a computer-readable storage medium storing a computer program 41, wherein the computer program 41 is configured to execute the steps in any of the above-described content generation method embodiments at runtime.

[0137] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0138] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described content generation method embodiments.

[0139] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described content generation method embodiments.

[0140] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0141] The above describes a content generation method and electronic device provided by this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only intended to help understand the method and core ideas of this application. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of this application.

Claims

1. A content generation method, characterized in that, The content generation method includes: Obtain the question statement to be answered and analyze the keywords of the question statement; Obtain knowledge related to the keywords as an initial knowledge list; The keywords are used to analyze the cascading causal relationships of the question statements, so as to construct a static ordered task sequence as a reference causal chain; A set of sub-questions to be answered is generated based on the initial statement information, and knowledge related to the set of sub-questions is obtained as a target knowledge list; wherein, the initial statement information includes the question statement, the initial knowledge list, and the reference causal chain; Based on the target knowledge list and the question statement, generate the response content.

2. The content generation method according to claim 1, characterized in that, The analysis of the cascading causal relationships in the question statement using the keywords includes: Obtain the knowledge domain to which the question statement belongs as the target domain; Use the keywords present in the question statement as initial keywords; Analyze the derived keywords associated with the initial keyword within the target domain, and combine the initial keyword and the derived keywords to sort out the cascading causal relationship of the question statement.

3. The content generation method according to claim 2, characterized in that, The step of using keywords existing within the question statement as initial keywords includes: Since the target domain is electronic devices, the device components and / or device functions included in the question statement are analyzed as the initial keywords; The analysis of derived keywords within the target domain that are associated with the initial keywords includes: Hardware localization is performed on the initial keywords, and the physical devices and sensing components associated with the initial keywords are matched as the derived keywords; The process of combining the initial keywords and the derived keywords to analyze the cascading causal relationships of the question statements includes: Using the initial keyword and the physical devices within the derived keywords as target hardware, a communication mapping path for accessing the target hardware is obtained; wherein, the communication mapping path includes at least one of a communication interface and an addressing mode; Obtain the interaction configuration for interacting with the target hardware; wherein the interaction configuration includes at least one of interaction protocol instructions and interaction register configuration; Obtain data parsing logic; wherein, the data parsing logic includes the data parsing method and the data transformation method; Determine whether the question statement contains control logic; wherein the control logic includes at least one of control feedback, exception handling logic, component collaboration logic, and timing requirement logic; In response to the presence of the control logic in the question statement, a cascading causal relationship is formed by combining the communication mapping path, the interaction configuration, the parsing logic, and the control logic; in response to the absence of the control logic in the question statement, a cascading causal relationship is formed by combining the communication mapping path, the interaction configuration, and the parsing logic.

4. The content generation method according to claim 1, characterized in that, The step of using the keywords to analyze the cascading causal relationships of the question statements to construct a statically ordered task sequence as a reference causal chain includes: Obtain the causal chain model; send a causal chain request to the causal chain model to obtain a reference causal chain in response to the causal chain model; wherein, the causal chain request includes the question statement, the knowledge domain of the question statement, a prompt message indicating that the question statement is a multi-hop question, a reference consideration dimension, an explanation of the reference consideration dimension, an example statement and its example causal chain; the reference consideration dimension includes at least one of communication mapping path, interaction configuration, parsing logic, and control logic; and / or, The question statement is parsed to obtain the key technical objectives of the question statement; a reverse question is asked based on the key technical objectives, guided by prompts associated with the keywords, to construct the technical dependency chain of the key technical objectives, thereby forming the reference causal chain.

5. The content generation method according to claim 1, characterized in that, The set of sub-questions to be answered, generated based on the initial statement information, includes: The initial statement information is used as the current iteration information, and the initial knowledge list is used as the current knowledge list; Analyze the current iteration information to iteratively generate the current subproblem set; Retrieve knowledge related to the current sub-problem set and update it to the current knowledge list to form a new current knowledge list; The problem statement, the new current knowledge list, and the reference causal chain are used as new current iteration information to iteratively generate a new current sub-problem set and a new current knowledge list until the iteration is completed and the sub-problem set is obtained.

6. The content generation method according to claim 5, characterized in that, The analysis of the current iteration information to iteratively generate the current sub-problem set includes: Obtain the sub-problems generated in the current iteration using the current iteration information from the local model, and write them into the current sub-problem set; wherein, the local model includes at least one of a hardware entity side model, a communication protocol side model, and a data parsing side model; use the current iteration information to evaluate the criticality of the sub-problems in the current sub-problem set, and remove sub-problems in the current sub-problem set whose criticality does not meet the preset critical requirements; and / or, The process of retrieving knowledge related to the current sub-problem set and updating the current knowledge list includes: Obtain the knowledge domain to which the question statement belongs as the target domain; obtain the target retrieval area of ​​the target domain knowledge base; wherein, the target retrieval area represents the knowledge in the target domain knowledge base that is not written into the current knowledge list; retrieve knowledge related to the current sub-question from the target retrieval area, and update the current knowledge list with the retrieved knowledge.

7. The content generation method according to claim 6, characterized in that, The retrieval of knowledge related to the current sub-question from the target retrieval region includes: Retrieve knowledge within the target retrieval region that is associated with the current sub-question as candidate incremental knowledge; Evaluate whether the candidate incremental knowledge overlaps with the current knowledge list; If the candidate incremental knowledge overlaps with the current knowledge list, invalid knowledge updates are determined and the current knowledge list is not updated; if the candidate incremental knowledge does not overlap with the current knowledge list, the candidate incremental knowledge is determined to be the retrieved knowledge.

8. The content generation method according to claim 7, characterized in that, The evaluation of whether the candidate incremental knowledge overlaps with the current knowledge list includes: The current knowledge list and the candidate incremental knowledge are input into a pre-trained incremental evaluation unit, which then evaluates whether the candidate incremental knowledge meets the update conditions. Obtain the determination result of the incremental evaluation unit; In response to the determination result indicating that the candidate incremental knowledge meets the update condition, it is determined that the candidate incremental knowledge and the current knowledge list do not overlap; in response to the determination result indicating that the candidate incremental knowledge does not meet the update condition, it is determined that the candidate incremental knowledge and the current knowledge list overlap.

9. The content generation method according to claim 1, characterized in that, Before acquiring knowledge related to the keywords as an initial knowledge list, the following steps are included: Obtain the knowledge source files of the target domain; wherein, the target domain refers to the knowledge domain to which the question statement belongs; The knowledge source file is converted to a different format to obtain an intermediate file for parsing. Extract the content titles from the intermediate file, and divide the intermediate file into multiple logical content blocks based on the content titles; The content title path of the logical content block is encoded into a semantic path; wherein, the semantic path is used to preserve the logical position of the content title within the knowledge source file; The text content of the logical content block is mapped to form a feature vector, and a knowledge identifier is assigned to it; An index set composed of knowledge elements is constructed as a target domain knowledge base; wherein, the knowledge element includes the knowledge identifier, the feature vector, and the semantic path; When retrieving knowledge within the target domain knowledge base, the knowledge elements are used for knowledge retrieval.

10. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the content generation method as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Innovation and entrepreneurship coaching question and answer matching method and system based on semantic understanding

    CN120256590A

  • Knowledge graph-based content generation and optimization method and device, equipment and medium

    CN120579627A

  • Intelligent reply method, intelligent reply device, electronic equipment and storage medium

    CN120763300A

  • Civil administration service question and answer method based on large model and knowledge graph retrieval enhancement

    CN120780798A

  • System and method for generating sales script on basis of causal large model, and electronic device

    WO2025146229A2

Cited By

  • Page comparison detection method and computer program product

    CN121301975A