Multi-agent collaborative interaction method and system for user preference modeling

By employing multi-agent collaborative interaction methods and graph retrieval-enhanced generation techniques, a dynamically weighted knowledge graph is constructed, which solves the problems of low information extraction efficiency and insufficient flexibility in user preference modeling, and achieves efficient and accurate personalized recommendations.

CN121233853BActive Publication Date: 2026-03-20UNIV OF SCI & TECH OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511791105.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-01
Publication Date
2026-03-20
Estimated Expiration
2045-12-01

AI Technical Summary

Technical Problem

Existing user preference modeling methods struggle to capture users' deep, multi-dimensional, and complex interests, leading to discrepancies between recommended content and users' true intentions. Furthermore, they suffer from low information extraction efficiency and insufficient flexibility.

Method used

A multi-agent collaborative interaction approach is adopted, which uses agents for web information retrieval, user preference graph construction, and personalized content generation. Combined with large language models and graph retrieval-enhanced generation technology, a dynamically weighted knowledge graph is constructed to achieve efficient and accurate information acquisition and personalized recommendations.

Benefits of technology

It improves information processing efficiency, can dynamically capture changes in user interests, and provides accurate and timely personalized services. It also has modular characteristics and can adapt to complex application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121233853B_ABST
    Figure CN121233853B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of information retrieval, and discloses a multi-agent collaborative interaction method and system for user preference modeling; the method comprises the following steps: receiving a user's historical query instruction and target webpage HTML source code, dividing the HTML source code into code lines and assigning line numbers, identifying a line number interval related to the query instruction based on a large language model, extracting the content of the corresponding line and converting the content into standard text; receiving a user identifier and the standard text, performing entity extraction, and constructing a dynamic weighted knowledge graph with the user as a center node; receiving a user real-time request, retrieving a context subgraph from the knowledge graph, combining webpage key information provided by a webpage information retrieval intelligent agent, constructing a prompt word, and using a large language model to generate personalized content for the user; the application can more accurately and dynamically perform user preference modeling, and has a wide application prospect in the fields of personalized recommendation, intelligent search, dialogue systems and the like.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of information retrieval, and in particular to a multi-agent collaborative interaction method and system for user preference modeling. BACKGROUND

[0002] With the explosive growth of Internet information and the popularity of personalized services, how to accurately understand and predict user preferences has become a core challenge to improve user experience and business value. Traditional user preference modeling methods, such as collaborative filtering or content-based methods, have limitations in dealing with data sparsity, cold start, and dynamic changes in user interest. They often fail to capture users' deep, multi-dimensional complex interests, resulting in a deviation between the recommended or returned content and the user's true intention.

[0003] In recent years, generative artificial intelligence technology centered on large language models (LLM) has made significant breakthroughs. Among them, retrieval-augmented generation (RAG) technology improves the relevance and accuracy of generated content by introducing an external knowledge base. To better organize and associate information, researchers have further explored the use of knowledge graphs, such as graph retrieval-augmented generation (GraphRAG) technology, which helps models understand complex relationships between entities by constructing local knowledge graphs. In addition, due to the timeliness of information and the wide coverage of network information, large language models and retrieval-augmented generation systems need to obtain high-quality data from vast amounts of heterogeneous web information. Existing web content extraction techniques generally have defects and cannot meet the demand for high-quality information supply. For example:

[0004] (1) Generative extraction model: generates all parts of the extracted content through a language model, resulting in slower speed and lower efficiency as the amount of extracted content increases.

[0005] (2) Similarity-based retrieval method: this method filters text blocks based on similarity, but cannot understand structured information (such as body, navigation bar, etc.) of web pages, often incorrectly retaining or discarding text due to the limitations of similarity calculation. Some methods also trim the content to a fixed length, lacking flexibility and easily leading to insufficient information extraction or residual invalid information. SUMMARY

