Large model reasoning method and device based on retrieval enhancement generation, computer equipment, medium and product
By acquiring and processing personal communication data locally on the terminal, constructing a dynamic knowledge graph and performing large-scale model inference, the privacy data security and transmission latency issues of large models stored in the cloud are solved, achieving end-to-end local execution and data security.
Patent Information
- Application Number
- CN202511094799.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-06
- Publication Date
- 2025-11-18
AI Technical Summary
Existing large-scale models have issues with user privacy data security and data transmission latency, especially when storing and processing user data on cloud servers, which poses a risk of data leakage.
The system acquires personal communication data locally on the terminal, performs data preprocessing to construct a dynamic knowledge graph, and assigns dynamic weights to nodes and edges through a multi-dimensional weight calculation model. It then responds to user query requests by performing large-scale model inference, ensuring that data is stored and processed locally and avoiding network transmission.
It achieves end-to-end local execution, from data collection and preprocessing to knowledge graph construction and model inference, ensuring the security of user privacy data, avoiding the risk of data leakage, and improving the accuracy and efficiency of data processing.
Smart Images

Figure CN120975235A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a method, apparatus, computer device, medium, and product for large model reasoning based on retrieval-enhanced generation. Background Technology
[0002] With the rapid development of artificial intelligence technology, personalized services have become crucial for enhancing user experience. Current technologies typically rely on cloud servers to store and process user data, which not only presents data transmission latency issues but also poses the risk of user privacy data leakage. Therefore, there is an urgent need for a large-model inference method that can ensure the security of user privacy data. Summary of the Invention
[0003] Therefore, it is necessary to provide a method, apparatus, computer device, medium, and product for large model inference based on retrieval enhancement generation that can ensure the security of user privacy data, addressing the aforementioned technical issues.
[0004] Firstly, this application provides a large-scale model inference method based on retrieval enhancement generation, including:
[0005] Acquire local personal communication data on the terminal and preprocess the personal communication data to obtain standardized communication data;
[0006] Based on standardized communication data, a dynamic knowledge graph is constructed, and the standardized communication data and the dynamic knowledge graph are stored in a local knowledge base;
[0007] Obtain the dynamic weights of each node and edge in the dynamic knowledge graph;
[0008] In response to a user-triggered query request, the system retrieves the corresponding personalized knowledge from the local knowledge base and constructs dynamic context information based on the personalized knowledge and the dynamic weights of each node and edge in the dynamic knowledge graph.
[0009] Perform corresponding large model inference operations based on contextual information.
[0010] In one embodiment, personal communication data includes at least one of call data, communication information data, and user behavior data; user behavior data includes at least one of calendar events, memos, behavior planning records, and application operation records.
[0011] In one embodiment, the local knowledge base includes a basic data layer, a knowledge graph layer, and a semantic index layer; the basic data layer is used to store standardized communication data; the knowledge graph layer is used to store dynamic knowledge graphs; the local knowledge base is encrypted using an encryption algorithm, and the encryption key of the encryption algorithm is generated locally by the user on the terminal.
[0012] In one embodiment, the step of acquiring local personal communication data of the terminal includes:
[0013] When the user enables the data collection function, personal communication data is obtained locally on the terminal according to the collection time range and data type set by the user.
[0014] In one embodiment, the step of preprocessing personal communication data to obtain standardized communication data includes:
[0015] Perform data cleaning and processing on personal communication data;
[0016] Standardized communication data is obtained by standardizing personal communication data after data cleaning.
[0017] In one embodiment, the step of cleaning personal communication data includes:
[0018] The communication identifier in personal communication data is identified by a hash algorithm, and duplicate communication identifiers are deleted from the personal access data. The communication identifier includes the communication timestamp and the SMS identifier.
[0019] Noise data in personal communication data is identified and removed using text similarity algorithms and speech signal processing algorithms, respectively; the noise data includes garbled text and silent speech segments.
[0020] Obtain sensitive information from personal communication data and replace the sensitive information with de-identified tags.
[0021] In one embodiment, the step of standardizing the cleaned personal communication data to obtain standardized communication data includes:
[0022] The text data, voice call data, and metadata were extracted from the cleaned personal communication data.
[0023] Remove symbols from the text data that do not meet the target conditions, and then perform word segmentation on the removed text data to obtain text keywords;
[0024] The call voice data is preprocessed and then converted into text format.
[0025] By integrating metadata with text keywords and text-formatted voice data, standardized communication data is obtained.
[0026] In one embodiment, the step of constructing a dynamic knowledge graph based on standardized communication data includes:
[0027] Identify the first entity object in standardized communication data and obtain the association relationship between the first entity objects;
[0028] A dynamic knowledge graph is constructed using the first entity object as a node and the relationships between the first entity objects as edges.
[0029] In one embodiment, the step of obtaining the dynamic weights of each node and edge in the dynamic knowledge graph includes:
[0030] Construct a multi-dimensional weight calculation model; the multi-dimensional weight calculation model includes a time decay model, an interaction frequency model, and an emotion intensity model;
[0031] For each node and edge in the dynamic knowledge graph, the first weight, second weight, and third weight are calculated using the time decay model, interaction frequency model, and sentiment intensity model, respectively.
[0032] The first, second, and third weights are weighted and summed to obtain the dynamic weights of the corresponding nodes or edges.
[0033] In one embodiment, the time decay model uses an exponential decay function to calculate time weights, and the decay rate of the decay function is determined according to business requirements; the interaction frequency model uses a logarithmic transformation to smooth the impact of high-frequency data, and is used to calculate weights based on historical and recent frequencies; the emotion intensity model is used to control the degree of influence of emotion intensity on the weights.
[0034] In one embodiment, the step of constructing dynamic context information based on personalized knowledge and the dynamic weights of nodes and edges in a dynamic knowledge graph includes:
[0035] Candidate information is obtained by filtering from personalized knowledge based on the dynamic weights of each node and edge in the dynamic knowledge graph.
[0036] Target information with relevance exceeding a threshold is obtained from candidate information. The target information is then arranged in a structured manner according to time order and weighted values of association strength to obtain dynamic context information.
[0037] In one embodiment, after performing the corresponding large model inference operation based on context information, the process includes:
[0038] The inference results of the large model are adjusted based on historical user behavior information stored in the local knowledge base.
[0039] In one embodiment, the method further includes:
[0040] In the event that personal communication data has been updated, the updated standardized communication data is obtained based on the updated personal communication data, and the second entity object in the updated standardized communication data is identified.
[0041] If the second entity object is the same as the first entity object, update the dynamic weight of the corresponding node according to the updated standardized communication data;
[0042] If the second entity object is different from the first entity object, the dynamic knowledge graph is updated according to the relationship between the second entity object and the first entity object.
[0043] In one embodiment, the method further includes:
[0044] In response to user commands triggered through the user interface, execute the corresponding user actions; user actions include displaying data in the local knowledge base in the user interface, deleting data in the local knowledge base, and exporting data from the local knowledge base.
[0045] In one embodiment, the method further includes:
[0046] If the deletion conditions are met, the specified data in the local knowledge base will be deleted. The deletion conditions include the current storage duration reaching the preset duration or the terminal's storage space not meeting the storage conditions.
[0047] Secondly, this application also provides a large model inference apparatus based on retrieval enhancement generation, comprising:
[0048] The data acquisition module is used to acquire personal communication data locally on the terminal and preprocess the personal communication data to obtain standardized communication data.
[0049] The graph construction module is used to construct a dynamic knowledge graph based on standardized communication data and store the standardized communication data and the dynamic knowledge graph in a local knowledge base.
[0050] The weight acquisition module is used to obtain the dynamic weights of each node and edge in the dynamic knowledge graph.
[0051] The information query module is used to respond to user-triggered query requests, retrieve relevant user-personalized knowledge from the local knowledge base, and construct dynamic context information based on personalized knowledge and the dynamic weights of each node and edge in the dynamic knowledge graph.
[0052] The model inference module is used to perform corresponding large model inference operations based on context information.
[0053] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method steps of any one of the first aspects.
[0054] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method steps of any one of the first aspects.
[0055] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the method steps of any one of the first aspects.
[0056] The aforementioned large-scale model reasoning method, apparatus, computer equipment, and medium based on retrieval enhancement acquire local personal communication data from the terminal, preprocess the personal communication data to obtain standardized communication data, construct a dynamic knowledge graph based on the standardized communication data, and store the standardized communication data and dynamic knowledge graph in a local knowledge base. It then acquires the dynamic weights of each node and edge in the dynamic knowledge graph, and in response to user-triggered query requests, retrieves corresponding personalized knowledge from the local knowledge base. Based on the personalized knowledge and the dynamic weights of each node and edge in the dynamic knowledge graph, it constructs dynamic context information, and performs corresponding large-scale model reasoning operations based on the context information. This enables end-to-end local execution from data acquisition, preprocessing, knowledge graph construction to model reasoning, avoiding the transmission of user privacy data to external servers via the network, thereby ensuring the security of user privacy data. Attached Figure Description
[0057] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0058] Figure 1 This is an application environment diagram of a large model inference method based on retrieval enhancement in one embodiment;
[0059] Figure 2 This is a flowchart illustrating a large model inference method based on retrieval enhancement in one embodiment;
[0060] Figure 3 This is a flowchart illustrating a large model inference method based on retrieval enhancement in another embodiment;
[0061] Figure 4 This is a structural block diagram of a large model inference device based on retrieval enhancement in one embodiment;
[0062] Figure 5 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0063] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0064] The large model inference method based on retrieval enhancement provided in this application can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or placed on a cloud or other network server. Terminal 102 is used to acquire local personal communication data, preprocess the personal communication data to obtain standardized communication data, construct a dynamic knowledge graph based on the standardized communication data, and store the standardized communication data and dynamic knowledge graph in a local knowledge base. It obtains the dynamic weights of each node and edge in the dynamic knowledge graph, and in response to user-triggered query requests, retrieves corresponding personalized knowledge from the local knowledge base. Based on the personalized knowledge and the dynamic weights of each node and edge in the dynamic knowledge graph, it constructs dynamic context information and performs corresponding large-scale model reasoning operations based on the context information. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, drones, low-altitude aircraft, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart vehicle devices, projection devices, etc. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted displays. Head-mounted displays can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. Server 104 can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server providing cloud computing services.
[0065] In one exemplary embodiment, such as Figure 2 As shown, a large model inference method based on retrieval enhancement generation is provided, and this method is applied to... Figure 1 Taking terminal 102 as an example, the explanation includes the following steps 202 to 210. Wherein:
[0066] S202: Obtain the personal communication data locally on the terminal, and perform data preprocessing on the personal communication data to obtain standardized communication data.
[0067] Optionally, with user authorization, multi-source data can be collected locally on the terminal. This personal communication data includes call data, communication information data, and user behavior data. The collected data is cleaned and standardized to obtain structured, standardized communication data, ensuring data quality and privacy security.
[0068] S204: Construct a dynamic knowledge graph based on standardized communication data, and store the standardized communication data and the dynamic knowledge graph in a local knowledge base.
[0069] Optionally, a dynamic knowledge graph is constructed based on standardized communication data. The dynamic knowledge graph is an extension of the traditional knowledge graph. It not only includes static entities, attributes and relationships, but also reflects changes in knowledge in real time or near real time, and has the ability to evolve dynamically, update automatically and perform temporal reasoning.
[0070] S206: Obtain the dynamic weights of each node and edge in the dynamic knowledge graph.
[0071] Optionally, a multi-dimensional weight calculation model can be used to assign dynamic weights to the nodes and edges of the knowledge graph, where the dynamic weights reflect the importance of the nodes and edges in the user's personalized knowledge.
[0072] S208: In response to a user-triggered query request, retrieve the corresponding personalized knowledge from the local knowledge base, and construct dynamic context information based on the personalized knowledge and the dynamic weights of each node and edge in the dynamic knowledge graph.
[0073] Optionally, when a user initiates a query, the query keywords are matched with knowledge graph nodes using a semantic matching algorithm, relevant personalized knowledge is retrieved from the local knowledge base, and the most relevant knowledge is selected based on dynamic weights to obtain dynamic context information containing user-specific information.
[0074] S210: Perform the corresponding large model inference operation based on context information.
[0075] Optionally, the lightweight large model deployed locally on the terminal performs inference based on a dynamic context that incorporates personalized knowledge, and outputs preliminary results.
[0076] The aforementioned large-scale model inference method based on retrieval enhancement acquires local personal communication data on the terminal and preprocesses it to obtain standardized communication data. A dynamic knowledge graph is then constructed based on this standardized data, and both the standardized communication data and the dynamic knowledge graph are stored in a local knowledge base. The dynamic weights of each node and edge in the dynamic knowledge graph are obtained. In response to user-triggered query requests, corresponding personalized user knowledge is retrieved from the local knowledge base. Based on this personalized knowledge and the dynamic weights of each node and edge in the dynamic knowledge graph, dynamic context information is constructed. Based on this context information, corresponding large-scale model inference operations are performed. Finally, the large-scale model inference results are adjusted based on historical user behavior information stored in the local knowledge base. This method enables end-to-end local execution from data acquisition, preprocessing, knowledge graph construction to model inference, avoiding the transmission of user privacy data to external servers via the network, thereby ensuring the security of user privacy data.
[0077] In one exemplary embodiment, personal communication data includes at least one of call data, communication information data, and user behavior data; user behavior data includes at least one of calendar events, memos, behavior planning records, and application operation records.
[0078] The data includes call data such as call voice recordings, time, and contact information; communication information data such as SMS text messages, MMS feature descriptions, and send / receive times; user behavior data such as behavior planning records like calendar events and memos; and application operation records such as frequently used application logs and metadata. By integrating call data, communication information data, and user behavior data, the comprehensiveness of user profiles can be improved, providing accurate data support for subsequent large-scale model inference.
[0079] In an exemplary embodiment, the local knowledge base includes a basic data layer, a knowledge graph layer, and a semantic index layer; the basic data layer is used to store standardized communication data; the knowledge graph layer is used to store dynamic knowledge graphs; the local knowledge base is encrypted using an encryption algorithm, and the encryption key of the encryption algorithm is generated locally by the user on the terminal.
[0080] The local knowledge base storage adopts a hierarchical classification structure to store data, including a basic data layer, a knowledge graph layer, and a semantic index layer. The basic data layer is used to store standardized communication data for knowledge tracing. The knowledge graph layer is used to store dynamic knowledge graphs. The semantic index layer is used to convert knowledge nodes into semantic vectors, build an inverted index and a vector space model index structure, support fast retrieval, and improve retrieval efficiency.
[0081] In an exemplary embodiment, the step of acquiring local personal communication data of the terminal includes: when the user enables the data collection function, acquiring local personal communication data of the terminal according to the collection time range and data type set by the user.
[0082] Optionally, data collection is initiated based on the user enabling the data collection function. That is, the user can choose to enable or disable the collection of various types of data. After user authorization, data collection is performed according to fine-grained permissions such as the time range and data type set by the user. For example, the user may only allow the collection of communication data from the past 7 days, and data outside this range may not be collected. Alternatively, the user may only allow the collection of call logs and calendar events, while refusing to collect SMS content or application operation records. The personal communication data ultimately obtained by the terminal is data within the user's authorized scope, conforming to the user-defined time and type, and originating locally on the terminal—that is, the data is stored on the user's device and does not pass through the cloud or third-party servers.
[0083] In this embodiment, by acquiring the user's local personal communication data based on the user-set collection time range and data type when the user enables the data collection function, the security of the personal communication data can be ensured, while improving the accuracy of data collection.
[0084] In one exemplary embodiment, the step of preprocessing personal communication data to obtain standardized communication data includes: performing data cleaning on the personal communication data; and performing standardization on the cleaned personal communication data to obtain standardized communication data.
[0085] Optionally, the collected personal communication data undergoes data cleaning to remove redundancy, noise, and sensitive information. The cleaned data is then transformed into a standardized communication data format to facilitate subsequent knowledge base construction and large-scale model reasoning.
[0086] In this embodiment, by cleaning and standardizing personal communication data, standardized communication data is obtained. This process transforms raw personal communication data into high-quality, structured, and privacy-secure standardized communication data, providing a reliable data foundation for subsequent dynamic knowledge graph construction, local knowledge base storage, and personalized reasoning.
[0087] In an exemplary embodiment, the steps of cleaning personal communication data include: identifying communication identifiers in the personal communication data using a hash algorithm, and deleting personal access data corresponding to duplicate communication identifiers; the communication identifiers include communication timestamps and SMS identifiers; identifying noise data in the personal communication data using text similarity algorithms and speech signal processing algorithms respectively, and removing the noise data; the noise data includes garbled text and silent voice segments; obtaining sensitive information in the personal communication data, and replacing the sensitive information with desensitized identifiers.
[0088] The data cleaning process includes deleting duplicate data, filtering noisy data, and replacing anonymized data. Specifically, based on features such as call timestamps and unique SMS identifiers, hash algorithms are used to identify and delete duplicate data (such as duplicate recordings and received SMS messages) to avoid redundant processing. Next, text similarity algorithms are used to identify meaningless garbled text (such as invalid characters in SMS messages), and speech signal processing technology is used to filter silent speech segments (such as blank recordings in calls), eliminating data without valid information. Finally, regular expressions are used to match sensitive information (such as ID card numbers, bank card numbers, passwords, etc.) in call content and SMS messages, replacing them with specific anonymized identifiers to prevent privacy leaks.
[0089] In an exemplary embodiment, the step of standardizing cleaned personal communication data to obtain standardized communication data includes: acquiring text data, voice call data, and metadata from the cleaned personal communication data; removing symbols that do not meet the target conditions from the text data and performing word segmentation on the removed text data to obtain text keywords; preprocessing the voice call data and converting the preprocessed voice call data into text format; and integrating the metadata with the text keywords and the text-formatted voice call data to obtain standardized communication data.
[0090] The standardization process includes text data standardization, voice data standardization, and metadata integration. Specifically, for text-based data such as SMS messages, memos, and calendar events, unnecessary punctuation is removed (while key separators like spaces are retained), word segmentation is performed, keywords are extracted, and the text format is standardized. Next, preprocessing of call voice data, including noise reduction and normalization, is performed. Automatic speech recognition (ASR) is then used to convert the speech into text format, while simultaneously preserving emotional characteristics (such as intonation and speech rate variations). Finally, metadata from various data types (such as call duration, contact identifiers, SMS sending time, and application usage log timestamps) is associated and integrated with the corresponding text / speech-to-text data to form data units containing complete contextual information.
[0091] In an exemplary embodiment, the step of constructing a dynamic knowledge graph based on standardized communication data includes: identifying a first entity object in the standardized communication data and obtaining the association relationship between the first entity objects; constructing a dynamic knowledge graph using the first entity objects as nodes and the association relationship between the first entity objects as edges.
[0092] Optionally, named entity recognition technology in natural language processing is used to extract key entities with practical significance, namely the first entity objects, from preprocessed standardized communication data. These entities include users, contacts, locations, events, items, etc., as well as the relationships between them, such as the call relationship between "users" and "contacts," or the occurrence relationship between "events" and "time." Using the identified entities as knowledge nodes and the relationships between entities as edges, a dynamic knowledge graph is constructed. The nodes in the knowledge graph contain information such as entity name, type, feature description, and related metadata.
[0093] In this embodiment, by identifying the first entity object in the standardized communication data and obtaining the association between the first entity objects, a dynamic knowledge graph is constructed using the first entity object as a node and the association between the first entity objects as an edge. This can transform the standardized communication data into a structured dynamic knowledge graph, thereby improving the efficiency of subsequent personalized retrieval.
[0094] In an exemplary embodiment, the step of obtaining the dynamic weights of each node and edge in a dynamic knowledge graph includes: constructing a multi-dimensional weight calculation model; the multi-dimensional weight calculation model includes a time decay model, an interaction frequency model, and an emotion intensity model; calculating the corresponding first weight, second weight, and third weight for each node and edge in the dynamic knowledge graph using the time decay model, the interaction frequency model, and the emotion intensity model, respectively; and performing a weighted summation of the first weight, the second weight, and the third weight to obtain the dynamic weight of the corresponding node or edge.
[0095] Optionally, the multi-dimensional weight calculation model includes a time decay model, an interaction frequency model, and an emotion intensity model.
[0096] For example, the mathematical expression for the time decay model is:
[0097]
[0098] in, , For configurable half-life parameters, The model uses the difference between the data timestamp and the current time to ensure that recent data receives higher weight, and the decay rate can be adjusted according to business needs.
[0099] The mathematical expression for the interaction frequency model is:
[0100]
[0101] in, This represents the number of historical interactions. This represents the number of recent interactions. This is a configurable recent frequency attenuation factor.
[0102] The mathematical expression for the emotion intensity model is:
[0103]
[0104] in, is the sentiment scaling factor, which controls the degree to which sentiment intensity affects the weights, and s is the sentiment score (range [-1,1]).
[0105] The weights of the three dimensions are integrated by weighted summation:
[0106]
[0107] in, , , For configurable dimension weight parameters, satisfying .
[0108] In this embodiment, a multi-dimensional weight calculation model is constructed. For each node and edge in the dynamic knowledge graph, the first weight, second weight, and third weight are calculated using the time decay model, interaction frequency model, and sentiment intensity model, respectively. The first weight, second weight, and third weight are then weighted and summed to obtain the dynamic weight of the corresponding node or edge. This enables the local knowledge base to dynamically focus on recently active, high-frequency interactive, and highly sentimental information, accurately reflecting the user's real-time preferences, thereby improving the accuracy of large model reasoning.
[0109] In one exemplary embodiment, the time decay model uses an exponential decay function to calculate time weights, and the decay rate of the decay function is determined according to business requirements; the interaction frequency model uses a logarithmic transformation to smooth the impact of high-frequency data, and is used to calculate weights based on historical and recent frequencies; the emotion intensity model is used to control the degree of influence of emotion intensity on the weights.
[0110] The time decay model is based on the time attribute of the data and uses an exponential decay function to calculate weights. Its core principle is to give higher weights to recent data, and the decay rate is adjusted through a configurable half-life parameter. The decay rate is determined by business needs; for example, if the business focuses more on recent data, the decay rate will be larger (faster decay). The interaction frequency model combines the historical interaction counts and recent interaction counts of entities or relationships, smoothing the impact of high-frequency data through logarithmic transformation, and introducing a recent frequency decay factor to highlight the importance of entities or relationships with high-frequency interactions. The sentiment intensity model uses the sigmoid function to map the sentiment score extracted from the data to a weight range of [0,1]. A sentiment scaling factor controls the degree to which sentiment intensity affects the weights, giving higher weights to entities or relationships corresponding to data with strong emotional connotations.
[0111] In an exemplary embodiment, the step of constructing dynamic context information based on personalized knowledge and the dynamic weights of nodes and edges in a dynamic knowledge graph includes: filtering candidate information from personalized knowledge according to the dynamic weights of nodes and edges in the dynamic knowledge graph; and structuring the candidate information to obtain dynamic context information.
[0112] Optionally, when a user initiates a query, personalized knowledge related to the query is retrieved from the local knowledge base. A semantic matching algorithm is then used to match the query keywords with nodes in the knowledge graph. Each node and edge in the dynamic knowledge graph receives a dynamic weight through a multi-dimensional weight calculation model, reflecting its importance within the user's current knowledge system. Using this dynamic weight as a selection criterion, knowledge with higher weights is prioritized. Subsequently, candidate information is structured and arranged according to chronological order, correlation strength, etc., ultimately forming dynamic contextual information that integrates the most relevant and important content from the user's personalized knowledge.
[0113] In this embodiment, candidate information is selected from personalized knowledge based on the dynamic weights of each node and edge in the dynamic knowledge graph. The candidate information is then arranged in a structured manner to obtain dynamic context information. This provides the large model with reasoning basis that fits the user's actual scenario, ensuring that the subsequent output results are more accurate and personalized, thereby improving the accuracy of the large model's reasoning.
[0114] In an exemplary embodiment, after performing the corresponding large model inference operation based on context information, the process includes: adjusting the large model inference result based on historical user behavior information stored in the local knowledge base.
[0115] Optionally, after the large model outputs the initial inference results, the preliminary results can be optimized by combining information such as user preferences and historical behavior patterns stored in the local knowledge base, so that the output is more in line with the user's actual needs and habits, and can further improve the accuracy of the large model's inference.
[0116] In an exemplary embodiment, the method further includes: when personal communication data is updated, obtaining updated standardized communication data based on the updated personal communication data, and identifying a second entity object in the updated standardized communication data; when the second entity object is the same as the first entity object, updating the dynamic weight of the corresponding node based on the updated standardized communication data; when the second entity object is different from the first entity object, updating the dynamic knowledge graph based on the association between the second entity object and the second entity object.
[0117] Optionally, when a user generates a new communication action, named entity recognition technology is used to extract new entity objects, i.e., second entity objects, from the updated standardized communication data, while simultaneously identifying the relationships between these second entity objects. If the newly identified second entity object is a first entity object already existing in the knowledge graph, the node and edge structure of the knowledge graph is not changed; only the dynamic weights of the corresponding nodes and associated edges of that entity are adjusted based on the information in the updated data. If the newly identified second entity object is a new entity not existing in the knowledge graph, the structure of the dynamic knowledge graph is expanded based on these new entities and their relationships.
[0118] In this embodiment, when personal communication data is updated, updated standardized communication data is obtained based on the updated personal communication data. The second entity object in the updated standardized communication data is identified. If the second entity object is the same as the first entity object, the dynamic weight of the corresponding node is updated based on the updated standardized communication data. If the second entity object is different from the first entity object, the dynamic knowledge graph is updated based on the relationship between the second entity object and the first entity object. This enables dynamic updating of the knowledge graph, improves the real-time performance of the knowledge graph, ensures that the knowledge graph always keeps up with changes in the user's personalized knowledge, and provides accurate structured data support for subsequent reasoning.
[0119] In an exemplary embodiment, the method further includes: responding to an operation instruction triggered by a user through a user interface, performing a corresponding user operation; the user operation includes displaying data in a local knowledge base on the user interface, deleting data in a local knowledge base, and exporting data in a local knowledge base.
[0120] Optionally, when a user actively triggers an operation command through the interactive interface of a mobile terminal, the corresponding user operation will be executed, including: (1) displaying local knowledge base data: allowing users to view the content stored in the local knowledge base, including preprocessed data of the basic data layer, entity relationships of the knowledge graph layer, etc., to achieve data transparency; (2) deleting local knowledge base data: users can manually select to delete specific data and directly remove unwanted information; (3) exporting local knowledge base data: supporting users to export local data in a specified format.
[0121] In this embodiment, by responding to the user's operation instructions triggered through the user interface and executing the corresponding user operations, the system can respond to the user's instructions in real time, ensuring that the knowledge graph always keeps pace with changes in the user's personalized knowledge and providing accurate structured data support for subsequent reasoning.
[0122] In an exemplary embodiment, the method further includes: deleting specified data in the local knowledge base if deletion conditions are met; the deletion conditions include the current storage duration reaching a preset duration or the terminal's storage space not meeting the storage conditions.
[0123] Optionally, when preset deletion conditions are met, specified data in the local knowledge base will be automatically deleted. For example, if the storage time of the data reaches the user's preset period, these "outdated data" will be automatically identified and deleted to avoid redundant storage. When the remaining storage space of the terminal cannot meet the storage needs of new data, the system will delete data with lower weight according to the knowledge weight to ensure the storage of core data and the normal operation of the system.
[0124] In this embodiment, by deleting specified data from the local knowledge base when the deletion conditions are met, local data can be dynamically managed, terminal storage space can be optimized, and system performance can be improved.
[0125] In one exemplary embodiment, such as Figure 3 As shown, a large model inference method based on retrieval enhancement generation is provided, which includes the following steps:
[0126] When the user enables the data collection function, personal communication data is obtained locally on the terminal according to the collection time range and data type set by the user.
[0127] Personal communication data includes at least one of call data, communication information data, and user behavior data; user behavior data includes at least one of calendar events, memos, behavior planning records, and application operation records.
[0128] The system identifies communication identifiers in personal communication data using a hash algorithm and deletes duplicate communication identifiers corresponding to personal access data. Communication identifiers include communication timestamps and SMS identifiers. Noise data in personal communication data is identified and removed using text similarity algorithms and speech signal processing algorithms. Noise data includes garbled text and silent speech segments. Sensitive information in personal communication data is obtained and replaced with de-identified identifiers.
[0129] The process involves acquiring text data, voice call data, and metadata from cleaned personal communication data; removing symbols from the text data that do not meet the target conditions, and then performing word segmentation on the removed text data to obtain text keywords; preprocessing the voice call data and converting the preprocessed voice call data into text format; and integrating the metadata with the text keywords and text-formatted voice call data to obtain standardized communication data.
[0130] Identify the first entity object in standardized communication data and obtain the relationships between the first entity objects; construct a dynamic knowledge graph using the first entity objects as nodes and the relationships between the first entity objects as edges.
[0131] Standardized communication data and dynamic knowledge graphs are stored in a local knowledge base.
[0132] The local knowledge base includes a basic data layer, a knowledge graph layer, and a semantic index layer. The basic data layer is used to store standardized communication data. The knowledge graph layer is used to store dynamic knowledge graphs. The local knowledge base uses encryption algorithms for encrypted storage, and the encryption keys for the encryption algorithms are generated locally by the user on the terminal.
[0133] A multi-dimensional weight calculation model is constructed, which includes a time decay model, an interaction frequency model, and an emotion intensity model. For each node and edge in the dynamic knowledge graph, the first weight, second weight, and third weight are calculated using the time decay model, the interaction frequency model, and the emotion intensity model, respectively. The first weight, the second weight, and the third weight are then weighted and summed to obtain the dynamic weight of the corresponding node or edge.
[0134] Among them, the time decay model uses an exponential decay function to calculate time weights, and the decay rate of the decay function is determined according to business needs; the interaction frequency model uses logarithmic transformation to smooth the impact of high-frequency data and is used to calculate weights based on historical and recent frequencies; the emotion intensity model is used to control the degree of influence of emotion intensity on weights.
[0135] In response to a user-triggered query request, the system retrieves relevant personalized knowledge from the local knowledge base. Based on the dynamic weights of nodes and edges in the dynamic knowledge graph, it filters candidate information from the personalized knowledge. It then retrieves target information from the candidate information whose relevance exceeds a threshold and arranges the target information in a structured manner according to the time order and the weighted value of the association strength to obtain dynamic context information.
[0136] Perform corresponding large model inference operations based on contextual information.
[0137] The inference results of the large model are adjusted based on historical user behavior information stored in the local knowledge base.
[0138] When personal communication data is updated, updated standardized communication data is obtained based on the updated personal communication data, and the second entity object in the updated standardized communication data is identified; if the second entity object is the same as the first entity object, the dynamic weight of the corresponding node is updated based on the updated standardized communication data; if the second entity object is different from the first entity object, the dynamic knowledge graph is updated based on the relationship between the second entity object and the second entity object.
[0139] In response to user commands triggered through the user interface, execute the corresponding user actions; user actions include displaying data in the local knowledge base in the user interface, deleting data in the local knowledge base, and exporting data from the local knowledge base.
[0140] If the deletion conditions are met, the specified data in the local knowledge base will be deleted. The deletion conditions include the current storage duration reaching the preset duration or the terminal's storage space not meeting the storage conditions.
[0141] In this embodiment, by acquiring local personal communication data on the terminal and preprocessing the data to obtain standardized communication data, a dynamic knowledge graph is constructed based on the standardized communication data. The standardized communication data and the dynamic knowledge graph are stored in a local knowledge base. The dynamic weights of each node and edge in the dynamic knowledge graph are obtained. In response to a user-triggered query request, the corresponding personalized knowledge is retrieved from the local knowledge base. Based on the personalized knowledge and the dynamic weights of each node and edge in the dynamic knowledge graph, dynamic context information is constructed. Based on the context information, the corresponding large model inference operation is performed. The large model inference result is adjusted according to the historical user behavior information stored in the local knowledge base. This enables end-to-end local execution from data acquisition, preprocessing, knowledge graph construction to model inference, avoiding the transmission of user privacy data to external servers via the network, thereby ensuring the security of user privacy data.
[0142] It should be understood that although the steps in the flowcharts of the above embodiments 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 flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0143] Based on the same inventive concept, this application also provides a large model inference apparatus based on retrieval enhancement generation for implementing the large model inference method based on retrieval enhancement generation described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method. Therefore, the specific limitations of one or more embodiments of the large model inference apparatus based on retrieval enhancement generation provided below can be found in the limitations of the large model inference method based on retrieval enhancement generation described above, and will not be repeated here.
[0144] In one exemplary embodiment, such as Figure 4 As shown, a large model inference device based on retrieval enhancement generation is provided, including: a data acquisition module 10, a graph construction module 20, a weight acquisition module 30, an information query module 40, and a model inference module 50, wherein:
[0145] The data acquisition module 10 is used to acquire local personal communication data of the terminal and perform data preprocessing on the personal communication data to obtain standardized communication data.
[0146] The graph construction module 20 is used to construct a dynamic knowledge graph based on standardized communication data and store the standardized communication data and the dynamic knowledge graph in a local knowledge base.
[0147] The weight acquisition module 30 is used to acquire the dynamic weights of each node and edge in the dynamic knowledge graph.
[0148] The information query module 40 is used to respond to user-triggered query requests, retrieve relevant user-personalized knowledge from the local knowledge base, and construct dynamic context information based on the personalized knowledge and the dynamic weights of each node and edge in the dynamic knowledge graph.
[0149] The model reasoning module 50 is used to perform corresponding large model reasoning operations based on context information, and to adjust the large model reasoning results according to the historical user behavior information stored in the local knowledge base.
[0150] In an exemplary embodiment, the personal communication data involved in the data acquisition module 10 includes at least one of call data, communication information data, and user behavior data; the user behavior data includes at least one of calendar events, memos, behavior planning records, and application operation records.
[0151] In an exemplary embodiment, the local knowledge base involved in the graph construction module 20 includes a basic data layer, a knowledge graph layer, and a semantic index layer; the basic data layer is used to store standardized communication data; the knowledge graph layer is used to store dynamic knowledge graphs; the local knowledge base is encrypted using an encryption algorithm, and the encryption key of the encryption algorithm is generated locally by the user on the terminal.
[0152] In an exemplary embodiment, the data acquisition module 10 is further configured to acquire local personal communication data of the terminal according to the collection time range and data type set by the user when the user enables the data collection function.
[0153] In an exemplary embodiment, the data acquisition module 10 is further configured to perform data cleaning on the personal communication data; and to perform standardization on the cleaned personal communication data to obtain standardized communication data.
[0154] In an exemplary embodiment, the data acquisition module 10 is further configured to identify communication identifiers in personal communication data using a hash algorithm, and delete personal access data corresponding to duplicate communication identifiers; the communication identifiers include communication timestamps and SMS identifiers; identify noise data in personal communication data using text similarity algorithms and speech signal processing algorithms respectively, and remove noise data; the noise data includes garbled text and silent voice segments; acquire sensitive information in personal communication data, and replace the sensitive information with desensitized identifiers.
[0155] In an exemplary embodiment, the data acquisition module 10 is further configured to acquire text data, voice call data, and metadata from the cleaned personal communication data; remove symbols in the text data that do not meet the target conditions, and perform word segmentation on the removed text data to obtain text keywords; preprocess the voice call data and convert the preprocessed voice call data into text format; and integrate the metadata with the text keywords and the text formatted voice call data to obtain standardized communication data.
[0156] In an exemplary embodiment, the graph construction module 20 is further configured to identify a first entity object in standardized communication data and obtain the association relationship between the first entity objects; and construct a dynamic knowledge graph using the first entity object as a node and the association relationship between the first entity objects as an edge.
[0157] In an exemplary embodiment, the weight acquisition module 30 is further configured to construct a multi-dimensional weight calculation model; the multi-dimensional weight calculation model includes a time decay model, an interaction frequency model, and an emotion intensity model; for each node and edge in the dynamic knowledge graph, the corresponding first weight, second weight, and third weight are calculated using the time decay model, the interaction frequency model, and the emotion intensity model, respectively; the first weight, the second weight, and the third weight are weighted and summed to obtain the dynamic weight of the corresponding node or edge.
[0158] In an exemplary embodiment, the time decay model involved in the weight acquisition module 30 uses an exponential decay function to calculate time weights, and the decay rate of the decay function is determined according to business requirements; the interaction frequency model uses a logarithmic transformation to smooth the influence of high-frequency data, and is used to calculate weights based on historical and recent frequencies; the emotion intensity model is used to control the degree of influence of emotion intensity on weights.
[0159] In an exemplary embodiment, the information query module 40 is further configured to filter candidate information from personalized knowledge based on the dynamic weights of each node and edge in the dynamic knowledge graph; obtain target information whose relevance exceeds a threshold from the candidate information; and arrange the target information in a structured manner according to the time order and the weighted value of the association strength to obtain dynamic context information.
[0160] In an exemplary embodiment, the model inference module 50 is further configured to adjust the large model inference results based on historical user behavior information stored in a local knowledge base.
[0161] In an exemplary embodiment, the weight acquisition module 30 is further configured to, when there is an update in the personal communication data, acquire updated standardized communication data based on the updated personal communication data, and identify a second entity object in the updated standardized communication data; if the second entity object is the same as the first entity object, update the dynamic weight of the corresponding node based on the updated standardized communication data; if the second entity object is different from the first entity object, update the dynamic knowledge graph based on the association between the second entity object and the second entity object.
[0162] In an exemplary embodiment, the graph construction module 20 is further configured to perform corresponding user operations in response to operation instructions triggered by the user through the user interface; the user operations include displaying data in the local knowledge base on the user interface, deleting data in the local knowledge base, and exporting data in the local knowledge base.
[0163] In an exemplary embodiment, the map construction module 20 is further configured to delete specified data in the local knowledge base if deletion conditions are met; the deletion conditions include the current storage duration reaching a preset duration or the terminal's storage space not meeting the storage conditions.
[0164] The modules in the aforementioned large-scale model inference device based on retrieval enhancement can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0165] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 5 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When executed by the processor, the computer program implements a large-model inference method based on retrieval-enhanced generation. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0166] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0167] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0168] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.
[0169] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0170] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0171] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0172] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0173] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A large model inference method based on retrieval augmentation generation, characterized in that, The method is applied to a terminal deployed with a large model, and the method comprises the following steps: acquiring personal communication data local to the terminal, and performing data preprocessing on the personal communication data to obtain standardized communication data; constructing a dynamic knowledge graph according to the standardized communication data, and storing the standardized communication data and the dynamic knowledge graph to a local knowledge base; acquiring dynamic weights of nodes and edges in the dynamic knowledge graph; in response to a query request triggered by a user, acquiring corresponding user personalized knowledge from the local knowledge base, constructing dynamic context information based on the personalized knowledge and the dynamic weights of nodes and edges in the dynamic knowledge graph; performing a corresponding large model inference operation based on the context information.
2. The method of claim 1, wherein, The personal communication data comprises at least one of call data, communication information data and user behavior data; the user behavior data comprises at least one of calendar events, memos, behavior planning records and application operation records.
3. The method of claim 1, wherein, The local knowledge base comprises a basic data layer, a knowledge graph layer and a semantic index layer; the basic data layer is used to store the standardized communication data; the knowledge graph layer is used to store the dynamic knowledge graph; the local knowledge base is stored by using an encryption algorithm, and an encryption key of the encryption algorithm is generated by the user locally on the terminal.
4. The method of claim 1, wherein, The acquisition of the personal communication data local to the terminal comprises: in a case where the user starts a data collection function, acquiring the personal communication data local to the terminal according to a collection time range and a data type set by the user.
5. The method of claim 1, wherein, The data preprocessing on the personal communication data to obtain standardized communication data comprises: performing data cleaning processing on the personal communication data; performing standardization processing on the personal communication data after data cleaning to obtain standardized communication data.
6. The method of claim 5, wherein, The data cleaning processing on the personal communication data comprises: identifying communication identifiers in the personal communication data by using a hash algorithm, and deleting personal communication data corresponding to repeated communication identifiers; the communication identifiers comprise communication time stamps and short message identifiers; identifying noise data in the personal communication data by using a text similarity algorithm and a speech signal processing algorithm respectively, and removing the noise data; the noise data comprises garbled text and silent voice segments; acquiring sensitive information in the personal communication data, and replacing the sensitive information with desensitization identifiers.
7. The method of claim 5, wherein, The standardization processing on the personal communication data after data cleaning to obtain standardized communication data comprises: respectively acquiring text data, call voice data and metadata in the personal communication data after data cleaning; removing symbols in the text data that do not meet target conditions, and performing word segmentation processing on the text data after removal to obtain text keywords; performing preprocessing on the call voice data, and converting the preprocessed call voice data into a text format; integrating the metadata with the text keywords and the text format call voice data to obtain standardized communication data.
8. The method of claim 1, wherein, The construction of a dynamic knowledge graph according to the standardized communication data comprises: Identify a first entity object in the standardized communication data, and obtain the association relationship between the first entity objects; A dynamic knowledge graph is constructed by taking the first entity objects as nodes and the association relationship between the first entity objects as edges.
9. The method of claim 1, wherein, The method further comprises: A multi-dimensional weight calculation model is constructed; the multi-dimensional weight calculation model comprises a time decay model, an interaction frequency model and an emotional intensity model; For each node and edge in the dynamic knowledge graph, the time decay model, the interaction frequency model and the emotional intensity model are used for calculation respectively to obtain corresponding first weight, second weight and third weight; The first weight, the second weight and the third weight are weighted and summed to obtain the dynamic weight of the corresponding node or edge.
10. The method of claim 9, wherein, The time decay model uses an exponential decay function to calculate the time weight, and the decay rate of the decay function is determined according to business requirements; the interaction frequency model uses logarithmic transformation to smooth the influence of high-frequency data, and is used to calculate the weight according to historical frequency and recent frequency; The emotional intensity model is used to control the influence degree of emotional intensity on weight.
11. The method of claim 1, wherein, The method further comprises: According to the dynamic weight of each node and edge in the dynamic knowledge graph, candidate information is obtained from the personalized knowledge; Obtain target information with correlation exceeding a threshold value in the candidate information, and arrange the target information in a structured manner according to time sequence and weighted value of association strength to obtain dynamic context information.
12. The method of claim 1, wherein, After the corresponding large model inference operation is performed based on the context information, the method further comprises: According to the historical user behavior information stored in the local knowledge base, the large model inference result is adjusted.
13. The method of claim 8, wherein, The method further comprises: In the case that the personal communication data is updated, updated standardized communication data is obtained according to the updated personal communication data, and a second entity object in the updated standardized communication data is identified; In the case that the second entity object is the same as the first entity object, the dynamic weight of the corresponding node is updated according to the updated standardized communication data; In the case that the second entity object is not the same as the first entity object, the dynamic knowledge graph is updated according to the second entity object and the association relationship between the second entity objects.
14. The method of claim 1, wherein, The method further comprises: In response to an operation instruction triggered by the user through the user interface, a corresponding user operation is performed; the user operation comprises displaying data in the local knowledge base on the user interface, deleting data in the local knowledge base and exporting data in the local knowledge base.
15. The method of claim 1, wherein, The method further comprises: In the case that the deletion condition is met, the specified data in the local knowledge base is deleted; the deletion condition comprises that the current storage time length reaches a preset time length or the storage space of the terminal does not meet the storage condition.
16. A large model inference apparatus based on retrieval augmentation generation, characterized by, The device is applied to a terminal deployed with a large model; the device comprises: The device is applied to a terminal deployed with a large model; the device comprises: The data acquisition module is configured to acquire personal communication data local to the terminal, and perform data preprocessing on the personal communication data to obtain standardized communication data. The graph construction module is configured to construct a dynamic knowledge graph according to the standardized communication data, and store the standardized communication data and the dynamic knowledge graph to a local knowledge base. The weight acquisition module is configured to acquire dynamic weights of nodes and edges in the dynamic knowledge graph. The information query module is configured to acquire corresponding user personalized knowledge from the local knowledge base in response to a query request triggered by a user, construct dynamic context information based on the personalized knowledge and the dynamic weights of nodes and edges in the dynamic knowledge graph. The model inference module is configured to perform a corresponding large model inference operation based on the context information. 17.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-16. The processor executes the computer program to implement the steps of the method in any one of claims 1 to 15.
18. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 15.
Citation Information
Cited By
Data retrieval method and system, terminal, storage medium and program product
CN121986332A