Information input recommendation method, system and equipment based on large language model
By capturing user input events in real time on the target device to generate log stream data, and using a large language model to identify user intent and contextual information, this technology solves the problem that existing information input recommendation systems cannot identify user intent and recommend complex contexts. It achieves efficient information recommendation across applications and task flows, and improves user task processing efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-19
- Publication Date
- 2026-03-24
AI Technical Summary
Existing information input recommendation systems cannot respond to user input to identify user intent, nor can they recommend complex contextual content that matches the user's intent. Furthermore, when handling complex tasks, users need to manually copy contextual content from other applications to the AI software's dialogue window, resulting in low task processing efficiency.
By capturing user input events in real time on the target device to generate log stream data, and using a large language model to identify user intent and contextual information, the system automatically obtains and recommends candidate results that match the user's intent, enabling information recommendation across applications and task flows.
It improves users' task processing efficiency, reduces the steps of manually copying context content, and can proactively obtain users' true intentions and contextual information to provide accurate candidate results.
Smart Images

Figure CN121722255A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to an information input recommendation method, system and device based on a large language model. Background Technology
[0002] Information input recommendation systems are used to suggest candidate words, phrases, and other content to users as they input information, and are mostly provided to users in the form of input method applications. Current input method applications primarily respond to keyboard and voice input events, can build a personal vocabulary based on the words entered by the user, and can perform simple word association based on word frequency.
[0003] However, current input method applications suffer from at least the following problems: First, they cannot respond to user input to recognize user intent and therefore cannot recommend complex contextual content that matches the user's intent. Second, even if the input method application incorporates artificial intelligence software (such as a large language model), this AI software cannot know the user's actions in other applications. This forces users to manually copy contextual content from other applications and paste it into the AI software's dialog window when asking questions. Therefore, when users are handling complex tasks, the performance of current information input recommendation systems is limited, failing to effectively improve users' task processing efficiency. Summary of the Invention
[0004] This application provides an information recommendation method, system, and device based on a large language model, which addresses the shortcomings of existing information input recommendation systems in terms of limited performance and inability to effectively improve users' task processing efficiency.
[0005] This application provides an information recommendation method based on a large language model, applied to an information recommendation system deployed on a target device. The method includes: If a user inputs a task request, the latest log stream data generated by the user on the target device is obtained, wherein the log stream data generated by the user on the target device is generated based on the input events generated by the user on the target device; Based on the latest log stream data, determine the user's first intent (scenario level). Based on the historical log stream data generated by the user on the target device, determine the first context information that matches the first intent; Input the task request, the first intent, and the first context information into the large language model to obtain the first candidate result corresponding to the task request; The first candidate result is displayed.
[0006] The historical log stream data includes multiple data units, each data unit representing historical log stream data for a task scenario. The step of determining the first context information matching the first intent based on the historical log stream data generated by the user on the target device includes: Among the data units included in the historical log stream data, a data unit that matches the first intent is determined; The first context information is determined based on the data unit that matches the first intent.
[0007] According to the information recommendation method provided in this application, each data unit includes a first-level summary and a second-level summary. The first-level summary is generated based on all second-level summaries within the data unit. The second-level summary describes information about input events in the task scenario corresponding to the data unit. Determining the data unit that matches the first intent includes: The data unit to which the first-level summary or second-level summary that matches the first intent belongs is determined as the data unit that matches the first intent; Determining the first context information based on the data unit matching the first intent includes: The first context information is determined based on all summaries in the data unit that matches the first intent.
[0008] The method recommended based on the information provided in this application also includes: If no user input is detected within a preset time period, acquire the historical log stream data generated by the user on the target device; Based on the historical log stream data, determine the user's second intent (task level) and second context information; The second intent and the second context information are input into the large language model to obtain the second candidate result; The second candidate result is displayed.
[0009] According to the information recommendation method provided in this application, determining the user's second intent and second context information based on the historical log stream data includes: The second intent is determined based on a first-level summary of all data units included in the historical log stream data; Identify the data unit that matches the second intent; The second context information is determined based on all summaries in the data unit that matches the second intent.
[0010] The method recommended based on the information provided in this application also includes: If the frequency of user input operations is detected to be greater than the target frequency, the latest log stream data generated by the user on the target device is obtained; The latest log stream data is input into the large language model to obtain the third candidate result; The third candidate result is displayed.
[0011] This application also provides an information recommendation system based on a large language model, deployed on a target device, the information recommendation system comprising: The front-end interactive interface is used to detect whether the user has entered a task request and to display the first candidate result obtained by the prediction module in response to the task request; The response module is used to obtain the latest log stream data generated by the user on the target device when the front-end interactive interface detects the user's input task request operation. The log stream data generated by the user on the target device is generated based on the input event generated by the user on the target device. The intent recognition module is used to determine the user's first intent based on the latest log stream data, and to determine first context information matching the first intent based on the historical log stream data generated by the user on the target device. A personal knowledge base for storing historical log stream data generated by the user on the target device; The prediction module is used to input the task request, the first intent, and the first context information into the large language model to obtain the first candidate result corresponding to the task request.
[0012] This application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement an information recommendation method based on a large language model as described above.
[0013] This application provides an information recommendation method, system, and device based on a large language model. Implementing the information input recommendation scheme of this application, upon detecting a user's input task request, proactively acquires the latest log stream data generated by the user on the target device, determines the user's true intent (first intent) based on the latest log stream data, and ultimately recommends complex contextual content that matches the user's true intent. Secondly, this application can automatically acquire historical log stream data generated by the user on the target device, eliminating the need for users to manually copy contextual content from other previously used applications and paste it into the system's dialog window when using artificial intelligence services on the information recommendation system. Therefore, the information recommendation method of this application can effectively improve the user's task processing efficiency. Attached Figure Description
[0014] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0015] Figure 1 This is a flowchart illustrating an information recommendation method based on a large language model, as shown in an embodiment of this application.
[0016] Figure 2 This is a schematic diagram illustrating a process for updating a personal knowledge base, as shown in an embodiment of this application.
[0017] Figure 3 This is a schematic diagram illustrating the structure of an information recommendation system based on a large language model, as shown in an embodiment of this application.
[0018] Figure 4 This is a schematic diagram illustrating the principle of an information recommendation method based on a large language model, as shown in an embodiment of this application.
[0019] Figure 5 This is a schematic diagram of the front-end interactive interface of an information recommendation system shown in an embodiment of this application.
[0020] Figure 6 This is a schematic diagram of the physical structure of an electronic device as shown in an embodiment of this application. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0022] The information recommendation method of this application is implemented by an information recommendation system, which is a software system deployed on the target device. The target device can be any type of electronic device. Figure 1 This is a flowchart illustrating an information recommendation method based on a large language model, as shown in an embodiment of this application. (Refer to...) Figure 1 The method of this application may include: Step 101: If a user input task request operation is detected, obtain the latest log stream data generated by the user on the target device. The log stream data generated by the user on the target device is generated based on the input events generated by the user on the target device.
[0023] In this embodiment, the front-end interactive interface of the information recommendation system is equipped with a button for requesting artificial intelligence services. When the user clicks this button, the system will pop up a dialog window where the user can enter a task request.
[0024] When the information recommendation system detects that a user has entered a task request in the dialog window, it automatically retrieves the latest log stream data generated by the user on the target device.
[0025] In this embodiment, the information recommendation system captures all input events generated by the user on the target device in real time and records these input events sequentially according to their timestamps to obtain log stream data. The log stream data is stored in the target device's log file, and during step 101, the information recommendation system can directly read the latest log stream data from this log file.
[0026] In practice, the information recommendation system captures user input events generated on the target device, including input events generated by the user across multiple applications on the target device (such as browsers, instant messaging software, shopping software, office software, etc.), such as clicking a website, browsing a webpage, copying content, etc. Therefore, the latest log stream data also includes events where the user inputs task requests on the information recommendation system.
[0027] In this embodiment, the latest log stream data is the log stream data generated within a preset historical time period from the current time (the time when the latest log stream data is acquired). If the preset historical time period is 1 minute, then the log stream data within the most recent 1 minute is acquired as the latest log stream data; if the preset historical time period is 30 minutes, then the log stream data within the most recent 30 minutes is acquired as the latest log stream data. The preset historical time period can be set according to actual needs.
[0028] In this embodiment, after entering a task request, the user can also input contextual information to enable the information recommendation system to better understand the user's intent. This contextual information is optional; if the user inputs contextual information, it will also be recorded in the latest log stream data.
[0029] Step 102: Determine the user's primary intent based on the latest log stream data.
[0030] In this embodiment, the information recommendation system performs intent recognition on the latest log stream data to obtain the user's true intent, i.e., the first intent.
[0031] The first intent can be a scenario-level intent, reflecting the current task scenario in which the user is currently located.
[0032] Step 103: Determine the first context information that matches the first intent based on the historical log stream data generated by the user on the target device.
[0033] In this embodiment, the historical log stream data is stored in the personal knowledge base set up by the information system for the user using the target structure. Therefore, step 103 is executed by first obtaining the historical log data stream from the user's personal knowledge base, and then obtaining the first context information that matches the first intent based on the historical log data stream.
[0034] In this embodiment, after obtaining the latest log stream data from the log file, the information recommendation system will not only execute step 102, but also reorganize its structure (this reorganization step is not necessarily related to any subsequent steps; for example, it can be done before or after step 103) to make it conform to the target structure and store it in the user's personal knowledge base, thereby updating the personal knowledge base.
[0035] Step 104: Input the task request, the first intent, and the first context information into the large language model to obtain the first candidate result corresponding to the task request.
[0036] In this embodiment, the information recommendation system includes a first large language model, which is a long text prediction model with a large parameter scale and strong deep analysis capabilities, enabling it to process long texts. Therefore, the information recommendation system can perform complex tasks through the first large language model, such as generating schedules, weekly work reports, and email content.
[0037] In this embodiment, the first candidate result is a candidate paragraph. The candidate paragraph may include text, images, tables, and other data.
[0038] In this embodiment, the first candidate result is the execution result of the task request initiated by the user. For example, if the user inputs a task request to generate a weekly work report, then the output candidate paragraphs will be the complete content of that weekly work report.
[0039] Step 105: Display the first candidate result.
[0040] In this embodiment, the information recommendation system displays the first candidate result on the front-end interactive interface, thereby realizing information recommendation.
[0041] In one implementation, User A is writing a weekly work report in Word. To create this report, User A accesses multiple applications, including Application A, Application B, and Application C. When User A needs to use the artificial intelligence service of an information recommendation system to write the report, User A can first click the AI service button on the front-end interactive interface of the information recommendation system. In the pop-up dialog box, User A enters the task request for "Write a Weekly Work Report" and contextual information (e.g., the entire text content of Document 1 in Application A). The information recommendation system detects that the user has entered content in the dialog box and submitted it, then executes steps 101 to 105. Finally, User A can see the first candidate result in the dialog box on the front-end interactive interface. If User A needs to reference the first candidate result, they can select it and click the displayed "Paste to Word" option.
[0042] In this application, because each user has their own personal knowledge base, even when a user is performing multiple different tasks simultaneously (multitasking), the information recommendation system can quickly recommend information without needing to re-enter the context information of the previously executed task when switching between tasks. For example, if user A is writing a weekly work report in Word and simultaneously creating a corresponding table in Excel, user A's personal knowledge base can record historical log stream data generated in both Word and Excel. Thus, user A can enter task requests for the weekly work report in Word or the Excel table at any time on the front-end interactive interface, allowing the two tasks to run concurrently. User A can even enter task requests for either the weekly work report in Word or the Excel table within the same dialog window. For example, when user A switches a task from a weekly work report to a spreadsheet, there is no need to manually enter the historical operation data generated in Word at the previous moment as context. Similarly, when switching a task from a spreadsheet to a weekly work report, there is no need to manually enter the historical operation data generated in Excel at the previous moment as context. The information recommendation system will automatically obtain user A's historical log stream data from the personal knowledge base, thereby obtaining accurate first context information.
[0043] The information recommendation method of this application can proactively acquire the latest log stream data generated by the user on the target device upon detecting a user's input of a task request, and determine the user's true intent (first intent) based on the latest log stream data, ultimately recommending complex contextual content that matches the user's true intent. Secondly, this application can automatically acquire historical log stream data generated by the user on the target device, eliminating the need for users to manually copy contextual content from other previously used applications and paste it into the system's dialog window when using the artificial intelligence services on the information recommendation system. Therefore, the information recommendation method of this application can effectively improve the user's task processing efficiency.
[0044] The following section details the process of updating the personal knowledge base in this application, which consists of two phases. The first phase involves acquiring log stream data, and the second phase involves updating the personal knowledge base.
[0045] Phase 1: Acquiring log stream data.
[0046] Step A1: Low-level listening and capturing of multi-source input events.
[0047] Information recommendation systems, at the operating system level, monitor and capture multi-source, multi-modal input events (such as keyboard events, mouse events, window events, and voice input events) generated by users in real time. The final captured data objects can include: Keyboard behavior: All physical keyboard keystrokes and character sequences displayed on the screen using the input method.
[0048] Clipboard behavior: Copy and paste operations and their contents.
[0049] Cursor and mouse behavior: cursor position, movement trajectory, hover duration, and click events.
[0050] Voice input behavior: Voice data stream input through a microphone.
[0051] Application context information: The name of the currently active application, the window title, and the specific tab URL of the browser.
[0052] Step A2: Real-time contextualization of input events and initial task labeling.
[0053] For each individual input event captured, the information recommendation system immediately attaches the application context information at the time of its occurrence, thus contextualizing the data. At the same time, based on a series of behavioral features (such as the rate of keyboard input, the frequency of cursor switching between different applications, and the semantics of clipboard content), the information recommendation system performs preliminary labeling on the tasks that the user may be currently performing, such as labeling the input event as "coding", "writing documents", or "instant messaging".
[0054] For example, if events 1-3 are captured in step A1. For event 1, the original action is: the user presses Ctrl+C, and the contextualized record is: [Time: 14:30:05], [Event: Clipboard Copy], [Content: "Second Quarter Sales Data Analysis"], [Source Application: Microsoft Word], [Source Window: "Sales Report.docx"]. For event 2, the original action is: the user switches windows and presses Ctrl+V, and the contextualized record is: [Time: 14:30:08], [Event: Application Switch], [Target Application: Microsoft PowerPoint], [Time: 14:30:10], [Event: Clipboard Paste], [Content: "Second Quarter Sales Data Analysis"], [Source Application: Microsoft PowerPoint], [Source Window: "Quarterly Report.pptx"]. For event 3, the original action is: the user starts typing, and the contextualized record is: [Time: 14:30:15], [Event: Keyboard Input], [Content: "Based on this data, we can see..."], [Source Application: Microsoft PowerPoint], [Source Window: "Quarterly Report.pptx"].
[0055] Continuing with the three contextualized input events mentioned above, the information recommendation system analyzes the behavioral characteristics: the user switches between Word and PowerPoint; copies a title from a Word document; pastes it into the PowerPoint presentation and begins writing the main text; and the input text is analytical statements. Based on these behavioral characteristics, the information recommendation system can determine that this series of isolated input events collectively constitutes a coherent task. Therefore, the system assigns a unified task label to the three contextualized input events: "PPT creation in progress."
[0056] Step A3: Generation and time-series storage of structured logs.
[0057] The information recommendation system integrates contextualized and task-tagged input events into structured data entries. Each data entry includes fields such as timestamp, event type, event content, application context, and task tag. Finally, all data entries are stored in a local log file in chronological order, forming a structured log stream.
[0058] Continuing with the example of the three input events tagged with tasks in step A2 above, the information recommendation system generates data entry 1 based on event 1, data entry 2 based on event 2, and data entry 3 based on event 3. For example, data entry 1 records "Timestamp: 14:30:05.123; Event Type: Clipboard_Copy; Event Content: Second Quarter Sales Data Analysis; Application Context (Application Name: Microsoft Word; Window Title: Sales Report.docx) and Task Tag: PPT Creation in Progress".
[0059] Next, the three data entries are written to the local log file one by one in chronological order of occurrence. The log file records the log stream data.
[0060] Phase 2: Update the personal knowledge base based on log stream data.
[0061] Step B1: Extraction and preprocessing of log stream data.
[0062] The information recommendation system periodically extracts previously unprocessed log stream data from local log files, cleans it, removes meaningless symbols, and corrects formatting errors.
[0063] Step B2: Deep correlation analysis of cross-application task flows.
[0064] The information recommendation system reads task tags and application context information from log stream data and performs in-depth analysis. By calculating the semantic similarity of word vectors of input content from different applications and analyzing application switching behavior patterns, it associates and aggregates log fragments from different applications that actually belong to the same task, forming a complete, cross-application task flow. (For example, associating a user's browsing of information in a browser, writing a document in Word, and discussing with colleagues on WeChat as the same report writing task flow).
[0065] For example, if the unprocessed log stream data extracted from the log file consists of 4 data entries, after processing in step B2, the following 4 clean log fragments are obtained: Record 1: I copied "Second Quarter Sales Data Analysis" into Word.
[0066] Record 2: Switched to PowerPoint.
[0067] Record 3: Pasted "Second Quarter Sales Data Analysis" into PowerPoint.
[0068] Record 4: In PowerPoint, I typed "Based on this data, we can see...".
[0069] The information recommendation system performs word vector semantic similarity analysis on the four records to obtain semantic analysis results, and simultaneously performs application switching behavior pattern analysis to obtain behavioral analysis results. Next, based on the semantic and behavioral analysis results, the information recommendation system determines that the four records belong to the same task scenario. Finally, the information recommendation system creates a data unit to store the four records and adds an accurate task label, "Report Writing Task," to this data unit.
[0070] Step B3: Generation of multi-level semantic summaries based on a large language model.
[0071] For each data unit obtained from the segmentation, the information recommendation system calls a large language model to perform multi-level semantic summarization, including low-level summarization and high-level summarization. Low-level summarization is used to summarize the user's raw input (such as a piece of code or text) into specific behaviors (e.g., "implemented a login function" or "described the sales situation in the second quarter"). High-level summarization is used to further refine the core objectives of the entire task flow based on the low-level summarization (e.g., "completed the quarterly sales report for project A").
[0072] Continuing with the above four records as an example, the information recommendation system calls the large language model to analyze the four records. Finally, it generates a low-level summary 1 based on records 1 and 3, for example, "From the Word document 'Sales Report.docx,' the core title 'Second Quarter Sales Data Analysis' is cited." It generates a low-level summary 2 based on record 4, for example, "In the PowerPoint presentation 'Quarterly Report.pptx,' based on the above title and data, preliminary analysis content is started." Finally, the large language model generates a high-level summary for the data unit based on low-level summary 1 and low-level summary 2. If new records are added to the data unit subsequently, the high-level summary can be updated through the large language model; this embodiment does not impose specific restrictions on the update method.
[0073] Step B4: Vectorization of the abstract.
[0074] The information recommendation system converts the summaries generated in step B3 into high-dimensional mathematical vectors using a specific word embedding model (BERT and its variants, etc.).
[0075] In the process of converting each summary into a vector, either the summaries can be directly converted into vectors, or the summaries can be intelligently segmented (each segment being a complete knowledge block), and then each segment can be converted into a vector separately. The specific method used can be set according to actual needs. Step B5: Vector storage and metadata tagging. In subsequent embodiments, unless otherwise specified, the information recommendation system uses the method of directly converting each summary into a vector.
[0076] The information recommendation system stores the transformed vectors into a vector database. Simultaneously, it attaches rich metadata tags to each vector. These metadata tags originate from the original log stream data, including timestamps, the application involved, the task scenario, and the document title.
[0077] After the above steps, a structured personal knowledge base is obtained that supports both semantic fuzzy search (calculated via vector distance) and precise metadata filtering (filtered via tags). The personal knowledge base includes a vector database and the records obtained in step B2. The vector database is used as an index for contextual information retrieval.
[0078] Figure 2 This is a schematic diagram illustrating a process for updating a personal knowledge base, as shown in an embodiment of this application. Figure 2 This demonstrates a process for transforming fragmented user historical behavior into structured personal knowledge. First, it captures log stream data generated by users across multiple applications and preprocesses it, including cleaning up special symbols. Next, it uses a large language model to perform hierarchical summarization of the cleaned log stream data, refining it into multi-level task descriptions with logical structure. Then, the summaries are intelligently segmented into semantically coherent knowledge blocks, and each knowledge block is transformed into a high-dimensional mathematical vector, or the summary itself is directly transformed into a high-dimensional mathematical vector. Finally, the generated vectors are updated in the user's vector database.
[0079] In conjunction with the above embodiments, in one implementation, the historical log stream data includes multiple data units, where each data unit represents the historical log stream data for a single task scenario, as described above. Based on this, step 103 may include: Among the data units included in the historical log stream data, identify the data unit that matches the first intent; First context information is determined based on the data unit that matches the first intent.
[0080] In this embodiment, the information recommendation system can search among all data units stored in the user's personal knowledge base, find the data unit that matches the first intent, and then obtain the first context information based on all data units that match the first intent.
[0081] In this embodiment, the personal knowledge base stores the user's historical log stream data according to task scenarios (data units), enabling the information recommendation system to quickly retrieve the first context information, thereby effectively improving the efficiency of information recommendation and the user's task processing efficiency.
[0082] In one implementation, based on the above embodiments, each data unit includes a first-level summary and a second-level summary. The first-level summary is generated based on all the second-level summaries in its respective data unit, and the second-level summary is used to describe the event information in the task scenario corresponding to the data unit. The first-level summary is the high-level summary mentioned above, and the second-level summary is the low-level summary mentioned above.
[0083] Accordingly, determining the data unit that matches the first intent includes: The data unit to which the first-level or second-level summary that matches the first intent belongs is determined as the data unit that matches the first intent.
[0084] In this embodiment, if intelligent segmentation is used in advance, the vector that matches the first intent can be determined first, and then the summary to which the vector that matches the first intent belongs can be determined as the summary that matches the first intent (first-level summary or second-level summary).
[0085] In this embodiment, after determining the first intent, a summary of any type (first-level or second-level) that matches the first intent can be retrieved from the personal knowledge base, and the data unit to which the summary belongs can be determined as the data unit that matches the first intent.
[0086] Further, based on the data unit matching the first intent, the first context information is determined, including: First context information is determined based on all summaries in the data unit that matches the first intent.
[0087] In this embodiment, all summaries in the data unit that matches the first intent can be used as the first context information.
[0088] In this embodiment, the personal knowledge base stores vectors corresponding to all summaries. When the first context information is retrieved, the first intent is converted into a first intent vector, which is then matched with the summary vectors in the vector database. The data unit to which the summary vector with the highest matching degree (or the summary vector with a matching degree greater than a preset degree) belongs is the data unit that matches the first intent. In this way, the efficiency of first context information retrieval can be significantly improved. Secondly, after determining the data unit that matches the first intent, all summaries in the data unit are used as first context information, which can significantly improve the accuracy of the first context information, thereby improving the accuracy of the final recommended first candidate result.
[0089] In one implementation, determining the data unit matching the first intent includes: The data units to which the first-level or second-level summary that matches the first intent belongs, and the data units to which the metadata tags that match the first intent belong, are identified as data units that match the first intent.
[0090] In this embodiment, not only can the data unit matching the first intent be determined by searching the summary, but the data unit matching the first intent can also be determined by searching the metadata tag, thereby effectively improving the matching success rate of the data unit.
[0091] In one implementation, determining the data unit matching the first intent includes: The data unit to which the first-level or second-level summary matches the first intent is determined as the initial data unit matching the first intent; Based on the degree of matching between the first intent and each metadata tag in the initial data unit, the initial data unit is filtered to obtain the data unit that matches the first intent.
[0092] In this embodiment, after obtaining the initial data unit, the matching degree between the first intent and each initial data unit can be determined based on the matching degree between the first intent and each metadata tag in the initial data unit. The initial data unit with the highest matching degree, or the initial data unit with a matching degree greater than a preset degree, is determined as the data unit that matches the first intent.
[0093] In this embodiment, by using metadata tags to filter the data units obtained from the summary retrieval, the accuracy of the final data units that match the first intent can be effectively improved, thereby improving the accuracy of the first context information.
[0094] In one implementation, determining first context information based on data units matching the first intent includes: First context information is determined based on all summaries and metadata in the data unit that matches the first intent.
[0095] In this embodiment, by adding metadata tags to the first context information, the richness of the first context information can be effectively improved, thereby significantly improving the accuracy of the first candidate result.
[0096] In conjunction with the above embodiments, in one implementation, the method of this application may further include: Step 201: If no user input operation is detected within the preset time period, obtain the historical log stream data generated by the user on the target device.
[0097] In this embodiment, if the information recommendation system does not detect any user input within a preset time period, it can determine that the user is in an idle state. At this time, the information recommendation system can proactively provide recommendation services to the user.
[0098] Step 202: Determine the user's secondary intent and secondary context information based on historical log stream data.
[0099] In this embodiment, after the information recommendation system obtains the historical log stream data generated by the user on the target device from the personal knowledge base, it identifies the user's second intent and second contextual information based on the historical log stream data.
[0100] The second intent can be a task-level intent, reflecting the specific task the user will perform next.
[0101] Step 203: Input the second intent and the second contextual information into the large language model to obtain the second candidate result.
[0102] The second candidate result can be one or more of the following: candidate sentences and candidate task proposals. A candidate task proposal is the name of a suggested task for the user to perform, not the result of that task. Examples of candidate task proposals include "Generate Weekly Work Report," "Generate Work Plan," and "Generate Schedule." When a user accepts a candidate task proposal, the information recommendation system automatically calls the primary language model to execute that candidate task and outputs the execution result.
[0103] In this embodiment, the information input recommendation system includes a second language model, which is a short text prediction model with a small parameter scale and fast analysis capabilities. Therefore, it can quickly output and display candidate sentences and candidate task proposals.
[0104] Therefore, by executing step 203, inputting the second intent and the second contextual information into the large language model, a second candidate result can be obtained.
[0105] Step 204: Display the second candidate result.
[0106] In this embodiment, if a user encounters difficulties while processing a task, the information recommendation system can proactively provide the user with information recommendation services, thereby improving the user's task processing efficiency.
[0107] In conjunction with the above embodiments, in one implementation, step 202 includes: The second intent is determined based on a first-level summary of all data units included in the historical log stream data; Identify the data unit that matches the second intent; The second context information is determined based on the second-level summary in the data unit that matches the second intent.
[0108] In this embodiment, the information recommendation system can analyze all first-level summaries in a user's knowledge base, such as analyzing the changing trends of first-level summaries, to obtain the user's second intent.
[0109] Specifically, determining the data unit that matches the second intent may include: The data unit to which the first-level or second-level summary matches the second intent is identified as the data unit matching the second intent; or The data units to which the first-level or second-level summary that matches the second intent belongs, and the data units to which the metadata tags that match the second intent belong, are identified as data units that match the second intent.
[0110] In this embodiment, if intelligent segmentation is used in advance, the vector that matches the second intent can be determined first, and then the summary to which the vector that matches the second intent belongs can be determined as the summary that matches the second intent (first-level summary or second-level summary).
[0111] In this embodiment, retrieving data units through summaries or metadata tags can effectively improve the matching success rate of data units that match the second intent.
[0112] In one implementation, determining the data unit that matches the second intent includes: The data unit to which the first-level or second-level summary that matches the second intent belongs is determined as the initial data unit that matches the second intent; Based on the degree of matching between the second intent and each metadata tag in the initial data unit, the initial data unit is filtered to obtain the data unit that matches the second intent.
[0113] In this embodiment, after obtaining the initial data unit, the matching degree between the second intent and each initial data unit can be determined based on the matching degree between the second intent and each metadata tag in the initial data unit. The initial data unit with the highest matching degree, or the initial data unit with a matching degree greater than a preset degree, is determined as the data unit that matches the second intent.
[0114] In this embodiment, by using metadata tags to filter the data units obtained from the summary retrieval, the accuracy of the final data units that match the second intent can be effectively improved, thereby improving the accuracy of the second context information.
[0115] In one implementation, second context information is determined based on all summaries in the data unit that matches the second intent.
[0116] The second context information is determined based on all the summaries and metadata in the data unit that matches the second intent.
[0117] In this embodiment, by adding metadata tags to the second context information, the richness of the second context information can be effectively improved, thereby significantly improving the accuracy of the second candidate result.
[0118] In conjunction with the above embodiments, in one implementation, the method of this application may further include: Step 301: If the frequency of user input operations is detected to be greater than the target frequency, obtain the latest log stream data generated by the user on the target device; Step 302: Input the latest log stream data into the large language model to obtain the third candidate result; Step 303: Display the third candidate result.
[0119] In this embodiment, the large language model used is a short text prediction model. The third candidate result is the candidate sentence. The target frequency can be set according to actual needs.
[0120] In this embodiment, if the frequency of the user's input operation is detected to be greater than the target frequency, it indicates that the user is processing the task smoothly. At this time, the user has a greater demand for frequently used information (such as candidate sentences). Since the second language model has the ability to predict quickly, the latest log stream data generated by the user on the target device can be directly input into the large language model to obtain the third candidate result. Finally, the third candidate result is displayed, realizing the rapid recommendation of frequently used information by the user without increasing the system's computing pressure.
[0121] In conjunction with the above embodiments, in one implementation, the method of this application may further include: If a user inputs a task request, contextual recommendation information is displayed. This information is generated based on historical log stream data and is used to instruct the user to select the corresponding third contextual information when inputting a task request.
[0122] In this embodiment, since each data unit corresponds to a task scenario, when a user inputs a task request, the names of several data units recently used by the user can be directly displayed as contextual recommendation information on the front-end interactive interface. In this way, when the user inputs a task request, they can also select the third contextual information corresponding to that task request. This enables the information recommendation system to accurately identify the user's primary intent, thereby achieving accurate recommendation of the first candidate result.
[0123] In conjunction with the above embodiments, in one implementation, after determining the user's first intent, the method of this application further includes: If the probability of risk for the first intention is greater than the preset probability, an alarm message will be output.
[0124] In this embodiment, if the risk probability of the identified first intent is greater than the preset probability, it indicates that the first intent is a dangerous intent. At this time, an alarm can be output to prevent the user from performing dangerous operations.
[0125] Similarly, if the risk probability of the identified second intent is greater than the preset probability, it indicates that the second intent is a dangerous intent, and an alarm can be output to prevent the user from performing dangerous operations.
[0126] In the existing technology, the main challenges faced by large language models are concentrated in three aspects: 1. Context fragmentation and access restrictions: (1) Large language models embedded in applications are usually accessed through the interface provided by the application and can be deployed locally or in the cloud. However, the dialogue can only access the operation context of the current application. Modern human-computer interaction often takes place in multiple application scenarios, and user behavior data is stored in different applications. Most of the user personal knowledge bases in these applications are stored using private protocols and are isolated from each other. This forces users to manually provide context information from other applications when using large language models in specific applications, which is cumbersome. (2) Cross-task flow interaction barriers: In multi-task workflows, users may need to interact with large language models in different tasks. However, the content and state of these cross-task flow interactions cannot be shared, and users still need to manually transfer relevant information. 2. Task initiation depends on the user: Large language models depend on the user to actively initiate dialogue and require the user to clearly describe the task goal and context, lacking the ability to actively intervene in the workflow. The information input recommendation method based on a large language model, as proposed in this application, relies on a pre-created user's personal knowledge base. This eliminates the need for users to actively input contextual information from other applications when initiating a task request. Furthermore, in multi-tasking scenarios, users can freely use this information input recommendation method without manually transferring information between different tasks to the information input recommendation system, effectively solving the first problem mentioned above. Secondly, this application can proactively provide information recommendation services to users when they are idle, enhancing their task processing efficiency and effectively solving the second problem mentioned above.
[0127] Current Retrieval-Augmented Generation (RAG) systems rely on manually pre-built and maintained knowledge bases as the primary retrieval source. This prevents them from automatically capturing and utilizing the dynamic contextual information generated by users in real-time task flows. The solution proposed in this application first retrieves contextual information through a personal knowledge base, and then integrates the final results using a large language model. Building upon retrieval augmentation techniques, this application's personal knowledge base automatically stores the dynamic contextual information generated by users in different task flows. Compared to existing retrieval augmentation systems, this effectively improves the accuracy of contextual retrieval results, thereby enhancing the accuracy of candidate results.
[0128] Next, the information recommendation system based on a large language model of this application will be described. The information recommendation system of this application is deployed on the target device. Figure 3 This is a schematic diagram illustrating the structure of an information recommendation system based on a large language model, as shown in an embodiment of this application. Figure 3 As shown, the information recommendation system of this application may include: The front-end interactive interface is used to detect whether the user has entered a task request and to display the first candidate result obtained by the prediction module in response to the task request; The response module is used to obtain the latest log stream data generated by the user on the target device when the front-end interactive interface detects the user's input task request operation. The log stream data generated by the user on the target device is generated based on the input events generated by the user on the target device. The intent recognition module is used to determine the user's first intent based on the latest log stream data, and to determine the first context information that matches the first intent based on the historical log stream data generated by the user on the target device. A personal knowledge base for storing historical log stream data generated by the user on the target device; The prediction module is used to input the task request, the first intent, and the first context information into the large language model to obtain the first candidate result corresponding to the task request.
[0129] The information recommendation method of this application can proactively acquire the latest log stream data generated by the user on the target device upon detecting a user's input task request, and determine the user's true intent (first intent) based on the latest log stream data, ultimately recommending complex contextual content that matches the user's true intent. Secondly, this application can automatically acquire historical log stream data generated by the user on the target device, eliminating the need for users to manually copy contextual content from other previously used applications and paste it into the system's dialog window when they need to use the artificial intelligence services on the information input recommendation system. Therefore, the information recommendation method of this application can effectively improve the user's task processing efficiency.
[0130] In one implementation method, in conjunction with the above embodiments, The response module is also used to obtain historical log stream data generated by the user on the target device if the user input operation is not detected in the front-end interactive interface for a preset time. The intent recognition module is also used to determine the user's secondary intent and secondary context information based on historical log stream data; The prediction module is also used to input the second intent and second contextual information into the large language model to obtain the second candidate result; The front-end interactive interface is also used to display the second candidate result.
[0131] In this application, if the front-end interactive interface does not detect any user input within a preset time period, it is determined that the user is in an idle state. At this time, the response module acquires the historical log stream data generated by the user on the target device and sends an intent recognition signal to the intent recognition module. Next, the intent recognition module responds to the intent recognition signal and determines the user's second intent and second contextual information based on the historical log stream data in the user's personal knowledge base. Finally, the prediction module determines a second candidate result based on the second intent and second contextual information using a large language model and returns the second candidate result to the front-end interactive interface.
[0132] In this embodiment, if a user encounters difficulties while processing a task, the information input recommendation system can proactively provide the user with information recommendation services, thereby improving the user's task processing efficiency.
[0133] In one embodiment, based on the above embodiments, the prediction module includes a first large language model and a second large language model, wherein the first large language model supports processing a larger text size than the second large language model.
[0134] The prediction module is used to input the task request, the first intent, and the first contextual information into the first large language model to obtain the first candidate result; or, it is used to input the second intent and the second contextual information into the second large language model to obtain the second candidate result.
[0135] In this embodiment, user-initiated task requests are typically complex and require high accuracy. Therefore, the first candidate result, i.e., candidate paragraph, can be obtained through reasoning using the first language model. When the user is idle, since the user's next action is uncertain, only arbitrary candidate suggestions can be predicted and provided to the user. In this case, the accuracy requirement for the reasoning result is not high. In this situation, the second candidate result can be obtained through reasoning using the second language model, which may include candidate sentences and candidate task suggestions.
[0136] In this application, different large language models are used to process different user states (the state of actively initiating task requests and the idle state), which can effectively improve the user experience, improve the computational efficiency of the information input recommendation system, and avoid wasting computing resources.
[0137] In conjunction with the above embodiments, in one implementation, the personal knowledge base is also used to hide privacy information (such as names, values, etc.) when sending data (mainly first context information and second context information) to the outside world.
[0138] The types of privacy data can be set according to actual needs, such as ID card numbers, bank card numbers, etc. A privacy list can be pre-designed, and all data in the privacy list can be hidden. This application does not impose specific restrictions on the hiding operation, as long as the privacy data cannot be recognized by the large language model.
[0139] In this embodiment, the personal knowledge base hides the private parts of the data to be sent, which can effectively avoid the risk of user privacy leakage. This solves the problem that in the prior art, the knowledge base usually needs to be fully exposed to the backend of the large language model when it is used, and users lack the ability to perform fine-grained access control and effective isolation of their sensitive information, which poses significant privacy and security risks.
[0140] In conjunction with the above embodiments, in one implementation, the front-end interactive interface is also used to remain floating on the display interface of the target device while the user switches between multiple different applications.
[0141] In this embodiment, the front-end interactive interface mainly includes functions such as input text retention (the text entered by the user will be retained in the input box and will not be lost when switching windows), candidate word display (real-time display of candidate words, candidate sentences, candidate paragraphs, and candidate task suggestions provided by the prediction module), long dialogue initiation, context quick selection (quickly select relevant background information), and hover (always hovering on the display interface of the target device, and will not be obscured even if the user switches to other applications).
[0142] In this application, regardless of what application the user operates on the target device's display interface, that is, when the user switches between multiple different applications, the front-end interactive interface has the ability to float on the target device's display interface in real time, which can significantly optimize the user experience.
[0143] Of course, the front-end interactive interface can also be displayed at a location specified by the user based on the user's input settings.
[0144] In conjunction with the above embodiments, in one implementation, the response module is further configured to generate a task template based on the user's configuration, and execute the task corresponding to the task template when the user selects it. When executing the task corresponding to the task template, the response module may also invoke a large language model to assist in task processing.
[0145] In this application, users can pre-generate multiple task templates, each of which pre-defines the specific process for the information recommendation system to execute the task corresponding to that template. For example, for the task template of writing a weekly report, when the user selects this template, the information recommendation system can automatically execute the task of writing the weekly report according to the task execution process defined by the user when the template was generated.
[0146] In this application, the information recommendation system supports users to preset multiple task templates, which can effectively improve users' task processing efficiency.
[0147] In conjunction with the above embodiments, in one implementation, the response module is further configured to encrypt the log stream data using blockchain technology after generating the log stream data, thereby preventing the knowledge stored in the personal knowledge base from being tampered with.
[0148] Figure 4 This is a schematic diagram illustrating the principle of an information recommendation method based on a large language model, as shown in an embodiment of this application. Figure 4As shown, the information recommendation system monitors and captures multi-source, multi-modal input events (keyboard events, mouse events, window events, and voice input events) generated by users in real time, achieving the capture of log stream data. The response module includes a word association module and a word matching module. Based on the word association module, the word matching module, and an optional personal thesaurus, the response module obtains candidate words and displays them on the front-end interactive interface. The prediction module includes a short text prediction model and a long text prediction model. The response module can call the short text prediction model to generate candidate sentences and candidate task proposals (e.g., schedule generation). When a user adopts a candidate task proposal, the long text prediction model can assist in the execution of the candidate task. In the intelligent task context matching stage, users can manually input the context based on historical log stream data, or directly select the context based on the context recommendation information displayed in the personal knowledge base on the front-end interactive interface. After intelligent task context matching, the short text prediction model can also be called for simple tasks. Intent recognition and high-risk intent alerts can be referred to the previous section. The long text prediction model can output candidate paragraphs, or it can execute task flows by outputting candidate paragraphs. The task flow execution results are displayed in the form of candidate paragraphs. Information displayed on the front-end interactive interface, such as Figure 5 As shown. Figure 5 This is a schematic diagram of the front-end interactive interface of an information recommendation system shown in an embodiment of this application.
[0149] Figure 6 This is a schematic diagram of the physical structure of an electronic device shown in an embodiment of this application, such as... Figure 6 As shown, the electronic device may include a processor 610, a communications interface 620, a memory 630, and a communication bus 640, wherein the processor 610, communications interface 620, and memory 630 communicate with each other via the communication bus 640. The processor 610 can call logical instructions in the memory 630 to execute an information recommendation method based on a large language model. This method includes: if a user input task request is detected, obtaining the latest log stream data generated by the user on the target device, wherein the log stream data generated by the user on the target device is generated based on input events generated by the user on the target device; determining the user's first intent based on the latest log stream data; determining first contextual information matching the first intent based on historical log stream data generated by the user on the target device; inputting the task request, the first intent, and the first contextual information into the large language model to obtain a first candidate result corresponding to the task request; and displaying the first candidate result.
[0150] Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0151] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0152] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0153] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. An information recommendation method based on a large language model, characterized in that, The method is applied to an information recommendation system, which is deployed on a target device, and includes: If a user inputs a task request, the latest log stream data generated by the user on the target device is obtained, wherein the log stream data generated by the user on the target device is generated based on the input events generated by the user on the target device; Based on the latest log stream data, determine the user's primary intent; Based on the historical log stream data generated by the user on the target device, determine the first context information that matches the first intent; Input the task request, the first intent, and the first context information into the large language model to obtain the first candidate result corresponding to the task request; The first candidate result is displayed.
2. The information recommendation method according to claim 1, characterized in that, The historical log stream data includes multiple data units, each data unit representing historical log stream data for a task scenario. The step of determining the first context information matching the first intent based on the historical log stream data generated by the user on the target device includes: Among the data units included in the historical log stream data, a data unit that matches the first intent is determined; The first context information is determined based on the data unit that matches the first intent.
3. The information recommendation method according to claim 2, characterized in that, Each data unit includes a primary summary and a secondary summary. The primary summary is generated based on all secondary summaries within the data unit. The secondary summaries describe information about input events in the task scenario corresponding to the data unit. Determining the data unit that matches the first intent includes: The data unit to which the first-level summary or second-level summary that matches the first intent belongs is determined as the data unit that matches the first intent; Determining the first context information based on the data unit matching the first intent includes: The first context information is determined based on all summaries in the data unit that matches the first intent.
4. The information recommendation method according to claim 3, characterized in that, Also includes: If no user input is detected within a preset time period, acquire the historical log stream data generated by the user on the target device; Based on the historical log stream data, the user's second intent and second context information are determined; The second intent and the second context information are input into the large language model to obtain the second candidate result; The second candidate result is displayed.
5. The information recommendation method according to claim 4, characterized in that, Based on the historical log stream data, the user's second intent and second context information are determined, including: The second intent is determined based on a first-level summary of all data units included in the historical log stream data; Identify the data unit that matches the second intent; The second context information is determined based on all summaries in the data unit that matches the second intent.
6. The information recommendation method according to claim 1, characterized in that, Also includes: If the frequency of user input operations is detected to be greater than the target frequency, the latest log stream data generated by the user on the target device is obtained; The latest log stream data is input into the large language model to obtain the third candidate result; The third candidate result is displayed.
7. An information recommendation system based on a large language model, characterized in that, Deployed on the target device, the information recommendation system includes: The front-end interactive interface is used to detect whether the user has entered a task request and to display the first candidate result obtained by the prediction module in response to the task request; The response module is used to obtain the latest log stream data generated by the user on the target device when the front-end interactive interface detects the user's input task request operation. The log stream data generated by the user on the target device is generated based on the input event generated by the user on the target device. An intent recognition module is used to determine the user's first intent based on the latest log stream data, and to determine first context information matching the first intent based on the historical log stream data generated by the user on the target device. A personal knowledge base for storing historical log stream data generated by the user on the target device; The prediction module is used to input the task request, the first intent, and the first context information into the large language model to obtain the first candidate result corresponding to the task request.
8. The information recommendation system according to claim 7, characterized in that, The response module is also used to acquire historical log stream data generated by the user on the target device when the front-end interactive interface does not detect user input operations for a preset time period. The intent recognition module is further configured to determine the user's second intent and second context information based on the historical log stream data; The prediction module is further configured to input the second intent and the second contextual information into the large language model to obtain a second candidate result; The front-end interactive interface is also used to display the second candidate result.
9. The information recommendation system according to claim 8, characterized in that, The prediction module includes a first language model and a second language model, wherein the first language model supports a larger text size than the second language model. The prediction module is used to input the task request, the first intent, and the first context information into the first large language model to obtain the first candidate result; Alternatively, it can be used to input the second intent and the second contextual information into the second large language model to obtain the second candidate result.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements an information recommendation method based on a large language model as described in any one of claims 1 to 6.