[0006] To solve the above technical problems, the application provides a multi-agent collaborative interaction method and system for user preference modeling. By designing a collaborative system composed of multiple agents that perform different functions such as web information retrieval, user preference graph construction, and personalized content generation, the bottleneck of information acquisition is solved, and dynamic, deep, and accurate modeling of user preferences is achieved, thereby providing higher quality personalized services.

[0007] To solve the above technical problems, the application adopts the following technical solutions:

[0008] In a first aspect, the application provides a multi-agent collaborative interaction method for user preference modeling, comprising:

[0009] Through the web information retrieval agent, the user's historical query instructions and the target web HTML source code are received, the HTML source code is segmented into code lines and assigned line numbers, the line number interval related to the query instruction is identified based on the large language model, the corresponding code lines are extracted and converted into standard text;

[0010] Through the user preference graph construction agent, the standard text is received, entity extraction is performed, and a dynamic weighted knowledge graph is constructed with the user as the center node. The preference weight of the edge in the knowledge graph is calculated based on the user interaction frequency, time decay, and quantitative score of sentiment orientation;

[0011] Through the personalized content generation agent, the user's real-time request is received, the context subgraph is retrieved from the knowledge graph, and the web key information provided by the web information retrieval agent is combined to construct a prompt word, and a large language model is used to generate personalized content for the user.

[0012] In one embodiment, the HTML source code is segmented into code lines and assigned line numbers, specifically including:

[0013] The HTML source code is segmented into independent code lines according to the tag structure, and each code line is assigned a unique and continuous line number.

[0014] In one embodiment, the line number interval related to the query instruction is identified based on the large language model, and the corresponding code lines are extracted and converted into standard text, specifically including:

[0015] The sequence of code lines with line numbers is input into the large language model along with the user's query instruction, the title of the target web page, and the uniform resource locator; the large language model understands the semantics of each code line and the role of the code line in the entire web structure, and outputs the line number interval of the information related to the user's query instruction;

[0016] Parse the line number range returned by the large language model, extract the corresponding HTML source code from the sequence of code lines based on the line number range, and convert it into standard text.

[0017] In one embodiment, the construction of a dynamically weighted knowledge graph centered on the user, wherein the preference weights of the edges in the knowledge graph are calculated based on quantitative scores of user interaction frequency, time decay, and sentiment tendency, specifically includes:

[0018] Using users as central nodes and extracted entities as non-central nodes, a knowledge graph is constructed by defining the relationships between users and entities, as well as the relationships between entities, as edges. The edges in the knowledge graph are assigned dynamically changing preference weights. :

[0019] ;

[0020] , and Representing users respectively With entity Quantitative score of interaction frequency, users For entities The quantitative score of the degree of sentiment tendency decay over time and user For entities A quantitative score of the degree of emotional tendency. These are the weighting coefficients.

[0021] In one embodiment, the method further includes: a user preference graph construction agent analyzing the knowledge graph using a graph analysis algorithm to identify the user's potential interest tags.

[0022] In one embodiment, retrieving a context subgraph from the knowledge graph specifically includes:

[0023] Extracting core entities from real-time user requests core entity In knowledge graph Starting from the corresponding node in the knowledge graph, the preference weights in the knowledge graph are greater than a set threshold. Expand the edges, with a maximum expansion depth not exceeding d, to obtain the context subgraph. , This indicates an operation to retrieve data from a knowledge graph.

[0024] In one embodiment, the key webpage information provided by the webpage information retrieval agent specifically includes:

[0025] The personalized content generation intelligent agent generates a real-time query instruction according to a real-time request of a user, and retrieves a relevant webpage from the Internet through the real-time query instruction;

[0026] The title, uniform resource locator and HTML source code of the webpage corresponding to the real-time query instruction are input into a webpage information retrieval intelligent agent;

[0027] The standard text related to the real-time request of the user generated by the webpage information retrieval intelligent agent is used as the key information of the webpage.

[0028] In one embodiment, the constructing the prompt word specifically includes:

