A method and system for intelligent dialogue memory management in the logistics field

CN121579743BActive Publication Date: 2026-09-01SHANGHAI YUANQING INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511456257.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-13
Publication Date
2026-09-01
Estimated Expiration
2045-10-13

AI Technical Summary

Technical Problem

[0003]为解决上述技术问题,提供一种基于物流领域的智能对话记忆管理方法及系统,本技术方案解决了上述的现有技术普遍缺乏实时记忆更新和管理机制,导致系统在对话过程中无法充分利用用户的历史数据进行智能记忆调用和更新的问题

Benefits of technology

本发明提出一种基于物流领域的智能对话记忆管理方法及系统,通过结合QWen2.5-32B大语言模型和Milvus语义向量库,构建了一个动态、智能化的物流对话记忆管理系统;与传统的基于规则和关键词匹配的对话系统相比,它能够实时捕捉用户对话的细节,分析并更新用户画像,从而提供更精准、个性化的响应;通过引入时间衰减因子、语义向量相似度分析和多模态记忆召回机制,系统能够根据用户历史对话、当前对话主题和行为偏好,智能化地选择和更新记忆内容,提高对话响应的效率和准确度。该方案不仅增强了系统的智能化和个性化能力,还提升了对复杂对话情境和需求变化的适应能力,为物流领域的智能对话系统提供了强有力的技术支持。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121579743B_ABST
    Figure CN121579743B_ABST
Patent Text Reader

Abstract

This invention discloses an intelligent dialogue memory management method and system based on the logistics field, relating to the field of intelligent dialogue technology in logistics. The method includes: acquiring historical logistics dialogue data of target users; generating an initial knowledge graph of user features, interactive entities, and semantic relationships based on the QWen2.5-32B large language model; constructing a Milvus semantic vector library; monitoring the logistics dialogue flow in real time; using three rounds of dialogue as a judgment threshold to activate an adaptive memory management mechanism; extracting user dialogue content attribute features and behavioral preferences; dynamically updating the initial knowledge graph of user features, interactive entities, and semantic relationships and the Milvus semantic vector library; and activating a multimodal memory retrieval mechanism based on logistics dialogue triggered by the target user, collaboratively retrieving the user features, interactive entities, and semantic relationships knowledge graph and the Milvus semantic vector library to generate personalized intelligent dialogue responses, thus achieving a closed loop for intelligent dialogue memory management in logistics. The beneficial effects of this invention are: enhanced system intelligence and personalization capabilities.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent dialogue technology in logistics, specifically to an intelligent dialogue memory management method and system based on the logistics field. Background Technology

[0002] Existing intelligent dialogue systems in the logistics field suffer from the following shortcomings: Most systems rely on preset rules and static knowledge bases, lacking the ability to dynamically respond to users' personalized needs; when handling multi-turn dialogues, existing technologies cannot effectively integrate and update users' historical behavior data and dialogue context, resulting in low intelligence levels and an inability to accurately capture users' changing needs; many systems fail to effectively utilize the deep integration of semantic vector libraries and knowledge graphs, neglecting key factors such as semantic decay and entity association, leading to poor adaptability to changes in user needs and low personalization of responses; existing technologies generally lack real-time memory update and management mechanisms, preventing the system from fully utilizing users' historical data for intelligent memory recall and updates during dialogue, thus affecting the accuracy and real-time nature of dialogue responses. Summary of the Invention

[0003] To address the aforementioned technical problems, this paper provides an intelligent dialogue memory management method and system based on the logistics field. This technical solution solves the problem that the existing technologies generally lack real-time memory update and management mechanisms, which leads to the system being unable to fully utilize the user's historical data for intelligent memory retrieval and update during dialogue.

[0004] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A smart dialogue memory management method based on the logistics field includes: Acquire historical logistics dialogue data of target users, generate an initial knowledge graph of user features, interactive entities, and semantic relationships based on the QWen2.5-32B large language model, and construct a Milvus semantic vector library; Real-time monitoring of the target user's real-time logistics dialogue flow; using three rounds of dialogue as a judgment threshold; triggering an adaptive memory management mechanism to determine whether to perform memory compression storage. Extract the target user's dialogue content attribute features and behavioral preferences to generate a structured user profile, and dynamically update the initial knowledge graph of user features, interactive entities, and semantic relationships and the Milvus semantic vector library; Based on the target user triggering the logistics dialogue, a multimodal memory retrieval mechanism is activated to collaboratively retrieve the user feature-interaction entity-semantic relationship knowledge graph and Milvus semantic vector library, generating personalized intelligent dialogue responses and realizing a closed loop of intelligent dialogue memory management for logistics.

[0005] Preferably, historical logistics dialogue data of the target user is obtained, data preprocessing is performed, and a sequence of historical logistics dialogue texts of the user is constructed. Using sliding window technology, segment the user's historical logistics conversations; Based on the user's historical logistics dialogue text sequence, a command prompt model is trained, with user features, interactive entities, and relationships between entities and between entities and user features as outputs; Based on user features, interactive entities, and relationships between entities and between entities and user features as input, the QWen2.5-32B large language model is used to output structured text with entity-relationship-entity triples. Based on the structured text of entity-relation-entity triples as the model output, the data is imported into the NebulaGraph graph database and exported in JSON format as user nodes, feature nodes, and entity nodes to generate an initial knowledge graph of user features, interactive entities, and semantic relationships.

