Data management method and device, electronic equipment, storage medium and program product
By proactively prefetching and feedback loops, combined with user profiles and real-time resource load, the context management of large language models is optimized, solving the low latency and low accuracy problems of dialogue context management in existing technologies, and achieving efficient and stable service delivery.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING QIYI CENTURY SCI & TECH CO LTD
- Filing Date
- 2025-12-31
- Publication Date
- 2026-04-17
AI Technical Summary
Existing technologies in enterprise-level and consumer-level large language models, under multi-tenant architecture, suffer from problems such as passively responding to historical behaviors or optimizing storage efficiency in isolation, which cannot meet the low-latency and high-accuracy context supply requirements in dynamic scenarios.
By predicting initial user actions and using a proactive pre-fetching and feedback loop, runtime parameters are acquired and updated to optimize the generation of context information. Combined with user profiles and real-time resource load, the context filtering threshold and LLM fusion weights are dynamically adjusted to achieve adaptive optimization.
It significantly shortens the time from question input to the model outputting the first character, improves the user experience, ensures that the quality of the answer continuously improves with the interaction process, and avoids resource overload while ensuring performance.
Smart Images

Figure CN121880651A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, specifically to a data management method, apparatus, electronic device, storage medium, and program product. Background Technology
[0002] In enterprise and consumer-grade Large Language Model (LLM) applications, multi-tenant architectures support high-concurrency users through shared infrastructure, but dialogue context management becomes a core bottleneck. Existing technologies mainly rely on passive context processing solutions: one is based on summarizing or retrieving vector similarity from historical data, constructing context by analyzing past dialogue fragments; the other is traditional caching strategies (such as Least Recently Used (LRU) and Least Frequently Used (LFU)), which only focus on access frequency or duration. These methods have significant drawbacks: they either passively respond to historical behavior or optimize storage efficiency in isolation, lacking semantic-level proactive prefetching and feedback loops, and failing to address the low-latency, high-accuracy context supply requirements in dynamic scenarios. Summary of the Invention
[0003] This disclosure provides a data management method, apparatus, electronic device, storage medium, and program product to address the problem that existing dialogue context processing technologies lack semantic-based proactive prefetching and feedback loops, resulting in poor user experience.
[0004] Firstly, this application provides a data management method applied to a client, the method comprising:
[0005] In response to a first query request initiated by a user, first response data is sent to the client. The first response data is response data generated based on the search results matched with the first query request and the prefetched context information. The prefetched context information is information predicted to be associated with first information. The first information is an input fragment obtained by the client before receiving the complete query input of the first query request.
[0006] Obtain at least one feedback signal, the feedback signal including at least one of the following: the actual adoption ratio of the context information in the first response data, the first character response time of the first response data, and the resource load parameters of the server;
[0007] Based on the feedback signal, the operating parameters are updated, and the operating parameters are used to evaluate the generation effect of the first response data;
[0008] According to the updated operating parameters, the second response data is fed back to the client, which is the feedback result of the second query request initiated by the user.
[0009] Secondly, embodiments of this application also provide a data management device applied to a server, the device comprising:
[0010] The first feedback module is used to respond to the first query request initiated by the user and send first response data to the client. The first response data is response data generated based on the search results matched by the prefetched context information and the first query request. The prefetched context information is information predicted to be associated with first information. The first information is an input fragment obtained by the client before receiving the complete query input of the first query request.
[0011] The first acquisition module is used to acquire at least one feedback signal, the feedback signal including at least one of the following: the actual adoption ratio of the context information in the first response data, the first character response time of the first response data, and the resource load parameters of the server;
[0012] The parameter update module is used to update the operating parameters based on the feedback signal, and the operating parameters are used to evaluate the generation effect of the first response data;
[0013] The second feedback module is used to send second response data to the client according to the updated operating parameters. The second response data is the feedback result of the second query request initiated by the user.
[0014] Thirdly, this application provides an electronic device including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the method described in the first aspect.
[0015] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method described in the first aspect.
[0016] Fifthly, this application provides a computer program product including computer instructions that, when executed by a processor, implement the steps of the method described in the first aspect.
[0017] This embodiment combines semantic prediction of the user's initial operation with proactive context prefetching, initiating data preparation in parallel before the user completes full input. This significantly shortens the waiting time for LLM to generate the first character, thus optimizing the response. Based on quantitative feedback such as the adoption rate of prefetched content in the actual response, the context filtering threshold and LLM fusion weight are dynamically adjusted, enabling the system to adaptively optimize content relevance and ensure that the quality of the answer continuously improves throughout the interaction process. Finally, this embodiment comprehensively considers multiple dimensions such as adoption rate, response latency, and real-time load, intelligently balancing the prefetching range, caching strategy, and computing resource allocation. This achieves a semantically based proactive prefetching and feedback closed loop, ensuring performance while avoiding resource overload and achieving efficient and stable service delivery. Attached Figure Description
[0018] Figure 1 This is a flowchart illustrating a data management method provided in an embodiment of this application;
[0019] Figure 2 This is a schematic diagram illustrating the interaction between various execution entities in a data management method provided in an embodiment of this application;
[0020] Figure 3 This is a schematic diagram of the architecture of a data management method according to an embodiment of this application;
[0021] Figure 4 This is a schematic diagram of the structure of a data management device provided in an embodiment of this application;
[0022] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0023] The technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this disclosure. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0024] The following detailed description, in conjunction with the accompanying drawings, of a data management method, apparatus, electronic device, medium, and program product through specific embodiments and application scenarios, will provide a comprehensive overview.
[0025] Step 101: In response to the first query request initiated by the user, send the first response data to the client. The first response data is the response data generated based on the retrieved results matching the pre-fetched context information and the first query request. The pre-fetched context information is the information predicted to be associated with the first information, and the first information is the input segment obtained by the client before receiving the complete query input of the first query request.
[0026] The above first query request may include the input generated by the user's initial operation (such as the first word of the query, a certain function selected in the graphical user interface, or the initial utterance in voice interaction, etc.). The above first response data may be the complete response result generated by the server for the first query request initiated by the user and fed back to the client. Its core feature is based on the dual data sources of "actively pre-fetched context information and precisely matched retrieved results" and can be generated by the inference of the large language model.
[0027] [[ID=******]]Among them, the above context information, that is, the pre-fetched context data segment (such as vector ID or document URI), can be generated by the prediction model. The pre-fetched context information can be the auxiliary data segment actively pre-obtained by the server based on the user's previous interaction signals and personalized features during the response process of the user's complete query request (the first query request), which is semantically related to the query request. Its core purpose is to replace the traditional "passive retrieval" mode and reduce the latency of the large language model generating responses. It can be understood that the pre-fetching in the prior art is based on the historical access pattern, while the pre-fetching in this application is based on the semantic analysis and prediction of the user's real-time and incomplete intention. The pre-fetching in this application is the non-deterministic context information segment associated with the query semantics, which itself can be the auxiliary knowledge content required by the large language model to generate.
[0028] In the above step, the user initiates the first query request on the client, and the client captures the user's initial interaction (such as entering the first 2 words "such as" of the query). It can combine the dynamic user profile (for example, including the user role "developer", topic affinity "Python = 0.8", interaction frequency "12 times in the last 10 minutes") and input it into the lightweight prediction model. The prediction model can then output a sorted list of ContextChunkIDs (for example: [vec_id_123:0.95, doc_uri_456:0.8], indicating the IDs and confidence levels of two context segments), and by sending an asynchronous request to the relevant backend knowledge base (vector database, document storage), retrieve the content corresponding to the pre-fetched ContextChunkIDs to obtain the first response data.
[0029] It should be noted that there seems to be an error in the numbering of the tags in the original text. The tag number "******" in the translation of item is an indication of this error in the original text, and it should be corrected in the original text if possible.It's worth noting that user profiles can be dynamic data structures used to represent user behavioral characteristics. The aforementioned prediction model can be a lightweight semantic-level model, such as a Long Short-Term Memory (LSTM) network or a small Transformer, used to output a list of context fragment IDs with confidence scores based on the input data. This prediction model can be trained offline based on historical interaction data and fine-tuned online through feedback loops; it predicts semantic identifiers rather than memory addresses.
[0030] For example, this step is triggered when a user submits a first query request to the server through a client (e.g., a web application, mobile app, or chatbot interface). Here, "first query request" should be understood as a complete query interaction round. Its implementation includes the following sub-process: semantic context information prefetching, which is not initiated only after the "first query request" is received.
[0031] In practice, the predictive model or prefetching engine continuously monitors user and client interaction signals. For example, when it detects that a user has started typing in an input box or that voice interaction has begun, the client captures these initial, incomplete pre-interaction signals (such as the first few words "Python 'wrong'...") and immediately sends them asynchronously to the server. Upon receiving these pre-interaction signals, the server inputs them along with a dynamic user profile (containing structured data such as user history preferences, roles, and recent conversation topics) into a lightweight predictive model (such as a Large Language Model (LLM), a small network based on LSTM or Transformer, etc.). Finally, the server can retrieve corresponding complete contextual data snippets based on the predictive model (e.g., a technical document about "common Python error types," or a relevant API reference snippet).
[0032] Subsequently, upon receiving the complete "first query request" (e.g., the user's final input and submission of "What should I do if an IndentationError occurs while debugging Python code?"), the server synchronously performs a precise retrieval of that query. The server assembles pre-fetched contextual information (quickly read from the cache) and real-time retrieval results into a complete prompt, which is then input into the large language model. The LLM (Language Model) infers, integrates, and generates the final, coherent, and targeted text response—the first response data. Finally, the server streams or sends this first response data back to the client via a network protocol, presenting it to the user.
[0033] Based on this, the embodiments of this application can prefetch relevant context in advance, avoid I / O latency of real-time retrieval in LLM, and significantly reduce the time required between the moment the problem is input into the model and the moment the model outputs the first basic unit.
[0034] Step 102: Obtain at least one feedback signal, the feedback signal including at least one of the following: the actual adoption ratio of the context information in the first response data, the first character response time of the first response data, and the resource load parameters of the server.
[0035] In the steps described above, after the first response data is generated and sent, the server initiates a monitoring and analysis process to collect quantitative feedback from different dimensions. During the LLM response generation process, the server can request or perform post-processing analysis to annotate the output text and identify which parts are generated based on prefetched context information. For example, traceable markers can be added during generation, or this can be achieved by comparing the semantic overlap between the response text and the prefetched content. For instance, a calculation method can be used: Actual adoption rate = (Number of prefetched context fragments actually referenced or based on in the LLM response) / (Total number of context fragments prefetched for this round of query), which can directly reflect the relevance and effectiveness of the prefetched content.
[0036] Specifically, for the measurement of Time To First Toke (TTFT), the timing interval can be precisely measured from the moment the server receives a complete, processable user query (i.e., the complete "first query request" mentioned above) until the server begins transmitting the first byte / character of the response data stream to the client. TTFT comprehensively reflects the initial latency of the entire link from query understanding, retrieval, context assembly, LLM inference to network preparation, and is a key indicator of user experience.
[0037] For collecting server resource load parameters, key server resource metrics are collected within the time window of serving the first query request. These metrics may include computing resources (e.g., CPU utilization, GPU utilization, average load), memory resources (memory utilization, cache hit rate), I / O resources (e.g., disk I / O utilization, network I / O bandwidth usage), and concurrency pressure (e.g., current active connections, request queue length). These resources can be obtained in real time using operating system monitoring tools, container monitoring metrics, or application performance management probes.
[0038] Step 103: Based on the feedback signal, update the operating parameters, which are used to evaluate the generation effect of the first response data.
[0039] In some embodiments, the server can use multidimensional feedback signals as input and dynamically adjust a set of key control variables affecting system behavior—that is, "running parameters"—through preset strategies, algorithms, or models. Specifically, rule-based control can be implemented by presetting a series of heuristic rules. For example, IF (actual adoption rate < threshold A) AND (resource load > threshold B) can increase the confidence threshold. This means that when prefetched content is mostly useless and the system is busy, the prefetching criteria are tightened to avoid wasting resources. Another example is IF (first character response time > threshold C) AND (actual adoption rate > threshold D), which can increase the weighting of contextual information in the LLM. This means that when the response is slow but the prefetched content is valid, the LLM is made to rely more on the prefetched content (which may already be cached) to reduce real-time retrieval overhead.
[0040] In some specific embodiments, a more complex optimization model (e.g., a reinforcement learning agent) can be built based on the optimization model / reinforcement learning. Its state is the current combination of feedback signals and a snapshot of the user profile. Its action is a decision to adjust operating parameters (e.g., increasing the confidence threshold by 5%). Its reward function is a comprehensive score calculated based on the feedback signals (e.g., reward = w1 * adoption rate - w2 * TTFT - w3 * load). Thus, the model learns how to adjust parameters to obtain higher long-term rewards through continuous trial and error.
[0041] Subsequently, the updated runtime parameters may include a confidence threshold for filtering contextual information (controlling which confidence-based contextual fragments in the predictive model output are actually prefetched; increasing the threshold means more accurate but potentially less prefetching), the weighting of contextual information in the LLM (controlling the degree of importance the LLM places on prefetched general context and accurate real-time retrieval results when generating responses; adjusting this weight can balance the breadth and specificity of the answer), and dynamic feature parameters for the user profile (updating the user profile based on feedback from this interaction. For example, if a prefetched fragment about "vectorization operations" in this query is adopted, the affinity score for the "performance optimization - vectorization" topic in the user profile is increased, making future prefetching more biased towards this topic).
[0042] Step 104: According to the updated operating parameters, send the second response data back to the client. The second response data is the feedback result of the second query request initiated by the user.
[0043] In some embodiments, when the same user (or within the same session) initiates a subsequent "second query request," the system will process this new request entirely based on the updated runtime parameters from step three, thus demonstrating the effect of adaptive optimization. The user initiates a new query (e.g., "What other suggestions are there for large datasets?"). Prefetching phase: The server uses the updated confidence threshold to filter contextual fragments of the prediction model's output, prefetching semantically more relevant "big data processing" related documents.
[0044] Subsequently, the server can use the updated LLM weighting to fuse prefetched content and real-time search results. For example, due to the increased weighting, the LLM will be more inclined to adopt and expand prefetched content related to the "Dask library" or "chunking." The server can reference the updated user profile to personalize predictions and searches. After generating and sending "second response data," the server receives a new round of feedback signals for this interaction. These new feedback signals, along with previous signals, are used for the next parameter update, creating a continuous, closed-loop self-optimization process that allows the server to dynamically adapt to changing user intent, query patterns, and the system's own load.
[0045] Therefore, the embodiments of this application can accurately measure the utility of prefetching and avoid the occurrence of invalid prefetching with a high hit rate but no use.
[0046] In some embodiments, after receiving a feedback signal, the client can adjust one or more of the following: a preset threshold, a large language model, user profiles, and server load. For example, if `Adoption_Rate` is less than 0.5, the preset threshold can be increased to reduce invalid prefetching. If `Adoption_Rate` is greater than or equal to 0.7, the preset threshold can be decreased to expand the effective prefetching range.
[0047] It should be noted that the aforementioned preset threshold can be used to determine the confidence threshold for prefetching, and can measure the semantic correctness of the prediction, combining the signal with system load. The aforementioned update items may specifically include thresholds, preference information in user profiles, data selection weights in the LLM model, server load parameters, etc.
[0048] Based on this, the embodiments of this application can upgrade LLM context management from passive response to active prediction and accurate verification through semantic-level active prefetching and feedback-driven threshold adaptation, which significantly reduces the time required between the moment the problem is input into the model and the moment the model outputs the first basic unit, thus improving the user experience.
[0049] Optionally, the first query request includes first information and second information continuously received by the client from the user, wherein the second information is the complete query input for the first query request;
[0050] Before sending the first response data to the client, the method further includes:
[0051] Obtain the first information and user profile sent by the client; wherein, the user profile is a set of structured features generated based on the user's historical interaction operations on the client;
[0052] The first information and the user profile are input into the prediction model to obtain at least one first contextual information. The prediction model is configured to output semantically relevant contextual information based on the immediate intent reflected by the first information and the historical features reflected by the user profile.
[0053] The first response data is determined based on the at least one first contextual information and the search result; wherein the search result is data that matches the second information retrieved from a preset database.
[0054] It is worth mentioning that the "first query request" can be the starting point of the feedback loop, and its response process generates feedback signals for optimization. The second query request is the verification and application point of the optimization effect, and the server processes it using parameters updated based on the first round of feedback. In this application embodiment, data management can specifically refer to the intelligent prefetching and dynamic supply management of context data for large language model applications. The complete path is: proactive prefetching, multi-dimensional perception, dynamic control, and closed-loop optimization, reducing low latency in dynamic scenarios and meeting the demand for highly accurate context supply.
[0055] It should be noted that the aforementioned first information can be understood as incomplete input generated by the user performing an initial interactive operation (such as entering the first word of a query). The first information is not a complete query statement, but rather an initial interactive signal generated by the user during the process of forming the final question. It can be the first few words / characters of text input (for example, when a user enters "how to adjust...", "how to adjust" could be the first information), a triggering action (for example, the wake-up signal after saying "Hi, assistant" in a voice assistant, or clicking the "help me write code" button on the interface). The aforementioned second information can be the complete and explicit query content issued by the user after completing thinking and input (for example, the final input "How to debug memory leak problems in Python?").
[0056] In one specific embodiment, the client (e.g., a browser, an app) listens for user interactions in real time. Once a meaningful initial input or triggering action is detected, the captured "first information" is immediately sent asynchronously to the server without waiting for the user to click "send." The user continues to input or supplement the query on the client, eventually completing and sending the "second information." The server actually receives these two information packets consecutively, but together they constitute a complete data stream for the "first query request" targeting the user's single intent.
[0057] In some embodiments, the server can initiate a prefetching process immediately upon receiving the first piece of information. It takes this information, along with a dynamic user profile, as input. The predictive model can be a trained, lightweight machine learning model (e.g., a small neural network) tasked with making early predictions of semantic intent. The model analyzes the immediate semantics of the "first piece of information" (e.g., "how to adjust" might be associated with "debug," "adjust," or "research") and combines this with long-term preferences and historical behavior reflected in the user profile (e.g., 80% of the user's historical queries are programming-related, and they frequently ask Python questions recently) to comprehensively determine the complete range of topics the user is most likely to want to query.
[0058] The predictive model outputs one or more identifiers of primary contextual information (such as document IDs and vector IDs in the knowledge base) and their confidence scores. Based on these identifiers, the server asynchronously prefetches the corresponding complete content (such as text, summaries, vectors, etc.) from the background knowledge base (pre-defined database) while the user is still typing or thinking, and loads it into the cache (such as memory or SSD).
[0059] Upon receiving the second piece of information (the complete query), the server performs deep analysis and high-precision, real-time retrieval in a vector database or index to obtain the most directly relevant answer fragments or data (i.e., "retrieval results") for the specific question. For example, for "What to do if a module cannot be found," the search returns specific content such as "10 steps to resolve Python ModuleNotFoundError." Subsequently, the server can retrieve the first context information prefetched from the cache based on the "first piece of information." The server can also construct a hint by combining the prefetched general context with the precise results from the real-time retrieval and input it into the large language model. LLM comprehensively utilizes these two types of information to generate a high-quality response (first response data) that is both comprehensive and accurate, providing both theoretical explanations and step-by-step guidance.
[0060] In some embodiments, the client can input first information (input generated from the user's initial operation, such as the first two words of the query) and a user profile (which may include static attributes such as tenant ID and dynamic metrics such as topic affinity "Python=0.8") into the prediction model. The prediction model (which may be a lightweight semantic-level model, such as LSTM) can then output a data list, which may include: identification information of the second data (e.g., vector ID vec_id_123 or document URI doc_uri_456); and confidence (a probability value representing the relevance of the identification information to the first information). Therefore, embodiments of this application can trigger semantic-level prediction in advance, avoiding the real-time retrieval context of LLM and significantly reducing TTFT.
[0061] For example, when a user enters "Python" in the chat box, the client enters "Python" and a user profile (topic affinity Python=0.8), the model output list is: [vec_id_123:0.95, doc_uri_456:0.8] (representing the ID and confidence of the two context fragments).
[0062] In other embodiments, by traversing the data list, second data with a confidence level greater than or equal to a preset threshold can be filtered, and its identifier information (e.g., vec_id_123) can be determined as first data (i.e., the filtered valid context fragment identifier). For example, if the data list is [vec_id_123:0.95, doc_uri_456:0.8], and the preset threshold is 0.8, then both can be selected as first data; if the threshold is 0.85, then doc_uri_456 is filtered. Thus, embodiments of this application can accurately filter invalid prefetches, reducing the possibility of prefetching errors.
[0063] In other embodiments, the system uses the identifier information of the first data (e.g., vec_id_123) to query a preset database (e.g., a vector database or a document library) to obtain the corresponding actual context data (e.g., the embedded vector [0.1, 0.2,...]). For example, the first data is identified as vec_id_123, and the client can query the vector database to return the corresponding vector data [0.1, 0.2, 0.3].
[0064] In the above embodiments, by advancing the context prefetching action to before the user input is completed and parallelizing it with the user input process, the serial blocking time of "waiting for user input to complete, starting context retrieval, and waiting for I / O return" in the traditional architecture is eliminated. When the user finally presses the send key, the required background knowledge is already ready in memory, and the LLM can immediately start inference, optimizing the TTFT from hundreds of milliseconds to tens of milliseconds, achieving a smooth "key-click response" experience. In addition, the embodiments of this application make prefetching more targeted by combining immediate intent fragments (i.e., first information) and long-term user profiles for prediction. The prediction model is continuously optimized based on feedback (e.g., whether the prefetched content is adopted), forming a closed loop of "prediction-verification-learning," continuously improving the prefetch hit rate, thereby avoiding invalid network transmission, database queries, and cache occupation, and realizing intelligent resource allocation.
[0065] Optionally, determining the first response data based on the at least one first context information and the search result includes:
[0066] Filter out second context information that is semantically associated with the second information from the at least one first context information;
[0067] The second context information and the search results are input into the prediction model to obtain the first response data.
[0068] In some embodiments, the most relevant "second context information" is selected from the prefetch pool. This can be achieved using semantic matching techniques to calculate a relevance score between each prefetched "first context information" and the "second information." This can be done through: vector similarity calculation (e.g., if both the context and the query have been converted into embedding vectors (high-dimensional semantic vectors), then the cosine similarity between them is calculated. The higher the score, the more semantically relevant the information); keyword / topic matching (analyzing overlapping keyword, entity, or topic distributions); and threshold-based filtering (setting a dynamic or static relevance threshold. "First context information" with a relevance score greater than or equal to the threshold is selected, and these selected fragments are defined as "second context information." Fragments that do not meet the threshold are discarded and do not proceed to the next stage).
[0069] It should be noted that not all prefetched content is helpful in answering the current specific question. This filtering process can remove content that, while relevant to the early intent (i.e., the first piece of information), does not closely match the final, complete question (i.e., the second piece of information).
[0070] Furthermore, the filtered second contextual information and the search results that best match the second information, retrieved in real time from the database, are used. Specifically, these two parts of information can be structurally assembled into prompts and input into the large language model. The LLM then uses this as a basis for reasoning and generation. This significantly reduces the noise information that the LLM needs to process, enabling it to generate high-quality answers more quickly and with greater focus.
[0071] Therefore, by filtering, the number of context tokens input to the LLM is significantly reduced, directly lowering the LLM's computational load and inference time. This is particularly important for handling long context windows or high-concurrency scenarios, further reducing TTFT (Time to First Character) and TPT (Time to Per Token). Furthermore, it avoids mixing in low-relevance prefetched content that could "mislead" or "dilute" the LLM's attention. The LLM generates answers based on a purer, more relevant context, making its output less likely to deviate from the user's actual needs, resulting in more targeted and accurate answers.
[0072] Optionally, the step of filtering out second context information semantically associated with the second information from the at least one first context information includes:
[0073] Determine the semantic similarity between the target context information and the second information; wherein the target context information is any one of the at least one first context information;
[0074] If the semantic similarity is greater than or equal to the confidence threshold, the target context information is determined as the second context information.
[0075] This embodiment reveals the core algorithm logic of the filtering process, which is essentially a similarity-based filtering loop. It should be noted that the target context information refers to any context fragment to be evaluated taken from the pre-fetched set of "at least one set of first context information." The second information can be understood as the complete query text finally submitted by the user. Specifically, a semantic understanding model can be used to calculate the semantic similarity between the two. This is a numerical score, typically between 0 and 1, with a higher score indicating a closer semantic similarity.
[0076] The methods for calculating semantic similarity can include the following two:
[0077] One approach is based on embedding vectors. This involves using the same sentence embedding model (e.g., text-embedding-ada-002, BGE, etc.) to convert both the "target context information" and the "secondary information" into high-dimensional semantic vectors. Then, similarity is calculated by determining the cosine similarity between the two vectors. Cosine similarity focuses on the direction of the vectors rather than their length, making it a good measure of semantic closeness.
[0078] Secondly, the cross-encoder-based method can directly input the "target context information" and "secondary information" in pairs into a trained neural network, and the model directly outputs a score representing the relevance.
[0079] In some embodiments, the calculated semantic similarity score can be compared with a preset or dynamic confidence threshold. This confidence threshold can be a globally fixed value or a value dynamically adjusted by the feedback loop. For example, when the system feedback indicates that the prefetched content acceptance rate is too low, this threshold is automatically increased for more stringent filtering. If the semantic similarity is greater than or equal to the confidence threshold, the "target context information" is determined to be sufficiently relevant to the current query and is included in the final set of "second context information." If the semantic similarity is less than the confidence threshold, the information is determined to be insufficiently relevant and is excluded from the "second context information" set.
[0080] The process of determining similarity, comparing thresholds, and making decisions described above can be executed once for each pre-fetched first contextual information. Ultimately, all fragments that pass the threshold check form the refined second contextual information set.
[0081] Therefore, the above embodiments can transform the relevance issue, which originally relied on rules or subjective judgment, into a computable comparison of numerical parameters, enabling the system to perform high-quality screening stably, consistently, and on a large scale. The adoption of each context fragment is based on a clear semantic similarity score, improving transparency and interpretability.
[0082] Optionally, updating the operating parameters based on the feedback signal includes at least one of the following:
[0083] Based on the actual adoption rate, the first character response time, and the resource load parameters, determine the reward function corresponding to the feedback signal, and adjust at least one of the confidence threshold, the weight ratio of context information in the prediction model, and the dynamic feature parameters of the user profile according to the parameter values generated by the reward function.
[0084] If the actual adoption rate is less than a first preset threshold and the resource load parameter is greater than a second preset threshold, the confidence threshold is increased.
[0085] If the response time of the first character is greater than a third preset threshold and the actual adoption rate is greater than a fourth preset threshold, the weighting of context information in the prediction model is increased.
[0086] It's important to note that the reward function can be a mathematical formula. Its purpose is to synthesize multiple feedback signals with different dimensions and scales (actual adoption rate, first-character response time (TTFT), resource load parameters) into a single scalar value. This value represents the overall performance score in this query processing. For example, a simple linear reward function could be: R = w1 * actual adoption rate - w2 * first-character response time - w3 * resource load parameters, where w1, w2, and w3 are preset weighting coefficients, representing the degree of importance placed on answer quality, response speed, and system health, respectively. For instance, to achieve maximum speed, w2 can be increased. It's understandable that the actual adoption rate is considered a positive reward (the higher the better), while TTFT and load parameters are considered cost items (the lower the better). The reward function can also be a more complex non-linear function.
[0087] In some embodiments, the server (or an embedded reinforcement learning agent) can input the current set of feedback signals into the reward function to calculate the reward value R. The server's goal is to find a set of operating parameters (confidence threshold, LLM weight ratio, user profile parameters) that maximizes the cumulative sum (or expected value) of the reward value R over long-term operation. The server continuously attempts to fine-tune the operating parameters using algorithms such as policy gradient and Q-learning, observing the changes in reward value after the adjustments, thereby learning the optimal policy of "how to adjust the parameters under what system state".
[0088] As can be seen, the above embodiments are not targeted at a single scenario, but rather, through long-term learning, find the globally optimal or near-optimal parameter configuration that can balance multiple objectives (such as quality, speed, stability, etc.) in complex and variable environments. Furthermore, the above embodiments do not require manual setting of complex rules; the system can discover patterns from the data and achieve autonomous optimization.
[0089] In some embodiments, the triggering condition can be that the actual adoption rate is less than a first preset threshold and the resource load parameter is greater than a second preset threshold. When most of the prefetched content is useless (low adoption rate) and the system is very busy (high load), it indicates that a large amount of prefetching and computing resources are wasted on invalid information. Therefore, the confidence threshold can be increased. This means that the subsequent screening of prefetched content will be more stringent, and only fragments with very high similarity will be adopted. This can immediately reduce the computation, I / O, and caching overhead of invalid prefetching and quickly alleviate system load. For example, the first preset threshold = 50%, the second preset threshold (CPU) = 80%. The current adoption rate is 40%, and the CPU utilization is 85%. The triggering rule increases the confidence threshold from 0.7 to 0.8.
[0090] In some embodiments, the triggering condition can be that the response time of the first character is greater than a third preset threshold, and the actual adoption rate is greater than a fourth preset threshold. When the response speed is slow (high TTFT), but the prefetched content proves to be highly relevant (high adoption rate), it suggests that the bottleneck may not be in the quality of prefetching, but in the LLM's over-reliance on real-time retrieval (slow real-time retrieval). Therefore, the weighting of contextual information in the LLM can be increased. This means that when generating answers, the LLM will be more inclined to use prefetched and cached contextual information, relatively reducing its reliance on potentially slow real-time retrieval results, thereby directly shortening the TTFT. For example, the third preset threshold = 300ms, the fourth preset threshold = 70%. The current TTFT = 350ms, and the adoption rate = 80%. The triggering rule increases the LLM context weight from 0.5 to 0.7.
[0091] In some embodiments, within the LLM, weights can be used to dynamically adjust the relative proportions of recent relevant data and contextual information when generating target data. Here, recent relevant data can be real-time data generated by the user's current interaction (e.g., recently entered queries, conversation history), representing the "current intent."
[0092] For example, when a user enters "Python error", the LLM generates a response as follows: if the first weight = 0.7, then contextual information (prefetched Python error handling documentation) accounts for 70%, and recent data (e.g., the user recently asked "debug") accounts for 30%. If the first weight = 0.3, then recent data (e.g., "debug" history) accounts for 70%, and contextual information accounts for 30%.
[0093] In this application, the first weight is dynamically adjusted through feedback signals to achieve adaptive optimization of LLM inference. In some embodiments, the actual usage rate of context information (Prefetch_Adoption_Rate) is adjusted. If Adoption_Rate is greater than or equal to 0.7 (prefetching is effective), the first weight can be increased (e.g., if the original weight is 0.6, it can be adjusted to 0.8). If Adoption_Rate is less than 0.5 (i.e., prefetching is ineffective), the first weight can be decreased. Thus, through the embodiments of this application, the proportion of context information can be adaptively increased, making LLM more dependent on prefetched content.
[0094] In applications, if the TTFT is greater than 240ms (slow response), the weights can be fine-tuned (e.g., prioritizing a reduction in the weight of recent data). If the TTFT is less than or equal to 200ms (fast response), the weights can be maintained or increased. Therefore, the embodiments of this application can optimize the response speed of LLM and avoid latency.
[0095] In applications, if CPU / GPU utilization exceeds 80%, the first weight can be reduced to decrease context information dependency. If System_Load is less than or equal to 70%, the first weight can be increased to fully utilize resources. Therefore, this embodiment of the application can prevent resource overload, ensure stability, and avoid GPU computing bottlenecks.
[0096] In some embodiments, a reinforcement learning (RL) agent can be used, whose state and reward function can be extended. Specifically, the state in the RL agent may include system load and user profile features, and the reward function in the RL agent may be a weighted sum, for example:
[0097] ;
[0098] The agent's actions include adjusting `prefetch_threshold` and parameters of the cache replacement strategy (e.g., adjusting the weights between recentity and prefetch confidence). , ).
[0099] In some other embodiments, the feedback signal can also be implemented using a heuristic controller, that is, a simpler, rule-based controller can be used.
[0100] Therefore, through the above embodiments of this application, the weight of context information and recent data can be dynamically adjusted based on feedback signals, so that LLM can achieve a balance between accuracy, response speed (low TTFT) and stability, thereby improving the user waiting experience and prefetching effectiveness.
[0101] Optionally, after filtering out second context information semantically related to the second information from the at least one first context information, and before inputting the second context information and the retrieval result into the prediction model, the method further includes:
[0102] The second context information is subjected to semantic preprocessing, the preprocessing being used to generate an embedding vector or content summary based on the second context information, and / or to remove redundant semantic information in the second context information;
[0103] Depending on the data size of the second context information or the predefined cache level, the preprocessed second context information is cached to different storage media;
[0104] The storage medium includes a first-level storage medium with a faster access speed and a second-level storage medium with a slower access speed.
[0105] It should be noted that the preprocessing described above can involve format conversion and content compression of the selected "secondary context information" to make its form more suitable for efficient LLM consumption. Specifically, an embedding model can be used to convert the text-formatted "secondary context information" into a fixed-dimensional numerical vector. This allows texts of different lengths and formats to be unified into vectors, facilitating subsequent rapid similarity calculations and model processing. Vectors are the fundamental form of representation within LLM; directly providing vectors bypasses the repeated processing of the text by the LLM's own encoder (Tokenizer and Embedding layers), saving considerable computational overhead and memory bandwidth, especially for long texts.
[0106] Understandably, summarization models or algorithms can be used to compress potentially lengthy "secondary contextual information" into concise text that retains the core semantics. This reduces the number of tokens, directly decreasing the prompt length of the input LLM, which is one of the most effective methods for reducing LLM computational complexity and generation latency. Furthermore, redundancy can be removed, automatically filtering out examples, redundant explanations, and irrelevant details from the original text, extracting the core information, and improving the signal-to-noise ratio.
[0107] Furthermore, redundant semantic information can be removed, including deduplication (when multiple selected context fragments contain highly repetitive content), core entity / relationship extraction, or irrelevant paragraph filtering. This ensures that the information set input to the LLM is compact, complementary, and free from internal conflicts or repetitions, preventing the LLM's focus from being distracted. It's worth noting that "and / or" can be understood as the server flexibly choosing one or more combinations of vectorization, summarization, and deduplication based on the characteristics of the context information (e.g., length, structure) and the current system objective (ultimate speed or maximum information content).
[0108] Specifically, the cache level can be determined based on the data size. For example, a threshold (e.g., 10KB) can be set. Data smaller than or equal to the threshold is considered "small data" and suitable for high-speed but expensive storage. Data larger than the threshold is considered "large data" and should be stored in larger but slower storage. Thus, by using predefined cache levels, the server can directly determine the cache level based on the expected access frequency of the information (given by a predictive model), its importance (e.g., data from paying users), or its type (e.g., vector or plain text).
[0109] Furthermore, tiered storage implementation includes:
[0110] Level 1 storage refers to storage with extremely high access speed but small capacity, typically CPU-directly addressed memory, especially GPU-directly accessible video memory or high-speed shared memory. It stores the most frequently accessed and fastest-accessing data (e.g., small, vectorized fragments).
[0111] Level 2 storage media refers to storage with faster access speeds and larger capacities, typically solid-state drives (SSDs). It stores data that is accessed less frequently or is larger in size (such as original long documents or summaries).
[0112] It is worth mentioning that although this application embodiment only explicitly defines two levels, the architecture can naturally be extended to more levels (for example, the third level is a regular hard disk and the fourth level is object storage).
[0113] In some specific embodiments, the client can determine the type of the second context information (e.g., identify it as an embedding vector through data features). If it matches a first preset type, the first data can be directly cached in memory (L1 cache). For example, the client can directly store the embedded vector data output by the prediction model into the memory cache for fast LLM access.
[0114] In some specific embodiments, the client can determine the type of the second context information (e.g., identify it as a complete document through data features). If it matches the second preset type, the first data can be directly cached to the solid-state drive (L2 cache). For example, the prediction model outputs complete document data, which the client can store in the SSD cache to avoid consuming memory.
[0115] It should be noted that the first preset type mentioned above can be context data with a small data footprint and high access frequency, such as embedded vectors (e.g., data corresponding to vector IDs) or short text fragments (e.g., keyword summaries). The second preset type mentioned above can be context data with a large data footprint and low access frequency, such as complete documents or long text fragments (e.g., full-text technical documents).
[0116] This application embodiment can implement the L1 / L2 cache design (memory / SSD) specified in the document into execution logic through a data type-driven multi-level caching strategy, thereby achieving precise allocation of memory resources (prioritizing memory for high-frequency, small data) and improving storage efficiency.
[0117] Please see Figure 2 This illustrates the complete system architecture and workflow of the data management method in the embodiments of this application. Its implementation process can be summarized as the following closed loop:
[0118] In the first phase, request triggering and parallel prefetching occur: user requests enter the system from the "user client" via the "request entry point." Simultaneously, the "predictive prefetching engine" is triggered, which reads the profile from the "context profile manager" and, combined with the initial signal of the request, initiates an asynchronous prefetch query to the "backend knowledge base" (vector database and document library).
[0119] The second stage is data preheating and caching: The prefetching engine writes the acquired context data (prefetched content) into a multi-level cache according to its characteristics: high-frequency hot data (such as vectors and summaries) are stored in the "L1 memory cache", and warm data (such as complete documents) are stored in the "L2 SSD cache".
[0120] The third stage, context assembly and LLM inference: When a user's complete request arrives, the system reads the pre-warmed context from the multi-level cache, combines it with possible external service results, assembles a complete prompt, and sends it to the "core LLM" for inference generation.
[0121] The fourth stage is response output and feedback collection: The response generated by LLM is returned to the user client through the "response exit". At the same time, the system collects the "feedback signals" of this interaction in real time (such as response time, adoption rate, load) and sends them to the "feedback and adaptive loop".
[0122] The fifth stage is closed-loop adaptive optimization: the feedback loop analyzes signals and drives the system to make dynamic adjustments in three dimensions: updating user profiles (optimizing the user model), adjusting prefetching strategies (improving the behavior of the prediction engine), and adjusting caching strategies (optimizing multi-level cache content and replacement algorithms). These adjustments directly affect the work of the next "predictive prefetching engine," thus forming a complete closed loop of continuous self-optimization.
[0123] The entire process described above represents a leap from passive response to proactive prediction, from fixed strategies to dynamic adaptation, and from single retrieval to multi-level caching. The core objective is to reduce latency and improve response quality.
[0124] In some embodiments, the user profile of a client may include explicit or implicit content preferences of the user. For example, topic affinity score. Or, for example, a user prefers "code snippets" to "prose" or "technical documents" to "videos".
[0125] In some embodiments, the data information that users frequently access may be specific data that users have historically accessed frequently in the client (such as "refund policy document" or "API error manual").
[0126] In some embodiments, the frequency of interaction between the client and the server can be the number of requests made by the client per unit of time (e.g., 12 queries every 10 minutes).
[0127] In some embodiments, the average session length mentioned above may be the average interaction duration of a single client session (e.g., an average of 8 minutes per session).
[0128] In some embodiments, the user-preferred data format may be a data format that the client is accustomed to receiving (e.g., "code block", "Markdown table", "text summary", etc.).
[0129] In other embodiments, the user profile may also include user identification information, user preset roles, and recent interaction status (e.g., short-term memory of recently queried and retrieved context fragments in the current session).
[0130] In this embodiment of the application, by setting up user profiles, accurate and personalized context prefetching can be achieved based on user behavior characteristics (e.g., topic affinity, interaction frequency, preferred data format, etc.), which significantly reduces the time required between the moment the question is input into the model and the moment the model outputs the first basic unit, thereby improving user satisfaction and engagement, while reducing the number of backend database queries to reduce operating costs.
[0131] Please see Figure 3 This application also provides a data management method, which specifically includes the following steps:
[0132] 1. The user client sends a user request to the server;
[0133] 2. The server sends an asynchronous request to the predictive engine, triggering prefetching;
[0134] 3. The server reads at least one first data point predicted by the prediction model and performs multi-level caching;
[0135] 4. The memory or solid-state drive sends the context information corresponding to the second piece of information to the server;
[0136] 5. Send a complete assembly backend prompt to the LLM, which includes context information and search results, wherein the search results are data information pre-stored in the database that matches the second information;
[0137] 6. The LLM returns a response to the server, which includes the generated target data;
[0138] 7. Send the target data to the user client;
[0139] It's important to note that predictive prefetching can be understood as prefetching data before a user request arrives, reducing user waiting time. Multi-level caching can differentiate between L1 (memory, hot) and L2 (SSD, warm) layers based on file type to optimize cache access speed. The aforementioned adaptive feedback means continuously optimizing prefetching and caching strategies based on user feedback.
[0140] In the above steps, after the user initiates a request, the Model Context Protocol (MCP) server triggers the predictive prefetch engine. The engine can read context data from the multi-level cache, assemble a complete hint, and send it to the LLM. The LLM then generates a response and returns it to the user.
[0141] Thus, steps 1-7, through parallel prefetching and multi-level caching optimization, significantly improve user request response speed. After a user initiates a request, context data is directly read from the pre-warmed L1 / L2 cache, eliminating the need for real-time queries to the backend knowledge base and avoiding I / O latency. Simultaneously, the predictive prefetching engine pre-assembles complete hints and submits them to the core LLM, ensuring seamless integration of the LLM response generation process. Therefore, steps 1-7 reduce end-to-end latency for user requests, increase system throughput, and ensure an immediate response experience in high-concurrency scenarios.
[0142] Steps 8 to 12 can be triggered before or after step 2 above:
[0143] 8. The predictive engine can read user profiles from the contextual profile manager;
[0144] 9. The contextual profile manager returns the user profile;
[0145] 10. The predictive engine performs asynchronous queries to the backend knowledge base to retrieve at least one corresponding primary data.
[0146] 11. The backend knowledge base returns at least one primary data point to the predictive prediction engine;
[0147] 12. The predictive engine writes at least one primary data point to the cache, performing multi-level caching;
[0148] In steps 8-12 above, the predictive prefetch engine can read user profiles in the background, query the backend knowledge base, prefetch data and write it to a multi-level cache, so that the main process (steps 1-7) can directly obtain context data from the cache, avoiding the overhead of querying the backend knowledge base in real time.
[0149] In this way, steps 8-12 above pre-fill multi-level caches through an asynchronous prefetching mechanism, accurately preload data based on user profiles and backend knowledge bases, so that subsequent user requests can directly call cached content without waiting for real-time queries, effectively reducing request latency, improving resource utilization, and reducing redundant query pressure on the backend knowledge base, thus achieving prefetch as a service.
[0150] The following steps are triggered after step 7:
[0151] 13. The server sends a response feedback signal to the feedback and adaptive loop;
[0152] 14. Update user profiles based on feedback signals;
[0153] 15. Adjust the prefetching strategy of the predictive prediction engine based on feedback signals;
[0154] 16. Adjust the caching strategy of multi-level cache based on feedback signals.
[0155] In steps 13-16 above, after the user receives the response, the server can obtain the corresponding feedback signal, update the user profile, and adjust the prefetching and caching strategies through the feedback loop to improve subsequent performance.
[0156] In this way, steps 13-16 achieve continuous optimization of the caching strategy through the feedback adaptive loop. Based on user response feedback, the user profile is dynamically updated, the prefetching strategy and caching strategy are adjusted, the matching degree between prefetched content and user needs is improved, invalid caching is reduced, request latency is further reduced, and user experience is improved.
[0157] The data management device provided in this disclosure can achieve the above-mentioned functions. Figure 1 To avoid repetition, the various processes in the data management method embodiments shown will not be described again here.
[0158] Please see Figure 4 This disclosure provides a data management device applied to a server, the data management device comprising:
[0159] The first feedback module 301 is used to respond to the first query request initiated by the user and send first response data to the client. The first response data is response data generated based on the search results matched by the prefetched context information and the first query request. The prefetched context information is information predicted to be associated with first information. The first information is an input fragment obtained by the client before receiving the complete query input of the first query request.
[0160] The first acquisition module 302 is used to acquire at least one feedback signal, the feedback signal including at least one of the following: the actual adoption ratio of the context information in the first response data, the first character response time of the first response data, and the resource load parameters of the server;
[0161] The parameter update module 303 is used to update the operating parameters based on the feedback signal, wherein the operating parameters are used to evaluate the generation effect of the first response data;
[0162] The second feedback module 304 is used to provide second response data to the client according to the updated operating parameters. The second response data is the feedback result of the second query request initiated by the user.
[0163] Optionally, the first query request includes first information and second information continuously received by the client from the user, wherein the second information is the complete query input for the first query request;
[0164] Before sending the first response data to the client, the data management device further includes:
[0165] The second acquisition module is used to acquire the first information and user profile sent by the client; wherein, the user profile is a set of structured features generated based on the user's historical interaction operations on the client;
[0166] The third acquisition module is used to input the first information and the user profile into the prediction model to obtain at least one first contextual information. The prediction model is configured to output semantically relevant contextual information based on the immediate intent reflected by the first information and the historical features reflected by the user profile.
[0167] The first determining module is configured to determine the first response data based on the at least one first context information and the search result; wherein the search result is data that matches the second information retrieved from a preset database.
[0168] Optionally, the first determining module includes:
[0169] An information filtering unit is configured to filter out second context information that is semantically associated with the second information from the at least one first context information;
[0170] The first acquisition unit is used to input the second context information and the retrieval result into the prediction model to obtain the first response data.
[0171] Optionally, the information filtering unit is used for:
[0172] Determine the semantic similarity between the target context information and the second information; wherein the target context information is any one of the at least one first context information;
[0173] If the semantic similarity is greater than or equal to the confidence threshold, the target context information is determined as the second context information.
[0174] Optionally, the parameter update module 303 includes at least one of the following:
[0175] The first determining unit is used to determine the reward function corresponding to the feedback signal based on the actual adoption ratio, the first character response time, and the resource load parameters, and to adjust at least one of the confidence threshold, the weight ratio of context information in the prediction model, and the dynamic feature parameters of the user profile according to the parameter value generated by the reward function.
[0176] The first processing unit is configured to increase the confidence threshold when the actual adoption rate is less than a first preset threshold and the resource load parameter is greater than a second preset threshold.
[0177] The second processing unit is used to increase the weight ratio of context information in the prediction model when the response time of the first character is greater than a third preset threshold and the actual adoption ratio is greater than a fourth preset threshold.
[0178] Optionally, after filtering out the second context information semantically related to the second information from the at least one first context information, and before inputting the second context information and the retrieval result into the prediction model, the data management device further includes:
[0179] The first processing module is used to perform semantic preprocessing on the second context information. The preprocessing is used to generate an embedding vector or content summary based on the second context information, and / or to remove redundant semantic information in the second context information.
[0180] The second processing module is used to cache the preprocessed second context information to different storage media according to the data size of the second context information or the predefined cache level;
[0181] The storage medium includes a first-level storage medium with a faster access speed and a second-level storage medium with a slower access speed.
[0182] The data management device provided in this disclosure can achieve the above-mentioned functions. Figure 1 To avoid repetition, the various processes in the data management method embodiments shown will not be described again here.
[0183] According to embodiments of this disclosure, this disclosure also provides an electronic device and a readable storage medium.
[0184] Figure 5 A schematic block diagram of an example electronic device 400 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0185] like Figure 5 As shown, device 400 includes a computing unit 401, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 402 or a computer program loaded from storage unit 408 into random access memory (RAM) 403. The RAM 403 may also store various programs and data required for the operation of device 400. The computing unit 401, ROM 402, and RAM 403 are interconnected via bus 404. Input / output (I / O) interface 405 is also connected to bus 404.
[0186] Multiple components in device 400 are connected to I / O interface 405, including: input unit 406, such as keyboard, mouse, etc.; output unit 407, such as various types of monitors, speakers, etc.; storage unit 408, such as disk, optical disk, etc.; and communication unit 409, such as network card, modem, wireless transceiver, etc. Communication unit 409 allows device 400 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0187] The computing unit 401 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. The computing unit 401 performs the various methods and processes described above, such as data management methods. For example, in some embodiments, the data management method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 408. In some embodiments, part or all of the computer program may be loaded and / or installed on device 400 via ROM 402 and / or communication unit 409. When the computer program is loaded into RAM 403 and executed by the computing unit 401, one or more steps of the data management method described above may be performed. Alternatively, in other embodiments, computing unit 401 may be configured to perform data management methods by any other suitable means (e.g., by means of firmware).
[0188] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0189] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0190] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0191] As used herein, the term "machine-readable medium" refers to any computer program product, device, and / or apparatus (e.g., disk, optical disk, memory, programmable logic device (PLD)) used to provide machine instructions and / or data to a programmable processor, including machine-readable media that receive machine instructions as machine-readable signals. The term "machine-readable signal" refers to any signal used to provide machine instructions and / or data to a programmable processor.
[0192] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0193] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0194] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0195] This application also provides a computer program product, including computer instructions, which, when executed by a processor, implement the above-described... Figure 1 or Figure 3 The various processes of the method embodiments shown can achieve the same technical effect, and will not be described again here to avoid repetition.
[0196] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this application can be achieved, and this is not limited herein.
[0197] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A data management method characterized by, Applied to a server, the method includes: In response to a first query request initiated by a user, first response data is sent to the client. The first response data is response data generated based on the search results matched with the first query request and the prefetched context information. The prefetched context information is information predicted to be associated with first information. The first information is an input fragment obtained by the client before receiving the complete query input of the first query request. Obtain at least one feedback signal, the feedback signal including at least one of the following: the actual adoption ratio of the context information in the first response data, the first character response time of the first response data, and the resource load parameters of the server; Based on the feedback signal, the operating parameters are updated, and the operating parameters are used to evaluate the generation effect of the first response data; According to the updated operating parameters, the second response data is fed back to the client, which is the feedback result of the second query request initiated by the user.
2. The method according to claim 1, characterized in that, The first query request includes the first information and the second information continuously received by the client from the user, wherein the second information is the complete query input for the first query request; Before sending the first response data to the client, the method further includes: Obtain the first information and user profile sent by the client; wherein, the user profile is a set of structured features generated based on the user's historical interaction operations on the client; The first information and the user profile are input into the prediction model to obtain at least one first contextual information. The prediction model is configured to output semantically relevant contextual information based on the immediate intent reflected by the first information and the historical features reflected by the user profile. The first response data is determined based on the at least one first contextual information and the search result; wherein the search result is data that matches the second information and is retrieved from a preset database.
3. The method of claim 2, wherein, Determining the first response data based on the at least one first context information and the search result includes: Filter out second context information that is semantically associated with the second information from the at least one first context information; The second context information and the search results are input into the prediction model to obtain the first response data.
4. The method of claim 3, wherein, The step of filtering out second context information semantically associated with the second information from the at least one first context information includes: Determine the semantic similarity between the target context information and the second information; wherein the target context information is any one of the at least one first context information; If the semantic similarity is greater than or equal to the confidence threshold, the target context information is determined as the second context information.
5. The method of claim 1, wherein, The step of updating the operating parameters based on the feedback signal includes at least one of the following: Based on the actual adoption rate, the first character response time, and the resource load parameters, determine the reward function corresponding to the feedback signal, and adjust at least one of the confidence threshold, the weight ratio of context information in the prediction model, and the dynamic feature parameters of the user profile according to the parameter values generated by the reward function. If the actual adoption rate is less than a first preset threshold and the resource load parameter is greater than a second preset threshold, the confidence threshold is increased. If the response time of the first character is greater than a third preset threshold and the actual adoption rate is greater than a fourth preset threshold, the weighting of context information in the prediction model is increased.
6. The method of claim 2, wherein, After filtering out the second context information semantically associated with the second information from the at least one first context information, and before inputting the first information and the user profile into the prediction model, the method further includes: The second context information is subjected to semantic preprocessing, the preprocessing being used to generate an embedding vector or content summary based on the second context information, and / or to remove redundant semantic information in the second context information; Depending on the data size of the second context information or the predefined cache level, the preprocessed second context information is cached to different storage media; The storage medium includes a first-level storage medium with a faster access speed and a second-level storage medium with a slower access speed.
7. A data management apparatus characterized by comprising: Applied to a server, the device includes: The first feedback module is used to respond to the first query request initiated by the user and send first response data to the client. The first response data is response data generated based on the search results matched by the prefetched context information and the first query request. The prefetched context information is predicted information associated with first information. The first information is an input fragment obtained by the client before receiving the complete query input of the first query request. The first acquisition module is used to acquire at least one feedback signal, the feedback signal including at least one of the following: the actual adoption ratio of the context information in the first response data, the first character response time of the first response data, and the resource load parameters of the server; The parameter update module is used to update the operating parameters based on the feedback signal, and the operating parameters are used to evaluate the generation effect of the first response data; The second feedback module is used to send second response data to the client according to the updated operating parameters. The second response data is the feedback result of the second query request initiated by the user.
8. An electronic device, comprising: It includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the data management method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the data management method as described in any one of claims 1 to 6.
10. A computer program product, characterized in that, Computer program comprising computer instructions which, when executed by a processor, implement the steps of the data management method according to any one of claims 1 to 6.