[0029] The retrieved context subgraph sequence is serialized into structured text, and is fused with the key information of the webpage provided by the webpage retrieval intelligent agent to construct a prompt word containing a system instruction, a context subgraph, key information of a webpage and a real-time request of a user.

[0030] In one embodiment, the generating personalized content for the user using the large language model specifically includes:

[0031] The large language model Based on the constructed prompt word, personalized content that is consistent with the user's preferences and has timeliness is generated:

[0032] ;

[0033] wherein, is the generated personalized content, is the real-time request of the user, is the knowledge graph, is the core entity for retrieving the context subgraph, is the set threshold when retrieving the context subgraph, is the maximum expansion depth when retrieving the context subgraph, represents the operation of retrieving from the knowledge graph, represents the operation of generating the key information of the webpage, represents the operation of constructing the prompt word.

[0034] In a second aspect, the present application provides a computer system comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to realize the steps of the method of any one of the embodiments of the first aspect.

[0035] Compared with the prior art, the present application has the beneficial technical effects that:

[0036] Clear division of labor and high efficiency: This invention achieves specialized division of labor by decomposing complex modeling tasks to different intelligent agents. Web page retrieval, graph construction, and content generation can work in parallel or in a pipeline, improving the overall system's response speed and processing efficiency.

[0037] Deep and dynamic preference understanding: This invention introduces Graph Retrieval Enhanced Generation (GraphRAG) technology to construct a dynamic user preference knowledge graph, which can capture the deep semantic associations and dynamic changes of user interests, overcoming the shortcomings of traditional methods in dealing with user interest drift and data sparsity.

[0038] The breadth and timeliness of information sources: This invention combines real-time web page content retrieval to ensure that the user preference model is not only based on historical data, but also reflects the latest network trends and information in real time, so that the generated personalized content is both accurate and timely.

[0039] Architecture flexibility and scalability: The multi-agent architecture of this invention has good modularity, and more intelligent agents with more functions can be easily added in the future to adapt to more complex application scenarios.

[0040] In summary, this method can model user preferences more accurately and dynamically, and has broad application prospects in fields such as personalized recommendation, intelligent search, and dialogue systems. Attached Figure Description

[0041] Figure 1 This is a flowchart of the method in an embodiment of the present invention;

[0042] Figure 2 This is a system architecture diagram in an embodiment of the present invention. Detailed Implementation

[0043] A preferred embodiment of the present invention will now be described in detail with reference to the accompanying drawings.

[0044] like Figure 1 As shown, a multi-agent collaborative interaction method for user preference modeling in this invention includes the following steps:

[0045] S1, through the web page information retrieval intelligent agent, receives the user's historical query instructions and the target web page HTML source code, divides the HTML source code into code lines and assigns line numbers, identifies the line number range related to the query instructions based on the large language model, extracts the corresponding code lines and converts them into standard text;

[0046] S2, construct an intelligent agent through a user preference graph, receive the standard text, extract entities, and construct a dynamically weighted knowledge graph with the user as the central node. The preference weights of the edges in the knowledge graph are calculated based on the quantitative scores of user interaction frequency, time decay, and sentiment tendency.

[0047] S3, through the personalized content generation agent, receives a real-time request of a user, retrieves a context subgraph from the knowledge graph, combines web key information provided by the web information retrieval agent, constructs a prompt word, and generates personalized content for the user using a large language model.

[0048] The multi-agent collaborative interaction method for user preference modeling in the application aims to solve the following problem: given the historical behavior data and real-time interaction request of a user, how to efficiently retrieve, process and integrate the content related to the user's interest from a large amount of web information through an automated system, construct a dynamically updated user preference graph, and provide personalized content or services that accurately meet the user's needs based on graph retrieval enhancement generation technology.

[0049] The system architecture of the application is shown in Figure 2 It mainly includes three core agents that work collaboratively: (1) web information retrieval agent; (2) user preference graph construction agent; (3) personalized content generation agent.

[0050] (1) Web information retrieval agent.

[0051] The input of the web information retrieval agent is the user's query instruction (including user preference information), the uniform resource locator (URL) of the target web page and the original HTML source code, and the metadata of the web page such as title.

