A multi-agent-based retrieval method, apparatus, device, and medium
By working collaboratively with multiple agents, the parsing agent analyzes the input data, the semantic agent performs deep semantic mining, the context agent optimizes the query, and the recommendation agent filters the results. This solves the problem of low accuracy in the retrieval of massive data in the financial field and achieves highly accurate retrieval of complex information.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA PING AN PROPERTY INSURANCE CO LTD
- Filing Date
- 2026-03-06
- Publication Date
- 2026-06-09
AI Technical Summary
In the process of retrieving massive amounts of data in the financial field, existing technologies rely on keyword matching, resulting in low retrieval accuracy, an inability to effectively understand data semantics and business context, and difficulty in meeting complex, ambiguous, and multi-intent retrieval needs.
A multi-agent collaborative working mechanism is adopted, including a parsing agent, a semantic agent, a contextual agent, and a retrieval agent. Through parsing, semantic expansion, contextual optimization, and cognitive consistency scoring, retrieval accuracy is improved.
It achieves accuracy, relevance, and logical coherence in complex information retrieval tasks, significantly improving the accuracy of retrieval results.
Smart Images

Figure CN122173530A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a retrieval method, apparatus, device, and medium based on multiple agents. Background Technology
[0002] In the financial sector, with the deepening digital transformation of property insurance, massive amounts of structured and unstructured data are being generated and accumulated at an unprecedented rate. This data encompasses multiple dimensions, including customer information, policy data, claims records, risk assessment reports, market dynamics, industry news, and even social media information. While keyword-based retrieval techniques can be effective for simple and clear queries, they fall short when faced with the increasingly complex, ambiguous, and multi-intent-driven retrieval needs in property insurance. Relying solely on keyword matching, without understanding the semantics and business context of the data, results in low retrieval accuracy. Therefore, improving retrieval accuracy in the process of retrieving massive amounts of data has become a pressing issue. Summary of the Invention
[0003] In view of this, embodiments of this application provide a multi-agent-based retrieval method, apparatus, device, and medium to solve the problem of low retrieval accuracy in the process of retrieving massive amounts of data.
[0004] In a first aspect, embodiments of this application provide a multi-agent-based retrieval method, the retrieval method comprising: The system acquires retrieval input data, an initial dynamic cognitive graph, and preset intelligent agents. The nodes of the initial dynamic cognitive graph are cognitive seeds, and the preset intelligent agents include parsing agents, semantic agents, context agents, retrieval agents, and recommendation agents. The parsing agent parses the retrieval input data to obtain retrieval cognitive seeds and corresponding initial query statements, and writes the retrieval cognitive seeds into the initial dynamic cognitive graph to obtain the updated dynamic cognitive graph. The semantic agent performs semantic expansion on the cognitive seeds in the updated dynamic cognitive graph to obtain the corresponding expanded semantic information. The context agent optimizes the initial query statement based on the expanded semantic information and the updated dynamic cognitive graph to obtain the optimized query statement; The retrieval agent queries the updated dynamic cognitive graph according to the optimized query statement to obtain the corresponding candidate cognitive seed paths; The recommending agent performs cognitive consistency scoring on the candidate cognitive seed paths to obtain a score value for each candidate cognitive seed path, and determines the candidate cognitive seed path with the highest score value as the retrieval result of the retrieval input data.
[0005] Secondly, embodiments of this application provide a multi-agent-based retrieval device, the retrieval device comprising: The acquisition module is used to acquire retrieval input data, an initial dynamic cognitive graph, and preset intelligent agents. The nodes of the initial dynamic cognitive graph are cognitive seeds, and the preset intelligent agents include parsing intelligent agents, semantic intelligent agents, context intelligent agents, retrieval intelligent agents, and recommendation intelligent agents. The parsing module is used by the parsing agent to parse the retrieval input data, obtain the retrieval cognitive seed and the corresponding initial query statement, and write the retrieval cognitive seed into the initial dynamic cognitive graph to obtain the updated dynamic cognitive graph. The extension module is used by the semantic agent to semantically extend the cognitive seeds in the updated dynamic cognitive graph to obtain the corresponding extended semantic information; The optimization module is used by the context agent to optimize the initial query statement based on the expanded semantic information and the updated dynamic cognitive graph, so as to obtain the optimized query statement. The query module is used by the retrieval agent to query the updated dynamic cognitive graph according to the optimized query statement to obtain the corresponding candidate cognitive seed path; The scoring module is used by the recommending agent to perform cognitive consistency scoring on the candidate cognitive seed paths, obtain a score value for each candidate cognitive seed path, and determine the candidate cognitive seed path with the highest score value as the retrieval result of the retrieval input data.
[0006] Thirdly, embodiments of this application provide a computer device, the computer device including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the retrieval method as described above.
[0007] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the retrieval method as described above.
[0008] The advantages of this application compared to the prior art are: This application achieves intelligent and dynamic retrieval through a multi-agent collaborative mechanism. The parsing agent accurately extracts core retrieval elements and updates the dynamic cognitive graph. The semantic agent performs deep semantic mining and association expansion based on cognitive seeds, effectively breaking through the traditional retrieval's reliance on keywords and improving the breadth and depth of semantic understanding. The contextual agent optimizes the query statement by combining expanded semantics and the dynamic cognitive graph, making the query more closely match the user's true intent and context. The retrieval agent efficiently searches for candidate paths in the updated dynamic cognitive graph, and the recommendation agent selects the optimal result through cognitive consistency scoring, ensuring the accuracy, relevance, and logical coherence of the retrieval results, significantly improving the accuracy of complex information retrieval tasks. Attached Figure Description
[0009] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0010] Figure 1 This is a schematic diagram of the application environment of a multi-agent-based retrieval method provided in an embodiment of this application; Figure 2 This is a flowchart illustrating a multi-agent-based retrieval method provided in an embodiment of this application; Figure 3 This is a schematic diagram of the structure of a multi-agent-based retrieval device provided in an embodiment of this application; Figure 4 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0011] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0012] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0013] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0014] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0015] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."
[0016] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0017] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0018] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.
[0019] Foundational technologies for artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.
[0020] It should be understood that the sequence number of each step in the following embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0021] To illustrate the technical solution of this application, specific embodiments are described below.
[0022] This application provides an embodiment of a multi-agent-based retrieval method, which can be applied to, for example... Figure 1 In this application environment, the client communicates with the server. The client includes, but is not limited to, handheld computers, desktop computers, laptops, ultra-mobile personal computers (UMPCs), netbooks, cloud computing devices, and personal digital assistants (PDAs). The server can be a standalone server or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0023] To illustrate the technical solution of this application, specific embodiments are described below.
[0024] See Figure 2 This is a flowchart illustrating a multi-agent-based retrieval method provided in an embodiment of this application, as shown below. Figure 2 As shown, the multi-agent-based retrieval method may include the following steps.
[0025] S201: Obtain the retrieval input data, the initial dynamic cognitive graph, and the preset agents. The nodes of the initial dynamic cognitive graph are cognitive seeds. The preset agents include parsing agents, semantic agents, context agents, retrieval agents, and recommendation agents.
[0026] In step S201, the input data is multimodal data, which may include text, images, tables, query codes, and other modalities. The initial dynamic cognitive graph is a knowledge network structure with dynamic update capabilities. The cognitive seeds represented by its nodes are the basic building blocks of the graph. The initial dynamic cognitive graph is used to provide an initial cognitive framework and background information for the collaborative work of various agents. The preset agents include parsing agents, semantic agents, context agents, retrieval agents, and recommendation agents.
[0027] In this embodiment, retrieval input data is acquired. This retrieval input data is multimodal data, such as natural language queries input by the user, SQL code, data lineage diagrams, BI report screenshots, or Excel spreadsheets. In the financial and property insurance field, retrieval input data can include user-inputted descriptions of insurance claims, on-site investigation images showing vehicle damage, structured tables recording policy information, SQL code snippets for querying historical payout data, or BI report screenshots displaying the payout rate trends for a specific type of insurance. This multimodal data collectively forms the input foundation for retrieval tasks in the financial and property insurance scenario, meeting the diverse information retrieval needs of different business processes.
[0028] The initial dynamic cognitive graph is based on the dynamic cognitive graph updated after the last retrieval. Its dynamic update feature allows the graph to evolve continuously as the retrieval process progresses, new information is incorporated, and user needs change, thereby continuously optimizing the ability to understand and process retrieval input data.
[0029] The nodes of the initial dynamic cognitive graph are cognitive seeds. Cognitive seeds can include semantic entities such as "time," "region," "indicator," and "business theme"; data formats such as "numerical," "text," and "time series"; code context such as table names, fields, and aggregate functions in SQL; graph structure such as node relationships in a lineage path; user roles and historical behavior patterns, etc. The node types of the initial dynamic cognitive graph include: SemanticNode, DataNode, CodeNode, GraphNode, and CognitiveNode. Specifically, SemanticNode represents semantic concepts (e.g., "claim amount"); DataNode represents real datasets (e.g., "fact_claim"); CodeNode represents SQL code snippets or function calls; GraphNode represents lineage paths (e.g., "customer → claim → policy"); CognitiveNode represents the system's cognitive state (e.g., "Beijing = Beijing Municipality"); and ConflictNode represents cognitive conflicts (e.g., "Beijing" mistakenly used for "Beijing branch"). The edge types of the initial dynamic cognitive graph include: is_a, derived_from, used_in, confused_with, remembered, and consistency_with. Here, is_a represents semantics → data, derived_from represents kinship, used_in represents code reference, confused_with represents cognitive conflict, remembered represents historical cognitive memory, and consistency_with represents a cognitive consistency path.
[0030] It's important to note that these cognitive seeds do not exist in isolation. Instead, they are interconnected through pre-defined association rules and dynamic learning mechanisms, collectively forming the basic framework of the initial dynamic cognitive graph. For example, a "business topic" cognitive seed may be associated with multiple "metric" cognitive seeds, which in turn may be further associated with specific "data formats" and table names and fields within the "code context." Simultaneously, a "user role" cognitive seed establishes a priority association path with "business topics" and "regions" cognitive seeds that the role has historically accessed frequently. "Historical behavior patterns" influence the weight and triggering conditions of associations between cognitive seeds, allowing the graph to better align with the search habits and deeper needs of specific users.
[0031] The pre-defined agents are independent modules with specific functions designed to collaboratively complete retrieval tasks. The parsing agent is primarily responsible for the initial parsing and preprocessing of multimodal retrieval input data, converting data from different modalities into a unified format or feature representation that can be processed by subsequent agents. The semantic agent performs deep semantic understanding of the parsed data, mining the semantic information, contextual relationships, and potential intentions contained within the data. The context agent captures and analyzes contextual information during the retrieval process, including historical search records, user preferences, and the current retrieval task scenario, to provide more targeted contextual support. The retrieval agent, based on the results processed by the parsing, semantic, and context agents, combines the initial dynamic cognitive graph to perform accurate information retrieval and matching. The recommendation agent further optimizes and personalizes the search results based on user needs, improving retrieval efficiency and user experience.
[0032] S202: The parsing agent parses the retrieval input data to obtain the retrieval cognitive seed and the corresponding initial query statement, and writes the retrieval cognitive seed into the initial dynamic cognitive graph to obtain the updated dynamic cognitive graph.
[0033] In step S202, the retrieval cognitive seed is a key information unit extracted from the retrieval input data that can characterize the user's core retrieval intent. It can be entities, concepts, attributes, relationships, or domain-specific terms contained in the retrieval input data. The initial query statement is a standardized textual expression generated based on the semantic features of the retrieval cognitive seed and the retrieval input data, used to initiate a query request to the retrieval system. The retrieval cognitive seed is written into the initial dynamic cognitive graph to obtain the updated dynamic cognitive graph.
[0034] In this embodiment, the analytical agent can first preprocess the retrieval input data. Based on natural language processing technology and deep learning models, such as BERT and LSTM, it performs deep semantic understanding on the preprocessed retrieval input data to identify the entities, concepts, attributes, and relationships contained therein. For example, if the user's retrieval input data is "Recommend several insurance products suitable for families, priced around a yuan", the analytical agent can extract the core entity "insurance product" through entity recognition, and extract the user's attribute requirement for the product, "family", and the price attribute "priced around a yuan" and its specific numerical range through attribute recognition. These extracted entities, attributes, and their corresponding values together constitute the retrieval cognitive seeds in this retrieval scenario.
[0035] When generating the initial query, the parsing agent combines these retrieval cognitive seeds with the overall semantic features of the retrieval input data, such as the user's potential intent (purchase recommendation) and tone (request), and transforms it into a standardized text expression that conforms to the retrieval system interface specifications and query logic, such as "recommendation information on insurance products suitable for families and priced around a yuan". Subsequently, the parsing agent writes the extracted retrieval cognitive seeds into the corresponding nodes and edges in the initial dynamic cognitive graph, thereby updating the initial dynamic cognitive graph. This updated dynamic cognitive graph can more accurately reflect the core cognitive information of the current retrieval task, providing strong cognitive support for the collaborative work of other agents in the future.
[0036] The retrieved cognitive seeds are written into the initial dynamic cognitive graph to obtain the updated dynamic cognitive graph. First, the semantic concepts in the retrieved cognitive seeds are parsed, and corresponding SemanticNode type nodes are created or updated, then connected to relevant DataNode type nodes via the `is_a` edge. If the retrieved cognitive seed contains a dataset identifier, the corresponding DataNode type node is located, and its lineage path with the upstream data source is supplemented via the `derived_from` edge, forming a GraphNode type node. For potential cognitive states in the retrieved cognitive seeds, such as the default cognition of "Beijing" as a city name, a CognitiveNode type node is generated, and connected to historical cognitive memory nodes via the `remembered` edge. Simultaneously, if there is a cognitive conflict between the retrieved cognitive seed and an existing node, such as pointing "Beijing" to "Beijing Branch," a ConflictNode type node is automatically created, connected to the conflicted node via the `confused_with` edge, and the conflict type and confidence level are marked. After the construction of nodes and edges is completed, the system triggers a consistency verification mechanism. By traversing the cognitive consistency path through the consistency_with edge, it ensures that the newly written retrieval cognitive seed has no logical contradiction with the existing cognitive state in the graph, and finally forms a dynamic cognitive graph with real-time cognitive update capability.
[0037] In this embodiment, retrieval cognitive seeds are written into the initial dynamic cognitive graph to obtain an updated dynamic cognitive graph. These retrieval cognitive seeds are the foundation for constructing and updating the dynamic cognitive graph, and they can help the subsequent retrieval process more accurately grasp user needs and ensure the accuracy of the retrieval direction. Optionally, the parsing agent parses the retrieval input data to obtain the retrieval cognitive seed and the corresponding initial query statement, including: Perform semantic recognition on the retrieval input data to obtain the semantic recognition results of the retrieval input data; Based on the preset cognitive seed extraction rules, retrieve cognitive seeds with retrieval value are extracted from the semantic recognition results; Based on the semantic recognition results and combined with the preset query statement template, an initial query statement corresponding to the retrieval input data is automatically generated.
[0038] In this embodiment, semantic recognition is performed on the retrieval input data to obtain the semantic recognition result. Based on preset cognitive seed extraction rules, retrieval cognitive seeds with retrieval value are extracted from the semantic recognition result. The semantic recognition process can be combined with natural language processing techniques, such as using pre-trained language models like BERT to perform contextual semantic understanding on the retrieval input data, identifying key semantic elements such as entities, attributes, relationships, and intentions, forming a structured semantic recognition result. The preset cognitive seed extraction rules can be generated through a combination of manual definition and machine learning. For example, the rules can explicitly list entity information such as names of people, places, and organizations, relationship information such as "belongs to" and "located in," and attribute information such as "altitude" and "time" as cognitive seed extraction objects with retrieval value.
[0039] Based on the semantic recognition results and a pre-defined query template, an initial query statement corresponding to the retrieval input data is automatically generated. This initial query statement is a structured query statement, such as a SPARQL or SQL query statement, which transforms the natural language retrieval input data into machine-executable query instructions. The pre-defined query template can be customized according to different knowledge graph types or database structures. The template contains placeholders corresponding to entities, attributes, and relationships in the semantic recognition results. When generating the initial query statement, retrieval cognitive seeds extracted from the semantic recognition results are filled into the placeholders in the template according to their correspondence, thus completing the conversion from unstructured semantic information to structured query instructions. For example, when the input data is "query universities located in Beijing", semantic recognition obtains the entities "Beijing", "university", and the relation "located in". Then, the location-institution query template containing the relation "located in" is called, and "Beijing" and "university" are filled into the placeholders for "location" and "institution type" in the template, respectively, generating an initial SPARQL query statement such as "SELECT ?university WHERE { ?university<located in><Beijing>. ?university<type><university>}".
[0040] S203: The semantic agent performs semantic expansion on the cognitive seeds in the updated dynamic cognitive graph to obtain the corresponding expanded semantic information.
[0041] In step S203, semantic expansion involves multi-dimensional information expansion of the cognitive seed.
[0042] In this embodiment, based on the existing cognitive seeds in the updated dynamic cognitive graph, the semantic agent expands the cognitive seeds in multiple dimensions through the semantic association rules and knowledge reasoning mechanism built into the semantic agent. For example, if the cognitive seed is the entity "Beijing", the semantic agent can mine attribute information associated with "Beijing" from the dynamic cognitive graph, such as "capital of China", "municipality", "located in North China", etc. If the cognitive seed contains the relation "located", it can be further expanded to include the inverse relation "contains", as well as relations semantically similar to "located", such as "located in" and "located in". Through this semantic expansion process, the originally single cognitive seed is transformed into rich semantic information containing more related entities, attributes, relations and conceptual levels, providing more comprehensive semantic support for subsequent query optimization and accurate retrieval.
[0043] Optionally, the semantic agent semantically expands the cognitive seeds in the updated dynamic cognitive graph to obtain corresponding expanded semantic information, including: For any target cognitive seed in the updated dynamic cognitive graph, the semantic similarity calculation model is used to retrieve entities that are semantically related to the target cognitive seed in the preset knowledge base to obtain the initial associated entities of the target cognitive seed. Contextual semantic recognition is performed on the target cognitive seed to obtain the contextual semantic recognition result; Based on the contextual semantic recognition results, candidate extension items that match the contextual semantic recognition results are determined from the initial associated entities, and the corresponding extended semantic information is obtained.
[0044] In this embodiment, for any target cognitive seed in the updated dynamic cognitive graph, a semantic similarity calculation model is used to retrieve entities semantically associated with the target cognitive seed from a pre-defined knowledge base, thus obtaining the initial associated entities of the target cognitive seed. The semantic similarity calculation model can be a fine-tuned model based on a pre-trained language model (such as BERT, RoBERTa, etc.). This model, through learning from large-scale text corpora, can deeply understand the semantic connotations of words, phrases, and sentences. In the specific calculation process, the target cognitive seed and each entity in the pre-defined knowledge base are first converted into fixed-dimensional semantic vectors. Then, the degree of semantic association between the target cognitive seed and each entity is quantified by calculating the cosine similarity, Euclidean distance, or Manhattan distance between these semantic vectors. The pre-defined knowledge base covers structured and unstructured data such as domain-specific terminology, concept definitions, entity attributes, and typical relationships, ensuring the comprehensiveness and domain relevance of the initial associated entity retrieval.
[0045] Contextual semantic recognition is performed on the target cognitive seeds to obtain the contextual semantic recognition results. In the contextual semantic recognition process, the original text context in which the target cognitive seed is located is first segmented, part-of-speech tagged, and subjected to dependency parsing to extract key contextual information, such as time, location, event background, and domain qualifiers. Based on this contextual semantic recognition result, semantic filtering rules and weight allocation mechanisms are constructed to filter and sort the initial associated entities. Candidate extensions matching the contextual semantic recognition results are determined from the initial associated entities, obtaining the corresponding expanded semantic information. The attribute features and domain labels of the initial associated entities are compared with the contextual semantic recognition results to calculate the matching degree. Entities that conflict with the contextual semantics are eliminated, and highly relevant entities are retained as candidate extensions, obtaining the expanded semantic information of the corresponding target cognitive seed. All target cognitive seeds are traversed to obtain the expanded semantic information of all target cognitive seeds in the updated dynamic cognitive graph.
[0046] In this embodiment, contextual semantic recognition is used to accurately filter initial associated entities, effectively avoiding retrieval biases caused by polysemy or semantic ambiguity, and significantly improving the relevance of retrieval results to the target cognitive seed in a specific context. By dynamically adjusting the weight and scope of entity associations in conjunction with the context, the expanded semantic information better meets the needs of practical application scenarios. This improves the efficiency and accuracy of information retrieval based on cognitive graphs, making it particularly suitable for applications in complex knowledge domains requiring deep semantic understanding.
[0047] S204: The context agent optimizes the initial query statement based on the expanded semantic information and the updated dynamic cognitive graph to obtain the optimized query statement.
[0048] In step S204, optimizing the initial query statement is a process of adjusting and improving the structure, expression, and core elements of the initial query statement in multiple dimensions.
[0049] In this embodiment, the context agent optimizes the initial query statement based on the expanded semantic information and the updated dynamic cognitive graph, resulting in an optimized query statement. Specifically, the context agent performs deep matching and fusion of the expanded semantic information—a set of entities and relationships containing rich contextual associations and domain-specific knowledge—with the updated dynamic cognitive graph. By analyzing the position, connectivity, and weight changes of the core elements in the initial query statement within the dynamic cognitive graph, the context agent can accurately identify potential issues such as ambiguity, missing elements, or structural redundancy in the initial query statement. The context agent then adjusts the surface structure of the query statement to better conform to the expression habits and logical norms of natural language, resulting in the optimized query statement.
[0050] Optionally, the context agent optimizes the initial query statement based on the expanded semantic information and the updated dynamic cognitive graph, resulting in an optimized query statement, including: The expanded semantic information is fused with the updated dynamic cognitive graph to construct an enhanced cognitive graph; Based on the hierarchical structure and logical relationships among the cognitive seeds in the enhanced cognitive graph, the initial query statement is optimized to obtain the optimized query statement.
[0051] In this embodiment, the expanded semantic information is fused with the updated dynamic cognitive graph to construct an enhanced cognitive graph. During the construction of the enhanced cognitive graph, the expanded semantic information is first structured, extracting entities, attributes, relationships, and contextual information, and transforming them into triples or plurals that match the data structure of the dynamic cognitive graph. Simultaneously, the updated dynamic cognitive graph is analyzed, outlining its existing cognitive seed nodes and the existing hierarchical structure and logical connections between nodes to form a basic graph framework. Subsequently, the structured expanded semantic information units are compared with the basic framework of the dynamic cognitive graph. For newly added entities or relationships that do not exist in the dynamic cognitive graph, they are added as new cognitive seed nodes or related edges. For existing entities or relationships, if the expanded semantic information provides richer attribute descriptions or new contextual connections, the weights and types of the original node attributes or edges are updated and supplemented. Ultimately, an enhanced cognitive graph that comprehensively reflects the semantic connotations and cognitive connections in the current query scenario is constructed.
[0052] Based on the hierarchical structure and logical relationships among the cognitive seeds in the enhanced cognitive graph, the initial query is optimized to obtain an optimized query. According to the hierarchical relationships between entity nodes in the enhanced cognitive graph, any ambiguous references or higher-level concepts that may exist in the initial query are refined. Using the logical relationships between cognitive seeds, such as causal relationships and conditional relationships, the retrieval scope and conditions of the initial query are supplemented and constrained. This makes the optimized query more closely match the user's actual search intent, improving the accuracy and effectiveness of the search.
[0053] S205: The retrieval agent queries the updated dynamic cognitive graph based on the optimized query statement to obtain the corresponding candidate cognitive seed paths.
[0054] In step S205, the candidate cognitive seed path is a path that contains at least two nodes and whose edges must conform to the definition of the edge type mentioned above.
[0055] In this embodiment, the retrieval agent queries the updated dynamic cognitive graph based on the optimized query statement to obtain corresponding candidate cognitive seed paths. Candidate cognitive seed paths refer to the initial set of paths retrieved from the dynamic cognitive graph that are associated with the optimized query statement. These paths consist of multiple nodes connected by edges and can initially reflect the relationships between core elements involved in the query request, such as semantic concepts, data, code, and lineage relationships. For example, if the optimized query statement is "Query the claim amount data for customers in Beijing," the retrieval agent might match a path from the dynamic cognitive graph that starts with the "customer" SemanticNode, passes through the "claim" GraphNode (corresponding to the lineage path "customer → claim"), connects to the "claim amount" SemanticNode, and is associated with the "fact_claim" DataNode through the "is_a" edge. This path also includes the "Beijing" CognitiveNode (ensuring cognitive consistency with "Beijing" through the "consistency_with" edge), and is selected as one of the candidate cognitive seed paths.
[0056] Optionally, the retrieval agent queries the updated dynamic cognitive graph based on the optimized query statement to obtain corresponding candidate cognitive seed paths, including: Based on the optimized query statement, determine the query keywords, the semantic weight of the query keywords, and the correlation strength between each query keyword; In the updated dynamic cognitive graph, query and match candidate cognitive seed paths with query keywords, semantic weights, and association strengths.
[0057] In this embodiment, the optimized query statement is segmented into words, and words or phrases with practical meaning are extracted using natural language processing technology as initial candidate query keywords. For example, in the query "query data on claims amount for customers in Beijing", "Beijing", "customers", "claims amount", and "data" are initially extracted. The initial candidate keywords are then screened and optimized, removing function words or repetitive concepts that have no practical retrieval meaning. For example, "data" can be considered a general expression in this context, and its retention can be determined based on the specific application scenario. If the focus is on the core business entity, then "Beijing", "customers", and "claims amount" are determined as the final query keywords.
[0058] The semantic weight of query keywords is a quantitative indicator that measures the importance of each query keyword in the retrieval task. Its value directly reflects the contribution of the corresponding keyword to the expression of the query intent. When determining the semantic weight of query keywords, the frequency and importance of each query keyword in the domain knowledge can be considered. Specifically, the frequency of each query keyword in the domain knowledge is statistically analyzed. The semantic relevance between the query keywords and the user's query intent is analyzed, and the cosine similarity between each query keyword and the overall semantic vector of the optimized query statement is calculated using semantic similarity calculation models (such as Word2Vec, BERT, etc.). The higher the similarity, the more important the query keyword. The frequency and cosine similarity of each query keyword are normalized, and the normalized frequency and the normalized cosine similarity are added together to obtain the semantic weight of the query keyword. For example, "Beijing area" is a geographical attribute term that limits the scope of the search and plays a crucial role in accurately locating the search area; its weight should be appropriately reflected in this calculation. Taking "querying claims amount data for customers in Beijing" as an example, after comprehensive evaluation, the semantic weight of "claims amount" can be set to the highest, as it directly points to the core data target of the query; the semantic weight of "Beijing region" is second, used to limit the spatial scope of the data. By assigning differentiated semantic weights to different keywords, the retrieval system can prioritize the entities and relationships corresponding to high-weight keywords in the subsequent cognitive seed path matching process, thereby more accurately capturing the user's true query needs.
[0059] By constructing a keyword co-occurrence matrix, the frequency of co-occurrence of query keywords in historical query data or domain corpora is statistically analyzed. This, combined with parameters such as path length and relation type weights between entities in the updated dynamic cognitive graph, is used to calculate the association strength value. A higher frequency of co-occurrence of query keywords, shorter query keyword path lengths, and greater relation type weights result in a stronger association strength value.
[0060] In the updated dynamic cognitive graph, candidate cognitive seed paths matching query keywords, semantic weights, and association strengths are queried. Based on the semantic weights of each query keyword, the corresponding entity nodes are located in the updated dynamic cognitive graph, prioritizing entities corresponding to high-weight keywords as the starting point for retrieval. Subsequently, the paths between entity nodes within the retrieval range are filtered based on the association strength values between keywords. For keyword combinations with high association strength values, priority is given to exploring connection paths between their corresponding entity nodes that are shorter in length and have higher relation type weights, and these paths serve as the main source of candidate cognitive seed paths. For keyword combinations with relatively low association strength values but complementary semantic weights, their corresponding potential paths are also retained to avoid missing potentially effective retrieval paths.
[0061] Optionally, in the updated dynamic cognitive graph, candidate cognitive seed paths that match the query keywords, semantic weights, and association strengths are queried, including: Based on the semantic weight of each query keyword, the initial cognitive seed node that semantically matches each query keyword is located in the updated dynamic cognitive graph, thus obtaining the initial cognitive seed node set. Based on the association strength and the updated dynamic cognitive graph, the semantic association degree between each initial cognitive seed node in the initial cognitive seed node set is calculated; Candidate cognitive seed paths are constructed based on the semantic correlation between each node.
[0062] In this embodiment, a threshold for matching each query keyword is determined based on its semantic weight. For core query keywords with high semantic weight, the threshold can be set to a larger value, such as 0.85, to ensure that the selected nodes have a very high semantic relevance to the keyword. For auxiliary query keywords with lower semantic weight, the threshold can be set to a smaller value, such as 0.7, to retain more potential relevant nodes.
[0063] For any query keyword, calculate the cosine similarity between its semantic vector and the semantic vectors of all entity nodes in the updated dynamic cognitive graph to obtain a similarity value. Based on the similarity value and the threshold of the corresponding query keyword, include all entity nodes that are higher than the corresponding threshold into the initial cognitive seed nodes of the query keyword. Finally, perform a union operation on the candidate node subsets of all query keywords to obtain the preliminary initial cognitive seed node set.
[0064] The existing association edge attributes between each initial cognitive seed node are extracted from the updated dynamic cognitive graph, including association type, association frequency, and association weight. Based on these attributes, the initial semantic association degree between each initial cognitive seed node is determined. The association strength between each query keyword is defined as the initial weight between nodes in the initial cognitive seed node set; that is, the initial weight between nodes in the initial cognitive seed node set is equal to the association strength between the query keywords corresponding to each node. The initial semantic association degrees are then weighted according to these initial weights to obtain the semantic association degree between each initial cognitive seed node in the initial cognitive seed node set.
[0065] When constructing candidate cognitive seed paths based on the semantic relevance between nodes, a path search strategy based on a greedy algorithm can be adopted. Specifically, the pair of nodes with the highest semantic relevance in the initial cognitive seed node set is selected as the starting point and the first intermediate node (or ending point) of the path, forming the initial segment of the path. Next, from the remaining nodes, the node with the highest semantic relevance to the current path's ending node is searched and added to the path, forming a longer path segment. During each expansion step, it is necessary to determine whether the newly formed path has a closed loop (i.e., nodes appearing repeatedly). If a closed loop exists, the expansion direction is discarded, and the node with the second highest relevance is tried. Simultaneously, a maximum path length limit is set (e.g., 5 nodes) to avoid excessively long paths leading to information redundancy and decreased retrieval efficiency. When no node that meets the relevance threshold and does not form a closed loop can be found for expansion, or when the path length reaches the maximum value, the construction of the current path is stopped. The above process is repeated for all possible node pairs in the initial cognitive seed node set to generate multiple potential paths, resulting in candidate cognitive seed paths. S206: The recommending agent performs cognitive consistency scoring on the candidate cognitive seed paths to obtain a score value for each candidate cognitive seed path, and determines the candidate cognitive seed path with the highest score value as the retrieval result of the retrieval input data.
[0066] In step S206, the cognitive consistency scoring process aims to evaluate the degree of matching between candidate cognitive seed paths and the user's potential cognitive patterns, knowledge background, and retrieval intent. The score value characterizes the extent to which candidate cognitive seed paths conform to the user's potential cognitive logic, existing knowledge system architecture, and actual retrieval needs demonstrated during the information retrieval process.
[0067] In this embodiment, the recommendation agent performs quantitative analysis on each candidate path from three dimensions: semantic coherence, logical consistency, and knowledge relevance. In terms of semantic coherence, the semantic similarity between adjacent nodes in the path is calculated, and combined with the semantic fluency score of the entire path, ensuring natural connection at the linguistic level. The logical consistency dimension focuses on examining the rationality of logical connections such as causal and subordinate relationships between nodes in the path, introducing a logical reasoning chain integrity evaluation index to avoid contradictions or abrupt logical breaks. The knowledge relevance dimension compares the nodes in the path with a preset domain knowledge graph and the user's historical retrieval cognitive model, calculating the overlap between the knowledge contained in the path and the user's known information, as well as the potential knowledge expansion value. The recommendation agent weights and fuses the evaluation results of these three dimensions, where the weight coefficients can be dynamically adjusted based on the user's historical interaction data and the current retrieval scenario, ultimately generating a score for each candidate cognitive seed path. The candidate cognitive seed path with the highest score is determined as the retrieval result for the input data.
[0068] Optionally, the recommending agent performs cognitive consistency scoring on the candidate cognitive seed paths to obtain a score value for each candidate cognitive seed path, including: For any candidate cognitive seed path, obtain historical search results, and calculate the historical matching degree of the candidate cognitive seed path based on the historical search results and the candidate cognitive seed path. Obtain the cognitive seed path length of the candidate cognitive seed path; Obtain the integrity of each node in the candidate cognitive seed path, and calculate the lineage integrity of the candidate cognitive seed path based on the integrity of each node. The score of the candidate cognitive seed path is calculated based on the historical matching degree, cognitive seed path length and lineage integrity.
[0069] In this embodiment, for any candidate cognitive seed path, historical search results are obtained, and the ratio of search records with the same path as the candidate cognitive seed path in the historical search results to the total search records is calculated to obtain the historical matching degree of the candidate cognitive seed path. Specifically, when calculating the ratio of search records with the same path as the candidate cognitive seed path in the historical search results to the total search records, if the number of nodes in the historical search results that share the same cognitive seed as the candidate cognitive seed path is greater than a preset threshold, it is considered that the historical search results are identical to the candidate cognitive seed path.
[0070] Obtain the length of the cognitive seed path of the candidate cognitive seed path, that is, count the number of cognitive seeds in the candidate cognitive seed path.
[0071] The integrity of each node in the candidate cognitive seed path is obtained. Based on the integrity of each node, the lineage integrity of the candidate cognitive seed path is calculated. The integrity of a node is determined by comprehensively evaluating multiple dimensions, including the attribute completeness of the cognitive seeds it contains, the validity of associated data, and the historical update frequency. Attribute completeness is... The attribute completeness of a node is the ratio of the actual number of preset core attributes to the total number of preset attributes. For example, if a cognitive seed has five preset core attributes (name, type, source, creation time, and associated object), but the node only has three (name, type, and creation time) filled, then its attribute completeness is 3 / 5 = 0.6.
[0072] The validity of associated data characterizes the overall compliance of the associated data of the cognitive seeds contained in the node in terms of logical consistency, source reliability, and matching degree with core attributes. Logical consistency can be judged by verifying whether there are contradictions in the numerical relationships, time sequence, or causal relationships between the fields within the associated data. Source reliability can be assessed based on whether the source of the associated data is an authoritative institution, a trusted database, or a certified information source. The matching degree of core attributes is determined by comparing whether the description content of the associated data conforms to the definition scope of the core attribute of the cognitive seed.
[0073] Based on the integrity of each node, the mean of the integrity of each node in the candidate cognitive seed path is calculated, and the corresponding mean is determined as the lineage integrity of the candidate cognitive seed path.
[0074] Based on historical matching degree, cognitive seed path length, and lineage integrity, the score of the candidate cognitive seed path is calculated using the following formula: in, The score for candidate cognitive seed paths, The historical matching degree of candidate cognitive seed paths, The length of the cognitive seed path for the candidate cognitive seed path. To ensure the lineage integrity of candidate cognitive seed pathways, , and These are the learnable weight values.
[0075] After retrieval, the updated dynamic cognitive map is optimized to facilitate subsequent retrieval. During optimization, the entropy value of the updated dynamic cognitive map is calculated using the following formula: Where G represents the updated dynamic cognitive graph. Let V be the entropy value of the updated dynamic cognitive map. The node, Let V be the probability distribution of node V, representing the proportion of node weight to the total weight of all nodes. If the entropy value of the updated dynamic cognitive graph exceeds a preset threshold, "cognitive reconstruction" is initiated. This involves re-aggregating overly dispersed cognitive resources, establishing clear knowledge focuses and hierarchies, and improving the graph's reasoning efficiency and cognitive service accuracy. During cognitive reconstruction, similar cognitive paths can be clustered, and the probability distribution of each node in the dynamic cognitive graph can be reassessed. Node weights are adjusted by combining historical interaction data, current domain knowledge updates, and new associations generated during multi-agent collaboration, ensuring that the node weight proportions better align with actual cognitive needs. Based on the adjusted node probability distribution, cognitive paths in the graph are streamlined, redundant paths are identified and removed, broken paths are repaired, and the connection strength of high-value cognitive paths is strengthened to reduce the overall uncertainty of the graph. This allows the dynamic cognitive graph to maintain information richness while possessing better retrieval efficiency and accuracy.
[0076] This application achieves intelligent and dynamic retrieval through a multi-agent collaborative mechanism. The parsing agent accurately extracts core retrieval elements and updates the dynamic cognitive graph. The semantic agent performs deep semantic mining and association expansion based on cognitive seeds, effectively breaking through the traditional retrieval's reliance on keywords and improving the breadth and depth of semantic understanding. The contextual agent optimizes the query statement by combining expanded semantics and the dynamic cognitive graph, making the query more closely match the user's true intent and context. The retrieval agent efficiently searches for candidate paths in the updated dynamic cognitive graph, and the recommendation agent selects the optimal result through cognitive consistency scoring, ensuring the accuracy, relevance, and logical coherence of the retrieval results, significantly improving the accuracy of complex information retrieval tasks.
[0077] Please see Figure 3 , Figure 3 This is a schematic diagram of a multi-agent-based retrieval device according to an embodiment of this application. This multi-agent-based retrieval device corresponds one-to-one with the multi-agent-based retrieval methods described in the above embodiments. Please refer to [link / reference] for details. Figure 2 as well as Figure 2 The relevant descriptions in the corresponding embodiments are shown below. For ease of explanation, only the parts relevant to this embodiment are shown. See also... Figure 3 The multi-agent retrieval device 30 includes: an acquisition module 31, a parsing module 32, an expansion module 33, an optimization module 34, a query module 35, and a scoring module 36.
[0078] The acquisition module 31 is used to acquire retrieval input data, an initial dynamic cognitive graph, and preset intelligent agents. The nodes of the initial dynamic cognitive graph are cognitive seeds, and the preset intelligent agents include parsing intelligent agents, semantic intelligent agents, context intelligent agents, retrieval intelligent agents, and recommendation intelligent agents. The parsing module 32 is used to parse the intelligent agent's retrieval input data, obtain the retrieval cognitive seed and the corresponding initial query statement, and write the retrieval cognitive seed into the initial dynamic cognitive graph to obtain the updated dynamic cognitive graph. Extension module 33 is used by the semantic agent to semantically expand the cognitive seeds in the updated dynamic cognitive graph to obtain the corresponding expanded semantic information; Optimization module 34 is used by the context agent to optimize the initial query statement based on the expanded semantic information and the updated dynamic cognitive graph, so as to obtain the optimized query statement; Query module 35 is used to retrieve the corresponding candidate cognitive seed paths by querying the updated dynamic cognitive graph according to the optimized query statement; The scoring module 36 is used to perform cognitive consistency scoring on the candidate cognitive seed paths of the recommendation agent, obtain the score value of each candidate cognitive seed path, and determine the candidate cognitive seed path with the highest score value as the retrieval result of the retrieval input data.
[0079] Optionally, the parsing module 32 mentioned above includes: The recognition unit is used to perform semantic recognition on the retrieval input data and obtain the semantic recognition result of the retrieval input data. The extraction unit is used to extract retrieval cognitive seeds with retrieval value from the semantic recognition results according to the preset cognitive seed extraction rules. The generation unit is used to automatically generate an initial query statement corresponding to the retrieval input data based on the semantic recognition results and a preset query statement template.
[0080] Optionally, the above-mentioned extension module 33 includes: The first computing unit is used to retrieve entities semantically associated with the target cognitive seed in a preset knowledge base for any target cognitive seed in the updated dynamic cognitive graph using a semantic similarity calculation model, so as to obtain the initial associated entities of the target cognitive seed. The unit is used to perform contextual semantic recognition on the target cognitive seed and obtain the contextual semantic recognition result. The extension unit is used to determine candidate extension items that match the context semantic recognition results from the initial associated entities based on the context semantic recognition results, and to obtain the corresponding extended semantic information.
[0081] Optionally, the optimization module 34 mentioned above includes: The fusion unit is used to fuse the expanded semantic information with the updated dynamic cognitive graph to construct an enhanced cognitive graph; The optimization unit is used to optimize the initial query statement based on the hierarchical structure and logical relationships between the cognitive seeds of the enhanced cognitive graph, so as to obtain the optimized query statement.
[0082] Optionally, the query module 35 mentioned above includes: The determination unit is used to determine the query keywords, the semantic weights of the query keywords, and the association strength between each query keyword based on the optimized query statement. The matching unit is used to query candidate cognitive seed paths that match the query keywords, semantic weights, and association strengths in the updated dynamic cognitive graph.
[0083] Optionally, the matching unit mentioned above includes: The positioning subunit is used to locate the initial cognitive seed node that semantically matches each query keyword in the updated dynamic cognitive graph based on the semantic weight of each query keyword, and obtain the initial cognitive seed node set. The computational subunit is used to calculate the semantic association degree between each initial cognitive seed node in the initial cognitive seed node set based on the association strength and the updated dynamic cognitive graph. Construct sub-units to build candidate cognitive seed paths based on the semantic correlation between nodes.
[0084] Optionally, the scoring module 36 mentioned above includes: The first acquisition unit is used to acquire historical search results for any candidate cognitive seed path, and calculate the historical matching degree of the candidate cognitive seed path based on the historical search results and the candidate cognitive seed path. The second acquisition unit is used to acquire the cognitive seed path length of the candidate cognitive seed path; The third acquisition unit is used to acquire the integrity of each node in the selected cognitive seed path, and calculate the lineage integrity of the candidate cognitive seed path based on the integrity of each node. The second calculation unit is used to calculate the score of the candidate cognitive seed path based on the historical matching degree, cognitive seed path length and lineage integrity.
[0085] It should be noted that the information interaction and execution process between the above-mentioned units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, which will not be repeated here.
[0086] Figure 4 This is a schematic diagram of the structure of a computer device provided in one embodiment of this application. For example... Figure 4 As shown, the computer device of this embodiment includes: at least one processor ( Figure 4Only one is shown in the diagram), a memory, and a computer program stored in the memory and executable on at least one processor, which, when executed by the processor, implements the steps in any of the above embodiments of the multi-agent-based retrieval methods.
[0087] This computer device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that... Figure 4 The examples of computer devices are merely examples and do not constitute a limitation on computer devices. Computer devices may include more or fewer components than shown in the illustration, or combinations of certain components, or different components, such as network interfaces, displays, and input devices.
[0088] The processor referred to can be a CPU, but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0089] Memory includes readable storage media, internal memory, etc., wherein internal memory can be the RAM of a computer device, providing an environment for the operation of the operating system and computer-readable instructions stored in the readable storage media. The readable storage media can be the hard drive of a computer device, or in other embodiments, it can be an external storage device of the computer device, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, memory can include both internal storage units and external storage devices of the computer device. Memory is used to store the operating system, applications, bootloader, data, and other programs, such as program code for computer programs. Memory can also be used to temporarily store data that has been output or will be output.
[0090] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above device can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here. If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the above method embodiments. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. A computer-readable medium can include at least: any entity or device capable of carrying computer program code, a recording medium, a computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.
[0091] The implementation of all or part of the processes in the methods of the above embodiments can also be accomplished by a computer program product. When the computer program product is run on a computer device, it enables the computer device to execute the steps in the above method embodiments.
[0092] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0093] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0094] In the embodiments provided in this application, it should be understood that the disclosed apparatus / computer devices and methods can be implemented in other ways. For example, the apparatus / computer device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0095] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0096] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A retrieval method based on multi-agent intelligence, characterized in that, The retrieval method includes: The system acquires retrieval input data, an initial dynamic cognitive graph, and preset intelligent agents. The nodes of the initial dynamic cognitive graph are cognitive seeds, and the preset intelligent agents include parsing agents, semantic agents, context agents, retrieval agents, and recommendation agents. The parsing agent parses the retrieval input data to obtain retrieval cognitive seeds and corresponding initial query statements, and writes the retrieval cognitive seeds into the initial dynamic cognitive graph to obtain the updated dynamic cognitive graph. The semantic agent performs semantic expansion on the cognitive seeds in the updated dynamic cognitive graph to obtain the corresponding expanded semantic information. The context agent optimizes the initial query statement based on the expanded semantic information and the updated dynamic cognitive graph to obtain the optimized query statement; The retrieval agent queries the updated dynamic cognitive graph according to the optimized query statement to obtain the corresponding candidate cognitive seed paths; The recommending agent performs cognitive consistency scoring on the candidate cognitive seed paths to obtain a score value for each candidate cognitive seed path, and determines the candidate cognitive seed path with the highest score value as the retrieval result of the retrieval input data.
2. The retrieval method as described in claim 1, characterized in that, The parsing agent parses the retrieval input data to obtain the retrieval cognitive seed and the corresponding initial query statement, including: Perform semantic recognition on the search input data to obtain the semantic recognition result of the search input data; According to the preset cognitive seed extraction rules, retrieval cognitive seeds with retrieval value are extracted from the semantic recognition results; Based on the semantic recognition results and combined with the preset query statement template, an initial query statement corresponding to the retrieval input data is automatically generated.
3. The retrieval method as described in claim 1, characterized in that, The semantic agent performs semantic expansion on the cognitive seeds in the updated dynamic cognitive graph to obtain corresponding expanded semantic information, including: For any target cognitive seed in the updated dynamic cognitive graph, a semantic similarity calculation model is used to retrieve entities that are semantically associated with the target cognitive seed in a preset knowledge base to obtain the initial associated entities of the target cognitive seed. Contextual semantic recognition is performed on the target cognitive seed to obtain the contextual semantic recognition result; Based on the context semantic recognition result, candidate extension items matching the context semantic recognition result are determined from the initial associated entities to obtain the corresponding extended semantic information.
4. The retrieval method as described in claim 1, characterized in that, The context agent optimizes the initial query statement based on the expanded semantic information and the updated dynamic cognitive graph, resulting in an optimized query statement, including: The expanded semantic information is fused with the updated dynamic cognitive graph to construct an enhanced cognitive graph; Based on the hierarchical structure and logical relationships among the cognitive seeds in the enhanced cognitive graph, the initial query statement is optimized to obtain an optimized query statement.
5. The retrieval method as described in claim 1, characterized in that, The retrieval agent queries the updated dynamic cognitive graph according to the optimized query statement to obtain the corresponding candidate cognitive seed paths, including: Based on the optimized query statement, determine the query keywords, the semantic weight of the query keywords, and the association strength between each query keyword; In the updated dynamic cognitive graph, query candidate cognitive seed paths that match the query keywords, the semantic weights, and the association strengths.
6. The retrieval method as described in claim 5, characterized in that, The step of querying candidate cognitive seed paths in the updated dynamic cognitive graph that match the query keywords, the semantic weights, and the association strength includes: Based on the semantic weight of each query keyword, the initial cognitive seed node that semantically matches each query keyword is located in the updated dynamic cognitive graph, thus obtaining the initial cognitive seed node set. Based on the association strength and the updated dynamic cognitive graph, the semantic association degree between each initial cognitive seed node in the initial cognitive seed node set is calculated; Candidate cognitive seed paths are constructed based on the semantic correlation between each node.
7. The retrieval method as described in claim 1, characterized in that, The recommending agent performs cognitive consistency scoring on the candidate cognitive seed paths to obtain a score value for each candidate cognitive seed path, including: For any candidate cognitive seed path, obtain historical search results, and calculate the historical matching degree of the candidate cognitive seed path based on the historical search results and the candidate cognitive seed path. Obtain the cognitive seed path length of the candidate cognitive seed path; The integrity of each node in the selected cognitive seed path is obtained, and the lineage integrity of the candidate cognitive seed path is calculated based on the integrity of each node. The score of the candidate cognitive seed path is calculated based on the historical matching degree, the cognitive seed path length, and the lineage integrity.
8. A retrieval device based on multiple agents, characterized in that, The retrieval device includes: The acquisition module is used to acquire retrieval input data, an initial dynamic cognitive graph, and preset intelligent agents. The nodes of the initial dynamic cognitive graph are cognitive seeds, and the preset intelligent agents include parsing intelligent agents, semantic intelligent agents, context intelligent agents, retrieval intelligent agents, and recommendation intelligent agents. The parsing module is used by the parsing agent to parse the retrieval input data, obtain the retrieval cognitive seed and the corresponding initial query statement, and write the retrieval cognitive seed into the initial dynamic cognitive graph to obtain the updated dynamic cognitive graph. The extension module is used by the semantic agent to semantically extend the cognitive seeds in the updated dynamic cognitive graph to obtain the corresponding extended semantic information; The optimization module is used by the context agent to optimize the initial query statement based on the expanded semantic information and the updated dynamic cognitive graph, so as to obtain the optimized query statement. The query module is used by the retrieval agent to query the updated dynamic cognitive graph according to the optimized query statement to obtain the corresponding candidate cognitive seed path; The scoring module is used by the recommending agent to perform cognitive consistency scoring on the candidate cognitive seed paths, obtain a score value for each candidate cognitive seed path, and determine the candidate cognitive seed path with the highest score value as the retrieval result of the retrieval input data.
9. A computer device, characterized in that, The computer device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the retrieval method as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the retrieval method as described in any one of claims 1 to 7.