Data processing method and device in agent dialogue, equipment, medium and product
By extracting and storing structured knowledge in the AI intelligent agent dialogue system and classifying it according to a three-level hierarchical storage architecture, the problems of conversation amnesia and mixed storage of user characteristics and business knowledge are solved, improving interaction efficiency and user experience, ensuring privacy data security, and optimizing retrieval performance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-19
- Publication Date
- 2026-03-31
AI Technical Summary
Existing AI intelligent agent dialogue systems suffer from conversation amnesia and mixed storage of user characteristics and business knowledge, resulting in low interaction efficiency, poor user experience, and risks to user privacy data security and low retrieval efficiency.
By extracting structured knowledge from dialogue data and storing it in a dynamic cache layer, adding timeliness tags, filtering target structured knowledge, and distributing it to the user knowledge layer, business code layer, and scenario knowledge layer according to a three-level hierarchical storage architecture, the value of memory units is evaluated and retrieved based on timeliness, scenario matching degree, and cross-session association strength.
It effectively solves the problem of session amnesia, reduces the user interaction burden, improves interaction efficiency and user experience, achieves physical isolation between user characteristics and business knowledge, eliminates privacy data security risks, reduces invalid searches, and improves search accuracy and efficiency.
Smart Images

Figure CN121765047A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of big data technology, and in particular to data processing methods, apparatus, devices, media and products in intelligent agent dialogue. Background Technology
[0002] Current AI-powered dialogue systems still face problems such as "conversation amnesia" and mixed storage of user characteristics and business knowledge, which restricts the improvement of the performance of the system and leads to a poor user experience.
[0003] When a user explicitly informs the intelligent agent dialogue system of their specific needs during the initial conversation, they still need to repeatedly emphasize the annotation language in subsequent conversations. This not only increases the user's interaction burden and reduces interaction efficiency but also affects the user experience, requiring the user to spend more time conveying the same information when conversing with the intelligent agent. Furthermore, existing solutions typically store heterogeneous data such as user features and business rules mixed in a single vector space. Because user privacy data and business knowledge are not physically isolated, user privacy data faces potential security risks. Moreover, during cross-dimensional searches, the interference between features of different data types generates a large number of invalid searches, reducing search efficiency. Summary of the Invention
[0004] This application provides a data processing method, apparatus, device, medium, and product for intelligent agent dialogue, in order to solve the problems in the prior art.
[0005] Firstly, this application provides a data processing method for intelligent agent dialogue, including:
[0006] In response to receiving dialogue data input by the user through an interactive interface, the system extracts structured knowledge from the dialogue data; wherein, the structured knowledge includes user attributes, business rules, and scenario information.
[0007] The structured knowledge is stored in a dynamic cache layer, and a timeliness tag is added to the structured knowledge.
[0008] The target structured knowledge corresponding to multiple target historical dialogues in the dynamic cache layer is filtered, wherein the filtering rules for the multiple target historical dialogues are pre-set based on dialogue relevance and business relevance;
[0009] The filtered target structured knowledge is allocated to the corresponding storage layer according to a three-level hierarchical storage architecture; wherein, the three-level hierarchical storage architecture includes a user knowledge layer, a business code layer, and a scenario knowledge layer;
[0010] The value score of memory units in each of the storage layers is evaluated, wherein the value score is obtained based on timeliness, scenario matching degree and cross-session association strength;
[0011] The memory units in each of the storage layers that have undergone value evaluation are retrieved, response data for the dialogue data is generated based on the retrieval results, and the response data is fed back to the user terminal.
[0012] In one possible design, the extraction of structured knowledge from the dialogue data includes:
[0013] The dialogue data is transformed into a standardized feature representation using semantic vectorization technology, and structured knowledge corresponding to user attributes, business rules, and scenario information is extracted through entity recognition and relation extraction algorithms.
[0014] In one possible design, the dynamic caching layer is a session-level dynamic caching layer used to temporarily store information from a single conversation; the timeliness tag includes a conversation timestamp and a knowledge validity period identifier, wherein the knowledge validity period identifier is preset based on the business scenario and is used to distinguish between short-term temporary knowledge and long-term valid knowledge.
[0015] In one possible design, before filtering the target structured knowledge corresponding to multiple target historical dialogues in the dynamic cache layer, the following steps are also included:
[0016] A sliding window mechanism is used to select N dialogue records with a value score greater than a preset score from the dynamic cache layer according to a preset period as the target historical dialogues; where N is a positive integer greater than 1.
[0017] In one possible design, the allocation of the filtered target structured knowledge to corresponding storage layers according to a three-tiered hierarchical storage architecture includes:
[0018] The target structured knowledge of long-term user characteristics is allocated to the user knowledge layer. The user knowledge layer is stored using a graph neural network encoding method, with nodes representing user attributes and edge weights reflecting the strength of attribute associations.
[0019] The target structured knowledge of the structured business rule class is allocated to the business code layer, and the business code layer adopts a tree storage structure;
[0020] The target structured knowledge of the scene class with timestamps is assigned to the scene knowledge layer, which is a vector database. Each scene vector contains multi-dimensional features and scene labels. The storage layers of the three-level hierarchical storage architecture are physically isolated and logically associated through knowledge graph embedding technology. The knowledge graph embedding technology is used to map the entity relationships in each storage layer to a low-dimensional vector space.
[0021] In one possible design, after allocating the filtered target structured knowledge to the corresponding storage layers according to a three-tiered hierarchical storage architecture, the method further includes:
[0022] The large language model dynamically adds, updates, or merges conflicting structured knowledge in each of the storage layers, combining existing structured knowledge with newly allocated target structured knowledge.
[0023] One possible design also includes:
[0024] An anomaly detection algorithm is used to monitor the memory cells in each of the storage layers to identify erroneous or invalid knowledge.
[0025] If the erroneous or invalid knowledge is identified, the erroneous knowledge is corrected or the invalid knowledge is deleted by using a large language model in conjunction with business rule templates.
[0026] One possible design also includes:
[0027] If the current system memory usage exceeds a preset memory usage threshold, memory units with a value score lower than the preset value threshold are transferred to disk storage, while retaining the metadata of the transferred memory units in the memory index.
[0028] Secondly, this application provides a data processing apparatus for intelligent agent dialogue, comprising:
[0029] The extraction module is used to extract structured knowledge from dialogue data input by the user through an interactive interface in response to receiving such data; wherein the structured knowledge includes user attributes, business rules, and scenario information.
[0030] The caching module is used to store the structured knowledge in a dynamic caching layer and add time-sensitive tags to the structured knowledge;
[0031] The filtering module is used to filter the target structured knowledge corresponding to multiple target historical dialogues in the dynamic cache layer, wherein the filtering rules for the multiple target historical dialogues are preset based on dialogue relevance and business relevance.
[0032] The hierarchical storage module is used to allocate the filtered target structured knowledge to the corresponding storage layer according to the three-level hierarchical storage architecture; wherein, the three-level hierarchical storage architecture includes a user knowledge layer, a business code layer, and a scenario knowledge layer;
[0033] An evaluation module is used to evaluate the value score of memory units in each of the storage layers, wherein the value score is obtained based on timeliness, scenario matching degree and cross-session association strength;
[0034] The retrieval module is used to retrieve memory units in each of the storage layers after value evaluation, generate response data for the dialogue data based on the retrieval results, and feed the response data back to the user terminal.
[0035] Thirdly, this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;
[0036] The memory stores the instructions that the computer executes;
[0037] The processor executes computer-executable instructions stored in memory to implement any of the methods of the first aspect.
[0038] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method of any one of the first aspects.
[0039] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the method of any one of the first aspects.
[0040] This application provides a data processing method, apparatus, device, medium, and product for intelligent agent dialogue. The method extracts structured knowledge such as user attributes, business rules, and scenario information from response dialogue data and stores it in a dynamic cache layer with added timeliness tags. This effectively solves the conversation amnesia problem in existing intelligent agent dialogue systems, reduces user interaction burden, and improves interaction efficiency and user experience. After filtering target structured knowledge based on dialogue relevance and business association, it is categorized and stored according to a three-level hierarchical storage architecture. Then, the value of memory units is evaluated based on timeliness, scenario matching degree, and cross-conversation association strength, and retrieval is performed to generate response data. Thus, the three-level hierarchical storage achieves physical isolation between user characteristics and business knowledge, eliminates potential security risks to user privacy data, reduces mutual interference between different types of data during retrieval, lowers the proportion of invalid retrievals, improves retrieval accuracy and efficiency, ensures timely response of the intelligent agent dialogue system to user needs, and optimizes the performance of the intelligent agent dialogue system. Attached Figure Description
[0041] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0042] Figure 1 An application scenario diagram corresponding to the data processing method in intelligent agent dialogue provided in an embodiment of this application;
[0043] Figure 2A flowchart illustrating a data processing method in intelligent agent dialogue provided in an embodiment of this application;
[0044] Figure 3 A flowchart illustrating a data processing method in intelligent agent dialogue provided in another embodiment of this application;
[0045] Figure 4 A schematic diagram of the structure of a data processing device in an intelligent agent dialogue provided in an embodiment of this application;
[0046] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0047] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0048] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0049] It should be noted that the data processing methods, devices, equipment, media, and products in the intelligent agent dialogue of this application can be used in the field of big data technology, or in any field other than the field of big data technology. The application fields of the data processing methods, devices, equipment, media, and products in the intelligent agent dialogue of this application are not limited.
[0050] To clearly understand the technical solution of this application, the solutions of the prior art will be described in detail first.
[0051] Current AI-powered dialogue systems still face problems such as "conversation amnesia" and mixed storage of user characteristics and business knowledge. These problems severely restrict the performance improvement of AI-powered dialogue systems and lead to poor user experience.
[0052] Specifically, when a user explicitly informs the intelligent agent dialogue system of a specific requirement during the initial conversation, such as "I want the code comments to be in English," the system may fail to remember this crucial information in subsequent conversations, requiring the user to repeatedly emphasize the comment language. This repetitive information collection not only increases the user's interaction burden and reduces interaction efficiency but also impacts user experience, requiring users to expend more time and effort to convey the same information when conversing with the intelligent agent. Furthermore, existing solutions typically store heterogeneous data such as user characteristics and business rules in a single vector space. Since user privacy data is not physically isolated from business knowledge, user privacy data faces potential security risks. Moreover, during cross-dimensional searches, the interference of features from different data types generates a large number of invalid searches, reducing search efficiency. For example, when searching for business rules, interference from user characteristic data may lead to inaccurate search results or excessively long search times, affecting the intelligent agent dialogue system's timely response to user needs.
[0053] Figure 1 An application scenario diagram corresponding to the data processing method in intelligent agent dialogue provided in an embodiment of this application is shown, such as... Figure 1 As shown, the application scenario provided in this embodiment includes a user terminal 10 and an intelligent agent dialogue processing platform 11. The user terminal 10 and the intelligent agent dialogue processing platform 11 are connected through a network communication link. The intelligent agent dialogue processing platform 11 integrates an interactive interface, a dynamic caching layer, a three-level hierarchical storage architecture, a value assessment module, and a retrieval response module. Data flow between the various functional modules within the intelligent agent dialogue processing platform 11 is achieved through standardized data interfaces.
[0054] Specifically, when a user needs to obtain services such as business consultation and transaction processing through an intelligent agent, they can input dialogue data through the interactive interface of the user terminal 10 (such as a mobile APP, web page interface, smart terminal device, etc.). The dialogue data can include various forms such as text and speech-to-text.
[0055] First, after the user terminal 10 transmits the dialogue data to the intelligent agent dialogue processing platform 11, the platform responds to the input data and parses it using its built-in structured knowledge extraction engine. This extracts structured knowledge, including user attributes, business rules, and scenario information. Next, the platform stores the extracted structured knowledge in a dynamic cache layer and adds time-sensitive tags based on knowledge type to facilitate rapid identification of the knowledge's validity. Based on pre-defined filtering rules, the platform selects target structured knowledge from the dynamic cache layer, corresponding to multiple target historical dialogues highly relevant to the current dialogue. Then, following a pre-defined three-tiered storage architecture, the platform allocates the selected target structured knowledge to corresponding storage layers: a user knowledge layer, a business code layer, and a scenario knowledge layer, achieving categorized and ordered storage of knowledge. Subsequently, the value assessment module of the intelligent agent dialogue processing platform 11 initiates the assessment process. Based on timeliness, scenario matching degree, and cross-session correlation strength, it calculates the value score of each memory unit in each storage layer, quantifying the reference value of knowledge to the current dialogue response. Finally, the retrieval response module of the intelligent agent dialogue processing platform 11 retrieves the value-assessed memory units in each storage layer in descending order of value score, generates response data that is tailored to user needs, logically coherent, and accurate, and feeds the response data back to the user terminal 10 through the network communication link, completing the entire data processing and response process of the intelligent agent dialogue.
[0056] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0057] Figure 2 This is a flowchart illustrating a data processing method in intelligent agent dialogue provided in an embodiment of this application, as shown below. Figure 2 As shown, the execution entity in this embodiment is a data processing device in intelligent agent dialogue. This data processing device can be implemented through a computer program, or through a medium storing the relevant computer program, such as a USB flash drive and / or optical disc; alternatively, it can be implemented through a physical device that integrates or installs the relevant computer program, such as a chip or electronic device. The electronic device may be a computer or a server, etc. The data processing method in intelligent agent dialogue provided in this embodiment includes the following steps:
[0058] S201. In response to receiving dialogue data input by the user through the interactive interface, extract structured knowledge from the dialogue data; wherein, the structured knowledge includes user attributes, business rules and scenario information.
[0059] The dialogue data may include user input in the form of text, speech-to-text, etc. Optionally, natural language processing techniques can be used to extract structured knowledge from the dialogue data.
[0060] Structured knowledge refers to standardized information that can represent user needs, business logic, or interaction scenarios. Specifically, it includes user attributes (such as user identification, code comment language preferences, common functional requirements, etc.), business rules (such as code generation format requirements, service response processes, permission management specifications, etc.), and scenario information (such as the current interaction scenario being "Python code assistance", "financial reimbursement consultation", "IT equipment repair", etc.).
[0061] Optionally, for explicit structured information (such as user preferences containing keywords "hope" or "requirement", or business logic containing "rules" or "norms"), quick matching and extraction are performed using a pre-set keyword dictionary and regular expressions; for fuzzy or implicit structured information (such as user operating habits that are not explicitly stated but mentioned multiple times), a pre-trained language model (such as the BERT model) is used for entity recognition, relation extraction, and intent mining.
[0062] For example, when a user enters "Help me write a sorting function, with comments in English, and it must conform to the company's Python code style guidelines", three types of structured knowledge can be extracted: user attributes (comment language: English), business rules (company Python code style guidelines), and scenario information (Python code generation scenario).
[0063] S202. Store structured knowledge in a dynamic cache layer and add time-sensitive tags to the structured knowledge.
[0064] Optionally, the extracted structured knowledge can be stored in a dynamic cache layer (which can be implemented using a cache database), and a timeliness tag can be added to each piece of structured knowledge.
[0065] The dynamic caching layer serves to provide short-term temporary storage for structured knowledge, laying the data foundation for subsequent filtering and hierarchical storage. The timeliness tag is used to characterize the effective lifespan of structured knowledge. The value of the timeliness tag is based on the knowledge type. For example, the timeliness tag for long-term user preferences (such as annotation language) is set to "long-term effective (such as 30 days)", the timeliness tag for temporary scenario information (such as temporary needs in a single conversation) is set to "effective within the session", and the timeliness tag for business rules (such as code standards) is set to "permanently effective".
[0066] It should be noted that a dynamic caching layer enables rapid access to recent dialogue knowledge, avoiding retrieval redundancy caused by direct storage in the long-term storage layer; the addition of timeliness tags provides a basis for subsequent value assessment and memory cleanup, ensuring the validity of cached data and preventing invalid data from occupying storage resources.
[0067] S203. Filter the target structured knowledge corresponding to multiple target historical dialogues in the dynamic cache layer. The filtering rules for multiple target historical dialogues are pre-set based on dialogue relevance and business relevance.
[0068] Optionally, based on preset filtering rules, target structured knowledge corresponding to multiple target historical dialogues is filtered from the dynamic cache layer. The filtering rules are set based on both dialogue relevance and business relevance to ensure that the filtered knowledge accurately matches the current user's needs.
[0069] Optionally, the semantic similarity between the current dialogue data and historical dialogues can be calculated. The similarity of dialogue vectors can be calculated using a cosine similarity algorithm, and historical dialogues with semantic similarity higher than a preset semantic threshold (such as 0.7) can be retained to complete the screening of dialogue relevance.
[0070] Optionally, business type tags (such as "code generation" or "financial consulting") can be extracted from the current conversation, and structured knowledge with consistent business type tags from historical conversations can be filtered to complete the business relevance filtering.
[0071] Optionally, structured knowledge with expired timeliness tags can be removed to complete timeliness filtering, such as when valid knowledge within a session has exceeded the current session.
[0072] S204. Allocate the filtered target structured knowledge to the corresponding storage layer according to the three-level hierarchical storage architecture; wherein, the three-level hierarchical storage architecture includes the user knowledge layer, the business code layer and the scenario knowledge layer.
[0073] Optionally, the filtered target structured knowledge can be allocated to corresponding storage layers according to a three-tiered storage architecture to achieve physical isolation and classification management of heterogeneous data. The three-tiered storage architecture includes a user knowledge layer, a business code layer, and a scenario knowledge layer.
[0074] The user knowledge layer can be implemented using an encrypted distributed database to store user attributes and personalized preferences (such as annotation language, function usage habits, identity information, etc.). The user knowledge layer employs data encryption storage and access control mechanisms to ensure the secure isolation of user privacy data, which can only be accessed by authorized modules.
[0075] The business code layer can be implemented using a high-concurrency key-value storage database to store business rules, code templates, service interface definitions, and other business-related knowledge. The business code layer features an optimized retrieval index structure, supporting rapid matching and updating of business knowledge, and is adapted to high-concurrency access scenarios.
[0076] The scenario knowledge layer can be implemented using a time-series database to store scenario information and scenario association rules (such as adaptation strategies for different code generation scenarios, response processes for consultation scenarios, etc.). The scenario knowledge layer can support retrieval by scenario time-series dimension, making it easy to trace historical interaction patterns under different scenarios.
[0077] It should be noted that, through a physically isolated three-tier storage architecture, business knowledge and scenario knowledge are stored separately, avoiding interference from the characteristics of different data types and improving retrieval efficiency. This three-tier storage architecture differs from existing single-storage solutions, enabling data isolation and professional management.
[0078] S205. Evaluate the value score of memory units in each storage layer, wherein the value score is based on timeliness, scenario matching degree and cross-session association strength.
[0079] Optionally, the memory units (i.e., the structured knowledge entries stored in each layer) in the user knowledge layer, business code layer, and scenario knowledge layer are evaluated for value, and a value score is calculated for each memory unit. The value score is used to characterize the contribution of the memory unit to the current dialogue response, and the value score is calculated based on a weighted average of three dimensions: timeliness, scenario matching degree, and cross-session association strength.
[0080] Optionally, the value score of each memory unit is calculated using a dynamic weighting calculation model. Optionally, the formula for calculating the value score using the dynamic weighting calculation model is: Where W is the value score, σ is the activation function, α, β, and γ are all weight coefficients, T is the timeliness score which decays exponentially over time, S is the scene matching degree calculated using cosine similarity, and C is the cross-session association strength calculated using graph neural network propagation; the dynamic weight calculation model integrates Transformer feature extraction and reinforcement learning algorithms, and dynamically adjusts the coefficients of α, β, and γ based on user behavior feedback.
[0081] Among them, the timeliness score can be calculated based on the timeliness tag. Long-term valid knowledge has the highest score (e.g., 10 points), valid knowledge within the session decreases according to the remaining session duration, and expired knowledge has a score of 0.
[0082] The scene matching score can be obtained by calculating the degree of matching between the scene information corresponding to the memory unit and the current dialogue scene. For example, a perfect match scores 10 points, a partial match scores 5 points, and a mismatch scores 0 points.
[0083] The score for cross-session association strength can be calculated by counting the number of times the memory unit is referenced in historical cross-session interactions. The more times it is referenced, the higher the score. For example, ≥5 references get 10 points, 3-4 references get 7 points, 1-2 references get 4 points, and no references get 1 point.
[0084] It should be noted that the value ranking of memory units is achieved through multi-dimensional weighted calculations to avoid invalid or low-value memory units occupying retrieval resources. For example, a user's "English annotation preference" memory unit will receive a higher value score due to its long validity period (long-term validity), high scenario matching degree (currently in the code generation scenario), and high cross-session correlation strength (multiple citations); while invalid knowledge in temporary scenarios will be eliminated due to its low value score.
[0085] S206. Retrieve memory units in each storage layer after value assessment, generate response data for the dialogue data based on the retrieval results, and feed the response data back to the user.
[0086] Optionally, based on the value score, memory units in each storage layer are prioritized for retrieval, prioritizing memory units with value scores higher than a preset score threshold (e.g., 6 points). Then, combined with the semantic requirements of the current dialogue data, the retrieval results from each layer are integrated to generate response data, which is finally fed back to the user through the interactive interface.
[0087] Optionally, the system retrieves personalized user needs (such as English comment preferences) from the user knowledge layer; relevant business rules (such as Python coding standards) from the business code layer; and adaptation strategies for the current scenario (such as common implementations of sorting functions) from the scenario knowledge layer. Optionally, the above retrieval results are input into the generative model to generate response data that meets the user's needs (such as Python sorting function code with English comments).
[0088] Optionally, if a conflicting memory unit is retrieved (such as a conflict between a user's historical preferences and current business rules), the higher-scoring memory unit is prioritized based on its value score, or a prompt message is generated for the user to confirm.
[0089] The data processing method for intelligent agent dialogue provided in this application extracts structured knowledge such as user attributes, business rules, and scenario information from response dialogue data and stores it in a dynamic cache layer with added timeliness tags. This effectively solves the conversation amnesia problem in existing intelligent agent dialogue systems, reduces user interaction burden, and improves interaction efficiency and user experience. After filtering target structured knowledge based on dialogue relevance and business association, it is categorized and stored according to a three-level hierarchical storage architecture. Then, the value of memory units is evaluated based on timeliness, scenario matching degree, and cross-conversation association strength, and retrieval is performed to generate response data. Thus, the three-level hierarchical storage achieves physical isolation between user features and business knowledge, eliminates potential security risks to user privacy data, reduces mutual interference between different types of data during retrieval, lowers the proportion of invalid retrievals, improves retrieval accuracy and efficiency, ensures timely response of the intelligent agent dialogue system to user needs, and optimizes the performance of the intelligent agent dialogue system.
[0090] As an optional implementation, based on any of the above embodiments, structured knowledge is extracted from the dialogue data, including: using semantic vectorization technology to transform the dialogue data into standardized feature representations, and extracting structured knowledge corresponding to user attributes, business rules and scenario information through entity recognition and relation extraction algorithms.
[0091] Optionally, Word2Vec or a pre-trained model based on the Transformer architecture (such as BERT) can be used to semantically vectorize the dialogue text in the dialogue data, mapping the unstructured text data into standardized feature vectors of fixed dimensions, eliminating feature differences caused by different expressions. Subsequently, Conditional Random Fields, Bidirectional Long Short-Term Memory Networks, or Transformer-based entity recognition models are used to identify user attribute entities (such as "annotation language"), business rule entities (such as "Python code style"), and scene information entities (such as "sorting function generation") from the feature vectors. Then, through a relation extraction algorithm based on an attention mechanism, the association between entities and attribute values is established (such as "annotation language - English", "business rules - company Python code style"), ultimately forming structured knowledge entries.
[0092] As an optional implementation, based on any of the above embodiments, the dynamic caching layer is a session-level dynamic caching layer used to temporarily store information from a single conversation; the timeliness tag includes a conversation timestamp and a knowledge validity period identifier, wherein the knowledge validity period identifier is preset based on the business scenario and is used to distinguish between short-term temporary knowledge and long-term valid knowledge.
[0093] Optionally, the dynamic caching layer constructs an independent caching space with a single session as the isolation unit, which is specifically used to temporarily store various types of information generated during a single conversation. This can effectively avoid information interference between different sessions and facilitate subsequent accurate filtering of structured knowledge from single or related sessions.
[0094] Optionally, the timeliness tag specifically includes a dialogue timestamp and a knowledge validity period identifier. The dialogue timestamp records the conversation time information when the structured knowledge was generated, providing a time dimension basis for subsequent filtering based on conversation relevance. The knowledge validity period identifier is a classification identifier preset based on the business scenario, which distinguishes between short-term temporary knowledge and long-term valid knowledge.
[0095] For example, the validity period of short-term temporary knowledge (such as temporary needs in a single conversation or one-time scenario information) is set to "T-Temporary", and the corresponding validity period is usually "valid within the current session" or "valid within 24 hours"; the validity period of long-term valid knowledge (such as user fixed preferences or business rules) is set to "L-Long-term", and the corresponding validity period can be set to "valid for 30 days", "valid for 90 days", or "permanently valid".
[0096] The data processing method for intelligent agent dialogue provided in this application achieves rapid access to recent dialogue knowledge and session isolation through a session-level dynamic caching layer. This avoids retrieval redundancy caused by direct storage in the long-term storage layer and prevents information confusion between different sessions. Furthermore, a dual-dimensional timeliness tag containing a dialogue timestamp and a knowledge validity period identifier provides accurate criteria for subsequent value assessment, memory cleanup, and session relevance filtering. This effectively eliminates expired or irrelevant cached data, preventing invalid data from consuming storage resources.
[0097] As an optional implementation, based on any of the above embodiments, before filtering the target structured knowledge corresponding to multiple target historical dialogues in the dynamic cache layer, the method further includes:
[0098] A sliding window mechanism is used to select N dialogue records with a value score greater than a preset score from the dynamic cache layer according to a preset period as target historical dialogues; where N is a positive integer greater than 1.
[0099] Optionally, the sliding window mechanism uses time windows as the filtering unit. The preset period can be dynamically configured according to the interaction frequency of the business scenario (for example, the preset period is 30 minutes for high-frequency code assistance scenarios and 2 hours for low-frequency consultation scenarios). The time span of the time window is consistent with the preset period, and the time window slides along the time axis according to the preset period, retaining only the dialogue records within the current time window and the historical valid time windows.
[0100] The value score can be the preliminary value assessment result of the cached dialogue records. It is calculated using a simplified multi-dimensional assessment model. The preset score is set according to the data volume requirements (e.g., set to 4 points to ensure that the selected dialogue records contain valid information). The value of N can be adjusted in combination with the cache storage capacity and business needs (e.g., N=50, that is, a maximum of 50 high-value dialogue records are retained in each time window). When there are less than N dialogue records that meet the conditions in the time window, all records that meet the conditions are retained.
[0101] It should be noted that by quickly removing low-value, expired, or irrelevant dialogue records from the dynamic cache layer, the data range for subsequent structured knowledge filtering is narrowed, thereby improving the overall filtering efficiency.
[0102] Figure 3 A flowchart illustrating a data processing method in intelligent agent dialogue provided in another embodiment of this application is shown below. Figure 3 As shown, as an optional implementation, based on any of the above embodiments, the filtered target structured knowledge is allocated to the corresponding storage layer according to a three-level hierarchical storage architecture, including the following steps:
[0103] Optionally, the filtered target structured knowledge is tagged with its type to clearly identify whether it belongs to the user long-term feature class, the structured business rule class, or the time-stamped scenario class. Then, it is allocated to the corresponding storage layer according to its type: target structured knowledge of the user long-term feature class is allocated to the user knowledge layer, target structured knowledge of the structured business rule class is allocated to the business code layer, and target structured knowledge of the time-stamped scenario class is allocated to the scenario knowledge layer.
[0104] Optionally, different storage structures are adopted for each storage layer to optimize access efficiency, taking into account the characteristics of different types of knowledge.
[0105] S301. The target structured knowledge of long-term user features is allocated to the user knowledge layer. The user knowledge layer is stored using a graph neural network encoding method, with nodes representing user attributes and edge weights reflecting the strength of attribute associations.
[0106] The user knowledge layer can be used to store structured knowledge of long-term user characteristics, including fixed user preferences (such as code comment language and frequently used function selection), identity attributes (such as user ID and department), and long-term behavioral habits (such as frequently used service types).
[0107] Optionally, the user knowledge layer is stored using a graph neural network (GNN) encoding method, representing individual user attributes (such as "annotation language", "common programming languages", "service permission level", etc.) in the form of nodes, and using edge weights to reflect the strength of the association between different user attributes. For example, the association strength between a user "annotation language = English" and "common programming language = Python" is higher than its association strength with "financial consultation permission". The edge weights can be calculated by the co-occurrence frequency of user historical interaction data. The storage medium uses an encrypted distributed database, coupled with an access control mechanism, to ensure the secure isolation of user privacy data.
[0108] S302. Allocate the target structured knowledge of the structured business rule class to the business code layer, and the business code layer adopts a tree storage structure.
[0109] The business code layer is specifically used to store structured business rule targets and structured knowledge, including code generation format specifications, service response processes, permission management rules, and function call constraints. The business code layer can adopt a tree-like storage structure, with the root node representing the major business domain category (e.g., "Code Assistance Service" or "Financial Reimbursement Service"), first-level child nodes representing specific business modules (e.g., "Python Code Generation," "Java Code Generation," "Daily Reimbursement," or "Travel Reimbursement"), and second-level and lower-level child nodes representing detailed business rules (e.g., "Python Naming Conventions," "Code Comment Requirements," "Reimbursement Amount Limit," or "Approval Process Nodes"). This allows for hierarchical management of business rules, facilitating rapid retrieval of target rules at each level. The storage medium uses a high-concurrency key-value storage database with an optimized retrieval index structure to adapt to high-concurrency access scenarios.
[0110] S303. The target structured knowledge of the scene class with timestamps is allocated to the scene knowledge layer. The scene knowledge layer is a vector database. Each scene vector contains multi-dimensional features and scene labels. The storage layers of the three-level hierarchical storage architecture are physically isolated and logically linked through knowledge graph embedding technology. The knowledge graph embedding technology is used to map the entity relationships in each storage layer to a low-dimensional vector space.
[0111] The scenario knowledge layer is specifically used to store structured knowledge of scenario-based targets with timestamps. This includes interaction scenarios of a single dialogue (such as "2025-12-15 14:30 Python bubble sort generation" and "2025-12-15 15:10 financial travel expense reimbursement consultation"), temporary needs within a scenario, and scenario-related operational processes. The scenario knowledge layer uses a vector database for storage, transforming each time-stamped scenario information into a scenario vector. Each scenario vector contains multi-dimensional features (such as timestamp features, scenario type features, user need features, and business association features) and scenario tags (such as "Python code generation" and "financial consultation"). Historical knowledge of similar scenarios can be quickly matched through vector similarity calculation. The storage medium is a time-series-friendly vector database, supporting dual retrieval by timestamp and scenario vector dimensions, facilitating the tracing of historical interaction patterns across different scenarios.
[0112] Optionally, logical connections between storage layers can be established through knowledge graph embedding technology (such as the TransH algorithm). Knowledge graph embedding technology maps entities (such as user attribute entity "annotation language", business rule entity "Python code style", and scenario entity "Python sorting function generation") and their relationships (such as "user preference-adaptation-business rule" and "business rule-support-scenario requirement") in each storage layer to a low-dimensional vector space, so that the semantic connections between heterogeneous entities can be quantified through vector similarity, thereby solving the problem of knowledge fragmentation caused by physical isolation.
[0113] The data processing method for intelligent agent dialogue provided in this application adopts independent storage media and access control strategies for each storage layer to achieve physical isolation. Encrypted storage of the user knowledge layer avoids privacy leakage risks, and independent storage of the business code layer and the scene knowledge layer avoids interference from the characteristics of different types of data. Thus, it achieves a unified approach to data isolation, specialized storage, and cross-layer knowledge association.
[0114] As an optional implementation, based on any of the above embodiments, after allocating the filtered target structured knowledge to the corresponding storage layer according to the three-level hierarchical storage architecture, it further includes: dynamically adding, updating, or merging conflicts between the existing structured knowledge and the newly allocated target structured knowledge in each storage layer through a large language model.
[0115] Optionally, for the target structured knowledge newly allocated to each storage layer, knowledge fingerprint comparison (generating a unique knowledge fingerprint based on the SimHash algorithm) can be used to verify whether the same or similar structured knowledge already exists in each storage layer, forming three types of matching results: "existing duplicate knowledge", "existing similar knowledge", and "no relevant knowledge".
[0116] Optionally, if the matching result is "no relevant knowledge exists", the new target structured knowledge is formatted and standardized using a large language model (unifying knowledge entry fields and standardizing attribute descriptions). Then, the addition operation is performed, the standardized knowledge entry is stored in the corresponding storage layer, and the entities and relationships in the knowledge graph are updated.
[0117] Optionally, if the matching result is "similar knowledge already exists," the timeliness, completeness, and accuracy of the new and old knowledge are compared using a large language model. For example, if the new business rule is "Company Python Code Specification V3.0," and a version "V2.0" already exists in the storage layer, the large language model can identify the version iteration relationship and update the original V2.0 version with V3.0. If a new user's preference is to add "comments must include function descriptions," the large language model can recognize this as a supplement to the original "English comments" preference and update the association information of the corresponding attributes in the user's knowledge layer.
[0118] Optionally, if the matching result is "existing duplicate knowledge" and there is a content conflict (e.g., the original user preference is "annotations in English", and the new target knowledge is "annotations in Chinese"), then the timeliness tags and value features of the new target structured knowledge are extracted first through the large language model. If the new target structured knowledge is a requirement explicitly reiterated by the user in the current session (timeliness is "valid in the current session" and the scenario matching degree is 10), then the original structured knowledge is updated based on the new target structured knowledge. If the priority cannot be determined, the large language model can generate a conflict prompt (e.g., "A conflict has been detected in your annotation language preference. The current record is in English. Do you want to update it to Chinese?"), and the merging or updating operation is performed after the user confirms.
[0119] The data processing method for intelligent agent dialogue provided in this application embodiment realizes dynamic management of structured knowledge through a large language model, which can avoid knowledge redundancy, lag or conflict in the storage layer, ensure the accuracy and timeliness of knowledge in each storage layer, provide a data foundation for subsequent value assessment, improve the efficiency and intelligence level of knowledge management, and adapt to the needs of rapid knowledge iteration in multiple scenarios.
[0120] As an optional implementation, based on any of the above embodiments, the following steps are also included:
[0121] First, anomaly detection algorithms are used to monitor memory cells in each storage layer to identify erroneous or invalid knowledge.
[0122] The anomaly detection algorithm can be adapted to the type and characteristics of the memory unit. Optionally, for highly structured memory units (such as business rules and user fixed attributes), a combination of rule-based anomaly detection algorithms (pre-defined rules such as business logic constraints and attribute value ranges, with deviations from the rules being considered anomalies) and statistical anomaly detection algorithms (such as Isolation Forest and DBSCAN algorithms) can be used. For memory units with obvious unstructured characteristics (such as scene description knowledge), a deep learning-based anomaly detection model (such as autoencoder and Transformer-based anomaly detection model) can be used.
[0123] Among them, incorrect knowledge can be knowledge that conflicts with core business rules or knowledge with incorrect attribute values. For example, "Python code comments require inline comments to use / / " conflicts with the company standard "Python inline comments to use #".
[0124] Invalid knowledge can be outdated and unupdated knowledge, knowledge that is not related to any business scenario, or duplicate knowledge, such as "Java code specifications that expired in 2023" or "isolated attribute records without corresponding users".
[0125] Secondly, when incorrect or invalid knowledge is identified, the incorrect knowledge is corrected or the invalid knowledge is deleted by using a large language model in conjunction with business rule templates.
[0126] Optionally, if erroneous knowledge is identified, it can be automatically corrected using a large language model combined with business rule templates. Optionally, the erroneous knowledge, corresponding business scenario information, and preset business rule templates (such as standard rule templates for various domains or internal company specifications templates) are input into the large language model. Based on the constraint logic of the business rule templates, the large language model compares the differences between the erroneous knowledge and the standard rules, generates the corrected accurate knowledge, and synchronously updates the corresponding entity relationships in the knowledge graph after correction. For example, if the user's knowledge layer is found to contain the erroneous knowledge "annotation language: Japanese" (which conflicts with the user's previously confirmed "English annotation" preference), the large language model, combined with the business rule template that "user personalized preferences must be consistent with historical valid requirements," can automatically correct it to "annotation language: English."
[0127] Optionally, if invalid knowledge (such as expired or unrelated knowledge) is identified, it can be directly deleted or moved to a temporary backup repository (retained for a preset period of time to facilitate recovery from accidental deletion), thus avoiding invalid knowledge from occupying storage resources and interfering with subsequent retrieval efficiency. For example, if a "single temporary code requirement in January 2024" (which has expired after 30 days) is detected in the scene knowledge layer, it can be directly deleted.
[0128] The data processing method for intelligent agent dialogue provided in this application monitors memory units in each storage layer using an anomaly detection algorithm to identify erroneous or invalid knowledge, corrects erroneous knowledge, and deletes invalid knowledge. This effectively eliminates knowledge noise in the storage layer, improves the accuracy and purity of knowledge storage, ensures the precision of subsequent value assessment, reduces the negative impact of erroneous and invalid knowledge on system performance, and enhances the stability and reliability of the intelligent agent dialogue system.
[0129] As an optional implementation, based on any of the above embodiments, the following steps are also included: when the current system memory usage exceeds a preset memory usage threshold, memory units with a value score lower than the preset value threshold are transferred to disk storage, and the metadata of the transferred memory units in the memory index is retained.
[0130] The preset memory usage threshold is a pre-set percentage of memory usage that can be dynamically adjusted based on system hardware configuration and business operation requirements (e.g., set to 80% of the total system memory to avoid memory overflow causing system lag). Optionally, the preset value threshold and value score threshold can be linked (e.g., set to 6 points to ensure that the transferred memory units are low-value, non-core knowledge, without affecting the regular retrieval response).
[0131] Optionally, real-time memory usage can be obtained through the memory monitoring interface provided by the operating system (such as Performance Counter in Windows or free / top commands in Linux). When the memory usage is detected to continuously exceed the preset memory usage threshold (such as for 5 seconds), the storage media migration process is triggered.
[0132] Optionally, based on the calculated value score, all memory units with value scores lower than a preset value threshold (such as low-relevance knowledge in temporary user scenarios, expired and uncleared edge business rules, etc.) are filtered out to form a list of memory units to be migrated.
[0133] Optionally, the complete data of the memory unit to be migrated (such as temporary attributes of the user knowledge layer, expired scene vectors of the scene knowledge layer, etc.) is transferred to disk storage (using mechanical hard disk or solid-state disk array, supporting batch data writing); in addition, the metadata of the transferred memory unit is retained in the memory index. The metadata includes at least key information such as memory unit ID, storage layer, original value score, disk storage path, data format and last access time, to ensure that the target memory unit in the disk can be quickly located through the metadata during subsequent retrieval.
[0134] Optionally, after the migration is complete, delete the complete data of the memory units to be migrated in memory, retain only the metadata, release the occupied memory resources, and reduce the system memory usage rate back to within a safe threshold.
[0135] The data processing method for intelligent agent dialogue provided in this application uses value scores to filter low-value memory units for media migration. This not only releases memory resources and ensures the stability and smoothness of system operation, but also avoids the failure of memory unit retrieval after migration by retaining the metadata in the memory index.
[0136] Figure 4 This is a schematic diagram of the structure of a data processing device in an intelligent agent dialogue provided in an embodiment of this application, as shown below. Figure 4 As shown, the data processing device for intelligent agent dialogue provided in this embodiment is located in an electronic device. The data processing device 40 for intelligent agent dialogue provided in this embodiment includes: an extraction module 41, a caching module 42, a filtering module 43, a hierarchical storage module 44, an evaluation module 45, and a retrieval module 46.
[0137] Specifically, the extraction module 41 is used to extract structured knowledge from the dialogue data received from the user through the interactive interface; the structured knowledge includes user attributes, business rules, and scenario information; the caching module 42 is used to store the structured knowledge in a dynamic caching layer and add timeliness tags to the structured knowledge; the filtering module 43 is used to filter the target structured knowledge corresponding to multiple target historical dialogues in the dynamic caching layer, wherein the filtering rules for multiple target historical dialogues are pre-set based on dialogue relevance and business relevance; the hierarchical storage module 44 is used to allocate the filtered target structured knowledge to the corresponding storage layer according to a three-level hierarchical storage architecture; wherein the three-level hierarchical storage architecture includes a user knowledge layer, a business code layer, and a scenario knowledge layer; the evaluation module 45 is used to evaluate the value score of the memory unit in each storage layer, wherein the value score is obtained based on timeliness, scenario matching degree, and cross-session association strength; the retrieval module 46 is used to retrieve the memory units in each storage layer after value evaluation, generate response data for the dialogue data based on the retrieval results, and feed the response data back to the user.
[0138] Optionally, when extracting structured knowledge from dialogue data, extraction module 41 is specifically used to: convert dialogue data into standardized feature representations using semantic vectorization technology, and extract structured knowledge corresponding to user attributes, business rules, and scenario information through entity recognition and relation extraction algorithms.
[0139] Optionally, the dynamic caching layer is a session-level dynamic caching layer used to temporarily store information from a single conversation; the timeliness tag includes a conversation timestamp and a knowledge validity period identifier, wherein the knowledge validity period identifier is preset based on the business scenario and is used to distinguish between short-term temporary knowledge and long-term valid knowledge.
[0140] Optionally, before filtering the target structured knowledge corresponding to multiple target historical dialogues in the dynamic cache layer, the filtering module 43 is further configured to: use a sliding window mechanism to filter N dialogue records with value scores greater than a preset score value from the dynamic cache layer as target historical dialogues according to a preset period; where N is a positive integer greater than 1.
[0141] Optionally, the hierarchical storage module 44, when allocating the filtered target structured knowledge to the corresponding storage layer according to the three-level hierarchical storage architecture, specifically performs the following: allocating target structured knowledge of user long-term features to the user knowledge layer, which uses graph neural network encoding to store user attributes, with nodes representing user attributes and edge weights reflecting the strength of attribute associations; allocating target structured knowledge of structured business rules to the business code layer, which uses a tree-like storage structure; and allocating target structured knowledge of timestamped scenarios to the scenario knowledge layer, which is a vector database, with each scenario vector containing multi-dimensional features and scenario labels. The storage layers of the three-level hierarchical storage architecture are physically isolated and logically associated through knowledge graph embedding technology, which maps entity relationships in each storage layer to a low-dimensional vector space.
[0142] Optionally, the data processing device for intelligent agent dialogue provided in the embodiments of this application further includes an update module.
[0143] Optionally, after the filtered target structured knowledge is allocated to the corresponding storage layer according to the three-level hierarchical storage architecture, the update module is used to: dynamically add, update or merge conflicts between the existing structured knowledge in each storage layer and the newly allocated target structured knowledge through the large language model.
[0144] Optionally, the data processing device in the intelligent agent dialogue provided in the embodiments of this application further includes an error monitoring module and a memory usage monitoring module.
[0145] Optionally, the error monitoring module is used to: monitor memory units in each storage layer using an anomaly detection algorithm to identify erroneous or invalid knowledge; and, if erroneous or invalid knowledge is identified, correct the erroneous knowledge or delete the invalid knowledge using a large language model combined with business rule templates.
[0146] Optionally, the memory usage monitoring module is used to: transfer memory units with a value score lower than the preset value threshold to disk storage when the current system memory usage exceeds the preset memory usage threshold, and retain the metadata of the transferred memory units in the memory index.
[0147] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application, as shown below. Figure 5 As shown, the electronic device 50 provided in this embodiment includes a processor 52 and a memory 51 that is communicatively connected to the processor 52.
[0148] The memory 51 stores computer execution instructions, and the processor 52 executes the computer execution instructions stored in the memory 51 to implement the data processing method in the intelligent agent dialogue provided in any of the above embodiments.
[0149] The program may include program code, which includes computer-executable instructions. Memory 51 may include high-speed RAM, and may also include non-volatile memory, such as at least one disk storage device.
[0150] In this embodiment, the memory 51 and the processor 52 are connected via a bus. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 5 The bus is represented by a single straight line, but this does not mean that there is only one bus or one type of bus.
[0151] This application also provides a computer-readable storage medium, which stores computer-executable instructions. When executed by a processor, the computer-executable instructions are used to implement the data processing method in the intelligent agent dialogue provided in any of the above embodiments.
[0152] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the data processing method in intelligent agent dialogue provided in any of the above embodiments.
[0153] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.
[0154] It should be further noted that although the steps in the flowchart are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowchart may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0155] It should be understood that the above-described device embodiments are merely illustrative, and the device of this application can also be implemented in other ways. For example, the division of units / modules in the above embodiments is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units, modules, or components may be combined, or integrated into another system, or some features may be ignored or not executed.
[0156] Furthermore, unless otherwise specified, the functional units / modules in the various embodiments of this application can be integrated into one unit / module, or each unit / module can exist physically separately, or two or more units / modules can be integrated together. The integrated units / modules described above can be implemented in hardware or as software program modules.
[0157] When integrated units / modules are implemented in hardware, the hardware can be digital circuits, analog circuits, etc. The physical implementation of the hardware structure includes, but is not limited to, transistors, memristors, etc. Unless otherwise specified, the processor can be any suitable hardware processor, such as a CPU, GPU, FPGA, DSP, and ASIC, etc. Unless otherwise specified, the storage unit can be any suitable magnetic or magneto-optical storage medium, such as Resistive Random Access Memory (RRAM), Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), Enhanced Dynamic Random Access Memory (EDRAM), High-Bandwidth Memory (HBM), Hybrid Memory Cube (HMC), etc.
[0158] If the integrated unit / module is implemented as a software program module and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0159] In the above embodiments, the descriptions of each embodiment have their own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments. The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.
[0160] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0161] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A method for data processing in an agent dialogue, characterized in that, Comprising: in response to receiving the user terminal through the interactive interface input of the dialogue data, extracting the structured knowledge in the dialogue data; wherein the structured knowledge includes user attributes, business rules and scenario information; store the structured knowledge to the dynamic cache layer, and add time effectiveness label to the structured knowledge; screen the target structured knowledge corresponding to the plurality of target historical dialogues in the dynamic cache layer, wherein the screening rule of the plurality of target historical dialogues is based on dialogue correlation and business association pre-set; the target structured knowledge after screening is distributed to the corresponding storage layer according to the three-level hierarchical storage architecture; wherein the three-level hierarchical storage architecture includes user knowledge layer, business code layer and scenario knowledge layer; evaluate the value score of each memory unit in the storage layer, wherein the value score is obtained based on time effectiveness, scene matching degree and cross-session association strength; each memory unit in the storage layer after value evaluation is retrieved, and the response data for the dialogue data is generated according to the retrieval result, and the response data is fed back to the user terminal.
2. The method of claim 1, wherein, The extraction of the structured knowledge in the dialogue data comprises: using semantic vectorization technology to convert the dialogue data into standardized feature representation, and extracting the structured knowledge corresponding to user attributes, business rules and scenario information through entity recognition and relation extraction algorithm.
3. The method of claim 1, wherein, The dynamic cache layer is a session-level dynamic cache layer, which is used for temporarily storing information of single dialogue; the time effectiveness label includes dialogue timestamp and knowledge valid period identifier, wherein the knowledge valid period identifier is pre-set based on business scenario, which is used to distinguish short-term temporary knowledge and long-term effective knowledge.
4. The method of claim 1, wherein, Before the screening of the target structured knowledge corresponding to the plurality of target historical dialogues in the dynamic cache layer, it further comprises: using sliding window mechanism, N dialogue records with value score greater than pre-set score value are screened out from the dynamic cache layer as the target historical dialogues according to pre-set period; wherein N is a positive integer greater than 1.
5. The method of claim 1, wherein, The distribution of the target structured knowledge after screening to the corresponding storage layer according to the three-level hierarchical storage architecture comprises: the target structured knowledge of user long-term feature class is distributed to the user knowledge layer, the user knowledge layer uses graph neural network coding mode for storage, and the node represents the user attribute and the edge weight reflects the attribute association strength; the target structured knowledge of structured business rule class is distributed to the business code layer, and the business code layer adopts tree-shaped storage structure; the target structured knowledge of scenario class with timestamp is distributed to the scenario knowledge layer, and the scenario knowledge layer is a vector database, each scenario vector contains multi-dimensional features and scenario label; wherein each storage layer of the three-level hierarchical storage architecture is physically isolated, and is logically associated through knowledge graph embedding technology, and the knowledge graph embedding technology is used to map the entity relationship in each storage layer to low-dimensional vector space.
6. The method according to any one of claims 1 to 5, characterized in that, After the target structured knowledge after screening is distributed to the corresponding storage layer according to the three-level hierarchical storage architecture, it further comprises: The large language model is used to dynamically add, update or conflict-merge the existing structured knowledge in each storage layer and the newly assigned target structured knowledge.
7. The method according to any one of claims 1 to 5, characterized in that, Further comprising: An abnormality detection algorithm is used to monitor the memory units in each storage layer to identify erroneous knowledge or invalid knowledge; In the case of identifying the erroneous knowledge or the invalid knowledge, the large language model is used to correct the erroneous knowledge or delete the invalid knowledge in combination with a business rule template.
8. The method according to any one of claims 1 to 5, characterized in that, Further comprising: In the case that the current system memory usage exceeds a preset memory usage threshold, the memory units with a value score lower than a preset value threshold are transferred to the disk storage, and the metadata of the transferred memory units in the memory index is retained.
9. A data processing apparatus in an agent dialogue, characterized in that Further comprising: An extraction module is configured to extract structured knowledge from dialog data input by a user terminal through an interactive interface in response to receiving the dialog data; the structured knowledge includes user attributes, business rules and scenario information; A cache module is configured to store the structured knowledge in a dynamic cache layer and add a time-limited label to the structured knowledge; A screening module is configured to screen target structured knowledge corresponding to a plurality of target historical dialogues in the dynamic cache layer; the screening rules of the plurality of target historical dialogues are preset based on dialog relevance and business relevance; A hierarchical storage module is configured to assign the screened target structured knowledge to corresponding storage layers according to a three-level hierarchical storage architecture; the three-level hierarchical storage architecture includes a user knowledge layer, a business code layer and a scenario knowledge layer; An evaluation module is configured to evaluate the value score of memory units in each storage layer; the value score is obtained based on time-limited, scenario matching degree and cross-session association strength; A retrieval module is configured to retrieve the memory units in each storage layer after value evaluation, generate response data for the dialog data according to the retrieval result, and feed back the response data to the user terminal.
10. An electronic device, comprising: Further comprising: A processor and a memory connected in communication with the processor; The memory stores computer execution instructions; The processor executes the computer execution instructions stored in the memory to implement the method of any one of claims 1 to 8.
11. A computer readable storage medium, characterized in that, The computer-readable storage medium stores computer execution instructions, and the computer execution instructions are executed by the processor to implement the method of any one of claims 1 to 8.
12. A computer program product, characterised in that, The computer program is executed by the processor to implement the method of any one of claims 1 to 8.
Citation Information
Cited By
Memory extraction method and device based on user interaction data and storage medium
CN122221979A