[0052] The role of this agent is to serve as an information preprocessor and filter for the entire multi-agent system. It solves the two major problems of context length and information noise interference when directly processing HTML source code through an innovative extraction strategy based on line number semantics, ensuring that only high-quality and highly relevant information can enter the subsequent processing flow, laying the foundation for the accuracy and efficiency of the entire system.

[0053] The detailed workflow is as follows:

[0054] Preprocessing and line number labeling: After receiving the original HTML source code, first preprocess it, divide the entire HTML source code document into independent code lines according to the tag structure, and assign a unique and continuous line number identifier (e.g., [L1], [L2],...) to each code line. This step creates a stable coordinate reference system for the accurate positioning of the subsequent large language model.

[0055] Line number interval identification based on large language model: The sequence of code lines with line numbers is input into a large language model as context, along with the user's query instructions, web page titles, and URL metadata. The large language model is instructed to understand the semantics of each line sequence and its role in the overall web structure (such as the main text, title, list item, etc.), and directly output the line number interval containing all relevant information in a structured form such as JSON (for example, [L10-L45], [L80-L83]). This method greatly improves processing speed and efficiency by outputting code line indexes rather than full text.

[0056] Content integration and format conversion: The system parses the line number intervals returned by the large language model and accurately extracts the corresponding HTML code lines from the preprocessed line sequence according to these line number intervals. Finally, these extracted, possibly discontinuous code lines are automatically spliced and converted into clean, uniformly formatted text, providing standardized input for downstream agents.

[0057] (2) User preference graph construction agent.

[0058] The input of the user preference graph construction agent includes the standard text containing core information output by the web information retrieval agent, and the user's unique identifier for associating and updating the corresponding knowledge graph. The output of the user preference graph construction agent includes a dynamically updated, user-centered weighted knowledge graph data structure, and potential advanced interest labels of the user. This knowledge graph is stored in a serialized form, recording the user's entity preferences, relationship networks, and interest intensity.

[0059] The detailed workflow is as follows:

[0060] Precise entity and attribute extraction: Perform named entity recognition and entity attribute extraction on the preprocessed high signal-to-noise ratio standard text. Since the input data has eliminated a large amount of noise, it can accurately identify entities (such as products, people), and effectively extract key attributes (such as price, position), improving the richness of graph information.

[0061] In the dynamic construction and weighting process of the knowledge graph, the user is the center node, the extracted entities are nodes, and the relationships are edges. The edges in the knowledge graph are not static, but are assigned a dynamically changing preference weight , which takes into account the user's u interaction frequency with entity e, time decay, and emotional inclination, allowing the graph to reflect the strength and changes in user preferences in real time. The calculation process of this weight can be simplified as the following formula: In this formula, , and quantitative scores representing user interaction frequency, temporal decay, and sentiment bias, respectively, while are , and corresponding adjustable weight coefficients, which together determine the final preference weight.

[0062] Potential interest inference: User preference graph construction agent periodically analyzes the topology of the knowledge graph, identifies the user's potential high-level interests through community discovery, path association, and other graph analysis algorithms. For example, multiple nodes related to hiking equipment and national parks may be clustered, inferring that the user has a potential preference for "outdoor sports."

[0063] The role of this agent is to convert one-time, unstructured information input into a long-term, structured, and evolving user preference model. It is responsible for continuously learning and accumulating knowledge about the user, recording not only the user's explicit interests but also their potential preferences through dynamic weighting and inference, thereby constructing a multi-dimensional, deep, and dynamically changing user portrait.

[0064] (3) Personalized content generation agent.

[0065] The input of the personalized content generation agent includes the user's real-time request, the context subgraph retrieved from the user preference graph construction agent related to the user's real-time request, and the web key information provided by the web information retrieval agent related to the current real-time request.

