Information processing method and electronic device
Patent Information
- Application Number
- CN202610605656.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-30
- Publication Date
- 2026-08-18
AI Technical Summary
[0003]然而,目前这种基于知识图谱的信息处理方法,很容易导致模型产生幻觉、生成与事实不符的内容,或给出答非所问的答复,从而严重影响了答复信息的准确性和可靠性
Smart Images

Figure CN122594498A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to an information processing method and an electronic device. Background Technology
[0002] Currently, knowledge graph-based question-answering systems have become an important research direction in the field of artificial intelligence. They typically begin by retrieving entities from the knowledge graph that are relevant to the user's input, obtaining the associated knowledge fragments, and then directly feeding these knowledge fragments along with the user's input into an AI model. The AI model then performs reasoning and generates a response, which is fed back to the user.
[0003] However, current knowledge graph-based information processing methods are prone to causing models to generate illusions, produce content that does not conform to the facts, or provide irrelevant answers, thus seriously affecting the accuracy and reliability of the response information. Summary of the Invention
[0004] In view of the above problems, this application provides the following solution:
[0005] The first aspect of this application provides a method for obtaining input information;
[0006] At least one entity corresponding to the input information is determined based on a knowledge graph; wherein each entity is associated with a knowledge fragment;
[0007] The input information and the knowledge fragment are sent to the first model, and the first model outputs a judgment result, which is used to characterize whether the knowledge fragment satisfies the requirement to respond to the input information.
[0008] If the judgment result indicates that the knowledge fragment supports the response, a response message is generated based on the knowledge fragment for the input information.
[0009] One possible implementation also includes:
[0010] If the judgment result is that the knowledge fragment does not support a response, path exploration of the knowledge graph is triggered to update the path information of each entity in the at least one entity;
[0011] The path information is used by the first model to re-determine whether a response is required for the input information.
[0012] In one possible implementation, each path information includes multiple entities, each of which, except for the first entity among the multiple entities, is determined and output by a second model.
[0013] In one possible implementation, triggering path exploration of the knowledge graph to update the path information of each entity in the at least one entity includes:
[0014] Identify the exploration nodes for the knowledge graph;
[0015] Obtain entity description information for each of the multiple neighboring neighbor nodes adjacent to the explored node;
[0016] The entity description information of each of the multiple neighboring nodes is sent to the second model, and the second model determines the target entity that constitutes the path information from the multiple neighboring nodes.
[0017] In one possible implementation, during the path exploration process, each of the neighboring nodes of the current exploration node is scored to determine the target entity, the scoring including at least one of the following implementations:
[0018] The similarity between the entity description information corresponding to the neighbor node and the input information;
[0019] The relation weights associated with the neighbor nodes in the knowledge graph;
[0020] The logical relationship between the neighbor node information and the corresponding input information of the exploration node.
[0021] In one possible implementation, the knowledge fragments associated with each of the multiple entities included in each path information are sent to a first model, which outputs a judgment result to characterize whether the knowledge fragments meet the requirements for responding to the input information.
[0022] In one possible implementation, before determining at least one entity corresponding to the input information based on the knowledge graph, the method further includes:
[0023] The input information is sent to the third model;
[0024] Multiple problem descriptions are obtained for the input information, and the multiple problem descriptions are decomposed and output by the third model for the input information;
[0025] The step of determining at least one entity corresponding to the input information based on a knowledge graph includes:
[0026] The input information and the keyword set of the multiple question descriptions are determined, and the keyword set is used to match the knowledge graph to determine the candidate entity set.
[0027] In one possible implementation, determining at least one entity corresponding to the input information based on the knowledge graph further includes:
[0028] Send the determined set of candidate entities to the fourth model;
[0029] Obtain the selected target entity set, which is determined by the fourth model based on the relevance between the candidate entity set and the keyword set;
[0030] The selection of the target entity set is based on the relevance score ranking, and a predetermined number of entities are selected as the target entity set.
[0031] In one possible implementation, the number of iterations that trigger path exploration of the knowledge graph to update the path information of each entity in the at least one entity does not exceed a threshold.
[0032] If the determination result indicates that the path information does not support a response and the number of iterations reaches the threshold, a new problem description or indication information based on the knowledge fragments and representations corresponding to the entity is generated and given to the fifth model.
[0033] A second aspect of this application provides an electronic device, the electronic device comprising:
[0034] At least one memory, and a computer program stored in the memory;
[0035] At least one processor running the computer program performs the following steps:
[0036] Obtain input information;
[0037] At least one entity corresponding to the input information is determined based on a knowledge graph; wherein each entity is associated with a knowledge fragment;
[0038] The input information and the knowledge fragment are sent to the first model, and the first model outputs a judgment result, which is used to characterize whether the knowledge fragment satisfies the requirement to respond to the input information.
[0039] If the judgment result indicates that the knowledge fragment supports the response, a response message is generated based on the knowledge fragment for the input information. Attached Figure Description
[0040] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.
[0041] Figure 1 This is a flowchart illustrating the information processing method proposed in Embodiment 1 of this application;
[0042] Figure 2 This is a flowchart illustrating the information processing method proposed in Embodiment 2 of this application;
[0043] Figure 3 This is a flowchart illustrating the information processing method proposed in Embodiment 3 of this application;
[0044] Figure 4 This is a flowchart illustrating the information processing method proposed in Embodiment 4 of this application;
[0045] Figure 5 This is a schematic diagram of the structure of the information processing device proposed in the embodiments of this application;
[0046] Figure 6 This is a schematic diagram of the hardware structure of the electronic device proposed in the embodiments of this application. Detailed Implementation
[0047] The embodiments of this application are described below with reference to the accompanying drawings. The terminology used in the implementation section of this application is only for explaining specific embodiments and is not intended to limit the application. The embodiments of this application are described below with reference to the accompanying drawings. It will be understood by those skilled in the art that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0048] The terms "first," "second," etc., used in the context of this application and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of units is not necessarily limited to those units, but may include other units not explicitly listed or inherent to those processes, methods, products, or apparatuses.
[0049] It is understood that before using the technical solutions disclosed in the embodiments of this application, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this application in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained. For example, in response to receiving a user's active request, a pop-up window may be used, and a textual prompt message may be presented in the pop-up window to clearly inform the user that the requested operation will require the acquisition and use of the user's personal information. The user can choose whether to provide personal information to the electronic device, application, server, or storage medium or other software or hardware that performs the operation of the technical solution of this application based on the prompt message. This application does not limit the prompt message and the method of user authorization implementation. The data involved in this technical solution (including but not limited to the data itself, the acquisition or use of data) shall comply with the requirements of relevant laws and regulations and related provisions.
[0050] Furthermore, the models involved in this application (such as the first model, second model, third model, fourth model, or fifth model, etc.) can be general AI (Artificial Intelligence) models. These AI models can employ, but are not limited to, Transformer or its architectural variants (such as using only encoder-only / decoder-only, encoder-decoder, or MoE (Mixture of Experts, a neural network architecture), etc.) or other basic architectures. They learn the features and patterns of natural language by training on large amounts of diverse data, thereby enabling them to understand and generate natural language. They typically have hundreds of millions to trillions of model parameters (model parameters are variables that control the behavior of the target model) and are capable of capturing complex relationships and patterns in natural language.
[0051] The AI models can include, but are not limited to, generative models and generative language models (GLMs). For example, one or more of the following: large language model (LLM), GPT (Generative Pre-trained Transformer) series models, T5 (Text to Text Transfer Transformer) model, BERT (Bidirectional Encoder Representation from Transformers) series models, large visual models, and multimodal large models.
[0052] Depending on actual needs, the models involved in this application's embodiments can also be expert large models fine-tuned from general AI models based on actual business requirements. For example, they can be proprietary models (such as domain models) trained on sample datasets from general AI models (pre-trained models) within specific scenarios (such as professional scenarios in vertical fields like healthcare, finance, law, biology, or remote sensing, or general scenarios). The models involved in this application can also be lightweight models compressed from general AI models or expert large models through lightweight methods such as quantization, knowledge distillation, or pruning, to better meet the needs of edge deployments with limited computing resources and improve data security. Depending on actual needs, they can also be models expressed using certain rules or functions. This application does not limit the type of model involved in the context and can flexibly determine it according to actual business requirements.
[0053] Reference Figure 1 This is a flowchart illustrating the information processing method proposed in Embodiment 1 of this application. The method proposed in this application can be applied to electronic devices, which can be device nodes in systems such as servers or cloud platforms, or terminal devices such as smartphones, laptops, smart wearable devices, smart home devices, robots, or vehicle terminals. This application does not limit the product type of the electronic device. The method proposed in this application can be implemented through a program with question-and-answer functionality running on the terminal device or cloud services provided by the device node. This application does not limit the application scenarios or system architecture of the information processing method; it can be determined as appropriate.
[0054] In some embodiments, the electronic device can run an intelligent program, which can then execute computer programs via a processor to implement the information processing method proposed in this application. This intelligent program can be embedded in the computer device's operating system or application programs as part of those programs, but is not limited to this deployment relationship, to implement the method proposed in this application. The intelligent program can be an intelligent agent or other program capable of providing intelligent functions in a conversational manner, autonomously perceiving the environment, analyzing data based on powerful model capabilities, and performing tasks to provide users with a natural and intelligent conversational interactive experience. It can also be an artificial intelligence assistant embedded in the operating system, which can be activated and launched through voice or specific operations to implement the method provided in this application; however, this application does not limit its scope in this regard.
[0055] In one possible implementation, the aforementioned intelligent program may have the ability to invoke various models (such as the models mentioned in the context of this application), such as through interface calls or other interactive methods. Different models can be invoked through corresponding different interfaces. Optionally, the aforementioned intelligent program may also have one or more models, meaning that the model is part of the intelligent program. During the execution of the intelligent program by the processor, the intelligent program can launch one or more models to handle corresponding tasks according to actual needs, thereby implementing the information processing method proposed in this application. This application does not impose any limitations on this aspect.
[0056] Based on the above analysis, such as Figure 1 As shown, the information processing method proposed in this application embodiment may include:
[0057] Step S11: Obtain input information;
[0058] In this application embodiment, the input information may be a question that needs to be answered, a query request, an instruction / operation command, a task, or other forms of natural language expression, and may also include other types of information that meet the user's intent. It may be uploaded to the system by the user, or the electronic device may read / download relevant information from a designated device based on natural language expression, etc. This application does not limit the source and content of the input information, and it may be one or more combinations of text information, image information, video information, or audio information to constitute the input information that needs to be answered.
[0059] For input information of different data formats / types, users can perform input operations using one or more compatible input components that have an electronic device or a communication connection. The electronic device or the terminal device where the input component is located responds to the input operation and sends the input information to the electronic device. The input component may include, but is not limited to, one or more of the following: an audio collector, a touch screen, a finger, a stylus, a mouse and keyboard, or a joystick, depending on the situation.
[0060] Therefore, the methods for obtaining input information can include receiving natural language input from the user in the form of speech or text through any input interface or state of an electronic device (which can be a terminal device). This input interface can be an input box displayed by the activated intelligent agent, or it can be an application interface of interactive software or a web page. In this state, the user can send input information through an API (Application Programming Interface), such as the intelligent agent obtaining speech input information collected by the speech collector through an API interface for the speech collector; there are no restrictions on this.
[0061] In one possible implementation, if the electronic device is a cloud device (such as a cloud server), the terminal device can send the input information obtained according to the method described above to the cloud device via a network, such as to an agent or other intelligent program deployed in the cloud, so as to control the execution of the method proposed in this application through interaction with the agent or model. This application does not limit the implementation method of step S11.
[0062] Step S12: Determine at least one entity corresponding to the input information based on the knowledge graph; wherein each entity is associated with a knowledge fragment;
[0063] A knowledge graph is a structured form of knowledge representation, which can be composed of triples of entity nodes-relationships-entity nodes. It stores structured domain knowledge, and each entity node is associated with at least one knowledge fragment, such as text or data, which describes the attribute information, function, or factual declarative information units directly related to the entity node. For example, for the entity node "aspirin," its associated knowledge fragments may include textual descriptions of its pharmacological effects, indications, contraindications, etc. This application does not restrict the storage format of each entity node and its associated knowledge fragments in the knowledge graph.
[0064] Based on this, the obtained input information can be processed, such as through entity recognition, semantic matching, or retrieval-augmented generation (RAG), to find at least one entity corresponding to the input information in a pre-built knowledge graph. This application does not limit the entity search method. Subsequently, a knowledge fragment associated with each found entity can be determined. This knowledge fragment may include structured or unstructured information such as entity description, attribute information, descriptions of relationships directly connected to the entity, or text paragraphs corresponding to the entity.
[0065] For example, given the input information "major side effects of a certain drug," the entity "a certain drug" can be identified in a knowledge graph in the pharmaceutical field. The associated knowledge fragments can include side effect descriptions from the drug's instructions, adverse reaction records from clinical research reports, etc. Similarly, given the input information "major risk factors of a certain stock," the entity "a certain stock" can be identified in a knowledge graph in the financial field. The associated knowledge fragments can include risk warnings in the company's financial reports, risk analyses in brokerage research reports, and violation records in regulatory announcements, etc.
[0066] Step S13: Send the input information and knowledge fragment to the first model, and the first model outputs a judgment result. The judgment result is used to characterize whether the knowledge fragment satisfies the requirement to respond to the input information.
[0067] In this embodiment, after finding at least one entity corresponding to the input information based on the knowledge graph, the knowledge fragments associated with each entity and the input information can be sent together to the first model (such as a large language model). Before the first model generates the response information to the input information, the first model first performs a lightweight judgment task: evaluating whether the multiple knowledge fragments provided are sufficient in content and logic to support a full and accurate response to the input information, or whether they are suitable for answering the questions raised by the input information, and outputting a judgment result. The judgment result can be a binary classification, such as supporting or not supporting the response, or it can be a confidence score or a rating label, etc. This application does not limit the generation process and content form of the judgment result.
[0068] Therefore, compared to the traditional RAG approach used in current knowledge graph-based question answering systems, where the knowledge fragments associated with an entity are directly fed into the generative model without any selection after the entity is found in the knowledge graph, and the generative model directly completes the response reasoning in one go, this approach requires the generative model to directly assemble a response even when given knowledge fragments that may contain weakly related, partially related, or contradictory information. This can lead to illusion problems or incorrect reasoning based on partial information. To address this, this application proposes a pre-assessment of the quality of the retrieved knowledge fragments. By introducing an independent judgment task, the first model first judges whether the knowledge fragment meets the response conditions, rather than rushing to generate the final response information. This reduces the risk of incorrect response generation due to poor input information quality from the source, and helps improve the accuracy and reliability of the final response.
[0069] It is understood that the steps in this application do not utilize the generative capabilities of the first model or other generative models. Instead, they invoke the deep semantic understanding and logical reasoning capabilities of the first model. By using specific judgment prompts, the first model is guided to execute the aforementioned judgment task after receiving knowledge fragments and input information, and output a judgment result. For example, the judgment prompts could be designed as: Please judge whether the following provided knowledge fragments are sufficient to support the response to the input information. The response can be simply 'Support the response / Yes' or 'Do not support (are insufficient to support) the response / No', or a more granular confidence score, etc. This application does not limit the template content for the judgment prompt design.
[0070] Furthermore, the judgment result output by the first model technically represents whether the knowledge fragment supplied to the first model meets the minimum requirements for supporting the generation of an accurate and complete answer in terms of information content, relevance, and logical completeness. Therefore, the prompt word template for implementing the judgment task may include the judgment criteria for whether the knowledge fragment can meet the requirements for responding to the input information, as well as the output rules for the judgment result. It may also include constraints on the content and format of the judgment result output by the first model. This application does not limit the implementation method of the above-mentioned judgment task performed by the first model.
[0071] For example, during the judgment task performed on the acquired entity-related knowledge fragments, the first model can, according to the judgment prompt word template / prompt words described therein, complete the judgment process of whether the input knowledge fragment satisfies the requirement to respond to the input information, and constrain the output judgment result. The judgment prompt word template, or the prompt words generated based on it and the entity-related knowledge fragments to guide the first model to perform the judgment task and output the judgment result, may include:
[0072] QA_RELATIVE_PROMPT = """
[0073] #Role Definition:
[0074] You are a professional reading comprehension expert. Your sole task is to determine whether the provided knowledge fragments can answer the user's questions.
[0075] # Judgment criteria:
[0076] 1. Knowledge fragments must **directly or indirectly contain** the information needed to answer the user's question.
[0077] 2. If the content of the knowledge fragment is clearly irrelevant to the user's question and can be answered by general abilities, it is considered unanswerable.
[0078] 3. If the content of the knowledge fragment is related to the user's question, it is considered that it can be answered.
[0079] # Output rules:
[0080] 1. If the knowledge fragment can fully answer the user's question, then only the words "able to answer" need to be output, without outputting the specific answer information.
[0081] 2. If the knowledge fragment is partially relevant but the information is incomplete, simply output the words "partial reply" without providing the specific reply information.
[0082] 3. If the knowledge fragment is completely irrelevant, output "Unable to reply" and provide the specific reason.
[0083] # Strict restrictions:
[0084] 1. The model only outputs responses that can be answered, partially answered, or cannot be answered, and the output word count is limited to 5 characters.
[0085] 2. Guessing, inference, or using external knowledge is prohibited.
[0086] 3. It is prohibited to expand or supplement the knowledge fragment with content not explicitly mentioned.
[0087] """
[0088] Therefore, in the above example of prompt words, the model's role and task are clearly defined, and this definition is implemented through prompt word engineering, focusing the open-domain capabilities of the first model on the specific judgment task required by this application. When evaluating the information relevance between knowledge fragments and user questions (input information), it is clear that the knowledge fragments must "directly or indirectly contain" the information required to answer. Based on this, a gradient design is implemented for the judgment results, such as a three-level gradient of "able to answer" (i.e., supports an answer), "partially answer" (insufficient to support an answer), and "unable to answer" (does not support an answer). This gradient design provides clear signal basis for different subsequent branch processing flows (such as direct generation, triggering path exploration, termination and feedback). For example, "unable to answer" can directly trigger a deep search to obtain a new starting point; "partially answer" may trigger a targeted path exploration for missing information. It should be understood that, depending on the changes in the application scenario, the granularity of the gradient division in the output rules is not limited to this three-level gradient and can be flexibly adjusted as needed. This application only uses this as an example for illustration.
[0089] Furthermore, the prompts impose strict constraints on the format and content of the judgment results output by the first model. This ensures that the system's program logic can stably and unambiguously parse the model's output and translate it into control flow instructions. It also ensures that the first model acts only as an "evaluator / discriminator" in this step, rather than a "generator." This prevents the first model from fabricating (illusions) when information is insufficient, guarantees the objectivity of the judgment results, and clearly separates the responsibilities of the two tasks: "information sufficiency judgment" and "response information generation."
[0090] Therefore, by referencing specific prompt word designs similar to the examples above, this application can clearly demonstrate how to guide the first model to complete a precise and controllable judgment and classification task through instruction fine-tuning, thereby transforming the complex semantic understanding capability of the first model into reliable and programmable control logic that drives the intelligent retrieval and question-answering process of this application.
[0091] Step S14: If the judgment result is that the knowledge fragment supports the response, generate response information for the input information based on the knowledge fragment.
[0092] Following the above analysis, only when the first model outputs a positive conclusion, such as a confidence level higher than a preset threshold, or "yes" / "supports the answer," will the first model be triggered to utilize its generative capabilities or trigger other generative models to perform a generative task: generating response information based on knowledge fragments for the input information. If the conclusion is negative, such as a confidence level lower than a preset threshold, or "no" / "does not support (is insufficient to support) the answer," the process can be terminated directly with feedback indicating insufficient information, indicating that no suitable knowledge basis was found. Alternatively, a knowledge graph-based retrieval task can be triggered to obtain more knowledge fragments supporting the answer.
[0093] Optionally, in the technical implementation of step S14, the judged knowledge fragments and input information can be reorganized to construct new prompt words (which can be called response prompt words for distinction). These new prompt words are then input into the first model or other generative models. These validated (determined to support the response) knowledge fragments are then combined to form a response message in natural language. It is evident that the design of the response prompt words ensures that the knowledge fragments used in the generation task have undergone quality assessment and can filter out unqualified knowledge fragments (noise). This reduces the risk of the model generating illusions or making incorrect inferences due to input noise, thereby improving the reliability and accuracy of the final output response message.
[0094] It should be understood that the entity that organizes verified knowledge fragments into accurate and coherent response information can also be the generation logic running by the processor. This logic represents the rules for generating such response information, such as the rules for combining knowledge fragments. Step S14 can be implemented directly without using a model. For example, the verified knowledge fragments can be used as the content of the response information itself, and the knowledge fragments can be directly combined to obtain the response information. Optionally, this application can also utilize the generation capabilities of the first model or other generation models, combined with input information, to perform logical reasoning on the retrieved knowledge fragments to generate response information. This application does not limit the method for generating response information in step S14.
[0095] In summary, this application's embodiments, after determining the entities corresponding to the input information based on the knowledge graph and obtaining the knowledge fragments associated with each entity, add a first model step to determine whether the knowledge fragments meet the task of responding to the input information before triggering the generation of response information based on the knowledge fragments. This achieves quality assessment of the retrieval results. Only when the first model outputs a judgment result indicating that the knowledge fragment supports the response will the subsequent response information generation stage begin. Knowledge fragments judged to be insufficient to support the response will not enter the response generation stage. This changes the traditional two-stage linear processing flow of retrieval and generation in knowledge graph-based question-answering systems, avoiding interference from irrelevant or insufficient knowledge fragments in the response generation process. This reduces model illusions and erroneous responses, ensuring that the response information obtained by the user is more accurate and reliable, reducing irrelevant answers or misleading situations caused by knowledge fragment mismatch, and improving the user experience.
[0096] Furthermore, compared to traditional question-answering systems, which directly input all knowledge fragments, regardless of their suitability, into the generative model for reasoning and response generation, resulting in unnecessary computational resource consumption, this application uses a pre-judgment task to filter out inappropriate knowledge fragments, sending only valid knowledge fragments into the generation stage. This reduces the computational burden on the subsequent generative model and improves the efficiency of knowledge utilization.
[0097] Furthermore, by logically separating the judgment and generation tasks, this application makes the entire information processing decision-making process more modular and transparent. This allows developers to specifically optimize prompts or the first model for the judgment task, enabling them to focus more on evaluating the quality of knowledge fragments and their relevance to the input information, thus improving the accuracy of the judgment results. Simultaneously, since the generation task is only executed after a successful judgment, the credibility of the final response information is enhanced because it is based on the judged knowledge fragments, making the behavior of the entire system more predictable. Moreover, based on the judgment results, it is clear which knowledge fragments are used to generate response information and which are discarded, facilitating subsequent optimization of the knowledge graph's quality and providing a basis for tracing the source of response results, thereby enhancing the interpretability and controllability of the entire information processing process.
[0098] Reference Figure 2 This is a flowchart illustrating the information processing method proposed in Embodiment 2 of this application. This embodiment describes the branching process when the judgment result output by the first model is that the knowledge fragment does not support a response, such as... Figure 2 As shown, the branching process may include:
[0099] Step S21: If the first judgment result output by the first model is that the response is not supported, the path exploration of the knowledge graph is triggered to update the path information of each entity corresponding to the input information.
[0100] In this embodiment, the first judgment result is the judgment result output by the first model based on the input information and knowledge fragment in the first embodiment above. It indicates that the knowledge fragment does not meet the requirement of responding to the input information, that is, the knowledge fragment retrieved this time is insufficient to support the response. At this time, the response information is not directly generated based on the knowledge fragment, but the path exploration operation of the knowledge graph is triggered to utilize the structured characteristics of the knowledge graph to quickly and accurately explore the path information that can support the response to the input information.
[0101] Path exploration refers to traversing the knowledge graph from a given entity (such as each of the at least one entity determined in step S12) along the edges of relationships between entities to discover other entities associated with that entity and their relationship paths. Through path exploration, information on multi-hop relationship paths between entities can be obtained, i.e., richer and deeper path information associated with that entity. For example, an exploration path (relationship chain) could be "a stock (entity) → disclosure (relationship) → debt-to-equity ratio (entity) → leading to (relationship) → debt repayment risk (entity)". The path information obtained from path exploration is updated in the path information of the corresponding entities (which refers to the path information composed of the entities corresponding to the input information and their associated knowledge fragments determined in step S12; each entity determined here can be the starting point of a path), forming expanded path information used to perform the judgment task.
[0102] In some embodiments, during the update process of the aforementioned path information, the second model can, based on the path context, use the path information discovered in this exploration to merge or replace the knowledge fragments associated with each entity initially determined in step S12. This replacement operation can be achieved by the second model reasoning and analyzing the contradiction between the newly discovered knowledge fragments associated with the entity and the previously determined knowledge fragments. Based on the input information or its corresponding exploration goal / intent, the model can analyze and determine that the knowledge fragments associated with the newly discovered entity are correct. To avoid interference from incorrect knowledge fragments determined in this analysis on response generation, the extended correct knowledge fragments can be directly used to replace the determined incorrect knowledge fragments, ensuring that the updated path information for each entity is comprehensive and correct (for the first model or other analysis models), laying a reliable information foundation for subsequent response generation.
[0103] Therefore, the path information involved in this application may include the knowledge fragments determined in step S12, as well as the knowledge fragments associated with the extended entities in this exploration. As needed, it may also include the entity information (such as attribute information, entity semantic description, etc.) of the entities determined in step S12 and the newly added entities in this exploration, as well as the structured information such as the association between the entities. This application does not limit the content of the path information.
[0104] Step S22: Send the input information and path information to the first model, and the first model outputs a second judgment result; the second judgment result is used to characterize whether the path information satisfies the requirement to respond to the input information.
[0105] After completing a path exploration operation on the knowledge graph, the path information of the previously retrieved entity is updated with the entity found in this exploration, the knowledge fragment associated with the entity, and the relationship between the entity and the previously retrieved entity (such as the entity determined in step S12). After obtaining path information with richer knowledge context, a judgment task can be performed on it first. Combining the relevant content description in step S13 above, the updated and more comprehensive path information can be input into the first model again. The first model performs a new round of judgment on "whether it satisfies the requirement to respond to the input information" based on the input information it remembers, and outputs a second judgment result to represent whether the updated path information satisfies the requirement to respond to the input information.
[0106] The execution process of judging the updated path information is similar to the implementation process of the first model outputting the judgment result (i.e., the first judgment result) in step S13 above, and will not be described in detail here. It is understood that in step S22, the updated path information can also be sent to the first model to output the second judgment result, or the knowledge fragments (extended knowledge fragments) associated with the entities explored this time can be sent to the first model to perform the judgment task, or the knowledge fragments associated with each of the explored entities and the input information (if the first model has already memorized them, the input information does not need to be provided) can be sent to the first model to perform the judgment task, etc. This application will not describe in detail the implementation process of judging whether the updated path information is sufficient to support the response to the input information.
[0107] Step S23: If the second judgment result is that the path information supports the response, generate response information for the input information based on the path information.
[0108] Following the above analysis, if the second judgment result output by the first model supports the response, the response information can be generated based on the updated path information, referring to the generation task described in step S14. This can be achieved by directly generating the response information from the first model, or by sending the updated path information and input information to other generation models for inference to generate the response information. Alternatively, this application can directly organize all the explored knowledge fragments supporting the response to form response information, etc. The implementation process will not be detailed in this application.
[0109] If the second judgment result is that the path information does not support (is insufficient to support) the response, a deeper level of path exploration can be triggered until the exploration termination condition is met; or the processing can be terminated directly and a prompt message indicating that no suitable knowledge fragment has been recalled can be returned to guide the user to supplement new input information, or a new question description (new input information) can be generated based on the prompt message, etc., without any restrictions.
[0110] Specifically, the path information for each initially determined entity (i.e., after determining at least one entity in step S12) constitutes the path information (initial path information) for that entity, along with its associated knowledge fragments. This path information includes one entity, which serves as the starting point for subsequent path exploration of the knowledge graph. When the first judgment result indicates that a response is not supported and in-depth path exploration of the knowledge graph is required, entity traversal can be performed using each determined entity as a starting point, as described above. If step S12 determines multiple entities, this indicates that there are multiple starting points (i.e., these multiple entities). In this case, parallel path exploration can be performed on these multiple starting points to obtain multiple paths starting from each of these multiple entities and their corresponding path information.
[0111] In summary, compared to GraphRAG's method of directly generating a response after a single path expansion, this application's embodiment, when the initially determined knowledge fragments related to entities are insufficient to support the response input information, does not simply abandon the response or prompt the user to supplement the input information or generate a response. Instead, it actively explores paths within the knowledge graph, uncovering indirect relationships with the initially determined entities, thereby obtaining deeper knowledge context and reasoning basis. This effectively and accurately expands the knowledge fragments usable for the response, thus improving the depth and breadth of knowledge utilization. Furthermore, this application re-evaluates whether the path information is sufficient to support the response after each exploration; the generation task is only executed if the judgment result indicates that the response is supported. Therefore, this application fundamentally improves the relationship between retrieval and generation in traditional methods (direct pipeline), forming a closed-loop feedback system of initial determination, judgment, path exploration, and re-judgment, possessing self-evaluation and self-improvement capabilities.
[0112] In this process, the path exploration of the knowledge graph starts with the initial entity (the entity determined in step S12) and expands purposefully along the relationships within the knowledge graph, acquiring mostly semantically related and logically causal or conditionally dependent deep information. Compared to the initial isolated knowledge fragments, this updated path information has a more complete context and richer logical chains. Therefore, reusing the updated path information allows the first model to determine whether the information is sufficient to support the response based on higher-quality information. Only after the judgment is passed is the response information generated. This effectively avoids the illusions, information omissions, or logical errors caused by the traditional method of "forcibly generating response information when the information is insufficient to support it," thus improving the reliability and accuracy of the response information.
[0113] Moreover, due to the inherent technical costs of path exploration, it is more efficient overall than generating an incorrect answer and then manually correcting or re-querying. More importantly, the embodiments of this application can gradually approach sufficient information through re-judgment, avoiding multiple meaningless generation attempts. In addition, since the computational load required by the first model to perform the judgment task is usually much smaller than the computational load required to generate complete response information (judgment only needs to output a simple classification or score), this hierarchical processing structure of first making a lightweight judgment, then exploring paths when insufficient, and finally generating a response, optimizes the allocation of computing resources and improves overall efficiency while ensuring the quality of the response.
[0114] Therefore, the information processing method proposed in this application can support adaptive deep reasoning in complex question-and-answer scenarios. For example, in complex multi-question-and-answer scenarios, answers often need to cross multiple layers of entities and relationships to be obtained. The entities and their associated knowledge fragments initially determined in step S12 are usually shallow information, which is difficult to support multi-hop reasoning. This embodiment can automatically extend to the depth of the knowledge graph by exploring the path of the knowledge graph, capturing the deep association between the initial entity and other answer entities, and obtaining path information that can more accurately and comprehensively answer the input information.
[0115] For example, when a user inputs the question "Is it worthwhile to invest in a company with a high debt ratio?", the entities initially identified in step S12 might be two isolated nodes: "debt-to-equity ratio" and "the company." The first model determines that the associated knowledge fragments are insufficient to support an answer to the question. This triggers path exploration in step S22, which involves tracing the edge from "debt-to-equity ratio" along the edge from "cause" to "debt repayment pressure" in the knowledge graph, and then reaching the node (entity) of "default risk." This obtains a complete reasoning path, updates the path information of the corresponding initial entities, and ensures that the updated path information includes this reasoning path. When the first model re-evaluates, it can identify potential risks, thus providing a more accurate recommendation when finally generating the response.
[0116] It should be understood that for simple questions, a single judgment may suffice, and the method described in Implementation Example 1 can quickly generate response information. For complex questions, the method described in this Implementation Example is used for path exploration, which optimizes the balance between exploration efficiency and response quality to avoid over-searching.
[0117] Based on the above analysis, the path information obtained in step S21 for each entity (the entity serving as the starting point, i.e., the entity determined in step S12) includes multiple entities (at least two entities), which can be sorted according to the exploration order to form an entity sequence, etc. For each entity other than the first entity (the starting point of the path), such as the second entity, third entity, etc., in the path, the output can be determined by the second model (such as a large language model or other machine learning model with reasoning capabilities). In other words, the path exploration process in step S21 can be implemented by the second model, and this application does not limit the specific implementation method of this path exploration operation.
[0118] In this application, the determination of the first entity in each path information does not depend on the second model. It can be determined based on the matching between the keywords corresponding to the input information and the entities contained in the knowledge graph, or it can be obtained by filtering the candidate entities initially matched by the model after relevance identification. This application does not restrict the method for determining the first entity.
[0119] Reference Figure 3 This is a flowchart illustrating the information processing method proposed in Embodiment 3 of this application. This embodiment describes the branching process when the judgment result output by the first model is that the knowledge fragment does not support a response. It mainly describes the path exploration process, such as... Figure 3 As shown, the implementation process of step S21 above may include:
[0120] Step S31: Determine the exploration nodes for the knowledge graph;
[0121] An exploration node is a node located at the current position during the exploration of a knowledge graph's path. During the initial path exploration, the entity (initial node / starting point) corresponding to the input information, as determined in step S12, is used as the exploration node. For example, if the input information is "Is a company with a high debt ratio worth investing in?", the entities determined in step S12 include "debt-to-equity ratio" and "the company," and these two initially determined entities serve as the exploration nodes for the first path exploration.
[0122] When path exploration is not performed for the first time (i.e., after the first model determines that the knowledge fragments related to the explored entities are insufficient to support a response to the input information, such as the second and subsequent path explorations), the last target entity in the path information determined by the previous path exploration (i.e., the endpoint entity of the last path) is used as the current exploration node. In other words, the starting point of each path exploration is the endpoint entity of the previous exploration path. This endpoint entity may be one or multiple, which is the same as the number of path explorations determined by the second model; each one-dimensional exploration path has one endpoint entity.
[0123] For example, starting from the "debt-to-equity ratio" exploration node in the previous iteration, the target entities identified by the second model (neighboring nodes of the "debt-to-equity ratio") included the "interest coverage ratio" and / or the "cash flow to debt ratio." These can be further explored along two separate paths. This time, the path exploration uses the "interest coverage ratio" and / or the "cash flow to debt ratio" as new exploration nodes for different subsequent exploration paths, to continue uncovering financial health information related to solvency, and / or information related to liquidity risk, etc.
[0124] Step S32: Obtain entity description information of each of the multiple neighboring neighbor nodes of the exploration node;
[0125] In a knowledge graph, each entity node is connected to several other entity nodes through relational edges. These nodes that are directly connected by an edge are called neighbor nodes. Based on this, after determining the exploration node (starting point) for this path exploration, we can use this as the starting point to query the knowledge graph, explore according to the relational edges connected to it, obtain all neighbor nodes of the current exploration node, and extract the entity description information corresponding to each neighbor node.
[0126] Optionally, the entity description information for each entity node may include at least one of the following: the textual description of the corresponding entity in the knowledge graph (such as entity name, entity type, attribute list, etc.); the type and semantic description of the relationship between the entity and the current exploration node; and possibly other metadata of the entity, such as at least one of the natural language description texts related to the entity. It can be a natural language description (summary / conclusion, etc.) generated based on the knowledge fragments associated with its neighboring nodes, and may also include image data, video data, and / or audio data if necessary. This allows for a quick and accurate understanding of the entity node and its associated knowledge fragments, serving as structured and semantic candidate information for the next step of model decision-making. This application does not limit the content of the entity description information or its generation method.
[0127] For example, given the input information: "A listed company's financial report shows that its debt ratio has increased for three consecutive years and its cash flow is negative. However, the company recently announced a stock repurchase plan, and the industry prosperity index is rising. Is this stock suitable for long-term holding?", if the current exploration node is "a certain stock," its neighboring nodes in the knowledge graph include: "Price-to-Earnings Ratio" (relationship: valuation indicator), "Debt-to-Equity Ratio" (relationship: financial risk), "Industry Average Return" (relationship: benchmark comparison), "Major Shareholder Reduction Records" (relationship: negative events), and "Stock Repurchase Announcement" (relationship: positive events). The entity description information for each of these neighboring nodes is obtained. For example, for "Debt-to-Equity Ratio," the description information could be: "The company's debt-to-equity ratio has increased from 45% to 62%, exceeding the 60% warning line." For "Stock Repurchase Announcement," the description information could be: "The company plans to repurchase 5% of its total share capital, which is usually interpreted by the market as management believing the stock price is undervalued."
[0128] Step S33: Send the entity description information of each of the multiple neighboring nodes to the second model, and the second model determines the target entity that constitutes the path information from the multiple neighboring nodes.
[0129] The entity description information of all neighboring nodes obtained in step S32 is sent to the second model. Utilizing the natural language understanding and reasoning capabilities of the second model, the logical correlation between the entity description information of each neighboring node and the current exploration target (such as the current exploration intent, which can be parsed from the input information) / input information is analyzed. Taking into account the currently explored path information (exploration path context), the neighboring node most likely to respond to the current exploration target / input information is selected as the target entity, i.e., the next entity on the current exploration path. The second model can output the entity name or other identifier of the target entity to obtain the knowledge fragments associated with it.
[0130] Optionally, during step S33, in addition to the entity description information of all neighboring nodes, the information sent to the second model may also include the identifier of the current exploration node (such as entity name), the current exploration target / intent, and other relevant information. This application does not restrict the form in which this information is input into the second model. For example, filling the corresponding field variables in the prompt word template for the path exploration operation with this information yields the exploration prompt words for this path exploration, which are then input into the second model. This guides the second model to select the target entity from all neighboring nodes adjacent to the current exploration node according to the target entity filtering rules contained in the prompt word template, thus forming the next entity in the current exploration path.
[0131] For example, if the current exploration target / input information is "investment risk assessment of companies with high debt ratios," and the current exploration node is "debt-to-equity ratio," the second model, after receiving entity description information from all neighboring nodes, reasones and concludes that while the "price-to-earnings ratio" is related to the "debt-to-equity ratio" (both are financial indicators), it has no direct logical connection to the exploration target of "investment risk of high debt ratios." The "industry average debt ratio" is a comparative indicator, but it is not the core issue to be addressed (the problem focuses on the company's own risk, not industry comparison). The "interest coverage ratio" directly describes the impact of the debt ratio on solvency; that is, an increase in the debt-to-equity ratio leads to a decrease in the interest coverage ratio, thereby increasing the risk of default, and there is a causal relationship between the two. Therefore, the second model selects the "interest coverage ratio" as the target entity, but is not limited to this reasoning selection method.
[0132] Afterwards, the target entities determined by the second model can be added to the path information corresponding to the current exploration node to expand the entity sequence. For each updated path information, a judgment task can be performed by the first model to determine whether it satisfies the requirement to respond to the input information, and the corresponding judgment result (such as the third judgment result) is output. If the third judgment result supports the response, the path exploration ends and the response information is generated based on the path information; if the third judgment result is insufficient to support the response, steps S31-S33 are repeated, and the target entities determined in this path exploration are used as new exploration nodes to continue the next path exploration until the exploration termination condition is met, such as reaching the maximum number of explorations or collecting enough path information to respond to the input information.
[0133] In the case of path information obtained after the path exploration is updated, the path information contains multiple entities. When the first model performs the judgment task on it, it can send the knowledge fragments associated with each of the multiple entities contained in the path information to the first model. The first model outputs the third judgment result to characterize whether these knowledge fragments meet the requirements for responding to the input information, thereby determining whether the next path exploration needs to be performed.
[0134] Therefore, compared to traditional breadth / depth-first search or random walks, which are aimless and mechanical path traversal methods for knowledge graphs, exploring all neighbor nodes equally and easily getting stuck on irrelevant branches, resulting in low efficiency, this embodiment uses a second model to reason based on entity description information in each path exploration. It understands the logical relationships between entities and selects the target entity most likely to contribute to the response input information. This ensures that the path exploration direction always revolves around the exploration goal (intent / need) of the input information, rather than blindly traversing. For example, regarding the question "Can the debt-to-equity ratio be used to predict corporate default risk?", the second model can prioritize neighbor nodes related to treatment mechanisms (such as interest coverage ratio, cash flow to debt ratio) rather than neighbor nodes irrelevant to the question (such as company stock code, registered address, or industry classification), thus ensuring the semantic relevance of the exploration path. This allows for finding valuable, semantically coherent, and logically consistent reasoning chains with the fewest explorations—enough path information to support the response input information—and generating high-quality, interpretable response information.
[0135] Furthermore, because the second model selects relevant target entities from neighboring nodes as the next exploration node in each iteration, rather than directly expanding all neighboring nodes for a full search, it effectively prunes irrelevant paths, significantly reducing the number of nodes to be explored and computational overhead. This makes path exploration in large knowledge graphs more efficient, thus significantly improving the efficiency of path exploration. Moreover, since each target entity in the path information is independently judged and selected by the second model, it ensures high semantic coherence and relevance to the input information among entities throughout the path, avoiding problems such as path breaks or semantic jumps that are prone to occur in fixed traversal strategies. This is beneficial for improving the efficiency and quality of response information generation.
[0136] Furthermore, since this application uses the endpoint entity of the path information from the previous path exploration as the exploration node for the current path exploration, it achieves adaptive exploration for complex, multi-hop problems through this iterative path exploration mechanism. After each path exploration, the updated path information is judged by the first model. If it is sufficient to support the response to the input information, there is no need to explore the path again. This can effectively handle complex problems that require multi-step reasoning. Traditional one-time retrieval, fixed-hop path traversal, or one-time evaluation methods after pre-expanding multiple paths are difficult to achieve this depth-controllable and adaptive intelligent path exploration, thus improving the depth and accuracy of complex question answering.
[0137] In some embodiments, at each step of path exploration, after obtaining all neighboring nodes of the currently explored node, the system needs to score each neighboring node and use the score results as input for the second model to select the target entity from all neighboring nodes. In practical applications, this scoring can be based on at least one of the following: the similarity between the entity description information corresponding to the neighboring node and the input information; the relation weights associated with the neighboring nodes in the knowledge graph; the logical relationship between the neighboring node information of the explored node and the corresponding input information, etc. The score represents the probability that the corresponding neighboring node is selected as the target entity, or it can characterize the confidence that the updated path information of the neighboring node supports the response to the input information when the neighboring node is selected as the target entity. The higher the score, the more likely the corresponding neighboring node is to be selected as the target entity. This application does not limit the scoring implementation method.
[0138] The first scoring item, the similarity between the entity description information of neighboring nodes and the input information, can serve as a quantitative indicator for evaluating the semantic relevance of neighboring nodes to the input information. This first scoring item can be implemented using cosine similarity, vector distance, or other similarity algorithms. For example, an embedding model can be used to convert the entity description information and the input information into high-dimensional vectors, namely, an entity description vector and an input vector, respectively. Then, the cosine similarity or dot product between these two vectors can be calculated to obtain a numerical score between [-1, 1] and [0, 1]. This score quantifies the degree of relevance of the neighboring node to the input information in terms of "literal / topic" meaning.
[0139] For example, if the entity description information of each neighboring node is as follows: Neighboring node A's "Interest Coverage Ratio" entity description information is "Interest Coverage Ratio measures the degree to which a company's earnings before interest and taxes (EBIT) cover its interest expenses; the higher the value, the stronger its debt repayment ability."; neighboring node B's "Debt-to-Equity Ratio Compared to Industry Averages" entity description information is "The company's debt-to-equity ratio is 65%, higher than the industry average of 50%, indicating relatively high financial risk."; neighboring node C's "Share Repurchase Plan" entity description information is "The company announced a repurchase of 5% of its total share capital, which is usually interpreted by the market as management believing the share price is undervalued."; neighboring node D's "Price-to-Earnings Ratio" entity description information is "The company's current price-to-earnings ratio is 25 times, higher than the industry average of 20 times, which may indicate overvaluation." etc. If the input information or its current exploration goal is "Investment Risk Assessment of Highly Debt-Ratio Companies," semantic similarity calculations are performed between this input information and the entity description information of each neighboring node, such as using cosine similarity. The resulting scores are as follows: Neighbor node A has a similarity score of 0.85 (because the interest coverage ratio is directly related to debt repayment ability and risk), neighbor node B has a similarity score of 0.78 (industry comparison also reflects risk level), neighbor node C has a similarity score of 0.35 (repurchase plans have a weak correlation with debt risk assessment), and neighbor node D has a similarity score of 0.40 (valuation and debt risk have a certain indirect relationship but are not directly related). This score reflects the semantic similarity between the entity description information of the neighbor nodes and the input information.
[0140] For the second scoring item: obtaining the relation weights associated with neighboring nodes in the knowledge graph. These relation weights can be the originally configured weight values of the edge connections between the neighboring node and the currently explored node in the knowledge graph, representing the strength, credibility, frequency, or other predefined metrics of the association between the two nodes. This scoring method fully utilizes the structured prior information of the knowledge graph, making decisions more consistent with domain common sense and avoiding arbitrary model inferences. Furthermore, relation weights can serve as effective guidance during cold starts; when semantic similarity or logical relationship judgments are insufficient to distinguish candidate nodes, relation weights provide reliable alternatives.
[0141] For example, the relationship weights for debt-to-equity ratio and interest coverage ratio are 0.95 (representing core financial logic); debt-to-equity ratio and current ratio are 0.85 (representing relevant debt repayment indicators); debt-to-equity ratio and total asset turnover are 0.60 (representing indirect association); and debt-to-equity ratio and company registration location are 0.10 (representing irrelevant attributes). It is evident that the scoring results for this item reflect the knowledge graph's quantitative evaluation of the associations between the current node and its neighboring nodes.
[0142] For the third scoring item: obtaining the logical relationship between neighboring nodes and input information. This logical relationship can refer to a deep association beyond simple semantic similarity, including any of the following: causal relationship, contradictory relationship, conditional dependency relationship, temporal relationship, etc. The second model can be used to infer and judge the logical relationship between each neighboring node and input information.
[0143] For example, if the logical relationship between neighbor node A (interest coverage ratio) and "investment risk assessment of companies with high debt ratios" can be judged as "strong causality," then high debt ratios lead to increased interest expenses, thereby reducing the interest coverage ratio and directly reflecting debt repayment risk. The logical relationship between neighbor node B (asset-liability ratio comparison with industry peers) and the same input information can be judged as "weak correlation." Industry comparisons provide a reference, but the direct logical connection to the company's own risk is weak. The logical relationship between neighbor node C (stock repurchase plan) and the input information can be judged as "indirect correlation." Stock repurchases may suggest that management is optimistic about the company, but they do not directly alleviate the risk brought by high debt ratios. The logical relationship between neighbor node D (price-to-earnings ratio) and the input information can be judged as "unrelated." The price-to-earnings ratio mainly reflects valuation levels and has no direct logical connection to debt risk assessment. Different scoring values can be assigned to different logical relationships; for example, strong causality scores 10 points, indirect correlation scores 5 points, weak correlation scores 2 points, and unrelated scores 0 points. Based on this, neighbor node A (interest coverage ratio, strong causality) gets 10 points, neighbor node C (stock repurchase plan, indirect correlation) gets 5 points, neighbor node B (asset-liability ratio compared with the same industry, weak correlation) gets 2 points, and neighbor node D (price-to-earnings ratio, unrelated) gets 0 points.
[0144] Optionally, during the implementation of the third scoring item, a logical relationship judgment prompt template can be constructed and input into the second model or other lightweight models to obtain the logical relationship. For example, the prompt template might be: "Please determine whether the information represented by the [neighbor node description] logically supports, opposes, supplements, or is irrelevant to the answer to the question represented by the [input information]? Please use a score between 0 (completely irrelevant) and 1 (core support) to represent its logical relevance strength." This score captures the logical role that neighbor nodes may play in the response reasoning chain. This application does not restrict the method for obtaining logical relationships or the scoring implementation method.
[0145] Then, the second model can select the target entity to output based on the scoring results (score values) of the above scoring items. If two or three scoring items are included, they can be fused according to preset fusion rules (such as weighted summation, taking the maximum value, or using a voting mechanism) to obtain the final score results of the corresponding neighboring nodes. Assuming that the score results of the three scoring items are summed using equal weights, the final score result of each neighboring node after normalization is as follows:
[0146] Neighbor node A (interest coverage ratio): Similarity 0.82 + Relationship weight 0.90 + Logical relationship score 1.0 (normalized) = 2.72; Neighbor node B (asset-liability ratio comparison with industry peers): 0.45 + 0.75 + 0.3 = 1.50; Neighbor node C (stock repurchase plan): 0.30 + 0.20 + 0.2 = 0.70; Neighbor node D (price-to-earnings ratio): 0.38 + 0.35 + 0 = 0.73. Neighbor node A has the highest overall score, so it can be selected as the target entity for this path exploration. This target entity will be added to the current path information, forming a path information sequence containing the entities [asset-liability ratio, interest coverage ratio]. Afterwards, it is determined that another path exploration is needed, and neighbor node B will be used as the new exploration node for repeated execution. This avoids bringing irrelevant information into subsequent path expansion, thus ensuring the cleanliness and usefulness of the path information.
[0147] It should be noted that one or more of the above scoring items can be selected and combined according to the actual application scenario. For example, in a system with high-quality knowledge graph relation weights, decisions can be made solely based on relation weights; in scenarios requiring deep logical reasoning, the focus can be on logical relation scoring. This embodiment does not limit the specific combination method and weight allocation. All variations within the spirit and principles of this application are within the scope of protection, and this application will not provide detailed examples of each one.
[0148] In some other embodiments, this application may also combine the first scoring item and the second scoring system mentioned above with a lightweight model, combine the scoring results of the two items to determine a node score of the corresponding neighbor node, and then use the second model to make a decision on the target entity based on the node score and the evaluation result of the third scoring item, and may even include the evaluation result of the first scoring item. The implementation process will not be described in detail in this application.
[0149] Therefore, this embodiment, through a multi-dimensional (semantic, structural, and logical) scoring mechanism, provides rich, structured, and semantically rich decision-making basis for the path exploration of target entities by the second model. This allows the second model to comprehensively consider "how similar the entity description information of this neighboring node is to the input information" (semantic similarity), "how strong the relationship is between them" (relationship weight), and "what role this entity description information plays logically" (logical relationship). These three factors complement and verify each other, resulting in a more comprehensive, robust, and accurate selection of target entities. This significantly reduces the risk of path deviation caused by noise from a single information source, thus solving the problem that traditional graph search or vector retrieval often relies on only one indicator (such as the similarity score between entity nodes), which can easily lead to selection bias due to the one-sidedness of the indicator. For example, relying solely on semantic similarity may miss nodes with logically key but different expressions; relying solely on relationship weight may ignore important associations of emerging or weak connections.
[0150] Moreover, the scoring results serve as explicit information input to the second model, making its decision-making process traceable and analyzable to some extent. Developers can examine which scores influenced the final choice, thereby optimizing the scoring calculation method or prompts to achieve fine-tuning of the path exploration strategy. For example, in risk-averse investment consulting, the second model can be prompted to place greater emphasis on the high weight of the "default" relationship and the logic of "debt repayment risk"; while in academic exploration, semantic novelty and logical support may be more important.
[0151] Reference Figure 4 This is a flowchart illustrating the information processing method proposed in Embodiment 4 of this application. This embodiment can describe information processing methods in complex problem scenarios, such as... Figure 4 As shown, the information processing method proposed in this embodiment may further include:
[0152] Step S41: Obtain input information.
[0153] Step S42: Send the input information to the third model.
[0154] Step S43: Obtain multiple problem descriptions for the input information. These multiple problem descriptions are decomposed and output by the third model based on the input information.
[0155] In this embodiment, the third model can be a model used to decompose complex problems, such as a large language model or a machine learning model specifically trained for problem decomposition. The obtained input information can be sent to the third model directly or after being converted into an embedding vector via API calls, local model inference interfaces, or other applicable communication methods.
[0156] After receiving the input information, the third model analyzes it, identifying multiple independent sub-questions (question descriptions) or multiple dimensions that need to be answered separately, thus breaking down the original input information into multiple question descriptions. Each question description focuses on a specific aspect of the input information, facilitating subsequent retrieval of relevant information. The third model outputs these question descriptions for further processing.
[0157] Preferably, to achieve reasonable decomposition, corresponding decomposition prompts can be set for the third model, requiring it to break down the original problem (input information) into a maximum predetermined number (e.g., 4) of sub-problems (problem descriptions). Each sub-problem should contain different entity types (i.e., capable of comprehensively understanding the original problem; for example, in investment analysis problems, each sub-problem needs to focus on different dimensions such as financial risk indicators (e.g., debt ratio, cash flow, profit margin), company behavior signals (e.g., buybacks, share increases, dividends), industry macro environment (e.g., industry prosperity, industry policies), valuation and returns (e.g., price-to-earnings ratio, price-to-book ratio), etc.), to ensure that multiple sub-problems comprehensively analyze the original problem from different perspectives.
[0158] For example, if the input information is "A listed company's recent financial report shows an increased debt ratio and negative cash flow, but the industry is booming. The company announced a share buyback, and at the same time, the major shareholder is reducing their holdings. Is this stock worth holding long-term?", this text can be sent to the third model. Alternatively, the input information can be combined with the above-mentioned decomposed prompt template to form prompt information, which can then be input into the third model. The third model can decompose the input information into four question descriptions, such as "The impact of a high debt ratio on the long-term investment value of a listed company," "Analysis of negative cash flow and corporate solvency," "The supporting role of share buybacks on stock prices," and "The signal significance and risks of major shareholder reductions," but is not limited to these.
[0159] Preferably, before decomposing the input information, this application can also utilize the problem understanding capabilities of the third model to analyze the problem type of the input information. If it is a complex problem, the problem understanding and decomposition capabilities of the third model can then be used to decompose the input information into multiple independent problem descriptions. Each problem description corresponds to a specific retrieval target / intent in the input information.
[0160] Subsequently, each question description can be considered as input information. Following the information processing method proposed in the embodiments above, at least one entity corresponding to each question description is determined. A first model is used to determine whether the associated knowledge fragment satisfies the requirement for a response to the question description. If a response is supported, the path information for that question description is recorded, such as the at least one entity, and possibly the associated knowledge fragment. The process continues until the path information / knowledge fragments for other question descriptions are retrieved. If a response is not supported, path exploration is performed on the knowledge graph to update the path information for each entity corresponding to the question description. Then, it is determined whether the response to the question description is supported. This iterative exploration continues until the exploration termination condition is met. Multiple question descriptions each correspond to only one final path information, such as the path information starting from the initially determined entities, to be combined to generate response information for the input information. The iterative exploration process for each question description is similar to the iterative exploration process for the input information described above, and will not be elaborated upon here.
[0161] Step S44: Determine the input information and the set of keywords for multiple question descriptions;
[0162] In this embodiment, the original input information and the multiple question descriptions obtained in step S43 can be used as text sources to extract keywords. Keyword extraction can employ, but is not limited to, natural language processing techniques, such as statistical methods based on TF-IDF (Term Frequency-Inverse Document Frequency), named entity recognition based on pre-trained models, or suggestion extraction based on large language models. The extracted keywords can be the core semantic elements of each question description, such as entity names, attribute words, and action words. After extraction, all keywords can be deduplicated to form a unified keyword set, avoiding repetitive work during subsequent retrieval. Alternatively, the keywords contained in each question description can be used as a keyword set for subsequent independent path exploration for each question description. These keywords can be entities in a knowledge graph.
[0163] For the above example, the set of keywords extracted and deduplicated from each problem description might include: {listed companies, debt ratio, cash flow, industry prosperity, stock buyback, major shareholder reduction, long-term holding, investment value}.
[0164] Step S45: Match the keyword set with the knowledge graph to determine the candidate entity set.
[0165] In some embodiments, this application can match each keyword in the keyword set with entities in the knowledge graph, such as exact matching (the keyword and entity name are exactly the same), fuzzy matching (based on edit distance or synonym expansion), semantic similarity matching (converting the keyword into an embedding vector and calculating the cosine similarity with the embedding vector of the entity name or entity description), etc. Thus, for each keyword, one or more name-related entities are obtained through the matching operation; entities with a matching degree greater than a threshold are considered candidate entities. The candidate entities obtained from matching all keywords are merged to form a candidate entity set.
[0166] As can be seen, the candidate entity set contains all entities that may be related to the input information and the description of each question. However, the candidate entity set may also contain entities that are weakly related to or even unrelated to the input information. For example, the keyword "stock buyback" may match multiple corporate entities in the stock buyback industry, many of which are unrelated to the input information. Further precise screening of strongly related entities is needed to form the target entity set.
[0167] It should be understood that if the number of candidate entities determined after the matching and filtering in step S45 is small, they can be directly used as the target entity set to determine at least one entity corresponding to the input information, so as to complete the subsequent judgment and retrieval / generation steps. The implementation process will not be described in detail in this embodiment.
[0168] Step S46: Send the candidate entity set to the fourth model.
[0169] Step S47: Obtain the selected target entity set, which is determined by the fourth model based on the relevance between the candidate entity set and the keyword set.
[0170] Following the above analysis, the candidate entity set initially selected through keyword matching is not accurate enough, or even too numerous. Therefore, it can be sent to a fourth model, such as a large language model with natural language understanding capabilities, specifically designed to evaluate the relevance between entities and given keywords. If necessary, the keyword set obtained in step S43 can also be sent along with the candidate entity set as a basis for evaluation, in order to accurately determine the selected entity set.
[0171] After receiving the candidate entity set and keyword set, the fourth model judges the relevance between each candidate entity and its corresponding keyword (or the overall input information). This relevance judgment differs from simple string matching or vector similarity: the fourth model can use its semantic understanding and reasoning capabilities to identify whether there is a strong logical correlation between entities and keywords, such as causal relationship (i.e., a change in one entity leads to a change in another entity, such as a causal chain between the entity "interest coverage ratio decline" and the keyword "high debt ratio investment risk"), contradictory relationship (i.e., two entities provide signals in opposite directions, such as the entity "major shareholder reduction" and the keyword "stock repurchase benefit" constituting a risk warning), or conditional dependency relationship (i.e., the state of one entity affects the effectiveness of another entity, such as the entity "industry prosperity" and the keyword "company profit expectation" constituting a conditional dependency).
[0172] Optionally, this application can score and rank the relevance of the candidate entity set, and determine a predetermined number of entities (ranked from largest to smallest) as the target entity set based on the score ranking results. Therefore, the fourth model can output a relevance label or score for each candidate entity, such as "strongly relevant", "weakly relevant", "unrelevant", or output a continuous score between 0 and 1. Based on the output of the fourth model (such as the score), entities that meet the preset relevance requirements (e.g., marked as "strongly relevant" or with a score exceeding a threshold) are selected to form the target entity set.
[0173] For example, the relevance scores (or normalized composite scores) of each candidate entity are ranked from highest to lowest. Then, a predetermined number of candidate entities are selected from the top of the ranking (e.g., the first 5) as the final target entity set. This target entity set will serve as the initial node set for subsequent path exploration, that is, at least one entity corresponding to the input information, determined based on the knowledge graph. This ensures that key entities are not overlooked (entities with high scores are usually the most relevant), controls the size of the initial node set, reduces the computational complexity of subsequent path exploration, and achieves a balance between quality and efficiency.
[0174] Therefore, compared to traditional RAG, which directly vectorizes the entire complex query for retrieval, easily recalling semantically relevant but off-topic fragments, or focusing only on the most prominent part of the query, resulting in a single and noisy starting point, this application uses a third model to decompose the query, ensuring comprehensive coverage of all dimensions of complex input information from multiple perspectives (corresponding to multiple problem descriptions). This lays the foundation for parallel exploration from multiple starting points, avoids one-sidedness, and improves the accuracy and diversity of retrieval starting points. Furthermore, a fourth model is used for fine-tuning, leveraging its deep semantic understanding capabilities to further filter out "weakly relevant" entities based on vector similarity matching. This significantly reduces the possibility of irrelevant entities (noise) entering the subsequent path exploration process from the source, ensuring a high-quality initial node set.
[0175] Furthermore, a structured preprocessing workflow is provided for handling complex problems (input information), automatically transforming it into a set of structured "problem descriptions" and "keywords," which are ultimately mapped to a precise set of "target entities" in the knowledge graph. Deep analysis and standardized representation of user intent make subsequent path exploration in the knowledge graph more targeted and focused. Especially for complex medical and legal problems requiring multi-step reasoning and involving multiple entities, this deep preprocessing lays the foundation for generating accurate and complete response information, enhancing the adaptability of the proposed method to complex problems.
[0176] Compared to directly extracting keywords from lengthy raw input, keywords extracted from the decomposed question description more accurately reflect the core elements of each dimension. This improves the relevance of recalled entities to the original input information during knowledge graph matching, thus enhancing the quality of entity retrieval. Furthermore, the third and fourth models can dynamically adjust the decomposition method and relevance judgment criteria based on the specific content of the input information. The method in this embodiment does not require pre-setting fixed templates or rules for different types of input information. For simple questions, the number of decomposed question descriptions is small or even unnecessary, and the number of target entities is also small. For complex questions, the decomposition is more detailed, and the target entity set increases accordingly, thus adaptively matching different types of question-answering needs.
[0177] Optionally, for each set of keywords corresponding to a question description, the target entity set corresponding to that question description is determined according to the method described above. That is, a set of starting nodes is constructed for each question description, and path exploration is performed on each starting node (entity) as described above to determine the corresponding path information. This path information is then combined to form the total path information for answering the question description. Combined with the total path information of other question descriptions, the response information for the input information is generated. For example, the input information and all path information are sent to the fifth model, and the fifth model outputs the response information obtained through reasoning. Alternatively, the knowledge fragments or entity description information associated with each entity in all path information can be combined according to certain output format requirements to form the response information. This application does not restrict the implementation method of how the fifth model reasons to obtain the final response information.
[0178] In one possible implementation, the path exploration process described in the above embodiments may involve an exploration termination condition that allows the path information to respond to the input information, or, if the path information is insufficient to support a response to the input information, at least one of the following conditions may be met: the number of historical explorations / iterations performed reaches a corresponding threshold, the historical path length (number of entities contained) of the explored path information reaches its corresponding threshold, the exploration depth of the knowledge graph reaches a corresponding threshold, etc. In this way, while ensuring the depth of information, efficiency loss caused by excessive traversal is avoided, thereby controlling the upper limit of computational overhead and ensuring the real-time response capability of the system.
[0179] Among them, thresholds for the number of iterations and thresholds for path length can represent the maximum number of exploration steps (i.e., exploration depth) of the knowledge graph, such as 3, 4, or 5. These thresholds can be pre-configured based on at least one of the following: available resources of electronic devices, performance requirements of the application scenario, size of the knowledge graph, complexity of input information, etc. This application does not restrict the size of the threshold or its configuration method. This adaptive mechanism achieves a better balance between computational cost and answer quality.
[0180] Optionally, this application may not preset a fixed threshold. Instead, it may dynamically adjust the threshold based on the available resources of the electronic device configuration, changes in the performance requirements of the application scenario, etc., to ensure the reliability and timeliness of the question-and-answer response and avoid affecting other tasks of the electronic device.
[0181] Based on the above analysis, in the above embodiments, the path information updated for each path exploration (such as updating the initial node set, i.e., adding the target entity selected from neighboring nodes to the initial node set) is judged. If the judgment result indicates that the path information does not support a response and the iteration count has reached the corresponding threshold, path exploration is no longer continued, and a new question description can be generated. For example, by combining the judgment result with the input information and path information, a new question description that can supplement the response to the input information can be generated through the model. That is, the new question description can be a refinement, restatement, or supplement to the input information, aiming to re-express the user's needs from different angles or more focused dimensions. Afterwards, following the method described in the above embodiments, after determining its starting node set, path exploration can be performed to supplement and update the path information, obtaining the total path information that supports the response to the input information, and the final response information is generated through the fifth model.
[0182] Let's take the example of an input message: "A listed company's financial report shows a debt ratio that has increased for three consecutive years and negative cash flow. However, the company recently announced a stock repurchase plan, and the industry prosperity index is rising. Is this stock suitable for long-term holding?" After three rounds of path exploration, the obtained path information is: debt-to-equity ratio → interest coverage ratio → probability of default. However, it may still lack information on whether "industry prosperity" can alleviate the risk of a high debt ratio. At this point, the generated new question description could be: "Given the current high industry prosperity but the rising debt ratio of individual companies, can the industry dividends partially offset the negative impact of financial risks on long-term investment value?"
[0183] Optionally, if the judgment result indicates that the path information does not support a response and the number of iterations reaches the corresponding threshold, a knowledge fragment based on the entity (the currently determined entity, such as the initial entity or key entities in the path) and indication information indicating that the representation is insufficient to support a response can be generated and fed to the fifth model. The fifth model then proactively asks questions to clarify the needs, suggests supplementary information, or generates partial responses. This process allows the user to receive more informative feedback, rather than a simple failure result. Of course, a new set of starting nodes can also be determined, and path exploration can be performed according to the above method. The implementation process is not detailed in this application.
[0184] For example, the fifth model can provide partial answers based on existing knowledge fragments and inform users that the information is insufficient, suggesting further details. It can also generate a clarification request for the user, such as, "Were the company's audit reports for the past two years unqualified opinions? Is there specific data on the interest coverage ratio?" or "Please provide the company's free cash flow data for the past three years, as well as the specific source and statistical scope of the industry prosperity index." Alternatively, it can output a default fallback answer, such as, "Based on the existing information, we cannot provide definitive investment advice; we recommend consulting a professional financial advisor." One or more methods can be combined depending on the actual application scenario, thereby improving the user experience in situations with insufficient information. Appropriate prompts or redirection measures prevent users from mistakenly believing the system has provided a definitive answer. This is particularly important for applications in high-risk fields such as healthcare, law, and finance, effectively reducing the risk caused by model illusions.
[0185] It should be noted that the first model, second model, third model, fourth model, and fifth model involved in the information processing methods proposed in the various embodiments of this application can be models of the same type, such as AI models like large language models, or models of different types, such as lightweight models for entity recognition / matching, etc., or they can all be different types of models as needed. This application does not impose any restrictions on this and can flexibly deploy or call them as appropriate.
[0186] Furthermore, in practical applications, the input information or intermediate results generated by the information processing method may contain personal privacy data (such as name, ID number, health status, financial account, etc.) or sensitive corporate information (such as internal company financial data, transaction details, trade secrets, etc.). Since the model involved in this application may be deployed on a cloud server or a third-party server, directly sending the original input information or intermediate results to the cloud may pose a data leakage risk. Therefore, this application proposes that for information that needs to be sent to the cloud, it should first determine whether the information contains sensitive information through an identification model or rule set, such as identifying whether the information contains entities with privacy or trade secrets, such as one or more of the following: personal name, ID number, phone number, bank account, precise amount, stock code, company full name, geographical location, medical diagnosis results, etc., which can be determined according to the security requirements of the corresponding field.
[0187] If the information contains sensitive information, the identified sensitive information should be securely processed before sending it to the cloud model. Optionally, this application may employ at least one of the following methods to process the output information containing sensitive information: desensitization and replacement, encryption, and generalization. Desensitization and replacement refers to replacing sensitive information with a generic, non-identifiable marker or a similar placeholder. For example, replacing "Company A" with "a certain company," "600001" with "a certain code," "-20 million yuan" with "a negative amount," and "100,000 shares" with "a certain quantity." Generalization refers to replacing precise values with ranges or levels. For example, generalizing "debt ratio 65%" to "debt ratio higher than 60%," and generalizing "cash flow -20 million yuan" to "negative cash flow with a large amount," etc.
[0188] Encryption processing refers to encrypting sensitive information using symmetric or asymmetric encryption algorithms (such as AES (Advanced Encryption Standard) and RSA (Rivest–Shamir–Adleman, also known as RSA asymmetric encryption algorithm) to form ciphertext. After receiving the ciphertext, if the cloud model needs to perform semantic understanding, it must decrypt it in a Trusted Execution Environment (TEE), or use homomorphic encryption technology to allow the model to directly compute on the encrypted data. This security processing method is suitable for scenarios where the cloud is completely trusted.
[0189] Afterwards, the information (along with sensitive information in knowledge fragments involved in subsequent steps) after being de-identified, encrypted, or generalized is sent to the first, third, fourth, or fifth model in the cloud. Since sensitive information has been removed or transformed, even if intercepted during transmission or if the cloud model has vulnerabilities, the user's or enterprise's original sensitive data will not be leaked. Furthermore, the information received by the cloud model no longer contains the original precise sensitive data, but still retains sufficient semantic and logical features to complete relevance judgment, entity screening, or response generation. Optionally, if the response information returned by the cloud model contains de-identified placeholders (such as "Company X"), the terminal device or security gateway can restore the placeholders to the original sensitive information (if the mapping relationship is stored locally) before outputting to the user. For example, replacing "Company X" with "Company A" and "Code X" with "600001" to provide the user with a readable personalized response. If encryption is used, the ciphertext portion of the model's output must be decrypted first. However, this is not limited to this; the response information containing de-identified placeholders can also be directly fed back, and then restored to the original sensitive information locally on the terminal device, etc.
[0190] Therefore, this embodiment effectively reduces the risk of privacy leaks during data transmission and cloud processing by introducing sensitive information identification and security processing steps, while maintaining the accuracy of model judgments. Users and enterprises do not need to worry about raw sensitive data being obtained by cloud service providers or third parties, thus meeting data compliance requirements. Furthermore, the security processing does not affect model performance, meeting the reliability requirements of question-and-answer processing.
[0191] Reference Figure 5 This is a schematic diagram of the structure of the information processing device proposed in the embodiments of this application, as shown below. Figure 5 As shown, the device may include:
[0192] Input information acquisition module 51 is used to acquire input information;
[0193] The entity determination module 52 is used to determine at least one entity corresponding to the input information based on the knowledge graph; wherein each entity is associated with a knowledge fragment;
[0194] The judgment result obtaining module 53 is used to send the input information and the knowledge fragment to the first model, and the first model outputs the judgment result, which is used to characterize whether the knowledge fragment satisfies the requirement to respond to the input information;
[0195] The response generation module 54 is used to generate response information for the input information based on the knowledge fragment if the judgment result indicates that the knowledge fragment supports the response.
[0196] Optionally, the device may also include:
[0197] The path exploration module is used to trigger path exploration of the knowledge graph if the judgment result is that the knowledge fragment does not support a response, so as to update the path information of each entity in the at least one entity; wherein the path information is used to re-determine by the first model whether a response to the input information is satisfied.
[0198] Each path information includes multiple entities, and each entity other than the first entity among the multiple entities is determined and output by the second model.
[0199] Optionally, the path exploration module may include:
[0200] An exploration node determination unit is used to determine the exploration nodes of the knowledge graph;
[0201] An entity description information acquisition unit is used to obtain entity description information of each of the multiple neighboring neighbor nodes adjacent to the exploration node;
[0202] The target entity determination unit is used to send the entity description information of each of the multiple neighboring nodes to the second model, so that the second model can determine the target entity constituting the path information from the multiple neighboring nodes.
[0203] The path exploration module may also include:
[0204] A scoring module is used to score each of the neighboring nodes of the current exploration node during the path exploration process to determine the target entity. The scoring module includes implementations based on at least one of the following:
[0205] The similarity between the entity description information corresponding to the neighbor node and the input information;
[0206] The relation weights associated with the neighbor nodes in the knowledge graph;
[0207] The logical relationship between the neighbor node information and the corresponding input information of the exploration node.
[0208] Based on this, the judgment result obtaining module 53 can also be used to: send the knowledge fragments associated with each of the multiple entities included in each path information to the first model, and the first model outputs the judgment result, which is used to characterize whether the knowledge fragments meet the requirements for responding to the input information.
[0209] In some embodiments, the above-described apparatus may further include:
[0210] An input information decomposition unit is used to send the input information to a third model to obtain multiple problem descriptions for the input information, wherein the multiple problem descriptions are decomposed and output by the third model for the input information;
[0211] Based on this, the entity determination module 52 may include:
[0212] The keyword determination unit is used to determine the keyword set of the input information and the multiple question descriptions, and the keyword set is used to match with the knowledge graph to determine the candidate entity set.
[0213] A candidate entity sending unit is used to send the determined set of candidate entities to the fourth model;
[0214] The target entity acquisition unit is used to obtain the filtered target entity set, which is determined by the fourth model based on the relevance between the candidate entity set and the keyword set.
[0215] The target entity acquisition unit may include:
[0216] The scoring and sorting unit is used to determine a predetermined number of entities as the target entity set based on the scoring and sorting of the relevance.
[0217] In the above embodiments, the number of iterations that trigger path exploration of the knowledge graph to update the path information of each entity in the at least one entity does not exceed a threshold.
[0218] The generation module is used to generate a new question description or an indication that the knowledge fragments and representations corresponding to the entity are insufficient to support a response when the determination result shows that the path information does not support a response and the number of iterations reaches the threshold.
[0219] This application also provides a computer program product including computer-readable instructions, which, when executed on an electronic device, cause the electronic device to implement any of the information processing methods provided in this application.
[0220] The computer-readable storage medium can be any available medium that an electronic device can store, or a data storage device such as a training device or data center that integrates one or more available media. Available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).
[0221] This application also provides a computer-readable storage medium that carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the computer device can implement any of the information processing methods provided in this application.
[0222] When computer-readable instructions are loaded and executed on an electronic device, all or part of the processes or functions described in the embodiments of this application are generated. The electronic device may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer-readable instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer-readable instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means, depending on the actual application scenario.
[0223] This application also provides an intelligent program (such as an agent or intelligent assistant) to receive input information and implement the information processing method proposed in this application. The implementation process can be referred to the description of the corresponding part of the method embodiment above. In this implementation process, other components of the application program or operating system can also be controlled through interface calls or other interactive methods to respond to input information, and there are no limitations on this.
[0224] Reference Figure 6 This is a schematic diagram of the hardware structure of the electronic device proposed in the embodiments of this application, such as... Figure 6 As shown, the electronic device may include at least one memory 61 and at least one processor 62. The memory 61 may be used to store computer programs and related data of the knowledge graph. The processor 62 executes the computer program to implement the steps of the information processing method proposed in any embodiment of this application. The implementation process can be referred to the description of the corresponding part of the above embodiments.
[0225] Optionally, the processor 62 may run an intelligent program that can execute computer programs through the processor 62 to implement the information processing method described above in this application.
[0226] When the electronic device is a terminal device, it may also include an input component for collecting input information. For different types of input information, the corresponding type of input component can be used to obtain it, such as one or more of an audio collector, touch screen, finger, stylus, mouse and keyboard or joystick, so that the user can operate the input component to send input information to the processor 62 of the electronic device.
[0227] In the case where the terminal device executes the method of this application, the model involved can be a model deployed locally on the terminal device. In this case, all steps of the information processing method are completed locally on the terminal device without the need for network communication with an external server, which is suitable for scenarios with high data privacy requirements or unstable network environments. Alternatively, it can be a model deployed in the cloud. The terminal device sends the data that needs to be processed by the model to the cloud via the network, and the cloud model feeds back the output results to the terminal device for further processing.
[0228] In the case where the electronic device acts as a server, the server deploys a first model and a second model, and stores a knowledge graph database. The terminal device, acting as a user-side device, communicates with the server via a network. The user submits input information through the terminal device, which then sends this input information to the server via the network. Upon receiving the input information, the server's processor loads the knowledge graph data from its memory, identifies at least one entity corresponding to the input information based on the knowledge graph, and retrieves the knowledge fragments associated with each entity. Subsequently, the processor sends the input information and the knowledge fragments to the first model deployed on the server. The first model outputs a judgment result, which characterizes whether the knowledge fragment satisfies the requirement to respond to the input information. If the judgment result indicates that the knowledge fragment supports a response, the processor invokes the second model deployed on the server to generate response information based on the knowledge fragments. The server then transmits the generated response information back to the terminal device via the network, which presents it to the user.
[0229] Optionally, in the processing flow described above, the knowledge graph, the first model, and the second model are all deployed on the server side, while the terminal device is only responsible for collecting input information and displaying response information. The server has stronger computing power and larger storage capacity, enabling it to support larger-scale knowledge graphs and more complex model reasoning, making it suitable for scenarios requiring the processing of massive amounts of knowledge data and high-concurrency requests. Furthermore, the centralized deployment of models and knowledge facilitates unified updates and maintenance.
[0230] It should be understood that model deployment may also be a hybrid architecture during the implementation of information processing methods. For example, the terminal device performs preliminary input information understanding or entity recognition, sends the simplified processing task to the server for deep path retrieval and model inference, and then performs post-processing on the terminal after the server returns the results. The electronic device protected by this application covers all the above-mentioned possible hardware deployment forms, and falls within the scope of protection as long as its processor executes the described method steps.
[0231] Furthermore, the electronic device may also include at least one output component for outputting response information. Different types of output components can be used to implement different output formats of the response information. For example, the output component may be a display screen to display the generated interactive interface, showing the response information or intermediate output results. The output component may also be an audio output component, such as a speaker, to output results via voice playback.
[0232] It should be understood that, Figure 6 The structure of the electronic device shown does not constitute a limitation on the electronic device in the embodiments of this application. In practical applications, the electronic device may include more than Figure 6The electronic device may include more or fewer components, or combinations of certain components, and when the electronic device is a terminal device, it may also include sensing units such as gyroscopes, accelerometers and gravity sensors for obtaining sensing parameters, power management modules, antennas or other communication elements, etc., which will not be listed in detail in this application.
[0233] Finally, it should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and 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. In addition, in the accompanying drawings of the device embodiments provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.
[0234] In the above embodiments, the invention can be implemented entirely or partially by software, hardware, firmware, or any combination thereof. Through the description of the above embodiments, those skilled in the art can clearly understand that this application can be implemented using software plus necessary general-purpose hardware, or it can be implemented using dedicated hardware including dedicated integrated circuits, dedicated CPUs, dedicated memory, dedicated components, etc. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The various embodiments in this specification are described in a progressive or parallel manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to mutually. For the apparatuses and electronic devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and relevant parts can be referred to the method section.
Claims
1. An information processing method, comprising: Obtain input information; At least one entity corresponding to the input information is determined based on a knowledge graph; wherein each entity is associated with a knowledge fragment; The input information and the knowledge fragment are sent to the first model, and the first model outputs a judgment result, which is used to characterize whether the knowledge fragment satisfies the requirement to respond to the input information. If the judgment result indicates that the knowledge fragment supports the response, a response message is generated based on the knowledge fragment for the input information.
2. The method according to claim 1, further comprising: If the judgment result is that the knowledge fragment does not support a response, path exploration of the knowledge graph is triggered to update the path information of each entity in the at least one entity; The path information is used by the first model to re-determine whether a response is required for the input information.
3. The method according to claim 2, wherein each path information includes multiple entities, and each entity other than the first entity among the multiple entities is determined and output by the second model.
4. The method according to claim 3, wherein triggering path exploration of the knowledge graph to update the path information of each entity in the at least one entity includes: Identify the exploration nodes for the knowledge graph; Obtain entity description information for each of the multiple neighboring neighbor nodes adjacent to the explored node; The entity description information of each of the multiple neighboring nodes is sent to the second model, and the second model determines the target entity that constitutes the path information from the multiple neighboring nodes.
5. The method of claim 4, wherein during the path exploration process, each of the neighboring nodes of the current exploration node is scored to determine the target entity, the scoring comprising at least one of the following implementations: The similarity between the entity description information corresponding to the neighbor node and the input information; The relation weights associated with the neighbor nodes in the knowledge graph; The logical relationship between the neighbor node information and the corresponding input information of the exploration node.
6. The method according to claim 5, wherein the knowledge fragments associated with each of the multiple entities included in each path information are sent to a first model, and the first model outputs a judgment result, which is used to characterize whether the knowledge fragments satisfy the requirement to respond to the input information.
7. The method according to claim 1, further comprising, before determining at least one entity corresponding to the input information based on the knowledge graph: The input information is sent to the third model; Multiple problem descriptions are obtained for the input information, and the multiple problem descriptions are decomposed and output by the third model for the input information; The step of determining at least one entity corresponding to the input information based on a knowledge graph includes: The input information and the keyword set of the multiple question descriptions are determined, and the keyword set is used to match the knowledge graph to determine the candidate entity set.
8. The method according to claim 7, wherein determining at least one entity corresponding to the input information based on a knowledge graph further comprises: Send the determined set of candidate entities to the fourth model; Obtain the selected target entity set, which is determined by the fourth model based on the relevance between the candidate entity set and the keyword set; The selection of the target entity set is based on the relevance score ranking, and a predetermined number of entities are selected as the target entity set.
9. The method according to claim 6 or 8, wherein the number of iterations for triggering path exploration of the knowledge graph to update the path information of each entity in the at least one entity does not exceed a threshold. in, If the determination result indicates that the path information does not support a response and the number of iterations reaches the threshold, a new problem description or indication information based on the knowledge fragment corresponding to the entity and the representation is insufficient to support a response is generated and sent to the fifth model.
10. An electronic device, the electronic device comprising: At least one memory, and a computer program stored in the memory; At least one processor running the computer program performs the following steps: Obtain input information; At least one entity corresponding to the input information is determined based on a knowledge graph; wherein each entity is associated with a knowledge fragment; The input information and the knowledge fragment are sent to the first model, and the first model outputs a judgment result, which is used to characterize whether the knowledge fragment satisfies the requirement to respond to the input information. If the judgment result indicates that the knowledge fragment supports the response, a response message is generated based on the knowledge fragment for the input information.