[0006] Preferably, based on the initial knowledge graph of user features-interaction entities-semantic relationships, the user's historical logistics dialogue text sequence is used as input, and the historical logistics dialogue text with semantically similar entity IDs is mapped to similar positions in the vector space as output to train the logistics dialogue text embedding model. Based on the logistics dialogue text embedding model, a corresponding semantic vector is generated for each user's historical logistics dialogue text. Historical logistics dialogue texts with similar semantics and the same entity ID are mapped to similar positions in the vector space to construct the Milvus semantic vector library.

[0007] The preferred objective function for the logistics dialogue text embedding model is as follows:

[0008] in, The objective function for the logistics dialogue text embedding model. For the i-th entity node in the knowledge graph, Let be the j-th entity node in the knowledge graph, and E be the set of all relation edges in the knowledge graph. For relational weight functions, For different types of relationships between the i-th entity node and the j-th entity node, s represents a single user's historical logistics dialogue text. The i-th entity node in the knowledge graph of the user's historical logistics dialogue text. The j-th entity node in the knowledge graph of the user's historical logistics dialogue text. This is an embedded function.

[0009] Preferably, the system monitors the real-time logistics dialogue flow of the target user in real time, generates a continuous logistics dialogue flow for the user based on the combination of logistics dialogue context, and iterates and updates in real time to dynamically generate a continuous logistics dialogue flow for the user. Set a three-round dialogue length time window as a preset threshold. If the preset threshold is exceeded, the current logistics dialogue will be automatically evaluated. The user logistics dialogue stream is spliced ​​together, and the named entity recognition model is used to count the number of new entities appearing in the current logistics dialogue and calculate the information density sub-score of the entity relative to the number of dialogue rounds in the current time window. With the goals of successful logistics dialogue task, confirmation of user preferences, and resolution of user problems, the DistilBERT model is trained. The output is to determine whether the current logistics dialogue meets a goal completion signal, and the logistics dialogue task completion score is calculated. Extract the earliest and latest logistics dialogues within the current time window, substitute them into the logistics dialogue text embedding model, obtain the semantic vectors of the earliest and latest logistics dialogues, calculate their cosine similarity, and obtain the logistics dialogue topic drift sub-score. The information density sub-score, the logistics dialogue task completion sub-score, and the logistics dialogue topic drift sub-score are integrated to obtain the final logistics dialogue score.

[0010] Preferably, based on a set three-round dialogue length time window, the final logistics dialogue score is compared, and an adaptive memory management mechanism is activated to determine whether the logistics dialogue in the current time window should be compressed and stored in memory. If the final logistics dialogue score is greater than the preset threshold, the logistics dialogue in the current time window is determined to be compressed and stored in memory. The initial knowledge graph of user features, interactive entities and semantic relationships and Milvus semantic vector library are substituted into the logistics dialogue text embedding model, compressed into knowledge triples and corresponding semantic vectors, and stored in Milvus semantic vector library. The knowledge triple is exemplified by user, query, and waybill number. If the final logistics dialogue score is less than or equal to the preset threshold, it is determined that the logistics dialogue in the current time window does not need to be stored in memory and compression, and the system returns to the real-time logistics dialogue flow of the target user under real-time monitoring.

[0011] Preferably, the real-time logistics dialogue flow of the target user is monitored and input into the QWen2.5-32B large language model to generate new dialogue entity-relationship-entity triple structured text; Based on the initial knowledge graph of user features, interactive entities, and semantic relationships, a set of candidate entities with similar names is retrieved by using the name string prefix matching method; Using a string similarity algorithm, the similarity between the new dialogue entity and the candidate entity is calculated, and the highest similarity score between the strings of the new dialogue entity and the candidate entity is obtained. If the highest similarity score between the new dialogue entity and the candidate entity string is higher than the preset string threshold, taking 0.95 as an example, then the new dialogue entity and the structured text of the entity-relationship-entity triple in the initial knowledge graph of user features-interaction entity-semantic relationship are determined to be the same entity. If the highest similarity score between the new dialogue entity and the candidate entity string is lower than the preset string threshold, the logistics dialogue text embedding model is coupled, the new dialogue entity and the candidate entity are transformed into corresponding semantic vectors, and the cosine similarity between the semantic vectors of the new dialogue entity and the candidate entity is calculated. Set a cosine similarity threshold. If the cosine similarity of the semantic vectors exceeds the cosine similarity threshold, it is confirmed that the new dialogue entity and the structured text of the entity-relationship-entity triple in the initial knowledge graph of user features-interaction entities-semantic relations are the same entity. If it is less than the cosine similarity threshold, the new dialogue entity is determined to be a new entity and the initial knowledge graph of user features-interaction entities-semantic relations is added. The cosine similarity threshold is 0.9 as an example.