[0066] The role of this agent is to understand the user's immediate intent and serve as the overall scheduling center, coordinating the invocation of the previous two agents. The personalized content generation agent retrieves the context subgraph representing the user's long-term preferences from the knowledge graph and integrates the real-time retrieved web key information. Finally, through a large language model, it combines the two with the user's current question to generate a high-quality and personalized reply that meets the user's current needs and aligns with their personal interests.

[0067] The detailed workflow is as follows:

[0068] When receiving the user's real-time request, the personalized content generation agent performs context-aware graph traversal, starting from the core entity in the user's real-time request and expanding along the knowledge graph path with higher preference weights to retrieve a context subgraph highly related to the current request. This process can be accurately described by the formula This formula indicates that the personalized content generation agent starts from the core entity extracted from the user's real-time request in the complete personal knowledge graph G, and expands along the knowledge graph path with a preference weight higher than a certain threshold the path is expanded, and the maximum expansion depth does not exceed In this way, the context sub-graphs eventually retrieved by the system not only contain the direct answer to the question, but also encapsulate background knowledge related to the user's long-term interests.

[0069] Multi-source information fusion and prompt construction: The retrieved context sub-graph sequence is serialized into structured text and fused with the latest web key information provided by the web retrieval agent to jointly construct a hierarchical and information-rich prompt, whose structure is usually: [system instruction] + [context sub-graph] + [web key information] + [user real-time request].

[0070] Enhanced generation: Call a large language model to generate the final reply based on the constructed prompt. The large language model is instructed to comprehensively utilize the graph knowledge representing long-term preferences and the web key information representing real-time information to generate a deep personalized answer that conforms to the user's consistent interests and has timeliness. The generation process can be represented as: . Wherein, is the generated personalized content, is the user's real-time request, is the knowledge graph. represents the operation of retrieving from the knowledge graph, represents the operation of generating web key information.

[0071] The terms used herein are merely intended to describe specific embodiments and are not intended to limit the present application. The terms "include", "contain" and the like used herein indicate the existence of the described features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0072] It should be understood that although each step in the flowchart of the drawings is shown in sequence according to the direction of the arrow, these steps are not necessarily executed in sequence according to the direction of the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other orders. Moreover, at least part of the steps in the flowchart of the drawings can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or steps or stages in other steps.

[0073] In one embodiment, a computer system is provided, which can be a server. The computer system comprises a processor, a memory and a network interface connected by a system bus. The processor of the computer system is configured to provide computing and control capabilities. The memory of the computer system comprises a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for running the operating system and the computer program in the non-volatile storage medium. The database of the computer system is configured to store data used in the above method. The network interface of the computer system is configured to communicate with an external terminal through a network connection. The computer program is configured to be executed by the processor to implement the above method.

[0074] The technical features of the above embodiments can be combined in any manner. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described, however, as long as the combinations of the technical features do not contradict each other, they should be considered as falling within the scope of the present disclosure.

[0075] It is apparent to those skilled in the art that the present application is not limited to the details of the foregoing exemplary embodiments, and can be realized in other concrete forms without departing from the spirit or essential characteristics of the present application. Accordingly, the embodiments are to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein and their intended scope is to be understood to be not limited by any restraining implications so far as can be nausea from the negative limitations required by the prior art. It is therefore intended that any and all modifications, improvements or changes, which can be made to the above-described arrangements by those skilled in the art using techniques presently or newly developed, be considered within the scope of the present application. The disclosure of all documents cited herein is expressly incorporated herein by reference.

[0076] In addition, it should be understood that although the present specification describes only one embodiment, each embodiment does not contain only one independent technical solution, and the description manner of the specification is only for the sake of clarity, and those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can be combined appropriately to form other embodiments which can be understood by those skilled in the art.

Claims

1. A multi-agent collaborative interaction method for user preference modeling, characterized in that, include: The web page information retrieval agent receives the user's historical query commands and the HTML source code of the target web page. It divides the HTML source code into lines of code and assigns line numbers. Based on the large language model, it identifies the line number range related to the query command, extracts the corresponding line of code, and converts it into standard text. The sequence of line-numbered lines of code is used as context, along with the user's query command, the title of the target web page, and the Uniform Resource Locator (URL), and is input into the large language model. The large language model understands the semantics of each line of code and its role in the overall webpage structure, and outputs the line number ranges related to the user's query. The large language model returns the line number ranges, and the corresponding HTML source code is extracted from the sequence of lines of code based on the line number ranges and converted into standard text. An intelligent agent is constructed using a user preference graph. It receives standard text, extracts entities, and builds a dynamically weighted knowledge graph centered on the user. The preference weights of the edges in the knowledge graph are calculated based on quantified scores of user interaction frequency, time decay, and sentiment tendency. The extracted entities are treated as non-central nodes, and the relationships between users and entities, as well as the relationships between entities, are used as edges to construct the knowledge graph. Each edge in the knowledge graph is assigned a dynamically changing preference weight. : ; , and Representing users respectively With entity Quantitative score of interaction frequency, users For entities The quantitative score of the degree of sentiment tendency decay over time and user For entities A quantitative score of the degree of emotional tendency. These are the weighting coefficients; The intelligent agent generates personalized content, receives real-time user requests, retrieves context subgraphs from the knowledge graph, combines key webpage information provided by the webpage information retrieval agent, constructs prompt words, and uses a large language model to generate personalized content for the user.

2. The multi-agent collaborative interaction method for user preference modeling according to claim 1, characterized in that, The HTML source code is divided into lines of code and assigned line numbers, specifically including: The HTML source code is divided into independent lines of code according to the tag structure, and each line of code is assigned a unique, consecutive line number.

3. The multi-agent collaborative interaction method for user preference modeling according to claim 1, characterized in that, Also includes: The user preference graph constructs an intelligent agent that analyzes the knowledge graph using graph analysis algorithms to identify users' potential interest tags.

4. The multi-agent collaborative interaction method for user preference modeling according to claim 1, characterized in that, Retrieving the context subgraph from the knowledge graph specifically includes: Extracting core entities from real-time user requests core entity In knowledge graph Starting from the corresponding node in the knowledge graph, the preference weights in the knowledge graph are greater than a set threshold. Expand the edges, with a maximum expansion depth not exceeding d, to obtain the context subgraph. , This indicates an operation to retrieve data from a knowledge graph.

5. The multi-agent collaborative interaction method for user preference modeling according to claim 1, characterized in that, The key information about web pages provided by the web page information retrieval intelligent agent specifically includes: The personalized content generation agent generates real-time query instructions based on real-time user requests; and retrieves relevant web pages from the Internet based on these real-time query instructions. Input the title, Uniform Resource Locator (URL), and HTML source code of the webpage corresponding to the real-time query command into the webpage information retrieval agent; The standard text generated by the web information retrieval agent that is relevant to the user's real-time request is used as the key information of the webpage.

6. The multi-agent collaborative interaction method for user preference modeling according to claim 1, characterized in that, The construction of prompt words specifically includes: The retrieved context subgraph is serialized into structured text and fused with key web page information provided by the web page retrieval agent to construct prompt words that include system instructions, context subgraphs, key web page information, and real-time user requests.

7. The multi-agent collaborative interaction method for user preference modeling according to claim 1, characterized in that, The use of large language models to generate personalized content for users specifically includes: Large Language Model Based on the pre-constructed prompts, personalized content that is both in line with user preferences and timely is generated: ; in, It is generated personalized content. It is a real-time user request. It is a knowledge graph. To retrieve the core entities of the context subgraph, A threshold is set when retrieving a context subgraph. The maximum expansion depth when retrieving the context subgraph. This indicates an operation to retrieve data from a knowledge graph. This indicates the operation of generating key information for a webpage. This indicates the operation of constructing prompt words.

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

Citation Information

Patent Citations

  • Knowledge retrieval enhancement-based characteristic agricultural product standardized file content generation method

    CN118779407A

  • Commodity pushing method and system based on user preference analysis

    CN118941365A