[0012] Preferably, new dialogue relations are extracted based on the structured text of new dialogue entity-relation-entity triples; If the new dialogue relationship is conflicting, a decay factor is set, the confidence of the new dialogue relationship is calculated, the weight changes are processed through time decay, and the confidence of the new dialogue relationship is compared with the confidence of the old dialogue relationship after decay. If the confidence of the new dialogue relationship is greater than the confidence of the decayed old dialogue relationship, then the new dialogue relationship replaces the decayed old dialogue relationship. If the confidence of the new dialogue relationship is less than the confidence of the old dialogue relationship after decay, then the old dialogue relationship after decay is retained. If the new dialogue relationship does not conflict, then the new dialogue relationship is directly added to the initial knowledge graph of user features-interaction entities-semantic relationships; Merge new dialogue entities and new dialogue relationships to generate structured user profiles, and dynamically update the initial knowledge graph of user features, interactive entities, and semantic relationships with the Milvus semantic vector library.

[0013] Preferably, based on the target user triggering the logistics dialogue, the starting point of the user's logistics dialogue is captured in real time, and combined with the user's historical logistics dialogue context, the user's characteristics-interaction entities-semantic relationship knowledge graph related to the current dialogue topic is dynamically identified. Based on a knowledge graph of user features, interactive entities, and semantic relationships related to the current dialogue topic, combined with the Milvus semantic vector library, historical dialogue fragments and associated entities that are semantically similar to the current dialogue text are retrieved to generate a candidate memory set. By employing a multimodal fusion strategy, candidate memories are prioritized by integrating text semantics, entity relevance, and time decay factor. The time decay factor is dynamically adjusted based on the time interval between the historical dialogue and the current time. Based on the priority-ranked candidate memories, the QWen2.5-32B large language model is integrated, and the weight ratio of text generation and memory recall is dynamically allocated through the attention mechanism. If the current dialogue is detected to involve new entities or complex tasks, a deep retrieval mode is triggered, expanding the retrieval scope of the user feature-interaction entity-semantic relationship knowledge graph and Milvus semantic vector library, introducing an external logistics knowledge base for cross-validation, generating personalized intelligent dialogue responses, and realizing a closed loop for intelligent dialogue memory management in logistics.

[0014] Furthermore, an intelligent dialogue memory management system based on the logistics field is provided to implement an intelligent dialogue memory management method based on the logistics field, comprising: Data acquisition module, data analysis module, data update module, and data feedback module; The data acquisition module is used to acquire historical logistics dialogue data of the target user, generate an initial knowledge graph of user features, interactive entities, and semantic relationships based on the QWen2.5-32B large language model, and construct a Milvus semantic vector library. The data analysis module is used to monitor the real-time logistics dialogue flow of the target user in real time, and uses three rounds of dialogue as a judgment threshold to activate the adaptive memory management mechanism to determine whether to perform memory compression storage. The data update module is electrically connected to the data analysis module and is used to extract the target user's dialogue content attribute features and behavioral preferences, generate a structured user profile, and dynamically update the initial knowledge graph of user features-interaction entities-semantic relationships and the Milvus semantic vector library. The data feedback module is electrically connected to the data acquisition module and is used to initiate a multimodal memory retrieval mechanism based on the logistics dialogue triggered by the target user. It collaboratively retrieves the user feature-interaction entity-semantic relationship knowledge graph and Milvus semantic vector library to generate a personalized intelligent dialogue response, thereby realizing a closed loop of intelligent dialogue memory management for logistics.

[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention proposes an intelligent dialogue memory management method and system for the logistics field. By combining the QWen2.5-32B large language model and the Milvus semantic vector library, a dynamic and intelligent logistics dialogue memory management system is constructed. Compared with traditional dialogue systems based on rule and keyword matching, it can capture the details of user dialogue in real time, analyze and update user profiles, thereby providing more accurate and personalized responses. By introducing a time decay factor, semantic vector similarity analysis, and a multimodal memory retrieval mechanism, the system can intelligently select and update memory content based on the user's historical dialogues, current dialogue topics, and behavioral preferences, improving the efficiency and accuracy of dialogue responses. This solution not only enhances the system's intelligence and personalization capabilities but also improves its adaptability to complex dialogue scenarios and changing needs, providing strong technical support for intelligent dialogue systems in the logistics field. Attached Figure Description

[0016] Figure 1 A flowchart of an intelligent dialogue memory management method based on the logistics field; Figure 2 This is a framework diagram of an intelligent dialogue memory management system based on the logistics field. Detailed Implementation

[0017] The following description is intended to disclose the invention and enable those skilled in the art to implement it. The preferred embodiments described below are merely examples, and other obvious variations will occur to those skilled in the art.

[0018] Reference Figure 1 As shown, an intelligent dialogue memory management method based on the logistics field includes: S1. Obtain historical logistics dialogue data of the target user, generate an initial knowledge graph of user features, interactive entities, and semantic relationships based on the QWen2.5-32B large language model, and build a Milvus semantic vector library. Step S1 includes the following: Obtain historical logistics dialogue data of the target user, perform data preprocessing, and construct a sequence of historical logistics dialogue texts of the user. Using sliding window technology, segment the user's historical logistics conversations; Based on the user's historical logistics dialogue text sequence, a command prompt model is trained, with user features, interactive entities, and relationships between entities and between entities and user features as outputs; Based on user features, interactive entities, and relationships between entities and between entities and user features as input, the QWen2.5-32B large language model is used to output structured text with entity-relationship-entity triples. Based on the structured text of entity-relation-entity triples as the model output, the data is imported into the NebulaGraph graph database and exported in JSON format as user nodes, feature nodes, and entity nodes to generate an initial knowledge graph of user features, interactive entities, and semantic relationships.

[0019] Step S1 also includes the following: Based on an initial knowledge graph of user features, interactive entities, and semantic relationships, and using the sequence of historical logistics dialogue texts as input, and mapping historical logistics dialogue texts with semantically similar entity IDs to nearby positions in the vector space as output, a logistics dialogue text embedding model is trained, as shown in the following formula:

[0020] in, The objective function for the logistics dialogue text embedding model. For the i-th entity node in the knowledge graph, Let be the j-th entity node in the knowledge graph, and E be the set of all relation edges in the knowledge graph. For relational weight functions, For different types of relationships between the i-th entity node and the j-th entity node, s represents a single user's historical logistics dialogue text. The i-th entity node in the knowledge graph of the user's historical logistics dialogue text. The j-th entity node in the knowledge graph of the user's historical logistics dialogue text. For embedded functions; Based on the logistics dialogue text embedding model, a corresponding semantic vector is generated for each user's historical logistics dialogue text. Historical logistics dialogue texts with similar semantics and the same entity ID are mapped to similar positions in the vector space to construct the Milvus semantic vector library.

[0021] When using it, refer to the content of step S1 above: Existing domestic and international technologies for processing historical logistics dialogue data and constructing knowledge graphs generally rely on traditional rule matching or machine learning models based on limited data. These methods typically lack efficient data processing and feature extraction capabilities when faced with massive amounts of dialogue data, are easily affected by data quality and noise, and struggle to capture complex semantic relationships and multi-level entity information in user interactions. Furthermore, existing technologies fail to effectively utilize the advantages of advanced semantic vector models and graph databases, resulting in slow knowledge graph construction speed, low accuracy, and the inability to achieve real-time updates and dynamic adjustments. This step combines QWen2.5-32B large-scale... Based on historical user logistics dialogue data, a semantic and structured initial knowledge graph was constructed using a language model and the Milvus semantic vector library. Fine-grained segmentation of the dialogue data was achieved through sliding window technology, and the structured text of triples output by the large language model was used to accurately capture and dynamically map user interaction entities and semantic relationships. The combination of a graph database and a semantic vector library improved the speed and accuracy of knowledge graph construction, effectively handling complex semantic similarities and entity associations. This enhanced the intelligence level of the dialogue system, optimized the user interaction experience, and provided a richer semantic foundation for subsequent semantic understanding and personalized recommendations.

[0022] S2. Real-time monitoring of the target user's real-time logistics dialogue flow, using three rounds of dialogue as a judgment threshold, and activating an adaptive memory management mechanism to determine whether to perform memory compression storage. Step S2 includes the following: Real-time monitoring of the target user's real-time logistics dialogue flow; generating a continuous logistics dialogue flow for the user based on the combination of logistics dialogue contexts; iterating and updating in real time; dynamically generating a continuous logistics dialogue flow for the user. Set a three-round dialogue length time window as a preset threshold. If the preset threshold is exceeded, the current logistics dialogue will be automatically evaluated. The user logistics dialogue stream is spliced ​​together, and the named entity recognition model is used to count the number of new entities appearing in the current logistics dialogue and calculate the information density sub-score of the entity relative to the number of dialogue rounds in the current time window. With the goals of successful logistics dialogue task, confirmation of user preferences, and resolution of user problems, the DistilBERT model is trained. The output is to determine whether the current logistics dialogue meets a goal completion signal, and the logistics dialogue task completion score is calculated. Extract the earliest and latest logistics dialogues within the current time window, substitute them into the logistics dialogue text embedding model, obtain the semantic vectors of the earliest and latest logistics dialogues, calculate their cosine similarity, and obtain the logistics dialogue topic drift sub-score. The information density sub-score, the logistics dialogue task completion sub-score, and the logistics dialogue topic drift sub-score are integrated to obtain the final logistics dialogue score.

[0023] Step S2 also includes the following: Based on the set three-round dialogue length time window, the final logistics dialogue score is compared, and an adaptive memory management mechanism is activated to determine whether the logistics dialogue in the current time window should be compressed and stored in memory. If the final logistics dialogue score is greater than the preset threshold, the logistics dialogue in the current time window is determined to be compressed and stored in memory. The initial knowledge graph of user features, interactive entities and semantic relationships and Milvus semantic vector library are substituted into the logistics dialogue text embedding model, compressed into knowledge triples and corresponding semantic vectors, and stored in Milvus semantic vector library. The knowledge triple is exemplified by user, query, and waybill number. If the final logistics dialogue score is less than or equal to the preset threshold, it is determined that the logistics dialogue in the current time window does not need to be stored in memory and compression, and the system returns to the real-time logistics dialogue flow of the target user under real-time monitoring.

[0024] When using it, refer to the content of step S2 above: Existing domestic and international technologies for real-time logistics dialogue flow monitoring and memory management generally rely on traditional static dialogue management systems or rule-based dialogue flow tracking methods. These methods struggle to effectively and dynamically capture changes in information density, task completion, and semantic drift during multi-turn dialogues. When dealing with massive dialogue flows, they cannot adaptively adjust memory storage strategies and lack real-time dynamic optimization and intelligent decision support. Users' historical dialogue data and important information may be over- or under-stored, limiting system performance and intelligence. This step, through an adaptive memory management mechanism combined with a multi-dimensional scoring system of information density, task completion, and topic drift, dynamically evaluates the value of logistics dialogues and determines whether to perform memory compression storage. By monitoring user dialogue flows in real time and utilizing the DistilBERT model and semantic vector library, key information in the dialogue can be efficiently captured and storage strategies automatically optimized, significantly improving the system's response speed and accuracy to user needs. The combination of triplet and semantic vector storage mechanisms enhances the intelligence level of dialogue storage and management, providing more flexible and efficient technical support for subsequent data mining, personalized recommendations, and real-time responses, effectively improving the intelligence level of the logistics dialogue system.

[0025] S3. Extract the target user's dialogue content attribute features and behavioral preferences, generate a structured user profile, and dynamically update the initial knowledge graph of user features, interactive entities, and semantic relationships and the Milvus semantic vector library; Step S3 includes the following: Real-time monitoring of the target user's real-time logistics dialogue flow, input into the QWen2.5-32B large language model, generates new dialogue entity-relationship-entity triple structured text; Based on the initial knowledge graph of user features, interactive entities, and semantic relationships, a set of candidate entities with similar names is retrieved by using the name string prefix matching method; Using a string similarity algorithm, the similarity between the new dialogue entity and the candidate entity is calculated, and the highest similarity score between the strings of the new dialogue entity and the candidate entity is obtained. If the highest similarity score between the new dialogue entity and the candidate entity string is higher than the preset string threshold, taking 0.95 as an example, then the new dialogue entity and the structured text of the entity-relationship-entity triple in the initial knowledge graph of user features-interaction entity-semantic relationship are determined to be the same entity. If the highest similarity score between the new dialogue entity and the candidate entity string is lower than the preset string threshold, the logistics dialogue text embedding model is coupled, the new dialogue entity and the candidate entity are transformed into corresponding semantic vectors, and the cosine similarity between the semantic vectors of the new dialogue entity and the candidate entity is calculated. Set a cosine similarity threshold. If the cosine similarity of the semantic vectors exceeds the cosine similarity threshold, it is confirmed that the new dialogue entity and the structured text of the entity-relationship-entity triple in the initial knowledge graph of user features-interaction entities-semantic relations are the same entity. If it is less than the cosine similarity threshold, the new dialogue entity is determined to be a new entity and the initial knowledge graph of user features-interaction entities-semantic relations is added. The cosine similarity threshold is 0.9 as an example.

[0026] Step S3 also includes the following: Extract new dialogue relations based on the structured text of new dialogue entity-relation-entity triples; If the new dialogue relationship is conflicting, a decay factor is set, the confidence of the new dialogue relationship is calculated, the weight changes are processed through time decay, and the confidence of the new dialogue relationship is compared with the confidence of the old dialogue relationship after decay. If the confidence of the new dialogue relationship is greater than the confidence of the decayed old dialogue relationship, then the new dialogue relationship replaces the decayed old dialogue relationship. If the confidence of the new dialogue relationship is less than the confidence of the old dialogue relationship after decay, then the old dialogue relationship after decay is retained. If the new dialogue relationship does not conflict, then the new dialogue relationship is directly added to the initial knowledge graph of user features-interaction entities-semantic relationships; Merge new dialogue entities and new dialogue relationships to generate structured user profiles, and dynamically update the initial knowledge graph of user features, interactive entities, and semantic relationships with the Milvus semantic vector library.

[0027] When using it, refer to the content of step S3 above: Existing domestic and international technologies for real-time user dialogue content analysis and user profile construction cannot efficiently handle the diversity and dynamic changes in user behavior preferences. User profile construction using keyword matching or simple rule engines fails to capture users' potential complex interests and behavioral patterns, and is ill-suited to addressing real-time updates in user needs. Rule-based dialogue analysis and simple text matching often overlook subtle semantic differences, and their processing speed and accuracy are limited when dealing with large-scale, real-time dialogue data. This step combines the QWen2.5-32B large language model and the Milvus semantic vector library, employing triplet structured text and semantic vector similarity analysis to dynamically identify details of user behavior preferences, constructing more accurate and real-time updated user profiles. By monitoring and analyzing the dialogue flow in real time, the system can efficiently capture key features in user interactions and make intelligent judgments and updates based on semantic understanding. This improves the accuracy of user profile construction and allows for adaptation to rapid changes in user needs. By resolving entity matching and relationship conflict issues, the system's ability to handle complex semantics is enhanced, providing a more reliable foundation for subsequent data mining and intelligent decision-making.

[0028] S4. Trigger logistics dialogue based on target user, start multimodal memory recall mechanism, collaboratively retrieve user feature-interaction entity-semantic relationship knowledge graph and Milvus semantic vector library, generate personalized intelligent dialogue response, realize logistics intelligent dialogue memory management closed loop; Step S4 includes the following: Based on the target user triggering the logistics dialogue, the starting point of the user's logistics dialogue is captured in real time. Combined with the user's historical logistics dialogue context, the knowledge graph of user features, interactive entities, and semantic relationships related to the current dialogue topic is dynamically identified. Based on a knowledge graph of user features, interactive entities, and semantic relationships related to the current dialogue topic, combined with the Milvus semantic vector library, historical dialogue fragments and associated entities that are semantically similar to the current dialogue text are retrieved to generate a candidate memory set. By employing a multimodal fusion strategy, candidate memories are prioritized by integrating text semantics, entity relevance, and time decay factor. The time decay factor is dynamically adjusted based on the time interval between the historical dialogue and the current time. Based on the priority-ranked candidate memories, the QWen2.5-32B large language model is integrated, and the weight ratio of text generation and memory recall is dynamically allocated through the attention mechanism. If the current dialogue is detected to involve new entities or complex tasks, a deep retrieval mode is triggered, expanding the retrieval scope of the user feature-interaction entity-semantic relationship knowledge graph and Milvus semantic vector library, introducing an external logistics knowledge base for cross-validation, generating personalized intelligent dialogue responses, and realizing a closed loop for intelligent dialogue memory management in logistics.

[0029] When using it, refer to the content of step S4 above: Existing domestic and international technologies for real-time dialogue response and memory management typically rely on rule-based dialogue generation and static memory management systems, lacking dynamic adjustment and intelligent optimization mechanisms. When handling multi-turn dialogues, existing technologies cannot effectively combine user historical dialogue context, semantic understanding, and real-time memory updates, making it difficult for dialogue systems to generate personalized and timely responses. They often rely primarily on keyword matching, failing to fully consider time decay, semantic drift, and the fusion of multimodal information, resulting in low system response accuracy and intelligence. This step, by combining a multimodal memory retrieval mechanism and the Milvus semantic vector library, can dynamically retrieve and generate personalized responses based on the topic, historical context, and user characteristics of real-time dialogue. By introducing time decay factors, semantic vector similarity analysis, and attention mechanisms, it can accurately sort and intelligently update memories, thereby providing a more efficient and personalized dialogue experience. This addresses the shortcomings of existing technologies in dialogue content and memory management, improves the system's adaptability to complex dialogue scenarios, and further promotes the precision and personalization of intelligent dialogue systems.

[0030] Reference Figure 2 As shown, an intelligent dialogue memory management system based on the logistics field includes: Data acquisition module, data analysis module, data update module, and data feedback module; The data acquisition module is used to acquire historical logistics dialogue data of the target user, generate an initial knowledge graph of user features, interactive entities, and semantic relationships based on the QWen2.5-32B large language model, and construct a Milvus semantic vector library. The data analysis module is used to monitor the real-time logistics dialogue flow of the target user in real time, and uses three rounds of dialogue as a judgment threshold to activate the adaptive memory management mechanism to determine whether to perform memory compression storage. The data update module is electrically connected to the data analysis module and is used to extract the target user's dialogue content attribute features and behavioral preferences, generate a structured user profile, and dynamically update the initial knowledge graph of user features-interaction entities-semantic relationships and the Milvus semantic vector library. The data feedback module is electrically connected to the data acquisition module and is used to initiate a multimodal memory retrieval mechanism based on the logistics dialogue triggered by the target user. It collaboratively retrieves the user feature-interaction entity-semantic relationship knowledge graph and Milvus semantic vector library to generate a personalized intelligent dialogue response, thereby realizing a closed loop of intelligent dialogue memory management for logistics.

[0031] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention. The scope of protection claimed by the appended claims and their equivalents is defined.

Claims

1. A method for intelligent dialogue memory management based on the logistics field, characterized in that, include: S1. Obtain historical logistics dialogue data of the target user, generate an initial knowledge graph of user features, interactive entities, and semantic relationships based on the QWen2.5-32B large language model, and build a Milvus semantic vector library. S2. Real-time monitoring of the target user's real-time logistics dialogue flow, using three rounds of dialogue as a judgment threshold, and activating an adaptive memory management mechanism to determine whether to perform memory compression storage. S3. Extract the target user's dialogue content attribute features and behavioral preferences, generate a structured user profile, and dynamically update the initial knowledge graph of user features, interactive entities, and semantic relationships and the Milvus semantic vector library; S4. Trigger logistics dialogue based on target user, start multimodal memory recall mechanism, collaboratively retrieve user feature-interaction entity-semantic relationship knowledge graph and Milvus semantic vector library, generate personalized intelligent dialogue response, realize logistics intelligent dialogue memory management closed loop; S2 includes: Real-time monitoring of the target user's real-time logistics dialogue flow; generating a continuous logistics dialogue flow for the user based on the combination of logistics dialogue contexts; iterating and updating in real time; dynamically generating a continuous logistics dialogue flow for the user. Set a three-round dialogue length time window as a preset threshold. If the preset threshold is exceeded, the current logistics dialogue will be automatically evaluated. The user logistics dialogue stream is spliced ​​together, and the named entity recognition model is used to count the number of new entities appearing in the current logistics dialogue and calculate the information density sub-score of the entity relative to the number of dialogue rounds in the current time window. With the goals of successful logistics dialogue task, confirmation of user preferences, and resolution of user problems, the DistilBERT model is trained. The output is to determine whether the current logistics dialogue meets a goal completion signal, and the logistics dialogue task completion score is calculated. Extract the earliest and latest logistics dialogues within the current time window, substitute them into the logistics dialogue text embedding model, obtain the semantic vectors of the earliest and latest logistics dialogues, calculate their cosine similarity, and obtain the logistics dialogue topic drift sub-score. By integrating the information density sub-score, the logistics dialogue task completion sub-score, and the logistics dialogue topic drift sub-score, the final logistics dialogue score is obtained. S2 further includes: Based on the set three-round dialogue length time window, the final logistics dialogue score is compared, and an adaptive memory management mechanism is activated to determine whether the logistics dialogue in the current time window should be compressed and stored in memory. If the final logistics dialogue score is greater than the preset threshold, the logistics dialogue in the current time window is determined to be compressed and stored in memory. The initial knowledge graph of user features, interactive entities and semantic relationships and Milvus semantic vector library are substituted into the logistics dialogue text embedding model, compressed into knowledge triples and corresponding semantic vectors, and stored in Milvus semantic vector library. The knowledge triple is exemplified by user, query, and waybill number. If the final logistics dialogue score is less than or equal to the preset threshold, it is determined that the logistics dialogue in the current time window does not need to be stored in memory and compression, and the system returns to the real-time logistics dialogue flow of the target user under real-time monitoring.

2. The intelligent dialogue memory management method based on the logistics field according to claim 1, characterized in that, S1 includes: Obtain historical logistics dialogue data of the target user, perform data preprocessing, and construct a sequence of historical logistics dialogue texts of the user. Using sliding window technology, segment the user's historical logistics conversations; Based on the user's historical logistics dialogue text sequence, a command prompt model is trained, with user features, interactive entities, and relationships between entities and between entities and user features as outputs; Based on user features, interactive entities, and relationships between entities and between entities and user features as input, the QWen2.5-32B large language model is used to output structured text with entity-relationship-entity triples. Based on the structured text of entity-relation-entity triples as the model output, the data is imported into the NebulaGraph graph database and exported in JSON format as user nodes, feature nodes, and entity nodes to generate an initial knowledge graph of user features, interactive entities, and semantic relationships.

3. The intelligent dialogue memory management method based on the logistics field according to claim 2, characterized in that, S1 further includes: Based on the initial knowledge graph of user features, interactive entities, and semantic relationships, the logistics dialogue text embedding model is trained by taking the user's historical logistics dialogue text sequence as input and mapping historical logistics dialogue texts with semantically similar entity IDs to similar positions in the vector space as output. Based on the logistics dialogue text embedding model, a corresponding semantic vector is generated for each user's historical logistics dialogue text. Historical logistics dialogue texts with similar semantics and the same entity ID are mapped to similar positions in the vector space to construct the Milvus semantic vector library.

4. The intelligent dialogue memory management method based on the logistics field according to claim 3, characterized in that, The objective function of the logistics dialogue text embedding model is as follows: ; in, The objective function for the logistics dialogue text embedding model. For the i-th entity node in the knowledge graph, Let be the j-th entity node in the knowledge graph, and E be the set of all relation edges in the knowledge graph. For relational weight functions, For different types of relationships between the i-th entity node and the j-th entity node, s represents a single user's historical logistics dialogue text. The i-th entity node in the knowledge graph of the user's historical logistics dialogue text. The j-th entity node in the knowledge graph of the user's historical logistics dialogue text. This is an embedded function.

5. The intelligent dialogue memory management method based on the logistics field according to claim 4, characterized in that, S3 includes: Real-time monitoring of the target user's real-time logistics dialogue flow, input into the QWen2.5-32B large language model, generates new dialogue entity-relationship-entity triple structured text; Based on the initial knowledge graph of user features, interactive entities, and semantic relationships, a set of candidate entities with similar names is retrieved by using the name string prefix matching method; Using a string similarity algorithm, the similarity between the new dialogue entity and the candidate entity is calculated, and the highest similarity score between the strings of the new dialogue entity and the candidate entity is obtained. If the highest similarity score between the new dialogue entity and the candidate entity string is higher than the preset string threshold, taking 0.95 as an example, then the new dialogue entity and the structured text of the entity-relationship-entity triple in the initial knowledge graph of user features-interaction entity-semantic relationship are determined to be the same entity. If the highest similarity score between the new dialogue entity and the candidate entity string is lower than the preset string threshold, the logistics dialogue text embedding model is coupled, the new dialogue entity and the candidate entity are transformed into corresponding semantic vectors, and the cosine similarity between the semantic vectors of the new dialogue entity and the candidate entity is calculated. Set a cosine similarity threshold. If the cosine similarity of the semantic vectors exceeds the cosine similarity threshold, it is confirmed that the new dialogue entity and the structured text of the entity-relationship-entity triple in the initial knowledge graph of user features-interaction entities-semantic relations are the same entity. If it is less than the cosine similarity threshold, the new dialogue entity is determined to be a new entity and the initial knowledge graph of user features-interaction entities-semantic relations is added. The cosine similarity threshold is 0.9 as an example.

6. The intelligent dialogue memory management method based on the logistics field according to claim 5, characterized in that, S3 further includes: Extract new dialogue relations based on the structured text of new dialogue entity-relation-entity triples; If the new dialogue relationship is conflicting, a decay factor is set, the confidence of the new dialogue relationship is calculated, the weight changes are processed through time decay, and the confidence of the new dialogue relationship is compared with the confidence of the old dialogue relationship after decay. If the confidence of the new dialogue relationship is greater than the confidence of the decayed old dialogue relationship, then the new dialogue relationship replaces the decayed old dialogue relationship. If the confidence of the new dialogue relationship is less than the confidence of the old dialogue relationship after decay, then the old dialogue relationship after decay is retained. If the new dialogue relationship does not conflict, then the new dialogue relationship is directly added to the initial knowledge graph of user features-interaction entities-semantic relationships; Merge new dialogue entities and new dialogue relationships to generate structured user profiles, and dynamically update the initial knowledge graph of user features, interactive entities, and semantic relationships with the Milvus semantic vector library.

7. The intelligent dialogue memory management method based on the logistics field according to claim 1, characterized in that, S4 includes: Based on the target user triggering the logistics dialogue, the starting point of the user's logistics dialogue is captured in real time. Combined with the user's historical logistics dialogue context, the knowledge graph of user features, interactive entities, and semantic relationships related to the current dialogue topic is dynamically identified. Based on a knowledge graph of user features, interactive entities, and semantic relationships related to the current dialogue topic, combined with the Milvus semantic vector library, historical dialogue fragments and associated entities that are semantically similar to the current dialogue text are retrieved to generate a candidate memory set. By employing a multimodal fusion strategy, candidate memories are prioritized by integrating text semantics, entity relevance, and time decay factor. The time decay factor is dynamically adjusted based on the time interval between the historical dialogue and the current time. Based on the priority-ranked candidate memories, the QWen2.5-32B large language model is integrated, and the weight ratio of text generation and memory recall is dynamically allocated through the attention mechanism. If the current dialogue is detected to involve new entities or complex tasks, a deep retrieval mode is triggered, expanding the retrieval scope of the user feature-interaction entity-semantic relationship knowledge graph and Milvus semantic vector library, introducing an external logistics knowledge base for cross-validation, generating personalized intelligent dialogue responses, and realizing a closed loop for intelligent dialogue memory management in logistics.

8. An intelligent dialogue memory management system based on the logistics field, characterized in that, To implement any one of claims 1-7, the intelligent dialogue memory management method based on the logistics field includes: Data acquisition module, data analysis module, data update module, and data feedback module; The data acquisition module is used to acquire historical logistics dialogue data of the target user, generate an initial knowledge graph of user features, interactive entities, and semantic relationships based on the QWen2.5-32B large language model, and construct a Milvus semantic vector library. The data analysis module is used to monitor the real-time logistics dialogue flow of the target user in real time, and uses three rounds of dialogue as a judgment threshold to activate the adaptive memory management mechanism to determine whether to perform memory compression storage. The data update module is electrically connected to the data analysis module and is used to extract the target user's dialogue content attribute features and behavioral preferences, generate a structured user profile, and dynamically update the initial knowledge graph of user features-interaction entities-semantic relationships and the Milvus semantic vector library. The data feedback module is electrically connected to the data acquisition module and is used to initiate a multimodal memory retrieval mechanism based on the logistics dialogue triggered by the target user. It collaboratively retrieves the user feature-interaction entity-semantic relationship knowledge graph and Milvus semantic vector library to generate a personalized intelligent dialogue response, thereby realizing a closed loop of intelligent dialogue memory management for logistics.

Citation Information

Patent Citations

  • Memory retrieval method for enhancing multi-modal long-context dialogue ability of large language model

    CN119293139A

  • Digital human continuous dialogue and memory enhancement method based on knowledge graph

    CN120763301A